BoxplotChart
Defined in: charts/boxplot.ts:23
Boxplot / box-and-whisker chart.
Two input shapes are accepted:
- Pre-computed: rows with
min,q1,median,q3,max, optionaloutliers. - Raw samples:
mapping.y = 'samples'where each row’s value isnumber[].
Example
new BoxplotChart('#chart').setData([ { label: 'A', min: 5, q1: 12, median: 18, q3: 24, max: 31 }, { label: 'B', min: 8, q1: 14, median: 22, q3: 28, max: 36, outliers: [42] },]);Extends
Constructors
Constructor
new BoxplotChart(
container,config?):BoxplotChart
Defined in: core/base.ts:50
Parameters
container
string | HTMLElement
config?
BaseChartConfig = {}
Returns
BoxplotChart
Inherited from
Properties
animator
animator:
Animator
Defined in: core/base.ts:34
Inherited from
animProgress
animProgress:
number=1
Defined in: core/base.ts:37
Inherited from
canvas
canvas:
HTMLCanvasElement
Defined in: core/base.ts:31
Inherited from
config
config:
BoxplotChartConfig&Required<Pick<BaseChartConfig,"title"|"animate"|"animDuration"|"animEasing"|"responsive"|"showGrid"|"showTooltip"|"showLegend"|"legendPosition"|"subtitle">> &BaseChartConfig
Defined in: charts/boxplot.ts:24
Overrides
container
container:
HTMLElement
Defined in: core/base.ts:22
Inherited from
ctx
ctx:
CanvasRenderingContext2D
Defined in: core/base.ts:32
Inherited from
height
height:
number=0
Defined in: core/base.ts:40
Inherited from
hoverIndex
hoverIndex:
number=-1
Defined in: core/base.ts:36
Inherited from
padding
padding:
Padding
Defined in: core/base.ts:41
Inherited from
resolved
resolved:
ResolvedData
Defined in: core/base.ts:38
Inherited from
theme
theme:
Theme
Defined in: core/base.ts:33
Inherited from
tooltip
tooltip:
Tooltip|null
Defined in: core/base.ts:35
Inherited from
width
width:
number=0
Defined in: core/base.ts:39
Inherited from
Accessors
plotArea
Get Signature
get plotArea():
PlotArea
Defined in: core/base.ts:154
Returns
Inherited from
Methods
_draw()
_draw():
void
Defined in: charts/boxplot.ts:70
Returns
void
Overrides
_onMouse()
_onMouse(
e):void
Defined in: charts/boxplot.ts:49
Parameters
e
MouseEvent
Returns
void
Overrides
destroy()
destroy():
void
Defined in: core/base.ts:222
Returns
void
Inherited from
resize()
resize():
void
Defined in: core/base.ts:212
Returns
void
Inherited from
setData()
setData(
data,mapping?):void
Defined in: charts/boxplot.ts:28
Parameters
data
Record<string, any>[] | null | undefined
mapping?
Returns
void
Overrides
setTheme()
setTheme(
name):void
Defined in: core/base.ts:181
Parameters
name
string
Returns
void
Inherited from
toDataURL()
toDataURL(
type?,quality?):string
Defined in: core/base.ts:218
Export the current chart as a PNG data URL.
Parameters
type?
string = 'image/png'
quality?
number = 0.92
Returns
string
Inherited from
update()
update(
arg,mapping?):void
Defined in: core/base.ts:191
Polymorphic update:
- update(dataArray, mapping?) — replaces data (alias of setData).
- update(configPatch) — patches non-data config (theme, title, padding, etc.).
Parameters
arg
Record<string, any>[] | Partial<BaseChartConfig>
mapping?
Returns
void