API ReferenceSandbox.UI

GraphPanelclass

A navigable plot with two axis controls and a grid. Subclasses draw their data after base.OnDraw. Axis fields report edits to the owner; they never change data or the view.

object→CanvasPanel→GraphPanel
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public class Sandbox.UI.GraphPanel : Sandbox.UI.CanvasPanel

Constructors1

Showing 1 constructors

Methods4

Showing 4 methods

public virtual Vector2 CanvasToAxis(Vector2 point)PUBLICVIRTUAL

Map canvas coordinates to axis units. Override with AxisToCanvas for a linear unit conversion.

ParameterTypeDescription
pointVector2—
Returns:Vector2—

public virtual void OnDraw(Sandbox.Painter painter)PUBLICVIRTUAL

ParameterTypeDescription
painterPainter—
Returns:void—

public virtual void Tick()PUBLICVIRTUAL

Returns:void—

Properties13

Showing 13 properties

protected virtual Vector2 Sandbox.UI.GraphPanel.AxisMinimum { get; set; }PROTECTEDVIRTUALGETSET

Values shown in editable endpoints. Defaults to the visible bounds.

Returns:Vector2—

public bool Sandbox.UI.GraphPanel.EditableAxes { get; set; }PUBLICGETSET

Show editable endpoints in both axis gutters.

Returns:bool—

public Sandbox.UI.GraphAxis Sandbox.UI.GraphPanel.HorizontalAxis { get; set; }PUBLICGETSET

Axis controls own ticks, labels, titles and endpoint editing. GraphPanel supplies their visible ranges.

Returns:GraphAxis—

public string Sandbox.UI.GraphPanel.HorizontalAxisFormat { get; set; }PUBLICGETSET

Fixed numeric format for horizontal ticks and endpoints.

Returns:string—

protected virtual Sandbox.Rect Sandbox.UI.GraphPanel.Plot { get; set; }PROTECTEDVIRTUALGETSET

Plot bounds in local screen pixels. Each axis supplies the gutter space it needs.

Returns:Rect—

public bool Sandbox.UI.GraphPanel.ShowFrame { get; set; }PUBLICGETSET

Draw a frame around all four sides of the plot.

Returns:bool—

public bool Sandbox.UI.GraphPanel.ShowGrid { get; set; }PUBLICGETSET

Draw grid lines at the ticks supplied by the axes.

Returns:bool—

public bool Sandbox.UI.GraphPanel.ShowZeroLines { get; set; }PUBLICGETSET

Emphasize the zero lines inside the plot.

Returns:bool—

public string Sandbox.UI.GraphPanel.VerticalAxisFormat { get; set; }PUBLICGETSET

Fixed numeric format for vertical ticks and endpoints.

Returns:string—

protected virtual Sandbox.Rect Sandbox.UI.GraphPanel.Viewport { get; set; }PROTECTEDVIRTUALGETSET

Returns:Rect—

On this page