Skip to content

Commit

Permalink
fix: correct y axis title in boxplot when mark.extent isnt set
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcBaeuerle committed Nov 30, 2024
1 parent 8fa04c8 commit 25b3365
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/compositemark/boxplot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {MarkInvalidMixins} from '../invalid';
import {NormalizerParams} from '../normalize';
import {GenericUnitSpec, NormalizedLayerSpec, NormalizedUnitSpec} from '../spec';
import {AggregatedFieldDef, CalculateTransform, JoinAggregateTransform, Transform} from '../transform';
import {isEmpty, omit, removePathFromField} from '../util';
import {removePathFromField} from '../util';
import {CompositeMarkNormalizer} from './base';
import {
compositeMarkContinuousAxis,
Expand Down Expand Up @@ -301,7 +301,6 @@ export function normalizeBoxPlot(

const {scale, axis} = continuousAxisChannelDef;
const title = getTitle(continuousAxisChannelDef);
const axisWithoutTitle = omit(axis, ['title']);

const outlierLayersMixins = partLayerMixins<BoxPlotPartsMixins>(markDef, 'outliers', config.boxplot, {
transform: [{filter: `(${fieldExpr} < ${lowerWhiskerExpr}) || (${fieldExpr} > ${upperWhiskerExpr})`}],
Expand All @@ -312,8 +311,7 @@ export function normalizeBoxPlot(
type: continuousAxisChannelDef.type,
...(title !== undefined ? {title} : {}),
...(scale !== undefined ? {scale} : {}),
// add axis without title since we already added the title above
...(isEmpty(axisWithoutTitle) ? {} : {axis: axisWithoutTitle})
...(axis !== undefined ? {axis} : {})
},
...encodingWithoutSizeColorContinuousAxisAndTooltip,
...(color ? {color} : {}),
Expand Down

0 comments on commit 25b3365

Please sign in to comment.