s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News published_with_changesChangesRelease-by-release changelog
Games
Browse Games Discover Games
gamejamsvoting

Game Jam III

Ends Fri 25 Sep
ThemeOne More Round

Voting is open. Play the entries and pick the winner.

£50,000
prizepool
View the jam
Workshop
Playable
sports_esportsGamesStandalone games and gamemodes
Assets
landscapeMaps view_in_arModels textureMaterials apparelClothing
appsEverythingEvery asset type in one list
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
Get s&box
Sign in with Steam
Api
Classes
GraphPanel
chevron_left Classes
class
GraphPanel

Constructors

functionsGraphPanel

Properties

lockAxisColorlockAxisMaximumlockAxisMinimumdata_objectEditableAxesdata_objectHorizontalAxisdata_objectHorizontalAxisFormatlockPlotdata_objectShowFramedata_objectShowGriddata_objectShowZeroLinesdata_objectVerticalAxisdata_objectVerticalAxisFormatlockViewport

Methods

functionsAxisToCanvasfunctionsCanvasToAxisfunctionsOnDrawfunctionsTick
GraphPanel
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.
class Sandbox.UI .account_tree extends CanvasPanel
Sandbox.Engine

build Constructors 1

GraphPanel ()

data_object Properties 13

AxisColor
Color
AxisMaximum
Vector2
AxisMinimum
Vector2
Values shown in editable endpoints. Defaults to the visible bounds.
EditableAxes
bool
Show editable endpoints in both axis gutters.
HorizontalAxis
GraphAxis
Axis controls own ticks, labels, titles and endpoint editing. GraphPanel supplies their visible ranges.
HorizontalAxisFormat
string
Fixed numeric format for horizontal ticks and endpoints.
Plot
Rect
Plot bounds in local screen pixels. Each axis supplies the gutter space it needs.
ShowFrame
bool
Draw a frame around all four sides of the plot.
ShowGrid
bool
Draw grid lines at the ticks supplied by the axes.
ShowZeroLines
bool
Emphasize the zero lines inside the plot.
VerticalAxis
GraphAxis
VerticalAxisFormat
string
Fixed numeric format for vertical ticks and endpoints.
Viewport
Rect

functions Methods 4

AxisToCanvas (point)
Vector2
CanvasToAxis (point)
Vector2
Map canvas coordinates to axis units. Override with AxisToCanvas for a linear unit conversion.
OnDraw (painter)
Tick ()

Inheritance

Panel
CanvasPanel
GraphPanel
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter