The Flutter Column Chart which is also known as the vertical bar chart uses vertical bars to display different values of one or more items. Column chart is the most common chart type. It is like a bar chart except that here the bars are vertical, not horizontal. Points from adjacent series are drawn as bars next to each other. You can create beautiful, animated, real-time and high-performance column chart that also supports the interactive features such as zooming and panning, trackball, crosshair, tooltip and selection.
Compare two different types of relational values using the Flutter column chart that overlap one another.
Applies gradient colors to visualize data in different colors, improving the readability and appearance of the Flutter Column Chart.
Modernize the UI by applying rounded corners to the Flutter vertical bar chart.
Use multiple axes to plot different data sets along two or more axes having different data points and values.
Easily get started with the Flutter Column Chart using a few simple lines of DART code example as demonstrated below,
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_charts/charts.dart';
void main() {
return runApp(_ChartApp());
}
class _ChartApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(primarySwatch: Colors.blue),
home: _MyHomePage(),
);
}
}
class _MyHomePage extends StatefulWidget {
// ignore: prefer_const_constructors_in_immutables
_MyHomePage({Key? key}) : super(key: key);
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<_MyHomePage> {
late List<_ChartData> data;
late TooltipBehavior _tooltip;
@override
void initState() {
data = [
_ChartData('CHN', 12),
_ChartData('GER', 15),
_ChartData('RUS', 30),
_ChartData('BRZ', 6.4),
_ChartData('IND', 14)
];
_tooltip = TooltipBehavior(enable: true);
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Syncfusion Flutter chart'),
),
body: SfCartesianChart(
primaryXAxis: CategoryAxis(),
primaryYAxis: NumericAxis(minimum: 0, maximum: 40, interval: 10),
tooltipBehavior: _tooltip,
series: <CartesianSeries<_ChartData, String>>[
ColumnSeries<_ChartData, String>(
dataSource: data,
xValueMapper: (_ChartData data, _) => data.x,
yValueMapper: (_ChartData data, _) => data.y,
name: 'Gold',
color: Color.fromRGBO(8, 142, 255, 1))
]));
}
}
class _ChartData {
_ChartData(this.x, this.y);
final String x;
final double y;
}
The Flutter Column Chart configuration code is available in GitHub.
Flutter Column Chart User Guide
Learn available options to customize the Flutter Column Chart.
Flutter Column Chart API Reference
Explore the Flutter Column Chart APIs.