ClassChartTitleMargin
Configures the margin spacing around the chart title to control its distance from other chart elements. Provides precise control over the empty space surrounding the title for optimal chart layout and visual hierarchy. Use this component to fine-tune title positioning and ensure proper spacing between the title and chart content.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartTitleMargin : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartTitleMargin
Implements:
Inherited Members
Constructors
ChartTitleMargin()
Declaration
public ChartTitleMargin()
Properties
Bottom
Sets the bottom margin of the chart title in pixels. Controls the spacing between the title and elements positioned below it, such as the chart plot area, subtitle, or legend. Use this to create appropriate vertical separation and improve the visual hierarchy of your chart layout. Example: Set to 20 for generous spacing below the title, or 10 for a more compact layout when space is limited.
Declaration
[Parameter]
public double? Bottom { get; set; }
Property Value
ChildContent
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Left
Sets the left margin of the chart title in pixels. Controls the spacing between the title and elements positioned to its left, affecting overall title alignment and positioning. Use this to adjust title placement relative to the chart's left edge or other chart components for better visual balance. Example: Set to 15 when the title needs to align with specific chart elements or avoid overlapping with left-positioned content.
Right
Sets the right margin of the chart title in pixels. Controls the spacing between the title and elements positioned to its right, ensuring proper visual separation and alignment. Use this to prevent title text from appearing too close to the chart's right edge or other components. Example: Set to 25 when working with right-aligned titles or when additional space is needed for visual balance.
Top
Sets the top margin of the chart title in pixels. Controls the spacing between the title and elements positioned above it, or the distance from the chart container's top edge. Use this to position the title appropriately within the chart area and create proper spacing from container boundaries. Example: Set to 15 to move the title away from the top edge, or 30 for more dramatic top spacing in larger chart layouts.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
OnAfterRender(bool)
Declaration
protected override void OnAfterRender(bool firstRender)
Parameters
firstRender
Overrides
OnInitialized()
Declaration
protected override void OnInitialized()
Overrides
OnParametersSet()
Declaration
protected override void OnParametersSet()
Overrides
Serialize()
Declaration
public Dictionary<string, object> Serialize()
Returns