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 crash is at ChartHighlighter.swift file, crash message is "EXC_BAD_INSTRUCTION(code=EXC_I386_INVOP,subcode=0x0)" .
and the crash breakpoint at the method:
internal func getXIndex(x: Double) -> Int
{
// create an array of the touch-point
var pt = CGPoint(x: x, y: 0.0)
// take any transformer to determine the x-axis value
_chart?.getTransformer(ChartYAxis.AxisDependency.Left).pixelToValue(&pt)
return Int(round(pt.x))
}
And I set _chartView.highlightPerTapEnabled = NO; _chartView.highlightPerDragEnabled = NO;, the bug will fixed.
The text was updated successfully, but these errors were encountered:
If your bar chart has no data, it should display 'No chart data available. You need to provide data for the chart'. And it won't zoom or scroll, as exptected.
what's your data looks like? I tried with ChatsDemo, not setting chart.data by commenting out chartView.data = data
it will not crash. Could you provide a data code snippet with ChartsDemo so we can reproduce it?
If your data is empty, but it actually did trigger getXIndex(), and the matrix will be a mess, so pixelToValue will calculates NaN and leads to crash. By default, it will check data and will not goes to getXIndex() or drawRect if no data available. Have you modified the code?
the crash is at ChartHighlighter.swift file, crash message is "EXC_BAD_INSTRUCTION(code=EXC_I386_INVOP,subcode=0x0)" .
and the crash breakpoint at the method:
And I set
_chartView.highlightPerTapEnabled = NO; _chartView.highlightPerDragEnabled = NO;
, the bug will fixed.The text was updated successfully, but these errors were encountered: