Can trackbar data being updated by the realtime data that passing by?

Hi,

TrackBar is a good way to show multiple data, I like it.

Though, in a realtime chart, it only show the data at the time you touch the screen, and don't change until next touch, it would be  better if it can be updated by the data passing by.

Is this possible?


9 Replies

LP Lokesh Palani Syncfusion Team June 7, 2023 01:31 PM UTC

Hi Zhu,


We have analyzed your requirement and suspect that you meant to display the Trackball in a fixed position by continuously updating the values in the tooltip label, while updating new data or deleting existing data. If this is your requirement, we can provide a viable solution. Please let us know if you require any further assistance.


Regards,

Lokesh.



ZH Zhu June 8, 2023 09:01 AM UTC

Hi, Lokesh,


What I mean is:

The position of the trackbar is decided by where user touch, set shouldAlwaysShow: true to keep it showing, then, when data stream passing by it, it shows the updated data.

People can touch somewhere else to change it's position, no matter where it is, the time at this position are keep changing( the x axis is supposed to be a DateTimeAxis), the data it shows is the data of the time at this position.


Regards,

Zhu



LP Lokesh Palani Syncfusion Team June 11, 2023 01:45 AM UTC

Hi Zhu,


You can achieve your requirement by using show method and showByIndex method in the TrackballBehavior. By using this, you can display the trackball at the specified location. We have shared a user guide documentation for your reference. Please let us know if you need any further assistance.


UG,

https://help.syncfusion.com/flutter/cartesian-charts/methods#show-method-in-trackballbehavior

https://help.syncfusion.com/flutter/cartesian-charts/methods#showbyindex--method-in-trackballbehavior


Regards,

Lokesh.



ZH Zhu June 14, 2023 02:51 AM UTC

Hi, Lokesh,


I tried to add this line:

_trackballBehavior.showByIndex(pmData.length - 1);

in _updateDataSource, nothing happens, seems it don't work?


Regards,

Zhu



LP Lokesh Palani Syncfusion Team June 16, 2023 06:57 PM UTC

Hi Zhu,


You can achieve your requirement by using the show method in the TrackballBehavior. We called the trackball after the updateDataSource method and passed the pixel value to show the trackball in a fixed position when the data points are updated dynamically. We have provided a sample for your reference. Please let us know if you require any further assistance.


Regards,

Lokesh.


Attachment: chart_182773_(2)_fa0a2fd7.zip


ZH Zhu June 18, 2023 04:34 AM UTC

Hi, Lokesh,


Yeah, it do work in this example.

But when I try it in streambuilder way, it even can't pass the compile.

Can you provide an example that works in  streambuilder way?

Attached is my test code.


Regards,

Zhu


Attachment: main_ce82b7b2.zip


LP Lokesh Palani Syncfusion Team June 19, 2023 02:09 PM UTC

Hi Zhu,


We have created a ticket for your query. Please check the ticket from the below site for further updates.

https://support.syncfusion.com/support/tickets

Regards,

Lokesh.



ZH Zhu June 20, 2023 03:08 AM UTC

Hi, Lokesh,


Thank you, but there's only one ticket for my another question?


Regards,

Zhu



LP Lokesh Palani Syncfusion Team June 20, 2023 01:54 PM UTC

Hi Zhu,


Most Welcome. The response has been posted for another question also in the same ticket. Please check the below ticket link.


Ticket link - https://support.syncfusion.com/support/tickets


Regards,

Lokesh.


Loader.
Up arrow icon