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!
@wvengen created a gist showing a problem with this build, and this gist is my fix for those problems. The issue here was that rebuilding d3.chart in step 3 installed a local version of d3, which got included in the webpack bundle. This meant that the final webpack bundle had 2 copies of d3, and d3.chart was only attached to one of them. By removing the node_modules after building d3.chart we can avoid this problem.
- Save the files somewhere
npm install
- rebuild d3.chart:
cd node_modules/d3.chart && npm install && grunt build && rm -rf node_modules && cd -
webpack index.js build.js
- open
index.html
- no more errors!