ScatterSpot constructor

ScatterSpot(
  1. double x,
  2. double y, {
  3. bool? show,
  4. FlDotPainter? dotPainter,
})

You can change show value to show or hide the spot, x, and y defines the location of spot in the ScatterChart, radius defines the size of spot, and color defines the color of it.

Implementation

ScatterSpot(
  super.x,
  super.y, {
  bool? show,
  FlDotPainter? dotPainter,
})  : show = show ?? true,
      dotPainter = dotPainter ??
          FlDotCirclePainter(
            radius: 6,
            color:
                Colors.primaries[((x * y) % Colors.primaries.length).toInt()],
          );