apexcharts / apexcharts.js

📊 Interactive JavaScript Charts built on SVG
https://apexcharts.com
MIT License
14.41k stars 1.31k forks source link

Brush chart corrupts target charts y axis range #3934

Open vargemp opened 1 year ago

vargemp commented 1 year ago

Description

Having set yaxis.max & yaxis.min on brush chart and in the same time having it set on the chart's that brush targets, the target charts use brush's settings instead of their own.

Steps to Reproduce

  1. Create brush chart
  2. Set yaxis.min & yaxis.max target chart
  3. Set different yaxis.min & yaxis.max on brush chart

Expected Behavior

Target chart(s) use min&max from their options (not from the brush chart's options).

Actual Behavior

Target chart(s) use min&max from brush chart's options

Screenshots

image

Reproduction Link

https://codepen.io/vargemp/pen/wvQjeGJ

matheo commented 2 months ago

Yeah! something is fishy here.

I found that brush doesn't play well with my multiple yAxis definitions, and I don't want the brushChart to calculate anything but the xAxis min/max.

I'm having different series and I'm showing them fine with different min/max in the yAxis but once I enable the brush, it "normalizes" the yAxis and that's not ideal.

@brianlagunas autoScaleYaxis: false should leave the yAxis untouched right? or why brush needs to interfere with the yAxis at all?

without brush:

image

with brush:

image

I will have to implement my own controls in the meantime :(