2
votes

I have a column chart in Highcharts that looks roughly like this:

     |                                                             |
     |                                                             |
  S  |                                                             |
  e  |                                                             |  M
  c  |                         +-+                                 |  e
  o  |            +-+          | | +-+              +-+     +-+    |  t
  n  |    +-+     | |          | | | |              | | +-+ | |    |  e
  d  |    | |     | |          | | | | +-+          | | | | | |    |  r
  s  |    | | +-+ | |          | | | | | |          | | | | | |    |  s
     |    |1| |2| |3|          |1| |2| |3|          |1| |2| |3|    |
     +-------------------------------------------------------------+
           Fld A (s)            Fld B (s)            Fld C (m)

The labels "1", "2", and "3" refer to records; while "A", "B", and "C" refer to fields. So record #1 is represented as three separate values over fields A, B, and C, as represented by the labeled columns. I achieved this result by:

  • Providing an array to the series config option, one series for each record.
  • Providing an array to the xAxis/categories config option, one element for each field name.
  • Providing a 2-element array to the yAxis config option.

My problem is that values in field C will are shown on the Seconds axis, even though they are in units of Meters. I could change the entire series to be on the Meters axis (via the series/yAxis config option), but then fields A and B would show on the wrong axis.

Is there any way to map values within a series to different axes?

EDIT 9/12/2011: If this is impossible as stated, I'm willing to accept an alternate method, such as a different configuration or modifying Highcharts internals, via a plugin or otherwise.

EDIT 9/13/2011: I asked the same question on the HighCharts forum here: http://highslide.com/forum/viewtopic.php?f=9&t=12315, and no one has answered it there either. I'm beginning to think there is probably not any easy answer. :)

2

2 Answers

0
votes

A demo is available here: http://www.highcharts.com/demo/combo-dual-axes

chart.yAxis should be an array of two yAxis objects and your series object should specify the yAxis that it corresponds to.

0
votes

A highslide support person told me this is not possible.

However, another person gave me a possible workaround: create a separate set of series for field C. Then set the values for fields A and B in the second set to null, and set the values in the first set of series for field C to null.

There is a link to a jsfiddle that demonstrates this workaround in the forum topic: http://highslide.com/forum/viewtopic.php?f=9&t=12315