Table of Contents

Class ChartBuilder

Namespace
RatatuiUnity

Fluent builder for line/scatter charts with multiple datasets and labeled axes.

public sealed class ChartBuilder
Inheritance
ChartBuilder
Inherited Members

Examples

term.BeginChart(area)
    .XAxis("Time", 0.0, 20.0)
    .YAxis("Value", -20.0, 20.0)
    .Dataset("sin", Marker.Braille, Color.cyan, sinData)
    .Render();

Methods

Dataset(string, Marker, Color, double[])

Add a dataset. data contains interleaved (x, y) doubles: [x0, y0, x1, y1, ...]. The number of points is data.Length / 2.

public ChartBuilder Dataset(string name, Marker marker, Color color, double[] data)

Parameters

name string
marker Marker
color Color
data double[]

Returns

ChartBuilder

Render()

Finalize and enqueue the chart widget command. Must be called exactly once; the builder is unusable afterward.

public void Render()

XAxis(string, double, double)

Configure the horizontal axis label and data bounds.

public ChartBuilder XAxis(string title, double min, double max)

Parameters

title string
min double
max double

Returns

ChartBuilder

YAxis(string, double, double)

Configure the vertical axis label and data bounds.

public ChartBuilder YAxis(string title, double min, double max)

Parameters

title string
min double
max double

Returns

ChartBuilder