HiloOpenCloseSeries<T, D> constructor

HiloOpenCloseSeries<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> lowValueMapper,
  6. required ChartValueMapper<T, num> highValueMapper,
  7. required ChartValueMapper<T, num> openValueMapper,
  8. required ChartValueMapper<T, num> closeValueMapper,
  9. ChartValueMapper<T, num>? volumeValueMapper,
  10. ChartValueMapper<T, dynamic>? sortFieldValueMapper,
  11. ChartValueMapper<T, Color>? pointColorMapper,
  12. ChartValueMapper<T, String>? dataLabelMapper,
  13. SortingOrder? sortingOrder,
  14. String? xAxisName,
  15. String? yAxisName,
  16. String? name,
  17. Color? bearColor,
  18. Color? bullColor,
  19. EmptyPointSettings? emptyPointSettings,
  20. DataLabelSettings? dataLabelSettings,
  21. bool? isVisible,
  22. bool? enableTooltip,
  23. double? animationDuration,
  24. double? borderWidth,
  25. SelectionSettings? selectionSettings,
  26. SelectionBehavior? selectionBehavior,
  27. bool? isVisibleInLegend,
  28. LegendIconType? legendIconType,
  29. String? legendItemText,
  30. List<double>? dashArray,
  31. double? opacity,
  32. double? spacing,
  33. List<int>? initialSelectedDataIndexes,
  34. bool? showIndicationForSameValues,
  35. List<Trendline>? trendlines,
  36. SeriesRendererCreatedCallback? onRendererCreated,
})

Creating an argument constructor of HiloOpenCloseSeries class.

Implementation

HiloOpenCloseSeries(
    {ValueKey<String>? key,
    ChartSeriesRendererFactory<T, D>? onCreateRenderer,
    required List<T> dataSource,
    required ChartValueMapper<T, D> xValueMapper,
    required ChartValueMapper<T, num> lowValueMapper,
    required ChartValueMapper<T, num> highValueMapper,
    required ChartValueMapper<T, num> openValueMapper,
    required ChartValueMapper<T, num> closeValueMapper,
    ChartValueMapper<T, num>? volumeValueMapper,
    ChartValueMapper<T, dynamic>? sortFieldValueMapper,
    ChartValueMapper<T, Color>? pointColorMapper,
    ChartValueMapper<T, String>? dataLabelMapper,
    SortingOrder? sortingOrder,
    String? xAxisName,
    String? yAxisName,
    String? name,
    Color? bearColor,
    Color? bullColor,
    EmptyPointSettings? emptyPointSettings,
    DataLabelSettings? dataLabelSettings,
    bool? isVisible,
    bool? enableTooltip,
    double? animationDuration,
    double? borderWidth,
    // ignore: deprecated_member_use_from_same_package
    SelectionSettings? selectionSettings,
    SelectionBehavior? selectionBehavior,
    bool? isVisibleInLegend,
    LegendIconType? legendIconType,
    String? legendItemText,
    List<double>? dashArray,
    double? opacity,
    double? spacing,
    List<int>? initialSelectedDataIndexes,
    bool? showIndicationForSameValues,
    List<Trendline>? trendlines,
    SeriesRendererCreatedCallback? onRendererCreated})
    : super(
          key: key,
          onCreateRenderer: onCreateRenderer,
          name: name,
          dashArray: dashArray,
          spacing: spacing,
          xValueMapper: xValueMapper,
          lowValueMapper: lowValueMapper,
          highValueMapper: highValueMapper,
          // ignore: unnecessary_null_comparison
          openValueMapper: openValueMapper != null
              ? (int index) => openValueMapper(dataSource[index], index)
              : null,
          // ignore: unnecessary_null_comparison
          closeValueMapper: closeValueMapper != null
              ? (int index) => closeValueMapper(dataSource[index], index)
              : null,
          // ignore: unnecessary_null_comparison
          volumeValueMapper: volumeValueMapper != null
              ? (int index) => volumeValueMapper(dataSource[index], index)
              : null,
          sortFieldValueMapper: sortFieldValueMapper,
          pointColorMapper: pointColorMapper,
          dataLabelMapper: dataLabelMapper,
          dataSource: dataSource,
          xAxisName: xAxisName,
          yAxisName: yAxisName,
          dataLabelSettings: dataLabelSettings,
          isVisible: isVisible,
          emptyPointSettings: emptyPointSettings,
          enableTooltip: enableTooltip,
          animationDuration: animationDuration,
          borderWidth: borderWidth ?? 2,
          selectionSettings: selectionSettings,
          selectionBehavior: selectionBehavior,
          legendItemText: legendItemText,
          isVisibleInLegend: isVisibleInLegend,
          legendIconType: legendIconType,
          sortingOrder: sortingOrder,
          opacity: opacity,
          bearColor: bearColor ?? Colors.red,
          bullColor: bullColor ?? Colors.green,
          initialSelectedDataIndexes: initialSelectedDataIndexes,
          onRendererCreated: onRendererCreated,
          showIndicationForSameValues: showIndicationForSameValues ?? false,
          trendlines: trendlines);