LoadMoreIndicatorBuilder with seri type SplineSeries<ChartData, DateTime>

I have tried this example : https://www.syncfusion.com/kb/12535/how-to-lazily-load-more-data-to-the-chart-sfcartesianchart?_gl=1*15b3qv2*_ga*MjA1MzA5OTkyMS4xNjQ4Nzk3OTA2*_ga_WC4JKKPHH0*MTY1MDQyMzEyNi40OC4xLjE2NTA0MjU3MzcuMA..&_ga=2.149062134.1741546187.1650244861-2053099921.1648797906

but when i use function loadMoreIndicatorBuilder with seri type SplineSeries and I got the error like picture below. Does the function seriesController.updateDataSource NOT support Datetime type? Could the Flutter team help me how to solve this problem ?


3 Replies

YG Yuvaraj Gajaraj Syncfusion Team April 21, 2022 06:16 PM UTC

Hi Tuyen,


Greetings from Syncfusion. We suspect that you don’t change the type and casting to double the axis visible minimum and maximum value in the onActualRangeChanged callback. Because for the DateTimeAxis the visible minimum and maximum value are timestamps it didn’t support double so please change the oldAxisVisibleMin and oldAxisVisibleMax variable type to int and remove the typecasting like in the below code snippet. Otherwise, the sample is working fine.


Code snippet:

int? oldAxisVisibleMin, oldAxisVisibleMax;

 

onActualRangeChanged: (ActualRangeChangedArgs args) {

  if (args.orientation == AxisOrientation.horizontal) {

    if (isLoadMoreView) {

      args.visibleMin = oldAxisVisibleMin;

      args.visibleMax = oldAxisVisibleMax;

    }

    oldAxisVisibleMin = args.visibleMin;

    oldAxisVisibleMax = args.visibleMax;

  }

},


Regards,

Yuvaraj.



TV Tuyen Vokhac April 25, 2022 01:48 AM UTC

Hi Yuvaraj,

I checked and it works well.

Man



YG Yuvaraj Gajaraj Syncfusion Team April 25, 2022 04:46 PM UTC

Hi Tuyen,


Most welcome. We are always happy to assist you, if you have any further queries, please get back to us.


Regards,

Yuvaraj.


Loader.
Up arrow icon