Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

logarithmic scale - support of : beginAtZero, zero values, multidataset selection (issue-#9629)

Open skalimer0 opened this issue 3 years ago • 9 comments

beginAtZero support and zero values display on logarithmic scale with multi dataset selection.

same changes can be apply on 3.9 branch.

issue #9629

Thanks

skalimer0 avatar Sep 27 '22 15:09 skalimer0

You don't need to open a new issue every time you change your code

LeeLenaleee avatar Sep 27 '22 16:09 LeeLenaleee

You don't need to open a new issue every time you change your code

Sorry for that, i just want to make that clean.

skalimer0 avatar Sep 27 '22 18:09 skalimer0

Looks like the code already had support for zero, does it not work?

kurkle avatar Sep 28 '22 04:09 kurkle

Looks like the code already had support for zero, does it not work?

The code don't display zero. Line chart is cut.

skalimer0 avatar Sep 28 '22 05:09 skalimer0

Looks like the code already had support for zero, does it not work?

The code don't display zero. Line chart is cut.

true, a pen using master: https://codepen.io/kurkle/pen/KKRQpgR

kurkle avatar Sep 28 '22 05:09 kurkle

And no '0' tick appear too.

skalimer0 avatar Sep 28 '22 06:09 skalimer0

Just an idea... to support zero values, It may be better to use log1n() function instead of log10().... no ?

skalimer0 avatar Sep 28 '22 12:09 skalimer0

I check tests on scale-logarithmic, all tests with type bar are failed because bar have beginAtZero at true by default. All test on min value on it return 0 with my code... it's normal (current master don't have beginAtZero full support). I should add beginAtZero to false or use line type on tests ?

skalimer0 avatar Sep 28 '22 22:09 skalimer0

Changing the type to line is fine.

Also should add a test that beginAtZero actually works

LeeLenaleee avatar Sep 29 '22 20:09 LeeLenaleee

Hello, Please this feature can be merge on master ?

skalimer0 avatar Jun 04 '24 12:06 skalimer0

The build fails, as long as that happens this can't be merged.

Also like I said in my previous comment, a test for this should be added so we get notified in the future if it breaks

LeeLenaleee avatar Jun 04 '24 12:06 LeeLenaleee

For the build, sorry a mistake in my commit...

skalimer0 avatar Jun 04 '24 14:06 skalimer0

I'll do in other way later (and not in my master branch)

skalimer0 avatar Jun 13 '24 11:06 skalimer0