Syncfusion Charts and data binding

Widgets & Design

I want to implement Syncfusion charts as I need the additional chart types they offer. I have followed the following video and a follow up which deal with data from supabase, and found them to be very helpful in getting started - https://www.youtube.com/watch?v=Dr5xHfk1nQY

I started with a simple line chart, and am binding my data (from Firestore) a little differently. It's working, but feels a little sub-optimal. What I have done is as follows -

1) Created a backend query on my custom widget to retrieve a collection of documents.

2) Added additional parameters for the x and y axis values to my custom widget

3) Assigned values to the parameters from my backed query

4) In my custom widget, create a class to hold the x and y parameters

and then loop over my x and y data passed in, to create a list of ChartData values

and then set the chart data source, x and y axis to my ChartData list values

It's working, but creating a new list from two lists passed in, and having to loop over all the entries seems a bit sub-optimal, and could have a performance hit, especially if there are lots of data values.

Is there another, better way that this can be done without having to create a separate list and copy all the data points?

ย 

What have you tried so far?

looked through the community and some YouTube videos.

Did you check FlutterFlow's Documentation for this topic?
No
2