Cannot display multiple Highcharts on a single pag

2019-07-04 21:06发布

问题:

I am trying to display 3 Highcharts-generated graphs on one page. I have loaded up the first two just fine but when I add the Javascript for the third all of them do not show. I have duplicated my code in this JSFiddle:

http://jsfiddle.net/ricburton/bCU2E/

Any help or guidance would be really appreciated.

I have checked out this answer: Manage multiple highchart charts in a single webpage

And googled around a lot. I am sure it is my limited understanding of Javascript holding me back.

回答1:

you've missed } somewhere, here is what I see in firebug:

missing } after function body

edit

you haven't closed last closure, add }); at the end of code

I have also removed 2 closures and only one, see updated code: http://jsfiddle.net/bCU2E/2/



回答2:

Your syntax was wrong, updated; here is the correct fiddle