Libraries.Interface.Controls.Charts.TwoVariableChart Documentation

The TwoVariableChart class is Chart object that inherits from Control and like other UI elements it is added to the Game class. TwoVariableChart is a parent to the LineChart and the ScatterPlot class and is not directly used itself.

Example Code

use Libraries.Interface.Controls.Charts
use Libraries.Interface.Controls.Charts.LineChart
use Libraries.Game.Game

class Main is Game
    action Main
        StartGame()
    end

    action CreateGame
        LineChart chart
        Add(chart)
    end
end

Inherits from: Libraries.Interface.Controls.Charts.Chart, Libraries.Interface.Controls.Control, Libraries.Interface.Item, Libraries.Interface.Controls.Charts.ChartItem, Libraries.Interface.Item2D, Libraries.Language.Object

Actions Documentation

Activate()

This action returns a default behavior for this paricular control. Some controls do nothing by default, like a TextBox that responds to different kinds of input. Others, however, have default behaviors, like a Button or a MenuItem. If there is no default behavior, this action returns undefined.

Activate(Libraries.Interface.Events.BehaviorEvent event)

Returns true if rendering the focus event.

Parameters

Add(integer index, Libraries.Interface.Item2D newItem)

This action adds a different Item2D into this one, storing the added Item2D at a specific index in the internal array.

Parameters

Example

use Libraries.Interface.Item2D

Item2D parentItem
Item2D child
parentItem:Add(0, child)

Add(Libraries.Interface.Item2D newItem)

This action adds a different Item2D into this one. This makes a few things happen. 1. The added item will get this item as its parent. 2. The added item's x and y coordinates will become relative to this Item. 3. Most actions on this Item will also affect the added Item.

Parameters

Example

use Libraries.Interface.Item2D

Item2D parentItem
Item2D child
parentItem:Add(child)

AddBehavior(Libraries.Interface.Behaviors.Behavior behavior)

This action adds a new Behavior to this Item.

Parameters

AddChartAreaInstructions(text description)

This action generates the instruction text for the Chart Area description.

Parameters

  • text description: The base portion of the description that will appear before the instructions

AddChartItemInstructions(Libraries.Interface.Item chartItem, text description)

This action generates the instruction text for a chart item description.

Parameters

  • Libraries.Interface.Item: The chart item that will have the instructions
  • text description: The base portion of the description that will appear before the instructions

AddChartLine(Libraries.Interface.Controls.Charts.ChartLine newLine)

Used to create a new ChartLine object for the chart and add it to the lines array.

Parameters

AddControlActivationListener(Libraries.Interface.Events.ControlActivationListener listener)

This action removes an Item2D at a specifed index from the internal array.

Parameters

Example

use Libraries.Interface.Item2D

Item2D parentItem
Item2D child
parentItem:Add(0, child)
parentItem:Remove(0)

AddFocusListener(Libraries.Interface.Events.FocusListener listener)

This action adds a FocusListener to the Item. When the Item receives a FocusEvent due to either gaining or losing the focus, the listener will be notified.

Parameters

Example

use Libraries.Interface.Item
use Libraries.Interface.Events.FocusListener
Item myItem
FocusListener listener
myItem:AddFocusListener(listener)

AddGestureListener(Libraries.Interface.Events.GestureListener listener)

This action adds a GestureListener to the Item. If the Item ever receives a GestureEvent, the listener will be notified.

Parameters

Example

use Libraries.Interface.Item
use Libraries.Interface.Events.GestureListener
Item myItem
GestureListener listener
myItem:AddGestureListener(listener)

AddGroupPanel(Libraries.Interface.Controls.Charts.GroupPanel group)

This action is used by the layout to position the graphical components of the Chart. Layout is handled automatically so users don't need to use this action directly.

Parameters

AddGroupPanelInstructions(Libraries.Interface.Controls.Charts.Graphics.ChartDrawable groupPanel, text description)

This action generates the instruction text for a group panel description.

Parameters

AddLayoutProperties(Libraries.Interface.Layouts.LayoutProperties properties)

Returns true if rendering the mouse down event.

Parameters

AddMouseListener(Libraries.Interface.Events.MouseListener listener)

This action adds a MouseListener to the Item. If the Item ever receives a MouseEvent due to a mouse click, the mouse listener will be notified.

Parameters

Example

use Libraries.Interface.Item
use Libraries.Interface.Events.MouseListener
Item myItem
MouseListener listener
myItem:AddMouseListener(listener)

AddMouseMovementListener(Libraries.Interface.Events.MouseMovementListener listener)

This action adds a MouseMovementListener to the Item. If the Item ever receives a MouseEvent due to mouse movement, the listener will be notified.

Parameters

Example

use Libraries.Interface.Item
use Libraries.Interface.Events.MouseMovementListener
Item myItem
MouseMovementListener listener
myItem:AddMouseMovementListener(listener)

AddMouseWheelListener(Libraries.Interface.Events.MouseWheelListener listener)