Skip to content

Rendering Paths

All 2D rendering paths share the same Chart model and renderer. Choose the host that matches where the chart appears.

Host

Use it when

ChartGraphic

The chart belongs in a uGUI Canvas, including Screen Space Overlay, Screen Space Camera, or World Space Canvas.

ChartComponent

You want a quick scene component for prototyping without building a full Canvas workflow.

ChartGuruElement

The UI is built with UI Toolkit, UXML, USS, or Unity data binding.

Chart Designer / Chart Gallery

You need an editor preview or a visual authoring surface.

UI Toolkit

ChartGuruElement is a VisualElement with UXML attributes for chart type, title, labels, axes, legend, marks, data source, and interaction. Use UIToolkitChartBinder when a scene component should feed a named element inside a UIDocument.

<ui:UXML xmlns:cg="ChartGuru.UIToolkit">
<cg:ChartGuruElement
chart-type="Line"
chart-title="Sales Trend"
legend-position="Bottom"
show-data-labels="true"
animate-on-start="true" />
</ui:UXML>