Skip to content

Commit 85ae2c2

Browse files
committed
fix 'r' label
1 parent d3dc27d commit 85ae2c2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/axes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ function autoAxisLabelsY(axis, opposite, scale, channels) {
9393
scale.label = axis.label;
9494
}
9595

96-
export function autoScaleLabel(scale, channels, {color} = {}) {
96+
export function autoScaleLabel(scale, channels, options) {
9797
if (scale === undefined) return;
98-
if (color !== undefined) scale.label = color.label;
98+
if (options !== undefined) scale.label = options.label;
9999
if (scale.label === undefined) {
100100
scale.label = inferLabel(channels, scale, {});
101101
}

src/plot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function plot(options = {}) {
5353
autoAxisTicks(scaleDescriptors, axes);
5454
autoAxisLabels(scaleChannels, scaleDescriptors, axes, dimensions);
5555
for (const key of ["color", "r", "opacity"]) {
56-
autoScaleLabel(scaleDescriptors[key], scaleChannels.get(key), options);
56+
autoScaleLabel(scaleDescriptors[key], scaleChannels.get(key), options[key]);
5757
}
5858

5959
// Normalize the options.

0 commit comments

Comments
 (0)