r/FlutterDev • • Dec 09 '21

Plugin Introducing a Flutter Charting Library: Graphic

About a year ago, we published a Flutter charting library: Graphic, aiming to help Flutter app developers in data visualization. It evolves a lot in the past year and has these features now:

  • A Grammar of Graphics: Graphic derives from Leland Wilkinson's book The Grammar of Graphics, and tries to balance between theoretical beauty and practicability. It inherits most concepts, like the graphic algebra.

  • Declarative and Reactive: As is encouraged in Flutter, the chart widget of Graphic is declarative and reactive. The grammar of data visualization is implemented by a declarative specification and the chart will reevaluate automatically on widget update.

  • Interactive: With the signal and selection mechanism, the chart is highly interactive. It is easy to pop a tooltip or scale the coordinate.

  • Customizable: With the shape and figure classes, it's easy to custom your own element, tooltip, annotation, etc.

  • Dataflow Graph and Operators: Graphic has a internal structure of a dataflow graph and operators. That is how the reactive reevaluation and interaction is implemented.

Here is the documentation and Example App, and a introducing artical.

If you need charts in your Flutter app, welcome to have a look and try!

118 Upvotes

19 comments sorted by

4

u/ashish_feels Dec 09 '21

this looks really promising. Just keep it updated regularly

2

u/entronad Dec 09 '21

Yes, there will be continuous updating.

2

u/Flutter24-7-365 Dec 09 '21

I've used a couple of other Flutter charting libraries: namely fl_charts and syncfusion charts. They are both pretty good for standard charts. Syncfusion is a paid library with a generous free tier.

I'll check this module out too.

1

u/entronad Dec 10 '21

Yes, they are both great work!

Graphic provides some more chart types by a graphic based specification grammar, hoping to help in some special circumstances.

9

u/ac130kz Dec 09 '21

That's great, there are not many plotting libraries, not just in Flutter, but any kind of language/framework

1

u/HerryKun Dec 09 '21

Does it support Network Graphs as well? Miss that functionality badly in Flutter

2

u/entronad Dec 09 '21

Sorry that we are focusing on charts now, graph network is not supported yet.

1

u/HerryKun Dec 09 '21

Is it planned for the future?

1

u/entronad Dec 09 '21

I have to say it's not on the schedule for now. Relation graph plotting and grammar is quite different from value charting. Maybe it need a specifical library.

1

u/king-louis-rds Dec 09 '21

Does it support scrolling and pinch-zooming on line charts?

2

u/entronad Dec 10 '21

Yes, see this example in the example app:

https://github.com/entronad/graphic/blob/cc0692ab69bbb8dbab47408b52f240cfc902dd69/example/lib/pages/point.dart#L94

Zooming and scrolling interactions are defined by the coordinate range signals, no matter in a line chart or point chart.

2

u/ankmahato Dec 09 '21

Wow! It will be a nice addition to the Plots & Visualization Flutter Package ecosystem (https://fluttergems.dev/plots-visualization/)

1

u/HireBDev Dec 09 '21

Thanks for sharing a great library with the community. Looking forward to using it in a project.

1

u/Hsinats Dec 09 '21

This looks really good.

1

u/[deleted] Dec 09 '21

Nice!

1

u/KaiN_SC Dec 09 '21

You chart lib looks great!

0

u/[deleted] Dec 09 '21

[deleted]

3

u/entronad Dec 09 '21

The links are fixed now.

2

u/entronad Dec 09 '21

Sorry haven't noticed that. I shall fix that.

These links in that markdown are just links to widget pages in that example app. You can just find them in above lib/pages dir.

0

u/[deleted] Dec 09 '21

[deleted]

0

u/[deleted] Dec 09 '21

[deleted]

3

u/CrisalDroid Dec 09 '21

Use fl_chart instead, I made the switch 1 year ago because charts_flutter development seemed stall and I really don't regret it, it just provide so much more features and customization.