Class PivotChartDataLabel
Allows to set the data label for the series.
Inherited Members
Namespace: Syncfusion.Blazor.PivotView
Assembly: Syncfusion.Blazor.dll
Syntax
public class PivotChartDataLabel : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Constructors
PivotChartDataLabel()
Declaration
public PivotChartDataLabel()
Properties
Angle
Allows to specify the rotation angle to data label.
Declaration
[Parameter]
public int Angle { get; set; }
Property Value
| Type |
|---|
| int |
ConnectorStyle
Allows custom connector of the pie, funnel, pyramid and doughnut chart data label.
Declaration
[Parameter]
public PivotChartConnectorStyle ConnectorStyle { get; set; }
Property Value
| Type |
|---|
| PivotChartConnectorStyle |
EnableRotation
Allows to set whether rotation to data label is enable or not.
Declaration
[Parameter]
public bool EnableRotation { get; set; }
Property Value
| Type |
|---|
| bool |
Fill
Allows to set the background color of the data label accepts value in hex and rgba as a valid CSS color string.
Declaration
[Parameter]
public string Fill { get; set; }
Property Value
| Type |
|---|
| string |
Position
Allows to specify the position of the data label. They are, Outside: Positions the label outside the point. Inside: Positions the label on top of the point.
Declaration
[Parameter]
public PivotChartLabelPosition Position { get; set; }
Property Value
| Type |
|---|
| PivotChartLabelPosition |
Rx
Allows to set the roundedCornerX for the data label. It requires Border values not to be null.
Declaration
[Parameter]
public int Rx { get; set; }
Property Value
| Type |
|---|
| int |
Ry
Allows to set the roundedCornerY for the data label. It requires Border values not to be null.
Declaration
[Parameter]
public int Ry { get; set; }
Property Value
| Type |
|---|
| int |
Template
Gets or sets a template that allows the appearance of data labels in the pivot chart series to be customized using own HTML elements for displaying desired UI. The AccumulationChartDataPointInfo is passed to the template as a context, allowing it to access the data points such as ${point.x} and ${point.y} and display the associated data point within a customized UI.
Declaration
[Parameter]
[JsonIgnore]
public RenderFragment<AccumulationChartDataPointInfo> Template { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment<AccumulationChartDataPointInfo> | The template content. The default value is |
Examples
<SfPivotView ID="Pivot" TValue="PivotProductDetails">
<PivotViewDisplayOption View=View.Chart></PivotViewDisplayOption>
<PivotChartSettings Title="Sales Analysis">
<PivotChartSeries Type="ChartType">
<PivotChartDataLabel Visible="true">
<Template>
@{
var data = context as AccumulationChartDataPointInfo;
}
<table>
<tr>
<td align="center" style="background-color: #C1272D; font-size: 14px; color: #E7C554; font-weight: bold; padding: 5px"> @data.X :</td>
<td align="center" style="background-color: #C1272D; font-size: 14px; color: whitesmoke; font-weight: bold; padding: 5px"> @data.Y</td>
</tr>
</table>
</Template>
</PivotChartDataLabel>
</PivotChartSeries>
</PivotChartSettings>
</SfPivotView>
Visible
Allows to set the visibility of data label to the series renders.
Declaration
[Parameter]
public bool Visible { get; set; }
Property Value
| Type |
|---|
| bool |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
Dispose(bool)
Dispose unmanaged resources in the component.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree. Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |
Overrides
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| Task | A System.Threading.Tasks.Task representing any asynchronous operation. |