LabelContext
public struct LabelContextContext data for label formatting.
Fields
Section titled “Fields”
public float ValueThe primary Y value of the data point.
Returns
System.Single
public float XThe X value of the data point.
Returns
System.Single
SeriesName
Section titled “SeriesName”public string SeriesNameThe name of the data series.
Returns
System.String
Category
Section titled “Category”public string CategoryThe category name (for categorical axes).
Returns
System.String
public string NameThe name of the data point (for pie charts, etc.).
Returns
System.String
Percent
Section titled “Percent”public float PercentThe percentage Value (0-1 for percent format, or 0-100 for display).
Returns
System.Single
public int IndexThe index of the data point in the series.
Returns
System.Int32
SeriesIndex
Section titled “SeriesIndex”public int SeriesIndexThe series index when multiple series are present.
Returns
System.Int32
public float TotalThe total/sum Value (for stacked charts, pie charts).
Returns
System.Single
public float MinThe minimum value in the series or dataset.
Returns
System.Single
public float MaxThe maximum value in the series or dataset.
Returns
System.Single
Average
Section titled “Average”public float AverageThe average value in the series or dataset.
Returns
System.Single
public DateTime DateThe date/time value for time series data.
Returns
System.DateTime
Methods
Section titled “Methods”
FromDataPoint(DataPoint, int, string)
Section titled “FromDataPoint(DataPoint, int, string)”public static LabelContext FromDataPoint(DataPoint point, int index = 0, string seriesName = null)Creates a context from a data point.
Parameters
| Name | Type |
|---|---|
point |
ChartGuru.DataPoint |
index |
System.Int32 |
seriesName |
System.String |
Returns
ChartGuru.LabelContext
ForPieSlice(string, float, float, int)
Section titled “ForPieSlice(string, float, float, int)”public static LabelContext ForPieSlice(string name, float value, float percent, int index)Creates a context for pie/donut chart labels.
Parameters
| Name | Type |
|---|---|
name |
System.String |
value |
System.Single |
percent |
System.Single |
index |
System.Int32 |
Returns
ChartGuru.LabelContext