Skip to content

Commit 7114a65

Browse files
committed
Use NumericOrDate
1 parent c66e803 commit 7114a65

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/default_panels/StyleColorbarsPanel.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
FontSelector,
1515
ColorPicker,
1616
VisibilitySelect,
17+
NumericOrDate,
1718
} from '../components';
1819

1920
export const traceHasColorbar = (trace, fullTrace) =>
@@ -211,7 +212,7 @@ const StyleColorBarsPanel = (props, {localize: _}) => {
211212
label={_('Tick spacing')}
212213
/>
213214

214-
<Numeric label={_('Step Offset')} attr={prefix + 'colorbar.tick0'} />
215+
<NumericOrDate label={_('Step Offset')} attr={prefix + 'colorbar.tick0'} />
215216
<Numeric label={_('Step Size')} attr={prefix + 'colorbar.dtick'} />
216217
<Numeric label={_('Max Number of Labels')} attr={prefix + 'colorbar.nticks'} />
217218
</VisibilitySelect>
@@ -239,7 +240,7 @@ const StyleColorBarsPanel = (props, {localize: _}) => {
239240
label={_('Tick spacing')}
240241
/>
241242

242-
<Numeric label={_('Step Offset')} attr={prefix + 'colorbar.tick0'} />
243+
<NumericOrDate label={_('Step Offset')} attr={prefix + 'colorbar.tick0'} />
243244
<Numeric label={_('Step Size')} attr={prefix + 'colorbar.dtick'} />
244245
<Numeric label={_('Max Number of Labels')} attr={prefix + 'colorbar.nticks'} />
245246
</VisibilitySelect>

src/default_panels/StyleTracesPanel.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
DataSelector,
3232
VisibilitySelect,
3333
GroupCreator,
34+
NumericOrDate,
3435
} from '../components';
3536
import {
3637
BinningDropdown,
@@ -193,13 +194,13 @@ const StyleTracesPanel = (props, {localize: _}) => (
193194
/>
194195
</PlotlySection>
195196
<PlotlySection name={_('Binning')}>
196-
<Numeric label={_('X Bin Start')} attr="xbins.start" axis="x" />
197-
<Numeric label={_('X Bin End')} attr="xbins.end" axis="x" />
198197
<Numeric label={_('X Bin Size')} attr="xbins.size" axis="x" />
198+
<NumericOrDate label={_('X Bin Start')} attr="xbins.start" axis="x" />
199+
<NumericOrDate label={_('X Bin End')} attr="xbins.end" axis="x" />
199200
<Numeric label={_('Max X Bins')} attr="nbinsx" />
200201

201-
<Numeric label={_('Y Bin Start')} attr="ybins.start" axis="y" />
202-
<Numeric label={_('Y Bin End')} attr="ybins.end" axis="y" />
202+
<NumericOrDate label={_('Y Bin Start')} attr="ybins.start" axis="y" />
203+
<NumericOrDate label={_('Y Bin End')} attr="ybins.end" axis="y" />
203204
<Numeric label={_('Y Bin Size')} attr="ybins.size" axis="y" />
204205
<Numeric label={_('Max Y Bins')} attr="nbinsy" />
205206
</PlotlySection>

0 commit comments

Comments
 (0)