Home  >  Q&A  >  body text

Can the LightningChart shared axis feature stack 2 line series on multiple Y axes with a shared X axis?

I need to create a stacked line chart. Basically I want to create 2 Y axes and have them share a common X axis. The two Y-axes should be stacked on top of each other.

I know ChartXY has an option to add an axis (https://lightningchart.com/lightningchart-js-api-documentation/v4.0.0/classes/ChartXY.html#addAxisY), but there seems to be a default parameter for adding the Y axis Will be on the left or right side. Is there a way to change it to top or bottom? Would appreciate any help with LightningCharts.js or any other way to achieve this.

P粉894008490P粉894008490258 days ago394

reply all(1)I'll reply

  • P粉037880905

    P粉0378809052024-02-05 09:50:36

    Currently there is no support for stacking multiple Y axes together in 1 chart.

    Currently this use case is achieved by making multiple charts, synchronizing their X-axis and making only 1 X-axis visible. For example https:// Lightningchart.com/lightningchart-js-interactive-examples/examples/lcjs-example-0028-multiChannelLineProgressiveOwnAxes.html?isList=false

    reply
    0
  • Cancelreply