Apexcharts.js: Brush selection removes Y axis labels/scales

Created on 26 Jul 2019  路  3Comments  路  Source: apexcharts/apexcharts.js

Codepen

3.8.3 - https://codesandbox.io/s/383-y-labels-brush-lwmj4
3.7.1 - https://codesandbox.io/s/371-y-labels-brush-wmsz1

Explanation

When I add a brush to my chart the Y axis labels are hidden and instead uses the default single axis.

The line for Measure1 is plotted correctly against the unlabeled left axis, but Measure2 is not.

If you set selection.enabled to false in brushOptions the Y axis labels/scales are restored but obviously then the brush is not so useful.

I would expect the behavior to be more like in the 3.7.1 example. This is almost the same code as the top example - only change is brush.autoScaleYaxis is set to true in brushOptions. When this is set to false the behavior is identical to 3.8.3.

Note that this example is broken as well in different ways - the numbers on the right Y axis are wrong, the large data point on the right is drawn above the chart.

Happy to provide more examples if required.

brush

Most helpful comment

I am experiencing the same issue

All 3 comments

I am experiencing the same issue

Had another look at this - seems to be that some options set for the brush are also applied to the other chart.

https://codesandbox.io/s/383-y-labels-brush-defined-y-axis-in-brush-75cv7

In the above example I have set yaxis.show to true for the chart, and false for the brush but no axis is drawn for the chart.

Same issue for me with area chart:
When you make a selection on the brush chart, it removes the second axis on the area chart.
I would also mention that the brush chart selection works weird. When you make a selection, it overflows on the left side and after thet you can't move to end of the right side.

Vanilla
https://codepen.io/elijah1/pen/gOawywb?editors=1011

React
https://codesandbox.io/s/brush-chart-with-multiple-y-axis-nnui1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeroenpol picture jeroenpol  路  3Comments

Bilge picture Bilge  路  3Comments

tcarlsen picture tcarlsen  路  3Comments

cstlaurent picture cstlaurent  路  3Comments

EroTiXx picture EroTiXx  路  3Comments