CartesianCanvas constructor

const CartesianCanvas({
  1. Key? key,
  2. List<CartesianItem> items = const [],
  3. List<WidgetItem> widgetItems = const [],
  4. CartesianCanvasTheme theme = CartesianCanvasTheme.light,
  5. CartesianCanvasController? controller,
  6. bool showControls = true,
  7. bool showLegend = true,
  8. String? title,
  9. double initialScale = 1.0,
  10. bool initialShowGrid = true,
  11. bool enableFreehandDrawing = false,
  12. Color freehandColor = Colors.black,
  13. double freehandWidth = 2.0,
  14. bool isFullScreen = false,
  15. void onFreehandStroke(
    1. List<Offset> worldPoints
    )?,
  16. void onTap(
    1. double x,
    2. double y
    )?,
  17. void onLongPress(
    1. double x,
    2. double y
    )?,
})

Implementation

const CartesianCanvas({
  super.key,
  this.items = const [],
  this.widgetItems = const [],
  this.theme = CartesianCanvasTheme.light,
  this.controller,
  this.showControls = true,
  this.showLegend = true,
  this.title,
  this.initialScale = 1.0,
  this.initialShowGrid = true,
  this.enableFreehandDrawing = false,
  this.freehandColor = Colors.black,
  this.freehandWidth = 2.0,
  this.isFullScreen = false,
  this.onFreehandStroke,
  this.onTap,
  this.onLongPress,
});