Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event example crashes on react 16 #70

Open
elpinguinofrio opened this issue Feb 21, 2018 · 2 comments
Open

event example crashes on react 16 #70

elpinguinofrio opened this issue Feb 21, 2018 · 2 comments

Comments

@elpinguinofrio
Copy link

ReferenceError: AmCharts is not defined
(anonymous function)
node_modules/@amcharts/amcharts3-react/amcharts3-react.js:253
  250 | 
  251 | var id = 0;
  252 | 
> 253 | AmCharts.React = createReactClass({
  254 |   getInitialState: function () {
  255 |     return {
  256 |       id: "__AmCharts_React_" + (++id) + "__",
View compiled
./node_modules/@amcharts/amcharts3-react/amcharts3-react.js
node_modules/@amcharts/amcharts3-react/amcharts3-react.js:297
  294 |       });
  295 |     }
  296 |   });
> 297 | })();
  298 | 
  299 | 
  300 | 
View compiled
__webpack_require__
/Users/Shared/simulation/webpack/bootstrap 583ffc45c54f897f5278:678
  675 | };
  676 | 
  677 | // Execute the module function
> 678 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
  679 | 
  680 | // Flag the module as loaded
  681 | module.l = true;
View compiled

looks like devs had abandoned the project.

@raymondsiu
Copy link

I'm using this project heavily and it has been pretty stable.
Can you show how you are importing amcharts3-react and amcharts3 into your React code? I suspect it is an ordering issue. You need to import all your amcharts3 dependencies before you import amcharts3-react.

Example:

import React from 'react';
import PropTypes from 'prop-types';
import 'amcharts3';
import 'amcharts3/amcharts/serial';
import 'amcharts3/amcharts/pie';
import 'amcharts3/amcharts/themes/light';
import 'amcharts3/amcharts/plugins/export/export.min.js';
import 'amcharts3/amcharts/plugins/export/export.css';
import AmCharts from '@amcharts/amcharts3-react';

@junjianglin
Copy link

Sorry this is unrelated to the issue, I just want to find the user elpinguinofrio.

Hello elpinguinofrio, one of my repo you forked contains some sensitive information. Do you mind remove those information? Github does not support private message, this is the only way I can reach out to you. Please leave a message to me and we can figure out the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants