@@ -24,13 +24,23 @@ import {
2424 Dropdown ,
2525 FillDropdown ,
2626 FontSelector ,
27+ TextPosition ,
28+ DataSelector ,
2729} from '../components' ;
2830
2931import { localize } from '../lib' ;
3032
3133const StyleTracesPanel = ( { localize : _ } ) => (
3234 < TraceAccordion canGroup >
3335 < TextEditor label = { _ ( 'Name' ) } attr = "name" richTextOnly />
36+ < Radio
37+ label = "Show in Legend"
38+ attr = "showlegend"
39+ options = { [
40+ { label : _ ( 'Show' ) , value : true } ,
41+ { label : _ ( 'Hide' ) , value : false } ,
42+ ] }
43+ />
3444 < TraceOrientation
3545 label = { _ ( 'Orientation' ) }
3646 attr = "orientation"
@@ -41,7 +51,14 @@ const StyleTracesPanel = ({localize: _}) => (
4151 />
4252 < NumericFraction label = { _ ( 'Opacity' ) } attr = "opacity" />
4353 < ColorPicker label = { _ ( 'Color' ) } attr = "color" />
44-
54+ < Numeric
55+ showSlider
56+ min = { 0 }
57+ max = { 1 }
58+ step = { 0.1 }
59+ attr = "hole"
60+ label = { _ ( 'Hole' ) }
61+ />
4562 < PlotlySection name = { _ ( 'Text Attributes' ) } >
4663 < Flaglist
4764 attr = "textinfo"
@@ -53,7 +70,6 @@ const StyleTracesPanel = ({localize: _}) => (
5370 ] }
5471 />
5572 </ PlotlySection >
56-
5773 < PlotlySection name = { _ ( 'Header' ) } >
5874 < Numeric label = { _ ( 'Height' ) } attr = "header.height" />
5975 < ColorPicker label = { _ ( 'Fill Color' ) } attr = "header.fill.color" />
@@ -72,7 +88,6 @@ const StyleTracesPanel = ({localize: _}) => (
7288 < Numeric label = { _ ( 'Border Width' ) } attr = "header.line.width" />
7389 < ColorPicker label = { _ ( 'Border Color' ) } attr = "header.line.color" />
7490 </ PlotlySection >
75-
7691 < PlotlySection name = { _ ( 'Cells' ) } >
7792 < Numeric label = { _ ( 'Height' ) } attr = "cells.height" />
7893 < ColorPicker label = { _ ( 'Fill Color' ) } attr = "cells.fill.color" />
@@ -91,7 +106,6 @@ const StyleTracesPanel = ({localize: _}) => (
91106 < Numeric label = { _ ( 'Border Width' ) } attr = "cells.line.width" />
92107 < ColorPicker label = { _ ( 'Border Color' ) } attr = "cells.line.color" />
93108 </ PlotlySection >
94-
95109 < PlotlySection name = { _ ( 'Display' ) } >
96110 < Flaglist
97111 attr = "mode"
@@ -110,13 +124,19 @@ const StyleTracesPanel = ({localize: _}) => (
110124 ] }
111125 />
112126 </ PlotlySection >
113-
114127 < PlotlySection name = { _ ( 'Filled Area' ) } >
115128 < FillDropdown attr = "fill" label = { _ ( 'Fill to' ) } localize = { _ } />
116129 < ColorPicker label = { _ ( 'Color' ) } attr = "fillcolor" />
117130 </ PlotlySection >
118-
119131 < TraceMarkerSection >
132+ < Radio
133+ label = "Order"
134+ attr = "sort"
135+ options = { [
136+ { label : _ ( 'Sorted' ) , value : true } ,
137+ { label : _ ( 'Unsorted' ) , value : false } ,
138+ ] }
139+ />
120140 < Radio
121141 attr = "boxpoints"
122142 options = { [
@@ -134,28 +154,25 @@ const StyleTracesPanel = ({localize: _}) => (
134154 />
135155 < ColorscalePicker label = { _ ( 'Colorscale' ) } attr = "marker.colorscale" />
136156 < ColorPicker label = { _ ( 'Color' ) } attr = "marker.color" />
157+ < DataSelector label = { 'Colors' } attr = "marker.colors" />
137158 < NumericFraction label = { _ ( 'Opacity' ) } attr = "marker.opacity" />
138159 < Numeric label = { _ ( 'Size' ) } attr = "marker.size" />
139160 < SymbolSelector label = { _ ( 'Symbol' ) } attr = "marker.symbol" />
140161 < Numeric label = { _ ( 'Border Width' ) } attr = "marker.line.width" />
141162 < ColorPicker label = { _ ( 'Border Color' ) } attr = "marker.line.color" />
142163 </ TraceMarkerSection >
143-
144164 < LayoutSection name = { _ ( 'Size and Spacing' ) } >
145165 < NumericFractionInverse label = { _ ( 'Bar Width' ) } attr = "bargap" />
146166 < NumericFractionInverse label = { _ ( 'Box Width' ) } attr = "boxgap" />
147167 < NumericFraction label = { _ ( 'Bar Padding' ) } attr = "bargroupgap" />
148168 < NumericFraction label = { _ ( 'Box Padding' ) } attr = "boxgroupgap" />
149169 </ LayoutSection >
150-
151170 < PlotlySection name = { _ ( 'Ticks' ) } >
152171 < Numeric label = { _ ( 'Width' ) } attr = "tickwidth" />
153172 </ PlotlySection >
154-
155173 < PlotlySection name = { _ ( 'Whiskers' ) } >
156174 < Numeric label = { _ ( 'Width' ) } attr = "whiskerwidth" />
157175 </ PlotlySection >
158-
159176 < TraceTypeSection
160177 name = { _ ( 'Lines' ) }
161178 traceTypes = { [
@@ -196,32 +213,19 @@ const StyleTracesPanel = ({localize: _}) => (
196213 ] }
197214 />
198215 </ TraceTypeSection >
199-
200216 < TraceTypeSection
201217 name = { _ ( 'Text' ) }
202- traceTypes = { [ 'scatter' , 'scatterpolar' , 'scatterpolargl' ] }
218+ traceTypes = { [ 'scatter' , 'scatterpolar' , 'scatterpolargl' , 'pie' ] }
203219 >
204220 < FontSelector label = { _ ( 'Typeface' ) } attr = "textfont.family" />
205221 < Numeric label = { _ ( 'Font Size' ) } attr = "textfont.size" units = "px" />
206222 < ColorPicker label = { _ ( 'Font Color' ) } attr = "textfont.color" />
207- < Dropdown
223+ < TextPosition
208224 label = { _ ( 'Text Position' ) }
209225 attr = "textposition"
210- clearable = { false }
211- options = { [
212- { label : _ ( 'Top Left' ) , value : 'top left' } ,
213- { label : _ ( 'Top Center' ) , value : 'top center' } ,
214- { label : _ ( 'Top Right' ) , value : 'top right' } ,
215- { label : _ ( 'Middle Left' ) , value : 'middle left' } ,
216- { label : _ ( 'Middle Center' ) , value : 'middle center' } ,
217- { label : _ ( 'Middle Right' ) , value : 'middle right' } ,
218- { label : _ ( 'Bottom Left' ) , value : 'bottom left' } ,
219- { label : _ ( 'Bottom Center' ) , value : 'bottom center' } ,
220- { label : _ ( 'Bottom Right' ) , value : 'bottom right' } ,
221- ] }
226+ localize = { _ }
222227 />
223228 </ TraceTypeSection >
224-
225229 < PlotlySection name = { _ ( 'Colorscale' ) } >
226230 < ColorscalePicker label = { _ ( 'Colorscale' ) } attr = "colorscale" />
227231 < Radio
@@ -251,12 +255,10 @@ const StyleTracesPanel = ({localize: _}) => (
251255 ] }
252256 />
253257 </ PlotlySection >
254-
255258 < PlotlySection name = { _ ( 'Heatmap' ) } >
256259 < Numeric label = { _ ( 'Horizontal Gaps' ) } attr = "xgap" />
257260 < Numeric label = { _ ( 'Vertical Gaps' ) } attr = "ygap" />
258261 </ PlotlySection >
259-
260262 < TraceTypeSection
261263 name = { _ ( 'Gaps in Data' ) }
262264 traceTypes = { [ 'heatmap' , 'contour' , 'heatmapgl' ] }
@@ -270,7 +272,6 @@ const StyleTracesPanel = ({localize: _}) => (
270272 ] }
271273 />
272274 </ TraceTypeSection >
273-
274275 < PlotlySection name = { _ ( 'Contours' ) } >
275276 < Radio
276277 label = { _ ( 'Coloring' ) }
@@ -303,7 +304,6 @@ const StyleTracesPanel = ({localize: _}) => (
303304 < ContourNumeric label = { _ ( 'Min Contour' ) } attr = "contours.start" />
304305 < ContourNumeric label = { _ ( 'Max Contour' ) } attr = "contours.end" />
305306 </ PlotlySection >
306-
307307 < PlotlySection name = { _ ( 'Lighting' ) } >
308308 < NumericFraction label = { _ ( 'Ambient' ) } attr = "lighting.ambient" />
309309 < NumericFraction label = { _ ( 'Diffuse' ) } attr = "lighting.diffuse" />
@@ -319,13 +319,11 @@ const StyleTracesPanel = ({localize: _}) => (
319319 attr = "lighting.facenormalsepsilon"
320320 />
321321 </ PlotlySection >
322-
323322 < PlotlySection name = { _ ( 'Light Position' ) } >
324323 < NumericFraction label = { _ ( 'X' ) } attr = "lightposition.x" />
325324 < NumericFraction label = { _ ( 'Y' ) } attr = "lightposition.y" />
326325 < NumericFraction label = { _ ( 'Z' ) } attr = "lightposition.z" />
327326 </ PlotlySection >
328-
329327 < PlotlySection name = { _ ( 'Increasing Trace Styles' ) } >
330328 < TextEditor label = { _ ( 'Name' ) } attr = "increasing.name" richTextOnly />
331329 < Numeric label = { _ ( 'Width' ) } attr = "increasing.line.width" />
@@ -341,7 +339,6 @@ const StyleTracesPanel = ({localize: _}) => (
341339 ] }
342340 />
343341 </ PlotlySection >
344-
345342 < PlotlySection name = { _ ( 'Decreasing Trace Styles' ) } >
346343 < TextEditor label = { _ ( 'Name' ) } attr = "decreasing.name" richTextOnly />
347344 < Numeric label = { _ ( 'Width' ) } attr = "decreasing.line.width" />
@@ -357,7 +354,6 @@ const StyleTracesPanel = ({localize: _}) => (
357354 ] }
358355 />
359356 </ PlotlySection >
360-
361357 < PlotlySection name = { _ ( 'Highlight' ) } >
362358 < Radio
363359 attr = "boxmean"
@@ -376,7 +372,6 @@ const StyleTracesPanel = ({localize: _}) => (
376372 ] }
377373 />
378374 </ PlotlySection >
379-
380375 < PlotlySection name = { _ ( 'On Hover' ) } >
381376 < HoverInfo
382377 attr = "hoverinfo"
@@ -394,7 +389,6 @@ const StyleTracesPanel = ({localize: _}) => (
394389 < ColorPicker label = { _ ( 'Contour Color' ) } attr = "contour.color" />
395390 < Numeric label = { _ ( 'Contour Width' ) } attr = "contour.width" />
396391 </ PlotlySection >
397-
398392 < TraceTypeSection name = { _ ( 'Hover Action' ) } traceTypes = { [ 'box' ] } >
399393 < Flaglist
400394 attr = "hoveron"
@@ -405,7 +399,6 @@ const StyleTracesPanel = ({localize: _}) => (
405399 ] }
406400 />
407401 </ TraceTypeSection >
408-
409402 < TraceTypeSection
410403 name = { _ ( 'Hover Action' ) }
411404 traceTypes = { [
0 commit comments