Class RadzenSeriesAnnotation<TItem>
Displays a text label for the specified data item from the series.
public class RadzenSeriesAnnotation<TItem> : RadzenChartComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IChartSeriesOverlay
Type Parameters
TItem
- Inheritance
-
RadzenSeriesAnnotation<TItem>
- Implements
- Inherited Members
Examples
<RadzenChart>
<RadzenLineSeries Data=@revenue CategoryProperty="Quarter" ValueProperty="Revenue">
<RadzenSeriesAnnotation Data="@revenue[1] Text="Q2 Revenue" />
</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
RadzenSeriesAnnotation()
public RadzenSeriesAnnotation()
Properties
Data
The data item from the series this annotation applies to.
[Parameter]
public TItem Data { get; set; }
Property Value
- TItem
OffsetX
Horizontal offset from the default position.
[Parameter]
public double OffsetX { get; set; }
Property Value
OffsetY
Vertical offset from the default position.
[Parameter]
public double OffsetY { get; set; }
Property Value
Series
The series this annotation applies to. Set to true
by default.
[CascadingParameter]
protected CartesianSeries<TItem> Series { get; set; }
Property Value
- CartesianSeries<TItem>
Text
The text to display in the annotation.
[Parameter]
public string Text { get; set; }
Property Value
Visible
Determines whether the annotation is visible. Set to true
by default.
[Parameter]
public bool Visible { get; set; }
Property Value
Methods
Contains(double, double, int)
public bool Contains(double mouseX, double mouseY, int tolerance)
Parameters
Returns
Render(ScaleBase, ScaleBase)
public RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
Returns
RenderTooltip(double, double, double, double)
public RenderFragment RenderTooltip(double mouseX, double mouseY, double marginLeft, double marginTop)
Parameters
Returns
ShouldRefreshChart(ParameterView)
protected override bool ShouldRefreshChart(ParameterView parameters)
Parameters
parameters
ParameterView