Skip to content

Documentation / @ripl/charts / createBoxPlotChart

Function: createBoxPlotChart()

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

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

Factory function that creates a new BoxPlotChart.

Type Parameters

Type ParameterDefault type
TDataunknown

Parameters

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

Returns

BoxPlotChart<TData>

Example

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