ChartState<T>.line constructor
- @Deprecated('Use ChartState(foregroundDecorations: [SparkLineDecoration()])')
- ChartData<
T> data, { - required BubbleItemOptions itemOptions,
- ChartBehaviour behaviour = const ChartBehaviour(),
- List<
DecorationPainter> backgroundDecorations = const <DecorationPainter>[], - List<
DecorationPainter> foregroundDecorations = const <DecorationPainter>[],
Create line chart with foreground sparkline decoration and background grid decoration
Implementation
@Deprecated('Use ChartState(foregroundDecorations: [SparkLineDecoration()])')
factory ChartState.line(
ChartData<T> data, {
required BubbleItemOptions itemOptions,
ChartBehaviour behaviour = const ChartBehaviour(),
List<DecorationPainter> backgroundDecorations = const <DecorationPainter>[],
List<DecorationPainter> foregroundDecorations = const <DecorationPainter>[],
}) {
return ChartState(
data: data,
itemOptions: itemOptions,
behaviour: behaviour,
backgroundDecorations: backgroundDecorations.isEmpty
? [GridDecoration()]
: backgroundDecorations,
foregroundDecorations: foregroundDecorations.isEmpty
? [SparkLineDecoration()]
: foregroundDecorations,
);
}