Updating data changes size

Greetings,
I am using Flutter chart's CandleSeries, I am using realtime live through which I am updating last candle of the chart for about 30sec - 1 min based on user requirement so I am updating data of last item of the list of candle data and updating chart using Consumer method of provider package of flutter, everything is working fine but i don't why when I am updating last data of the list all other candles are changing its size according to that for reference watch the attached video.
Also while adding new data every sec I am changing max, visibleMin and visibleMax of the chart so i thought this will be causing this issue so then I restricted the update of max, visibleMin and visibleMax only when new item is added but this is not resolving the problem.
Please review the video and provide solution as soon as possible.
Thank You.

Attachment: Updating_data_problem_93c65247.rar

5 Replies

DD Dharanidharan Dharmasivam Syncfusion Team April 8, 2020 10:56 AM UTC

Hi Harsh, 
 
Greetings from Syncfusion. We would like to let you know that, the series (individual points) size will be calculated based on the data source and axis length. And if the axis range is changed, based on that in the live update, the size may change, and animation will be happen for the changes. This is the default behavior.  
 
And the attachment is not proper, so we are not aware of how the size has change. If you face still any concerns, kindly attach the video of your behavior. The sample for reference can be found below. 
 
Thanks, 
Dharani. 



DE devloper April 11, 2020 07:58 AM UTC

Here look at the video, I am updating only close value of last candle for certain amount of time and then adding new candle data next time, I want that candle width don't change at all when updating last candle data, I have also added the sample which is what i want.

Attachment: Candle_Size_Issue_9c3c7b02.rar


DD Dharanidharan Dharmasivam Syncfusion Team April 13, 2020 09:54 AM UTC

Hi Harsh, 

Thanks for the information. As stated earlier the size will vary depends on the data source length, axis size. To overcome the size variation, we can maintain the data source length. We have prepared a sample in which we have removed the first point when a new point got added and when the close value got updated, we haven’t removed the data. Now the size will not vary when new data got added. The sample can be found below. 


Thanks, 
Dharani. 



DE devloper April 13, 2020 06:15 PM UTC

I am only updating data as you showed but while changing data, I have to update timestamp also (x-axis data as I am using DateTimeAxis as x-axis) and due to this the size is changing, if I stop updating timestamp (x-axis data) then size isn't changing but i have to update x-axis.
How can I block size changing while its updating and resume size changing only when adding new data, please help this problem is so annoying.
Thank You.


DD Dharanidharan Dharmasivam Syncfusion Team April 15, 2020 08:16 AM UTC

Hi Harsh, 

We have analyzed further and as stated earlier if the data length in the view is maintained at constant then the size of the candle is not varied. To ensure this, we have attached a video that can be found below. 
In the above video, for the first few seconds, we are updating the close value of the last value and then we are changing the timestamp (x-axis value) also. Here the size is not changing, since we have maintained the data length in the view constantly by removing a data when new data get added(from your expected video also we found that, there is a removal of data when new x-value added). So, we request you to do the same. 

Thanks, 
Dharani. 


Loader.
Up arrow icon