Class ChartAxisLabelBorder
Provides options for customizing the border of the axis labels, including color, type, and width.
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChartAxisLabelBorder : ChartSubComponent, ISubcomponentTracker
Constructors
ChartAxisLabelBorder()
Declaration
public ChartAxisLabelBorder()
Properties
Color
Gets or sets the color of the axis label border.
Declaration
public string Color { get; set; }
Property Value
Type | Description |
---|---|
System.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
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
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.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>