@@ -166,21 +166,30 @@ class UnconnectedMarkerColor extends Component {
166
166
167
167
renderVariableControls ( ) {
168
168
const _ = this . context . localize ;
169
+ const multiValued =
170
+ ( this . props . container &&
171
+ this . props . container . marker &&
172
+ ( this . props . container . marker . colorscale &&
173
+ this . props . container . marker . colorscale === MULTI_VALUED ) ) ||
174
+ ( this . props . container . marker . colorsrc &&
175
+ this . props . container . marker . colorsrc === MULTI_VALUED ) ;
169
176
return (
170
- < Fragment >
177
+ < Field multiValued = { multiValued } >
171
178
< DataSelector
179
+ suppressMultiValuedMessage
172
180
attr = "marker.color"
173
181
placeholder = { _ ( 'Select a Data Option' ) }
174
182
/>
175
183
{ this . props . container . marker &&
176
184
this . props . container . marker . colorscale === MULTI_VALUED ? null : (
177
185
< Colorscale
186
+ suppressMultiValuedMessage
178
187
attr = "marker.colorscale"
179
188
updatePlot = { this . setColorScale }
180
189
colorscale = { this . state . colorscale }
181
190
/>
182
191
) }
183
- </ Fragment >
192
+ </ Field >
184
193
) ;
185
194
}
186
195
@@ -195,20 +204,22 @@ class UnconnectedMarkerColor extends Component {
195
204
196
205
return (
197
206
< Fragment >
198
- < Field { ...this . props } multiValued = { this . isMultiValued ( ) } attr = { attr } >
199
- < RadioBlocks
200
- options = { options }
201
- activeOption = { type }
202
- onOptionChange = { this . setType }
203
- />
207
+ < Field { ...this . props } attr = { attr } >
208
+ < Field multiValued = { this . isMultiValued ( ) && ! this . state . type } >
209
+ < RadioBlocks
210
+ options = { options }
211
+ activeOption = { type }
212
+ onOptionChange = { this . setType }
213
+ />
204
214
205
- { ! type ? null : (
206
- < Info >
207
- { type === 'constant'
208
- ? _ ( 'All points in a trace are colored in the same color.' )
209
- : _ ( 'Each point in a trace is colored according to data.' ) }
210
- </ Info >
211
- ) }
215
+ { ! type ? null : (
216
+ < Info >
217
+ { type === 'constant'
218
+ ? _ ( 'All points in a trace are colored in the same color.' )
219
+ : _ ( 'Each point in a trace is colored according to data.' ) }
220
+ </ Info >
221
+ ) }
222
+ </ Field >
212
223
213
224
{ ! type
214
225
? null
0 commit comments