benjeffery / react-plotlyjs

ReactJS / PlotlyJS integration. Draw plotly.js graphs in your react app.
MIT License
111 stars 29 forks source link

Importing plotly-cartesian #15

Closed athenawisdoms closed 7 years ago

athenawisdoms commented 7 years ago

How should we import the plotly-cartesian module into a Meteor app?

import Plotly from 'plotly.js/dist/plotly-cartesian';

does not work because it gives an error

Uncaught Error: Cannot find module 'plotly.js/dist/plotly-cartesian'

Is there a way to save it using something like npm install package-name --save?

Did not find these modules via npm search plotly

tamaccount commented 7 years ago

I have the same question. Please include Install directions.

tamaccount commented 7 years ago

@athenawisdoms

I figured out our problem. We npm installed plotly when we should have installed plotly.js. https://www.javascripting.com/view/plotly-js

Once you runnpm install plotly.js, import Plotly from 'plotly.js/dist/plotly-cartesian' should work just fine.