Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2f19d0f

Browse filesBrowse files
authored
Merge pull request #7216 from plotly/drop-errorbar-opacity
Drop support for deprecated error bar `opacity` attribute (use alpha channel of error bar `color` attribute instead)
2 parents 7194259 + 1e8cd59 commit 2f19d0f
Copy full SHA for 2f19d0f

File tree

6 files changed

+17
-118
lines changed
Filter options

6 files changed

+17
-118
lines changed

‎draftlogs/7216_remove.md

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Drop support for deprecated error bar `opacity` attribute (use alpha channel of error bar `color` attribute instead) [[#7214](https://github.com/plotly/plotly.js/pull/7216)]

‎src/components/errorbars/attributes.js

Copy file name to clipboardExpand all lines: src/components/errorbars/attributes.js
+1-12Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ module.exports = {
102102
color: {
103103
valType: 'color',
104104
editType: 'style',
105-
description: 'Sets the stoke color of the error bars.'
105+
description: 'Sets the stroke color of the error bars.'
106106
},
107107
thickness: {
108108
valType: 'number',
@@ -121,15 +121,4 @@ module.exports = {
121121
].join(' ')
122122
},
123123
editType: 'calc',
124-
125-
_deprecated: {
126-
opacity: {
127-
valType: 'number',
128-
editType: 'style',
129-
description: [
130-
'Obsolete.',
131-
'Use the alpha channel in error bar `color` to set the opacity.'
132-
].join(' ')
133-
}
134-
}
135124
};

‎src/plot_api/helpers.js

Copy file name to clipboardExpand all lines: src/plot_api/helpers.js
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -272,18 +272,6 @@ exports.cleanData = function(data) {
272272
delete trace.xbins;
273273
}
274274

275-
// error_y.opacity is obsolete - merge into color
276-
if(trace.error_y && 'opacity' in trace.error_y) {
277-
var dc = Color.defaults;
278-
var yeColor = trace.error_y.color || (traceIs(trace, 'bar') ?
279-
Color.defaultLine :
280-
dc[tracei % dc.length]);
281-
trace.error_y.color = Color.addOpacity(
282-
Color.rgb(yeColor),
283-
Color.opacity(yeColor) * trace.error_y.opacity);
284-
delete trace.error_y.opacity;
285-
}
286-
287275
// now we have only one 1D histogram type, and whether
288276
// it uses x or y data depends on trace.orientation
289277
if(trace.type === 'histogramy') exports.swapXYData(trace);
415 Bytes
Loading

‎test/image/mocks/error_bar_style.json

Copy file name to clipboardExpand all lines: test/image/mocks/error_bar_style.json
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,16 @@
7070
"error_y": {
7171
"type": "constant",
7272
"value": 0.1,
73-
"color": "#85144B",
73+
"color": "#85144BCC",
7474
"thickness": 1.5,
75-
"width": 3,
76-
"opacity": 1
75+
"width": 3
7776
},
7877
"error_x": {
7978
"type": "constant",
8079
"value": 0.2,
81-
"color": "#85144B",
80+
"color": "#85144B44",
8281
"thickness": 1.5,
83-
"width": 3,
84-
"opacity": 1
82+
"width": 3
8583
},
8684
"marker": {
8785
"color": "#85144B",

‎test/plot-schema.json

Copy file name to clipboardExpand all lines: test/plot-schema.json
+11-88Lines changed: 11 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -17345,13 +17345,6 @@
1734517345
"valType": "number"
1734617346
},
1734717347
"error_x": {
17348-
"_deprecated": {
17349-
"opacity": {
17350-
"description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.",
17351-
"editType": "style",
17352-
"valType": "number"
17353-
}
17354-
},
1735517348
"array": {
1735617349
"description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
1735717350
"editType": "calc",
@@ -17373,7 +17366,7 @@
1737317366
"valType": "string"
1737417367
},
1737517368
"color": {
17376-
"description": "Sets the stoke color of the error bars.",
17369+
"description": "Sets the stroke color of the error bars.",
1737717370
"editType": "style",
1737817371
"valType": "color"
1737917372
},
@@ -17445,13 +17438,6 @@
1744517438
}
1744617439
},
1744717440
"error_y": {
17448-
"_deprecated": {
17449-
"opacity": {
17450-
"description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.",
17451-
"editType": "style",
17452-
"valType": "number"
17453-
}
17454-
},
1745517441
"array": {
1745617442
"description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
1745717443
"editType": "calc",
@@ -17473,7 +17459,7 @@
1747317459
"valType": "string"
1747417460
},
1747517461
"color": {
17476-
"description": "Sets the stoke color of the error bars.",
17462+
"description": "Sets the stroke color of the error bars.",
1747717463
"editType": "style",
1747817464
"valType": "color"
1747917465
},
@@ -43766,13 +43752,6 @@
4376643752
"valType": "string"
4376743753
},
4376843754
"error_x": {
43769-
"_deprecated": {
43770-
"opacity": {
43771-
"description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.",
43772-
"editType": "style",
43773-
"valType": "number"
43774-
}
43775-
},
4377643755
"array": {
4377743756
"description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
4377843757
"editType": "calc",
@@ -43794,7 +43773,7 @@
4379443773
"valType": "string"
4379543774
},
4379643775
"color": {
43797-
"description": "Sets the stoke color of the error bars.",
43776+
"description": "Sets the stroke color of the error bars.",
4379843777
"editType": "style",
4379943778
"valType": "color"
4380043779
},
@@ -43866,13 +43845,6 @@
4386643845
}
4386743846
},
4386843847
"error_y": {
43869-
"_deprecated": {
43870-
"opacity": {
43871-
"description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.",
43872-
"editType": "style",
43873-
"valType": "number"
43874-
}
43875-
},
4387643848
"array": {
4387743849
"description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
4387843850
"editType": "calc",
@@ -43894,7 +43866,7 @@
4389443866
"valType": "string"
4389543867
},
4389643868
"color": {
43897-
"description": "Sets the stoke color of the error bars.",
43869+
"description": "Sets the stroke color of the error bars.",
4389843870
"editType": "style",
4389943871
"valType": "color"
4390043872
},
@@ -64053,13 +64025,6 @@
6405364025
"valType": "number"
6405464026
},
6405564027
"error_x": {
64056-
"_deprecated": {
64057-
"opacity": {
64058-
"description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.",
64059-
"editType": "style",
64060-
"valType": "number"
64061-
}
64062-
},
6406364028
"array": {
6406464029
"description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
6406564030
"editType": "calc",
@@ -64081,7 +64046,7 @@
6408164046
"valType": "string"
6408264047
},
6408364048
"color": {
64084-
"description": "Sets the stoke color of the error bars.",
64049+
"description": "Sets the stroke color of the error bars.",
6408564050
"editType": "style",
6408664051
"valType": "color"
6408764052
},
@@ -64153,13 +64118,6 @@
6415364118
}
6415464119
},
6415564120
"error_y": {
64156-
"_deprecated": {
64157-
"opacity": {
64158-
"description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.",
64159-
"editType": "style",
64160-
"valType": "number"
64161-
}
64162-
},
6416364121
"array": {
6416464122
"description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
6416564123
"editType": "calc",
@@ -64181,7 +64139,7 @@
6418164139
"valType": "string"
6418264140
},
6418364141
"color": {
64184-
"description": "Sets the stoke color of the error bars.",
64142+
"description": "Sets the stroke color of the error bars.",
6418564143
"editType": "style",
6418664144
"valType": "color"
6418764145
},
@@ -66984,13 +66942,6 @@
6698466942
"valType": "string"
6698566943
},
6698666944
"error_x": {
66987-
"_deprecated": {
66988-
"opacity": {
66989-
"description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.",
66990-
"editType": "calc",
66991-
"valType": "number"
66992-
}
66993-
},
6699466945
"array": {
6699566946
"description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
6699666947
"editType": "calc",
@@ -67012,7 +66963,7 @@
6701266963
"valType": "string"
6701366964
},
6701466965
"color": {
67015-
"description": "Sets the stoke color of the error bars.",
66966+
"description": "Sets the stroke color of the error bars.",
6701666967
"editType": "calc",
6701766968
"valType": "color"
6701866969
},
@@ -67084,13 +67035,6 @@
6708467035
}
6708567036
},
6708667037
"error_y": {
67087-
"_deprecated": {
67088-
"opacity": {
67089-
"description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.",
67090-
"editType": "calc",
67091-
"valType": "number"
67092-
}
67093-
},
6709467038
"array": {
6709567039
"description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
6709667040
"editType": "calc",
@@ -67112,7 +67056,7 @@
6711267056
"valType": "string"
6711367057
},
6711467058
"color": {
67115-
"description": "Sets the stoke color of the error bars.",
67059+
"description": "Sets the stroke color of the error bars.",
6711667060
"editType": "calc",
6711767061
"valType": "color"
6711867062
},
@@ -67184,13 +67128,6 @@
6718467128
}
6718567129
},
6718667130
"error_z": {
67187-
"_deprecated": {
67188-
"opacity": {
67189-
"description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.",
67190-
"editType": "calc",
67191-
"valType": "number"
67192-
}
67193-
},
6719467131
"array": {
6719567132
"description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
6719667133
"editType": "calc",
@@ -67212,7 +67149,7 @@
6721267149
"valType": "string"
6721367150
},
6721467151
"color": {
67215-
"description": "Sets the stoke color of the error bars.",
67152+
"description": "Sets the stroke color of the error bars.",
6721667153
"editType": "calc",
6721767154
"valType": "color"
6721867155
},
@@ -74702,13 +74639,6 @@
7470274639
"valType": "number"
7470374640
},
7470474641
"error_x": {
74705-
"_deprecated": {
74706-
"opacity": {
74707-
"description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.",
74708-
"editType": "calc",
74709-
"valType": "number"
74710-
}
74711-
},
7471274642
"array": {
7471374643
"description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
7471474644
"editType": "calc",
@@ -74730,7 +74660,7 @@
7473074660
"valType": "string"
7473174661
},
7473274662
"color": {
74733-
"description": "Sets the stoke color of the error bars.",
74663+
"description": "Sets the stroke color of the error bars.",
7473474664
"editType": "calc",
7473574665
"valType": "color"
7473674666
},
@@ -74802,13 +74732,6 @@
7480274732
}
7480374733
},
7480474734
"error_y": {
74805-
"_deprecated": {
74806-
"opacity": {
74807-
"description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.",
74808-
"editType": "calc",
74809-
"valType": "number"
74810-
}
74811-
},
7481274735
"array": {
7481374736
"description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.",
7481474737
"editType": "calc",
@@ -74830,7 +74753,7 @@
7483074753
"valType": "string"
7483174754
},
7483274755
"color": {
74833-
"description": "Sets the stoke color of the error bars.",
74756+
"description": "Sets the stroke color of the error bars.",
7483474757
"editType": "calc",
7483574758
"valType": "color"
7483674759
},

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.