Skip to content

Commit 1b46461

Browse files
committed
add deprecation warning for mapbox traces and subplot
1 parent 34cade7 commit 1b46461

File tree

5 files changed

+30
-6
lines changed

5 files changed

+30
-6
lines changed

src/plots/mapbox/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,18 @@ exports.idRoot = MAPBOX;
2525

2626
exports.idRegex = exports.attrRegex = Lib.counterRegex(MAPBOX);
2727

28+
var deprecationWarning = [
29+
'mapbox subplots and traces are deprecated!',
30+
'Please consider switching to `map` subplots and traces.'
31+
].join(' ');
32+
2833
exports.attributes = {
2934
subplot: {
3035
valType: 'subplotid',
3136
dflt: 'mapbox',
3237
editType: 'calc',
3338
description: [
39+
deprecationWarning,
3440
'Sets a reference between this trace\'s data coordinates and',
3541
'a mapbox subplot.',
3642
'If *mapbox* (the default value), the data refer to `layout.mapbox`.',

src/traces/choroplethmapbox/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
'use strict';
22

3+
var deprecationWarning = [
4+
'*choroplethmapbox* trace is deprecated!',
5+
'Please consider switching to the *scattermap* trace type and `map` subplots.'
6+
].join(' ');
7+
38
module.exports = {
49
attributes: require('./attributes'),
510
supplyDefaults: require('./defaults'),
@@ -48,6 +53,7 @@ module.exports = {
4853
meta: {
4954
hr_name: 'choropleth_mapbox',
5055
description: [
56+
deprecationWarning,
5157
'GeoJSON features to be filled are set in `geojson`',
5258
'The data that describes the choropleth value-to-color mapping',
5359
'is set in `locations` and `z`.'

src/traces/densitymapbox/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
'use strict';
22

3+
var deprecationWarning = [
4+
'*densitymapbox* trace is deprecated!',
5+
'Please consider switching to the *scattermap* trace type and `map` subplots.'
6+
].join(' ');
7+
38
module.exports = {
49
attributes: require('./attributes'),
510
supplyDefaults: require('./defaults'),
@@ -33,6 +38,7 @@ module.exports = {
3338
meta: {
3439
hr_name: 'density_mapbox',
3540
description: [
41+
deprecationWarning,
3642
'Draws a bivariate kernel density estimation with a Gaussian kernel',
3743
'from `lon` and `lat` coordinates and optional `z` values using a colorscale.'
3844
].join(' ')

src/traces/scattermapbox/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
'use strict';
22

3+
var deprecationWarning = [
4+
'*scattermapbox* trace is deprecated!',
5+
'Please consider switching to the *scattermap* trace type and `map` subplots.'
6+
].join(' ');
7+
38
module.exports = {
49
attributes: require('./attributes'),
510
supplyDefaults: require('./defaults'),
@@ -25,6 +30,7 @@ module.exports = {
2530
meta: {
2631
hrName: 'scatter_mapbox',
2732
description: [
33+
deprecationWarning,
2834
'The data visualized as scatter point, lines or marker symbols',
2935
'on a Mapbox GL geographic map',
3036
'is provided by longitude/latitude pairs in `lon` and `lat`.'

test/plot-schema.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -29751,7 +29751,7 @@
2975129751
}
2975229752
},
2975329753
"subplot": {
29754-
"description": "Sets a reference between this trace's data coordinates and a mapbox subplot. If *mapbox* (the default value), the data refer to `layout.mapbox`. If *mapbox2*, the data refer to `layout.mapbox2`, and so on.",
29754+
"description": "mapbox subplots and traces are deprecated! Please consider switching to `map` subplots and traces. Sets a reference between this trace's data coordinates and a mapbox subplot. If *mapbox* (the default value), the data refer to `layout.mapbox`. If *mapbox2*, the data refer to `layout.mapbox2`, and so on.",
2975529755
"dflt": "mapbox",
2975629756
"editType": "calc",
2975729757
"valType": "subplotid"
@@ -29865,7 +29865,7 @@
2986529865
"showLegend"
2986629866
],
2986729867
"meta": {
29868-
"description": "GeoJSON features to be filled are set in `geojson` The data that describes the choropleth value-to-color mapping is set in `locations` and `z`.",
29868+
"description": "*choroplethmapbox* trace is deprecated! Please consider switching to the *scattermap* trace type and `map` subplots. GeoJSON features to be filled are set in `geojson` The data that describes the choropleth value-to-color mapping is set in `locations` and `z`.",
2986929869
"hr_name": "choropleth_mapbox"
2987029870
},
2987129871
"type": "choroplethmapbox"
@@ -37184,7 +37184,7 @@
3718437184
}
3718537185
},
3718637186
"subplot": {
37187-
"description": "Sets a reference between this trace's data coordinates and a mapbox subplot. If *mapbox* (the default value), the data refer to `layout.mapbox`. If *mapbox2*, the data refer to `layout.mapbox2`, and so on.",
37187+
"description": "mapbox subplots and traces are deprecated! Please consider switching to `map` subplots and traces. Sets a reference between this trace's data coordinates and a mapbox subplot. If *mapbox* (the default value), the data refer to `layout.mapbox`. If *mapbox2*, the data refer to `layout.mapbox2`, and so on.",
3718837188
"dflt": "mapbox",
3718937189
"editType": "calc",
3719037190
"valType": "subplotid"
@@ -37282,7 +37282,7 @@
3728237282
"showLegend"
3728337283
],
3728437284
"meta": {
37285-
"description": "Draws a bivariate kernel density estimation with a Gaussian kernel from `lon` and `lat` coordinates and optional `z` values using a colorscale.",
37285+
"description": "*densitymapbox* trace is deprecated! Please consider switching to the *scattermap* trace type and `map` subplots. Draws a bivariate kernel density estimation with a Gaussian kernel from `lon` and `lat` coordinates and optional `z` values using a colorscale.",
3728637286
"hr_name": "density_mapbox"
3728737287
},
3728837288
"type": "densitymapbox"
@@ -80422,7 +80422,7 @@
8042280422
}
8042380423
},
8042480424
"subplot": {
80425-
"description": "Sets a reference between this trace's data coordinates and a mapbox subplot. If *mapbox* (the default value), the data refer to `layout.mapbox`. If *mapbox2*, the data refer to `layout.mapbox2`, and so on.",
80425+
"description": "mapbox subplots and traces are deprecated! Please consider switching to `map` subplots and traces. Sets a reference between this trace's data coordinates and a mapbox subplot. If *mapbox* (the default value), the data refer to `layout.mapbox`. If *mapbox2*, the data refer to `layout.mapbox2`, and so on.",
8042680426
"dflt": "mapbox",
8042780427
"editType": "calc",
8042880428
"valType": "subplotid"
@@ -80580,7 +80580,7 @@
8058080580
"scatter-like"
8058180581
],
8058280582
"meta": {
80583-
"description": "The data visualized as scatter point, lines or marker symbols on a Mapbox GL geographic map is provided by longitude/latitude pairs in `lon` and `lat`.",
80583+
"description": "*scattermapbox* trace is deprecated! Please consider switching to the *scattermap* trace type and `map` subplots. The data visualized as scatter point, lines or marker symbols on a Mapbox GL geographic map is provided by longitude/latitude pairs in `lon` and `lat`.",
8058480584
"hrName": "scatter_mapbox"
8058580585
},
8058680586
"type": "scattermapbox"

0 commit comments

Comments
 (0)