onMarkerRender property
Occurs when the marker is rendered. Here, you can get the marker pointIndex shape, height and width of data markers.
Widget build(BuildContext context) {
return Container(child: SfCartesianChart(
onMarkerRender: (MarkerRenderArgs args) {
if (args.pointIndex == 2) {
args.markerHeight = 20.0;
args.markerWidth = 20.0;
args.shape = DataMarkerType.triangle;
}
},
));
}
Implementation
final ChartMarkerRenderCallback? onMarkerRender;