Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Latest commit

 

History

History
61 lines (46 loc) · 1.97 KB

getting-started.md

File metadata and controls

61 lines (46 loc) · 1.97 KB

Getting Started

Installing

If you use NPM, npm install d3-visualize. Otherwise, download the latest release. You can also load directly from giottojs.org, as a standalone library or unpkg. AMD, CommonJS, and vanilla environments are supported. In vanilla, a d3 global is exported. Try d3-visualize in your browser.

<script src="https://d3js.org/d3-collection.v1.min.js"></script>
<script src="https://d3js.org/d3-dispatch.v1.min.js"></script>
<script src="https://d3js.org/d3-selection.v1.min.js"></script>
<script src="https://d3js.org/d3-timer.v1.min.js"></script>
<script src="https://giottojs.org/latest/d3-view.min.js"></script>
<script>
<script src="https://giottojs.org/latest/d3-visualise.min.js"></script>
<script>

var vm = d3.view();
...
vm.mount("#my-element");

</script>

Dependencies

d3-view strictly depends on four d3 plugins:

However, to write interesting UI components one may want to use many other d3 plugins, or the whole d3 library.

Creating a visual

To create a visual object for you application, invoke the d3.view function

var viz = new d3.Visual({
    type: "barchart",
    data: [1, 2, 3, 4, 5],
    
});