Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct y axis title in boxplot when mark.extent isnt set #9483

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {accessWithDatumToUnescapedPath, isEmpty, omit, removePathFromField} from '../util';
import {accessWithDatumToUnescapedPath, 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
Loading