Charts: I have an immature small suggestion

Created on 1 Jul 2016  ·  10Comments  ·  Source: danielgindi/Charts

I think _autoScaleMinMaxEnabled... should be after calcModulus () in BarLineChartViewBase.drawRect(), because _leftAxis._axisMinimum will be recalculated。YAxisRenderer?.computeAxis(yMin:yMax:) no recalculation。

Rarely appeared the error Ymax text in YAxis
sorry, english is not good.

idea task

All 10 comments

Can you test if you experience a problem like this in Charts 3.0?

@PhilJay I think that autoScaleMinMaxEnabled does not work at all in 3.0

I am afraid that was missed.
It was related to the way the calcMinMax() method used to work, am I right? Where it allowed to provide a minimum and maximum "x-position" to calculate the min and max values.

Yeah... We need to find a way to allow recalculating min/max as the viewport moves, according to the lowest/highest visible x

Maybe we can provide an additional calcMinMax(float minX, float maxX) method for the ChartData class?

Or maybe make the calcMinMax test for autoScaleMinMaxEnabled?

So you would move the autoScaleMinMaxEnabled flag to the ChartData class? Or how would you do the "testing"?

Oh yeah that's problematic lol

So change the signature to calcMinMax(float minX, float maxX) like you suggested, and add an overload on BarLineChartViewBase?

Yes something like that. Good thing is we have methods like dataSet.getEntryForXValue(...) which allow us to find the first and last Entry to be used for calculation based on the provided minX and maxX.

Was this page helpful?
0 / 5 - 0 ratings