Graph class

Graph(client, oOptionsopt)

new Graph(client, oOptionsopt)

The ExGraph/JS component provides is a versatile tool designed to meet the diverse needs of data visualization. With support for numerous chart types, it empowers users to represent their data in various formats, from simple line charts to complex radar charts, all within the same view. In addition to its extensive charting capabilities, our graph control offers seamless printing and print preview functionality, ensuring that users can easily generate hard copies of their charts with precision and clarity. Features include:
  • Numerous chart types (xy, polar, radar, area or pie) to different axes in the same view
  • Overview, Cursor, Legend support
  • Resize, Scroll support
  • and much more
The ExGraph/JS is a HTML standalone-component, written in JavaScript, that uses no third-party libraries.

Every option of the Graph.Options type has associated a property of the control. For instance, the option:

allowActions {string}, customizes the actions the user can perform once the user clicks or touches the control
is associated with the property:
AllowActions {string}, customizes the actions the user can perform once the user clicks or touches the control
which means that the following statements are equivalent:
oGraph.Options = {allowActions: "scroll"}
oGraph.SetOptions({allowActions: "scroll"})
oGraph.AllowActions = "scroll"
oGraph.SetAllowActions("scroll")
where oGraph is an object of Graph type
Parameters:
Name Type Attributes Description
client any The client parameter indicates the control's client area as:
  • array of [x,y,width,height] type that specifies the control's client area
  • string, that specifies the identifier of the canvas within the document, so the canvas's client area becomes the control's client area
  • HTMLCanvasElement, that specifies the identifier of the canvas within the document, so the canvas's client area becomes the control's client area
oOptions object <optional>
An object of Graph.Options type that defines different options to display the control.
Requires:
  • module:exontrol.commmon.min.js

Requires

  • module:exontrol.commmon.min.js

Classes

Options

Members

(static, readonly) AxisTypeEnum :number

The Graph.AxisTypeEnum type specifies whether the value axis is linear or logarithmic. The ValueAxisOptions.type field accepts a value of Graph.AxisTypeEnum type to determine the scale of the value axis. The choice between exLinear and exLogarithmic depends on the nature of your data and how you want to visualize it:
  • Use exLinear for data that is uniformly distributed or when you want to emphasize absolute differences between values. In a linear scale, equal spacing on the axis represents equal differences in value, making it ideal for data that does not span several orders of magnitude.
  • Use exLogarithmic for data that spans several orders of magnitude or when you want to emphasize relative differences between values. In a logarithmic scale, equal spacing on the axis represents equal ratios of change, which is particularly useful for visualizing exponential growth or datasets with large dynamic ranges. Note that all values should be greater than zero when using a logarithmic scale, as zero or negative values are not supported.

When using a logarithmic scale, the MiscellaneousOptions.epsilon field defines the minimum positive threshold applied to the logarithmic scale to prevent undefined behavior (e.g., log(0)) and improve numerical stability for very small values. The default value is 1e-8. If your dataset includes values below this threshold, you should adjust epsilon accordingly. Note that epsilon also influences the visual spacing between 0 and 1 on a logarithmic axis, a smaller epsilon increases the perceptual gap, while a larger value compresses it.

Each AxisTypeEnum property can be specified in one of the following ways:

  • A numeric value.
  • A single enumeration constant.
  • A case-insensitive string containing the name that matches the enumeration constant.

For instance, the string "log" is equivalent to the numeric value 1, or to the enumeration constant exLogarithmic.

Type:
  • number
Properties:
Name value Type Description
exLinear 0 number Defines a linear scale, where equal spacing on the axis represents equal differences in value. The exLinear type acts as:
  • data is plotted directly based on its numeric value
  • the space between 0-10 is the same as 90-100
  • best for uniform data distributions or when values are not exponentially scaled
exLogarithmic 1 number Defines a logarithmic scale, where equal spacing on the axis represents equal ratios of change. The exLogarithmic type acts as:
  • data is plotted based on the logarithm of its value
  • the space between 1-10 is the same as between 10-100 or 100-1000
  • ideal for exponential growth data or datasets with large dynamic ranges
  • all values should be greater than zero; zero or negative values are not supported

The exontrol.Graph.MiscellaneousOptions.epsilon miscellaneous option defines the minimum positive threshold applied to the logarithmic scale to prevent undefined behavior (e.g., log(0)) and improve numerical stability for very small values. The default value is 1e-8. If your dataset includes values below this threshold, you should adjust epsilon accordingly. Note that epsilon also influences the visual spacing between 0 and 1 on a logarithmic axis, a smaller epsilon increases the perceptual gap, while a larger value compresses it.

Since:
  • 4.5

(static, readonly) LegendAlignEnum :number

The Graph.LegendAlignEnum type specifies the alignment of the legend's content. The LegendOptions.align field accepts a value of type Graph.LegendAlignEnum to determine how the legend items are aligned within the legend panel. The alignment options allow you to control the positioning of legend items, whether they are aligned to the start (left or top), centered, or aligned to the end (right or bottom) of the legend panel. This helps you create a visually balanced legend that enhances the overall appearance of your chart.

Each LegendAlignEnum property can be specified in one of the following ways:

  • A numeric value.
  • A single enumeration constant.
  • A case-insensitive partial string containing a name that matches the enumeration constants.

For instance, the string "center" is equivalent to the numeric value 1, or to the enumeration constant exCenter.

Type:
  • number
Properties:
Name value Type Description
exStart 0 number The legend's content is aligned to the left or top side of the view
exCenter 1 number The legend's content is centered
exEnd 2 number The legend's content is aligned to the right or bottom side of the view

(static, readonly) LegendFlowEnum :number

The Graph.LegendFlowEnum type determines whether the legend objects are arranged from left to right or top to bottom. The LegendOptions.flow field accepts a value of type Graph.LegendFlowEnum to specify the arrangement of legend items. The flow options allow you to control how the legend items are displayed within the legend panel, either in a horizontal sequence (left to right) or in a vertical sequence (top to bottom). The exAuto option automatically adjusts the flow based on the docking position of the legend panel, ensuring optimal use of space and readability. This flexibility helps you create a clear and organized legend that complements your chart's design.

Each LegendFlowEnum property can be specified in one of the following ways:

  • A numeric value.
  • A single enumeration constant.
  • A case-insensitive partial string containing a name that matches the enumeration constants.

For instance, the string "left" is equivalent to the numeric value 0, or to the enumeration constant exLeftToRight.

Type:
  • number
Properties:
Name value Type Description
exAuto -1 number The legend items are arranged horizontally from left to right when the legend panel is anchored to the top/bottom side of the view. Alternatively, they are arranged vertically from top to bottom when the legend panel is anchored to the left/right side of the view.
exLeftToRight 0 number The exLeftToRight mode indicates that the next legend object gets arranged to the right of the current legend object
exTopToBottom 1 number The exTopToBottom mode indicates that the next legend object gets arranged to the bottom of the current legend object

(static, readonly) LegendSymbolAlignmentEnum :number

The Graph.LegendSymbolAlignmentEnum type defines how the symbol of a series is aligned relative to its label in the legend. The symbolAlign property of LegendOptions accepts a value of type Graph.LegendSymbolAlignmentEnum to set this alignment. The symbol is a visual representation of the series, usually shown as a small icon or shape next to the series name in the legend. The alignment options let you position the symbol above, below, to the left, to the right, or even as a background of the label. This allows you to customize the legend's appearance and make the chart easier to read.

Each LegendSymbolAlignmentEnum property can be specified in one of the following ways:

  • A numeric value.
  • A single enumeration constant.
  • A combination of one or more compatible enumeration constants, separated by the | operator.
  • A case-insensitive partial string containing one or more comma-separated names that match the enumeration constants.

For instance, the string "top,center" is equivalent to the numeric value 17, or to the combination of enumeration constants exTop | exCenter.

Type:
  • number
Properties:
Name value Type Description
exHide 0 number Hides the symbols of the series
exTop 1 number The symbol of the serie is shown on the top of the label. The exTop flag can be combined with exStart, exCenter or exEnd values.
exBottom 2 number The symbol of the serie is shown below the label. The exBottom flag can be combined with exStart, exCenter or exEnd values.
exLeft 3 number The symbol of the serie is shown to the left of the label. The exLeft flag can be combined with exStart, exCenter or exEnd values.
exRight 4 number The symbol of the serie is shown to the right of the label. The exRight flag can be combined with exStart, exCenter or exEnd values.
exFill 5 number The symbol of the serie is shown on the label's background (no extra space is allocated)
exStart 0 number The symbol of the serie is left/top-aligned relative to the label. The exStart flag can be combined with exTop, exBottom, exLeft or exRight values.
exCenter 16 number The symbol of the serie is centered relative to the label. The exCenter flag can be combined with exTop, exBottom, exLeft or exRight values.
exEnd 32 number The symbol of the serie is right/bottom-aligned relative to the label. The exEnd flag can be combined with exTop, exBottom, exLeft or exRight values.

(static, readonly) PanelDockEnum :number

The Graph.PanelDockEnum type defines which edge of the chart the legend or overview panel is anchored to. The LegendOptions.dock field or OverviewOptions.dock field accepts a value of type Graph.PanelDockEnum to specify the edge of the control's view where the panel is docked. The docking options let you position the legend or overview panel on any side of the chart - top, bottom, left, or right - allowing you to display additional information without covering the main chart area. This provides flexibility to arrange the layout based on your preferences and the available space.

Each PanelDockEnum property can be specified in one of the following ways:

  • A numeric value.
  • A single enumeration constant.
  • A case-insensitive partial string containing one or more comma-separated names that match the enumeration constants.

For instance, the string "top" is equivalent to the numeric value 1, or to the enumeration constant exTop.

Type:
  • number
Properties:
Name value Type Description
exTop 1 number The legend(overview) is anchored to the top side of the view
exBottom 2 number The legend(overview) is anchored to the bottom side of the view
exLeft 3 number The legend(overview) is anchored to the left side of the view
exRight 4 number The legend(overview) is anchored to the right side of the view

(static, readonly) SerieStyleEnum :number

The Graph.SerieStyleEnum type defines how the values of a series are connected in the chart. The Style property of a Serie object accepts a value of SerieStyleEnum type to specify how the series values are drawn. Use exNormal when you want straight-line connections between values. Use exSpline when you want the line to appear smoother between points. The exSpline style uses a cubic spline algorithm to create smooth curves, which can enhance the visual appeal of the chart, especially when dealing with fluctuating data. However, keep in mind that using exSpline may result in a less accurate representation of the data points compared to exNormal, as it emphasizes aesthetics over precision. Choose the style that best suits your data visualization needs and the message you want to convey with your chart.

Each SerieStyleEnum property can be specified in one of the following ways:

  • A numeric value.
  • A single enumeration constant.
  • A case-insensitive partial string containing a name that matches the enumeration constants.

For instance, the string "spline" is equivalent to the numeric value 1, or to the enumeration constant exSpline.

Type:
  • number
Properties:
Name value Type Description
exNormal 0 number The values get connected with straight line
exSpline 1 number The values get connected with a spline curve

(static, readonly) ShowCursorCategoryLineEnum :number

The Graph.ShowCursorCategoryLineEnum type defines the flags that control whether the vertical and/or horizontal category line is displayed when the crosshair cursor hovers over the chart. The showCursorCategoryLine property of CursorOptions accepts a value of type Graph.ShowCursorCategoryLineEnum to specify how the vertical and horizontal category lines are shown while the crosshair cursor moves over the chart. The category lines are visual guides that extend vertically and horizontally from the crosshair cursor to help identify the corresponding category on the axes. The options allow you to choose whether to hide the category lines, show them only when the pointer is near the category, or show them exactly at the pointer position. This feature enhances the readability of the chart by providing clear visual cues about the current category being hovered over, making it easier for users to interpret the data accurately.

Each ShowCursorCategoryLineEnum property can be specified in one of the following ways:

  • A numeric value.
  • A single enumeration constant.
  • A case-insensitive partial string containing a name that matches the enumeration constants.

For instance, the string "near" is equivalent to the numeric value 1, or to the enumeration constant exShowNear.

Type:
  • number
Properties:
Name value Type Description
exHide 0 number The vertical/horizontal category-line is hidden
exShowNear 1 number The vertical/horizontal category-line is shown when the pointer is near the category
exShowAsIs 2 number The vertical/horizontal category-line is shown at pointer position (default)

(static, readonly) ShowCursorSerieTooltipEnum :number

The Graph.ShowCursorSerieTooltipEnum type defines the flags that control how tooltips are displayed when the crosshair cursor hovers over the chart. The showCursorSerieTooltip property of CursorOptions accepts a value of type Graph.ShowCursorSerieTooltipEnum to specify how the tooltips for series are shown while the crosshair cursor moves over the chart. The available options allow you to hide the tooltips, show only the tooltip of the series nearest to the pointer, show the tooltip of the series exactly at the pointer position, or show all tooltips for all series within the category indicated by the vertical or horizontal category line. This allows users to view information about the data points as they move the cursor over the chart.

Each ShowCursorSerieTooltipEnum property can be specified in one of the following ways:

  • A numeric value.
  • A single enumeration constant.
  • A case-insensitive partial string containing a name that matches the enumeration constants.

For instance, the string "exact" is equivalent to the numeric value 2, or to the enumeration constant exShowExact.

Type:
  • number
Properties:
Name value Type Description
exHide 0 number No tooltip is displayed when the crosshair cursor hovers the chart
exShowNear 1 number The vertical/horizontal category-line indicates the series whose tooltip is displayed, when the crosshair cursor hovers the chart
exShowExact 2 number The pointer indicates the series whose tooltip is displayed, when the crosshair cursor hovers its chart
exShowAll 3 number Displays all tooltips for all series of the category unit being indicated by the vertical/horizontal category-line

(static, readonly) ShowInEnum :number

The Graph.ShowInEnum type defines flag-based options for highlighting different parts of the control, such as the axis, chart, or both. The MarkValueOptions.showIn field accepts a value of type Graph.ShowInEnum to specify where the highlights or marks should be displayed. The options allow you to choose whether to show highlights in the chart area, the axis area, or both, providing flexibility in how you emphasize specific data points or ranges on your chart. This can enhance the visual clarity and focus of your data presentation.

Each ShowInEnum property can be specified in one of the following ways:

  • A numeric value.
  • A single enumeration constant.
  • A combination of one or more compatible enumeration constants, separated by the | operator.
  • A case-insensitive partial string containing one or more comma-separated names that match the enumeration constants.

For instance, the string "chart,axis" is equivalent to the numeric value 3, or to the combination of enumeration constants exChart | exAxis.

Type:
  • number
Properties:
Name value Type Description
exChart 1 number Indicates that the highlight or mark appears in the chart area.
exAxis 2 number Indicates that the highlight or mark appears in the axis area.
Since:
  • 4.4

(static, readonly) ShowValueEnum :number

The Graph.ShowValueEnum type indicates the flags to show value on the chart. The ShowValue property accepts a value of Graph.ShowValueEnum type to determine how the values of the series are displayed on the chart. The ShowValueEnum type uses a bitwise flag system, allowing you to combine multiple display options for value points, guided lines to values, and the values themselves. This flexibility enables you to customize the appearance of your chart according to your specific needs.

Each ShowValueEnum property can be specified in one of the following ways:

  • A numeric value.
  • A single enumeration constant.
  • A combination of one or more compatible enumeration constants, separated by the | operator.
  • A case-insensitive partial string containing one or more comma-separated names that match the enumeration constants.

For instance, the string "point,line,value" is equivalent to the numeric value 7, or to the combination of enumeration constants exPoint | exLine | exValue.

Type:
  • number
Properties:
Name value Type Description
exHide 0 number No point, line or value is shown
exPoint 1 number Specifies that the value-point is displayed. The valuePoint shape defines the visual appearance of the value-point.
exLine 2 number Specifies that the guided line to value is displayed. The valueLine shape defines the visual appearance of the guided line to value
exValue 4 number Indicates that the value itself is shown
exHideIfEmpty 128 number Hides the value-point, value-line and value itself if the value is empty
exHitTestRect 256 number Specifies that the rectangle of a serie's data is included in hit testing when the pointer hovers over it. This means a value-point is considered "hit" not only when the pointer is directly over the point itself, but also when it hovers anywhere over the corresponding column or bar. This behavior applies to rectangular chart types, including "column", "rangeColumn", and "waterfall"

(static, readonly) type :string

The type field holds the full name of the object, since constructor.name can differ in minimized or obfuscated code. This field is never altered by the control itself, so it can be reliably used to verify the object's type. It is particularly useful when multiple versions of a control exist or when you need to check the type without depending on constructor.name, which may be inconsistent in some scenarios, such as minified code. The Graph.type member always returns "Graph"
Type:
  • string
Since:
  • 1.8
Example
console.log(exontrol.Graph.type); // logs "Graph"

(static, readonly) version :string

The version field defines the version of the control. Each release of the control has a different version number, so you can use this field to check the control's version and ensure that it supports the features you want to use. The version field is especially useful when you have multiple versions of the control, or when you want to check the version of the control without relying on other properties or methods that may differ between versions. The current version is 5.3
Type:
  • string
Example
console.log(exontrol.Graph.version); // logs "5.2"

AllowActions :string

The AllowActions property customizes the actions the user can perform once the control is clicked or touched. The order of the actions is very important, as the control checks each action from left to right until it finds a matching action for the performed mouse/touch event. The first matched action is performed, and the rest of the actions are ignored. So if you want to perform a specific action once the user clicks an item, and perform another action if the user clicks an area that does not contain any item, you should place the first action before the second one in the AllowActions property.

The format of the property is:

"action(shortcut,shortcut,...),action(shortcut,shortcut,...)..."
where
  • "action", defines the action to perform (as defined below)

    Action Description Flags
    "fit" Fits the drag-area into the control's client area
    • [zoom], specifies that the "fit" action magnifies the chart instead resizing it
    "move-value" Rearranges values, series, or data through drag-and-drop (available only if the serie's ShowValue property includes exPoint flag)
    • [disableMoveCategory], disables rearranging values/categories (default, if the flag is missing the user changes the control's Order property)
    • [enableMoveSerie], enables rearranging series (changes the serie's Position property)
    • [enableMoveData], enables rearranging the data of the serie (changes the serie's Data property)
    "overview-selection-resize" Resizes the graph using the left/right margins of the overview-selection
    "scroll" Scrolls the control's content by drag
    • [view], specifies that the "scroll" is possible once the user clicks the view
    • [legend], specifies that the "scroll" is possible once the user clicks the legend
    "value-resize" Resizes the column/bar's size for area-compatible chart types (not available if autoFit property is true)
    "zoom" Zooms the control's content at dragging-point

  • "shortcut", defines the event's button or/and the modifier-keys that are required to perform the action. The "shortcut" is a combination of none, one or more of the following values:
    • "Shift", indicates that the SHIFT key is pressed
    • "Ctrl" or "Control", indicates that the CTRL key is pressed
    • "Alt" or "Menu", indicates that the ALT key is pressed
    • "Meta" , indicates that the META key is pressed
    • "LButton", specifies that the mouse's left-button is pressed
    • "RButton", specifies that the mouse's right-button is pressed
    • "MButton", specifies that the mouse's middle/wheel-button is pressed
    • "Long", specifies that the action requires a "long" click or touch before it begins
    • "Double", specifies that the action requires a "double" click before it begins (this flag is available for non-dragable actions only such as "edit")
    • "+", indicates AND between values
Type:
  • string
Example
null {null}, indicates the control's default allowActions value
"" {string}, specifies that no operation is allowed once the user clicks or touches the control
"scroll" {string}, specifies that only "scroll" operation is allowed, no matter of the event's button or modifier-keys is pressed.
"move-value(LButton),scroll" {string}, specifies that the "move-value" action is allowed when the user left-clicks and drags a value. Otherwise, dragging performs a scroll operation
AllowActions

AllowDrop :boolean

The AllowDrop property defines whether users can drag and drop local files into the control. The control supports importing data from local files by dragging and dropping them directly onto it. Setting AllowDrop to true enables this functionality, allowing users to easily load data from local files for visualization. When AllowDrop is set to false, drag-and-drop support for local files is disabled, preventing users from importing data in this way. This can be useful when data input must be restricted to specific sources or formats. The Data property or the Import method can be used to load data from various sources, including local files, URLs, or directly from JavaScript objects and arrays.
Type:
  • boolean
Example
false {boolean}, no file can be drop into the control (default)
true {boolean}, the user can drag and drop files into the control
AllowDrop

AllowStack :boolean

The AllowStack property specifies whether series are stacked according to the non-empty values defined in the Serie.Stack property. When AllowStack is true, series that share the same non-empty Stack value are visually stacked, combining their values to display a cumulative total. When AllowStack is false, the Stack property is ignored, and all series are displayed independently without stacking, regardless of their Stack values. By default, AllowStack is false, so series are not stacked unless this property is explicitly enabled. This allows for greater flexibility in how data is visualized, as users can choose to stack series to show cumulative values or keep them separate for individual comparison. The Stack property specifies whether a series is stacked, with the same value for multiple series of the same type indicating that they belong to the same stacking group.
Type:
  • boolean
Since:
  • 4.2
Example
false {boolean}, the series' Stack property is ignored, and no series will be stacked, regardless of the Stack property's value.
true {boolean}, the series values are visually stacked on top of each other, provided the not-empty series' Stack property.
AllowStack

AutoFit :boolean

The AutoFit property specifies whether the elements of the series are resized to fit the control's client-area. When AutoFit is set to true, the control automatically resizes the elements of the series to ensure they fit within the visible area of the control, regardless of the amount of data or the size of the control. This can be particularly useful for maintaining readability and visual appeal when dealing with large datasets or when the control is resized. When AutoFit is set to false (default), the elements of the series are displayed at their actual size, which may result in scroll bars appearing if the content exceeds the control's dimensions.
Type:
  • boolean
Example
false {boolean}, the autofit feature is disabled (default)
true {boolean}, resizes the elements of the series to fit the control's content
AutoFit

Background :BackgroundOptions

The Background property defines the display options to show different parts of the control. The BackgroundOptions object defines the default visual appearance used by the control for chart elements such as series colors, area transparency, and tooltip styling. It allows customizing how series are colored, how area charts blend with the background, and how tooltips appear when interacting with the chart. Setting the Background property to null applies the control's default background options, while providing a BackgroundOptions object allows for specific customization of these visual aspects.
Type:
Example
null {null}, uses the control's default background options
{seriesColors: ["red", "green", "blue"], seriesColorsAreaAlpha: 0.25}, {BackgroundOptions}, sets the series colors to red, green, and blue, with an area transparency of 0.25 for area-compatible chart types (for instance, "line" chart-type)
Background

CategoryAxis :CategoryAxisOptions|Array.<CategoryAxisOptions>

The CategoryAxis property defines the chart's category axes. The category axis is horizontal (oX) for horizontal charts and vertical (oY) for vertical charts, based on the Vertical property of the Serie object. For xy-compatible chart types (scatter, scatterLine, or bubble), the XAxis and YAxis properties define the x and y axes, and the CategoryAxis property is ignored. The CategoryAxis property can be set to null to use a single default category axis, or to an object or an array of CategoryAxisOptions to define one or more category axes with custom configurations.
Type:
Example
null {null}, removes the categories of the chart (@since 4.3)
{tfi: "&lt;fgColor red&gt;"} {CategoryAxisOptions}, shows the default category-axis in red
[{categories: [2001,2002,2003]}, {categories: ["A","B","C"], color: "blue"}] {CategoryAxisOptions[]}, defines two category-axis one that displays the 2001, 2002 and 2003, while another displays A, B and C in blue
CategoryAxis

Cursor :CursorOptions

The Cursor property is used to configure the behavior and appearance of the chart's cursor. It allows showing or hiding the cursor, displaying crosshair lines over the X (category) and Y (value) axes, enabling tooltips for nearby series data or axes, controlling specific X and Y line visibility for XY-type charts, and setting the smooth transition time for cursor movement between positions. Essentially, it defines how the cursor interacts with the chart and how information is presented to the user during hover or touch. By default, the Cursor property is hidden.

The Cursor property must be assigned as an object (e.g., Cursor = { visible: true }) rather than setting individual attributes directly (like Cursor.visible = true), because the object is not directly mutable. When you assign a new object, the update is cumulative: only the fields you specify are changed, while previously set options remain unchanged, like in the following sample:

Cursor = { visible: true }; Cursor = { showCursorValueLine: false };

After this, the visible field remains true, allowing you to gradually update cursor settings without overwriting the existing configuration.

Type:
Example
{visible: true} {object}, shows the cursor with default options (shows crosshair lines over the X and Y axes, as well as tooltips for nearby series data items and axes)
Cursor

Cursors :string

The Cursors property defines the mouse cursors for different parts of the control. These cursors determine the pointer appearance when the user hovers over specific areas, allowing you to provide visual feedback and enhance interactivity for each part of the control. The cursors are defined as a string expression that specifies the cursor to apply on each part of the control, using various formats such as CSS cursor values. By using this method, you can customize the user experience by providing appropriate visual cues for interactive regions of the control. By default, the cursors property is "pointer(anchor,legend)", which means that the pointer cursor is shown when hovering over the "anchor" and "legend" parts of the control.

The format of the property is:

"cursor(part),cursor(part),..."
where:
  • "cursor", defines the CSS mouse cursor to display while cursor hovers the part
  • "part", defines the name of the part the cursor is applied on (as defined below)
The "cursor" can be any of the following:
Cursor Description
"alias"indicates a shortcut or alias will be created
"all-scroll"indicates scrolling in any direction
"auto"lets the browser decide the cursor based on context
"cell"indicates a table cell
"col-resize"indicates a column can be resized horizontally
"context-menu"indicates a context menu is available
"copy"indicates something will be copied
"crosshair"a precise crosshair cursor
"default"the default arrow cursor
"e-resize"resize east (right edge)
"ew-resize"resize horizontally
"grab"indicates an item can be grabbed
"grabbing"indicates an item is being grabbed
"help"indicates help information is available
"move"indicates something can be moved
"n-resize"resize north (top edge)
"ne-resize"resize northeast (top-right corner)
"nesw-resize"resize along the northeast–southwest axis
"no-drop"indicates dropping is not permitted
"not-allowed"indicates the action is not allowed
"ns-resize"resize vertically
"nw-resize"resize northwest (top-left corner)
"nwse-resize"resize along the northwest–southeast axis
"pointer"the pointer cursor (a hand with a pointing finger)
"progress"indicates background processing
"row-resize"indicates a row can be resized vertically
"s-resize"resize south (bottom edge)
"se-resize"resize southeast (bottom-right corner)
"sw-resize"resize southwest (bottom-left corner)
"text"the text selection cursor (I-beam)
"url(...)"uses a custom cursor image (with optional fallback)
"vertical-text"the vertical text selection cursor
"w-resize"resize west (left edge)
"wait"indicates the program is busy
"zoom-in"indicates zooming in
"zoom-out"indicates zooming out
The "part" can be any of the following:
Part Description
"anchor" (hyperlink)defines the mouse-cursor when the mouse pointer hovers the anchor (the <a> ex-HTML part marks an anchor or hyperlink element)
"legend"defines the mouse-cursor when the mouse pointer hovers an object of the legend
"long"specifies the mouse-cursor to be shown as soon as a "long" click or touch action begins (see allowActions field)
"move-value-drag"defines the mouse cursor while a value, series, or data point is being dragged, visually indicating an active drag operation and showing which element can be grabbed. This is valid only if allowActions includes the "move-value" action and is typically used with "pointer(valuePoint)" to suggest that the user can click and move the value. Example: when the user clicks a value-point and begins dragging it, the cursor changes to "grabbing(move-value-drag)" to signal that the item is being moved (@since 4.9)
"no"defines the mouse cursor to be shown when a drag-and-drop operation is not allowed (for example, when dropping a value, series, or data point is not permitted in the current area). This is valid only if allowActions includes the "move-value" action and provides immediate visual feedback to prevent accidental operations. Example: when the user drags a value over an invalid target, the cursor changes to "not-allowed(no)" to indicate that the operation is blocked (@since 4.9)
"valuePoint"defines the mouse-cursor when the mouse pointer hovers the value-point
Type:
  • string
Example
"" {string}, specifies that no mouse cursor is shown when hovering any part of the control
"pointer(anchor,legend)" {string}, specifies that the pointer cursor is shown when hovering the "anchor" and "legend" parts of the control
Cursors

Data :any

The Data property is an alias for the Import() method, and it imports data from CSV format. The Data property is equivalent with SetData(value) method. The SetData() method can import data from different sources, such as a URL to a CSV file, a string in CSV format, a local file, or an array of data. The SetData() method accepts an optional parameter "importOpts" that specifies options to import data into the control, such as the maximum number of rows to import, the format of the source, and delimiters for parsing CSV data. The onload event occurs once the control loads or imports data, so you can use it to perform actions after importing data into the control. The onerror event occurs if the control encounters an error during the import process, allowing you to handle any issues that arise. The getter of the Data property is equivalent to the GetData() method, and it returns an array of [array] type that contains the data currently imported into the control, where each item in the outer array represents a row of data and each inner array contains the values for that row. If no data has been imported, the getter of the Data property returns an empty array. The returned data represents a copy of the internal data, so modifying values within the returned array does not update the control, the curves, or any serie displayed in the chart. The setter of the Data property is equivalent to the SetData(value) method, and it imports data from CSV format using the provided value as the source.

Indicates the source of the data, as one of the following:

  • A String expression that specifies the URL to a CSV file (contains no eof, eor or str)
  • A String expression in CSV format
  • An object that includes the "files" member of FileList type (a local file)
  • An array of data to load

The data source can be used by the Serie.Data property of the Serie object, as well as by the categories option of the CategoryAxis property of the control.

Type:
  • any
Example
"data/aapl.txt" {string}, loads data from a local CSV file located at "data/aapl.txt"
"https://example.com/data.csv" {string}, loads data from a CSV file located at the specified URL
"Category,Value\nA,10\nB,20\nC,30" {string}, loads data from a string in CSV format
[[1, 10], [2, 20], [3, 30]] {arrat}, loads data from an array of data to load
Data

(readonly) DataHeader :array

The DataHeader property returns the header of the data, i.e., the column names. The header is obtained from the first line of the data only if the import option "hdr" is enabled when importing data via the Import method. The header becomes available after data is imported using either the Import method or the SetData(value) method. The onload event is triggered once the data has been successfully imported. The DataHeader property returns an array of [string] type that contains the column names of the data. If no header is defined, it returns an empty array.
Type:
  • array
Since:
  • 5.2
Example
The following samples display the data's header (column-names) once the control loads or imports new data (for instance, the user drags and drops a file into the control):

oGraph.on("load", function(oEvent)
{
   console.log(oGraph.DataHeader);
})
DataHeader

FormatText :exontrol.DrawTextFormatEnum

The FormatText property defines the format to display the view's invalid label. The FormatText property can be set to null to indicate that the default format is applied, or to a combination of flags defined within the exontrol.DrawTextFormatEnum enumeration to specify the text format. The text format defines the alignment, wrapping, clipping, and other formatting options for the text displayed in the control.

The exontrol.DrawTextFormatEnum type supports the following flags:

  • exTextAlignTop (0x00), justifies the text to the top of the rectangle
  • exTextAlignLeft (0x00), aligns text to the left
  • exTextAlignCenter (0x01), centers text horizontally in the rectangle
  • exTextAlignRight (0x02), aligns text to the right
  • exTextAlignVCenter (0x04), centers text vertically
  • exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
  • exTextAlignMask (0x0F), specifies the mask for text's alignment.
  • exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
  • exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
  • exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
  • exPlainText (0x80), treats the text as plain text.
  • exTextNoClip (0x0100), draws without clipping.
  • exHTMLTextNoColors (0x0200), ignores the and tags.
  • exTextCalcRect (0x0400), determines the width and height of the text.
  • exHTMLTextNoTags (0x0800), ignores all HTML tags.
  • exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
  • exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
  • exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
Type:
  • exontrol.DrawTextFormatEnum
Example
null {null}, centers the label
32 or exontrol.DrawTextFormatEnum.exTextSingleLine {number}, defines a single-line label
0x2A or exontrol.DrawTextFormatEnum.exTextSingleLine | exontrol.DrawTextFormatEnum.exTextAlignRight | exontrol.DrawTextFormatEnum.exTextAlignBottom {number}, defines a single-line label right/bottom-aligned
FormatText

ImageAlign :number

The ImageAlign property defines the alignment of the image. The ImageSize property defines the default-size of the images within the control (reserved). Captions or labels that support ex-HTML formatting can include images using the <img> ex-HTML tag; however, the ImageAlign property does not affect images inserted with the <img> tag. Currently, the ImageSize and ImageAlign properties are ignored and reserved for future use.

Defines the alignment of the image as one of the following:

  • 0, the image is on the left of the serie's caption
  • 1, the image is on the right of the serie's caption
  • 2, the image is on the top of the serie's caption
  • 3, the image is on the bottom of the serie's caption
Type:
  • number
Example
null {null}, the image is aligned left to the caption (default)
1 {number}, the image is displayed to the right of the serie's caption
ImageAlign

ImageSize :any

The ImageSize property defines the default-size of the images within the control (reserved). Captions or labels that support ex-HTML formatting can include images using the <img> ex-HTML tag; however, the imageSize field does not affect images inserted with the <img> tag. The <img> tag supports additional size attribute that specifies the picture's size such as "<img>apple:18</img>2002", which indicates that the image named apple has a size of 18. Currently, the ImageSize and ImageAlign properties are ignored and reserved for future use.

Indicates the default-size of the images within the control as explained:

  • {null}, Indicates that the image is displayed as it is (full-sized).
  • {number}, Specifies that the image is displayed into a square of giving size (same width and height). If 0 the serie displays no image, if negative the image is stretched to giving square, else the serie's picture is scaled to fit the giving rectangle.
  • {number[]}, Specifies an array of [aspect-width,aspect-height] type that defines the limits for width or/and height. The aspect-width and aspect-height define the width/height of the serie's picture to scale or stretch to.
Type:
  • any
Example
null {null}, Indicates that the image is displayed as it is (full-sized).
0 {number}, no image is displayed
64 {number}, the image is scaled to fit a 64 x 64 rectangle
-64 {number}, the image is strected to a 64 x 64 rectangle
[32,64] {array}, scales the image to the largest ratio-rectangle (32 x 64) that fits the client
[-32,-64] {array}, stretches the image to a 32 x 64 rectangle
ImageSize

Invalid :string

The Invalid property defines the ex-html label displayed by the control when no data is available or when the data is invalid. The Invalid property can be set to null to indicate that no label is shown, or to a string that defines the message displayed while the control has no or invalid data. This option allows you to provide feedback to users when the control cannot display data, improving the user experience by clearly communicating the situation. The Data property or the Import method can be used to load data from various sources, including local files, URLs, or directly from JavaScript objects and arrays. By default, the Invalid property is "no or invalid data".
Type:
  • string
Example
null {null}, no label is displayed
"no or invalid data" {number}, defines a label to be shown while the control has no or invalid data
Invalid

Layout :string

The Layout property gets or sets the UI layout of the control. The layout is encoded as a string, that can be generated by the GetLayout() method and applied by the SetLayout() method. The layout can be used to save/restore the UI layout of the control, or to apply the same UI layout to multiple controls.

Currently, the control's Layout property serializes the following:

  • layout of windows (size, dock, parent)
  • selected series
  • control's zoom
Type:
  • string
Example
The following statements are equivalents:

 oGraph.Layout, gets the control's layout
 oGraph.GetLayout(), gets the control's layout

where oGraph is an object of Graph type
Layout

Legend :LegendOptions

The Legend property defines the configuration options for displaying the view's legend, which allows users to show or hide series at runtime. The legend displays the list of series in the chart and typically includes a color indicator for each series to help users identify and differentiate them. By configuring the Legend property, you can control its visibility, position, layout, and behavior. Clicking a label in the legend shows or hides the corresponding series in the chart, which is useful when multiple series are displayed and users need to identify or control them at runtime. By default, the legend is hidden.

The Legend property must be assigned as an object (for example, Legend = { visible: true }) rather than setting individual attributes directly (like Legend.visible = true), because the object is not directly mutable. When you assign a new object, the update is cumulative: only the fields you specify are changed, while previously set options remain unchanged. For example:

Legend = { visible: true };
Legend = { dock: 'top' };

After this, the visible field remains true, allowing you to gradually update legend settings without overwriting the existing configuration.

Type:
Example
{visible: true} {object}, shows the legend with default options (displays the legend at the right of the view, with vertical layout and one column)
Legend

Listeners :exontrol.Lts

The Listeners field defines the series of the control, as an object of exontrol.Lts type. The exontrol.Lts type supports forEach(callback, thisArg) method that helps you to enumerate the series the control supports. The Series section lists the series the component supports.
Type:
  • exontrol.Lts
Example
The following sample shows how you can get all series the component currently supports:

oGraph.Listeners.forEach(function(name)
{
 console.log(name);
});

The following sample displays information about the serie being clicked:

oGraph.Listeners.Add("onclick", function (oEvent)
{
 console.log(oEvent);
});

or

oGraph.on("click", function (oEvent)
{
 console.log(oEvent);
});

where oGraph is an object of Graph type
Listeners

Locked :boolean

The Locked property locks or unlocks the control. The ReadOnly property indicates whether the control is read-only. When the control is locked, the user cannot interact with the chart in any way, including scrolling or modifying data. When the control is read-only, the user cannot modify the chart or its data, but can still scroll and navigate within the chart area. In both cases, the chart's data and series remain protected from changes, but read-only mode allows viewing and exploration, while locked mode prevents all interaction.
Type:
  • boolean
Example
false {boolean}, unlocks the control (can select any serie)
true {boolean}, locks the control (can't select any serie)
Locked

Misc :MiscellaneousOptions

The Misc property defines the control's miscellaneous options. The miscellaneous options include various settings that affect the control's behavior and appearance, such as cursor transitions, value size, and other customizable features that do not fall under specific categories like axes or series options. The Misc property can be set to an object of type MiscellaneousOptions to define these settings, or it can be set to null to use the control's default miscellaneous options. Changing the miscellaneous options can impact how the control responds to user interactions and how it displays certain elements, allowing for a more tailored user experience. Any misc option not explicitly set in the value parameter of SetMisc() method is assigned to the control's default value for that option. For instance, if the value parameter does not include the digits option, the control's default value for the digits option is used.
Type:
Example
null {null}, uses the control's default miscellaneous options
{allowValueScroll: true}, enables vertical scrolling of values for area-compatible chart types (for instance, "line" chart-type)
Misc

MultiColorSerie :boolean

The MultiColorSerie property determines whether a single data series (single-valid serie) in a chart can use multiple colors for its data points instead of a single uniform color. The seriesColors field defines the default colors used for the chart's series. When MultiColorSerie is set to true, each data point in the series can have a different color, which helps visually distinguish individual values within the same series. When MultiColorSerie is set to false, the entire series is rendered in a single color, determined by the seriesColors field or the specific color settings of the series. By default, MultiColorSerie is true, allowing greater visual differentiation of data points within a series. The seriesColorsDecrease field defines the default colors for the chart's series (when the value goes down). When all colors are used, new colors are pulled from the start again. The seriesColorsAreaAlpha field defines the alpha channel for the default colors of the area-type chart's series.
Type:
  • boolean
Since:
  • 4.2
Example
false {boolean}, the entire serie is rendered in a single color
true {boolean}, each data point in the series can have a different color (useful for distinguishing individual values visually) (default)
MultiColorSerie

Options :Graph.Options

The Options property defines the control's options. The control's options define its visual aspects such as the colors of the series, the size of the images, and other appearance or behavior-related settings. The Options property can be used to get or set all options of the control at once. Individual options should be changed by assigning a new options object rather than modifying the object returned by Options/GetOptions(). For example, to change the autoFit option use Options = {autoFit: true} instead of Options.autoFit = true.

Each option of the Graph.Options type has a corresponding property of the Graph object, which means that the following statements are equivalent:

oGraph.Options = {autoFit: true}
oGraph.oGV.SetOptions({autoFit: true})
oGraph.AutoFit = true
oGraph.oGV.SetAutoFit(true)

Note: All options of the control are the same for all views. Therefore, when an option is changed using the SetOptions() method of a view, the change applies to all other views of the control as well.

Type:
Example
oGraph.Options = {imageAlign: 1, imageSize: 24}, changes the alignment and the size for all images within the control.
Options

Order :string

The Order property defines a custom display order for values or categories using their zero-based indexes, provided as a comma-separated string. Assigning a non-empty value lets you define the position of one, multiple, or all values, while empty entries (,,) preserve positions based on the default order.

The data values in the chart are arranged using the following properties:

  • Sort, sorts the series values in ascending or descending order
  • reverse (option of CategoryAxisOptions type), reverses the position of values as they were added (if no Sort is applied) or reverses the order produced by the Sort property (if Sort is applied)
  • Order, repositions values according to their zero-based indexes in a custom sequence

Applying the Sort property or CategoryAxisOptions.reverse field clears any custom order, leaving the Order property empty. To reset the custom ordering and revert to the original sequence of values or categories as they were added, set the Order property to an empty string or null. This removes any custom ordering and restores the default sequence as defined by the Sort property and CategoryAxisOptions.reverse field.

Type:
  • string
Since:
  • 4.9
Example
null {null}, the values or categories are displayed in their original order (default)
"8" {string}, index 8 first (move the index 8 to the first position)
",,8" {string}, index 8 third (move the index 8 to the third position)
"8,,1" {string}, index 8 first, index 1 third (move the index 8 to the first position, and index 1 to the third position)
",,9,,1" {string}, index 9 third, index 1 fifth (move the index 9 to the third position, and index 1 to the fifth position; unspecified positions follow the default order of the other indexes)
Order

Overview :OverviewOptions

The Overview property defines the configuration options for displaying the overview, which shows a map of the entire series without a scroll bar. The overview is a small chart that provides a visual summary of the complete data series, allowing users to quickly grasp overall trends and patterns. It is especially useful for large datasets or when the main chart is scrollable, as it helps users navigate the data more efficiently. By configuring the Overview property, you can control its visibility, size, position, and other aspects of its appearance and behavior. By default, the overview is hidden.

The Overview property must be assigned as an object (for example, Overview = { visible: true }) rather than setting individual attributes directly (like Overview.visible = true), because the object is not directly mutable. When you assign a new object, the update is cumulative: only the fields you specify are changed, while previously set options remain unchanged. For example:

Overview = { visible: true };
Overview = { dock: 'bottom' };

After this, the visible field remains true, allowing you to gradually update overview settings without overwriting the existing configuration.

Type:
Example
{visible: true} {object}, shows the overview with default options (displays the overview at the bottom of the view, with 20% height of the main chart)
Overview

Pad :number|Array.<number>|string

The Pad property defines the control's padding or the space between view's content and its borders. The Pad property can be set to null to indicate that the default padding value of [4,4] is applied, or to a value that defines the padding on horizontal and vertical side. The padding can be defined as a single numeric value to pad horizontal and vertical size with the same value, or as a "x,y" string or [x,y] array to specify the padding on horizontal and vertical side respectively.

The property supports any of the following values:

  • {number} a numeric value, to pad horizontal and vertical size with the same value
  • {(string|number[])} a "x,y" or [x,y] type to specify the padding on horizontal and vertical side
Type:
  • number | Array.<number> | string
Example
null {null}, indicates that the default padding value of [4,4] is applied
0 {number}, indicates no padding
"8,4" {string}, increases the serie's width with 2 * 8-pixels and serie's height with 2 * 4-pixels
[8,4] {array}, increases the serie's width with 2 * 8-pixels and serie's height with 2 * 4-pixels
Pad

ReadOnly :boolean

The ReadOnly property specifies whether the control in read-only mode. The Locked property locks or unlocks the control. When the control is read-only, the user cannot modify the chart or its data, but can still scroll and navigate within the chart area. In read-only mode, the chart's data and series remain protected from changes, but users can view and explore the chart without making modifications.
Type:
  • boolean
Example
false {boolean}, the control is not read-only
true {boolean}, the control is in read-only mode
ReadOnly

ScrollBars :exontrol.ScrollBarsEnum

The ScrollBars property determines which scroll bars the control displays. It accepts one or more ScrollBarsEnum flags combined with OR. By default, ScrollBars is set to exBoth, showing both horizontal and vertical scroll bars when the content exceeds the control's client area. Scroll bars are automatically hidden when not needed, unless the ScrollBars property includes exDisableNoHorizontal, exDisableNoVertical, or exDisableBoth flags. The onscroll event is fired whenever the user scrolls the control's content.

The ScrollBars property uses the exontrol.ScrollBarsEnum enumeration as explained:

  • exNoScroll (0), specifies that no scroll bars are shown (scroll is not allowed)
  • exHorizontal (1), specifies that only the horizontal scroll bar is shown
  • exVertical (2), specifies that only the vertical scroll bar is shown
  • exBoth (3), specifies that both horizontal and vertical scroll bars are shown if the content is larger than the control's client area
  • exDisableNoHorizontal (5), specifies that the horizontal scroll bar is always shown; it is disabled if it is unnecessary
  • exDisableNoVertical (10), specifies that the vertical scroll bar is always shown; it is disabled if it is unnecessary
  • exDisableBoth (15), specifies that both horizontal and vertical scroll bars are always shown; they are disabled if they are unnecessary
  • exHScrollOnThumbRelease (0x100), specifies that the control's content is horizontally scrolled as soon as the user releases the thumb of the horizontal scroll bar
  • exVScrollOnThumbRelease (0x200), specifies that the control's content is vertically scrolled as soon as the user releases the thumb of the vertical scroll bar
  • exScrollOnThumbRelease (0x300), specifies that the control's content is scrolled as soon as the user releases the thumb of the scroll bar
  • exHScrollEmptySpace (0x400), allows empty space when the control's content is horizontally scrolled to the end
  • exVScrollEmptySpace (0x800), allows empty space when the control's content is vertically scrolled to the end
  • exScrollEmptySpace (0xC00), allows empty space when the control's content is scrolled to the end
  • exExtendSBS (0x3000), specifies that the control's scroll bars are visible only when the cursor hovers the window; the control's client area is extended over the scroll bar portion
  • exMinSBS (0xC000), specifies that the control's scroll bars are shown as minimized
  • exHideSBS (0x10000), specifies that no scroll bars are shown (scroll is allowed)
Type:
  • exontrol.ScrollBarsEnum
Example
exontrol.ScrollBarsEnum.exBoth or 3 {number}, specifies that both horizontal and vertical scroll bars are shown if the content is larger than the control's client area
exontrol.ScrollBarsEnum.exNoScroll or 0 {number}, specifies that no scroll bars are shown (scroll is not allowed)
ScrollBars

ScrollBarsOrigin :string

The ScrollBarsOrigin property sets the color used to highlight the position of the origin (0,0) on the control's scroll bars. It applies to series of type "scatter", "scatterLine", or "bubble". The Serie.Type property defines the chart type of a series. The ScrollBarsOrigin property can be set to null to hide the origin (0,0) on the scroll bars, or to any CSS color string to display the origin (0,0) in that color. By default, the ScrollBarsOrigin property is "black", so the origin (0,0) is shown on the control's scroll bars in black.
Type:
  • string
Example
null {null}, hides the origin (0,0) on the control's scroll bar
"black" {string}, shows the origin (0,0) on the control's scroll bar in black
ScrollBarsOrigin

ScrollPos :object

The ScrollPos property scrolls horizontally and/or vertically the control's default view. The ScrollBars property determines whether the control displays horizontal and/or vertical scroll bars. The ScrollPos property can be set to null to indicate that the control's content is not scrolled, or to an object of type {x, y} to define the horizontal and vertical scroll position. Setting the x property of ScrollPos to a value (for example, 100) scrolls the control's content horizontally to that position, while setting the y property scrolls the content vertically. This allows you to control the initial scroll position of the control's content, which can be useful for focusing on specific areas of a large chart or graph when it is first displayed. The Scroll() method scrolls the view based on the giving key. The onscroll event notifies your application once the view has been scrolled.
Type:
  • object
Example
{x: 100}, scrolls the control's content horizontally to the position 100, while keeping the vertical scroll position unchanged.
{y: 50}, scrolls the control's content vertically to the position
ScrollPos

SerieDef :object

The SerieDef property defines the default options applied to each newly created series. Existing series are not affected; the defaults apply only to series added afterward. The serieDef object supports all fields defined by the SerieOptions type. This method is useful when you want to establish a consistent configuration across all newly added series without setting the same options individually.
Type:
  • object
Since:
  • 4.9
Example
null {null}, no default options are applied to new series (default).
{stack: "A", showValue: "point,hit"} {object}, indicates that each new series is added to stack “A”, each data value displays its value point, and the tooltip appears when the cursor hovers over the rectangular hit area of the data point (such as columns or bars).
SerieDef

SerieType :string

The SerieType property specifies the default representation of data for all series where the Serie.Type property is not explicitly defined. It determines how these series are rendered - such as line, bar, or scatter plot - ensuring consistent visualization across the chart. The Serie.Type property can override this default for individual series, allowing different chart types within the same graph. By default, SerieType is set to "column", so series without a specified type are displayed as column charts.

The SerieType property can be set to one of the following values, which determine the default representation method for the data in all series where the type property is not explicitly defined:

  • "area" {string}, an area chart or area graph displays graphically quantitative data. It is based on the line chart. The area between axis and line are commonly emphasized with colors, textures and hatchings. Commonly one compares two or more quantities with an area chart. (data requires array of numbers, supports vertical field, scrollable)
  • "line" {string}, a line chart or line graph, also known as curve chart is a type of chart which displays information as a series of data points called 'markers' connected by straight line segments. It is a basic type of chart common in many fields. It is similar to a scatter plot except that the measurement points are ordered (typically by their x-axis value) and joined with straight line segments. A line chart is often used to visualize a trend in data over intervals of time - a time series - thus the line is often drawn chronologically. In these cases they are known as run charts. (data requires array of numbers, supports vertical field, scrollable)
  • "column" {string}, a column chart or column graph is a chart or graph that presents categorical data with rectangular columns with heights proportional to the values that they represent. A horizontal column chart is called a bar chart. (data requires array of numbers, supports vertical field, scrollable)
  • "waterfall" {string}, a waterfall chart is a form of data visualization that helps in understanding the cumulative effect of sequentially introduced positive or negative values. These intermediate values can either be time based or category based. The waterfall chart is also known as a flying bricks chart or Mario chart due to the apparent suspension of columns (bricks) in mid-air. Often in finance, it will be referred to as a bridge. (data requires array of numbers, supports vertical field, scrollable)
  • "radarArea" {string}, a radar chart is a graphical method of displaying multivariate data in the form of a two-dimensional chart of three or more quantitative variables represented on axes starting from the same point. The relative position and angle of the axes is typically uninformative, but various heuristics, such as algorithms that plot data as the maximal total area, can be applied to sort the variables (axes) into relative positions that reveal distinct correlations, trade-offs, and a multitude of other comparative measures. (data requires array of numbers, non-scrollable)
  • "radarLine" {string}, similar with radarArea type. (data requires array of numbers, non-scrollable)
  • "radarColumn" {string}, displays data in radial columns starting from one center point. The circle is divided into equal portions depending on the number of columns and each column group occupies one portion (similar with "radarArea" type, data requires array of numbers, non-scrollable)
  • "pie" {string}, a pie chart (or a circle chart) is a circular statistical graphic which is divided into slices to illustrate numerical proportion. In a pie chart, the arc length of each slice (and consequently its central angle and area) is proportional to the quantity it represents. While it is named for its resemblance to a pie which has been sliced, there are variations on the way it can be presented. (data requires array of numbers, non-scrollable)
  • "rangeArea" {string}, a range chart displays sets of data points, each of which is defined by multiple values for the same category, and emphasizes the distance between the two values. The category labels are displayed on the category axis. The plain Range chart fills in the area between the top and the bottom value for each data point. (data requires array of array of two-numbers, such as [[from, to]], supports vertical field, scrollable)
  • "rangeColumn" {string}, a range column chart displays information as a range of data by plotting two Y-values (low and high) per data point. The vertical axis shows the values, and the horizontal axis shows the categories they belong to; in multiple-series range column charts, values are grouped by categories. (data requires array of array of two-numbers, such as [[from, to]], supports vertical field, scrollable)
  • "polarArea" {string}, represents data points connected with straight line segments that enclose a filled area together with the chart pole (data requires array of array of two-numbers, such as [[angle, value]], non-scrollable)
  • "polarLine" {string}, represents data points connected with straight line segments (data requires array of array of two-numbers, such as [[angle, value]], non-scrollable)
  • "polarScatter" {string}, shows the serie as non-connected data points (data requires array of array of two-numbers, such as [[angle, value]], non-scrollable)
  • "scatter" {string}, a scatter plot (also called a scatterplot, scatter graph, scatter chart, scattergram, or scatter diagram) is a type of plot or mathematical diagram using Cartesian coordinates to display values for typically two variables for a set of data. (data requires array of array of two-numbers, such as [[x, y]], supports vertical field, non-scrollable)
  • "scatterLine" {string}, a scatter line chart is similar with "scatter" type, excepts that lines are shown between scatter plots. (data requires array of array of two-numbers, such as [[x, y]], supports vertical field, non-scrollable)
  • "scatterArea" {string}, a scatter area chart is similar with "scatterLine" type, excepts that scatter plots zone is filled. (data requires array of array of two-numbers, such as [[x, y]], supports vertical field, non-scrollable)
  • "bubble" {string}, a bubble chart or bubble plot is a type of chart that displays three dimensions of data (a bubble chart is an extension of the scatter plot used to look at relationships between three numeric variables.). Each entity with its triplet (v1, v2, v3) of associated data is plotted as a disk that expresses two of the vi values through the disk's xy location and the third through its size. Bubble charts can facilitate the understanding of social, economical, medical, and other scientific relationships. (data requires array of array of three-numbers, such as [[x, y, size]], supports vertical field, non-scrollable)
  • "candleStick" {string}, a candlestick chart (also called Japanese candlestick chart or K-line) is a style of financial chart used to describe price movements of a security, derivative, or currency. While similar in appearance to a bar chart, each candleStick represents four important pieces of information for that day: open and close in the thick body, and high and low in the "candle wick". Being densely packed with information, it tends to represent trading patterns over short periods of time, often a few days or a few trading sessions. (data requires array of array of four-numbers, such as [[open, high, low, close]], supports vertical field, scrollable)
  • "ohlc" {string}, an open-high-low-close chart (also OHLC) is a type of chart typically used to illustrate movements in the price of a financial instrument over time. Each vertical line on the chart shows the price range (the highest and lowest prices) over one unit of time, e.g., one day or one hour. Tick marks project from each side of the line indicating the opening price (e.g., for a daily bar chart this would be the starting price for that day) on the left, and the closing price for that time period on the right. The bars may be shown in different hues depending on whether prices rose or fell in that period. (data requires array of array of four-numbers, such as [[open, high, low, close]], supports vertical field, scrollable)
Type:
  • string
Since:
  • 4.2
Example
null {null}, shows the data as columns (by default)
"radarCol" {string}, displays data in radial columns starting from one center point. The circle is divided into equal portions depending on the number of columns and each column group occupies one portion  (similar with "radarArea" type, data requires array of numbers, non-scrollable)
"pie" {string}, a pie chart (or a circle chart) is a circular statistical graphic which is divided into slices to illustrate numerical proportion. In a pie chart, the arc length of each slice (and consequently its central angle and area) is proportional to the quantity it represents. While it is named for its resemblance to a pie which has been sliced, there are variations on the way it can be presented. (data requires array of numbers, non-scrollable)
SerieType

Series :object|SerieOptions|Array.<object>|Array.<SerieOptions>

The Series property defines the collection of series displayed by the control. This property returns an object of Series type that contains all series currently defined in the control. It provides methods for managing the series, such as adding or removing a series, or retrieving a series by its index or identifier (key). The control can display one or multiple series at the same time, depending on the type of graph-view. Some graph-views allow combining compatible series types (for example, line and column) within the same view. Each series holds the values corresponding to a specific category in the graph. For example, in a sales chart, you can define one series for each product, where each series contains the sales values for each month category. The series collection is shared by all graph-views of the control. Therefore, any change made to the series (adding, removing, or modifying a series) is automatically reflected in all graph-views.
Type:
Example
{data: {"meta": 200, "whatsup": 300}} {object}, sets a single serie to represent, inluding the category names
{data: [1,2,3,4]} {SerieOptions}, sets a single serie to represent
[{data: [1,3,5,7]}, {data: "2,4,6,8"}] {SerieOptions[]}, sets multiple-series to represent
Series

Shapes :string

The Shapes property defines the shapes assigned to each part of the control. These shapes determine the visual appearance of the control's elements, such as borders, fills, and other graphical components. Using this method, you can fully customize how each part of the control is drawn and displayed. The shapes are defined as a string expression that specifies the shape to apply on each part of the control, using various formats such as color names, hexadecimal colors, RGB/RGBA/HSL/HSLA color functions, JSON representations of shape objects, or references to predefined shapes within the exontrol library. The Serie.Shape property defines the shape to apply on the data-points of a serie, while the Serie.ValuePointShape property defines the shape to apply on the value-labels of a serie.

The format of the property is:

"shape(part),shape(part),..."
where:
  • "shape", defines the shape to apply on the UI part as one of the following:

    ◦ any of 140 color names any browser supports (such as red, blue, green, ...)
    ◦ hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF (such as #0000ff which defines a blue background)
    ◦ hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF (such as #0000ff80 which defines a semi-transparent blue background)
    ◦ RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255( such as rgb(0,0,255) that defines a blue background)
    ◦ RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) ( such as rgba(0,0,255,0.5) which defines a semi-transparent blue background)
    ◦ HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors (such as hsl(240, 100%, 50%) that defines a blue background)
    ◦ HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) (such as hsla(240, 100%, 50%,0.5) that defines a semi-transparent blue background)
    ◦ a JSON representation of the shape object to apply (while it starts with { character, such as '{"normal": {"primitive": "RoundRect","fillColor":"black","tfi": {"fgColor": "white"}}}')
    ◦ specifies the name of the field within the exontrol.Shapes.Graph object (while it starts with a lowercase letter, such as shserie which refers to exontrol.Shapes.Graph.shserie shape)
    ◦ specifies the name of the field within the exontrol.Shapes object (while it starts with an uppercase letter, such as Button which refers to exontrol.Shapes.Button shape)

  • "part", defines the name of the part the shape is applied on (as defined below)
The shapes property supports any of the following parts:
Part Description Additional
"area"specifies the visual-appearance to show the "area" serie-types
"bubble" specifies the visual-appearance to show the "bubble" serie-types
  • size {number}, specifies the maximum-size of the data-point on the chart
"candleStick" specifies the visual-appearance to show the "candleStick" serie-types
  • size {number}, specifies the size of the stick
  • hollow {boolean}, indicates whether the hollow candlestick representation is displayed (hollow candle means that its closing value is higher (or equal) than opening value of the same period)
"column"specifies the visual-appearance to show the "column" serie-types
"cursorCategoryAxisTooltip"defines the visual-appearance to show the tooltip on the category-axes, when the crosshair hovers the category-unit
"cursorLine"defines the visual-appearance (frameColor, frameSize, frameDash) to display the crosshair over the hover/touch area (showCursorCategoryLine or showCursorValueLine)
"cursorSerieTooltip"defines the visual-appearance to show the tooltip when the crosshair cursor hovers the charts of the series
"cursorValueAxisTooltip"defines the visual-appearance to show the tooltip on the value-axes, when the crosshair hovers the value-unit
"cursorXAxisTooltip"defines the visual-appearance to show the tooltip on the x-axes, when the crosshair hovers the value-unit (available for xy-chart types)
"cursorYAxisTooltip"defines the visual-appearance to show the tooltip on the y-axes, when the crosshair hovers the value-unit (available for xy-chart types)
"frameFit"defines the visual-appearance to display the frame while fitting objects into the control's client area by drag
"legendLabel"defines the visual-appearance of the labels of the visible-series within the map legend
"legendLabelHidden"defines the visual-appearance of the labels of the hidden-series within the map legend
"legendSymbol"defines the visual-appearance of the symbols of the visible-series within the map legend
"legendSymbolHidden"defines the visual-appearance of the symbols of the hidden-series within the map legend
"legendUnit"defines the visual-appearance of the legend-unit (the client-rectangle that covers the symbol and label of the legend-object) of the visible-series within the map legend
"legendUnitHidden"defines the visual-appearance of the legend-unit (the client-rectangle that covers the symbol and label of the legend-object) of the hidden-series within the map legend
"line"specifies the visual-appearance to show the "line" serie-types
"ohlc" specifies the visual-appearance to show the "ohlc" serie-types
  • size {number}, specifies the size of the stick
  • hollow {boolean}, indicates whether the hollow candlestick representation is displayed (hollow candle means that its closing value is higher (or equal) than opening value of the same period)
"pie"specifies the visual-appearance to show the "pie" serie-types
"polarArea"specifies the visual-appearance to show the "polarArea" serie-types
"polarLine"specifies the visual-appearance to show the "polarLine" serie-types
"polarScatter" specifies the visual-appearance to show the "polarScatter" serie-types
  • size {number}, specifies the size of the data-point on the chart
"radarArea"specifies the visual-appearance to show the "radarArea" serie-types
"radarColumn"specifies the visual-appearance to show the "radarColumn" serie-types
"radarLine"specifies the visual-appearance to show the "radarLine" serie-types
"rangeArea"specifies the visual-appearance to show the "rangeArea" serie-types
"rangeColumn"specifies the visual-appearance to show the "rangeColumn" serie-types
"scatter" specifies the visual-appearance to show the "scatter" serie-types
  • size {number}, specifies the size of the data-point on the chart
"scatterArea"specifies the visual-appearance to show the "scatterArea" serie-types
"scatterLine"specifies the visual-appearance to show the "scatterLine" serie-types
"valueBack"defines the visual-appearance to apply on the value's background
"valueLine" defines the visual-appearance for value-lines (the guided line from the value-point to the value itself)
  • length {number}, indicates the horizontal distance between the middle and end points of the value-line
"valuePoint" defines the visual-appearance for value-points
  • size {number}, specifies the size of the value-point
  • frameColor, defines the color to show the object's frame
  • patternColor, defines the color to show the object's pattern
  • fillColor, defines the color to show the object's background
  • fillGradientColor, defines the gradient type and colors to show the object's background. The fillColor attribute defines the starting color. The fillGradientColor attribute has effect only if the fillColor attribute is defined (not null or undefined).

The ...Color attributes supports the following additional values:

  • "null", indicates that the value-point uses the serie's value color
  • "transparent", specifies that the value-point is not visible (transparent)

"waterFall" specifies the visual-appearance to show the "waterFall" serie-types
  • lineSize {number}, defines size of to draw the lines between columns
"select-overview"defines the visual-appearance to display the overview-selection
"select-overview-resize"defines the visual-appearance to display left/right resize-margins of the overview-selection
"selectout-overview"defines the visual-appearance to display the left/right parts outside of the overview-selection
Type:
  • string
Example
null {null}, specifies the default visual appearance
"" {string}, no shape (no visual appearance is applied to any part of the control)
'{"hover":{"fillColor":"black","tfi":{"fgColor":"white"}}}(valuePoint)' {string}, shows the value-point in white on a black-background, while the cursor hovers it
"xxx(d),yyy(d,m),zzz(y)"  {string}, specifies that the exontrol.Shapes.Graph.xxx combined with exontrol.Shapes.Graph.yyy object defines the visual appearance of "d" part of the control, exontrol.Shapes.Graph.yyy object defines the visual appearance of "m" part of the control and exontrol.Shapes.Graph.zzz object defines the visual appearance of "y" part of the control
Shapes

Shortcuts :exontrol.Sts

The Shortcuts field defines the shortcuts of the control, as an object of exontrol.Sts type. The Shortcuts field defines the shortcuts of the control, as an object of exontrol.Sts type. The on() method enables you to listen for events and execute custom code when those events occur, or to define keyboard shortcuts that trigger specific actions within the component. You can use the on() method to enhance the interactivity and functionality of your application by responding to user actions or keyboard inputs. Use the off() method to remove previously bound event handlers or keyboard shortcuts. In order to provide keyboard support for the component, the owner <canvas> element must include the tabIndex attribute, as <canvas ... tabIndex="0">. You can associated a function or a callback to any shortcut.
Type:
  • exontrol.Sts
Shortcuts

Sort :string

The Sort property defines the list of series to be sorted, separated by spaces. The order of series in the Sort property determines the sorting priority, with the first series having the highest priority, the second series the next highest, and so on. The Sort property can be set to null to indicate that no sorting is applied, or to a string expression that specifies which series to sort and their sorting order. The sorting order can be ascending (A) or descending (D), with ascending being the default if not specified. Each element in the Sort property can specify the series by name or index and optionally include an inner index for multi-dimensional arrays, along with the sorting direction.

The data values in the chart are arranged using the following properties:

  • Sort, sorts the series values in ascending or descending order
  • reverse (option of CategoryAxisOptions type), reverses the position of the values as they were added (if no Sort is applied), or reverses the order produced by the Sort property (if Sort is applied)
  • Order, repositions values according to their zero-based indexes in a custom sequence

The custom order is cleared when Sort property or CategoryAxisOptions.reverse field is set, leaving the Order property empty.

Type:
  • string
Example
"name" {string}, sorts ascending the serie with the giving name
"0 1:D" {string}, sorts ascending the first-serie (for identichal values, the second serie determines the order of the values)
"ohlc[1]" {string}, sorts ascending the serie with the name "ohlc", by the second inner-value (the inner-value defines the element of an array-value, the [index] specifies the index of the inner-value to sort, the [index] is valid for charts that support multi-dimensional arrays such as "rangeColumn", "rangeArea", "candleStick" or "ohlc")
Sort

Statistics :string

The Statistics property gives statistics data of objects being hold by the control. The statistics data includes the control's size, zoom, number of series being displayed, compatibility-type of the graph-view, and other miscellaneous flags of the runtime-series (valid and compatibles series with their data). The statistics data is useful for debugging purposes, to get a quick overview of the control's current state.

The Statistics property returns statistics data of objects being hold by the control such as:

Size: 1,680x908
Zoom: 100%
Serie: 4/4
Compatibility: area-compat
Vertical: false
Length: 4x10
Type:
  • string
Example
The following statements are equivalents:

 oGraph.GetStatistics(), gives statistics data of objects being hold by the control
 oGraph.Statistics, gives statistics data of objects being hold by the control

where oGraph is an object of Graph type
Statistics

Tfi :string|object

The Tfi property defines the font attributes for the control's captions, allowing precise customization of their appearance by specifying the text style (such as bold or italic), font family, and font size, either as a string (e.g., "b monospace 16") or as an object (e.g., {bold: true, italic: false, fontName: "monospace", fontSize: 16}), and immediately applies these settings to update the displayed captions.

The value as {string} supports any of the following keywords (each keyword can be specified using first letters only such as "b" for "bold) separated by space characters:

  • bold, displays the text in bold (equivalent of <b> tag)
  • italic, displays the text in italics (equivalent of <i> tag)
  • underline, underlines the text (equivalent of <u> tag)
  • strikeout, specifies whether the text is strike-through (equivalent of <s> tag)
  • <fontName name>, specifies the font's family (equivalent of <font name> tag)
  • <fontSize size>, specifies the size of the font (equivalent of <font ;size> tag)
  • <fgColor CSSColor>, specifies the text's foreground color (equivalent of <fgcolor> tag)
  • <bgColor CSSColor>, specifies the text's background color (equivalent of <bgcolor> tag)
  • <shaColor CSSColor;width;offset>, defines the text's shadow (equivalent of <sha color;width;offset> tag)
  • <outColor CSSColor>, shows the text with outlined characters (CSScolor) (equivalent of <out color> tag)
  • <graColor CSSColor;mode;blend>, defines a gradient text (equivalent of <gra color;mode;blend> tag)

Any other word within the string value that's not recognized as a keyword is interpreted as:

  • name of the font (not a number), specifies the font's family (equivalent of <font name> tag)
  • size of the font (number), specifies the size of the font (equivalent of <font ;size> tag)

The value as {object} supports any of the following fields:

  • bold {boolean}, displays the text in bold (equivalent of <b> tag)
  • italic {boolean}, displays the text in italics (equivalent of <i> tag)
  • underline {boolean}, underlines the text (equivalent of <u> tag)
  • strikeout {boolean}, specifies whether the text is strike-through (equivalent of <s> tag)
  • fontName {string}, specifies the font's family (equivalent of <font name> tag)
  • fontSize {number}, specifies the size of the font (equivalent of <font ;size> tag)
  • fgColor {string}, specifies the text's foreground color (CSScolor) (equivalent of <fgcolor> tag)
  • bgColor {string}, specifies the text's background color (CSScolor) (equivalent of <bgcolor> tag)
  • shaColor {object}, specifies an object of {color, width, offset} type that defines the text's shadow (equivalent of <sha color;width;offset> tag), where:
    • color {string}, defines the color of the text's shadow (CSScolor)
    • width {number}, defines the size of the text's shadow
    • offset {number}, defines the offset to show the text's shadow relative to the text
  • outColor {string}, shows the text with outlined characters (CSScolor) (equivalent of <out color> tag)
  • graColor {object}, specifies an object of {color, mode, blend} type that defines a gradient text (equivalent of <gra color;mode;blend> tag), where:
    • color {string}, defines the gradient-color (CSScolor)
    • mode {number}, defines the gradient direction as 0 (left-right), 1 (default, top-bottom), 2 (left-center-right), and 3 (top-center-bottom)
    • blend {number}, defines the gradient blend as a value between 0 and 1

CSSColor or CSS legal color values can be specified by the following methods:

  • Hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF. For example, #0000ff value is rendered as blue, because the blue component is set to its highest value (ff) and the others are set to 00.
  • Hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF. For example, #0000ff80 defines a semi-transparent blue.
  • RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255. For example, rgb(0,0,255) defines the blue color.
  • RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, rgba(0,0,255,0.5) defines a semi-transparent blue.
  • HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors. For example, hsl(240, 100%, 50%) defines the blue color.
  • HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, hsla(240, 100%, 50%,0.5) defines a semi-transparent blue.
  • Predefined/Cross-browser color names, 140 color names are predefined in the HTML and CSS color specification. For example, blue defines the blue color.
Type:
  • string | object
Example
null {null}, the tfi field is ignored
"bold monospace 16 &lt;fg blue&gt;" {string}, defines Monospace font of 16px height, bold and blue
{bold: true, fontName: "monospace", fontSize: 16, fgColor: "blue"} {object}, defines Monospace font of 16px height, bold and blue
Tfi

ToolTipDelay :number

The ToolTipDelay property defines the time the mouse pointer must hover over an object before the tool tip appears. Setting it to 0 makes tool tips appear immediately, while a higher value (for example, 128) introduces a delay to prevent accidental pop-ups when moving the mouse quickly across the control. The ToolTipPopDelay property determines how long the tool tip remains visible (in milliseconds) if the mouse pointer stays stationary, and the ToolTipWidth property sets the maximum width of the control's tool tip in pixels.
Type:
  • number
Example
0 {number}, the tooltip is shown "immediately"
128 {number}, the tooltip is displayed in 128 ms.
ToolTipDelay

ToolTipFormat :string

The ToolTipFormat property defines the expression used to customize the tooltip displayed when the cursor hovers over value points of the chart. The ShowValue property of the Serie object determines whether value points are displayed on the chart. If the ShowValue property includes the exPoint flag, the tooltip appears when the cursor hovers over value points. The ToolTipFormat property can be set to null to use the default tooltip format, or to a string expression to define a custom format for the tooltip.

The format-expression supports predefined constants, operators and keywords as explained:

  • "value", {number} specifies the data point value
  • "name", {string} defines the name of the serie as specified by Name property
  • "user", {any} specifies the extra data associated with the serie as specified by UserData property (@since 4.8)
  • "index", {number} indicates the index of the category that contains the current value (@since 4.8)
  • "category", {string} specifies the category the current value is in (available only if applicable)
  • "percent", {number} indicates the percent of the item, as a number between 0 and 100 (available only if applicable)
  • "inner", {number} indicates the inner index of the value within the point data. For example, 0 represents the 'open' or 'from' value, 1 represents the 'high' or 'to' value, 2 represents the 'low' value, and 3 represents the 'close' value. This property is defined only for charts that require multi-dimensional arrays, such as candlestick chart types. (available only if applicable)
  • "%V0", "%V1", "%V2" or "%V3", {number} retrieve the designated values by referencing %V0 for the open value (for candlestick charts or "from" in column range charts), %V1 for the high value (for candlestick charts or "to" in column range charts), %V2 for the low value (for candlestick charts), and %V3 for the close value (for candlestick charts, defaulting to "value" if unavailable)
Type:
  • string
Example
null {null}, the name of the serie followed by the value, "(name ? name + ': ' : '') + value"
"``" {string}, no tooltip is shown
"value format ``" {string}, displays the values using two-decimals (according with the current regional settings)
ToolTipFormat

ToolTipPopDelay :number

The ToolTipPopDelay property defines the duration, in milliseconds, that a tooltip remains visible when the mouse pointer is stationary over a control. The ToolTipPopDelay property is expressed in milliseconds. The ToolTipDelay property defines how long the mouse pointer must hover over an object before the tooltip appears. The ToolTipWidth property specifies the width of the tooltip window in pixels. By default, the tooltip remains visible for 5000 milliseconds.
Type:
  • number
Example
0 {number}, no tooltip is shown for any object (disabled)
-1 {number}, the tooltip stays indefinitely (negative)
1000 {number}, the tooltip is visible for 1 second
ToolTipPopDelay

ToolTipWidth :number

The ToolTipWidth property defines the width of the tooltip window, in pixels. The ToolTipWidth property gets or sets the width of the tooltip window, in pixels. The ToolTipWidth property accepts a number value that specifies the width of the tooltip window, in pixels. The ToolTipDelay property gets or sets how long the mouse pointer must point to an object before the tool tip appears. The ToolTipPopDelay property gets or sets the period in ms of time the tool top remains visible if the mouse pointer is stationary within a control.
Type:
  • number
Example
0 {number}, no tooltip is shown for any object (disabled)
-1 {number}, the tooltip's content is displayed on a single line (without limit the width of it)
300 {number}, the tooltip's max-width is 300 pixels
ToolTipWidth

ValueAxis :ValueAxisOptions|Array.<ValueAxisOptions>

The ValueAxis property defines the chart's value axes. Unreferenced value axes display the data using the default value axis. The Axis property of the Serie object specifies the name of the value axis used by a series. The value axis represents the vertical axis (oY) for horizontal charts and the horizontal axis (oX) for vertical charts. The Vertical property of the Serie object specifies whether the chart is displayed vertically or horizontally. For xy-compatible chart types (scatter, scatterLine, or bubble), the XAxis and YAxis properties define the configuration of the horizontal and vertical axes, and the ValueAxis property is ignored. The ValueAxis property can be set to null to indicate that the chart uses a single default value axis, or to an object or an array of ValueAxisOptions to define one or more value axes with custom configurations.
Type:
Example
null {null}, the chart displays and uses a single value-axis
{tfi: "&lt;fgColor red&gt;"} {ValueAxisOptions}, shows the default value-axis in red
[{name: "celsius", min: 0, max: 100, majorUnit: 25}, {name: "kelvin", min: 273.15, max: 373.15, majorUnit: 25}] {ValueAxisOptions[]}, defines two value-axis celsius and kelvin (celsius is the default value axis)
ValueAxis

ValueSize :number

The ValueSize property defines the size of a column or bar in the chart, representing the width for horizontal charts or the height for vertical charts. It does not apply to chart types such as radarArea, radarLine, radarColumn, polarArea, polarLine, polarScatter, or pie, where element sizing is determined by the layout. The AutoFit property determines whether the control automatically resizes series elements to fit the available space. If AutoFit is true, elements are adjusted to prevent overlap and ensure readability. If false, elements retain their original size, which may cause overlap or truncation when data values are large or there are many series.

The valueSize has effect for area-compatible chart types as follows:

  • "area" {string}, an area chart or area graph displays graphically quantitative data. It is based on the line chart. The area between axis and line are commonly emphasized with colors, textures and hatchings. Commonly one compares two or more quantities with an area chart. (data requires array of numbers, supports vertical field, scrollable)
  • "line" {string}, a line chart or line graph, also known as curve chart is a type of chart which displays information as a series of data points called 'markers' connected by straight line segments. It is a basic type of chart common in many fields. It is similar to a scatter plot except that the measurement points are ordered (typically by their x-axis value) and joined with straight line segments. A line chart is often used to visualize a trend in data over intervals of time - a time series - thus the line is often drawn chronologically. In these cases they are known as run charts. (data requires array of numbers, supports vertical field, scrollable)
  • "column" {string}, a column chart or column graph is a chart or graph that presents categorical data with rectangular columns with heights proportional to the values that they represent. A horizontal column chart is called a bar chart. (data requires array of numbers, supports vertical field, scrollable)
  • "waterfall" {string}, a waterfall chart is a form of data visualization that helps in understanding the cumulative effect of sequentially introduced positive or negative values. These intermediate values can either be time based or category based. The waterfall chart is also known as a flying bricks chart or Mario chart due to the apparent suspension of columns (bricks) in mid-air. Often in finance, it will be referred to as a bridge. (data requires array of numbers, supports vertical field, scrollable)
  • "rangeArea" {string}, a range chart displays sets of data points, each of which is defined by multiple values for the same category, and emphasizes the distance between the two values. The category labels are displayed on the category axis. The plain Range chart fills in the area between the top and the bottom value for each data point. (data requires array of array of two-numbers, such as [[from, to]], supports vertical field, scrollable)
  • "rangeColumn" {string}, a range column chart displays information as a range of data by plotting two Y-values (low and high) per data point. The vertical axis shows the values, and the horizontal axis shows the categories they belong to; in multiple-series range column charts, values are grouped by categories. (data requires array of array of two-numbers, such as [[from, to]], supports vertical field, scrollable)
  • "candleStick" {string}, a candlestick chart (also called Japanese candlestick chart or K-line) is a style of financial chart used to describe price movements of a security, derivative, or currency. While similar in appearance to a bar chart, each candleStick represents four important pieces of information for that day: open and close in the thick body, and high and low in the "candle wick". Being densely packed with information, it tends to represent trading patterns over short periods of time, often a few days or a few trading sessions. (data requires array of array of four-numbers, such as [[open, high, low and close]], supports vertical field, scrollable)
  • "ohlc" {string}, an open-high-low-close chart (also OHLC) is a type of chart typically used to illustrate movements in the price of a financial instrument over time. Each vertical line on the chart shows the price range (the highest and lowest prices) over one unit of time, e.g., one day or one hour. Tick marks project from each side of the line indicating the opening price (e.g., for a daily bar chart this would be the starting price for that day) on the left, and the closing price for that time period on the right. The bars may be shown in different hues depending on whether prices rose or fell in that period. (data requires array of array of four-numbers, such as [[open, high, low and close]], supports vertical field, scrollable)
Type:
  • number
Example
4 {number}, sets the column/bar's width to 4-pixels
ValueSize

WheelChange :number

The WheelChange property defines the amount the calendar scrolls when the user rolls the mouse wheel. This setting allows you to adjust the sensitivity of the mouse wheel interaction with the control.
  • Setting wheelChange to 0 disables mouse wheel actions, preventing the control from changing when the wheel is scrolled
  • Setting wheelChange to a positive number, such as 5, increases the control's value by that amount each time the wheel is rotated, enabling faster adjustments

By modifying this value, you can fine-tune the control's responsiveness, making it easier for users to perform precise changes or larger adjustments as needed.

Type:
  • number
Example
0 {number}, locks any action the mouse's wheel performs
18 {number}, scrolls the control by 18-pixels when mouse's wheel is rotated (CTRL + wheel scrolls horizontally)
WheelChange

XAxis :ValueAxisOptions

The XAxis property defines the configuration options for the x-axis of xy-compatible chart types (scatter, scatterLine, or bubble). The YAxis property defines the configuration options for the y-axis of xy-compatible chart types (scatter, scatterLine, or bubble). For xy-compatible chart types, the XAxis and YAxis properties define the x and y axes, while the ValueAxis and CategoryAxis properties are ignored. The XAxis and YAxis properties can be set to null to use default axes, or to an object of ValueAxisOptions type to define custom configurations for the respective axis.
Type:
Example
null {null}, the chart displays the default x-axis
{tfi: "&lt;fgColor red&gt;"} {ValueAxisOptions}, shows the x-axis in red
{min: -100, max: 100, majorUnit: 25} {ValueAxisOptions}, redefines the min, max and major intervals for x-axis
XAxis

YAxis :ValueAxisOptions

The YAxis property defines the configuration options for the y-axis of xy-compatible chart types (scatter, scatterLine, or bubble). The XAxis property defines the configuration options for the x-axis of xy-compatible chart types (scatter, scatterLine, or bubble). For xy-compatible chart types, the XAxis and YAxis properties define the x and y axes, while the ValueAxis and CategoryAxis properties are ignored. The XAxis and YAxis properties can be set to null to use default axes, or to an object of ValueAxisOptions type to define custom configurations for the respective axis.
Type:
Example
null {null}, the chart displays the default y-ayis
{tfi: "&lt;fgColor red&gt;"} {ValueAxisOptions}, shows the y-ayis in red
{min: -100, may: 100, majorUnit: 25} {ValueAxisOptions}, redefines the min, may and major intervals for y-ayis
YAxis

Zoom :number

The Zoom property defines the zoom factor of the control's content. The zoom factor determines how much the control's content is magnified or reduced. Once the user adjusts the browser's zoom level, the control automatically recalculates its zoom factor to maintain the correct scaling of its content. The ZoomLevels property defines the allowed zoom levels the user can select from. By default, the Zoom property is set to null, indicating a normal view (100% zoom).
Type:
  • number
Example
null {null}, specifies normal-view (100%)
150 {number}, Indicates that the control's label is magnfied to 150%
Zoom

ZoomLevels :string

The ZoomLevels property defines the zoomLevels factor of the control's content. The zoom factor determines how much the control's content is magnified or reduced. Once the user adjusts the browser's zoom level, the control automatically recalculates its zoom factor to maintain the correct scaling of its content. The ZoomLevels property defines the allowed zoom levels the user can select from. By default, the Zoom property is set to null, indicating a normal view (100% zoom).
Type:
  • string
Example
null {null}, Specifies that the control's zoom factor is always 100%
150 {number}, Specifies that the control's zoom factor is always 150%
"50,100,200,350" {string}, Indicates that the zoom-factor can be any of selected values, and the levels of zoom-factor is 50% to 350%
ZoomLevels

oGV :GV

The oGV field references the control's default graph view. A control can display multiple graph views, each sharing the same data, but oGV always points to the first view created when the control is initialized. Options set at the control level (such as oGraph.Options) are applied to the default graph view (oGraph.oGV), and methods called on the control that affect a graph view will also target the default view unless another view is specified. All properties and methods of the default graph view can be accessed directly on the control, so you can use either properties or methods without referencing the oGV field.

For instance, the following statements are equivalent:

oGraph.oGV.Options = {cursor: {visible: true}}
oGraph.oGV.SetOptions({cursor: {visible: true}})
oGraph.Options = {cursor: {visible: true}}
oGraph.SetOptions({cursor: {visible: true}})

The AddGraphView() method adds a new view to the control. The RemoveGraphView() method removes a graph view that was previously created with AddGraphView(). The GraphView() method returns the graph view with the specified name.

Type:
oGV

Methods

AddGraphView(name, attributesopt) → {GV}

The AddGraphView() method creates a new view for displaying the series. A control can display multiple graph views, and all views share the same data. The RemoveGraphView() method removes a graph view previously created with AddGraphView(), but the control must always have at least one graph view to display the series, so the last remaining graph view cannot be removed. The name "graph" is reserved for the control's default graph view and cannot be used for other graph views. The oGV field always references the default graph view, which is the first view created when the control is initialized.
Parameters:
Name Type Attributes Description
name string defines the name of the graph-view to be created. It must be an unique name. The "graph" defines the control's default-graph view, and it is reserved. If missing, the "graph.split" is used instead.
attributes exontrol.W.Options <optional>
A exontrol.W.Options that defines the attributes of the window.
Properties
Name Type Description
Visible boolean The Visible field indicates whether the window is visible or hidden.
VisibleExtends string The VisibleExtends field specifies the list of windows the current window depends to be visible or hidden. A string expression that specifies the list of windows the current window's visibility depends on as explained:
  • if the VisibleExtends property includes the window itself, the window is visible if any window in VisibleExtends is visible, else
  • if the VisibleExtends property does NOT includes the window itself, the window is hidden if any window in VisibleExtends is hidden (or the window is visible if all VisibleExtends windows are visible)
AllowKeys boolean The AllowKeys field specifies whether the window can receive the Keys series. By default, only the canvas window receives all the keys.
Enabled boolean The Enabled field specifies whether the window is enabled or disabled (the window is protected and shown in gray).
Resizable boolean The Resizable field indicates whether the window is resizable or fixed.
Locked boolean The Locked field specifies that the window is locked (the window is protected).
Dock exontrol.WDT The Dock field specifies how the control borders are docked to its parent control and determines how a control is resized with its parent. The exontrol.WDT type supports the following values:
  • N(0), the window is not docked (none)
  • T(1), the window's top edge is docked to the top of its containing window (top)
  • B(2), the window's bottom edge is docked to the bottom of its containing window (bottom)
  • L(3), the window's left edge is docked to the left edge of its containing window (left)
  • R(4), the window's right edge is docked to the right edge of its containing window (right)
  • F(5), all the window's edges are docked to all edges of its containing window and sized appropriately (fill)
Size number The Size field defines the width/height of the window when it is docked.
SizeExtends string The SizeExtends field specifies the list of windows that shares the same size. Once a window is resized, all its SizeExtends windows are sized the same as the current one.
Client Array.<number> The Client field specifies position of the window relative to the parent window, as an array of [x,y,width,heigh] type.
Background string The Background field defines the window's background color ( CSS Color ) or null/undefined if not provided.
Foreground string The Foreground field defines the window's foreground color ( CSS Color ) or null/undefined if not provided.
Opacity number The Opacity field indicates the window's opacity, as a number between 0 and 1 (1 is not transparent at all, 0.5 is 50% see-through, and 0 is completely transparent).
HoverBackground string The HoverBackground field, defines the window's background color while the cursor hovers it ( CSS Color ) or null/undefined if not provided.
HoverForeground string The HoverForeground field defines the window's foreground color while the cursor hovers it( CSS Color ) or null/undefined if not provided.
HoverOpacity number The HoverOpacity field indicates the window's opacity, as a number between 0 and 1 (1 is not transparent at all, 0.5 is 50% see-through, and 0 is completely transparent), when the cursor hovers it.
DrawWindowFrame boolean The DrawWindowFrame field indicates whether the window draws its frame.
Extends string The Extends field indicates a list of windows separated by comma character to extend the current's client area to. The windows(child windows) must have the z-order greater than the z-order of the current window, else they will be ignored. The Extends field changes the z-order of the windows as well.
HoverExtends string The HoverExtends field specifies the list of windows separated by comma character that receives the hover-series once the cursor hovers the current window.
AllowXChg boolean The AllowXChg field specifies whether the window can exchange its UI position with another window. Only windows with AllowXChg field set can be exchanged.
XChgID string The XChgID field specifies the general expression, whose evaluated result defines the caption to be displayed on the window's anchor-exchange part. The expression supports keywords like index, name and shortname, that indicates the window's index, a value starting from 0, the window's name and short-name. The evaluated result can include exontrol's HTML tags that will be applied on the window's anchor-exchange element. If the expression is not valid, the XChgID value is used as it is.
Control object The Control field defines the control associated with the window (for internal use only).
HScroll string The HScroll field defines window's horizontal scroll bar. A string expression that indicates the name of the window that hosts an exontrol.SB control or an object of exontrol.SB type that defines the window's horizontal scroll bar (for internal use only).
VScroll string The VScroll field defines window's vertical scroll bar. A string expression that indicates the name of the window that hosts an exontrol.SB control or an object of exontrol.SB type that defines the window's vertical scroll bar (for internal use only).
Layout string The Layout field defines the properties (separated by comma) the GetLayout/SetLayout methods of CW saves/restores (for internal use only).
Returns:
Returns the newly created view as an object of GV type. Returns null, in case there is already a window with specified name.
Type
GV
Example
oGraph.AddGraphView("2nd",{Background: "black", Foreground: "white", Dock: 3}), adds a new graph-view panel, docked to the left-size, with a black-background and a white-foreground
AddGraphView

BeginUpdate()

The BeginUpdate() method suspends the control's render until the EndUpdate() method is called. It maintains performance, while multiple changes occurs within the control. The BeginUpdate() method is mostly used when you want to perform multiple changes to the control without refreshing the control after each change, and once all changes are performed, you can call the EndUpdate() method to refresh the control. You can use the Update() method to perform multiple changes at once. The Smooth() method makes the control transition smoothly from the current layout to a new layout. In short, it applies a gradual, animated change to the layout generated by the callback, instead of switching instantly. The BeginUpdate/EndUpdate() methods are not required to be called when you use the Update() or Smooth() methods, because the methods already maintain performance while performing multiple changes to the control.
Example
oGraph.BeginUpdate();
  // performs multiple changes to the control
oGraph.EndUpdate();
BeginUpdate

EndUpdate()

The EndUpdate() method resumes the control's render, after it is suspended by the BeginUpdate() method. The EndUpdate() method is mostly used after calling the BeginUpdate() method, to refresh the control after performing multiple changes to the control. You can use the Update() method to perform multiple changes at once. The Smooth() method makes the control transition smoothly from the current layout to a new layout. In short, it applies a gradual, animated change to the layout generated by the callback, instead of switching instantly. BeginUpdate/EndUpdate() methods are not required to be called when you use the Update() or Smooth() methods, because the methods already maintain performance while performing multiple changes to the control.
Example
oGraph.BeginUpdate();
 // performs multiple changes to the control
oGraph.EndUpdate();
EndUpdate

GetCanvas() → {HTMLCanvasElement}

The GetCanvas() method returns the HTMLCanvasElement object where the control is currently running on. The control is always running on a canvas, which is the canvas of the control's canvas-window (exontrol.CW). The GetCanvas() method is useful when you need to access the canvas directly. You can also use the GetCanvas() method to retrieve the canvas's context and perform custom drawing operations using the Canvas API. It is recommended to call the exontrol.CC.Resize(<canvas>, [width], [height]) method to resize and refresh the control; otherwise, the control's content is lost.
Since:
  • 3.0
Returns:
Returns the HTMLCanvasElement object where the control is currently running on.
Type
HTMLCanvasElement

GraphView(name) → {GV}

The GraphView() method gets the graph-view by name (which was previously created by the AddGraphView() method). The name "graph" is reserved for the control's default graph view and cannot be used for other graph views. The oGV field always references the default graph view, which is the first view created when the control is initialized.
Parameters:
Name Type Description
name string defines the name of the graph-view to request ("graph" defines the control's default-graph view).
Returns:
Returns null or the an object of GV type associated with the name
Type
GV
Example
oGraph.GraphView("2nd") {GV}, gets null or the graph-view with name "2nd" and stores it into the oGV variable as an object of GV type
GraphView

Home()

The Home() method zooms to 100% and scrolls the control to origin (0,0). The Home() method is used when the control has no series/layout, or to reset the zoom/scroll to its default values. The Zoom property defines the zoom factor of the control's content. The ScrollPos property defines the scroll position of the control's content. The Scroll method scrolls the view based on the giving key. The onscroll event notifies your application once the view has been scrolled.
Example
The following statements are equivalent:

 oGraph.oGV.Home(), zooms to 100% and scrolls the control to origin (0,0)
 oGraph.Home(), zooms to 100% and scrolls the control to origin (0,0)

where oGraph is an instance of Graph control
Home

Import(source, importOptsopt)

The Import() method imports data from CSV format. The Data property is equivalent with Import(value) method. The Import() method can import data from different sources, such as a URL to a CSV file, a string in CSV format, a local file, or an array of data. The Import() method accepts an optional parameter "importOpts" that specifies options to import data into the control, such as the maximum number of rows to import, the format of the source, and delimiters for parsing CSV data. The onload event occurs once the control loads or imports data, so you can use it to perform actions after importing data into the control. The onerror event occurs if the control encounters an error during the import process, allowing you to handle any issues that arise.
Parameters:
Name Type Attributes Description
source any The source parameter may be one of the following:
  • A String expression that specifies the URL to a CSV file (contains no eof, eor or str)
  • A String expression in CSV format
  • An object that includes the "files" member of FileList type (a local file)
  • An array of data to load
importOpts object <optional>
The importOpts parameter specifies options to import data into the control as object of ImportOptions type.
Properties
Name Type Description
limit number specifies the maximum number of rows/items/lines to import.
format string determines the format of source to import data from.
eor string | RegExp specifies the delimiter, which can be a character, string, or regular expression (@since 4.4), used to identify the end of a row, item, or line during parsing (has effect only if format field is "CSV").
eof string specifies the character to separate fields within the row/item/line (has effect only if format field is "CSV").
str string specifies the character to quote values (has effect only if format field is "CSV").
hdr boolean indicates whether the first line in data represents the control's legend (has effect only if format field is "CSV").
Example
oGraph.Import("data/aapl.txt"), imports data from a local CSV file located at "data/aapl.txt"
 oGraph.Import("https://example.com/data.csv"), imports data from a CSV file located at the specified URL
 oGraph.Import("Category,Value\nA,10\nB,20\nC,30"), imports data from a string in CSV format
 oGraph.Import(fileInput.files), imports data from a local file selected through an HTML file input element (where fileInput is a reference to the input element of type "file")
 oGraph.Import([[1, 10], [2, 20], [3, 30]]), imports data from an array of data to load
Import

Refresh()

The Refresh() method forces the control to redraw and update its layout without modifying any of its properties or data. It is typically used when the visual appearance needs to be recalculated or repainted, even though no structural or state changes were made.

For example, call Refresh() when:

  • The control's container has been resized and the layout must be recalculated.
  • External CSS or styling changes affect the control's appearance.
  • The control becomes visible after being hidden.
  • You need to ensure the UI is visually synchronized with its current internal state.

The method does not alter the control's data, options, or configuration - it only updates the rendered output.

Example
oGraph.Refresh(), refreshes the control
Refresh

RemoveGraphView(name)

The RemoveGraphView() method removes the view already created by the AddGraphView() method. The control must always have at least one graph view to display the series, so the last remaining graph view cannot be removed. The name "graph" is reserved for the control's default graph view and cannot be used for other graph views. The oGV field always references the default graph view, which is the first view created when the control is initialized.
Parameters:
Name Type Description
name string defines the name of the graph-view to be removed. The "graph" defines the control's default-graph view, and it can not be removed.
Example
oGraph.RemoveGraphView("2nd"), removes the graph-view with name "2nd"
RemoveGraphView

Reset()

The Reset() method resets the series, category axes, value axes, x-axes, and y-axes without affecting the control's data. The Reset() method is useful when you want to clear the current layout of the control and start fresh without modifying the underlying data. It allows you to reset the visual representation of the graph while keeping the data intact, which can be helpful when you want to apply new formatting, change the type of graph, or simply clear any customizations that were previously applied to the axes or series.
Since:
  • 4.4
Example
oGraph.Reset(), resets the series, category axes, value axes, x-axes, and y-axes without affecting the control's data
Reset

Scroll(key, countopt)

The Scroll() method scrolls the view based on the giving key. The ScrollPos property can be set to null to indicate that the control's content is not scrolled, or to an object of type {x, y} to define the horizontal and vertical scroll position. Setting the x property of ScrollPos to a value (for example, 100) scrolls the control's content horizontally to that position, while setting the y property scrolls the content vertically. This allows you to control the initial scroll position of the control's content, which can be useful for focusing on specific areas of a large chart or graph when it is first displayed. The onscroll event notifies your application once the view has been scrolled.
Parameters:
Name Type Attributes Description
key string Specifies a key to determines the direction to scroll the view as follows:
  • "Home" {string}, scrolls to the left/top of the control
  • "End" {string}, scrolls to the right/end of the control
  • "Prior" or "PageUp"{string}, scrolls by a page left/up
  • "Next" or "PageDown" {string}, scrolls by a page right/down
  • "Up" or "ArrowUp" {string}, scrolls up
  • "Down" or "ArrowDown" {string}, scrolls down
  • "Left" or "ArrowLeft" {string}, scrolls left
  • "Right" or "ArrowRight" {string}, scrolls right
count object <optional>
indicates the number of lines to scroll if key is "Up", "Down", "Left" or "Right"
Example
oGraph.Scroll("Home") {string}, scrolls to the left/top of the control
oGraph.Scroll("End") {string}, scrolls to the right/end of the control
Scroll

Serie(id) → {Serie}

The Serie() method returns a serie by its index or key/name/index. A control can display one or more series at the same time, depending on the graph-view type (for example, a graph view can combine line, column, or other compatible series types). Each serie contains the values for a specific category in the graph. For instance, in a sales chart, a serie can represent a product and include its sales values for each month category. Series are shared by all graph views of the control, so any change to a serie is reflected in all graph views. The Serie(id) method is equivalent to Series.Serie(id) of the Series object. The Series.Add method adds a new serie to the control and returns it as an object of type Serie.
Parameters:
Name Type Description
id any The serie parameter could be any of the following:
  • serie {number}, indicates a numeric value that defines the index of the serie to request (supports negative indices as well, where -1 returns the most recently added serie, -2 returns the serie added just before it, and so on @since 5.2)
  • serie {string}, specifies a string expression that defines the key/name/index of the serie to request
  • serie {Serie}, specifies the object reference to the serie to request for
Returns:
Returns null or an object of Serie type
Type
Serie
Example
oGraph.Serie(0), returns the first serie of the control
Serie

Smooth(callback, thisArg, oSmoothOptsopt, thisArg)

The Smooth() method makes the control transition smoothly from the current layout to a new layout. In short, it applies a gradual, animated change to the layout generated by the callback, instead of switching instantly. The smooth-transition goes from the current layout to the new layout generated by the callback. The Graph.Options.smooth field defines the time in ms the control goes from one layout to another. The BeginUpdate/EndUpdate() methods are not required to be called when you use the Update() or Smooth() methods, because the methods already maintain performance while performing multiple changes to the control.
Parameters:
Name Type Attributes Description
callback callback Indicates a callback function that generates the new layout for the control ( such as removing or adding new series to the control). The callback is provided with no arguments.
thisArg any Specifies the value of this keyword for callback functions. If missing, the GV object reference is used instead.
oSmoothOpts object <optional>
Indicates an object of {cbkR,cbkI,cbkT} type that defines callback to invoke when Smooth operation begins, progress and ends as explained below:
  • cbkR {callback}, specifies a function of callback(oSmooth) type that's invoked while Smooth progressively runs
  • cbkI {callback}, specifies a function of callback(oSmooth) type that's invoked once the Smooth operation begins
  • cbkT {callback}, specifies a function of callback(oSmooth) type that's invoked once the Smooth operation ends
The oSmooth's parameter of cbkI, cbkR or cbkT callbacks is undefined while no animated-smooth, else it includes the following:
  • oW {exontrol.W}, indicates the current window as an object of exontrol.W
  • oZ {exontrol.WS}, holds the current visible-windows as an object of exontrol.WS([exontrol.W => [x,y,width,height]]) type (before apply the callback)
  • oNewZ {exontrol.WS}, holds the new visible-windows as an object of exontrol.WS([exontrol.W => [x,y,width,height]]) type (after callback has been applied)
  • rgWFT {object}, holds a collection of changes within windows as an object of exontrol.M1([exontrol.W => {from: [x,y,width,height], to: [x,y,width,height]}]) type
  • oWRend {exontrol.W}, indicates the window being rendered during the "Smooth" animation. For instance, if no UI window has been affected, invalidates the current window only, else renders the entire-canvas
  • progress {number}, specifies the state of the "Smooth" animation as a value between 0 and 1 (used by oSmooth.oNewZ.cbkget to define the ratio of window's UI rectange from/to)
Additionally, the oSmooth parameter includes the following:
  • mV2FT {map}, specifies a map of [view => {"vp":{from,to}}] type that holds the from/to visible-points for each part of each view
thisArg any defines the value of "this" keyword during cbkI, cbkR or cbkT callbacks.
Example
oGraph.Smooth(function()
 {
  // performs multiple changes to the control, such as removing or adding new values to the serie
 })
Smooth

Update(callback, thisArgopt)

The Update() method locks the control's paint during the callback, and invalidates the control once the method ends. The BeginUpdate/EndUpdate() methods are not required to be called when you use the Update() or Smooth() methods, because the methods already maintain performance while performing multiple changes to the control. The BeginUpdate/EndUpdate() methods are not required to be called when you use the Update() or Smooth() methods, because the methods already maintain performance while performing multiple changes to the control.
Parameters:
Name Type Attributes Description
callback callback Indicates a callback to perform changes within the control.
thisArg any <optional>
Specifies the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Graph type.
Example
oGraph.Update(function()
{
 // performs multiple changes to the control
});
Update

ValueAutoFit()

The ValueAutoFit() method adjusts the column/bar size so that the entire chart fits within the client rectangle. The method computes the ValueSize property so "total" is fully covered by a specified "count" of categories. The "total" size to cover is determined by the chart's dimensions and layout, while the "count" of categories is based on the number of categories currently displayed in the chart. The method takes into account the margins and padding between values to ensure that the columns/bars are sized appropriately to fit within the available space without overlapping or leaving excessive gaps. The ValueAutoFit() method is particularly useful when the chart's data or dimensions change dynamically, allowing the chart to automatically adjust the size of its elements for optimal display. The AutoFit property determines whether the control automatically resizes series elements to fit the available space. If AutoFit is true, elements are adjusted to prevent overlap and ensure readability. If false, elements retain their original size, which may cause overlap or truncation when data values are large or there are many series.
Example
The following statements are equivalent:

 oGraph.oGV.ValueAutoFit(), adjusts the column/bar size to fit the chart's dimensions and layout
 oGraph.ValueAutoFit(), adjusts the column/bar size to fit the chart's dimensions and layout

where oGraph is an instance of the Graph control.
ValueAutoFit

feI(callback, thisArgopt)

The feI() method (short for forEachSerie) invokes the callback for each serie of the control. The feI() method is useful when you want to perform an action on each serie of the control, such as updating a property or applying a specific configuration. The callback function you provide will be executed for every serie, allowing you to manipulate or access the properties of each serie as needed.
Parameters:
Name Type Attributes Description
callback callback A function of callback(oSerie) type that's called for every serie, where oSerie is:
  • oSerie {Serie}, specifies a serie of Serie type
thisArg any <optional>
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Graph type.
Example
oGraph.feI(function(oSerie)
{
 // performs an action on each serie of the control, such as updating a property or applying a specific configuration
});
feI

feIU(callback, thisArgopt) → {any}

The feIU() method (short for forEachSerieUntil) invokes the callback for each serie of the control, until the callback returns a not-empty value. The feIU() method is useful when you want to perform an action on each serie of the control, such as updating a property or applying a specific configuration, but you want to stop the iteration as soon as a certain condition is met (for example, when a specific serie is found or when a "particular" property value is encountered). The callback function you provide will be executed for every serie until it returns a not-empty value, allowing you to manipulate or access the properties of each serie as needed while also providing a way to exit the loop early based on your criteria.
Parameters:
Name Type Attributes Description
callback callback A function of callback(oSerie) {any} type that's called for every serie, where oSerie is
  • oSerie {Serie}, specifies a serie of Serie type
thisArg any <optional>
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Graph type.
Returns:
Returns the last-value of the callback
Type
any
Example
var result = oGraph.feIU(function(oSerie)
{
 return (oSerie.UserData == "1234") && oSerie; // returns the serie with UserData property equal to "1234", and stops iterating on the rest of series
});
feIU

off(event, listener, methodopt)

The off() method removes a previously bound handler from a specified event, allowing you to stop listening for that event and prevent the associated actions from being executed. Also removes keyboard shortcuts previously defined using the on() method. The event name is case-insensitive and may or may not include the 'on' prefix. For example, 'click' is equivalent to 'onclick' and vice versa. If the event parameter is missing/empty/undefined, all event handlers are removed from the control. If the listener parameter is missing/empty/undefined, all handlers of the specified event are removed. If the method parameter is missing/empty/undefined, the listener[type]() function is used to compare and remove the handler(s).
Parameters:
Name Type Attributes Description
event string Indicates the event to unbind, which can either be:
  • event {string}, the name of the event to unbind. The event name is case-insensitive and may or may not include the 'on' prefix. For example, 'click' is equivalent to 'onclick' and vice versa.
  • event {string}, a string that encloses a shortcut in {}, such as "{Ctrl + A}", to unbind the keyboard shortcut
listener object | callback Defines the listener to remove, which can either be:
  • listener {callback}, a JavaScript callback function that was previously bound to the event (the method parameter has no effect)
  • listener {object}, an object that implements a notification method (e.g., listener[method](oEvent) or listener[type](oEvent)) that was previously used to handle the event
method string <optional>
Defines an optional case-sensitive string specifying the method on the listener to remove. If not provided, the listener[type]() function is used. This parameter is ignored when the listener is a JavaScript callback function.
Since:
  • 4.4
Example
The following example removes the click event handler from the control:

oGraph.off("click");

where oGraph is an object of Graph type.

This sample is equivalent to:

oGraph.Listeners.Remove("onclick");

The following example removes all event handlers from the control:

oGraph.off();

where oGraph is an object of Graph type.

This sample is equivalent to:

oGraph.Listeners.Clear();

or

oGraph.Listeners.Remove();
off

on(event, listener, methodopt) → {object}

The on() method adds an event listener to the specified event or defines a keyboard shortcut. The on() method enables you to listen for events and execute custom code when those events occur, or to define keyboard shortcuts that trigger specific actions within the component. You can use the on() method to enhance the interactivity and functionality of your application by responding to user actions or keyboard inputs. Use the off() method to remove previously bound event handlers or keyboard shortcuts.
Parameters:
Name Type Attributes Description
event string Specifies the event to listen for or a keyboard shortcut, in one of the following forms:
  • If the value is in the "{shortcut}" form (for example, "{Ctrl + A}"), it defines a keyboard shortcut. The callback is triggered when that key combination is pressed. To provide keyboard support for the component, the <canvas> element that hosts it needs to be focusable. To achieve this, you must include the tabIndex attribute in the canvas HTML tag (for example, <canvas tabIndex="0"></canvas>).

    See Shortcuts for more information. (for example, on("{Ctrl + A}", callback)). The shortcut-feature for on/off methods is supported from version 5.0.

  • Otherwise, the value is treated as a standard event name (for example, "click"), and the callback is invoked when that event occurs on the component. The event name is case-insensitive and may or may not include the 'on' prefix. For example, 'click' is equivalent to 'onclick' and vice versa.

    See Listeners for more information. (for example, on("click", callback)).

listener object | callback Defines the listener to add, which can either be:
  • listener {callback}, a JavaScript callback function to handle the event directly (the method parameter has not effect)
  • listener {object}, an object that implements a notification method (e.g., listener[method](oEvent) or listener[type](oEvent)) to handle the event when it occurs
method string <optional>
Defines an optional case-sensitive string specifying the method on the listener to handle the event. If not provided, the listener[type]() function is used. This parameter is ignored when the listener is a JavaScript callback function.
Since:
  • 4.4
Returns:
Returns the listeners of the specified type, as an exontrol.Arr({callback, thisArg, lock, name, equal}) type, which includes the following new members:
  • type {string}, specifies a case-sensitive string that specifies the type of event to listen for
  • do(event) {callback}, indicates a function that can be invoked to trigger the specified event for all listeners registered for that event type
where:
  • callback {callback}, defines the listener's callback function
  • thisArg {any}, defines the value of this during the listener's callback execution
  • lock {number}, locks or unlocks the invocation of the listener's callback
  • name {string}, defines the name of the callback, mostly used for debugging purposes
  • equal(oCompareListenerCallback) {callback}, indicates a function of callback(oCompareListenerCallback) {boolean} type compares the current object with the provided object. It returns true if the objects contain the same data
Type
object
Example
The following example logs event details when the control is clicked:

oGraph.on("click", function(oEvent)
{
  console.log(oEvent);
});

where oGraph is an object of Graph type.

This sample is quivalent of 

oGraph.Listeners.Add("onclick", function (oEvent)
{
  console.log(oEvent);
});

or

oGraph.on("click", function (oEvent)
{
  console.log(oEvent);
});
on

Events

onerror

The onerror event occurs when the control encounters an error. Its event handler receives an object of type DOMException (or any other type) that contains information about the error, such as its name, message, and stack trace. This information can be used to properly handle the error in your application, for example by displaying an error message to the user or logging details for debugging purposes. The Import method or the Data property may trigger the onerror event if an issue occurs during the import process, allowing you to detect and handle errors while loading data into the control.
Parameters:
Name Type Description
oEvent object Specifies an object of DOMException (or any other type) that contains details about the error. When using the Import method or the Data property, the oEvent object may be of type ProgressEvent, and error information can be accessed through the oEvent.target property. Most commonly, the issue is a CORS error, in which case oEvent.target.status is 0 and oEvent.target.readyState is 4.
Example
The following samples display the error once it occurs:

oGraph.onerror = function (oEvent)
{
 console.log(oEvent);
}

or

oGraph.Listeners.Add("onerror", function (oEvent)
{
 console.log(oEvent);
})

or

oGraph.on("error", function (oEvent)
{
 console.log(oEvent);
})

where oGraph is an object of Graph type
onerror

onload

The onload event occurs once the control loads or imports data. The onload event is useful for performing actions after the control has loaded or imported data, such as initializing the control with specific settings, updating the user interface, or processing the imported data. You can handle the onload event by assigning a function to the onload property of the control, or by using an event listener to listen for the "load" event. The event handler for the onload event does not receive any parameters, but you can access the control's properties and methods within the handler to perform necessary actions after loading or importing data. The Import method or the Data property may trigger the onload event when new data is loaded into the control, allowing you to respond to changes in the control's data and update the display accordingly. The onerror event occurs if the control encounters an error during the loading or importing process, allowing you to handle any issues that arise while loading data into the control.
Example
The following samples display a message once the control loads or imports new data (for instance, the user drags and drops a file into the control):

oGraph.onload = function ()
{
 alert("onload");
}

or

oGraph.Listeners.Add("onload", function ()
{
 alert("onload");
})

or

oGraph.on("load", function ()
{
 alert("onload");
})

where oGraph is an object of Graph type
onload