mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-02-04 05:35:44 +00:00
47 lines
1.1 KiB
C#
47 lines
1.1 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using System;
|
|
|
|
namespace Radzen.Blazor
|
|
{
|
|
/// <summary>
|
|
/// Represents the title configuration of a <see cref="AxisBase" />.
|
|
/// </summary>
|
|
public class RadzenAxisTitle : RadzenChartComponentBase
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the text displayed by the title.
|
|
/// </summary>
|
|
/// <value>The text.</value>
|
|
[Parameter]
|
|
public string? Text { get; set; }
|
|
|
|
/// <summary>
|
|
/// Sets the axis with this configuration applies to.
|
|
/// </summary>
|
|
/// <value>The axis.</value>
|
|
[CascadingParameter]
|
|
public AxisBase Axis
|
|
{
|
|
set
|
|
{
|
|
ArgumentNullException.ThrowIfNull(value);
|
|
|
|
value.Title = this;
|
|
}
|
|
}
|
|
|
|
internal double Size
|
|
{
|
|
get
|
|
{
|
|
return 16 * 0.875;
|
|
}
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override bool ShouldRefreshChart(ParameterView parameters)
|
|
{
|
|
return DidParameterChange(parameters, nameof(Text), Text);
|
|
}
|
|
}
|
|
} |