NrbLineChart constructor

const NrbLineChart({
  1. Key? key,
  2. required List<double> data,
  3. List<String>? xAxisLabels,
  4. double width = double.infinity,
  5. double height = 200.0,
  6. Color lineColor = const Color(0xFF0B7A3E),
  7. double lineWidth = 2.5,
  8. Duration animationDuration = const Duration(milliseconds: 1500),
  9. bool showGrid = false,
  10. Color gridColor = const Color(0xFFE0E0E0),
  11. Color textColor = const Color(0xFF757575),
})

Constructor for the Line Chart.

Implementation

const NrbLineChart({
  super.key,
  required this.data,
  this.xAxisLabels,
  this.width = double.infinity,
  this.height = 200.0,
  this.lineColor = const Color(0xFF0B7A3E),
  this.lineWidth = 2.5,
  this.animationDuration = const Duration(milliseconds: 1500),
  this.showGrid = false, // Defaulting to false to keep it backwards compatible
  this.gridColor = const Color(0xFFE0E0E0),
  this.textColor = const Color(0xFF757575),
});