Skip to content

Commit 4318f45

Browse files
committed
fix default label text generator
1 parent 86a3167 commit 4318f45

File tree

1 file changed

+4
-2
lines changed
  • src/components/rangeselector

1 file changed

+4
-2
lines changed

src/components/rangeselector/draw.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@ function drawButtonText(button, selectorLayout, d) {
138138
}
139139

140140
function getLabel(opts) {
141-
if(opts.step === 'all') return 'reset';
141+
if(opts.label) return opts.label;
142142

143-
return opts.label || opts.count + ' ' + opts.step.charAt(0);
143+
if(opts.step === 'all') return 'all';
144+
145+
return opts.count + opts.step.charAt(0);
144146
}
145147

146148
function reposition(gd, buttons, opts, axName) {

0 commit comments

Comments
 (0)