Class ChartAxisLabelBorder
Provides options for customizing the border of the axis labels, including color, type, and width.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChartAxisLabelBorder : ChartSubComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Constructors
ChartAxisLabelBorder()
Declaration
public ChartAxisLabelBorder()
Properties
Color
Gets or sets the color of the axis label border.
Declaration
[Parameter]
public string Color { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the color of the axis label border. The default axis border color is determined by the chart's theme. By default, the theme is set to Material with an axis border color of #b5b5b5. |
Remarks
Use valid hex or rgba CSS color strings for the color value.
Examples
// The following code demonstrates setting a customized color for the axis label.
<SfChart>
<ChartPrimaryXAxis>
<ChartAxisLabelBorder Color="blue" Width="2" />
</ChartPrimaryXAxis>
<ChartPrimaryYAxis>
<ChartAxisLabelBorder Color="blue" Width="2" />
</ChartPrimaryYAxis>
</SfChart>
Type
Gets or sets the border type for axis labels.
Declaration
[Parameter]
public BorderType Type { get; set; }
Property Value
| Type | Description |
|---|---|
| BorderType | One of the BorderType enumerations that specifies the border type for axis labels.
|
Remarks
The Type property determines the style of the border around axis labels.
Examples
// The following code demonstrates setting a customized border type for the axis label.
<SfChart>
<ChartPrimaryXAxis>
<ChartAxisLabelBorder Color="blue" Width="2" Type="BorderType.WithoutTopBorder" />
</ChartPrimaryXAxis>
<ChartPrimaryYAxis>
<ChartAxisLabelBorder Color="blue" Width="2" Type="BorderType.WithoutTopandBottomBorder" />
</ChartPrimaryYAxis>
</SfChart>
Width
Gets or sets the width of the border around axis labels.
Declaration
[Parameter]
public double Width { get; set; }
Property Value
| Type | Description |
|---|---|
| double | The double value representing the width of axis labels border. The default value is 0. |
Remarks
Accepts the values in numerical forms to specify the border width.
Examples
// The following code demonstrates setting a customized border width for the axis label.
<SfChart>
<ChartPrimaryXAxis>
<ChartAxisLabelBorder Color="blue" Width="2" />
</ChartPrimaryXAxis>
<ChartPrimaryYAxis>
<ChartAxisLabelBorder Color="blue" Width="2" />
</ChartPrimaryYAxis>
</SfChart>