Class RadzenPieSeries<TItem>
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
-
CartesianSeries<TItem>RadzenPieSeries<TItem>
- Implements
- Derived
- Inherited Members
Constructors
RadzenPieSeries()
public RadzenPieSeries()
Properties
Color
public override string Color { get; }
Property Value
CoordinateSystem
public override CoordinateSystem CoordinateSystem { get; }
Property Value
CurrentRadius
Returns the current radius - either a specified Radius or automatically calculated one.
protected double CurrentRadius { get; }
Property Value
Fills
The fill colors of the pie segments. Used as the background of the segments.
[Parameter]
public IEnumerable<string> Fills { get; set; }
Property Value
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
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
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
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
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
Returns
DataAt(double, double)
public override (object, Point) DataAt(double x, double y)
Parameters
Returns
DegToRad(double)
Converts degrees to radians.
protected double DegToRad(double degrees)
Parameters
degrees
double
Returns
GetDataLabels(double, double)
public override IEnumerable<ChartDataLabel> GetDataLabels(double offsetX, double offsetY)
Parameters
Returns
MeasureLegend()
public override double MeasureLegend()
Returns
Render(ScaleBase, ScaleBase)
public override RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale)
Parameters
Returns
RenderLegendItem()
public override RenderFragment RenderLegendItem()
Returns
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
doubleThe x.
y
doubleThe y.
radius
doubleThe radius.
innerRadius
doubleThe inner radius.
startAngle
doubleThe start angle.
endAngle
doubleThe end angle.
Returns
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
Returns
TooltipClass(TItem)
protected override string TooltipClass(TItem item)
Parameters
item
TItem
Returns
TooltipStyle(TItem)
protected override string TooltipStyle(TItem item)
Parameters
item
TItem