Skip to content

UIToolkitChartBinder

ClassChartGuruChartGuru
public sealed class UIToolkitChartBinder : MonoBehaviour

Connects a ChartGuruElement in a UI Toolkit panel to things UXML cannot reference: a scene ChartDataSource, and on Unity versions without asset attributes a chart or data asset. Empty fields leave the element's own setting alone. Accepts a UnityEngine.UIElements.UIDocument or, on Unity 6.5 or newer, a PanelRenderer, and follows the host when its tree reloads.

public void Bind()

Finds the element in the UI panel and pushes the assigned source and assets into it.

public UIToolkitChartBinder()

public Component UIPanel { get; set; }

The UI Toolkit host. Accepts a UIDocument or, on Unity 6.5 or newer, a PanelRenderer.

Returns

UnityEngine.Component

public ChartGuruElement Element { get; }

The bound element, or null while the panel has none.

Returns

ChartGuru.ChartGuruElement

public ChartDataSource DataSource { get; set; }

The live data source pushed into the element.

Returns

ChartGuru.ChartDataSource

public ChartAsset Chart { get; set; }

The chart asset pushed into the element, or null to keep the element's own.

Returns

ChartGuru.ChartAsset

public ChartDataAsset Data { get; set; }

The data asset pushed into the element, or null to keep the element's own.

Returns

ChartGuru.ChartDataAsset