CandleSeries<T, D> constructor
CandleSeries<T, D> ({
- 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, dynamic> ? sortFieldValueMapper, - ChartValueMapper<
T, Color> ? pointColorMapper, - ChartValueMapper<
T, String> ? dataLabelMapper, - SortingOrder? sortingOrder,
- String? xAxisName,
- String? yAxisName,
- String? name,
- Color? bearColor,
- Color? bullColor,
- bool? enableSolidCandles,
- EmptyPointSettings? emptyPointSettings,
- DataLabelSettings? dataLabelSettings,
- bool? isVisible,
- bool? enableTooltip,
- double? animationDuration,
- double? borderWidth,
- SelectionSettings? selectionSettings,
- SelectionBehavior? selectionBehavior,
- bool? isVisibleInLegend,
- LegendIconType? legendIconType,
- String? legendItemText,
- List<
double> ? dashArray, - double? opacity,
- SeriesRendererCreatedCallback? onRendererCreated,
- List<
int> ? initialSelectedDataIndexes, - bool? showIndicationForSameValues,
- List<
Trendline> ? trendlines,
Creating an argument constructor of CandleSeries class.
Implementation
CandleSeries({
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, dynamic>? sortFieldValueMapper,
ChartValueMapper<T, Color>? pointColorMapper,
ChartValueMapper<T, String>? dataLabelMapper,
SortingOrder? sortingOrder,
String? xAxisName,
String? yAxisName,
String? name,
Color? bearColor,
Color? bullColor,
bool? enableSolidCandles,
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,
SeriesRendererCreatedCallback? onRendererCreated,
List<int>? initialSelectedDataIndexes,
bool? showIndicationForSameValues,
List<Trendline>? trendlines,
}) : super(
key: key,
onCreateRenderer: onCreateRenderer,
name: name,
onRendererCreated: onRendererCreated,
dashArray: dashArray,
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,
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,
enableSolidCandles: enableSolidCandles ?? false,
initialSelectedDataIndexes: initialSelectedDataIndexes,
showIndicationForSameValues: showIndicationForSameValues ?? false,
trendlines: trendlines);