RadzenSeriesReferenceBand Class

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.

Inheritance

Object

ComponentBase

RadzenChartComponentBase

RadzenGridLines

RadzenSeriesReferenceBand

Implements

IComponent

IHandleEvent

IHandleAfterRender

IChartSeriesOverlay

Inherited Members

RadzenGridLines.Stroke

RadzenGridLines.StrokeWidth

RadzenGridLines.LineType

RadzenGridLines.Visible

RadzenGridLines.ChartAxis

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

Syntax

public class RadzenSeriesReferenceBand : RadzenGridLines, IComponent, IHandleEvent, IHandleAfterRender, IChartSeriesOverlay

Examples

<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 }
    };
}

Constructors

RadzenSeriesReferenceBandlink

Initializes a new instance of the RadzenSeriesReferenceBand class.

Declaration
public RadzenSeriesReferenceBand()

Properties

Filllink

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.

Declaration
public string Fill { get; set; }
Property Value
Type Description
stringSpecifies the fill color of the reference band. Set to var(--rz-series-color) by default - the color of the series the band belongs to.

FillOpacitylink

Specifies the fill opacity of the reference band. Set to 0.1 by default.

Declaration
public double FillOpacity { get; set; }
Property Value
Type Description
doubleSpecifies the fill opacity of the reference band. Set to 0.1 by default.

Fromlink

Specifies the start value of the reference band on the value axis.

Declaration
public double From { get; set; }
Property Value
Type Description
doubleSpecifies the start value of the reference band on the value axis.

Namelink

Gets the label displayed in the tooltip of the reference band.

Declaration
protected string Name { get; }
Property Value
Type Description
stringGets the label displayed in the tooltip of the reference band.

Serieslink

The series this reference band applies to. Set by the parent series via a cascading parameter.

Declaration
protected IChartSeries Series { get; set; }
Property Value
Type Description
IChartSeriesThe series this reference band applies to. Set by the parent series via a cascading parameter.

Titlelink

Specifies the title of the reference band. Displayed as label in the tooltip. Set to "Reference" by default.

Declaration
public string Title { get; set; }
Property Value
Type Description
stringSpecifies the title of the reference band. Displayed as label in the tooltip. Set to "Reference" by default.

Tolink

Specifies the end value of the reference band on the value axis.

Declaration
public double To { get; set; }
Property Value
Type Description
doubleSpecifies the end value of the reference band on the value axis.

TooltipTemplatelink

Specifies the template displayed in the tooltip of the reference band.

Declaration
public RenderFragment<ValueTuple<double, double>> TooltipTemplate { get; set; }
Property Value
Type Description
RenderFragment<ValueTuple<double, double>>Specifies the template displayed in the tooltip of the reference band.

Methods

Containslink

Declaration
public bool Contains(double mouseX, double mouseY, int tolerance)
Parameters
Type Name Description
double mouseX
double mouseY
int tolerance
Returns
Type Description
bool

Disposelink

Removes the reference band from the series overlays.

Declaration
public void Dispose()

GetTooltipPositionlink

Declaration
public Point GetTooltipPosition(double mouseX, double mouseY)
Parameters
Type Name Description
double mouseX
double mouseY
Returns
Type Description
Point

Renderlink

Declaration
public RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
Type Name Description
ScaleBase categoryScale
ScaleBase valueScale
Returns
Type Description
RenderFragment

RenderTooltiplink

Declaration
public RenderFragment RenderTooltip(double mouseX, double mouseY)
Parameters
Type Name Description
double mouseX
double mouseY
Returns
Type Description
RenderFragment

ShouldRefreshChartlink

Declaration
protected override bool ShouldRefreshChart(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters
Returns
Type Description
bool
An error has occurred. This app may no longer respond until reloaded. Reload 🗙