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

VariablesDescription
integer PLAIN_CROSSHATCH
integer EXCITING
integer CALM
integer DIAGONAL_DOWN_LINES
integer DEFAULTColor Palettes
integer NEGATIVE
integer PINPOINT_DASHES
integer COLORGORICALPatterns
integer POSITIVE
integer VERTICAL_LINESPatterns
integer COLORBLIND
integer SERIOUS
integer DIAGONAL_CROSSHATCH
integer PLAYFUL
integer TRUSTWORTHY
integer HOLLOW_TRIANGLES
integer HORIZONTAL_LINES
integer DIAGONAL_UP_LINES
integer SOLID_BOXES
integer HOLLOW_BOXESThe distance between the beginning of a pattern "tile" and the next "tile". Measured in pixels. Scales with interface scale.
integer DISTURBING
integer SOLID_TRIANGLES
integer HOLLOW_CIRCLES
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

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

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

Libraries.Game.Graphics.Color:

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

Libraries.Game.Graphics.Color:

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

Libraries.Game.Graphics.Color:

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)

SetPalette(integer choice)

Parameters

  • integer choice

SetPalette(Libraries.Game.Graphics.Color colorA, Libraries.Game.Graphics.Color colorB, integer shades)

SetPalette(Libraries.Containers.Array<Libraries.Game.Graphics.Color> colorPalette)

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)

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.