Libraries.Interface.Controls.Charts.ChartOptions Documentation
This class represents the default options any chart will use when displaying information in a chart. These options can be overriden on a per chart basis, but this provides a way to manage defaults across the board.
Example Code
use Libraries.Controls.Charts.ChartOptions
ChartOptions options
Color color = options:GetBarColor()
output "We have obtained the default bar color on the system."
Inherits from: Libraries.Language.Object
Variables Table
Variables | Description |
---|---|
integer PLAYFUL | |
integer PINPOINT_DASHES | |
integer HOLLOW_CIRCLES | |
integer EXCITING | |
integer HOLLOW_BOXES | The distance between the beginning of a pattern "tile" and the next "tile". Measured in pixels. Scales with interface scale. |
integer COLORGORICAL | Patterns |
integer VERTICAL_LINES | Patterns |
integer COLORBLIND | |
integer SOLID_BOXES | |
integer POSITIVE | |
integer DIAGONAL_DOWN_LINES | |
integer SOLID_TRIANGLES | |
integer DEFAULT | Color Palettes |
integer CALM | |
integer SERIOUS | |
integer NEGATIVE | |
integer HORIZONTAL_LINES | |
integer DIAGONAL_CROSSHATCH | |
integer HOLLOW_TRIANGLES | |
integer DIAGONAL_UP_LINES | |
integer TRUSTWORTHY | |
integer PLAIN_CROSSHATCH | |
integer DISTURBING | |
integer SOLID_CIRCLES |
Actions Documentation
Compare(Libraries.Language.Object object)
This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Example
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Example
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
GetBorderColorFromPalette(integer index)
This action returns a border color to complement the palette color at the given index. Currently, this always returns Black, but this can be adjusted in the future to allow palettes to provide fine-tuned border color information.
Parameters
- integer index
Return
GetColorFromPalette(integer index)
Returns a single color from the palette at a given index. If the index reaches beyond the palette size it will return a lighter version of the color at the palette mod index
Parameters
- integer index
Return
GetHashCode()
This action gets the hash code for an object.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
GetPatternColorFromPalette(integer index)
This action returns a pattern color to complement the palette color at the given index. Currently, this always returns Black, but this can be adjusted in the future to allow palettes to provide fine-tuned border color information.
Parameters
- integer index
Return
GetPatternDistanceFromPalette(integer index)
This action returns the distance between the beginning of a pattern "tile" and the beginning of the next "tile". Patterns are rendered as tiled squares that are repeated across the surface of the chart element. This value is measured in pixels, not including any scaling performed by interface scaling. The default value is 12 pixels.
Parameters
- integer index
Return
number: The number of pixels between each tile of any pattern.
GetPatternFromPalette(integer index)
Returns a single integer corresponding to a texture from the palette at a given index. If the index reaches beyond the palette size it will wrap around and repeat textures.
Parameters
- integer index
Return
integer:
GetPatternPalette()
GetPatternThicknessFromPalette(integer index)
This action returns the thickness of the edges of each pattern, measured in pixels. This doesn't include the scaling performed by interface scaling. The default value is 2 pixels.
Parameters
- integer index
Return
number:
GetSelectionColor()
This action obtains the default bar color on the system. It is light Blue by default.
Return
Libraries.Game.Graphics.Color: returns the default bar color, which is light Blue unless changed.
GetTickDigits()
This obtains how many significant digits are used when representing ticks.
Return
integer: the number of significant digits to use for ticks
SetPalette(Libraries.Game.Graphics.Color colorA, Libraries.Game.Graphics.Color colorB, Libraries.Game.Graphics.Color colorC, integer shades)
Parameters
SetPalette(integer choice)
Parameters
- integer choice
SetPalette(Libraries.Game.Graphics.Color colorA, Libraries.Game.Graphics.Color colorB, integer shades)
Parameters
SetPalette(Libraries.Containers.Array<Libraries.Game.Graphics.Color> colorPalette)
Parameters
SetPaletteToGrayScale()
This action uses the weighted RBG grayscale method based on the wavelength GRAYSCALE = 0.299R + 0.587G + 0.114B It changes the current palette to grayscale. There is also a GRAYSCALE palette that uses an interpolated palette.
SetPatternPalette(Libraries.Containers.Array<integer> patternPalette)
Parameters
SetSelectionColor(Libraries.Game.Graphics.Color selectionColor)
This action sets the default selection color for all charts with bars on the system. If a chart is already created, changing this does not necessarily change its defaults, as these are set when graphics are first loaded.
Parameters
SetTickDigits(integer tickDigits)
This changes how many significant digits are used when representing ticks.
Parameters
- integer tickDigits: the new number of digits to use for ticks.
On this page
Variables TableAction Documentation- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- GetBorderColorFromPalette(integer index)
- GetColorFromPalette(integer index)
- GetHashCode()
- GetPatternColorFromPalette(integer index)
- GetPatternDistanceFromPalette(integer index)
- GetPatternFromPalette(integer index)
- GetPatternPalette()
- GetPatternThicknessFromPalette(integer index)
- GetSelectionColor()
- GetTickDigits()
- SetPalette(Libraries.Game.Graphics.Color colorA, Libraries.Game.Graphics.Color colorB, Libraries.Game.Graphics.Color colorC, integer shades)
- SetPalette(integer choice)
- SetPalette(Libraries.Game.Graphics.Color colorA, Libraries.Game.Graphics.Color colorB, integer shades)
- SetPalette(Libraries.Containers.Array
colorPalette) - SetPaletteToGrayScale()
- SetPatternPalette(Libraries.Containers.Array
patternPalette) - SetSelectionColor(Libraries.Game.Graphics.Color selectionColor)
- SetTickDigits(integer tickDigits)