common

Classes

Chart

Type Definitions

BoxArray

Type:
Description: Coordinate box [top, right, bottom, left]

Properties:

Name Type Description
0 number top
1 number right
2 number bottom
3 number left
Source: common.mjs, line 16

TooltipPosition

Type:
Description: Chart Tooltip positions A string containing horizontal and/or veritical placement hints.

Properties:

Name Type Description
0 "left" | "center" | "right" | "leftright" Horizontal placement hints
1 "above" | "top" | "middle" | "bottom" | "below" Vertical placement hints
Source: common.mjs, line 27
Example
"left below"

AxisOptions

Type:
Description: Chart Axis options

Properties:

Name Type Default Description
disabled boolean <optional>
position "left" | "right" | "top" | "bottom" <optional> ("left"|"bottom") Where to place the axis
align "inside" | "outside" <optional> "outside" Alignment axis labels and ticks
ticks number <optional> Number of labeled ticks to draw.
showFirst boolean <optional> Show the first (visual-low) label of the axis
hideLast boolean <optional> Hide the last (visual-high) label of the axis
tickLength number <optional> 5 Size of the tick marks
format function <optional> Custom callback function for label values
padding string <optional> Custom axis label padding
rotate number <optional> Degrees of rotation. Negative values on an xAxis will invert the alignment.
Source: common.mjs, line 41

TooltipOptions

Type:
Description: Chart Tooltip options

Properties:

Name Type Default Description
disabled boolean <optional>
padding BoxArray <optional> Padding offsets for tooltip box
linger number <optional> 800 Milliseconds to linger before hiding
position TooltipPosition <optional> "leftright" Relative positioning of tooltip with respect to the pointer
format function <optional> Custom callback function for tooltip value
formatKey function <optional> Custom callback function for tooltip key
Source: common.mjs, line 58

DataEntry

Type:
Description: Chart type specific normalized data entry Source: common.mjs, line 72

ChartData

Type:
  • Array.<(DataEntry|DataValue|DataTuple)>
Description: Chart data array - Chart specific meaning Source: common.mjs, line 79

DataValue

Type:
Description: Value only for data entry. The X position is inferred by array index Source: common.mjs, line 86

DataTuple

Type:
Description: An array with the position/size and value components

Properties:

Name Type Description
0 number position/size
1 number value
Source: common.mjs, line 93

CoordTuple

Type:
Description: X, Y coordinate values

Properties:

Name Type Description
0 number X coordinate
1 number Y coordinate
Source: common.mjs, line 102

CoordRange

Type:
Description: Coordinate range tuple

Properties:

Name Type Description
0 number start value
1 number end value
Source: common.mjs, line 111

ChartOptions

Type:

Properties:

Name Type Description
el Element <optional> DOM Element to insert chart into
parent Chart <optional> Make this chart a child chart that shares one svg element
data ChartData <optional> Initial data to use for chart rendering
xMin number <optional> Minimum X data value
xMax number <optional> Maximum X data value
yMin number <optional> Minimum Y data value
yMax number <optional> Maximum Y data value
title string <optional> Visually displayed title of chart
color external:CSS_Color <optional> The CSS color basis for this chart's data
padding BoxArray <optional> Plot padding in DPI adjusted coordinates.
width number <optional> Fixed width of plot
height number <optional> Fixed height of plot
tooltip TooltipOptions <optional> Tooltip options
xAxis AxisOptions <optional> X axis options
yAxis AxisOptions <optional> Y axis options
disableAnimation boolean <optional> Disable all animation/transitions
darkMode boolean <optional> Force use of darkmode
Source: common.mjs, line 269

Events

tooltip

Type:
Description: Tooltip position event

Properties:

Name Type Description
x number <optional>
y number <optional>
index number <optional>
internal boolean Was the event triggered internally by pointer events
chart Chart
Source: common.mjs, line 120

zoom

Type:
Description: Zoom event

Properties:

Name Type Description
type "data" | "visual"
xRange CoordRange <optional>
yRange CoordRange <optional>
translate CoordTuple <optional>
scale number <optional>
internal boolean Was the event triggered internally by pointer events
chart Chart
Source: common.mjs, line 132