pepstock-org / Charba

J2CL and GWT Charts library based on CHART.JS
https://pepstock-org.github.io/Charba-Wiki/docs
Apache License 2.0
62 stars 6 forks source link

Invalid rendering when axis is stacked and the height of chart is fixed. #62

Closed stockiNail closed 3 years ago

stockiNail commented 3 years ago

See discussion #61.

There is an issue of chart rendering when a linear scale is stacked and the height of the chart is fixed. Sounds an issue related to Chart.js.

bugSize2

Good catch @MartinSchwarzbauer

stockiNail commented 3 years ago

@MartinSchwarzbauer I have created an issue to Chart.js, because sounds a bug of Chart.js

See https://github.com/chartjs/Chart.js/issues/9178

stockiNail commented 3 years ago

@MartinSchwarzbauer I have checked more in details you axis configuration and there is a property which is the root cause of the rendering.

Remove the bounds setting in the linear axis or set to Bound.TICKS (instead of Bound.DATA), and it works.

 y_axis.setBounds(Bounds.TICKS);
stockiNail commented 3 years ago

The issue has been solved by https://github.com/chartjs/Chart.js/pull/9181. Chart.js version 3.3.1 is needed!

stockiNail commented 3 years ago

Chart.js version 3.3.2 has been added to the master branch. With that, the issue about the usage of Bounds.DATA has been solved.