SparklineChart constructor

SparklineChart({
  1. required List<double> values,
  2. int? width,
  3. int? height,
  4. UvStyle? style,
  5. bool showGrid = false,
  6. UvStyle? gridStyle,
  7. List<ChartLegendEntry>? legendEntries,
  8. int legendColumns = 1,
  9. int legendRowGap = 0,
  10. ChartLegendPosition legendPosition = ChartLegendPosition.topRight,
  11. int legendPadding = 1,
  12. int? crosshairX,
  13. int? crosshairY,
  14. UvStyle? crosshairStyle,
  15. Key? key,
})

Creates a SparklineChart with the given data and dimensions.

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

SparklineChart({
  required this.values,
  this.width,
  this.height,
  this.style,
  this.showGrid = false,
  this.gridStyle,
  this.legendEntries,
  this.legendColumns = 1,
  this.legendRowGap = 0,
  this.legendPosition = ChartLegendPosition.topRight,
  this.legendPadding = 1,
  this.crosshairX,
  this.crosshairY,
  this.crosshairStyle,
  super.key,
});