UIToolkitChartBinder
[AddComponentMenu("ChartGuru/UI Toolkit Chart Binder")][DisallowMultipleComponent][ExecuteAlways]public class UIToolkitChartBinder : MonoBehaviourBridges a scene-authored data source to a named ChartGuru.ChartGuruElement
inside a UnityEngine.UIElements.UIDocument. Drop this component on a GameObject
alongside a ChartGuru.ChartDataSourceBase (or any other
ChartGuru.IChartGuruElementDataSource), assign the document, the
element name to look up, and the source. The binder resolves the
element on enable and pushes the source into element.DataSource.
This is purely a wiring helper. Once bound, the element pulls data from the source via `ChartGuru.IChartGuruElementDataSource.PopulateChart(ChartGuru.Chart%2cChartGuru.ChartType%2cChartGuru.ChartAuthoringStyleOptions)` and re-pulls automatically when the source raises `ChartGuru.IChartGuruElementDataSource.DataChanged`.
Methods
Section titled “Methods”
Bind()
Section titled “Bind()”public void Bind()Resolve the target element and push the data source into it. Safe to call multiple times; clears any previous binding first.
Constructors
Section titled “Constructors”
UIToolkitChartBinder()
Section titled “UIToolkitChartBinder()”public UIToolkitChartBinder()Properties
Section titled “Properties”
BoundElement
Section titled “BoundElement”public ChartGuruElement BoundElement { get; }The bound element (null when unresolved).
Returns
ChartGuru.ChartGuruElement
DataSourceObject
Section titled “DataSourceObject”public Object DataSourceObject { get; set; }The configured source. Setting at runtime re-binds.
Returns
UnityEngine.Object