Skip to content

Commit bf38db8

Browse files
committed
update examples to use title.text
1 parent 1b6bd01 commit bf38db8

File tree

42 files changed

+48
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+48
-48
lines changed

_posts/plotly_js/basic/area/2015-04-09-stacked-area.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
{x: [1,2,3], y: [3,0,2], stackgroup: 'one'}
1414
];
1515

16-
Plotly.newPlot('myDiv', traces, {title: 'stacked and filled line chart'});
16+
Plotly.newPlot('myDiv', traces, {title: {text: 'stacked and filled line chart'}});

_posts/plotly_js/basic/area/2018-09-18-normalized-stacked-area.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
{x: [1,2,3], y: [3,0,2], stackgroup: 'one'}
1414
];
1515

16-
Plotly.newPlot('myDiv', traces, {title: 'Normalized stacked and filled line chart'});
16+
Plotly.newPlot('myDiv', traces, {title: {text: 'Normalized stacked and filled line chart'}});
1717

_posts/plotly_js/basic/line-plots/2015-08-07-adding-names-to-line-and-scatter-plot.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
var data = [ trace1, trace2, trace3 ];
3232

3333
var layout = {
34-
title:'Adding Names to Line and Scatter Plot'
34+
title: {text: 'Adding Names to Line and Scatter Plot'}
3535
};
3636

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
var data = [ trace1, trace2, trace3 ];
2929

3030
var layout = {
31-
title:'Line and Scatter Plot'
31+
title: {text: 'Line and Scatter Plot'}
3232
};
3333

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

_posts/plotly_js/basic/line_and_scatter/2015-08-10-data-label-hover.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
yaxis: {
3636
range: [0, 8]
3737
},
38-
title:'Data Labels Hover'
38+
title: {text: 'Data Labels Hover'}
3939
};
4040

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

_posts/plotly_js/basic/line_and_scatter/2015-08-11-data-label-on-the-plot.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
color: 'grey',
5353
}
5454
},
55-
title:'Data Labels on the Plot'
55+
title: {text: 'Data Labels on the Plot'}
5656
};
5757

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

_posts/plotly_js/chart-events/callbacks-click/2015-04-09-click-annotation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
data = [ trace1, trace2, trace3 ],
2121
layout = {
2222
hovermode:'closest',
23-
title:'Click on Points to add an Annotation on it'
23+
title: {text: 'Click on Points to add an Annotation on it'}
2424
};
2525

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

_posts/plotly_js/chart-events/callbacks-click/2015-04-09-click.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
mode:'markers', marker:{size:16} } ],
1616
layout = {
1717
hovermode:'closest',
18-
title:'Click on Points'
18+
title: {text: 'Click on Points'}
1919
};
2020

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

_posts/plotly_js/chart-events/callbacks-hover/2015-04-09-hover-bind.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
mode:'markers', marker:{size:16} } ];
2020
layout = {
2121
hovermode:'closest',
22-
title:'Hover on Points'
22+
title: {text: 'Hover on Points'}
2323
};
2424

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

_posts/plotly_js/chart-events/callbacks-hover/2015-04-09-hover-manual.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
mode:'markers', marker:{size:16} } ];
2020
layout = {
2121
hovermode:'closest',
22-
title:'Click "Go" button to trigger hover'
22+
title: {text: 'Click "Go" button to trigger hover'}
2323
};
2424

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

_posts/plotly_js/chart-events/callbacks-hover/2015-10-08-hover-coupled.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
}];
3030
layout = {
3131
hovermode:'closest',
32-
title:'Display Hover Info for Related Points',
32+
title: {text: 'Display Hover Info for Related Points'},
3333
xaxis:{zeroline:false, hoverformat: '.2r'},
3434
yaxis:{zeroline:false, hoverformat: '.2r'}
3535
};

_posts/plotly_js/chart-events/callbacks-hover/2017-02-07-pixel-hover.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
{x:x, y:y2, type:'scatter', name:'Trial 2',
2020
mode:'markers', marker:{size:16}}],
2121
layout = {hovermode:'closest',
22-
title:'Hover on Points to see<br>Pixel Coordinates'};
22+
title: {text: 'Hover on Points to see<br>Pixel Coordinates'}};
2323

2424
Plotly.newPlot('myDiv', data, layout);
2525

_posts/plotly_js/chart-events/callbacks-zoom/2015-04-09-zoom-bind.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
x = d3.range(N),
1414
y = d3.range(N).map( d3.random.normal() ),
1515
data = [ { x:x, y:y } ];
16-
layout = { title:'Click-drag to zoom' };
16+
layout = { title: {text: 'Click-drag to zoom' }};
1717

1818
Plotly.newPlot(graphDiv, data, layout);
1919

_posts/plotly_js/chart-events/events/2017-01-01-order2_simple_event_ex.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
mode:'markers', marker:{size:20}
1717
}],
1818
layout = {hovermode:'closest',
19-
title:'Click on Points'
19+
title: {text: 'Click on Points'}
2020
};
2121

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

_posts/plotly_js/chart-events/events/2017-01-01-order5_hover_event.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
mode:'markers', marker:{size:16, color:colors}}],
2121
layout = {
2222
hovermode:'closest',
23-
title:'Hover on a Point<br>to Change Color'
23+
title: {text: 'Hover on a Point<br>to Change Color'}
2424
};
2525

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

_posts/plotly_js/chart-events/events/2017-01-01-order6_click_event.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
mode:'markers', marker:{size:16, color:colors}}],
1919
layout = {
2020
hovermode:'closest',
21-
title:'Click on a Point to Change Color<br>Double Click (anywhere) to Change it Back'
21+
title: {text: 'Click on a Point to Change Color<br>Double Click (anywhere) to Change it Back'}
2222
};
2323

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

_posts/plotly_js/chart-events/events/2017-01-01-order7_doubleclick_event.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
mode:'markers', marker:{size:16, color:colors}}],
1919
layout = {
2020
hovermode:'closest',
21-
title:'Click on a Point to Change Color<br>Double Click (anywhere) to Change it Back'
21+
title: {text: 'Click on a Point to Change Color<br>Double Click (anywhere) to Change it Back'}
2222
};
2323

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

_posts/plotly_js/chart-events/events/2018-08-06-order6_legendclick_event.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
sitemap: false
88
arrangement: horizontal
99
markdown_content: |
10-
`plotly_legendclick` and `plotly_legenddoubleclick` allow customization of the plotly legend. The default behaviour of `plotly_legendclick` is to hide a trace and the default behavior of `plotly_legenddoubleclick` is to select one trace and hide all the others.
10+
`plotly_legendclick` and `plotly_legenddoubleclick` allow customization of the plotly legend. The default behaviour of `plotly_legendclick` is to hide a trace and the default behavior of `plotly_legenddoubleclick` is to select one trace and hide all the others.
1111
We can add to the default behaviour by creating a new `plotly_legendclick` event with a function of our choice. We can also disable the default behaviour by creating a function that returns `false`. In the example below, we do both in order to create a `plotly_legendclick` event which changes the marker color back to black instead of erasing the trace.
1212
---
1313
var myPlot = document.getElementById('myDiv'),
@@ -23,7 +23,7 @@
2323
layout = {
2424
showlegend: true,
2525
hovermode:'closest',
26-
title:'Click on a Point to Change Color<br>Click on a Trace in the Legend to Change Back One Trace Only'
26+
title: {text: 'Click on a Point to Change Color<br>Click on a Trace in the Legend to Change Back One Trace Only'}
2727
};
2828

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

_posts/plotly_js/chart-events/remove-trace/2015-08-15-remove-trace-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
};
2828

2929
var layout = {
30-
title:'Click Buttons to Delete Traces',
30+
title: {text: 'Click Buttons to Delete Traces'},
3131
showlegend:false
3232
};
3333

_posts/plotly_js/controls/callbacks-dropdowns/2015-11-19-simple-dropdown.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
var data = [trace1];
5858

5959
var layout = {
60-
title:'Line and Scatter Plot',
60+
title: {text: 'Line and Scatter Plot'},
6161
height: 400,
6262
width: 480
6363
};

_posts/plotly_js/financial/time-series/2017-08-14-time-series-rangeslider.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
var data = [trace1,trace2];
3636

3737
var layout = {
38-
title: 'Time Series with Rangeslider',
38+
title: {text: 'Time Series with Rangeslider'},
3939
xaxis: {
4040
autorange: true,
4141
range: ['2015-02-17', '2017-02-16'],

_posts/plotly_js/fundamentals/annotations/2015-10-08-style-annotation-b.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
size:16}}];
3737
layout = {
3838
hovermode:'closest',
39-
title:'<b>Formatting Annotations</b> <br> click on a point to plot an annotation',
39+
title: {text: '<b>Formatting Annotations</b> <br> click on a point to plot an annotation'},
4040
xaxis: {
4141
zeroline: false,
4242
title: {

_posts/plotly_js/fundamentals/axes/2015-09-18-axes-categories.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
text: 'Number of Items in Stock'
3131
}
3232
},
33-
title:'Inventory'
33+
title: {text: 'Inventory'}
3434
};
3535

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

_posts/plotly_js/fundamentals/shapes/2023-03-15-labels-on-shapes.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
];
3333

3434
var layout = {
35-
title: 'Product price changes and revenue growth',
36-
xaxis: { title: 'Date' },
37-
yaxis: { title: 'Revenue Growth' },
35+
title: {text: 'Product price changes and revenue growth'},
36+
xaxis: { title: {text: 'Date' }},
37+
yaxis: { title: {text: 'Revenue Growth' }},
3838
dragmode: 'drawline',
3939

4040
shapes: [

_posts/plotly_js/fundamentals/tick-format/2018-12-17-using-tickformat(date).html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
var data = [trace1, trace2];
4444

4545
var layout = {
46-
title: 'Time series with custom tickformat',
46+
title: {text: 'Time series with custom tickformat'},
4747
xaxis: {
4848
tickformat: '%d %B (%a)\n %Y' // For more time formatting types, see: https://github.com/d3/d3-time-format/blob/master/README.md
4949
}

_posts/plotly_js/fundamentals/uirevision/2019-01-04-uirevision-persist.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
].map(new_data);
2727

2828
var layout = {
29-
title: 'User Zoom Persists<br>When uirevision Unchanged',
29+
title: {text: 'User Zoom Persists<br>When uirevision Unchanged'},
3030
uirevision:'true',
3131
xaxis: {autorange: true},
3232
yaxis: {autorange: true}

_posts/plotly_js/fundamentals/uirevision/2019-01-04-uirevision-reset.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
].map(new_data);
2525

2626
var layout = {
27-
title: 'User Zoom Resets<br>When uirevision Changes',
27+
title: {text: 'User Zoom Resets<br>When uirevision Changes'},
2828
uirevision:'true',
2929
xaxis: {autorange: true},
3030
yaxis: {autorange: true}

_posts/plotly_js/maps/bubble-maps/2015-07-11-bubble-map.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
cmax: 50,
1919
colorscale: 'Greens',
2020
colorbar: {
21-
title: 'Some rate',
21+
title: {text: 'Some rate'},
2222
ticksuffix: '%',
2323
showticksuffix: 'last'
2424
},

_posts/plotly_js/maps/bubble-maps/2015-08-12-USA-bubble-map.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
}];
4646

4747
var layout = {
48-
title: '2014 US City Populations',
48+
title: {text: '2014 US City Populations'},
4949
showlegend: false,
5050
geo: {
5151
scope: 'usa',

_posts/plotly_js/maps/choropleth-maps/2015-07-11-choropleth-north-america.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
[0.8, 'rgb(117,107,177)'], [1, 'rgb(84,39,143)']
2727
],
2828
colorbar: {
29-
title: 'Millions USD',
29+
title: {text: 'Millions USD'},
3030
thickness: 0.2
3131
},
3232
marker: {
@@ -39,7 +39,7 @@
3939

4040

4141
var layout = {
42-
title: '2011 US Agriculture Exports by State',
42+
title: {text: '2011 US Agriculture Exports by State'},
4343
geo:{
4444
scope: 'usa',
4545
showlakes: true,

_posts/plotly_js/maps/choropleth-maps/2015-07-11-choropleth-world-robinson.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}];
2323

2424
var layout = {
25-
title: 'Pure alcohol consumption<br>among adults (age 15+) in 2010',
25+
title: {text: 'Pure alcohol consumption<br>among adults (age 15+) in 2010'},
2626
geo: {
2727
projection: {
2828
type: 'robinson'

_posts/plotly_js/maps/choropleth-maps/2015-08-10-countrygdp-choropleth-map.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
colorbar: {
3636
autotic: false,
3737
tickprefix: '$',
38-
title: 'GDP<br>Billions US$'
38+
title: {text: 'GDP<br>Billions US$'}
3939
}
4040
}];
4141

4242
var layout = {
43-
title: '2014 Global GDP<br>Source: <a href="https://www.cia.gov/library/publications/the-world-factbook/fields/2195.html"> CIA World Factbook</a>',
43+
title: {text: '2014 Global GDP<br>Source: <a href="https://www.cia.gov/library/publications/the-world-factbook/fields/2195.html"> CIA World Factbook</a>'},
4444
geo:{
4545
showframe: false,
4646
showcoastlines: false,

_posts/plotly_js/maps/choropleth-maps/2015-08-11-US-pop-by-state-choropleth.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}];
2222

2323
var layout = {
24-
title: '2014 US Popultaion by State',
24+
title: {text: '2014 US Popultaion by State'},
2525
geo:{
2626
scope: 'usa',
2727
countrycolor: 'rgb(255, 255, 255)',

_posts/plotly_js/maps/choropleth-maps/2016-08-04-florida-counties.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
lat: [46],
1717
lon: [-74]
1818
}], {
19-
title: "Florida Counties",
19+
title: {text: "Florida Counties"},
2020
height: 600,
2121
width: 600,
2222
map: {

_posts/plotly_js/maps/lines-on-maps/2015-08-12-flightpath-london-to-nyc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}];
1919

2020
var layout = {
21-
title: 'London to NYC Great Circle',
21+
title: {text: 'London to NYC Great Circle'},
2222
showlegend: false,
2323
geo: {
2424
resolution: 50,

_posts/plotly_js/maps/lines-on-maps/2015-08-12-us-flight-paths-map.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
};
4242

4343
var layout = {
44-
title: 'Feb. 2011 American Airline flight paths',
44+
title: {text: 'Feb. 2011 American Airline flight paths'},
4545
showlegend: false,
4646
geo:{
4747
scope: 'north america',

_posts/plotly_js/maps/scatter-plot-on-maps/2015-08-12-US-airport-map.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
cmin: 0,
3737
color: unpack(rows, 'cnt'),
3838
colorbar: {
39-
title: 'Incoming Flights February 2011'
39+
title: {text: 'Incoming Flights February 2011'}
4040
}
4141
}
4242
}];
4343

4444

4545
var layout = {
46-
title: 'Most Trafficked US airports',
46+
title: {text: 'Most Trafficked US airports'},
4747
colorbar: true,
4848
geo: {
4949
scope: 'usa',

_posts/plotly_js/maps/scatter-plot-on-maps/2015-08-15-north-america-percipitation-map.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
range: [ 20.0, 60.0 ],
7575
dtick: 5
7676
},
77-
title: 'North America Precipitation',
77+
title: {text: North America Precipitation'},
7878
width: 600,
7979
height: 600
8080
};

_posts/plotly_js/maps/scattermapbox/2017-08-01-scattermapbox_multiple.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
});
3030

3131
var layout = {
32-
title: 'Meteorite Landing Locations',
32+
title: {text: 'Meteorite Landing Locations'},
3333
font: {
3434
color: 'white'
3535
},

_posts/plotly_js/subplot/mixed-subplots/2017-01-20-mixed-subplots.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
var layout = {
6969
paper_bgcolor: 'black',
7070
plot_bgcolor: 'black',
71-
title: 'Volcano Database: Elevation',
71+
title: {text: 'Volcano Database: Elevation'},
7272
font: {color: 'white'},
7373
colorbar: true,
7474
annotations: [{

_posts/plotly_js/subplot/subplot-table/2017-11-01-table-subplot.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109

110110
// define layout
111111
var layout = {
112-
title: "Bitcoin mining stats for 180 days",
112+
title: {text: "Bitcoin mining stats for 180 days"},
113113
plot_bgcolor: 'rgba(228, 222, 249, 0.65)',
114114
showlegend: false,
115115
xaxis1: Object.assign(axis1,axis),

0 commit comments

Comments
 (0)