Function boxWhiskerProcessResult
boxWhiskerProcessResult(
boxWhiskerData,outliersData,dataOptions?):QueryResultData
Processes box whisker data and outliers data to combine them into a single data set.
Parameters
| Parameter | Type | Description |
|---|---|---|
boxWhiskerData | QueryResultData | The data for the box whisker. |
outliersData | QueryResultData | The data for the outliers. |
dataOptions? | BoxplotChartCustomDataOptions | Optional data options for customizing data processing. |
Returns
The combined data with outliers included in the box whisker plot.
Example
Without custom dataOptions, the category is expected at column index 0, and the whisker min/max at columns 4 and 5, matching the query shape used internally by BoxplotChart.
import { boxWhiskerProcessResult } from '@sisense/sdk-ui';
const boxWhiskerData = {
columns: [
{ name: 'Category' },
{ name: 'Median' },
{ name: 'Q1' },
{ name: 'Q3' },
{ name: 'Min' },
{ name: 'Max' },
],
rows: [[{ data: 'A' }, { data: 30 }, { data: 20 }, { data: 40 }, { data: 10 }, { data: 50 }]],
};
const outliersData = {
columns: [{ name: 'Category' }, { name: 'Value' }],
rows: [[{ data: 'A' }, { data: 75 }]],
};
// Each result row gains an extra cell listing outlier values outside the whisker range.
const combined = boxWhiskerProcessResult(boxWhiskerData, outliersData);