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 following exception is thrown when using enabling a Trackball with a CategoryAxis x-axis.
════════ Exception caught by gesture library ═══════════════════════════════════
The following RangeError was thrown while dispatching a pointer event:
RangeError (index): Invalid value: Not in range 0..6, inclusive: 170
When the exception was thrown, this was the stack
#0 List.[] (dart:core-patch/growable_array.dart:147:60) #1 _TrackballPainter._generateAllPoints
package:syncfusion_flutter_charts/…/user_interaction/trackball_painter.dart:631 #2 TrackballBehavior.show
package:syncfusion_flutter_charts/…/user_interaction/trackball.dart:206 #3 TrackballBehavior.onTouchDown
package:syncfusion_flutter_charts/…/user_interaction/trackball.dart:230 #4 _ContainerArea._bindInteractionWidgets.
package:syncfusion_flutter_charts/…/base/chart_base.dart:1636
...
Event: PointerDownEvent#19ffd(position: Offset(246.1, 405.0), timeStamp: 32:30:22.992000, pointer: 15, kind: touch, buttons: 1, down: true, pressure: 0.6, pressureMin: 0.0, pressureMax: 3.2, size: 0.1, radiusMajor: 91.8, radiusMinor: 91.8)
position: Offset(246.1, 405.0)
Target: RenderPointerListener#26a18 relayoutBoundary=up1
parentData: not positioned; offset=Offset(0.0, 0.0) (can use size)
constraints: BoxConstraints(0.0<=w<=391.4, 0.0<=h<=425.0)
size: Size(391.4, 425.0)
behavior: deferToChild
listeners: down, move, up
════════════════════════════════════════════════════════════════════════════════
This appears to be due to the following code in trackball_painter.dart (line 630):
} else if (axis is CategoryAxis) {
x = axis._visibleLabels[xValue.round()].text;
}
The _visibleLabel property of axis contains only 6 values due to the large number of x-values in my CategoryAxis, and these being truncated to display nicely.
I suspect this can be fixed by changing the code to:
} else if (axis is CategoryAxis) {
x = axis._labels[xValue.round()].text;
}
The text was updated successfully, but these errors were encountered:
Greetings from Syncfusion. We can replicate the reported scenario when displaying x-value with more number of points. We have already fixed this issue and it will be included in the upcoming Vol 3 SP1 update which is expected to be rolled out in the first week of November 2019. We will intimate you once the release is rolled out. We appreciate your patience until then.
Thanks for being patience. The reported issue has been fixed, now the exception will not be thrown when displaying x-value with more number of points in trackball. To resolve the reported issue, kindly upgrade your packages from the below link.
The following exception is thrown when using enabling a Trackball with a CategoryAxis x-axis.
This appears to be due to the following code in trackball_painter.dart (line 630):
The _visibleLabel property of axis contains only 6 values due to the large number of x-values in my CategoryAxis, and these being truncated to display nicely.
I suspect this can be fixed by changing the code to:
The text was updated successfully, but these errors were encountered: