Basic example showing how to make a chart based on d3.chart
using the new and shiny UMD interface. This is currently being discussed
in #117, and not ready for use. It will be! present from d3.chart 0.3.0 onwards.
git clone https://gist.github.com/5789e5b2a295156ea48e.git && cd 5789e5b2a295156ea48e.git
npm install
webpack index.js build.js
- open
index.html
- see a basic circle graph
There used to be a problem here, thanks to JMStewart for finding the solution.
If you want to customize an existing chart, you can create a new chart based on that in exactly the same manner as shown here. Instead of var Chart = require('d3.chart')
, you'd use var SomeChart = require('d3.chart.somechart')
and define your own with var MySomeChart = SomeChart.extend('MySomeChart', { /* ... */ })
. See d3.chart.sankey for a real-world example.