use highchart and highstock on the same page

时光怂恿深爱的人放手 提交于 2019-12-03 10:43:24
lbrutti

Got same trouble with conflicting Highchart and Highstock. here's the official solution:

Keep in mind that the Highcharts.Chart constructor and all features of Highcharts are included in Highstock, so if you are running Chart and StockChart in combination, you only need to load the highstock.js file.

http://highcharts.com/errors/16

Highcharts is included in highstock.js, so please take look at the example, how use highcharts with highstock.js.

http://jsfiddle.net/sbochan/PtXhB/

Secondly I advice to use the newest highstock.

I have experienced the same problem when I tried to use Highstock chart and Angular Gauge, And the problem was solved when I try to rearrange highstock highchart javascript library like this

<script type="text/javascript" src="jQuery/Highcharts/highcharts.js"></script>
<script type="text/javascript" src="jQuery/Highcharts/highstock.js"></script>
<script type="text/javascript" src="jQuery/Highcharts/highcharts-more.js"></script>

or (if you don't want to use additional graphics)

<script type="text/javascript" src="jQuery/Highcharts/highcharts.js"></script>
<script type="text/javascript" src="jQuery/Highcharts/highstock.js"></script>

I hope it can be useful

you must delete this file:

highcharts.js

i tried and it works

Im my case, including only HighStock's file worked for HighChart's as well.

I have many charts, highchart's or highstock's, possible to be included on same page, and I just call HighStock.js once and it works for both !

Use just highstock.js and delete highcharts.js And It's work well for me And Good luck

Highstock contains most of HighCharts code. Have you tried including only highstock.js in your page to display both charts ?

I had same issue and got fixed by ordering my JS as below.

<script type="text/javascript" src="$javascript_folder/highstock.js"></script>
<script type="text/javascript" src="$javascript_folder/highcharts.js"></script>

I don't know its working fine according Ardi. Is works fine for me when i load highstock.js first followed by highcharts.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!