xValueMapper property

ChartIndexedValueMapper<D>? xValueMapper
final

Value mapper to map the x values with technical indicators.

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
           indicators: <TechnicalIndicators<dynamic, dynamic>>[
           SmaIndicator<dynamic, dynamic>(
               xValueMapper: (Sample sales, _) => sales.x,
             ),
          ],
       ));
}

Implementation

final ChartIndexedValueMapper<D>? xValueMapper;