'Marker Mapper for Line chart in flutter

I'm using SFCartesianChart with LineSeries. I want some points to have a marker and others to not have a marker. I can't see documentation nor any property for this purpose. Is it impossible with SFCharts? If so are there any other way?

SfCartesianChart(
  primaryXAxis: CategoryAxis(),
  series: <LineSeries<ProductivityMapData, String>>[
  LineSeries<ProductivityMapData, String>(
    markerSettings: MarkerSettings(isVisible: true, shape: DataMarkerType.invertedTriangle),
    dataSource: productivityData.reversed.toList(),
    xValueMapper: (ProductivityMapData sales, _) => DateFormat('MM-dd').format(dFormat.parse(sales.day)),
    yValueMapper: (ProductivityMapData sales, _) => sales.productivity,
    dataLabelMapper: (ProductivityMapData sales, _) => sales.productivity.toStringAsFixed(1) + "%",
    dataLabelSettings: DataLabelSettings(overflowMode: OverflowMode.hide, showZeroValue: false, isVisible: true),
    onPointTap: (ChartPointDetails point){
      
    },
    pointColorMapper: (ProductivityMapData sales, _)=> (User.journalExists(dFormat.parse(sales.day)) ? Colors.lightGreenAccent : Colors.green)
  )
])

This is my current code. I want to toggle the marker like I change pointColor using pointColorMapper.

Thanks in advance for any help!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source