Skip to content

Commit 385f9a2

Browse files
nicolaskruchtenVeraZab
authored andcommitted
tweaks
1 parent 304b7db commit 385f9a2

2 files changed

Lines changed: 61 additions & 65 deletions

File tree

src/default_panels/StyleLayoutPanel.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ const StyleLayoutPanel = (props, {localize: _}) => (
2626
<PlotlySection name={_('Color Scales')} attr="colorway">
2727
<ColorwayPicker label={_('Categorical')} attr="colorway" />
2828
<ColorscalePicker label={_('Sequential')} attr="colorscale.sequential" />
29-
<ColorscalePicker label={_('Diverging')} attr="colorscale.diverging" />
30-
<ColorscalePicker label={_('Sequential Negative')} attr="colorscale.sequentialminus" />
29+
<ColorscalePicker
30+
label={_('Diverging')}
31+
attr="colorscale.diverging"
32+
initialCategory="divergent"
33+
/>
34+
<ColorscalePicker label={_('Negative Sequential')} attr="colorscale.sequentialminus" />
3135
</PlotlySection>
3236
<PlotlySection name={_('Text')} attr="font.family">
3337
<FontSelector label={_('Typeface')} attr="font.family" clearable={false} />

src/default_panels/StyleTracesPanel.js

Lines changed: 55 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ const StyleTracesPanel = (props, {localize: _}) => (
144144
]}
145145
/>
146146
</PlotlySection>
147-
148147
<PlotlySection name={_('Header')}>
149148
<Numeric label={_('Height')} attr="header.height" />
150149
<MultiColorPicker label={_('Fill Color')} attr="header.fill.color" />
@@ -195,7 +194,38 @@ const StyleTracesPanel = (props, {localize: _}) => (
195194
label={_('Flatshading')}
196195
options={[{label: _('Enable'), value: true}, {label: _('Disable'), value: false}]}
197196
/>
198-
</PlotlySection>
197+
</PlotlySection>{' '}
198+
<TraceTypeSection
199+
name={_('Bar Grouping, Sizing and Spacing')}
200+
traceTypes={['bar', 'histogram']}
201+
mode="trace"
202+
>
203+
<LayoutSection attr="name">
204+
<Dropdown
205+
label={_('Bar Mode')}
206+
attr="barmode"
207+
options={[
208+
{label: _('Grouped'), value: 'group'},
209+
{label: _('Positive/Negative Stacked'), value: 'relative'},
210+
{label: _('Strict Sum Stacked'), value: 'stack'},
211+
{label: _('Overlaid'), value: 'overlay'},
212+
]}
213+
clearable={false}
214+
/>
215+
<Dropdown
216+
label={_('Normalization')}
217+
attr="barnorm"
218+
options={[
219+
{label: _('None'), value: ''},
220+
{label: _('Fraction'), value: 'fraction'},
221+
{label: _('Percent'), value: 'percent'},
222+
]}
223+
clearable={false}
224+
/>
225+
<NumericFractionInverse label={_('Bar Width')} attr="bargap" />
226+
<NumericFraction label={_('Bar Padding')} attr="bargroupgap" />
227+
</LayoutSection>
228+
</TraceTypeSection>
199229
<PlotlySection name={_('Binning')}>
200230
<NumericOrDate label={_('X Bin Start')} attr="xbins.start" axis="x" />
201231
<NumericOrDate label={_('X Bin End')} attr="xbins.end" axis="x" />
@@ -212,7 +242,29 @@ const StyleTracesPanel = (props, {localize: _}) => (
212242
<Numeric label={_('Offset')} attr="offset" />
213243
<Numeric label={_('Width')} attr="width" />
214244
</PlotlySection>
215-
245+
<TraceTypeSection name={_('Box Size and Spacing')} traceTypes={['box']} mode="trace">
246+
<LayoutSection attr="name">
247+
<Radio
248+
label={_('Box Mode')}
249+
attr="boxmode"
250+
options={[{label: _('Overlay'), value: 'overlay'}, {label: _('Group'), value: 'group'}]}
251+
/>
252+
<NumericFractionInverse label={_('Box Width')} attr="boxgap" />
253+
<NumericFraction label={_('Box Padding')} attr="boxgroupgap" />
254+
</LayoutSection>
255+
</TraceTypeSection>
256+
<TraceTypeSection name={_('Violin Size and Spacing')} traceTypes={['violin']} mode="trace">
257+
<LayoutSection attr="name">
258+
<Radio
259+
label={_('Violin Mode')}
260+
attr="violinmode"
261+
options={[{label: _('Overlay'), value: 'overlay'}, {label: _('Group'), value: 'group'}]}
262+
/>
263+
<NumericFractionInverse label={_('Violin Width')} attr="violingap" />
264+
<NumericFraction label={_('Violin Padding')} attr="violingroupgap" />
265+
</LayoutSection>
266+
</TraceTypeSection>
267+
<NumericFraction label={_('Whisker Width')} attr="whiskerwidth" />
216268
<TraceMarkerSection>
217269
<Radio
218270
label={_('Order')}
@@ -272,62 +324,6 @@ const StyleTracesPanel = (props, {localize: _}) => (
272324
<MultiColorPicker label={_('Border Color')} attr="marker.line.color" />
273325
<Numeric label={_('Max Number of Points')} attr="marker.maxdisplayed" />
274326
</TraceMarkerSection>
275-
276-
<TraceTypeSection
277-
name={_('Bar Size and Spacing')}
278-
traceTypes={['bar', 'histogram']}
279-
mode="trace"
280-
>
281-
<LayoutSection attr="name">
282-
<Dropdown
283-
label={_('Bar Mode')}
284-
attr="barmode"
285-
options={[
286-
{label: _('Overlay'), value: 'overlay'},
287-
{label: _('Group'), value: 'group'},
288-
{label: _('Stack'), value: 'stack'},
289-
{label: _('Relative'), value: 'relative'},
290-
]}
291-
clearable={false}
292-
/>
293-
<Dropdown
294-
label={_('Normalization')}
295-
attr="barnorm"
296-
options={[
297-
{label: _('None'), value: ''},
298-
{label: _('Fraction'), value: 'fraction'},
299-
{label: _('Percent'), value: 'percent'},
300-
]}
301-
clearable={false}
302-
/>
303-
<NumericFractionInverse label={_('Bar Width')} attr="bargap" />
304-
<NumericFraction label={_('Bar Padding')} attr="bargroupgap" />
305-
</LayoutSection>
306-
</TraceTypeSection>
307-
<TraceTypeSection name={_('Box Size and Spacing')} traceTypes={['box']} mode="trace">
308-
<LayoutSection attr="name">
309-
<Radio
310-
label={_('Box Mode')}
311-
attr="boxmode"
312-
options={[{label: _('Overlay'), value: 'overlay'}, {label: _('Group'), value: 'group'}]}
313-
/>
314-
<NumericFractionInverse label={_('Box Width')} attr="boxgap" />
315-
<NumericFraction label={_('Box Padding')} attr="boxgroupgap" />
316-
</LayoutSection>
317-
</TraceTypeSection>
318-
<TraceTypeSection name={_('Violin Size and Spacing')} traceTypes={['violin']} mode="trace">
319-
<LayoutSection attr="name">
320-
<Radio
321-
label={_('Violin Mode')}
322-
attr="violinmode"
323-
options={[{label: _('Overlay'), value: 'overlay'}, {label: _('Group'), value: 'group'}]}
324-
/>
325-
<NumericFractionInverse label={_('Violin Width')} attr="violingap" />
326-
<NumericFraction label={_('Violin Padding')} attr="violingroupgap" />
327-
</LayoutSection>
328-
</TraceTypeSection>
329-
330-
<NumericFraction label={_('Whisker Width')} attr="whiskerwidth" />
331327
<PlotlySection name={_('Ticks')}>
332328
<Numeric label={_('Width')} attr="tickwidth" />
333329
</PlotlySection>
@@ -632,27 +628,23 @@ const StyleTracesPanel = (props, {localize: _}) => (
632628
<Numeric label={_('Contour Width')} attr="contour.width" />
633629
</VisibilitySelect>
634630
</PlotlySection>
635-
636631
<PlotlySection name={_('Hover Action')}>
637632
<HoveronDropdown attr="hoveron" label={_('Hover on')} />
638633
</PlotlySection>
639-
640634
<TraceTypeSection
641635
name={_('Error Bars X')}
642636
traceTypes={['scatter', 'scattergl', 'scatter3d', 'bar']}
643637
mode="trace"
644638
>
645639
<ErrorBars attr="error_x" />
646640
</TraceTypeSection>
647-
648641
<TraceTypeSection
649642
name={_('Error Bars Y')}
650643
traceTypes={['scatter', 'scattergl', 'scatter3d', 'bar']}
651644
mode="trace"
652645
>
653646
<ErrorBars attr="error_y" />
654647
</TraceTypeSection>
655-
656648
<TraceTypeSection name={_('Error Bars Z')} traceTypes={['scatter3d']} mode="trace">
657649
<ErrorBars attr="error_z" />
658650
</TraceTypeSection>

0 commit comments

Comments
 (0)