-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: pass baseurl through to default tooltip handler (#1286)
* feat: pass baseurl through to default tooltip handler * chore: update deps
- Loading branch information
Showing
4 changed files
with
141 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>Vega-Embed for Vega-Lite</title> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/vega@5"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/vega-lite@5"></script> | ||
<script src="build/vega-embed.js"></script> | ||
</head> | ||
|
||
<body> | ||
<div id="vis"></div> | ||
<script> | ||
async function run() { | ||
const spec = { | ||
$schema: "https://vega.github.io/schema/vega-lite/v5.json", | ||
view: { stroke: null }, | ||
data: { | ||
values: [{ image: "data/ffox.png" }, { image: "data/gimp.png" }, { image: "data/7zip.png" }], | ||
}, | ||
mark: "text", | ||
encoding: { | ||
text: { field: "image" }, | ||
y: { field: "image", axis: null }, | ||
tooltip: [{ field: "image" }], | ||
}, | ||
}; | ||
const result = await vegaEmbed("#vis", spec, { | ||
loader: { baseURL: "https://vega.github.io/vega-datasets/" }, | ||
}); | ||
|
||
console.log(result); | ||
} | ||
run(); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters