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

d.AmStockChart is not a constructor #87

Open
salmanmuneer007 opened this issue Dec 13, 2018 · 1 comment
Open

d.AmStockChart is not a constructor #87

salmanmuneer007 opened this issue Dec 13, 2018 · 1 comment

Comments

@salmanmuneer007
Copy link

salmanmuneer007 commented Dec 13, 2018

Uncaught TypeError: Cannot read property 'date_time' of undefined
at eval (eval at (jquery.min.js:2), :18:73)
at eval ()
at jquery.min.js:2
at Function.globalEval (jquery.min.js:2)
at Ha (jquery.min.js:3)
at n.fn.init.append (jquery.min.js:3)
at n.fn.init. (jquery.min.js:3)
at Y (jquery.min.js:3)
at n.fn.init.html (jquery.min.js:3)
at Object.success (apps:3628)

Uncaught TypeError: Cannot set property 'innerHTML' of null
at b.write (amstock.js:6)
at ammap.js:10
at d.handleLoad (amcharts.js:7)

Uncaught TypeError: Cannot set property 'innerHTML' of null
at b.write (amstock.js:6)
at ammap.js:10
at d.handleLoad (ammap.js:7)

@xorspark
Copy link

There might be several things going on but it's hard to say going by just a stack trace.

A few things that stand out -

  • d.AmStockChart is not a constructor sounds like you're not including the stock chart. Note that the order is amcharts.js, serial.js, then amstock.js

  • I'm seeing both amstock and ammap in the last part of your stack trace. When using both charts and maps, you need to include ammap_amcharts_extension.js instead of ammap.js. amcharts.js and ammap.js both override each other's functions, which impacts functionality, leading to random errors like this; ammap_amcharts_extension.js extends the classes in amcharts.js to implement map-related functionality without overriding existing functionality. Note that his needs to be included after amcharts.js.

  • Cannot set property 'innerHTML' of null means the corresponding div isn't on the page yet. If you're using the plugin, this shouldn't happen unless you're calling makeChart yourself. It's hard to troubleshoot without seeing a demo. Please provide a simplified version of your setup in codesandbox or stackblitz.

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

2 participants