LineChart constructor

LineChart({
  1. required List<double> data,
  2. required List<String> labels,
  3. double height = 200.0,
  4. String strokeColor = '#6366f1',
  5. String fillColor = 'rgba(99, 102, 241, 0.08)',
  6. double strokeWidth = 2.5,
  7. String? className,
  8. Map<String, Object?> props = const {},
  9. Map<String, Object?> style = const {},
  10. DartStyle? dartStyle,
})

Implementation

LineChart({
  required List<double> data,
  required List<String> labels,
  double height = 200.0,
  String strokeColor = '#6366f1',
  String fillColor = 'rgba(99, 102, 241, 0.08)',
  double strokeWidth = 2.5,
  String? className,
  Map<String, Object?> props = const {},
  Map<String, Object?> style = const {},
  DartStyle? dartStyle,
}) : super(
       'div',
       props: mergeComponentProps(
         props,
         className: className,
         defaultStyle: const {'width': '100%'},
         dartStyle: dartStyle,
         style: style,
       ),
       children: [
         _buildSvg(data, labels, height, strokeColor, fillColor, strokeWidth),
       ],
     );