Articles in this section
Category / Section

How to customize series border in Chart

1 min read

You can customize the border color and border width for chart series. The default value of the border color is black and border width is 1. You can also customize the specific series points border based on the point index.

The following code snippet demonstrates how to apply the border style to overall chart series points.

// Set border for to chart series.

series.Style.Border.Width = 3;

series.Style.Border.Color = Color.Red;

 

Chart with border and fill

 

The following code snippet demonstrates how to apply the border style to specific points in chart series.

// Set border style to specific chart series.

series.Styles[1].Border.Width = 3;

series.Styles[1].Border.Color = Color.Red;

 

Chart with fill and without border

 

You can avoid the borders in series cells by setting the border’s color as “transparent” in series’ style as demonstrated in the following code snippet.

// Set the border color to transparent to avoid the borders for series. series.Style.Border.Color = Color.Transparent;

 

Chart without border and Fill

Sample link: https://github.com/SyncfusionExamples/How-to-customize-series-border-in-Chart

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied