You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is the float precision, after zooming in and out the lowestVisibleXIndex will 99% of the time return 1 when the chart is completely zoomed out.
Here is the code form BarLineChartViewBase.swift :
/// Returns the lowest x-index (value on the x-axis) that is still visible on he chart.
public var lowestVisibleXIndex: Int
{
var pt = CGPoint(x: viewPortHandler.contentLeft, y: viewPortHandler.contentBottom)
getTransformer(.Left).pixelToValue(&pt)
return (pt.x <= 0.0) ? 0 : Int(pt.x + 1.0)
}
pt.x will never be 0.0 but it will be something like 0.000000000001 and the index returned will be 1
The text was updated successfully, but these errors were encountered:
This problem is encountered with a LineChartView.
The problem is the float precision, after zooming in and out the lowestVisibleXIndex will 99% of the time return 1 when the chart is completely zoomed out.
Here is the code form BarLineChartViewBase.swift :
pt.x will never be 0.0 but it will be something like 0.000000000001 and the index returned will be 1
The text was updated successfully, but these errors were encountered: