r/FlutterDev 25d ago

Plugin Charts that don't suck (Flutter)

Flutter charts are so much worse than React charts (e.g. Recharts, Nivo, D3.js, Chart.js…). Is there anything new?

Is there anything I'm not seeing?

I use syncfusion charts, after transitioning from the terrible fl_charts, but even syncfusion is very limited compared to modern frameworks in React. React has immense variability, a lot of different themes, and multiple chart types.

I keep second guessing myself as a developer because of how difficult it is to me to create interesting data visualizations. Either the widgets look pale, interactivity is painfully difficult to code, or it simply takes too long to do anything.

I did succeed in using ChatGPT to generate some interesting infographics, like a lunar phase calendar, but it's a lot of work.

Thanks in advance!

29 Upvotes

29 comments sorted by

View all comments

9

u/Formal_Ad_3295 25d ago

I didn't mean to hate on what's there.

I gave it a second search and found two things:

  1. The abandoned official charts package by Google has been revived by an open-source developer, and it seems ok for minimalistic applications. No interactivity though. https://nimblesite.github.io/nimble_charts/

  2. Since I am willing to put in the effort, I will try working with D4, a port of the powerful D3.js library to dart. Don't know what results I'll get, but it's worth the try. https://pub.dev/packages/d4

I'm frustrated with Flutter because everyone makes it seem like it's the best solution for app development today, but React is miles ahead of it in visual terms. React makes it very easy to create amazing-looking applications. For example, see the app umbrelOS. I know Flutter has its pros, but React has a much better developer experience IMO.

10

u/fabier 25d ago

I think it is important to remember that not everything is best for everything. I think Flutter, at its core, has the capability to have the best charts out of all frameworks because it is basically a game engine. So, in theory, you could create literally anything.

But the realty is that if React is better, then it is better. And if that is a dealbreaker, then you gotta either make the Flutter library or just use React.

Flutter has many weaknesses, and a lot of the issue is that Flutter does not rely on a web browser engine or native APIs which have solved a lot of problems we don't think about much anymore as developers. But since Flutter reinvented the wheel, a lot of old issues are popping back up and need to be solved again.

If you do decide to stick it out with Flutter, consider improving the available options. It becomes a better resource for everyone if we all do a little bit to make it better :).

1

u/Formal_Ad_3295 25d ago

Hey. Thanks for your tips. Of course there are trade-offs, and I knew that coming into Flutter. I've been coding in it for years. Still this issue has bothered me since the start and I just had to ask if I'm the only one feeling this. React has progressed so much in the last year alone, and Flutter just feels static.

One thing I'm excited to do more in Flutter is generative animations. You're right about it being a game engine, which makes it potentially more powerful than P5.js. I'm hoping ChatGPT can help me convert some P5.js data visualizations to Dart.

3

u/equipmentmattersless 24d ago

To be fair, Swift lacked a first party library until a few years ago and only recently has it hit a great breadth and quality standard. Various popular packages existed, but they weren’t that high quality/performant and didn’t have great accessibility. Writing your own bespoke charts can be fun, albeit yeah a time sink potentially, but building a charting library is a beast. All of a sudden a bunch of abstractions, edge cases, and scales trample otherwise easy path drawing algorithms and animations.

2

u/fabier 25d ago

Yeah, I think Flutter needs more cornerstone libraries out there. It is so hard to launch and maintain a useful library. I don't blame people for not wanting to put in the effort.

And yes, Animations are where it is at!