visiblemaximum does not work when legend click

Hi, 

I'm working with StackedColumnSeries.

I have set visiblemaximum of of chart's x-axis so that if the data's length is more than 8, the chart would be scrollable to see more. 

zoomPanBehavior: ZoomPanBehavior(enablePanning: true,),
plotAreaBorderWidth: 0,
primaryXAxis: CategoryAxis(
axisLine: AxisLine(width: 0),
majorGridLines: MajorGridLines(width: 0),
majorTickLines: MajorTickLines(size: 0),
visibleMaximum: data_first.getData().length > 8 ? 8 : data_first.getData().length.toDouble(),
),

Everything works fine but when the user clicks on one of the legend to filter a series, the visiblemaximum that I have set does not get applied to the label and zooming. (even though correct number of day gets shows correctly)

One thing I noticed was that this only occurs when the user have not scrolled the chart yet - if the user scrolled the chart to see other x-axis value, the legend filtering would correctly show wanted labels and zooming.

Here are screenshots of the chart:

- The chart user sees when none of the legend is filtered

Screen Shot 2021-06-22 at 14.45.32.png

- The label and zooming (also scrolling) is not applied when the user filters 'Generation' legend

Screen Shot 2021-06-22 at 14.46.05.png

- However if the user have scrolled the chart, filtering legend correctly displays the chart

Screen Shot 2021-06-22 at 14.51.42.png


Thank you.


3 Replies 1 reply marked as answer

DP Dharanitharan Palanisamy Syncfusion Team June 23, 2021 11:29 AM UTC

Hi Jaehwi, 
 
Greetings from the team at Syncfusion. We were able to reproduce the reported issue, and this fix will be included in the next weekly patch release, which is scheduled to be released on July 6, 2021, and we appreciate your patience until then. 
 
Thanks,
Dharanitharan. P
 
 



DP Dharanitharan Palanisamy Syncfusion Team June 24, 2021 01:52 PM UTC

Hi Jaehwi, 
 
We will provide the fix on July 6, 2021, as stated in the previous update, and you may track the status of the bug using the feedback link below. We appreciate your patience until then. 
 
 
Thanks, 
Dharanitharan.P 



DP Dharanitharan Palanisamy Syncfusion Team July 7, 2021 04:43 AM UTC

Hi Jaehwi,


Thanks for being patience. We are glad to inform you that the reported issue got fixed in the latest version of the charts. Now, the visible maximum works properly on legend click, and to resolve this kindly upgrade charts to the latest version from the below link.


Latest version: https://pub.dev/packages/syncfusion_flutter_charts/versions/19.2.46


Thanks,

Dharanitharan. P



Marked as answer
Loader.
Up arrow icon