whawker / react-jsx-highcharts

Highcharts built with proper React components
https://whawker.github.io/react-jsx-highcharts/examples
MIT License
419 stars 94 forks source link

How do you display two series in two different panes? #162

Closed rkabis closed 6 years ago

rkabis commented 6 years ago

Bug or Feature Request?

Question on implementation

Description

Similar to this, but implemented with the components.

I tried the code below, but they would still display on the same pane.

          <YAxis crosshair>
            <YAxis.Title>Price</YAxis.Title>
            <ColumnSeries name="Crypto1 (volume)" data={vol_1} color="orange"/>
          </YAxis>

          <YAxis>
            <YAxis.Title>Volume</YAxis.Title>
            <SplineSeries name="Crypto2 (volume)" data={vol_2} color="#aa66dd"/>
          </YAxis>
whawker commented 6 years ago

Seems to be a case of setting a height on your YAxis, and offsetting the other YAxis to account for that height?

Example here: https://stackblitz.com/edit/base-chart-example-vd12r5?file=MyChart.js

rkabis commented 6 years ago

Hi @whawker. Thanks for the quick reply. Example works out well!

whawker commented 6 years ago

No worries!