Skip to content

Documentation / @ripl/charts / createBoxPlotChart

Function: createBoxPlotChart() ​

createBoxPlotChart<TData>(target, options): BoxPlotChart<TData>

Defined in: charts/src/charts/box-plot.ts:651

Factory function that creates a new BoxPlotChart.

Type Parameters ​

Type ParameterDefault type
TDataunknown

Parameters ​

ParameterType
targetstring | HTMLElement | Context<Element, Record<string, unknown>>
optionsBoxPlotChartOptions<TData>

Returns ​

BoxPlotChart<TData>

Example ​

ts
createBoxPlotChart(target, {
    data: [
        { team: 'A', score: 82 },
        { team: 'A', score: 91 },
        { team: 'B', score: 74 },
    ],
    key: 'team',
    value: 'score',
});