Libraries.Interface.Controls.Charts.BoxPlot Documentation
The BoxPlot class is Chart object that inherits from Control and like other UI elements it is added to the Game class. The Box Plot is used as an indication of how the values in the data are spread out. Box Plots can also be used to compare datasets for more than one group. The title label, axis labels, and scales can be modified. Any number of plots can be added.
Example Code
use Libraries.Compute.Statistics.DataFrame
use Libraries.Compute.Statistics.Charts.BoxPlotCreator
use Libraries.Interface.Controls.Charts.BoxPlot
use Libraries.Game.Game
class Main is Game
action Main
StartGame()
end
action CreateGame
DataFrame frame
frame:Load("Data/Data.csv")
BoxPlotCreator creator
creator:AddColumn(2)
BoxPlot chart = cast(BoxPlot,frame:CreateChart(creator))
chart:SetPercentageWidth(1)
chart:SetPercentageHeight(1)
chart:SetTitle("Sample Title")
chart:SetXAxisTitle("X-axis Variable")
chart:SetYAxisTitle("Y-axis Variable")
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)
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
- integer index
- Libraries.Interface.Item2D
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)
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
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
- Libraries.Interface.Controls.Charts.Graphics.ChartDrawable: The group panel that will have the instructions
- text description: The base portion of the description that will appear before the instructions
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)
This action adds a MouseWheelListener to the Item. If the Item ever receives a MouseEvent due to the mouse wheel being scrolled, the listene