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

Scrooling don't work on DateTimeAxis when there's broken time?

Hi,

The incoming data may be broken for some reasons, is it possible to show that as a broken area and continue the scrolling?


7 Replies 1 reply marked as answer

YG Yuvaraj Gajaraj Syncfusion Team March 28, 2023 04:09 PM UTC

Hi Zhu,


We have checked your query, and we are not aware of the exact scenario of your application, we request you to update the following details.


  • What type of series have you used?
  • Did you have null or empty data points in data source.
  • Please share a screenshot or screenrecordings or chart code snippet.

This will be more helpful to us to assist you in a better way.


Regards,

Yuvaraj.



ZH Zhu March 29, 2023 01:57 AM UTC

Hi, Yuvaraj,


About your questions:

I'm using DateTimeAxis as the x axis.

It's possible that there are no data for a period of time because power lose or other system errors, in that case, lazy load would load the data after the broken period.

I scroll the chart to the right until the progress bar appear at the start of x axis, that means lazy loading had retrieved some old data, and I can see the data time printed on my computer screen so I know there's a time broken, after that, when I acroll the chart to the right again, I can't see the retrieved data appear, I think it's because SfCartesianChart don't support showing time broken data yet.

Can't do screenrecording by now,need someone being here to help..


Regards,

Zhu.



YG Yuvaraj Gajaraj Syncfusion Team March 29, 2023 05:12 PM UTC

Hi Zhu,


We have checked your query and we suspect that you have gotten a null value when trying to load old data. Having an x null value in the data source is not a proper behavior, in the chart, you must have a non-null value in the x field, it only allows the null value in the y field this is a default behavior. So, please avoid the data point with a null value in the x field.


If this is not your case then please provide more information about your data source and complete chart code snippet, it will be more helpful to us assist you in a better way.


Regards,

Yuvaraj.



ZH Zhu March 30, 2023 02:12 AM UTC

Hi, Yuvaraj,


Yes, there are null values on x axis, not one, but a lot of. because power lose time can be hours.

I agree that for few points of bad data, should mark values in y field as null instead in x field.

But for hours, in user's perspective, so long a blank area would be time wasting and meaningless.

So I hope SfCartesianChart can support broken time marking, a shadowed area with the during time marked should be fine.


Regards,

Zhu.



YG Yuvaraj Gajaraj Syncfusion Team March 30, 2023 11:39 AM UTC

Hi Zhu,


We suggest you ignore adding data points in a data source collection which is having null value if you don't want a long gap in the series and use DateTimeCategoryAxis instead of DateTimeAxis. This will help you to avoid the long gap when having null values.


Or else if you are okay with a gap, we suggest you have a null value in the y field alone and use the emptyPointSettings in SfCartesianChart and set its mode to EmptyPointMode.average it will generate the points with average y value based on start and end of the gap and render a series between that. We have shared the related UG documentation below for your reference.


UG, https://help.syncfusion.com/flutter/cartesian-charts/series-customization#empty-points


Regards,

Yuvaraj.


Marked as answer

ZH Zhu March 31, 2023 03:36 AM UTC

Hi, Yuvaraj,


In my case, I think user would like to see a short gap with during time marking instead of a long gap in real time length, The emptyPointSettings in SfCartesianChart way is most close to it.

Thanks for the recommendations.


Best Regards,

Zhu.



YG Yuvaraj Gajaraj Syncfusion Team March 31, 2023 05:36 AM UTC

Most Welcome. Kindly get back to us if you have further queries. We are always happy to assist you.


Loader.
Live Chat Icon For mobile
Up arrow icon