LineChart constructor

LineChart({
  1. required List<double> values,
  2. int? width,
  3. int? height,
  4. UvStyle? lineStyle,
  5. UvStyle? gridStyle,
  6. UvStyle? labelStyle,
  7. bool showGrid = false,
  8. int gridRows = 3,
  9. int gridCols = 3,
  10. bool showMarkers = true,
  11. String markerChar = '●',
  12. String lineChar = '•',
  13. List<String>? xLabels,
  14. List<String>? yLabels,
  15. List<ChartLegendEntry>? legendEntries,
  16. int legendColumns = 1,
  17. int legendRowGap = 0,
  18. ChartLegendPosition legendPosition = ChartLegendPosition.topRight,
  19. int legendPadding = 1,
  20. int? crosshairX,
  21. int? crosshairY,
  22. UvStyle? crosshairStyle,
  23. Key? key,
})

Creates a LineChart with the given data and display options.

When width or height is null the chart fills the available constraint space (responsive mode).

Set crosshairX and crosshairY to draw a crosshair overlay at that position (e.g. from mouse hover).

Implementation

LineChart({
  required this.values,
  this.width,
  this.height,
  this.lineStyle,
  this.gridStyle,
  this.labelStyle,
  this.showGrid = false,
  this.gridRows = 3,
  this.gridCols = 3,
  this.showMarkers = true,
  this.markerChar = '●',
  this.lineChar = '•',
  this.xLabels,
  this.yLabels,
  this.legendEntries,
  this.legendColumns = 1,
  this.legendRowGap = 0,
  this.legendPosition = ChartLegendPosition.topRight,
  this.legendPadding = 1,
  this.crosshairX,
  this.crosshairY,
  this.crosshairStyle,
  super.key,
});