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
close icon

StepLineSeries with rounded off corners

Hello!

I have used the StepLineSeries in my project. Is it possible to make the line itself a bit more rounded?

See the attachment (an illustration) of what i want to achieve (ignore the line color). As you can see the "corners" of the line is rounded off.


Attachment: Simulator_Screen_Shot__iPhone_14__20221005_at_15.40.05.png_c83c82cc.zip

1 Reply

PG Praveen Gopalsamy Syncfusion Team October 7, 2022 09:28 AM

Hi Martin,

Greetings from Syncfusion.

We have validated your query and you can achieve this using the StepLineSeries.onCreateRenderer callback. You will get this callback when creating the state for the StepLineSeries. Override the getStrokePaint() method in the custom StepLineSegment class and set the strokeCap as StrokeCap.round. This makes the line edges rounded.

We have attached the sample for your reference. Please check it and let us know if you need any further assistance with this.

Regards,

Praveen G.


Attachment: flutter_charts_b0be6a25.zip

Loader.
Live Chat Icon For mobile
Up arrow icon