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.
Constructors1
Showing 1 constructors
public GraphPanel()
No results match this filter.
Methods4
Showing 4 methods
public virtual Vector2 CanvasToAxis(Vector2 point)
Map canvas coordinates to axis units. Override with AxisToCanvas for a linear unit conversion.
| Parameter | Type | Description |
|---|---|---|
| point | Vector2 | — |
public virtual void OnDraw(Sandbox.Painter painter)
| Parameter | Type | Description |
|---|---|---|
| painter | Painter | — |
void—public virtual void Tick()
void—No results match this filter.
Properties13
Showing 13 properties
protected virtual Color Sandbox.UI.GraphPanel.AxisColor { get; set; }
protected virtual Vector2 Sandbox.UI.GraphPanel.AxisMaximum { get; set; }
protected virtual Vector2 Sandbox.UI.GraphPanel.AxisMinimum { get; set; }
Values shown in editable endpoints. Defaults to the visible bounds.
public bool Sandbox.UI.GraphPanel.EditableAxes { get; set; }
Show editable endpoints in both axis gutters.
bool—public Sandbox.UI.GraphAxis Sandbox.UI.GraphPanel.HorizontalAxis { get; set; }
Axis controls own ticks, labels, titles and endpoint editing. GraphPanel supplies their visible ranges.
public string Sandbox.UI.GraphPanel.HorizontalAxisFormat { get; set; }
Fixed numeric format for horizontal ticks and endpoints.
string—protected virtual Sandbox.Rect Sandbox.UI.GraphPanel.Plot { get; set; }
Plot bounds in local screen pixels. Each axis supplies the gutter space it needs.
public bool Sandbox.UI.GraphPanel.ShowFrame { get; set; }
Draw a frame around all four sides of the plot.
bool—public bool Sandbox.UI.GraphPanel.ShowGrid { get; set; }
Draw grid lines at the ticks supplied by the axes.
bool—public bool Sandbox.UI.GraphPanel.ShowZeroLines { get; set; }
Emphasize the zero lines inside the plot.
bool—public Sandbox.UI.GraphAxis Sandbox.UI.GraphPanel.VerticalAxis { get; set; }
public string Sandbox.UI.GraphPanel.VerticalAxisFormat { get; set; }
Fixed numeric format for vertical ticks and endpoints.
string—protected virtual Sandbox.Rect Sandbox.UI.GraphPanel.Viewport { get; set; }
No results match this filter.