new Graph(client, oOptionsopt)
- 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
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 controlis associated with the property:
AllowActions {string}, customizes the actions the user can perform once the user clicks or touches the controlwhich means that the following statements are equivalent:
oGraph.Options = {allowActions: "scroll"}where oGraph is an object of Graph type
oGraph.SetOptions({allowActions: "scroll"})
oGraph.AllowActions = "scroll"
oGraph.SetAllowActions("scroll")
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
client |
any | The client parameter indicates the control's client area as:
|
|
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
Members
(static, readonly) AxisTypeEnum :number
- 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:
|
exLogarithmic |
1 |
number | Defines a logarithmic scale, where equal spacing on the axis represents equal ratios of change. The exLogarithmic type acts as:
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
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
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
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
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
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
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
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
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
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
Type:
- string
- Since:
- 1.8
Example
console.log(exontrol.Graph.type); // logs "Graph"
(static, readonly) version :string
Type:
- string
Example
console.log(exontrol.Graph.version); // logs "5.2"
AllowActions :string
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
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
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
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
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>
Type:
- CategoryAxisOptions | Array.<CategoryAxisOptions>
Example
null {null}, removes the categories of the chart (@since 4.3)
{tfi: "<fgColor red>"} {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 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 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 "part" 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
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
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
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 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
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
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
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
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 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
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
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
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
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
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 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 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 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
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 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
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
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
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 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>
Type:
- object | SerieOptions | Array.<object> | Array.<SerieOptions>
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 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)
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
Type:
- exontrol.Sts
Sort :string
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 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 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:
- 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 <fg blue>" {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
Type:
- number
Example
0 {number}, the tooltip is shown "immediately"
128 {number}, the tooltip is displayed in 128 ms.
ToolTipDelay
ToolTipFormat :string
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
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
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>
Type:
- ValueAxisOptions | Array.<ValueAxisOptions>
Example
null {null}, the chart displays and uses a single value-axis
{tfi: "<fgColor red>"} {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 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
- 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
Type:
Example
null {null}, the chart displays the default x-axis
{tfi: "<fgColor red>"} {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
Type:
Example
null {null}, the chart displays the default y-ayis
{tfi: "<fgColor red>"} {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
Type:
- number
Example
null {null}, specifies normal-view (100%)
150 {number}, Indicates that the control's label is magnfied to 150%
Zoom
ZoomLevels :string
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
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:
Methods
AddGraphView(name, attributesopt) → {GV}
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
|
Returns:
- 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()
Example
oGraph.BeginUpdate();
// performs multiple changes to the control
oGraph.EndUpdate();
BeginUpdate
EndUpdate()
Example
oGraph.BeginUpdate();
// performs multiple changes to the control
oGraph.EndUpdate();
EndUpdate
GetCanvas() → {HTMLCanvasElement}
- Since:
- 3.0
Returns:
- Type
- HTMLCanvasElement
GraphView(name) → {GV}
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | defines the name of the graph-view to request ("graph" defines the control's default-graph view). |
Returns:
- 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()
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)
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
source |
any | The source parameter may be one of the following:
|
||||||||||||||||||||||
importOpts |
object |
<optional> |
The importOpts parameter specifies options to import data into the control as object of ImportOptions type.
Properties
|
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()
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)
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()
- 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)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
key |
string | Specifies a key to determines the direction to scroll the view as follows:
|
|
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}
Parameters:
| Name | Type | Description |
|---|---|---|
id |
any | The serie parameter could be any of the following:
|
Returns:
- Type
- Serie
Example
oGraph.Serie(0), returns the first serie of the control
Serie
Smooth(callback, thisArg, oSmoothOptsopt, thisArg)
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:
|
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)
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()
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)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
callback |
callback | A function of callback(oSerie) type that's called for every serie, where oSerie is:
|
|
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}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
callback |
callback | A function of callback(oSerie) {any} type that's called for every serie, where oSerie is
|
|
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:
- 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)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
event |
string | Indicates the event to unbind, which can either be:
|
|
listener |
object | callback | Defines the listener to remove, which can either be:
|
|
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}
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
event |
string | Specifies the event to listen for or a keyboard shortcut, in one of the following forms:
|
|
listener |
object | callback | Defines the listener to add, which can either be:
|
|
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:
- 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
- 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
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
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