![]() |
GearBlocks
The GearBlocks Lua scripting API
|
Provides access to a UI time series graph's properties. More...
Public Member Functions | |
int | CreateTimeSeries (Color32Proxy colour, float lineThickness=1.0f) |
Add a new time series to the graph. | |
void | DestroyAllTimeSeries () |
Destroy all previously created time series, removing them from the graph. | |
void | SetMinMax (float minValue, float maxValue) |
Set the minimum and maximum values used to scale the graph's y axis. After calling this, auto scaling is disabled, and any values outside the range will be clamped. | |
void | ResetMinMax () |
Reset back to zero the minimum and maximum values used to scale the graph's y axis. | |
void | AddDataPoint (int index, float value) |
Add a data point to a currently existing time series. | |
void | ClearData (int index) |
Clear all data points from a currently existing time series. | |
void | SetVisible (int index, bool visible) |
Show / hide a time series. | |
void | ResetAll () |
Clear data from all currently existing time series. | |
Properties | |
float | TimeSpan [get, set] |
The graph's time span. | |
bool | AutoScale [get, set] |
Automatically adjust the graph's y axis minimum and maximum values to fit the data? | |
bool | ShowReferenceLines [get, set] |
Show reference lines on the graph? | |
float | ReferenceLineInterval [get, set] |
The interval between reference lines. | |
float | ReferenceLineThickness [get, set] |
The reference line's thickness. | |
Color32Proxy | ReferenceLineColour [get, set] |
The reference line's colour. | |
Color32Proxy | AxisLineColour [get, set] |
The y = 0 reference line's colour. | |
Provides access to a UI time series graph's properties.
int SmashHammer.UI.ITimeSeriesGraph.CreateTimeSeries | ( | Color32Proxy | colour, |
float | lineThickness = 1.0f |
||
) |
Add a new time series to the graph.
colour | The line colour to be used when plotting the time series. |
lineThickness | The line thickness to be used when plotting the time series. |
Implemented in SmashHammer.UI.TimeSeriesGraph.
void SmashHammer.UI.ITimeSeriesGraph.SetMinMax | ( | float | minValue, |
float | maxValue | ||
) |
Set the minimum and maximum values used to scale the graph's y axis. After calling this, auto scaling is disabled, and any values outside the range will be clamped.
minValue | Minimum y axis value. |
maxValue | Maximum y axis value. |
Also see AutoScale.
Implemented in SmashHammer.UI.TimeSeriesGraph.
void SmashHammer.UI.ITimeSeriesGraph.AddDataPoint | ( | int | index, |
float | value | ||
) |
Add a data point to a currently existing time series.
index | Index of the time series. |
value | Value to add. |
The data point will be time stamped with the current game time when added.
Implemented in SmashHammer.UI.TimeSeriesGraph.
void SmashHammer.UI.ITimeSeriesGraph.ClearData | ( | int | index | ) |
Clear all data points from a currently existing time series.
index | Index of the time series. |
Implemented in SmashHammer.UI.TimeSeriesGraph.
void SmashHammer.UI.ITimeSeriesGraph.SetVisible | ( | int | index, |
bool | visible | ||
) |
Show / hide a time series.
index | Index of the time series. |
Time series that are not visible don't contribute to y-axis auto scaling.
Implemented in SmashHammer.UI.TimeSeriesGraph.
|
getset |
The graph's time span.
The amount of historical time the graph will display, in seconds.
As time advances, any data points older than TimeSpan seconds before the current game time will be automatically deleted.
|
getset |
Automatically adjust the graph's y axis minimum and maximum values to fit the data?
Set to true
to automatically scale the graph; otherwise, false
.
|
getset |
Show reference lines on the graph?
Set to true
to show reference lines for y = 0 and at intervals above / below (depending on ReferenceLineInterval); otherwise, false
.
|
getset |
The interval between reference lines.
The y axis interval between each reference line, set to 0 to only show the reference line at y = 0.
|
getset |
The reference line's thickness.
The line thickness to be used when drawing the reference lines.
|
getset |
The reference line's colour.
The colour to be used when drawing the reference lines.
|
getset |
The y = 0 reference line's colour.
The colour to be used when drawing specifically the y = 0 reference line.