Jason Gilmore
Jason Gilmore

Reputation: 4068

Adding multiple dynamic series and axes via JSON into Highcharts

Like many Highstock users, our data is retrieved from a database by way of Ajax queries. The series data sets are all time-based, but have different purposes and data ranges.

I can add multiple series to the chart no problem. Works great. However, how can I dynamically (emphasis on dynamically) add companion axes to these series (axis title and range)? I've scoured the documentation and forums but can't figure out exactly how to associate the new axis with the new series.

Thanks!

Upvotes: 0

Views: 2409

Answers (1)

Gabriel Florit
Gabriel Florit

Reputation: 2918

The only way to do this (as far as I know) is to add multiple empty axes to your chart, and then set them programmatically. It's a hack - but it works:

http://livecoding.io/3431916

Upvotes: 1

Related Questions