Skip to content

Commit 03d26de

Browse files
committed
move fields to trace style panel
1 parent da44b6d commit 03d26de

File tree

2 files changed

+39
-61
lines changed

2 files changed

+39
-61
lines changed

src/default_panels/StyleLayoutPanel.js

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
TextEditor,
1111
PlotlySection,
1212
TraceRequiredPanel,
13-
NumericFraction,
1413
} from '../components';
1514

1615
const StyleLayoutPanel = (props, {localize: _}) => (
@@ -37,64 +36,6 @@ const StyleLayoutPanel = (props, {localize: _}) => (
3736
{label: _('Disable'), value: false},
3837
]}
3938
/>
40-
41-
<PlotlySection name={_('Box Display Options')} attr="boxmode">
42-
<Radio
43-
label={_('Mode')}
44-
attr="boxmode"
45-
options={[
46-
{label: _('Overlay'), value: 'overlay'},
47-
{label: _('Group'), value: 'group'},
48-
]}
49-
/>
50-
<NumericFraction label={_('Gap Between Boxes')} attr="boxgap" />
51-
<NumericFraction
52-
label={_('Gap Between Boxes of Same Group')}
53-
attr="boxgroupgap"
54-
/>
55-
</PlotlySection>
56-
57-
<PlotlySection name={_('Bar Display Options')} attr="barmode">
58-
<Radio
59-
label={_('Mode')}
60-
attr="barmode"
61-
options={[
62-
{label: _('Overlay'), value: 'overlay'},
63-
{label: _('Group'), value: 'group'},
64-
{label: _('Stack'), value: 'stack'},
65-
{label: _('Relative'), value: 'relative'},
66-
]}
67-
/>
68-
<Radio
69-
label={_('Normalization for Bar Traces')}
70-
attr="barnorm"
71-
options={[
72-
{label: _('None'), value: ''},
73-
{label: _('Fraction'), value: 'fraction'},
74-
{label: _('Percent'), value: 'percent'},
75-
]}
76-
/>
77-
<NumericFraction label={_('Gap Between Bars')} attr="bargap" />
78-
<NumericFraction
79-
label={_('Gap Between Bars of Same Group')}
80-
attr="bargroupgap"
81-
/>
82-
</PlotlySection>
83-
<PlotlySection name={_('Violin Display Options')} attr="violinmode">
84-
<Radio
85-
label={_('Mode')}
86-
attr="violinmode"
87-
options={[
88-
{label: _('Overlay'), value: 'overlay'},
89-
{label: _('Group'), value: 'group'},
90-
]}
91-
/>
92-
<NumericFraction label={_('Gap Between Violins')} attr="violingap" />
93-
<NumericFraction
94-
label={_('Gap Between Violins of Same Group')}
95-
attr="violingroupgap"
96-
/>
97-
</PlotlySection>
9839
</PlotlyFold>
9940
<PlotlyFold name={_('Title and Fonts')}>
10041
<PlotlySection name={_('Title')} attr="title">

src/default_panels/StyleTracesPanel.js

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,47 @@ const StyleTracesPanel = (props, {localize: _}) => (
207207
<ColorPicker label={_('Border Color')} attr="marker.line.color" />
208208
</TraceMarkerSection>
209209
<LayoutSection name={_('Size and Spacing')}>
210-
<NumericFractionInverse label={_('Bar Width')} attr="bargap" />
210+
<Radio
211+
label={_('Box Mode')}
212+
attr="boxmode"
213+
options={[
214+
{label: _('Overlay'), value: 'overlay'},
215+
{label: _('Group'), value: 'group'},
216+
]}
217+
/>
211218
<NumericFractionInverse label={_('Box Width')} attr="boxgap" />
212-
<NumericFraction label={_('Bar Padding')} attr="bargroupgap" />
213219
<NumericFraction label={_('Box Padding')} attr="boxgroupgap" />
220+
<Radio
221+
label={_('Bar Mode')}
222+
attr="barmode"
223+
options={[
224+
{label: _('Overlay'), value: 'overlay'},
225+
{label: _('Group'), value: 'group'},
226+
{label: _('Stack'), value: 'stack'},
227+
{label: _('Relative'), value: 'relative'},
228+
]}
229+
/>
230+
<Radio
231+
label={_('Bar Normalization')}
232+
attr="barnorm"
233+
options={[
234+
{label: _('None'), value: ''},
235+
{label: _('Fraction'), value: 'fraction'},
236+
{label: _('Percent'), value: 'percent'},
237+
]}
238+
/>
239+
<NumericFractionInverse label={_('Bar Width')} attr="bargap" />
240+
<NumericFraction label={_('Bar Padding')} attr="bargroupgap" />
241+
<Radio
242+
label={_('Violin Mode')}
243+
attr="violinmode"
244+
options={[
245+
{label: _('Overlay'), value: 'overlay'},
246+
{label: _('Group'), value: 'group'},
247+
]}
248+
/>
249+
<NumericFractionInverse label={_('Violin Width')} attr="violingap" />
250+
<NumericFraction label={_('Violin Padding')} attr="violingroupgap" />
214251
</LayoutSection>
215252
<PlotlySection name={_('Ticks')}>
216253
<Numeric label={_('Width')} attr="tickwidth" />

0 commit comments

Comments
 (0)