Chart

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

This class represents a generic chart on the system. By default, charts present visual information to the user and also present themselves as accessible controls to the operating system. This includes a selection, called ChartSelection, that can be queried for information that is relevant to particular kinds of charts. For example, a bar chart might have labels, axis, and bars. Each of these can be navigated up and down to go between parents, with the top-most level being a summary and any ChartItems underneath being representations of the underlying structure of the chart. To put this in perspective, consider that a bar chart might allow one to navigate to a level of a chart that contains the axis, bars, and labels. On the bars, if one presses the down arrow, this now allows the user to navigate between the bars for information and this changes the default selection, which informs the operating system of the change. The broad purpose of this architecture is that it allows the chart to have an overall structure that is different from the graphical structure, allowing the chart itself to set reasonable defaults for how to navigate the control with the keyboard

Example Code

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart

class Main is Game
    action Main
        StartGame()
    end

    action CreateGame
        BarChart chart
        Add(chart)
    end
end

Actions

AddChartAreaInstructions(text description)

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

Parameters

  • description text: 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

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

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

AddSeries(Libraries.Interface.Controls.Charts.Series series)

This action adds to the list of Series.

Parameters

AddSubChartAreaInstructions(Libraries.Interface.Controls.Charts.ChartAreaPanel subChartArea, text description)

This action generates the instruction text for a sub chart area description.

Parameters

AdjustForLegend()

This action adjusts the chart for the legend.

AdjustForXAxis()

This action adjusts for the x-axis.

AdjustForYAxis()

This action adjusts for the y-axis.

ApplySelectionBoxAroundItem(Libraries.Interface.Controls.Charts.ChartItem item, number padding)

Unlike many kinds of user interface controls, there is no universal way of interacting with a chart and, as such, this may be defined by any chart to be custom. As such, charts must be able to take messages suggesting an item in the chart has either lost or gained the focus. Broadly speaking, this is done automatically and while charts need to implement this action, they do not need to call this action directly. This action will control the LostSelection for ChartItems shared amoung all charts. Any ChartItems specific to one type of chart (i.e. lines for LineCharts) will have an addition LostSelection action defined in the inherited class.

Parameters

ApplySelectionBoxAroundItem(Libraries.Interface.Controls.Charts.ChartItem item, number topPadding, number rightPadding, number bottomPadding, number leftPadding)

This action sets the legend label font size.

Parameters

CheckPlatformInstructions()

This action is used to check the current platform and adjust the command instructions to use gestures rather than keys

Example

use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.BarChart

DataFrame frame
frame:Load("Data.csv")
frame:AddSelectedColumn(1)
BarChart chart = frame:BarChart()
chart:CheckPlatformInstructions

ConvertToScalableVectorGraphics(boolean hasAccessibility)

This action converts this chart to a text value that contains information for a scalable vector graphics file. This is useful for saving charts to disk. Each sub-class of chart must implement this action separately.

Parameters

  • hasAccessibility boolean: flag to tell the ChartWriter if it should include accessibility elements and tags.

Returns

text: the Scalable Vector Graphics (SVG) text.

ConvertToScalableVectorGraphics()

This action converts this chart to a text value that contains information for a scalable vector graphics file. This is useful for saving charts to disk. Each sub-class of chart must implement this action separately.

Returns

text: the Scalable Vector Graphics (SVG) text.

Display(boolean exit)

This action creates a default Game object for displaying charts and sets this chart as the sole display. It is useful for interacting with charts without creating a complex game setup. The exit flag tells the system, if true, to close the pre-built display right after completing layout, which can be useful for writing to disk.

Parameters

  • exit boolean

Display(integer width, integer height)

This action creates a default Game object for displaying charts and sets this chart as the sole display. It is useful for interacting with charts without creating a complex game setup.

Parameters

  • width integer
  • height integer

Display()

This action creates a default Game object for displaying charts and sets this chart as the sole display. It is useful for interacting with charts without creating a complex game setup.

Display(integer width, integer height, boolean exit)

This action creates a default Game object for displaying charts and sets this chart as the sole display. It is useful for interacting with charts without creating a complex game setup. The exit flag tells the system, if true, to close the pre-built display right after completing layout, which can be useful for writing to disk.

Parameters

  • width integer
  • height integer
  • exit boolean

FlipOrientation()

If not already changed, this action will flip the axis at the current state.

Example

//Would result in the y-axis having the title "My X title" and the x-axis having the title "My Y title"
chart:SetXAxisTitle("My X title")
chart:SetYAxisTitle("My Y title")
chart:FlipOrientation() // Flipping after setting titles
    
//Would result in the y-axis having the title "My Y title" and the x-axis having the title "My X title"
chart:FlipOrientation() // Flipping before setting titles
chart:SetXAxisTitle("My X title")
chart:SetYAxisTitle("My Y title")

GenerateSummary()

Returns

text

GetBackground()

This action gets the Drawable in the background of the chart.

Returns

Libraries.Game.Graphics.Drawable: the chart background Drawable.

GetChartArea()

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.

Returns

Libraries.Interface.Controls.Charts.ChartAreaPanel

GetChartAreaHeightPercent()

This action gets the chart area height percent of the whole chart height.

Returns

number

GetChartAreaWidthPercent()

This action gets the chart area width percent of the whole chart width.

Returns

number

GetChartItemText()

This action gets text for a chart item.

Returns

text: the chart item text.

GetChartItemsText()

This action gets text for a chart items.

Returns

text: the chart items text.

GetColorPalette()

This action returns the current color palette.

Returns

Libraries.Interface.Controls.Charts.ColorPalettes.ColorPalette: ColorPalette object in use

GetContainer()

This action get the current chart object.

Returns

Libraries.Interface.Controls.Charts.Chart: the chart object.

GetCornerRadius()

This action gets the current arrow's flag for direction.

Returns

number: the current arrow's flag for direction.

GetCurrentArrowSize()

This action gets the current size of the selection arrow.

Returns

integer: the current size of the selection arrow.

GetCurrentSideArrow()

This action gets the current arrow's flag for direction.

Returns

boolean: the current arrow's flag for direction.

GetEnterInstruction()

This action gets the instruction text for an enter description.

Returns

text: The description for enter.

GetExitInstruction()

This action gets the instruction text for an exit description.

Returns

text: The description for exit.

GetFactorList()

Returns an array of the factor/group names

Returns

Libraries.Containers.Array<text>: Array an array of factors/groups in the chart.

GetGeneralInstruction()

This action gets the instruction text for a general chart description.

Returns

text: The description for a general chart.

GetGroupPanels()

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.

Returns

Libraries.Containers.Array<Libraries.Interface.Controls.Charts.GroupPanel>

GetGroupText()

This action gets text for a group.

Returns

text: the group text.

GetGroupsText()

This action gets text for groups.

Returns

text: the groups text.

GetHorizontalFlag()

This action returns whether the chart is in the horizontal position.

Returns

boolean

GetHorizontalPanel()

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.

Returns

Libraries.Interface.Controls.Charts.HorizontalAxisPanel

GetHorizontalPanelHeightPercent()

This action gets the horizontal panel height percent of the whole chart height.

Returns

number

GetHorizontalPanelWidthPercent()

This action gets the horizontal panel width percent of the whole chart width.

Returns

number

GetLegend()

This action returns the current legend, if one exists

Returns

Libraries.Interface.Controls.Charts.Legend: the Legend on the chart.

GetLegendIconBorderThickness()

This action returns the thickness of the borders drawn around the icons in the Legend, measured in pixels. If this chart doesn't have a legend, this value isn't used. By default, this value is 1.

Returns

number

GetLegendPanel()

This action sets the current size of the selection arrow.

Returns

Libraries.Interface.Controls.Control

GetLegendTitle()

Returns the title for the legend of the Chart.

Returns

text

GetListOrderInstruction()

This action gets the instruction text for a list order description.

Returns

text: The description for list order.

GetNumberOfChartAreas()

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.

Returns

integer

GetPatternPalette()

This obtains how many significant digits are used when representing ticks.

Returns

Libraries.Interface.Controls.Charts.PatternPalette: the number of significant digits to use for ticks

GetPointBorderThickness()

This action returns the thickness of the borders drawn around points in the chart, measured in pixels. This is only applied to points, not other chart elements like bars. If this chart isn't drawing any points, this value isn't used. By default, this value is 0.

Returns

number

GetRegressionLineColor()

This action gets the regression line color.

Returns

Libraries.Game.Graphics.Color: the color value of the regression line.

GetRegressionLineDensity()

This action gets the regression line density represented by an integer value.

Returns

integer: the density value of the regression line.

GetRotationOverride()

This action is used to check whether the x-axis label rotation has been overridden.

Returns

boolean: true if the x-axis labels are rotated.

GetScriptFilepath()

This action gets the script file path.

Returns

text: the script file path.

GetSelection()

This action gets the ChartSelection, which contains the ChartItem that is currently selected. The reason why we use this indirection, instead of getting the items directly, is because this ensures the operating system is informed whenever selections are changed. The item can be obtained from this selection by calling GetChartItem on the selection. The selection is intended to never be undefined, even if nothing is selected.

Returns

Libraries.Interface.Selections.ChartSelection: the current selection

GetSelectionArrow()

This action gets chart drawables selection arrow drawable object.

Returns

Libraries.Game.Graphics.Drawable: the charts slection arrow object.

GetSelectionBoxBorderThickness()

This action gets the current size of the selection arrow.

Returns

number: the current size of the selection arrow.

GetSelectionBracket()

This action gets the selection bracket (Array).

Returns

Libraries.Containers.Array<Libraries.Game.Graphics.Drawable>: the Array of the selection bracket.

GetSeriesList()

This action get the list of Series from the chart.

Returns

Libraries.Containers.Array<Libraries.Interface.Controls.Charts.Series>: the array.

GetSeriesText()

This action gets text for a series.

Returns

text: the series text.

GetStyleFilepath()

This action gets the style file path.

Returns

text: the style file path.

GetSubChartAreas()

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.

Returns

Libraries.Containers.Array<Libraries.Interface.Controls.Charts.ChartAreaPanel>

GetSubHorizontalPanels()

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.

Returns

Libraries.Containers.Array<Libraries.Interface.Controls.Charts.HorizontalAxisPanel>

GetSubVerticalPanels()

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.

Returns

Libraries.Containers.Array<Libraries.Interface.Controls.Charts.VerticalAxisPanel>

GetSubtitle()

This action get the current subtitle for the chart.

Returns

text: the subtitle of the chart

GetSubtitleAreaHeightPercent()

This action gets the subtitle area height in percent (between 0 and 1). This is handled automatically so users don't need to use this action directly.

Returns

number: percent of screen height alloted for the title

GetSubtitleLabel()

This action gets the Label object for the chart subtitle.

Returns

Libraries.Interface.Controls.Charts.ChartLabel

GetTickDigits()

This changes how many significant digits are used when representing ticks.

Returns

integer

GetTitle()

This action gets the title of the chart

Returns

text: the title of the chart

GetTitleAreaHeightPercent()

Gets the title area height percent. This is handled automatically so users don't need to use this action directly.

Returns

number: percent of screen height alloted for the title

GetTitleLabel()

This action returns the Label for the chart title.

Returns

Libraries.Interface.Controls.Charts.ChartLabel: the chart title label

GetTouchExplorationEnabled()

This action gets the flag to determine if touch exploration is enabled.

Returns

boolean: The flag for touch exploration.

GetValueOrderInstruction()

This action gets the instruction text for a value order description.

Returns

text: The description for value order.

GetVerticalFlag()

This action returns whether the chart is in the vertical position.

Returns

boolean

GetVerticalPanel()

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.

Returns

Libraries.Interface.Controls.Charts.VerticalAxisPanel

GetVerticalPanelHeightPercent()

This action gets the vertical panel height percent of the whole chart height.

Returns

number

GetVerticalPanelWidthPercent()

This action gets the vertical panel width percent of the whole chart width.

Returns

number

GetXAxisMaximum()

This action gets the number of the maximum value on the X axis. Atrribute: Returns the number value of the maximum on the x axis.

Returns

number

GetXAxisMinimum()

This action gets the number of the minimum value on the X axis. Atrribute: Returns the number value of the minumum on the x axis.

Returns

number

GetXAxisTitle()

This action gets the title for the X-Axis of the Chart.

Returns

text: the x-axis title.

GetXAxisUsePercent()

This action gets whether the X axis uses percent values or not. Atrribute: Returns the boolean value of percent being used on the x axis.

Returns

boolean

GetXLabels()

This action is used to get the X-axis labels.

Returns

Libraries.Containers.Array<Libraries.Interface.Controls.Charts.ChartLabel>: the array of ChartLabel's displayed on the X-axis.

GetXLabelsRotation()

This action is used to get the number of degrees the X-axis labels are rotated.

Returns

integer: the degrees the labels are rotated.

GetYAxisMaximum()

This action gets the number of the maximum value on the Y axis. Atrribute: Returns the number value of the maximum on the y axis.

Returns

number

GetYAxisMinimum()

This action gets the number of the minimum value on the Y axis. Atrribute: Returns the number value of the minimum on the y axis.

Returns

number

GetYAxisTitle()

Returns the title for the Y-Axis of the Chart.

Returns

text: the y-axis title.

GetYAxisUsePercent()

This action gets whether the y axis values are using percent format. Atrribute: Returns true if the y axis is in percent.

Returns

boolean

GetYLabels()

This action is used to get the list of Y-axis labels from the Y-axis component.

Returns

Libraries.Containers.Array<Libraries.Interface.Controls.Charts.ChartLabel>: the array containing all of the labels on the Y-axis.

HasAccessibility()

This action checks if the chart has accessibility information included.

Returns

boolean: true if the accessibility information include in the chart.

HasGroups()

This action returns true if the chart has groups.

Returns

boolean

HasMovableRegressionLine()

This action returns true if this chart includes a movable regression line, or false otherwise.

Returns

boolean: True if this chart has a movable regression line, or false otherwise.

HideAllGridLines()

This action hides all major and minor grid lines on the x-axis and y-axis.

HideAllTicks()

This action hides the ticks on the X and Y axis.

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:HideAllTicks()
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

HideAllXGridLines()

This action hides all major and minor grid lines on the x-axis.

HideAllYGridLines()

This action hides all major and minor grid lines on the y-axis.

HideMajorGridLines()

This action hides all major grid lines on the x-axis and y-axis.

HideMajorXGridLines()

This action hides all major grid lines on the x-axis.

HideMajorYGridLines()

This action hides all major grid lines on the y-axis.

HideMinorGridLines()

This action hides all minor grid lines on the x-axis and y-axis.

HideMinorXGridLines()

This action hides all minor grid lines on the x-axis.

HideMinorYGridLines()

This action hides all minor grid lines on the y-axis.

IsAccessibleParent()

Returns

boolean

IsLockingRegressionYIntercepts()

This action returns true if the y-intercepts of the regression lines are locked, or false otherwise.

Returns

boolean: True if the y-intercepts of the regression lines are locked, or false otherwise.

IsSeparated()

This action returns true if the chart is separated by factor or series.

Returns

boolean

IsSeparatedByFactor()

This action returns true if the chart is separated by factor.

Returns

boolean

IsSeparatedBySeries()

This action returns true if the chart is separated by series.

Returns

boolean

IsShowingLegend()

This action checks if the legend is shown.

Returns

boolean: true if the legend is shown.

IsShowingLinearRegression()

This action checks if the linear regression line is visible on the chart.

Returns

boolean: True if the linear regression line is shown.

IsShowingMajorXGridLines()

This action checks if the major grid lines on the x-axis are shown.

Returns

boolean

IsShowingMajorYGridLines()

This action checks if the major grid lines on the y-axis are shown.

Returns

boolean

IsShowingMinorXGridLines()

This action checks if the minor grid lines on the x-axis are shown.

Returns

boolean

IsShowingMinorYGridLines()

This action checks if the minor grid lines on the y-axis are shown.

Returns

boolean

IsShowingPatterns()

Returns

boolean

IsShowingSubChartAreaTitles()

This action checks if the titles are visible.

Returns

boolean: true if the sub chart titles are showing

IsShowingSubtitle()

This action checks if the subtitle is visible.

Returns

boolean: true if the chart subtitle is showing

IsShowingTitle()

This action checks if the title is visible.

Returns

boolean: true if the chart title is showing

IsShowingXAxis()

This action checks if the x-axis to visible (true) or hidden (false).

Returns

boolean: True if the x-axis is shown.

IsShowingXAxisTitle()

This action checks if the title is visible.

Returns

boolean: true if the x-axis title is showing

IsShowingYAxis()

This action checks if the Y-axis to visible (true) or hidden (false).

Returns

boolean: True if the Y-axis is shown.

IsShowingYAxisLine()

This action toggles the alpha value of the selection color between 0 and 1.

Returns

boolean

IsShowingYAxisTitle()

This action checks if the title is visible.

Returns

boolean: true if the y-axis title is showing

LoadGraphics(Libraries.Interface.Layouts.LayoutProperties properties)

LoadGraphics This action is used to load the graphical components of the Control. This is handled automatically by the Game engine as needed, and most users shouldn't need to use this action directly.

Parameters

LoadSelectionGraphics()

initially hidden and resized when new focus is found, arbitrary 3 rectangles

LockRegressionYIntercept(number intercept)

This action locks the y-intercepts of regression lines to the given value (most commonly 0).

Parameters

  • intercept number: The new y-intercept value that all regression lines in the chart must pass through.

Example

use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.ScatterPlot

DataFrame frame
frame:Load("Data/ChartTestData.csv")
frame:AddSelectedColumns("Column1")
frame:AddSelectedColumns("Column2")
frame:AddSelectedFactors("Factor1")

ScatterPlot chart = frame:ScatterPlot()
chart:SetTitle("ScatterPlot Feature Example")
chart:SetSubtitle("Two Columns - One Factor")
chart:ShowLinearRegression(true)
chart:ShowSquaresOfResiduals(true)
chart:ShowMovableRegressionLine(true)
chart:SetResidualSquareThickness(2)
chart:LockRegressionYIntercept(0)
chart:Display(1200, 1200)

LostSelection()

This action sets the y-axis title font size.

LostSelection(Libraries.Interface.Controls.Charts.ChartItem item)

Unlike many kinds of user interface controls, there is no universal way of interacting with a chart and, as such, this may be defined by any chart to be custom. As such, charts must be able to take messages suggesting an item in the chart has either lost or gained the focus. Broadly speaking, this is done automatically and while charts need to implement this action, they do not need to call this action directly. This action will control the LostSelection for ChartItems shared amoung all charts. Any ChartItems specific to one type of chart (i.e. lines for LineCharts) will have an addition LostSelection action defined in the inherited class.

Parameters

NeedsTreeUpdate()

This action indicates whether the system needs its graphics updated.

Returns

boolean: whether or not an update is required

OnSelectionChange(Libraries.Interface.Controls.Charts.ChartItem item)

Unlike many kinds of user interface controls, there is no universal way of interacting with a chart and, as such, this may be defined by any chart to be custom. As such, charts must be able to take messages suggesting an item in the chart has either lost or gained the focus. Broadly speaking, this is done automatically and while charts need to implement this action, they do not need to call this action directly. This action will control the GainedSelection for ChartItems shared amoung all charts. Any ChartItems specific to one type of chart (i.e. lines for LineCharts) will have an addition GainedSelection action defined in the inherited class.

Parameters

OrientationChanged()

This action returns the value of a flag for tracking whether the orientation has changed.

Returns

boolean

OverrideXLabelsWithText(Libraries.Containers.Array<text> labels)

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

OverrideYLabelsWithText(Libraries.Containers.Array<text> labels)

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

RemoveSelectionVisual()

Unlike many kinds of user interface controls, there is no universal way of interacting with a chart and, as such, this may be defined by any chart to be custom. As such, charts must be able to take messages suggesting an item in the chart has either lost or gained the focus. Broadly speaking, this is done automatically and while charts need to implement this action, they do not need to call this action directly. This action will control the GainedSelection for ChartItems shared amoung all charts. Any ChartItems specific to one type of chart (i.e. lines for LineCharts) will have an addition GainedSelection action defined in the inherited class.

Resize()

This action resizes the chart.

RotateXLabels(integer degrees)

This action is used to rotate the X-axis labels by a number of degrees.

Parameters

  • degrees integer: between 0 and 360.

Save(text path)

This is a helper action for saving that saves at the path relative to the current working directory.

Parameters

  • path text: the path relative to the working directory.

Save(Libraries.System.File file)

This action saves this chart to disk at the position of the current file. To conduct the conversion, the file extension is used. Only Scalable Vector Graphics (SVG) is currently supported.

Parameters

Select(Libraries.Interface.Controls.Charts.ChartItem item)

This action sets the ChartItem that is currently selected. This call has the same effect as calling GetSelection, then Set(ChartItem) on the selection.

Parameters

SelectionDown()

This action moves the selection down within the chart.

SelectionEnter()

This action moves the selection to enter the current grouping or panel.

SelectionEscape()

This action moves the selection to the "escape" item, typically moving upwards to the containing group or panel.

SelectionLeft()

This action moves the selection to the left within the chart.

SelectionNextFocus()

This action moves the selection to the "next" focus item, typically moving upwards to the containing group or panel.

SelectionPreviousFocus()

This action moves the selection to the "previous" focus item, typically moving upwards to the containing group or panel.

SelectionRight()

This action moves the selection to the right within the chart.

SelectionUp()

This action moves the selection up within the chart.

SeparateByFactor()

SeparateByFactor will attempt to create faceted sub chart area panels. Each factor/group (independent variable) will get it's own panel. Each sub area will contain all elements associated with that factor and requests a single column.

SeparateByFactor(boolean flag)

SeparateByFactor will attempt to create faceted sub chart area panels. Each factor/group (independent variable) will get it's own panel. Each sub area will contain all elements associated with that factor.

Parameters

  • flag boolean

SeparateByFactor(integer requestedColumns)

SeparateByFactor will attempt to create faceted sub chart area panels. Each factor/group (independent variable) will get it's own panel. Each sub area will contain all elements associated with that factor and requests some number of columns.

Parameters

  • requestedColumns integer: the number of requested columns to arrange each chart.

SeparateBySeries()

SeparateBySeries will attempt to create faceted sub-chart area panels. Each series entry in the legend will get its own chart area. Each sub-area will contain all elements associated with that series. This creates a single column of sub-chart area panels.

SeparateBySeries(integer requestedColumns)

SeparateBySeries will attempt to create faceted sub-chart area panels. Each series entry in the legend will get its own chart area. Each sub-area will contain all elements associated with that series. This creates a specified number of columns of sub-chart area panels.

Parameters

  • requestedColumns integer: the number of columns requested to display the sub-charts.

SeparateBySeries(boolean flag)

SeparateBySeries will attempt to create faceted sub-chart area panels. Each series entry in the legend will get its own chart area. Each sub-area will contain all elements associated with that series.

Parameters

  • flag boolean

SetAccessibilityFlag(boolean hasAccessibility)

This action sets a flag to know if all of the accessibility information should be included. This may be used to reduce the size of the image in cases where it will be used as a flat image such as in a PDF.

Parameters

  • hasAccessibility boolean: flag to tell the ChartWriter if it should include accessibility elements and tags.

SetBackground(Libraries.Game.Graphics.Drawable background)

This action sets the Drawable in the background of the chart.

Parameters

SetColorPalette(Libraries.Game.Graphics.Color colorA, Libraries.Game.Graphics.Color colorB, Libraries.Game.Graphics.Color colorC)

This action sets a custom color palette with three colors.

Parameters

SetColorPalette(Libraries.Interface.Controls.Charts.ColorPalettes.ColorPalette colorPalette)

This action sets the current color palette.

Parameters

SetColorPalette(Libraries.Game.Graphics.Color color)

This action sets a custom color palette with one color.

Parameters

SetColorPalette(Libraries.Game.Graphics.Color colorA, Libraries.Game.Graphics.Color colorB)

This action sets a custom color palette with two colors.

Parameters

SetColorPalette(Libraries.Containers.Array<Libraries.Game.Graphics.Color> palette)

This action sets a custom color palette.

Parameters

SetColorPaletteToCalm()

This action sets the color palette to a collection of calm colors.

SetColorPaletteToColorgorical()

This action sets the color palette to a collection of colorgorical colors.

SetColorPaletteToCoolScale()

This action sets the color palette to a collection of cool scaled colors. Created by Stefan van der Walt (https://github.com/stefanv) and Nathaniel Smith (https://github.com/njsmith) https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html

SetColorPaletteToDisturbing()

This action sets the color palette to a collection of disturbing colors.

SetColorPaletteToExciting()

This action sets the color palette to a collection of exciting colors.

SetColorPaletteToMagma()

This action sets the color palette to a collection of magma colors.

SetColorPaletteToNegative()

This action sets color palette to a collection of negative colors.

SetColorPaletteToPlayful()

This action sets the color palette to a collection of playful colors.

SetColorPaletteToPositive()

This action sets the color palette to a collection of positive colors.

SetColorPaletteToSerious()

This action sets the color palette to a collection of serious colors.

SetColorPaletteToTrustworthy()

This action sets the color palette to a collection of trustworthy colors.

SetColorPaletteToWarmScale()

This action sets the color palette to a collection of warm scaled colors.

SetContainer(Libraries.Interface.Controls.Charts.Chart container)

This action sets the current chart object.

Parameters

SetCornerRadius(number cornerRadius)

This action sets the current arrow's flag for direction.

Parameters

  • cornerRadius number

SetCurrentArrowSize(integer currentArrowSize)

This action sets the current size of the selection arrow.

Parameters

  • currentArrowSize integer: The current size of the selection arrow.

SetCurrentPaletteToGrayScale()

This action sets the color palette to a collection of grey colors.

SetCurrentSideArrow(boolean currentSideArrow)

This action sets the current arrow's flag for direction.

Parameters

  • currentSideArrow boolean: The current arrow's flag for direction.

SetEnterInstruction(text enterInstruction)

This action sets the instruction text for an enter description.

Parameters

  • enterInstruction text: The description for enter.

SetExitInstruction(text exitInstruction)

This action sets the instruction text for an exit description.

Parameters

  • exitInstruction text: The description for exit.

SetFactorList(Libraries.Containers.Array<text> factorList)

This action sets the list of factor or group names.

Parameters

SetFontSize(integer size)

This action sets the overall font size.

Parameters

  • size integer: of the overall font.

SetGeneralInstruction(text generalInstruction)

This action sets the instruction text for a general description.

Parameters

  • generalInstruction text

SetHighlightColor(Libraries.Game.Graphics.Color color)

Sets the default selection color (highlighting) the chart items

Parameters

SetLegend(Libraries.Interface.Controls.Charts.Legend legend)

This action sets the Legend object

Parameters

SetLegendIconBorderThickness(number thickness)

This action sets the thickness of the borders drawn around the icons in the Legend, measured in pixels. If this chart doesn't have a legend, this value isn't used. By default, this value is 1.

Parameters

  • thickness number

Example

use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Interface.Controls.Charts.Chart

DataFrame frame
frame:Load("ChartTestData.csv")
frame:AddSelectedColumns("Column1")
frame:AddSelectedColumns("Column2")
frame:AddSelectedColumns("Column3")
frame:AddSelectedFactors("Factor1")

BarChart chart = frame:BarChart()
chart:SetTitle("BarChart Test")
chart:SetSubtitle("Three Columns - One Factor")
chart:SetLegendIconBorderThickness(3)
chart:ShowAnnotations(true)

chart:Display()

SetLegendLabelFontSize(integer size)

This action sets the legend label font size.

Parameters

  • size integer: of the legend label font.

SetLegendLocationToBottom()

Sets the legend to show beneath the chart area.

SetLegendLocationToLeft()

Sets the legend to show left of the chart area.

SetLegendLocationToRight()

Sets the legend to show right of the chart area.

SetLegendLocationToTop()

Sets the legend to show on top of the chart area.

SetLegendTitle(text name)

Set the title for the legend of the Chart

Parameters

  • name text: the title of the legend.

SetLegendTitleFontSize(integer size)

This action sets the legend title font size.

Parameters

  • size integer: of the legend title font.

SetListOrderInstruction(text listOrderInstruction)

This action sets the instruction text for a list order description.

Parameters

  • listOrderInstruction text: The description for list order.

SetMinorXGridlineCount(integer count)

This action sets the number of minor X-axis gridlines. Note, that major gridlines are drawn to match the number and location of axis ticks. Minor gridlines default to 5 intervals between major gridlines. The minor gridline interval count can be manually changed. No option to customize density or color at this time.

Parameters

  • count integer: amount of minor gridlines on the X-axis.

SetMinorYGridlineCount(integer count)

This action sets the number of minor Y-axis gridlines. Note, that major gridlines are drawn to match the number and location of axis ticks. Minor gridlines default to 5 intervals between major gridlines. The minor gridline interval count can be manually changed. No option to customize density or color at this time.

Parameters

  • count integer: amount of minor gridlines on the Y-axis.

SetNeedsUpdate(boolean update)

This action tells the system to update all of its graphics because its structure has changed. This might be true if the charts are being used to update a live data source.

Parameters

  • update boolean: whether or not an update is required

SetOrientationToHorizontal()

SetOrientationToHorizontal sets the orientation to horizontal.

SetOrientationToVertical()

SetOrientationToVertical sets the orientation to vertical.

SetPatternPalette(Libraries.Interface.Controls.Charts.PatternPalette patternPalette)

This changes how many significant digits are used when representing ticks.

Parameters

SetPointBorderThickness(number pointBorderThickness)

This action sets the thickness of the borders drawn around points in the chart, measured in pixels. This is only applied to points, not other chart elements like bars. If this chart isn't drawing any points, this value isn't used. By default, this value is 0.

Parameters

  • pointBorderThickness number

SetRegressionLineColor(Libraries.Game.Graphics.Color color)

This action sets the regression line color.

Parameters

SetRegressionLineDensity(integer density)

This action sets the regression line density.

Parameters

  • density integer: the line density represented by an integer value.

SetRotationOverride(boolean flag)

This action is used to set when the x-axis label rotation has been overridden.

Parameters

  • flag boolean: true if the x-axis labels are rotated.

SetScriptFilepath(text scriptFilepath)

This action sets the file path for a script.

Parameters

  • scriptFilepath text: the file path.

SetSelectionBoxBorderThickness(number selectionBoxBorderThickness)

This action gets chart drawables selection arrow drawable object.

Parameters

  • selectionBoxBorderThickness number

SetSeriesList(Libraries.Containers.Array<Libraries.Interface.Controls.Charts.Series> series)

This action sets the list of Series.

Parameters

SetStyleFilepath(text styleFilepath)

This action sets the file path for a style.

Parameters

  • styleFilepath text: the file path.

SetSubtitle(text name)

This action sets the subtitle of the chart.

Parameters

  • name text

SetSubtitleFontSize(integer size)

This action sets the subtitle font size.

Parameters

  • size integer: of the subtitle font.

SetTickDigits(integer tickDigits)

This obtains how many significant digits are used when representing ticks.

Parameters

  • tickDigits integer

SetTitle(text name)

This action sets the title of the chart.

Parameters

  • name text

SetTitleFontSize(integer size)

This action sets the title font size.

Parameters

  • size integer: of the title font.

SetTouchExplorationEnabled(boolean touchExplorationEnabled)

This action sets the flag to determine if touch exploration is enabled.

Parameters

  • touchExplorationEnabled boolean: The flag to determine if touch exploration is enabled.

SetValueOrderInstruction(text valueOrderInstruction)

This action sets the instruction text for a value order description.

Parameters

  • valueOrderInstruction text: The description for value order.

SetXAxisMaximum(number max)

This action sets the X axis maximum value. Atrribute: Parameter max the number for the x axis maximum.

Parameters

  • max number

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:FlipOrientation()
        chart:SetXAxisMaximum(20.5)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetXAxisMinimum(number min)

This action sets the X axis minimum value. Atrribute: Parameter min the number for the x axis minumum.

Parameters

  • min number

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:FlipOrientation()
        chart:SetXAxisMinimum(0.0)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetXAxisNumberFormat(text format)

This action sets the X axis value format, "number" or "integer". Atrribute: Parameter format the text values "number" or "integer are valid.

Parameters

  • format text

SetXAxisPaddedOffsetPercent(number percent)

This action sets the X axis padded offset percent. This allows for adjustments to the offset of the X axis of the chart. Atrribute: Parameter percent a number between 0 and 1.

Parameters

  • percent number

SetXAxisTitle(text name)

This action sets the title for the X-Axis of the Chart.

Parameters

  • name text: the x-axis title.

SetXAxisUsePercent(boolean bool)

This action sets whether the X axis uses percent values or not.

Parameters

  • bool boolean: is true if the values are percents and false if not.

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:FlipOrientation()
        chart:SetXAxisUsePercent(true)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetXLabelFontSize(integer size)

This action sets the x-axis label font size.

Parameters

  • size integer: of the x-axis label font.

SetXLabels(Libraries.Containers.Array<Libraries.Interface.Controls.Charts.ChartLabel> newLabels)

This action is used to Set the list of X-axis labels on the X-axis component.

Parameters

SetXTickCount(integer ticks)

This action set the number of ticks on the X axis. Atrribute: Parameter ticks the number of tick on the x axis.

Parameters

  • ticks integer

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:FlipOrientation()
        chart:SetXTickCount(8)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetXTickInterval(number set)

This action set the number between ticks on the X axis. Atrribute: Parameter set the number between ticks on the x axis.

Parameters

  • set number

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:FlipOrientation()
        chart:SetXTickInterval(10.5)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetXTickInterval(integer set)

This action set the integer distance between ticks on the X axis. Atrribute: Parameter set the integer value between x axis ticks.

Parameters

  • set integer

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:FlipOrientation()
        chart:SetXTickInterval(10)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetXTitleFontSize(integer size)

This action sets the x-axis title font size.

Parameters

  • size integer: of the x-axis title font.

SetYAxisMaximum(number max)

This action sets the Y axis maximum value. Atrribute: Parameter max the number for the y axis maximum.

Parameters

  • max number

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")

        chart:SetYAxisMaximum(0.0)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetYAxisMinimum(number min)

This action sets the Y axis minimum value. Atrribute: Parameter min the number for the y axis minimum.

Parameters

  • min number

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")

        chart:SetYAxisMinimum(0.0)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetYAxisNumberFormat(text format)

This action sets the Y axis value format, "number" or "integer". Atrribute: Parameter format the text values "number" or "integer are valid.

Parameters

  • format text

SetYAxisPaddedOffsetPercent(number percent)

These actions are used to offset the start of the tick placement if the chart has added white space on either side of the chart area.

Parameters

  • percent number

SetYAxisTitle(text name)

This action sets the title for the Y-Axis of the Chart.

Parameters

  • name text: the y-axis title.

SetYAxisUsePercent(boolean bool)

This action sets whether the Y axis uses percent values or not.

Parameters

  • bool boolean: is true if the values are percents and false if not.

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:SetYAxisUsePercent(true)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetYLabelFontSize(integer size)

This action sets the y-axis label font size.

Parameters

  • size integer: of the y-axis label font.

SetYLabels(Libraries.Containers.Array<Libraries.Interface.Controls.Charts.ChartLabel> newLabels)

This action is used to Set the list of Y-axis labels on the Y-axis component.

Parameters

SetYTickCount(integer ticks)

This action set the number of ticks on the y axis. Atrribute: Parameter ticks the number of tick on the y axis.

Parameters

  • ticks integer

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")

        chart:SetYTickCount(8)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetYTickInterval(number set)

This action set the number between ticks on the Y axis. Atrribute: Parameter set the number between ticks on the y axis.

Parameters

  • set number

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:SetYTickInterval(10.5)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetYTickInterval(integer set)

This action set the integer distance between ticks on the Y axis. Atrribute: Parameter set the integer value between y axis ticks.

Parameters

  • set integer

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:SetYTickInterval(10)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

SetYTitleFontSize(integer size)

This action sets the y-axis title font size.

Parameters

  • size integer: of the y-axis title font.

Share(Libraries.System.File file)

This action saves this chart to disk at the position of the current file. To conduct the conversion, the file extension is used. Only Hypertext Markup Language (HTML) is currently supported, and Scalable Vector Graphics (SVG) conversion is used. This makes a file that can be opened in the browser that imports the Javascript and Cascading Stylesheets necessary to navigate the charts accessibly on the web.

Parameters

Share(text path)

This is a helper action for sharing that saves at the path relative to the current working directory.

Parameters

  • path text: the path relative to the working directory.

ShowAllGridLines()

This action shows all major and minor grid lines on the x-axis and y-axis.

ShowAllTicks()

This action shows the ticks on the X and Y axis.

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:ShowAllTicks()
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

ShowAllXGridLines()

This action shows all major and minor grid lines on the x-axis.

ShowAllYGridLines()

This action shows all major and minor grid lines on the y-axis.

ShowAnnotations()

Returns

boolean: True if all annotations for chart drawables are showing.

ShowAnnotations(boolean show)

This action sets whether to show annotations for chart dawables.

Parameters

  • show boolean: The value to set the showAnnotations flag to.

Example

use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.BarChart

DataFrame frame
frame:Load("Dogs.csv")

frame:AddSelectedFactors("Maximum Life Span")

BarChart chart = frame:BarChart()
chart:ShowAnnotations(true)
chart:Display(1500,750)

ShowGroupBrackets(boolean flag)

This action either shows or hides group brackets in the vertical or horizontal panels.

Parameters

  • flag boolean: true will show group brackets.

ShowLegend(boolean show)

This action sets the legend to visible.

Parameters

  • show boolean: true if the legend should be shown.

ShowLinearRegression(boolean show)

This action shows or hides linear regression lines, if possible. Some chart types, such as PieChart, cannot support linear regression lines. Trying to show the regression lines on a chart type that does not support it will output a warning, and otherwise have no effect.

Parameters

  • show boolean: True to show linear regression lines, or false to hide them.

Example

use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.ScatterPlot

DataFrame frame
frame:Load("Data/ChartTestData.csv")
frame:AddSelectedColumns("Column1")
frame:AddSelectedColumns("Column2")
frame:AddSelectedFactors("Factor1")

ScatterPlot chart = frame:ScatterPlot()
chart:SetTitle("ScatterPlot Feature Example")
chart:SetSubtitle("Two Columns - One Factor")
chart:ShowLinearRegression(true)
chart:ShowSquaresOfResiduals(true)
chart:ShowMovableRegressionLine(true)
chart:SetResidualSquareThickness(2)
chart:LockRegressionYIntercept(0)
chart:Display(1200, 1200)

ShowMajorGridLines()

This action shows all major grid lines on the x-axis and y-axis.

ShowMajorXGridLines()

This action shows all major grid lines on the x-axis.

ShowMajorYGridLines()

This action shows all major grid lines on the y-axis.

ShowMinorGridLines()

This action shows all minor grid lines on the x-axis and y-axis.

ShowMinorXGridLines()

This action shows all minor grid lines on the x-axis.

ShowMinorYGridLines()

This action shows all minor grid lines on the y-axis.

ShowMovableRegressionLine(boolean movable)

This action enables or disables movable regression lines for interactive charts. If the regression lines are movable, they can be dragged with the mouse or using the keyboard. This will have no impact on charts that are exported to SVG format.

Parameters

  • movable boolean: True to make regression lines movable, or false to make them non-interactive.

Example

use Libraries.Compute.Statistics.DataFrame
use Libraries.Interface.Controls.Charts.ScatterPlot

DataFrame frame
frame:Load("Data/ChartTestData.csv")
frame:AddSelectedColumns("Column1")
frame:AddSelectedColumns("Column2")
frame:AddSelectedFactors("Factor1")

ScatterPlot chart = frame:ScatterPlot()
chart:SetTitle("ScatterPlot Feature Example")
chart:SetSubtitle("Two Columns - One Factor")
chart:ShowLinearRegression(true)
chart:ShowSquaresOfResiduals(true)
chart:ShowMovableRegressionLine(true)
chart:SetResidualSquareThickness(2)
chart:LockRegressionYIntercept(0)
chart:Display(1200, 1200)

ShowPatterns(boolean show)

Parameters

  • show boolean

ShowSelectionAnnotation(Libraries.Interface.Controls.Charts.ChartItem item, text annotation, number offsetX, number offsetY)

This action sets the y-axis label font size.

Parameters

ShowSelectionAnnotation(Libraries.Interface.Controls.Charts.ChartItem item, number offsetX, number offsetY)

This action sets the legend title font size.

Parameters

ShowSubChartAreaBorders()

This action allows user to show the borders around each sub chart area. By default this setting is set to true.

Returns

boolean

ShowSubChartAreaBorders(boolean showSubChartAreaBorders)

This action allows user to show the borders around each sub chart area. By default this setting is set to true in most cases (with the exception of pie charts).

Parameters

  • showSubChartAreaBorders boolean

ShowSubChartAreaTitles(boolean show)

This action checks if the sub chart titles are visible.

Parameters

  • show boolean: when true the titles are visible.

ShowSubtitle(boolean show)

This action sets the visibility of the subtitle. When true the chart subtitle will be visible.

Parameters

  • show boolean: true makes the subtitle visible.

ShowTitle(boolean show)

When true the chart title will be visible.

Parameters

  • show boolean: when true the title is visible.

ShowVisualHighlight(boolean visualHighlight)

This action toggles the alpha value of the selection color between 0 and 1.

Parameters

  • visualHighlight boolean: The flag to determine if visual highlighting is showing.

ShowXAxis(boolean show)

This action sets the x-axis to visible (true) or hidden (false).

Parameters

  • show boolean: True if the axis should be shown.

ShowXAxisTitle(boolean show)

When true the x-axis title will be visible.

Parameters

  • show boolean: when true the title is visible.

ShowXLabels(boolean show)

This action is used to toggle the visibility of the X-axis labels.

Parameters

  • show boolean: true will display the X-axis labels.

ShowXTicks(boolean show)

This action shows or hides the ticks on the X axis. Atrribute: Parameter show when true and hide when false.

Parameters

  • show boolean

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:ShowXTicks(true)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

ShowYAxis(boolean show)

This action sets the y-axis to visible (true) or hidden (false).

Parameters

  • show boolean: True if the axis should be shown.

ShowYAxisLine(boolean showYAxisLine)

This action gets the selection bracket (Array).

Parameters

  • showYAxisLine boolean

ShowYAxisTitle(boolean show)

When true the y-axis title will be visible.

Parameters

  • show boolean: when true the title is visible.

ShowYLabels(boolean show)

This action is used to toggle the visibility of the Y-axis labels.

Parameters

  • show boolean: true will display the y-axis labels.

ShowYTicks(boolean show)

This action shows or hides the ticks on the Y axis. Atrribute: Parameter show when true and hide when false.

Parameters

  • show boolean

Example

use Libraries.Game.Game
use Libraries.Interface.Controls.Charts.Chart
use Libraries.Interface.Controls.Charts.BarChart
use Libraries.Compute.Statistics.DataFrame
    
class Main is Game
    action Main
        StartGame()
    end
    
    action CreateGame
        DataFrame frame

        frame:Load("/Data/Cats.csv")
        frame:AddSelectedFactors("Maximum Life Span")
    
        BarChart chart = frame:BarChart()
        chart:SetTitle("Cat Lifespan")
    
        chart:ShowYTicks(true)
    
        chart:ShowLegend(false)
        chart:SetSize(800, 600)
        Add(chart)
    end
end

UnlockRegressionYIntercepts()

This action unlocks the y-intercepts of the regression lines. It does not reset the values of the lines if they were already locked, but makes it possible to adjust them dynamically if the lines are movable.

Update(number seconds)

This action overrides the default Update action. If the tree needs to be updated, the tree is regenerated.

Parameters

  • seconds number: the number of seconds since the last update.

Inherited Actions

24 actions from Libraries.Interface.Controls.Charts.ChartItem
257 actions from Libraries.Interface.Controls.Control
59 actions from Libraries.Interface.Item
201 actions from Libraries.Interface.Item2D
3 actions from Libraries.Language.Object