Class RadzenSeriesAnnotation<TItem>
Displays a text label for the specified data item from the series.
Inheritance
System.Object
RadzenSeriesAnnotation<TItem>
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenSeriesAnnotation<TItem> : RadzenChartComponentBase, IChartSeriesOverlay, IDisposable
Type Parameters
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 }
};
}
Properties
Data
The data item from the series this annotation applies to.
Declaration
public TItem Data { get; set; }
Property Value
Fill
The color of the annotation text.
Declaration
public string Fill { get; set; }
Property Value
Type |
Description |
System.String |
|
OffsetX
Horizontal offset from the default position.
Declaration
public double OffsetX { get; set; }
Property Value
Type |
Description |
System.Double |
|
OffsetY
Vertical offset from the default position.
Declaration
public double OffsetY { get; set; }
Property Value
Type |
Description |
System.Double |
|
Series
The series this annotation applies to. Set to true
by default.
Declaration
protected CartesianSeries<TItem> Series { get; set; }
Property Value
Text
The text to display in the annotation.
Declaration
public string Text { get; set; }
Property Value
Type |
Description |
System.String |
|
Visible
Determines whether the annotation is visible. Set to true
by default.
Declaration
public bool Visible { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
Contains(Double, Double, Int32)
Declaration
public bool Contains(double mouseX, double mouseY, int tolerance)
Parameters
Type |
Name |
Description |
System.Double |
mouseX |
|
System.Double |
mouseY |
|
System.Int32 |
tolerance |
|
Returns
Type |
Description |
System.Boolean |
|
Dispose()
Declaration
Get position of the overlay tooltip.
Declaration
public Point GetTooltipPosition(double mouseX, double mouseY)
Parameters
Type |
Name |
Description |
System.Double |
mouseX |
|
System.Double |
mouseY |
|
Returns
Type |
Description |
Point |
Position.
|
Render(ScaleBase, ScaleBase)
Declaration
public RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
Returns
Type |
Description |
RenderFragment |
RenderFragment
|
Declaration
public RenderFragment RenderTooltip(double mouseX, double mouseY)
Parameters
Type |
Name |
Description |
System.Double |
mouseX |
|
System.Double |
mouseY |
|
Returns
Type |
Description |
RenderFragment |
|
ShouldRefreshChart(ParameterView)
Determines if RadzenChart should render.
Declaration
protected override bool ShouldRefreshChart(ParameterView parameters)
Parameters
Type |
Name |
Description |
ParameterView |
parameters |
The parameters.
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
Implements
IDisposable