Use case: I would like to draw a custom shape at the intersection of the trackball and lines
My chart has two lines and I am trying to get a coordinate for each line where the lines intersect the trackball.
Simply, rather than using the `InteractiveTooltip` I would like to draw a custom Tooltip/shape.
Currently I am utilizing `TrackballArgs` and `chartPointInfo.xPosition` & `chartPointInfo.yPosition`. However, this only gives me the coordinate for one of the line.
It's important I get the coordinates for both lines.
Is this possible? if so, how can I do it?
|
SfCartesianChart(
onTrackballPositionChanging: (TrackballArgs args) {
if (args.chartPointInfo.seriesIndex == 0) { // Printing Coordinate intersect point of first line
print('x:' + args.chartPointInfo.xPosition.toString());
print('y:' + args.chartPointInfo.yPosition.toString());
}
if (args.chartPointInfo.seriesIndex == 1) { // Printing Coordinate intersect point of second line
print('x:' + args.chartPointInfo.xPosition.toString());
print('y:' + args.chartPointInfo.yPosition.toString());
}
},
) |