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 ChartAuthoringStyleApplicator).

Parameters

NameType
chartTypeChartGuru.ChartType
dataPointChartGuru.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

NameType
chartTypeChartGuru.ChartType
xValueSystem.Single
valueSystem.Single
labelSystem.String
colorOverrideUnityEngine.Color
gradientOverrideChartGuru.LinearGradientStyle
optionsChartGuru.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 ChartDataEntry so candlestick charts can recover their OHLC Values (packed into XValue/XEnd/YStart/YEnd) and emit a real CandleStickMark instead of the generic bar fallback.

Parameters

NameType
chartTypeChartGuru.ChartType
xValueSystem.Single
valueSystem.Single
labelSystem.String
colorOverrideUnityEngine.Color
gradientOverrideChartGuru.LinearGradientStyle
optionsChartGuru.ChartAuthoringStyleOptions
entryChartGuru.ChartDataEntry

Returns

ChartGuru.IChartMark