Closed msimonc closed 8 years ago
If you are using the Webpack version, then yes you will need to use AmCharts
rather than AmCharts.React
You cannot use npm install amcharts3
because AmCharts is not published on NPM.
Instead, you need to use the GitHub syntax: npm install amcharts/amcharts3
Are you specifying the categoryField?
"categoryField": "country"
Couple of things:
<div className="height400"> <AmCharts {...config}/> </div>
works better than<AmCharts.React {...config}/>
but I get 'undefined' on the X axis:
Also install: $ npm install amcharts3 --save npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "amcharts3" "--save" npm ERR! node v6.1.0 npm ERR! npm v3.8.6 npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/amcharts3 npm ERR! 404 npm ERR! 404 'amcharts3' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404
but it worked when I manually edited package.json then did
npm install
var AmCharts = require("amcharts3-react");
class ClassName extends React.Component {
...