Last updated:
0 purchases
graph ai
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';
copied to clipboard
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()
)
)
);
}
copied to clipboard
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;
}
copied to clipboard
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.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.