# Setting the Chart Control Border in Spread

Learn how you can specify the color, type, and size of the border that goes around the edge of the Chart control. Learn more in documentation.

## Content

You can specify the color, type, and size of the border that goes around the edge of the Chart control.
![Chart Border](https://cdn.mescius.io/document-site-files/images/346c9178-0ed8-4fb9-908b-1565b22fb408/artwork/chartborder.png)

## Using Code

1. To set the border color, set [BorderColor](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Chart.SpreadChart.BorderColor.html) in the [SpeadChart](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Chart.SpreadChart.html) class.
2. To set the border style, set [BorderStyle](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Chart.SpreadChart.BorderStyle.html) in the [SpeadChart](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Chart.SpreadChart.html) class.
3. To set the border width, set [BorderWidth](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Chart.SpreadChart.BorderWidth.html) in the [SpeadChart](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Chart.SpreadChart.html) class.

## Example

The following example creates an orange border around the Chart control.

```csharp
FarPoint.Web.Spread.Chart.SpreadChart chart = new FarPoint.Web.Spread.Chart.SpreadChart;
chart.BorderColor = Drawing.Color.DarkOrange;
chart.BorderStyle = BorderStyle.Solid;
chart.BorderWidth = 3;
fpSpread1.Sheets[0].Charts.Add(chart);
```

```vbnet
Dim chart As New FarPoint.Web.Spread.Chart.SpreadChart()
chart.BorderColor = Drawing.Color.DarkOrange
chart.BorderStyle = BorderStyle.Solid
chart.chart.BorderWidth = 3
FpSpread1.Sheets(0).Charts.Add(chart)
```