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

Access to serierRenderer

Is there a way to gain access to seriesRenderer from callbacks that don't forward serierRenderer like onActualRangeChanged?

My use case is that there's a series in my list of chart series for my SfCartesianChart where I'd like to slowly fade out the color of the series as the user pinches to zoom out. Currently, this is very easy to do with the markers on that series using onMarkerRender, but I'm not sure how to do it for the color of the series itself.

Thanks!


2 Replies

CD Cory Davis March 15, 2023 03:04 AM UTC

As a quick update, I did find another way to do this, which is by using onCreateRenderer for the series, and using an override of customizeSegment.


This method does require importing utilities that aren't currently exposed by the library, in particular, SegmentProperties and SegmentHelper, which makes me think it may not be the best way.



YG Yuvaraj Gajaraj Syncfusion Team March 15, 2023 01:47 PM UTC

Hi Cory,


You can render a custom series with the help of the onCreateRenderer callback by overriding the respective series renderer. We have shared the related UG and KB documentation below for your reference it will explain how to override a series and achieve custom rendering.


UG, https://help.syncfusion.com/flutter/cartesian-charts/callbacks#oncreaterenderer


KB, https://www.syncfusion.com/kb/13095/how-to-apply-the-different-gradients-to-each-column-in-the-flutter-column-chart


Regards,

Yuvaraj.


Loader.
Live Chat Icon For mobile
Up arrow icon