BarSeries<T, D> constructor

BarSeries<T, D>({
  1. ValueKey<String>? key,
  2. ChartSeriesRendererFactory<T, D>? onCreateRenderer,
  3. required List<T> dataSource,
  4. required ChartValueMapper<T, D> xValueMapper,
  5. required ChartValueMapper<T, num> yValueMapper,
  6. ChartValueMapper<T, dynamic>? sortFieldValueMapper,
  7. ChartValueMapper<T, Color>? pointColorMapper,
  8. ChartValueMapper<T, String>? dataLabelMapper,
  9. SortingOrder? sortingOrder,
  10. bool isTrackVisible = false,
  11. String? xAxisName,
  12. String? yAxisName,
  13. String? name,
  14. Color? color,
  15. double? width,
  16. double spacing = 0,
  17. MarkerSettings? markerSettings,
  18. EmptyPointSettings? emptyPointSettings,
  19. DataLabelSettings? dataLabelSettings,
  20. bool? isVisible,
  21. LinearGradient? gradient,
  22. LinearGradient? borderGradient,
  23. BorderRadius borderRadius = BorderRadius.zero,
  24. bool? enableTooltip,
  25. double? animationDuration,
  26. Color trackColor = Colors.grey,
  27. Color trackBorderColor = Colors.transparent,
  28. double trackBorderWidth = 1,
  29. double trackPadding = 0,
  30. List<Trendline>? trendlines,
  31. Color? borderColor,
  32. double? borderWidth,
  33. SelectionBehavior? selectionBehavior,
  34. bool? isVisibleInLegend,
  35. LegendIconType? legendIconType,
  36. String? legendItemText,
  37. double? opacity,
  38. double? animationDelay,
  39. List<double>? dashArray,
  40. SeriesRendererCreatedCallback? onRendererCreated,
  41. ChartPointInteractionCallback? onPointTap,
  42. ChartPointInteractionCallback? onPointDoubleTap,
  43. ChartPointInteractionCallback? onPointLongPress,
  44. CartesianShaderCallback? onCreateShader,
  45. List<int>? initialSelectedDataIndexes,
})

Creating an argument constructor of BarSeries class.

Implementation

BarSeries(
    {ValueKey<String>? key,
    ChartSeriesRendererFactory<T, D>? onCreateRenderer,
    required List<T> dataSource,
    required ChartValueMapper<T, D> xValueMapper,
    required ChartValueMapper<T, num> yValueMapper,
    ChartValueMapper<T, dynamic>? sortFieldValueMapper,
    ChartValueMapper<T, Color>? pointColorMapper,
    ChartValueMapper<T, String>? dataLabelMapper,
    SortingOrder? sortingOrder,
    this.isTrackVisible = false,
    String? xAxisName,
    String? yAxisName,
    String? name,
    Color? color,
    double? width,
    this.spacing = 0,
    MarkerSettings? markerSettings,
    EmptyPointSettings? emptyPointSettings,
    DataLabelSettings? dataLabelSettings,
    bool? isVisible,
    LinearGradient? gradient,
    LinearGradient? borderGradient,
    this.borderRadius = BorderRadius.zero,
    bool? enableTooltip,
    double? animationDuration,
    this.trackColor = Colors.grey,
    this.trackBorderColor = Colors.transparent,
    this.trackBorderWidth = 1,
    this.trackPadding = 0,
    List<Trendline>? trendlines,
    Color? borderColor,
    double? borderWidth,
    SelectionBehavior? selectionBehavior,
    bool? isVisibleInLegend,
    LegendIconType? legendIconType,
    String? legendItemText,
    double? opacity,
    double? animationDelay,
    List<double>? dashArray,
    SeriesRendererCreatedCallback? onRendererCreated,
    ChartPointInteractionCallback? onPointTap,
    ChartPointInteractionCallback? onPointDoubleTap,
    ChartPointInteractionCallback? onPointLongPress,
    CartesianShaderCallback? onCreateShader,
    List<int>? initialSelectedDataIndexes})
    : super(
          key: key,
          onCreateRenderer: onCreateRenderer,
          name: name,
          onRendererCreated: onRendererCreated,
          onPointTap: onPointTap,
          onPointDoubleTap: onPointDoubleTap,
          onPointLongPress: onPointLongPress,
          xValueMapper: xValueMapper,
          yValueMapper: yValueMapper,
          sortFieldValueMapper: sortFieldValueMapper,
          pointColorMapper: pointColorMapper,
          dataLabelMapper: dataLabelMapper,
          dataSource: dataSource,
          xAxisName: xAxisName,
          yAxisName: yAxisName,
          color: color,
          trendlines: trendlines,
          width: width ?? 0.7,
          markerSettings: markerSettings,
          dataLabelSettings: dataLabelSettings,
          emptyPointSettings: emptyPointSettings,
          isVisible: isVisible,
          gradient: gradient,
          borderGradient: borderGradient,
          enableTooltip: enableTooltip,
          animationDuration: animationDuration,
          borderColor: borderColor,
          borderWidth: borderWidth,
          selectionBehavior: selectionBehavior,
          legendItemText: legendItemText,
          isVisibleInLegend: isVisibleInLegend,
          legendIconType: legendIconType,
          sortingOrder: sortingOrder,
          opacity: opacity,
          animationDelay: animationDelay,
          onCreateShader: onCreateShader,
          initialSelectedDataIndexes: initialSelectedDataIndexes,
          dashArray: dashArray);