openValueMapper property

ChartIndexedValueMapper<num>? openValueMapper
final

Value mapper to map the open values with technical indicators.

Defaults to 'null'.

Widget build(BuildContext context) {
 return SfCartesianChart(
   indicators: <TechnicalIndicators<ChartData, num>>[
     StochasticIndicator<ChartData, num>(
       dataSource: chartData,
       xValueMapper: (chartData data, _) => data.x,
       lowValueMapper: (chartData data, _) => data.low,
       highValueMapper: (chartData data, _) => data.high,
       openValueMapper: (chartData data, _) => data.open,
       closeValueMapper: (chartData data, _) => data.close,
     ),
   ],
 );
}
final List<ChartData> chartData = <ChartData>[
  ChartData(1, 23, 50, 28, 38),
  ChartData(2, 35, 80, 58, 78),
  ChartData(3, 19, 90, 38, 58)
];

class ChartData {
  ChartData(this.x, this.low, this.high, this.open, this.close);
    final double x;
    final double low;
    final double high;
    final double open;
    final double close;
}

Implementation

final ChartIndexedValueMapper<num>? openValueMapper;