From 1acf90d8bc4b2ecfb36bc80c9975b60ee045aaef Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:19:02 -0400 Subject: [PATCH 1/3] remove deprecated 'bardir' attribute (replaced by 'orientation') --- src/plot_api/helpers.js | 11 ----------- src/traces/bar/attributes.js | 9 --------- src/traces/histogram/attributes.js | 4 ---- 3 files changed, 24 deletions(-) diff --git a/src/plot_api/helpers.js b/src/plot_api/helpers.js index f30b9539fd3..9376920c5bc 100644 --- a/src/plot_api/helpers.js +++ b/src/plot_api/helpers.js @@ -295,17 +295,6 @@ exports.cleanData = function(data) { delete trace.error_y.opacity; } - // convert bardir to orientation, and put the data into - // the axes it's eventually going to be used with - if('bardir' in trace) { - if(trace.bardir === 'h' && (traceIs(trace, 'bar') || - trace.type.substr(0, 9) === 'histogram')) { - trace.orientation = 'h'; - exports.swapXYData(trace); - } - delete trace.bardir; - } - // 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/src/traces/bar/attributes.js b/src/traces/bar/attributes.js index c5eead1b3d2..04f778ec2aa 100644 --- a/src/traces/bar/attributes.js +++ b/src/traces/bar/attributes.js @@ -227,13 +227,4 @@ module.exports = { editType: 'style' }, zorder: scatterAttrs.zorder, - - _deprecated: { - bardir: { - valType: 'enumerated', - editType: 'calc', - values: ['v', 'h'], - description: 'Renamed to `orientation`.' - } - } }; diff --git a/src/traces/histogram/attributes.js b/src/traces/histogram/attributes.js index f442de30fbb..7ba5776d70a 100644 --- a/src/traces/histogram/attributes.js +++ b/src/traces/histogram/attributes.js @@ -246,9 +246,5 @@ module.exports = { selected: barAttrs.selected, unselected: barAttrs.unselected, - _deprecated: { - bardir: barAttrs._deprecated.bardir - }, - zorder: barAttrs.zorder }; From f428565258a59705d8f3860093a4d686933540f4 Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:25:59 -0400 Subject: [PATCH 2/3] update plot-schema --- test/plot-schema.json | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/test/plot-schema.json b/test/plot-schema.json index b2f43d0245d..642d88c0804 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -17291,17 +17291,6 @@ "bar": { "animatable": true, "attributes": { - "_deprecated": { - "bardir": { - "description": "Renamed to `orientation`.", - "editType": "calc", - "valType": "enumerated", - "values": [ - "v", - "h" - ] - } - }, "alignmentgroup": { "description": "Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.", "dflt": "", @@ -43700,17 +43689,6 @@ "histogram": { "animatable": false, "attributes": { - "_deprecated": { - "bardir": { - "description": "Renamed to `orientation`.", - "editType": "calc", - "valType": "enumerated", - "values": [ - "v", - "h" - ] - } - }, "alignmentgroup": { "description": "Set several traces linked to the same position axis or matching axes to the same alignmentgroup. This controls whether bars compute their positional range dependently or independently.", "dflt": "", From 093ae8043b6e19f30752ed8b21fa5cc5a8304467 Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:38:21 -0400 Subject: [PATCH 3/3] add draftlog --- draftlogs/7214_remove.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 draftlogs/7214_remove.md diff --git a/draftlogs/7214_remove.md b/draftlogs/7214_remove.md new file mode 100644 index 00000000000..ebf1e09ab31 --- /dev/null +++ b/draftlogs/7214_remove.md @@ -0,0 +1 @@ +Drop support for deprecated `bardir` attribute (use `orientation` instead) [[#7214](https://github.com/plotly/plotly.js/pull/7214)] \ No newline at end of file