eclipse / swtchart

Eclipse Public License 2.0
45 stars 41 forks source link

axis tick labels are not properly shown in some cases #375

Closed yoshitaka1008 closed 1 month ago

yoshitaka1008 commented 10 months ago

I have seen two cases where axis tick labels are not properly shown.

case 1: when setting axis range containing zero, axis tick label "0" is not shown.

actual: actual_1 expected (before the fix for #124): expected_1

Note: the issue is reproducible with Test1.java in test.zip

case 2: when setting axis tick label format, duplicated tick labels are shown.

actual: actual_2

expected (before the fix for #124): expected_2

Note: the issue is reproducible with Test2.java in test.zip

yoshitaka1008 commented 10 months ago

Analysis and possible solution:

yoshitaka1008 commented 10 months ago

Hi @MatthewKhouzam , does the patch 375.patch work in your case?

yoshitaka1008 commented 10 months ago

patch with tests: 375_fix_with_tests.patch

eselmeister commented 10 months ago

@yoshitaka1008 Thanks for your patches. I will also test them.

MatthewKhouzam commented 10 months ago

This is fine here. Thanks for checking!

ghost commented 10 months ago

There is a jar file with the patch?

eselmeister commented 10 months ago

@yoshitaka1008 @MatthewKhouzam Thanks for your feedback. @VictorRojasGIT Wait for the next run of https://ci.eclipse.org/swtchart/job/build/job/develop/. Jars are available after successful build on: https://download.eclipse.org/swtchart/integration/develop/repository or build it yourself via Maven/Tycho.

eselmeister commented 1 month ago

The "0" label issue was already solved.

Screenshot from 2024-09-02 19-34-14

The "duplicated tick labels" was introduced on purpose. But it's true that it might be confusing if no value is displayed at all.

eselmeister commented 1 month ago

Screenshot from 2024-09-02 19-38-05 Screenshot from 2024-09-02 19-38-27

eselmeister commented 1 month ago

The user defines the tick decimal format. It's almost impossible to deduct a more fine grained decimal format as the decimal format may have been set on purposes. To display that it's not a chart defect, three dots are set instead of hiding the label.