Skip to content

Commit b02b1e2

Browse files
committed
update examples to title.text
1 parent 1ef9108 commit b02b1e2

9 files changed

+59
-17
lines changed

_posts/plotly_js/basic/horizontal-bar/2015-08-11-barchart-with-line-plot.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@
4848
var data = [trace1, trace2];
4949

5050
var layout = {
51-
title: 'Household Savings & Net Worth for Eight OECD Countries',
51+
title: {
52+
text: 'Household Savings & Net Worth for Eight OECD Countries'
53+
},
5254
xaxis1: {
5355
range: [0, 20],
5456
domain: [0, 0.5],

_posts/plotly_js/basic/line-plots/2015-04-09-line-style.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,20 @@
6565
var data = [trace1, trace2, trace3, trace4];
6666

6767
var layout = {
68-
title: 'Quarter 1 Growth',
68+
title: {
69+
text: 'Quarter 1 Growth'
70+
},
6971
xaxis: {
70-
title: 'GDP per Capita',
72+
title: {
73+
text: 'GDP per Capita'
74+
},
7175
showgrid: false,
7276
zeroline: false
7377
},
7478
yaxis: {
75-
title: 'Percent',
79+
title: {
80+
text: 'Percent'
81+
},
7682
showline: false
7783
}
7884
};

_posts/plotly_js/basic/line-plots/2015-08-07-Connect-gaps-between-data.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
var data = [trace1, trace2];
2525

2626
var layout = {
27-
title: 'Connect the Gaps Between Data',
27+
title: {
28+
text: 'Connect the Gaps Between Data'
29+
},
2830
showlegend: false
2931
};
3032

_posts/plotly_js/basic/line-plots/2015-08-07-graph-and-axis-titles.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,18 @@
3131
var data = [trace1, trace2, trace3];
3232

3333
var layout = {
34-
title: 'Title of the Graph',
34+
title: {
35+
text: 'Title of the Graph'
36+
},
3537
xaxis: {
36-
title: 'x-axis title'
38+
title: {
39+
text: 'x-axis title'
40+
}
3741
},
3842
yaxis: {
39-
title: 'y-axis title'
43+
title: {
44+
text: 'y-axis title'
45+
}
4046
}
4147
};
4248

_posts/plotly_js/basic/line-plots/2015-08-07-line-and-scatter-styling.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
var data = [trace1, trace2, trace3];
4545

4646
var layout = {
47-
title: 'Line and Scatter Styling'
47+
title: {
48+
text: 'Line and Scatter Styling'
49+
}
4850
};
4951

5052
Plotly.newPlot('myDiv', data, layout);

_posts/plotly_js/basic/line-plots/2015-08-07-line-dash.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
var data = [trace1, trace2, trace3, trace4];
5555

5656
var layout = {
57-
title: 'Line Dash',
57+
title: {
58+
text: 'Line Dash'
59+
},
5860
xaxis: {
5961
range: [0.75, 5.25],
6062
autorange: false

_posts/plotly_js/basic/line_and_scatter/2015-08-11-scater-with-color-dimension.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
var data = [trace1];
2020

2121
var layout = {
22-
title: 'Scatter Plot with a Color Dimension'
22+
title: {
23+
text: 'Scatter Plot with a Color Dimension'
24+
}
2325
};
2426

2527
Plotly.newPlot('myDiv', data, layout);

_posts/plotly_js/basic/line_and_scatter/2022-12-13-group-scatter-setting-gap.html

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,19 @@
3535

3636
var layout = {
3737
scattermode: 'group',
38-
title: 'Grouped by Country',
39-
xaxis: {title: 'Country'},
40-
yaxis: {title: 'Medals'},
38+
title: {
39+
text: 'Grouped by Country'
40+
},
41+
xaxis: {
42+
title: {
43+
text: 'Country'
44+
}
45+
},
46+
yaxis: {
47+
title: {
48+
text: 'Medals'
49+
}
50+
},
4151
scattergap: 0.7
4252
};
4353

_posts/plotly_js/basic/line_and_scatter/2022-12-13-group-scatter.html

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,19 @@
3535

3636
var layout = {
3737
scattermode: 'group',
38-
title: 'Grouped by Country',
39-
xaxis: {title: 'Country'},
40-
yaxis: {title: 'Medals'}
38+
title: {
39+
text: 'Grouped by Country'
40+
},
41+
xaxis: {
42+
title: {
43+
text: 'Country'
44+
}
45+
},
46+
yaxis: {
47+
title: {
48+
text: 'Medals'
49+
}
50+
}
4151
};
4252

4353
Plotly.newPlot('myDiv', data, layout);

0 commit comments

Comments
 (0)