HistogramSeries<T, D> constructor Null safety

HistogramSeries<T, D>(
  1. {ValueKey<String>? key,
  2. ChartSeriesRendererFactory<T, D>? onCreateRenderer,
  3. required List<T> dataSource,
  4. required ChartValueMapper<T, num> yValueMapper,
  5. ChartValueMapper<T, dynamic>? sortFieldValueMapper,
  6. ChartValueMapper<T, Color>? pointColorMapper,
  7. ChartValueMapper<T, String>? dataLabelMapper,
  8. SortingOrder? sortingOrder,
  9. bool isTrackVisible = false,
  10. String? xAxisName,
  11. String? yAxisName,
  12. String? name,
  13. Color? color,
  14. double? width,
  15. double spacing = 0,
  16. MarkerSettings? markerSettings,
  17. List<Trendline>? trendlines,
  18. EmptyPointSettings? emptyPointSettings,
  19. DataLabelSettings? dataLabelSettings,
  20. bool? isVisible,
  21. LinearGradient? gradient,
  22. LinearGradient? borderGradient,
  23. BorderRadius borderRadius = const BorderRadius.all(Radius.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. Color? borderColor,
  31. double? borderWidth,
  32. SelectionSettings? selectionSettings,
  33. SelectionBehavior? selectionBehavior,
  34. bool? isVisibleInLegend,
  35. LegendIconType? legendIconType,
  36. String? legendItemText,
  37. double? opacity,
  38. List<double>? dashArray,
  39. int? binInterval,
  40. bool showNormalDistributionCurve = false,
  41. Color curveColor = Colors.blue,
  42. double curveWidth = 2,
  43. List<double>? curveDashArray,
  44. SeriesRendererCreatedCallback? onRendererCreated}
)

Creating an argument constructor of HistogramSeries class.

Implementation

HistogramSeries(
    {ValueKey<String>? key,
    ChartSeriesRendererFactory<T, D>? onCreateRenderer,
    required List<T> dataSource,
    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,
    List<Trendline>? trendlines,
    EmptyPointSettings? emptyPointSettings,
    DataLabelSettings? dataLabelSettings,
    bool? isVisible,
    LinearGradient? gradient,
    LinearGradient? borderGradient,
    this.borderRadius = const BorderRadius.all(Radius.zero),
    bool? enableTooltip,
    double? animationDuration,
    this.trackColor = Colors.grey,
    this.trackBorderColor = Colors.transparent,
    this.trackBorderWidth = 1,
    this.trackPadding = 0,
    Color? borderColor,
    double? borderWidth,
    // ignore: deprecated_member_use_from_same_package
    SelectionSettings? selectionSettings,
    SelectionBehavior? selectionBehavior,
    bool? isVisibleInLegend,
    LegendIconType? legendIconType,
    String? legendItemText,
    double? opacity,
    List<double>? dashArray,
    this.binInterval,
    this.showNormalDistributionCurve = false,
    this.curveColor = Colors.blue,
    this.curveWidth = 2,
    this.curveDashArray,
    SeriesRendererCreatedCallback? onRendererCreated})
    : super(
          key: key,
          onCreateRenderer: onCreateRenderer,
          name: name,
          yValueMapper: yValueMapper,
          sortFieldValueMapper: sortFieldValueMapper,
          pointColorMapper: pointColorMapper,
          dataLabelMapper: dataLabelMapper,
          dataSource: dataSource,
          xAxisName: xAxisName,
          yAxisName: yAxisName,
          trendlines: trendlines,
          color: color,
          width: width ?? 0.95,
          markerSettings: markerSettings,
          dataLabelSettings: dataLabelSettings,
          isVisible: isVisible,
          gradient: gradient,
          borderGradient: borderGradient,
          emptyPointSettings: emptyPointSettings,
          enableTooltip: enableTooltip,
          animationDuration: animationDuration,
          borderColor: borderColor,
          borderWidth: borderWidth,
          selectionSettings: selectionSettings,
          selectionBehavior: selectionBehavior,
          legendItemText: legendItemText,
          isVisibleInLegend: isVisibleInLegend,
          legendIconType: legendIconType,
          sortingOrder: sortingOrder,
          onRendererCreated: onRendererCreated,
          opacity: opacity,
          dashArray: dashArray);