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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set maximum data displayed chart.

Thread ID:





150350 Jan 3,2020 12:56 AM UTC Feb 3,2020 10:14 AM UTC Flutter 2
Tags: SfCartesianChart
Arturo Rechy
Asked On January 3, 2020 12:56 AM UTC

Hi, I'm working with SplineAreaSeries, my primary XAxis is a DateTimeAxis type, I'm working with the format of hours and minutes. Exists a property for setting the maximum number of data displayed in X axis? But with the possibility of seeing the rest of the data using panning in the chart.

For example, If I have values between 7:00 - 9:00, And I want to set just for display the information between 7:00 - 8:00, but with the possibility of access the rest data (8:00 - 9:00) with panning.

I explored the properties of primaryXAxis, but the property 'maximum' doesn't make this feature that I want. 


Dharanidharan Dharmasivam [Syncfusion]
Replied On January 5, 2020 02:45 PM UTC

Hi Arturo, 
Thanks for using the Syncfusion Flutter chart widget. Your requirement can be achieved using the visibleMinimum and visibleMaximum properties of axis. As of now, we are having an issue with panning while using these properties of datetime axis. So, we have logged defect report in our feedback portal. The fix for the issue will be available for volume 4 sp1 release which is expected to be out at the end January 2020. You can track the status of the bug from feedback portal. 

We will update you once the issue fix got published. We appreciate your patience until then. 


Dharanidharan Dharmasivam [Syncfusion]
Replied On February 3, 2020 10:14 AM UTC

Hi Arturo, 
Thanks for being patience. The issue related to the visibleMinimum and visibleMaximum properties have been fixed. Kindly use the below package to fix the issue. 
Now your requirement can be achieved using the visibleMinimum and visibleMaximum properties of the axis. Here you need to specify the range which needs to be visible in the view and enable the panning to pan the data which are not in the view.   
We have prepared a sample in which we have 50 days, out of that we have shown the last 30 days in the viewport. To see the remaining days, you can pan the chart to view others.You can change this based on your scenario. Find the code snippet below.   
      primaryXAxis: DateTimeAxis(   
        visibleMinimum: chartData[chartData.length-29].x,   
        visibleMaximum: chartData[chartData.length-1].x   
      zoomPanBehavior: ZoomPanBehavior(   
        enablePanning: true,    
      //Other configurations   
Sample for reference can be found from below link. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon