diff --git a/draftlogs/7216_remove.md b/draftlogs/7216_remove.md new file mode 100644 index 00000000000..5a47404748f --- /dev/null +++ b/draftlogs/7216_remove.md @@ -0,0 +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)] \ No newline at end of file diff --git a/src/components/errorbars/attributes.js b/src/components/errorbars/attributes.js index bf4d1243105..d564fe00562 100644 --- a/src/components/errorbars/attributes.js +++ b/src/components/errorbars/attributes.js @@ -102,7 +102,7 @@ module.exports = { color: { valType: 'color', editType: 'style', - description: 'Sets the stoke color of the error bars.' + description: 'Sets the stroke color of the error bars.' }, thickness: { valType: 'number', @@ -121,15 +121,4 @@ module.exports = { ].join(' ') }, editType: 'calc', - - _deprecated: { - opacity: { - valType: 'number', - editType: 'style', - description: [ - 'Obsolete.', - 'Use the alpha channel in error bar `color` to set the opacity.' - ].join(' ') - } - } }; diff --git a/src/plot_api/helpers.js b/src/plot_api/helpers.js index 8b3ff5ee40c..f1d53378f7b 100644 --- a/src/plot_api/helpers.js +++ b/src/plot_api/helpers.js @@ -272,18 +272,6 @@ exports.cleanData = function(data) { delete trace.xbins; } - // error_y.opacity is obsolete - merge into color - if(trace.error_y && 'opacity' in trace.error_y) { - var dc = Color.defaults; - var yeColor = trace.error_y.color || (traceIs(trace, 'bar') ? - Color.defaultLine : - dc[tracei % dc.length]); - trace.error_y.color = Color.addOpacity( - Color.rgb(yeColor), - Color.opacity(yeColor) * trace.error_y.opacity); - delete trace.error_y.opacity; - } - // now we have only one 1D histogram type, and whether // it uses x or y data depends on trace.orientation if(trace.type === 'histogramy') exports.swapXYData(trace); diff --git a/test/image/baselines/error_bar_style.png b/test/image/baselines/error_bar_style.png index 93cf22957bf..d347e2baa9b 100644 Binary files a/test/image/baselines/error_bar_style.png and b/test/image/baselines/error_bar_style.png differ diff --git a/test/image/mocks/error_bar_style.json b/test/image/mocks/error_bar_style.json index ca0fa82849a..805d441806a 100644 --- a/test/image/mocks/error_bar_style.json +++ b/test/image/mocks/error_bar_style.json @@ -70,18 +70,16 @@ "error_y": { "type": "constant", "value": 0.1, - "color": "#85144B", + "color": "#85144BCC", "thickness": 1.5, - "width": 3, - "opacity": 1 + "width": 3 }, "error_x": { "type": "constant", "value": 0.2, - "color": "#85144B", + "color": "#85144B44", "thickness": 1.5, - "width": 3, - "opacity": 1 + "width": 3 }, "marker": { "color": "#85144B", diff --git a/test/plot-schema.json b/test/plot-schema.json index 50a9bb78b8c..89a8d7289c9 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -17345,13 +17345,6 @@ "valType": "number" }, "error_x": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "editType": "style", - "valType": "number" - } - }, "array": { "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", "editType": "calc", @@ -17373,7 +17366,7 @@ "valType": "string" }, "color": { - "description": "Sets the stoke color of the error bars.", + "description": "Sets the stroke color of the error bars.", "editType": "style", "valType": "color" }, @@ -17445,13 +17438,6 @@ } }, "error_y": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "editType": "style", - "valType": "number" - } - }, "array": { "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", "editType": "calc", @@ -17473,7 +17459,7 @@ "valType": "string" }, "color": { - "description": "Sets the stoke color of the error bars.", + "description": "Sets the stroke color of the error bars.", "editType": "style", "valType": "color" }, @@ -43766,13 +43752,6 @@ "valType": "string" }, "error_x": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "editType": "style", - "valType": "number" - } - }, "array": { "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", "editType": "calc", @@ -43794,7 +43773,7 @@ "valType": "string" }, "color": { - "description": "Sets the stoke color of the error bars.", + "description": "Sets the stroke color of the error bars.", "editType": "style", "valType": "color" }, @@ -43866,13 +43845,6 @@ } }, "error_y": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "editType": "style", - "valType": "number" - } - }, "array": { "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", "editType": "calc", @@ -43894,7 +43866,7 @@ "valType": "string" }, "color": { - "description": "Sets the stoke color of the error bars.", + "description": "Sets the stroke color of the error bars.", "editType": "style", "valType": "color" }, @@ -64053,13 +64025,6 @@ "valType": "number" }, "error_x": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "editType": "style", - "valType": "number" - } - }, "array": { "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", "editType": "calc", @@ -64081,7 +64046,7 @@ "valType": "string" }, "color": { - "description": "Sets the stoke color of the error bars.", + "description": "Sets the stroke color of the error bars.", "editType": "style", "valType": "color" }, @@ -64153,13 +64118,6 @@ } }, "error_y": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "editType": "style", - "valType": "number" - } - }, "array": { "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", "editType": "calc", @@ -64181,7 +64139,7 @@ "valType": "string" }, "color": { - "description": "Sets the stoke color of the error bars.", + "description": "Sets the stroke color of the error bars.", "editType": "style", "valType": "color" }, @@ -66984,13 +66942,6 @@ "valType": "string" }, "error_x": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "editType": "calc", - "valType": "number" - } - }, "array": { "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", "editType": "calc", @@ -67012,7 +66963,7 @@ "valType": "string" }, "color": { - "description": "Sets the stoke color of the error bars.", + "description": "Sets the stroke color of the error bars.", "editType": "calc", "valType": "color" }, @@ -67084,13 +67035,6 @@ } }, "error_y": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "editType": "calc", - "valType": "number" - } - }, "array": { "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", "editType": "calc", @@ -67112,7 +67056,7 @@ "valType": "string" }, "color": { - "description": "Sets the stoke color of the error bars.", + "description": "Sets the stroke color of the error bars.", "editType": "calc", "valType": "color" }, @@ -67184,13 +67128,6 @@ } }, "error_z": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "editType": "calc", - "valType": "number" - } - }, "array": { "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", "editType": "calc", @@ -67212,7 +67149,7 @@ "valType": "string" }, "color": { - "description": "Sets the stoke color of the error bars.", + "description": "Sets the stroke color of the error bars.", "editType": "calc", "valType": "color" }, @@ -74702,13 +74639,6 @@ "valType": "number" }, "error_x": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "editType": "calc", - "valType": "number" - } - }, "array": { "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", "editType": "calc", @@ -74730,7 +74660,7 @@ "valType": "string" }, "color": { - "description": "Sets the stoke color of the error bars.", + "description": "Sets the stroke color of the error bars.", "editType": "calc", "valType": "color" }, @@ -74802,13 +74732,6 @@ } }, "error_y": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "editType": "calc", - "valType": "number" - } - }, "array": { "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", "editType": "calc", @@ -74830,7 +74753,7 @@ "valType": "string" }, "color": { - "description": "Sets the stoke color of the error bars.", + "description": "Sets the stroke color of the error bars.", "editType": "calc", "valType": "color" },