PMSI-AlignAlytics / dimple

An object-oriented API for business analytics
Other
2.73k stars 557 forks source link

Using dimple with webpack #176

Open bbirand opened 9 years ago

bbirand commented 9 years ago

Hi all,

I'm trying to write a React component for Dimple, and am trying to package it using Webpack. Has anybody tried doing this? I managed to do the same with the dygraphs package, but I'm having some issues with dimple.

I tried installing d3 and dimple via npm, and then adding this line to my JSX file:

import 'd3/d3.js';
import dimple from 'dimple-js/dist/dimple.latest.js';

Then try this inside the file:

var svg = dimple.newSvg("#chartContainer", 590, 400);

This is giving an error that dimple doesn't have the newSvg method.

Any ideas how to go about this?

Thanks!

donpinkus commented 8 years ago

I'm trying this as well, if anyone has figured it out please post

ijoel commented 8 years ago

The change made in c3a10e5 makes it possible to import dimple from 'dimple

That change however, is not available in the 2.1.4 version of dimple that is currently available in npm. In the meantime, npm install -S git+https://github.com/PMSI-AlignAlytics/dimple.git should pull the latest and do the trick

bbirand commented 8 years ago

@ijoel Any ideas when the version in NPM will be updated? It seems like it's still at 2.1.4.