Flutter multiline chart from Json Record and json record will increase or decrease on User Selection

Flutter, I have This Type of Json from api i want to show multiline chart of every user. Users can increase or decrease on district basis selection inside application? I searched alot from Syncfusion library or from many others but i did not find any way please help.


NOTE: Number of Users Will Increase or Decrease On User  Selection. There Will Be 40 Lines or 5 or any other value on just user selection. 


7 Replies

YG Yuvaraj Gajaraj Syncfusion Team February 24, 2022 01:43 PM UTC

Hi Fayyaz, 
 
Greetings from Syncfusion. We have created a custom sample for your requirement. In which, we have parsed the data from the given JSON data and rendered the multiple line series. Please find the sample below. 
 
  
If this is not your case, then please provide more details about your requirement along with a screenshot image or video. It will be more helpful to us to provide a solution sooner. 
 
Regards, 
Yuvaraj. 



FA Fayyaz Ahmad replied to Yuvaraj Gajaraj February 28, 2022 01:34 PM UTC

Thank you for your answer.  

I want to Add legend of every line by the name mentioned in sales....



YG Yuvaraj Gajaraj Syncfusion Team March 1, 2022 02:50 PM UTC

Hi Fayyaz, 
 
We have modified the sample, now it will render the legend with the name specified in the JSON data, please find the sample below. We hope it will help you to achieve your requirement. 
 
  
If you have any further query, please get back to us. 
 
Regards, 
Yuvaraj. 



FA Fayyaz March 28, 2022 10:31 AM UTC

  1. Sir i want to show complete date like inserted picture for example with month and year(not only date).
  2. When there is records less than 4 then records are not displaying on map its just bug.
    Kindly respond.
    Thanks Fayyazdate issue.jpeg ayyaz Ahmad


FA Fayyaz Ahmad March 29, 2022 09:18 AM UTC

please solve my problem



FA Fayyaz Ahmad March 30, 2022 04:55 AM UTC

Please Look at dates.date issue 2.jpeg



YG Yuvaraj Gajaraj Syncfusion Team March 30, 2022 06:12 PM UTC

Hi Fayyaz,


Query #1: Sir i want to show complete date like inserted picture for example with month and year(not only date).

We suggest you use the dateFormat property in the axis, using this you can customize the axis label format. We have attached the code snippet below for your reference. 



Code snippet:

primaryXAxis: DateTimeCategoryAxis(

  labelRotation: 90,

  dateFormat: DateFormat('yyyy-MM-dd'),

)


Screenshot:


UG: https://help.syncfusion.com/flutter/cartesian-charts/axis-types#formatting-the-labels-2


KB: https://www.syncfusion.com/kb/13044/how-to-format-the-date-time-axis-labels-in-cartesian-chart-sfcartesianchart


Query #2: When there is records less than 4 then records are not displaying on map its just bug.

We have tested with less than four records but the reported issue is not reproduced at our end, if you’re still facing the issue, please try to reproduce the issue in the below attached sample and get back to us.


Regards,

Yuvaraj.


Attachment: f173137_4924bb09.zip

Loader.
Up arrow icon