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
GraphAxis
chevron_left
Classes
class
GraphAxis
Constructors
functions
GraphAxis
Properties
data_object
EditableBounds
data_object
FontSize
data_object
Label
data_object
LabelFormatter
data_object
LabelRotation
data_object
LabelWidth
data_object
Maximum
data_object
MaximumBound
data_object
Minimum
data_object
MinimumBound
data_object
NumberFormat
data_object
Orientation
data_object
Reversed
data_object
ShowLine
data_object
Thickness
data_object
TickInterval
data_object
TickLength
data_object
Ticks
Methods
functions
Fraction
functions
GetTicks
functions
OnDraw
functions
Tick
GraphAxis
A horizontal or vertical graph axis with numeric or custom ticks, an optional title, rotated tick labels and optional editable endpoints. It does not own the graph's view or data.
class
Sandbox.UI
.
account_tree
extends
Panel
Sandbox.Engine
build
Constructors
1
GraphAxis
(
)
data_object
Properties
18
EditableBounds
bool
Show editable endpoints instead of tick labels at the ends of the axis.
FontSize
float
Tick-label font size in logical pixels.
Label
string
Optional axis title, drawn below a horizontal axis or rotated beside a vertical axis.
LabelFormatter
Func`2
Optional formatter for generated tick labels. Editable endpoints still use NumberFormat.
LabelRotation
float
Clockwise rotation of tick labels in degrees. Negative angles suit month names on a horizontal axis.
LabelWidth
float
Space reserved for each tick label, in logical pixels. Also determines the axis gutter size.
Maximum
Double
MaximumBound
Nullable`1
Minimum
Double
Visible range in axis units.
MinimumBound
Nullable`1
Override the values shown in endpoint fields, independently of the visible range.
NumberFormat
string
Fixed numeric format. For example "0.00" or "$#,0". Never changes with zoom.
Orientation
Axis
Direction along which values increase, before applying Reversed.
Reversed
bool
Reverse the direction of increasing values, for example for an upward vertical axis.
ShowLine
bool
Draw a baseline along the edge of the plot.
Thickness
float
Required gutter size in logical pixels, including rotated labels and the optional title.
TickInterval
Nullable`1
Optional fixed major tick interval in axis units. Null chooses spacing from the visible range.
TickLength
float
Length of major tick marks in logical pixels. Set to zero for grid-only graphs.
Ticks
IReadOnlyList`1
Explicit tick positions and labels. Null generates numeric ticks automatically.
functions
Methods
4
Fraction
(
value
)
float
Map an axis value to its fraction along the axis, including reversal.
GetTicks
(
length
)
IEnumerable`1
Generate the ticks shared by the axis labels and the graph's grid. Length is in logical pixels.
OnDraw
(
painter
)
Tick
(
)
Inheritance
Panel
GraphAxis
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.