Class RadzenPieSeries<TItem>
Renders pie series in RadzenChart.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenPieSeries<TItem> : CartesianSeries<TItem>, IChartSeries, IDisposable
Type Parameters
Name | Description |
---|---|
TItem | The type of the series data item. |
Properties
Color
Gets the color.
Declaration
public override string Color { get; }
Property Value
Type | Description |
---|---|
System.String | The color. |
Overrides
CurrentRadius
Returns the current radius - either a specified Radius or automatically calculated one.
Declaration
protected double CurrentRadius { get; }
Property Value
Type | Description |
---|---|
System.Double |
Fills
The fill colors of the pie segments. Used as the background of the segments.
Declaration
public IEnumerable<string> Fills { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<System.String> |
PositiveItems
Stores Data filtered to items greater than zero as an IList of TItem
.
Declaration
protected IList<TItem> PositiveItems { get; }
Property Value
Type | Description |
---|---|
IList<TItem> | The items. |
Radius
Specifies the radius of the pie. Not set by default - the pie takes as much size of the chart as possible.
Declaration
public double? Radius { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> |
StartAngle
Gets or sets the start angle from which segments are rendered (clockwise). Set to 90
by default.
Top is 90
, right is 0
, bottom is 270
, left is 180
.
Declaration
public double StartAngle { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Strokes
The stroke colors of the pie segments.
Declaration
public IEnumerable<string> Strokes { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<System.String> |
StrokeWidth
The stroke width of the segments in pixels. By default set to 0
.
Declaration
public double StrokeWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The width of the stroke. |
TotalAngle
Gets or sets the total angle of the pie in degrees. Set to 360
by default which renders a full circle.
Set to 180
to render a half circle or
Declaration
public double TotalAngle { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
X
Specifies the x coordinate of the pie center. Not set by default which centers pie horizontally.
Declaration
public double? X { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> | The x. |
Y
Specifies the y coordinate of the pie center. Not set by default which centers pie vertically.
Declaration
public double? Y { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Double> | The y. |
Methods
Contains(Double, Double, Double)
Determines if the series contains the specified coordinates with a given tolerance.
Declaration
public override bool Contains(double x, double y, double tolerance)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The x. |
System.Double | y | The y. |
System.Double | tolerance | The tolerance. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
DataAt(Double, Double)
Returns the data at the specified coordinates;
Declaration
public override (object, Point) DataAt(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The x. |
System.Double | y | The y. |
Returns
Type | Description |
---|---|
System.ValueTuple<System.Object, Point> |
Overrides
DegToRad(Double)
Converts degrees to radians.
Declaration
protected double DegToRad(double degrees)
Parameters
Type | Name | Description |
---|---|---|
System.Double | degrees |
Returns
Type | Description |
---|---|
System.Double |
GetDataLabels(Double, Double)
Returns data chart position
Declaration
public override IEnumerable<ChartDataLabel> GetDataLabels(double offsetX, double offsetY)
Parameters
Type | Name | Description |
---|---|---|
System.Double | offsetX | |
System.Double | offsetY |
Returns
Type | Description |
---|---|
IEnumerable<Radzen.Blazor.Rendering.ChartDataLabel> |
Overrides
MeasureLegend()
Measures the legend.
Declaration
public override double MeasureLegend()
Returns
Type | Description |
---|---|
System.Double | System.Double. |
Overrides
RenderLegendItem(Boolean)
Renders the legend item for this series.
Declaration
protected override RenderFragment RenderLegendItem(bool clickable)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | clickable |
Returns
Type | Description |
---|---|
RenderFragment |
Overrides
Segment(Double, Double, Double, Double, Double, Double)
Creates SVG path that renders the specified segment.
Declaration
protected string Segment(double x, double y, double radius, double innerRadius, double startAngle, double endAngle)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The x. |
System.Double | y | The y. |
System.Double | radius | The radius. |
System.Double | innerRadius | The inner radius. |
System.Double | startAngle | The start angle. |
System.Double | endAngle | The end angle. |
Returns
Type | Description |
---|---|
System.String |
ToCartesian(Double, Double, Double, Double)
Converts radial coordinates to to cartesian.
Declaration
protected (double X, double Y) ToCartesian(double x, double y, double radius, double degrees)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The x. |
System.Double | y | The y. |
System.Double | radius | The radius. |
System.Double | degrees | The degrees. |
Returns
Type | Description |
---|---|
System.ValueTuple<System.Double, System.Double> |
TooltipClass(TItem)
Gets the tooltip CSS class.
Declaration
protected override string TooltipClass(TItem item)
Parameters
Type | Name | Description |
---|---|---|
TItem | item | The item. |
Returns
Type | Description |
---|---|
System.String |
Overrides
TooltipStyle(TItem)
Gets the tooltip inline style.
Declaration
protected override string TooltipStyle(TItem item)
Parameters
Type | Name | Description |
---|---|---|
TItem | item | The item. |
Returns
Type | Description |
---|---|
System.String |