Module: chart-utils
CORE PACK
JET Modules
See
JET Module Loading for an overview of module usage within JET.
Description
A collection of utility functions related to chart sub-element dimensions and coordinate values.
Functions
-
getLegend(element) : {{ bounds: Dimension; }|undefined}
-
Returns the bounds of the legend.
Parameters:
| Name |
Type |
Description |
element |
HTMLElement
|
An oj-c-line-chart or oj-c-area-chart element.
|
Returns:
-
Type
-
{ bounds: Dimension; }|undefined
-
getPlotArea(element) : {{ bounds: Dimension; }}
-
Returns the bounds of the plot area.
Parameters:
| Name |
Type |
Description |
element |
HTMLElement
|
An oj-c-line-chart or oj-c-area-chart element.
|
Returns:
-
Type
-
{ bounds: Dimension; }
-
getValuesAt(element, x, y) : {{ x: number | null; y: number | null; y2: number | null; }}
-
Returns the x, y, and y2 axis values at the specified X and Y coordinate.
Parameters:
| Name |
Type |
Description |
element |
HTMLElement
|
An oj-c-line-chart or oj-c-area-chart element.
|
x |
number
|
The X coordinate relative to the component.
|
y |
number
|
The Y coordinate relative to the component.
|
Returns:
-
Type
-
{ x: number | null; y: number | null; y2: number | null; }
-
getXaxis(element) : {{ getPreferredSize: (width: number, height: number) => { width: number; height: number; }; bounds: Dimension; }}
-
Returns the sizing information of the x axis.
Parameters:
| Name |
Type |
Description |
element |
HTMLElement
|
An oj-c-line-chart or oj-c-area-chart element.
|
Returns:
-
Type
-
{ getPreferredSize: (width: number, height: number) => { width: number; height: number; }; bounds: Dimension; }
-
getY2axis(element) : {{ getPreferredSize: (width: number, height: number) => { width: number; height: number; }; bounds: Dimension; }}
-
Returns the sizing information of the y2 axis.
Parameters:
| Name |
Type |
Description |
element |
HTMLElement
|
An oj-c-line-chart or oj-c-area-chart element.
|
Returns:
-
Type
-
{ getPreferredSize: (width: number, height: number) => { width: number; height: number; }; bounds: Dimension; }
-
getYaxis(element) : {{ getPreferredSize: (width: number, height: number) => { width: number; height: number; }; bounds: Dimension; }}
-
Returns the sizing information of the y axis.
Parameters:
| Name |
Type |
Description |
element |
HTMLElement
|
An oj-c-line-chart or oj-c-area-chart element.
|
Returns:
-
Type
-
{ getPreferredSize: (width: number, height: number) => { width: number; height: number; }; bounds: Dimension; }