Skip to content

Commit a34761b

Browse files
Merge pull request #777 from plotly/plotly_142
Tracking Plotly 1.42.0
2 parents f4b7b99 + baa25d2 commit a34761b

File tree

5 files changed

+45
-29
lines changed

5 files changed

+45
-29
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-chart-editor",
33
"description": "plotly.js chart editor react component UI",
4-
"version": "0.32.1",
4+
"version": "0.33.0",
55
"author": "Plotly, Inc.",
66
"bugs": {
77
"url": "https://github.com/plotly/react-chart-editor/issues"
@@ -15,7 +15,7 @@
1515
"fast-isnumeric": "^1.1.1",
1616
"immutability-helper": "^2.7.1",
1717
"plotly-icons": "1.2.2",
18-
"plotly.js": "1.41.3",
18+
"plotly.js": "1.42.0",
1919
"prop-types": "^15.5.10",
2020
"raf": "^3.4.0",
2121
"react-color": "^2.13.8",

src/components/containers/TraceMarkerSection.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class TraceMarkerSection extends Component {
1818
if (['bar', 'histogram'].includes(traceType)) {
1919
this.name = _('Bars');
2020
} else if (traceType === 'pie') {
21-
this.name = _('Segments');
21+
this.name = _('Pie Segments');
2222
} else {
2323
this.name = _('Points');
2424
}

src/components/fields/derived.js

-9
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,6 @@ export const ContourNumeric = connectToContainer(UnconnectedNumeric, {
118118
},
119119
});
120120

121-
export const BinningNumeric = connectToContainer(UnconnectedNumeric, {
122-
modifyPlotProps: (props, context, plotProps) => {
123-
const {fullContainer} = plotProps;
124-
if (plotProps.isVisible && fullContainer && fullContainer[`autobin${props.axis}`]) {
125-
plotProps.isVisible = false;
126-
}
127-
},
128-
});
129-
130121
export const BinningDropdown = connectToContainer(UnconnectedDropdown, {
131122
modifyPlotProps: (props, context, plotProps) => {
132123
const {localize: _} = context;

src/default_panels/StyleLayoutPanel.js

+12
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
VisibilitySelect,
1414
HovermodeDropdown,
1515
Flaglist,
16+
Radio,
1617
} from '../components';
1718
import {HoverColor} from '../components/fields/derived';
1819

@@ -46,6 +47,17 @@ const StyleLayoutPanel = (props, {localize: _}) => (
4647
<ColorPicker label={_('Font Color')} attr="titlefont.color" />
4748
</PlotlySection>
4849
</PlotlyFold>
50+
51+
<PlotlyFold name={_('Modebar')}>
52+
<Radio
53+
label={_('Orientation')}
54+
attr="modebar.orientation"
55+
options={[{label: _('Horizontal'), value: 'h'}, {label: _('Vertical'), value: 'v'}]}
56+
/>
57+
<ColorPicker label={_('Icon Color')} attr="modebar.color" />
58+
<ColorPicker label={_('Active Icon Color')} attr="modebar.activecolor" />
59+
<ColorPicker label={_('Background Color')} attr="modebar.bgcolor" />
60+
</PlotlyFold>
4961
<PlotlyFold name={_('Layout')}>
5062
<VisibilitySelect
5163
attr="autosize"

src/default_panels/StyleTracesPanel.js

+30-17
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import {
3333
GroupCreator,
3434
} from '../components';
3535
import {
36-
BinningNumeric,
3736
BinningDropdown,
3837
NumericReciprocal,
3938
ShowInLegend,
@@ -85,6 +84,24 @@ const StyleTracesPanel = (props, {localize: _}) => (
8584
/>
8685
</LayoutSection>
8786
</TraceTypeSection>
87+
<PlotlySection name={_('Pie Title')} attr="title">
88+
<TextEditor label={_('Name')} attr="title" />
89+
<Dropdown
90+
label={'Title Position'}
91+
attr="titleposition"
92+
options={[
93+
{label: _('Top Left'), value: 'top left'},
94+
{label: _('Top Center'), value: 'top center'},
95+
{label: _('Top Right'), value: 'top right'},
96+
{label: _('Middle Center'), value: 'middle center'},
97+
{label: _('Bottom Left'), value: 'bottom left'},
98+
{label: _('Bottom Center'), value: 'bottom center'},
99+
{label: _('Bottom Right'), value: 'bottom right'},
100+
]}
101+
/>
102+
<FontSelector label={_('Typeface')} attr="titlefont.family" clearable={false} />
103+
<Numeric label={_('Font Size')} attr="titlefont.size" units="px" />
104+
</PlotlySection>
88105
<PlotlySection name={_('Values')}>
89106
<BinningDropdown label={_('Histogram Function')} attr="histfunc" />
90107
<Dropdown
@@ -176,23 +193,14 @@ const StyleTracesPanel = (props, {localize: _}) => (
176193
/>
177194
</PlotlySection>
178195
<PlotlySection name={_('Binning')}>
179-
<Radio
180-
label={_('X Binning')}
181-
attr="autobinx"
182-
options={[{label: _('Auto'), value: true}, {label: _('Custom'), value: false}]}
183-
/>
184-
<BinningNumeric label={_('X Bin Start')} attr="xbins.start" axis="x" />
185-
<BinningNumeric label={_('X Bin End')} attr="xbins.end" axis="x" />
186-
<BinningNumeric label={_('X Bin Size')} attr="xbins.size" axis="x" />
196+
<Numeric label={_('X Bin Start')} attr="xbins.start" axis="x" />
197+
<Numeric label={_('X Bin End')} attr="xbins.end" axis="x" />
198+
<Numeric label={_('X Bin Size')} attr="xbins.size" axis="x" />
187199
<Numeric label={_('Max X Bins')} attr="nbinsx" />
188-
<Radio
189-
label={_('Y Binning')}
190-
attr="autobiny"
191-
options={[{label: _('Auto'), value: true}, {label: _('Custom'), value: false}]}
192-
/>
193-
<BinningNumeric label={_('Y Bin Start')} attr="ybins.start" axis="y" />
194-
<BinningNumeric label={_('Y Bin End')} attr="ybins.end" axis="y" />
195-
<BinningNumeric label={_('Y Bin Size')} attr="ybins.size" axis="y" />
200+
201+
<Numeric label={_('Y Bin Start')} attr="ybins.start" axis="y" />
202+
<Numeric label={_('Y Bin End')} attr="ybins.end" axis="y" />
203+
<Numeric label={_('Y Bin Size')} attr="ybins.size" axis="y" />
196204
<Numeric label={_('Max Y Bins')} attr="nbinsy" />
197205
</PlotlySection>
198206
<PlotlySection label={_('Bar Position')}>
@@ -602,6 +610,11 @@ const StyleTracesPanel = (props, {localize: _}) => (
602610
</PlotlySection>
603611
<PlotlySection name={_('On Hover')}>
604612
<HoverInfo attr="hoverinfo" label={_('Values Shown On Hover')} />
613+
<Radio
614+
label={_('Split labels')}
615+
attr="hoverlabel.split"
616+
options={[{label: _('Yes'), value: true}, {label: _('No'), value: false}]}
617+
/>
605618
<VisibilitySelect
606619
attr="contour.show"
607620
label={_('Show Contour')}

0 commit comments

Comments
 (0)