hellocharts-android icon indicating copy to clipboard operation
hellocharts-android copied to clipboard

Problems with equal values ​​on the y axis

Open GydeonMarques opened this issue 5 years ago β€’ 4 comments

Hello ... I don't know if it's a problem, but when I have equal Y-axis values ​​on my line chart, it just doesn't show anything on the chart. See example below

List<PointValue> values = new ArrayList<PointValue>(); values.add(new PointValue(0, 2)); values.add(new PointValue(1, 2)); values.add(new PointValue(2, 2)); values.add(new PointValue(3, 2));

GydeonMarques avatar Aug 23 '19 12:08 GydeonMarques

Same problem

onecoders avatar Aug 27 '19 07:08 onecoders

yep, have same problem, do we have any solumtion @lecho ?

It's seems that here https://github.com/lecho/hellocharts-android/issues/455 it was fixed by @uCloudCastle, but for me it doesn't work, seems that problem is because of decimals...

dajver avatar Oct 02 '19 16:10 dajver

Hi guys, it's been a while since I was active in this repo. I believe the problem is related to the "feature" that this library calculates viewport automatically(min and max for both axis). When all points have the same value min and max are the same and thereby viewport has height/width of 0. It can be disabled and set manually. For solution, please take a look at issue #169 and #143

lecho avatar Oct 06 '19 15:10 lecho

Hi, thank for your response, but this issue has been fixed here https://github.com/lecho/hellocharts-android/issues/455.

dajver avatar Oct 07 '19 18:10 dajver