diff --git a/src/mark.js b/src/mark.js index d7daa06ae1..c815f76be0 100644 --- a/src/mark.js +++ b/src/mark.js @@ -46,9 +46,9 @@ export class Mark { Object.entries(channels) .map(([name, channel]) => { if (isOptions(channel.value)) { - // apply scale overrides - const {value, scale = channel.scale} = channel.value; - channel = {...channel, scale, value}; + // apply scale and label overrides + const {value, label = channel.label, scale = channel.scale} = channel.value; + channel = {...channel, label, scale, value}; } if (data === singleton && typeof channel.value === "string") { // convert field names to singleton values for decoration marks (e.g., frame) diff --git a/test/plots/tip-format.ts b/test/plots/tip-format.ts index f928f4fcf8..51afdd1110 100644 --- a/test/plots/tip-format.ts +++ b/test/plots/tip-format.ts @@ -61,7 +61,7 @@ export async function tipFormatPairedLabel() { } export async function tipFormatPairedLabelChannel() { - return tip({length: 1}, {x1: Object.assign([0], {label: "Low"}), x2: Object.assign([1], {label: "High"})}); + return tip({length: 1}, {x1: {value: [0], label: "Low"}, x2: {value: [1], label: "High"}}); } export async function tipFormatPairedLabelScale() {