Skip to content

ChartMarkFactory

ClassChartGuruChartGuru
public static class ChartMarkFactory

Creates concrete mark collections from raw values, typed records, projections, or tabular chart data.

public static IChartMark CreateMark(ChartType chartType, DataPoint dataPoint)

Creates a mark of the appropriate type for chartType with default styling. Used by host components that do not apply per-mark inspector overrides at creation time (the overrides are applied later via ChartGuru.ChartAuthoringStyleApplicator).

Parameters

Name Type
chartType ChartGuru.ChartType
dataPoint ChartGuru.DataPoint

Returns

ChartGuru.IChartMark

CreateMark(ChartType, float, float, string, Color, LinearGradientStyle, ChartAuthoringStyleOptions)

Section titled “CreateMark(ChartType, float, float, string, Color, LinearGradientStyle, ChartAuthoringStyleOptions)”
public static IChartMark CreateMark(ChartType chartType, float xValue, float value, string label, Color colorOverride, LinearGradientStyle gradientOverride, ChartAuthoringStyleOptions options)

Creates the concrete mark for a chart type and applies its label, color or gradient override, and authoring-style options.

Parameters

Name Type
chartType ChartGuru.ChartType
xValue System.Single
value System.Single
label System.String
colorOverride UnityEngine.Color
gradientOverride ChartGuru.LinearGradientStyle
options ChartGuru.ChartAuthoringStyleOptions

Returns

ChartGuru.IChartMark

CreateMark(ChartType, float, float, string, Color, LinearGradientStyle, ChartAuthoringStyleOptions, ChartDataEntry)

Section titled “CreateMark(ChartType, float, float, string, Color, LinearGradientStyle, ChartAuthoringStyleOptions, ChartDataEntry)”
public static IChartMark CreateMark(ChartType chartType, float xValue, float value, string label, Color colorOverride, LinearGradientStyle gradientOverride, ChartAuthoringStyleOptions options, ChartDataEntry entry)

Overload that accepts an optional ChartGuru.ChartDataEntry so candlestick charts can recover their OHLC Values (packed into XValue/XEnd/YStart/YEnd) and emit a real ChartGuru.CandleStickMark instead of the generic bar fallback.

Parameters

Name Type
chartType ChartGuru.ChartType
xValue System.Single
value System.Single
label System.String
colorOverride UnityEngine.Color
gradientOverride ChartGuru.LinearGradientStyle
options ChartGuru.ChartAuthoringStyleOptions
entry ChartGuru.ChartDataEntry

Returns

ChartGuru.IChartMark