We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Option to continue a series till the end using the last value

Hello!

I was wondering if there's any option to have a chart series continue till the end of the X axis using the last point's value.

My use case is that I'm plotting the balance history of a savings account. I set the maximum for the X axis to be DateTime.now(), but the last logged balance might be from days ago, leaving at the moment a gap at the right end of the chart. I would like for the chart to keep going horizontally until the end, representing that the last value of the series is also the current one.

I tried duplicating the last value (and changing it's timestamp to now) but that adds a marker on this last "fake" balance too, which can be misleading.

Is there any way to achieve this? or to hide a specific marker?

I tried to look in the documentation but couldn't find anything.

Thanks in advance!


1 Reply

SK Sriram Kiran Senthilkumar Syncfusion Team October 24, 2022 12:54 AM

Hi Tommaso,


Greetings from Syncfusion.

We have checked your query at our end, and we would like to let you know that you can hide a specific marker in the series using the onMarkerRender call-back event available in our chart widget. We have also created a simple sample in which we have ignored the marker to be rendered for the last data point in the chart using the onMarkerRender event and attached it below for your reference along with user guide documentation of the onMarkerRender event.

Screenshot 2022-10-24 at 10.48.25 AM.png


Please check and get back to us if you require further assistance.

https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/onMarkerRender.html


Regards,

Sriram Kiran


Attachment: f178373_8f1192d9.zip

Loader.
Live Chat Icon For mobile
Up arrow icon