SplineAreaSeries padding

I need to build a spline area chart, whose height will be at least 100px, even if y = 0 for all the chart points. I need the SplineAreaSeries gradient always to spread at least 100px in height.

I tried to use the margin (margin: const EdgeInsets.only(bottom: 100)) property of the SfCartesianChart, but it just brings the lineup without impacting SfCartesianChart size, and if all the points y coordinate = 0, the gradient is not visible.

Could you clarify, please, how can I achieve the expected behavior? If that's not possible currently, could you add the padding property to the SplineAreaSeries or SfCartesianChart?


Attachment: results_8d9ac74e.zip

3 Replies

YG Yuvaraj Gajaraj Syncfusion Team September 2, 2022 03:38 PM UTC

Hi Yaroslav,


Greetings from Syncfusion.

We have achieved this requirement with the help of crossesAt and visibleMinimum properties in the chart axis. By default, the crossesAt value is 0 and we have set visibleMinimum values as -10, now the series gets rendered from -10 and have a gradient for 100 pixels. We have shared the sample below for your reference, you can modify the sample as per your requirement.


Screenshot:


Regards,

Yuvaraj.


Attachment: f177220_baf1fe66.zip


YA Yaroslav September 7, 2022 11:33 AM UTC

Thank you,

This was helpful. Have a nice day!



SK Sriram Kiran Senthilkumar Syncfusion Team September 8, 2022 06:35 AM UTC

Hi Yaroslav,


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

Note: If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.

Regards,

Sriram Kiran


Loader.
Up arrow icon