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

How to add dashed line and don't show a line between marks in syncfusion_flutter_charts in certain conditions

Screenshot 2022-11-05 at 2.31.37 AM.png

As shown in the diagram based on the date if the user didn't perform any action in 3 days there must be no line between 2 points and if the action is after 2 days show a dashed line between points.

1 Reply

SK Sriram Kiran Senthilkumar Syncfusion Team November 7, 2022 10:48 AM

Hi Ahmed,

This requirement "how to add dashed and don’t show a line between marks" can be achieved by using the onCreateRenderer callback that is available in chart series. To render a dashed line for the specific segment using the current segment index value, the existing line series renderer class can be overridden with a custom line series renderer class to get all series segment index value. You can also achieve the space between the points by using empty points.


You can refer the below attached sample along with user guide documentation for more details about onCreateRenderer callback.



Sriram Kiran

Attachment: i418052_78cca894.zip

Live Chat Icon For mobile
Up arrow icon