Constructor
new BoxPlot(options)
- Source:
Examples
Browser usage:
const BoxPlotExample = new OECDCharts.BoxPlot({
container: '#BoxPlotExample',
title: 'Box Plot',
extent: [350, 650],
step: 50,
renderInfoButton: true,
data: [
{
values: [480, 500, 530],
colors: ['#fddd5d', '#C7754E', '#900c3f'],
labelLeft: {
text: 'male low'
},
labelRight: {
text: 'male top'
}
},
{
values: [400, 520, 550],
colors: ['#aad356', '#61B77F', '#189aa8']
}
]
});
ES6 modules usage:
import { BoxPlot } from 'oecd-simple-charts';
import 'oecd-simple-charts/build/oecd-simple-charts.css'
const boxPlot = new BoxPlot({ chartOptions });
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object | The options object for the Box Plot Properties
|
Methods
update(data)
- Source:
Example
BoxPlotExample.update([
{
values: [400, 550, 580],
colors: ['#fddd5d', '#C7754E', '#900c3f'],
labelLeft: {
text: 'new label left',
},
labelRight: {
text: 'new label right',
}
},
{
values: [400, 520, 570],
colors: ['#aad356', '#61B77F', '#189aa8']
}
]);
Parameters:
Name | Type | Description |
---|---|---|
data |
array | an array containing objects with the new data |