Time series and trend analysis with multi-series support
data = [ {'month': 'Jan', 'value': 30}, {'month': 'Feb', 'value': 45}, {'month': 'Mar', 'value': 60}, ]; CristalyseChart() .data(data) .mapping(x: 'month', y: 'value') .geomLine(strokeWidth: 2.0, color: Colors.blue) .scaleXOrdinal() .scaleYContinuous() .build();
data = [ {'month': 'Jan', 'platform': 'iOS', 'users': 1200}, {'month': 'Jan', 'platform': 'Android', 'users': 800}, {'month': 'Feb', 'platform': 'iOS', 'users': 1350}, {'month': 'Feb', 'platform': 'Android', 'users': 950}, ]; CristalyseChart() .data(data) .mapping(x: 'month', y: 'users', color: 'platform') .geomLine(strokeWidth: 3.0) .geomPoint(size: 4.0) .scaleXOrdinal() .scaleYContinuous(min: 0) .theme(ChartTheme.defaultTheme()) .build();
CristalyseChart() .data(data) .mapping(x: 'month', y: 'value') .geomLine(strokeWidth: 2.0) .animate(duration: Duration(milliseconds: 1500)) .build();
CristalyseChart() .data(data) .mapping(x: 'month', y: 'value') .geomLine( strokeWidth: 3.0, style: LineStyle.dashed, ) .build();
CristalyseChart() .data(data) .mapping(x: 'month', y: 'value') .geomLine(strokeWidth: 2.0) .geomPoint(size: 6.0, color: Colors.red) .build();
CristalyseChart() .data(data) .mapping(x: 'month', y: 'value') .geomLine() .interaction( tooltip: TooltipConfig( builder: (point) { return Text( 'Value: ${point.getDisplayValue('value')}', style: TextStyle(color: Colors.white), ); }, ), ) .build();