question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do i use highcharts and highstock on the same page?

See original GitHub issue

Im unable to use highcharts and highstock on the same page. im getting error 16: http://www.highcharts.com/errors/16

Highcharts already defined in the page

This error happens the second time Highcharts or Highstock is loaded in the same page, so the Highcharts namespace is already defined. 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.

im using the react-highcharts libraries like this:

var Highstock = require('react-highcharts/dist/bundle/highstock');
var Highcharts = require('react-highcharts/dist/bundle/highcharts');

Any ideas or is this not possible?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:22 (20 by maintainers)

github_iconTop GitHub Comments

2reactions
mspe87commented, Nov 2, 2015

I had been struggling with this issue all day, and 5 minutes after posting my issue i found the solution. For other who might have the same problem, the solution is to us bundled version of highstock and non bundled version of highcharts. The non bundled version, expects highcharts to already be loaded

var Highstocks = require('react-highcharts/dist/bundle/highstock');
var Highcharts = require('react-highcharts');
0reactions
kirjscommented, Nov 19, 2015

I’ll close it, feel free to reopen if needed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using highcharts & highstock together on same page
I now have a highstock chart but I can't get it to work together on the same page - I've tried just using...
Read more >
javascript - Using highcharts & highstock together on same page
By using Highstock, you can create both stockChart and standard chart with additional modules: Highcharts.chart('container', { series: ...
Read more >
Using highcharts & highstock together on same page-Highcharts
Related Query · Using highcharts & highstock together on same page · drilldown maps and funnell charts on the same page using highcharts...
Read more >
Highcharts already defined in the page - OutSystems
Keep in mind that the Highcharts.Chart constructor and all features of Highcharts are included in Highstock, so if using the Chart and StockChart...
Read more >
highcharts - npm
Highcharts is a JavaScript charting library based on SVG rendering. This project includes Stock, the financial charting package, the Maps ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found