Skip to content

LabelContext

StructChartGuruChartGuru
public struct LabelContext

Context data for label formatting.

public float Value

The primary Y value of the data point.

Returns

System.Single

public float X

The X value of the data point.

Returns

System.Single

public string SeriesName

The name of the data series.

Returns

System.String

public string Category

The category name (for categorical axes).

Returns

System.String

public string Name

The name of the data point (for pie charts, etc.).

Returns

System.String

public float Percent

The percentage Value (0-1 for percent format, or 0-100 for display).

Returns

System.Single

public int Index

The index of the data point in the series.

Returns

System.Int32

public int SeriesIndex

The series index when multiple series are present.

Returns

System.Int32

public float Total

The total/sum Value (for stacked charts, pie charts).

Returns

System.Single

public float Min

The minimum value in the series or dataset.

Returns

System.Single

public float Max

The maximum value in the series or dataset.

Returns

System.Single

public float Average

The average value in the series or dataset.

Returns

System.Single

public DateTime Date

The date/time value for time series data.

Returns

System.DateTime

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

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