graph_ai 0.0.7
graph_ai: ^0.0.7 copied to clipboard
A Flutter Charts library which includes data visualization widgets such as cartesian and circular charts, to create real-time, interactive, high-performance, animated charts.
This use of explain data by graph platform
Features #
Widget to be integreted with chart.
Getting started #
Installation #
Install the latest version from pub.
Chart getting started #
Import the following package.
import 'package:graph_ai/charts.dart';
Add chart to the widget tree #
Add the chart widget as a child of any widget. Here, the chart widget is added as a child of container widget.
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Container(
child: GraphTool()
)
)
);
}
Note
- Use
GraphTool
widget to render line, spline, area, column, bar, bubble, scatter, step line, and fast line charts.
Bind data source #
Based on data, initialize the appropriate axis type and series type. In the series, map the data source and the fields for x and y data points. To render a line chart with category axis, initialize appropriate properties.
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Container(
child: GraphTool(
// Initialize category axis
primaryXAxis: CategoryAxis(),
series: <LineSeries<SalesData, String>>[
LineSeries<SalesData, String>(
// Bind data source
dataSource: <SalesData>[
SalesData('Jan', 35),
SalesData('Feb', 28),
SalesData('Mar', 34),
SalesData('Apr', 32),
SalesData('May', 40)
],
xValueMapper: (SalesData sales, _) => sales.year,
yValueMapper: (SalesData sales, _) => sales.sales
)
]
)
)
)
);
}
class SalesData {
SalesData(this.year, this.sales);
final String year;
final double sales;
}
About Syncfusion Flutter Widgets #
The Syncfusion's Graph_ai librari contains an ever-growing set of UI widgets for creating cross-platform native mobile apps for Android, iOS, Web, macOS and Linux platforms. In addition to Charts.