File: test-bind.html

package info (click to toggle)
node-vega-embed 6.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,016 kB
  • sloc: javascript: 50; sh: 8; makefile: 5
file content (26 lines) | stat: -rw-r--r-- 707 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!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@4"></script>
    <script src="build/vega-embed.js"></script>
  </head>

  <body>
    <div id="bind"></div>
    <div id="vis"></div>
    <script>
      async function run() {
        const result = await vegaEmbed("#vis", "examples/histogram.vg.json", {
          bind: "#bind",
          loader: { baseURL: "https://vega.github.io/vega/" },
        });
      }
      run();
    </script>
  </body>
</html>