Skip to content

inconsistency in the scaling of the y-axes #3691

Description

@michkami

Description

In the example below we have 3 data rows.
Data1 and Data2 are grouped and assigned to the y-Axis.
Data3 is assigned to the y2-Axis.
When setting bar.zerobased: false it results in following chart:
grafik

I would expect the y2-Axis to be also scaled like the y-Axis, as all values on this axis are positive too.
I see no reason here to treat the y2-axis differently from the y-axis in this case.

The same happens when the data is not grouped at all:
grafik
In this case data3 on y2-axis is not scaled.

Using bar.zerobased: true leads to following and correct result:
grafik

Removing data2 from the chart and setting bar.zerobased: false results in this chart:
grafik
Here I would also expect for both axes to be scaled like the Y-Axis in Screenshot 1 (the stacked bars)

bar.zerobased: true scales as expected:
grafik

Having 2 grouped data rows on each axis results in both being scaled correctly:
grafik

Same with all 4 data rows being not grouped:
grafik

Overall, it seems like there is an inconsistency how the grouped data affects the scaling of the y-axes. It seems like you need at least 2 data rows per group for the scaling to work as expected.

Is the "wrong" behavior I described above the expected behavior, or can we classify this as a bug?

Steps to check or reproduce

https://jsfiddle.net/michkami/a9uzyrs8/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions