@@ -3,6 +3,7 @@ import {UnconnectedDropdown} from './Dropdown';
3
3
import { UnconnectedDropdownCustom } from './DropdownCustom' ;
4
4
import { UnconnectedFlaglist } from './Flaglist' ;
5
5
import { UnconnectedNumeric } from './Numeric' ;
6
+ import { UnconnectedNumericOrDate } from './NumericOrDate' ;
6
7
import { UnconnectedAxisRangeValue } from './AxisRangeValue' ;
7
8
import { UnconnectedRadio } from './Radio' ;
8
9
import Info from './Info' ;
@@ -432,7 +433,7 @@ export const PositioningRef = connectToContainer(UnconnectedDropdown, {
432
433
} ,
433
434
} ) ;
434
435
435
- export const PositioningNumeric = connectToContainer ( UnconnectedNumeric , {
436
+ export const PositioningNumeric = connectToContainer ( UnconnectedNumericOrDate , {
436
437
modifyPlotProps : ( props , context , plotProps ) => {
437
438
const { fullContainer, fullValue, updatePlot} = plotProps ;
438
439
if (
@@ -676,3 +677,15 @@ export const HoverColor = connectToContainer(UnconnectedColorPicker, {
676
677
return plotProps ;
677
678
} ,
678
679
} ) ;
680
+
681
+ export const BinSize = connectToContainer ( UnconnectedNumeric , {
682
+ modifyPlotProps : ( props , context , plotProps ) => {
683
+ const { localize : _ } = context ;
684
+ if ( typeof plotProps . fullValue === 'string' && plotProps . fullValue [ 0 ] === 'M' ) {
685
+ plotProps . fullValue = plotProps . fullValue . substring ( 1 ) ;
686
+ plotProps . min = 1 ;
687
+ plotProps . max = 12 ;
688
+ plotProps . units = parseInt ( plotProps . fullValue , 10 ) === 1 ? _ ( 'Month' ) : _ ( 'Months' ) ;
689
+ }
690
+ } ,
691
+ } ) ;
0 commit comments