Open oromis300 opened 7 years ago
I had the same issue and fixed it by storing the smallest value (as variable negativeOffset) in the dataset as an offset if the value was < 0. I did the following changes in MultiLineGraphView.m:
In createYAxisLine (below calculation of minY):
if (minY < 0) { negativeOffset = 0 - minY; }
And every line that had
y = [[lineData.yAxisArray objectAtIndex:someIndex] floatValue] * stepY;
I replaced with
y = ([[lineData.yAxisArray objectAtIndex:someIndex] floatValue] + negativeOffset) * stepY;
Hey guys, This issue will be fixed soon. Sorry for replying late. Thanks for the solution.
Hi, first thanks for your work. I use a line graph and i can have negative value. On the first image you can see my graphe is good but the label on the left for negative value in not good. The lowest value is set on the 0 line. And i can't click on the negative point. I try to inverse the value to see what it's do and the graphe is totaly broken. So can we use negative value for Y position? And if yes how i do this?