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 PLAYFUL
integer SERIOUS
integer DISTURBING
integer POSITIVE
integer NEGATIVE
integer DEFAULT
integer EXCITING
integer CALM
integer COLORGORICAL
integer TRUSTWORTHY
integer COLORBLIND

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()

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.

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.