s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
voting
Game Jam III
Ends
Fri 25 Sep
Theme
One More Round
Voting is open. Play the entries and pick the winner.
£
50,000
prizepool
View the jam
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
Get s&box
Sign in with Steam
Api
Classes
GraphPanel
chevron_left
Classes
class
GraphPanel
Constructors
functions
GraphPanel
Properties
lock
AxisColor
lock
AxisMaximum
lock
AxisMinimum
data_object
EditableAxes
data_object
HorizontalAxis
data_object
HorizontalAxisFormat
lock
Plot
data_object
ShowFrame
data_object
ShowGrid
data_object
ShowZeroLines
data_object
VerticalAxis
data_object
VerticalAxisFormat
lock
Viewport
Methods
functions
AxisToCanvas
functions
CanvasToAxis
functions
OnDraw
functions
Tick
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.