dant
Posts: 2
Joined: Wed Sep 26, 2018 12:16 pm

Using highcharts & highstock together on same page

Hope someone can help.. ?
I'm trying to use both highcharts and highstock on a single page, loading from CDN, initially I set up various highcharts - gauge and bar chart with drilldown and using the following all is working fine:

Code: Select all

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/drilldown.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/solid-gauge.js"></script>
I now have a highstock chart but I can't get it to work together on the same page - I've tried just using highstock (without highcharts) and then adding highcharts-more and the modules, also tried using highcharts and then loading highstock as a module which didn't work either e.g.

Code: Select all

<script src="https://code.highcharts.com/modules/highstock.js"></script> 
OR

Code: Select all

<script src="https://code.highcharts.com/modules/stock.js"></script>
I assume the order of the CDN links is crucial to make it work too?

I'm also aware that when rendering the charts highcharts uses

Code: Select all

Highcharts.chart
and highstock uses

Code: Select all

Highcharts.stockChart
- so how would this work when using both?

Many thanks.
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: Using highcharts & highstock together on same page

Hi, dant!

Thank you for contacting us. You will get your answer on StackOverflow: https://stackoverflow.com/questions/525 ... -same-page

Please, do not duplicate topics on few different support channels ;)

Kind regards!
Rafał
Rafal Sebestjanski,
Highcharts Team Lead
dant
Posts: 2
Joined: Wed Sep 26, 2018 12:16 pm

Re: Using highcharts & highstock together on same page

Thanks Rafał - duly noted!

Return to “Highcharts Usage”