Evan.Xu
Evan.Xu

Reputation: 11

Different HighCharts Version on One Page

I have a old micro app using highstock 2.0.4 on a single application page. Now I want to integrate another micro app using highchart 5.0.5. how to handle this case?

Upvotes: 1

Views: 250

Answers (1)

ppotaczek
ppotaczek

Reputation: 39139

You can store Highcharts in another global variable after loading Highcharts code and all modules or plugins. Then you can clear Highcharts variable to allow different version of Highcharts to load.

<script src="http://code.highcharts.com/highcharts.js"></script>
<script>
  var HighchartsCore = Highcharts;
  Highcharts = null;
</script>
<script src="http://code.highcharts.com/3/highcharts.js"></script>

Live demo: http://jsfiddle.net/BlackLabel/unhcv76g/

Upvotes: 3

Related Questions