Skip to content

ChartDefinitionCompiler

ClassChartGuruChartGuru
public static class ChartDefinitionCompiler

Builds the runtime Chart from a ChartDefinition and optional bound data. The definition is never handed to the chart: axes, legend and styles are cloned, so layout cannot write derived values back into authored settings.

public static Chart Compile(ChartDefinition definition, ChartDataFrame data = null)

Compiles the definition. data replaces the definition's own table when a data source or a ChartDataAsset is bound; pass null to use the definition's data.

Parameters

Name Type
definition ChartGuru.ChartDefinition
data ChartGuru.ChartDataFrame

Returns

ChartGuru.Chart

ApplyData(Chart, ChartDefinition, ChartDataFrame)

Section titled “ApplyData(Chart, ChartDefinition, ChartDataFrame)”
public static void ApplyData(Chart chart, ChartDefinition definition, ChartDataFrame data)

Replaces the data of a live chart that was compiled from definition. The new marks go through Chart.SetData(IEnumerable<IChartMark>), so the change animates with the chart's Chart.Animation and the selection is kept, while categories, scales and styles are processed exactly like a full compile.

Parameters

Name Type
chart ChartGuru.Chart
definition ChartGuru.ChartDefinition
data ChartGuru.ChartDataFrame

ApplyData(Chart, ChartDefinition, ChartDataFrame, Animation?)

Section titled “ApplyData(Chart, ChartDefinition, ChartDataFrame, Animation?)”
public static void ApplyData(Chart chart, ChartDefinition definition, ChartDataFrame data, Animation? animation)

Replaces the data of a live chart like ChartDefinitionCompiler.ApplyData(Chart, ChartDefinition, ChartDataFrame), animating with animation instead; pass null to apply the data instantly.

Parameters

Name Type
chart ChartGuru.Chart
definition ChartGuru.ChartDefinition
data ChartGuru.ChartDataFrame
animation System.Nullable{ChartGuru.Animation}