Class ChartGeometry
Geometry helpers shared by the charts.
public static class ChartGeometry
- Inheritance
-
ChartGeometry
- Inherited Members
Methods
Circle(double, double, double)
Builds the path of a whole circle. Unlike a 360 degree Sector(ChartSector) it has no seam from the edge to the center, so it can be outlined.
public static string Circle(double centerX, double centerY, double radius)
Parameters
Returns
Line(IReadOnlyList<(double X, double Y)>, ChartCurve, bool)
Builds the path of a line through points, joined according to curve.
public static string Line(IReadOnlyList<(double X, double Y)> points, ChartCurve curve = ChartCurve.Linear, bool close = false)
Parameters
pointsIReadOnlyList<(double X, double Y)>curveChartCurveclosebool
Returns
Percentile(IReadOnlyList<double>, double)
Gets the value at a percentile of a sorted list, interpolating between neighbors.
public static double Percentile(IReadOnlyList<double> sorted, double percentile)
Parameters
sortedIReadOnlyList<double>The values in ascending order.
percentiledoubleThe percentile, from 0 to 1.
Returns
Polar(double, double, double, double)
Gets the point at an angle and distance from a center. Angles are in degrees, clockwise from 12 o'clock.
public static (double X, double Y) Polar(double centerX, double centerY, double radius, double angle)
Parameters
Returns
Sector(double, double, double, double, double, double)
Builds the path of a ring segment (or a pie wedge when innerRadius is zero) between two
angles. Angles are in degrees, clockwise from 12 o'clock.
public static string Sector(double centerX, double centerY, double innerRadius, double outerRadius, double startAngle, double endAngle)
Parameters
centerXdoublecenterYdoubleinnerRadiusdoubleouterRadiusdoublestartAngledoubleendAngledouble
Returns
Sector(ChartSector)
Builds the path of a ChartSector.
public static string Sector(ChartSector sector)
Parameters
sectorChartSector