Skip to content
Merged
Show file tree
Hide file tree
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: 3 additions & 3 deletions src/mark.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/plots/tip-format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down