Open scheung38 opened 8 years ago
Do you get any error messages when you run npm install
?
Are you in the examples/webpack
directory when you run npm install
?
When using the amcharts3-react
plugin, you must use React.createElement(AmCharts, { ... })
rather than AmCharts.makeChart("chartdiv", { ... })
The options are the same as AmCharts.makeChart
, except that the id "chartdiv"
is created automatically by the plugin, so you do not need to specify it.
After running npm install
it needs to run webpack
to bundle all of the JavaScript files into a single build/example.js
file.
You can remove the prepublish
, but then you need to run both npm install
and webpack
, rather than just npm install
, so it is less convenient.
webpack/examples.js
But after npm install, node_modules is still empty?
Also why is there no makeChart here
var chart = AmCharts.makeChart("chartdiv", {...}
But it is shown in most examples? Do I not need it?
Noticed I added in package.json
"scripts": { "prepublish": "webpack" } but when removed, node_modules are generate. If not sure why we need prepublish