Jabda
Jabda

Reputation: 1792

HighCharts Boxplot side by side Xaxis

I am trying to do something similar to this: Is it possible in highcharts to have 2 charts, sharing the same x-axis, but next to one another?

http://jsfiddle.net/F3pts/7/

However with boxplots it seems that adding a series even to another X Axis makes the boxplots in the first axis "squish" together as if they were being added to the same axis

see code here: http://jsfiddle.net/jK6pb/2/ . Series 'third' is on Axis 1 but still affects the boxplots on Axis 0. Try toggling hide and show. You can see I added space between the two axis to make sure it wasnt the axis causing the effect

chart.get('third').show()

Use case: Series 'Observation1' and 'Observation2' are related datasets and the boxplots are drawn together. 'Observastions3' is an unrelated data set and should be drawn on the side in its own axis

side by side comparison

Upvotes: 2

Views: 1457

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

It's possible to achieve but require three things:

  • set grouping: false for right series
  • right plotting area is limited to one series
  • series with disabled grouping need to be first series in series array.

And live example: http://jsfiddle.net/jK6pb/5/

Upvotes: 1

Related Questions