Table of Contents

Class RadzenPieSeries<TItem>

Namespace
Radzen.Blazor
Assembly
Radzen.Blazor.dll

Renders pie series in RadzenChart.

public class RadzenPieSeries<TItem> : CartesianSeries<TItem>, IComponent, IHandleEvent, IHandleAfterRender, IChartSeries, IDisposable

Type Parameters

TItem

The type of the series data item.

Inheritance
RadzenPieSeries<TItem>
Implements
Derived
Inherited Members

Constructors

RadzenPieSeries()

public RadzenPieSeries()

Properties

Color

public override string Color { get; }

Property Value

string

CoordinateSystem

public override CoordinateSystem CoordinateSystem { get; }

Property Value

CoordinateSystem

CurrentRadius

Returns the current radius - either a specified Radius or automatically calculated one.

protected double CurrentRadius { get; }

Property Value

double

Fills

The fill colors of the pie segments. Used as the background of the segments.

[Parameter]
public IEnumerable<string> Fills { get; set; }

Property Value

IEnumerable<string>

PositiveItems

Stores Data filtered to items greater than zero as an IList of TItem.

protected IList<TItem> PositiveItems { get; }

Property Value

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.

[Parameter]
public double? Radius { get; set; }

Property Value

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.

[Parameter]
public double StartAngle { get; set; }

Property Value

double

StrokeWidth

The stroke width of the segments in pixels. By default set to 0.

[Parameter]
public double StrokeWidth { get; set; }

Property Value

double

The width of the stroke.

Strokes

The stroke colors of the pie segments.

[Parameter]
public IEnumerable<string> Strokes { get; set; }

Property Value

IEnumerable<string>

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

[Parameter]
public double TotalAngle { get; set; }

Property Value

double

X

Specifies the x coordinate of the pie center. Not set by default which centers pie horizontally.

[Parameter]
public double? X { get; set; }

Property Value

double?

The x.

Y

Specifies the y coordinate of the pie center. Not set by default which centers pie vertically.

[Parameter]
public double? Y { get; set; }

Property Value

double?

The y.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

Contains(double, double, double)

public override bool Contains(double x, double y, double tolerance)

Parameters

x double
y double
tolerance double

Returns

bool

DataAt(double, double)

public override (object, Point) DataAt(double x, double y)

Parameters

x double
y double

Returns

(object, Point)

DegToRad(double)

Converts degrees to radians.

protected double DegToRad(double degrees)

Parameters

degrees double

Returns

double

GetDataLabels(double, double)

public override IEnumerable<ChartDataLabel> GetDataLabels(double offsetX, double offsetY)

Parameters

offsetX double
offsetY double

Returns

IEnumerable<ChartDataLabel>

MeasureLegend()

public override double MeasureLegend()

Returns

double

Render(ScaleBase, ScaleBase)

public override RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)

Parameters

categoryScale ScaleBase
valueScale ScaleBase

Returns

RenderFragment

RenderLegendItem()

public override RenderFragment RenderLegendItem()

Returns

RenderFragment

Segment(double, double, double, double, double, double)

Creates SVG path that renders the specified segment.

protected string Segment(double x, double y, double radius, double innerRadius, double startAngle, double endAngle)

Parameters

x double

The x.

y double

The y.

radius double

The radius.

innerRadius double

The inner radius.

startAngle double

The start angle.

endAngle double

The end angle.

Returns

string

ToCartesian(double, double, double, double)

Converts radial coordinates to to cartesian.

protected (double X, double Y) ToCartesian(double x, double y, double radius, double degrees)

Parameters

x double

The x.

y double

The y.

radius double

The radius.

degrees double

The degrees.

Returns

(double a, double b)

TooltipClass(TItem)

protected override string TooltipClass(TItem item)

Parameters

item TItem

Returns

string

TooltipStyle(TItem)

protected override string TooltipStyle(TItem item)

Parameters

item TItem

Returns

string