ng2-highcharts icon indicating copy to clipboard operation
ng2-highcharts copied to clipboard

While trying to integrate highstocks getting a error in ionic v2

Open kalandher opened this issue 7 years ago • 3 comments

ERROR TypeError: Highcharts.StockChart is not a constructor.

Highcharts are already working. when integrating highstock im getting these errors. Why definations of highstocks are not in index.d.ts? even if i move them into index.d.ts its not working.

kalandher avatar Feb 22 '18 18:02 kalandher

Hi @kalandher , normally it's because you've set the highcharts.js as a dependency, but when you need to use Highcharts.StockChart, you need to depend on highstock.js instead of highcharts.js.

Bigous avatar Feb 22 '18 18:02 Bigous

Hi @Bigous my app already has highcharts. now i want to integrate highstocks as well. cant i use both highcharts and highstocks? I have loaded highstock.js into src/assets/libs/ folder. How can i use both the dependencies?

kalandher avatar Feb 23 '18 06:02 kalandher

Hello @Bigous, Thanks Its working. Removing highcharts.js and using highstock.js will impact any of my existing charts which i built in using highcharts.

kalandher avatar Feb 23 '18 12:02 kalandher