Displays a shaded reference band between two fixed values over a chart series. Use it to highlight acceptable ranges, thresholds or zones on the value axis.
RadzenChartComponentBase.Initialize
RadzenChartComponentBase.SetParametersAsync
RadzenChartComponentBase.ValidateParameters
RadzenChartComponentBase.DidParameterChange
RadzenChartComponentBase.Chart
ComponentBase.BuildRenderTree
ComponentBase.OnInitialized
ComponentBase.OnInitializedAsync
ComponentBase.OnParametersSet
ComponentBase.OnParametersSetAsync
ComponentBase.StateHasChanged
ComponentBase.ShouldRender
ComponentBase.OnAfterRender
ComponentBase.OnAfterRenderAsync
ComponentBase.InvokeAsync
ComponentBase.DispatchExceptionAsync
ComponentBase.RendererInfo
ComponentBase.Assets
ComponentBase.AssignedRenderMode
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
public class RadzenSeriesReferenceBand : RadzenGridLines, IComponent, IHandleEvent, IHandleAfterRender, IChartSeriesOverlay<RadzenChart>
<RadzenLineSeries Data=@revenue CategoryProperty="Quarter" ValueProperty="Revenue">
<RadzenSeriesReferenceBand From="240000" To="280000" Title="Acceptable range" />
</RadzenLineSeries>
</RadzenChart>
@code {
class DataItem
{
public string Quarter { get; set; }
public double Revenue { get; set; }
}
DataItem[] revenue = new DataItem[]
{
new DataItem { Quarter = "Q1", Revenue = 234000 },
new DataItem { Quarter = "Q2", Revenue = 284000 },
new DataItem { Quarter = "Q3", Revenue = 274000 },
new DataItem { Quarter = "Q4", Revenue = 294000 }
};
}Initializes a new instance of the RadzenSeriesReferenceBand class.
public RadzenSeriesReferenceBand()Specifies the fill color of the reference band. Set to var(--rz-series-color) by default - the color of the series the band belongs to.
public string Fill { get; set; }
| Type | Description |
|---|---|
| string | Specifies the fill color of the reference band. Set to var(--rz-series-color) by default - the color of the series the band belongs to. |
Specifies the fill opacity of the reference band. Set to 0.1 by default.
public double FillOpacity { get; set; }
| Type | Description |
|---|---|
| double | Specifies the fill opacity of the reference band. Set to 0.1 by default. |
Specifies the start value of the reference band on the value axis.
public double From { get; set; }
| Type | Description |
|---|---|
| double | Specifies the start value of the reference band on the value axis. |
Gets the label displayed in the tooltip of the reference band.
protected string Name { get; }
| Type | Description |
|---|---|
| string | Gets the label displayed in the tooltip of the reference band. |
The series this reference band applies to. Set by the parent series via a cascading parameter.
protected IChartSeries Series { get; set; }
| Type | Description |
|---|---|
| IChartSeries | The series this reference band applies to. Set by the parent series via a cascading parameter. |
Specifies the title of the reference band. Displayed as label in the tooltip. Set to "Reference" by default.
public string Title { get; set; }
| Type | Description |
|---|---|
| string | Specifies the title of the reference band. Displayed as label in the tooltip. Set to "Reference" by default. |
Specifies the end value of the reference band on the value axis.
public double To { get; set; }
| Type | Description |
|---|---|
| double | Specifies the end value of the reference band on the value axis. |
Specifies the template displayed in the tooltip of the reference band.
public RenderFragment<ValueTuple<double, double>> TooltipTemplate { get; set; }
| Type | Description |
|---|---|
| RenderFragment<ValueTuple<double, double>> | Specifies the template displayed in the tooltip of the reference band. |
public bool Contains(double mouseX, double mouseY, int tolerance)
| Type | Name | Description |
|---|---|---|
| double | mouseX | |
| double | mouseY | |
| int | tolerance |
| Type | Description |
|---|---|
| bool |
public Point GetTooltipPosition(double mouseX, double mouseY)
| Type | Name | Description |
|---|---|---|
| double | mouseX | |
| double | mouseY |
| Type | Description |
|---|---|
| Point |
public RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)
| Type | Description |
|---|---|
| RenderFragment |
public RenderFragment RenderTooltip(double mouseX, double mouseY)
| Type | Name | Description |
|---|---|---|
| double | mouseX | |
| double | mouseY |
| Type | Description |
|---|---|
| RenderFragment |
protected override bool ShouldRefreshChart(ParameterView parameters)
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters |
| Type | Description |
|---|---|
| bool |