Articles in this section

How to customize series borders in Winforms Chart?

The WinForms Chart control allows you to customize the border appearance of chart series to enhance visual clarity and styling. By default, each series has a black border color and a border width of 1 pixel. You can easily modify these properties to apply custom colors, adjust thickness, or even style individual data points within a series.

Additionally, the control provides flexibility to customize borders for specific series points based on their index, enabling fine-grained control over chart aesthetics.

The following code snippet demonstrates how to apply a border style to all points in a chart series:

this.chartControl1 = new ChartControl();
. . .

// Customize the chart series border.
series.Style.Border.Width = 3;
series.Style.Border.Color = Color.Red;
Me.ChartControl1 = New ChartControl()
. . .

' Customize the chart series border.
series.Style.Border.Width = 3
series.Style.Border.Color = Color.Red
Output

Chart with border and fill

 

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

// Set border style to specific chart series.
series.Styles[1].Border.Width = 3;
series.Styles[1].Border.Color = Color.Red;
' Set border style to specific chart series 
series.Styles(1).Border.Width = 3
series.Styles(1).Border.Color = Color.Red
Output

Chart with fill and without border

 

To remove borders from series cells, set the border's color to transparent, 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;
' Set the border color to transparent to avoid the borders for series
series.Style.Border.Color = Color.Transparent

Output

Chart without border and Fill

For a complete example, refer to the sample project.

Conclusion

I hope you enjoyed learning about how to customize series borders in Winforms Chart.

You can refer to our WinForms Chart feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started with configuration specifications. You can also explore our WinForms Chart examples to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

 

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