Skip to content

Commit 52c08b5

Browse files
authored
Update README.md
1 parent 97b474e commit 52c08b5

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
1-
# How to customize series border in Chart
2-
This example demonstrates how to customize series border for chart in Windows Forms.
1+
# How to customize series border in WinForms Chart
2+
3+
This example demonstrates how to customize series border for chart in Windows Forms.
4+
5+
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.
6+
7+
The following code snippet demonstrates how to apply the border style to overall chart series points.
8+
9+
```
10+
// Set border for to chart series.
11+
series.Style.Border.Width = 3;
12+
series.Style.Border.Color = Color.Red;
13+
```
14+
15+
![Winforms Chart with border and fill](https://user-images.githubusercontent.com/53489303/200620164-d93a69b2-2939-4b65-a996-607c668c276a.png)
16+
17+
The following code snippet demonstrates how to apply the border style to specific points in chart series.
18+
19+
```
20+
// Set border style to specific chart series.
21+
series.Styles[1].Border.Width = 3;
22+
series.Styles[1].Border.Color = Color.Red;
23+
```
24+
25+
![Chart with fill and specific border](https://user-images.githubusercontent.com/53489303/200620212-e01ffee9-d70e-42f5-801a-350148c74f2f.png)
26+
27+
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.
28+
29+
```
30+
// Set the border color to transparent to avoid the borders for series.
31+
series.Style.Border.Color = Color.Transparent;
32+
```
33+
34+
![Chart with fill and without border](https://user-images.githubusercontent.com/53489303/200620598-0ac19fba-10b8-44d0-979d-a62d157e5dc0.png)
35+
36+
KB article - [How to customize series border in WinForms Chart](https://www.syncfusion.com/kb/10149/how-to-customize-series-border-in-chart)

0 commit comments

Comments
 (0)