• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Line chart representation of List containing double values

Resolved: Line chart representation of List containing double values

0
By Isaac Tonny on 18/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I have Lists of values containing double type numbers and each of this lists contains about 5000 values. Each of this lists has been collected from a microcontroller within 60 seconds.
I want to create a line chart to show the variance of this values. I tried to use the Spline Chart in Flutter but I cannot manage to make it read values from a list as its throwing this error:

The return type ‘List?’ isn’t a ‘num?’, as required by the closure’s context.


and here is the code:
I tried to create a list that has few values and called some elements from each list to the chart. It looked like this:
And this worked for me but Can I make it so I can call all the elemnts from the list to the chart. Do you have any suggestion on how to make this thing happens. thank you in advance

Answer:

Your y in ChartData is List. And you try to assign it to num?
If the length of y is not fixed, you can use this function to generate SplineSeries
enter image description here

If you have better answer, please add a comment about this, thank you!

android-studio dart data-visualization flutter linechart
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to efficient create SimpleITK image?

01/04/2023

Resolved: How can I write CSS selector(s) that apply to table rows for all td elements on that row after a td with a certain class?

01/04/2023

Resolved: How do I use SetWindowText with Unicode in Win32 using PowerShell?

01/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.