Skip to content

Commit

Permalink
fix(#8338): make boxplot work with single value per group
Browse files Browse the repository at this point in the history
  • Loading branch information
kanitw committed Oct 5, 2023
1 parent ff44fa8 commit e1438dd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/compositemark/boxplot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,17 @@ export function normalizeBoxPlot(

const makeBoxPlotExtent = makeBoxPlotPart(encodingWithoutSizeColorAndContinuousAxis);
const makeBoxPlotBox = makeBoxPlotPart(encodingWithoutContinuousAxis);
const makeBoxPlotMidTick = makeBoxPlotPart({...encodingWithoutSizeColorAndContinuousAxis, ...(size ? {size} : {})});
const defaultBoxColor = isObject(config.boxplot.box) ? config.boxplot.box.color : config.mark.color || '#4c78a8';
const makeBoxPlotMidTick = makeBoxPlotPart({
...encodingWithoutSizeColorAndContinuousAxis,
...(size ? {size} : {}),
color: {
condition: {
test: `datum['lower_box_${continuousAxisChannelDef.field}'] >= datum['upper_box_${continuousAxisChannelDef.field}']`,
...(color || {value: defaultBoxColor})
}
}
});

const fiveSummaryTooltipEncoding: Encoding<string> = getCompositeMarkTooltip(
[
Expand Down

0 comments on commit e1438dd

Please sign in to comment.