@@ -19,6 +19,7 @@ export const AxisAnchorDropdown = connectToContainer(UnconnectedDropdown, {
19
19
let options = [ ] ;
20
20
21
21
if (
22
+ plotProps . fullContainer &&
22
23
plotProps . fullContainer . _subplot &&
23
24
plotProps . fullContainer . _subplot . includes ( 'xaxis' )
24
25
) {
@@ -29,6 +30,7 @@ export const AxisAnchorDropdown = connectToContainer(UnconnectedDropdown, {
29
30
} ;
30
31
} ) ;
31
32
} else if (
33
+ plotProps . fullContainer &&
32
34
plotProps . fullContainer . _subplot &&
33
35
plotProps . fullContainer . _subplot . includes ( 'yaxis' )
34
36
) {
@@ -48,6 +50,7 @@ export const AxisOverlayDropdown = connectToContainer(UnconnectedDropdown, {
48
50
modifyPlotProps : ( props , context , plotProps ) => {
49
51
let options = [ ] ;
50
52
if (
53
+ plotProps . fullContainer &&
51
54
plotProps . fullContainer . _subplot &&
52
55
plotProps . fullContainer . _subplot . includes ( 'xaxis' )
53
56
) {
@@ -58,6 +61,7 @@ export const AxisOverlayDropdown = connectToContainer(UnconnectedDropdown, {
58
61
} ;
59
62
} ) ;
60
63
} else if (
64
+ plotProps . fullContainer &&
61
65
plotProps . fullContainer . _subplot &&
62
66
plotProps . fullContainer . _subplot . includes ( 'yaxis' )
63
67
) {
@@ -71,7 +75,8 @@ export const AxisOverlayDropdown = connectToContainer(UnconnectedDropdown, {
71
75
72
76
// filter out the current axisID, can't overlay over itself
73
77
plotProps . options = options . filter (
74
- option => context . fullContainer . _id !== option . value
78
+ option =>
79
+ context . fullContainer && context . fullContainer . _id !== option . value
75
80
) ;
76
81
77
82
plotProps . clearable = true ;
@@ -80,25 +85,9 @@ export const AxisOverlayDropdown = connectToContainer(UnconnectedDropdown, {
80
85
81
86
export const RangesliderVisible = connectToContainer ( UnconnectedRadio , {
82
87
modifyPlotProps : ( props , context , plotProps ) => {
83
- if (
84
- ! plotProps . isVisible &&
85
- context . fullContainer . _id &&
86
- context . fullContainer . _id . startsWith ( 'x' )
87
- ) {
88
- plotProps . isVisible = true ;
89
- return ;
90
- }
91
- } ,
92
- } ) ;
93
-
94
- export const RangeselectorVisible = connectToContainer ( UnconnectedRadio , {
95
- modifyPlotProps : ( props , context , plotProps ) => {
96
- if (
97
- ! plotProps . isVisible &&
98
- context . fullContainer . _id &&
99
- context . fullContainer . _id . startsWith ( 'x' ) &&
100
- context . fullContainer . type === 'date'
101
- ) {
88
+ if ( ! plotProps . fullValue ) {
89
+ plotProps . fullValue = false ;
90
+ plotProps . visible = false ;
102
91
plotProps . isVisible = true ;
103
92
return ;
104
93
}
@@ -109,6 +98,7 @@ export const AxisSide = connectToContainer(UnconnectedRadio, {
109
98
modifyPlotProps : ( props , context , plotProps ) => {
110
99
const _ = props . localize ;
111
100
if (
101
+ context . fullContainer &&
112
102
context . fullContainer . _id &&
113
103
context . fullContainer . _id . startsWith ( 'y' )
114
104
) {
@@ -120,6 +110,7 @@ export const AxisSide = connectToContainer(UnconnectedRadio, {
120
110
}
121
111
122
112
if (
113
+ context . fullContainer &&
123
114
context . fullContainer . _id &&
124
115
context . fullContainer . _id . startsWith ( 'x' )
125
116
) {
0 commit comments