Skip to content

Commit 6c1b2fa

Browse files
nicolaskruchtenVeraZab
authored andcommitted
title -> title.text
1 parent 589dd0c commit 6c1b2fa

5 files changed

Lines changed: 18 additions & 19 deletions

File tree

examples/custom/src/CustomEditor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default class CustomEditor extends Component {
5757
/>
5858
<Flaglist
5959
label="Flaglist"
60-
attr="titlefont.family"
60+
attr="title.font.family"
6161
show
6262
options={[{label: 'Yes', value: 'y'}, {label: 'No', value: 'n'}]}
6363
/>

src/default_panels/StyleAxesPanel.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class StyleAxesPanel extends Component {
3131
name={_('Titles')}
3232
axisFilter={axis => !(axis._name.includes('angular') || axis._subplot.includes('geo'))}
3333
>
34-
<TextEditor attr="title" />
35-
<FontSelector label={_('Typeface')} attr="titlefont.family" />
36-
<Numeric label={_('Font Size')} attr="titlefont.size" units="px" />
37-
<ColorPicker label={_('Font Color')} attr="titlefont.color" />
34+
<TextEditor attr="title.text" />
35+
<FontSelector label={_('Typeface')} attr="title.font.family" />
36+
<Numeric label={_('Font Size')} attr="title.font.size" units="px" />
37+
<ColorPicker label={_('Font Color')} attr="title.font.color" />
3838
</AxesFold>
3939

4040
<AxesFold name={_('Range')}>

src/default_panels/StyleColorbarsPanel.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@ const StyleColorBarsPanel = (props, {localize: _}) => {
3838

3939
<Dropdown
4040
label={_('Location')}
41-
attr={prefix + 'colorbar.titleside'}
41+
attr={prefix + 'colorbar.title.side'}
4242
options={[
4343
{label: _('Top'), value: 'top'},
4444
{label: _('Right'), value: 'right'},
4545
{label: _('Bottom'), value: 'bottom'},
4646
]}
4747
/>
48-
<FontSelector label={_('Typeface')} attr={prefix + 'colorbar.titlefont.family'} />
48+
<FontSelector label={_('Typeface')} attr={prefix + 'colorbar.title.font.family'} />
4949
<Numeric
5050
label={_('Font Size')}
51-
attr={prefix + 'colorbar.titlefont.size'}
51+
attr={prefix + 'colorbar.title.font.size'}
5252
units="px"
5353
/>
54-
<ColorPicker label={_('Font Color')} attr={prefix + 'colorbar.titlefont.color'} />
54+
<ColorPicker label={_('Font Color')} attr={prefix + 'colorbar.title.font.color'} />
5555
</PlotlyFold>
5656
<PlotlyFold name={_('Size and Positioning')}>
5757
<PlotlySection name={_('Size')} attr={prefix + 'colorbar.len'}>

src/default_panels/StyleLayoutPanel.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,11 @@ const StyleLayoutPanel = (props, {localize: _}) => (
4040
</PlotlyFold>
4141

4242
<PlotlyFold name={_('Title')}>
43-
<PlotlySection name={_('Title')} attr="title">
44-
<TextEditor attr="title" />
45-
<FontSelector label={_('Typeface')} attr="titlefont.family" clearable={false} />
46-
<Numeric label={_('Font Size')} attr="titlefont.size" units="px" />
47-
<ColorPicker label={_('Font Color')} attr="titlefont.color" />
48-
</PlotlySection>
43+
<TextEditor attr="title.text" />
44+
<FontSelector label={_('Typeface')} attr="title.font.family" clearable={false} />
45+
<Numeric label={_('Font Size')} attr="title.font.size" units="px" />
46+
<ColorPicker label={_('Font Color')} attr="title.font.color" />
47+
<Numeric label={_('Horizontal Position')} showSlider step={0.02} attr="title.x" />
4948
</PlotlyFold>
5049

5150
<PlotlyFold name={_('Modebar')}>

src/default_panels/StyleTracesPanel.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ const StyleTracesPanel = (props, {localize: _}) => (
8686
/>
8787
</LayoutSection>
8888
</TraceTypeSection>
89-
<PlotlySection name={_('Pie Title')} attr="title">
90-
<TextEditor label={_('Name')} attr="title" />
89+
<PlotlySection name={_('Pie Title')} attr="title.text">
90+
<TextEditor label={_('Name')} attr="title.text" />
9191
<Dropdown
9292
label={'Title Position'}
9393
attr="titleposition"
@@ -101,8 +101,8 @@ const StyleTracesPanel = (props, {localize: _}) => (
101101
{label: _('Bottom Right'), value: 'bottom right'},
102102
]}
103103
/>
104-
<FontSelector label={_('Typeface')} attr="titlefont.family" clearable={false} />
105-
<Numeric label={_('Font Size')} attr="titlefont.size" units="px" />
104+
<FontSelector label={_('Typeface')} attr="title.font.family" clearable={false} />
105+
<Numeric label={_('Font Size')} attr="title.font.size" units="px" />
106106
</PlotlySection>
107107
<PlotlySection name={_('Values')}>
108108
<BinningDropdown label={_('Histogram Function')} attr="histfunc" />

0 commit comments

Comments
 (0)