From f6fb6f9846554b7ad47ca4c9efbdcf6feb2cd1b9 Mon Sep 17 00:00:00 2001 From: Rob Ashton Date: Wed, 27 Nov 2024 16:28:02 +0000 Subject: [PATCH] Remove cascade plot special rendering, Jeff thinks better with a gap in the middle --- src/app/static/src/app/store/plotSelections/getters.ts | 4 ---- src/app/static/src/tests/plotSelections/getters.test.ts | 5 ----- 2 files changed, 9 deletions(-) diff --git a/src/app/static/src/app/store/plotSelections/getters.ts b/src/app/static/src/app/store/plotSelections/getters.ts index f306ec68a..c37a73ecd 100644 --- a/src/app/static/src/app/store/plotSelections/getters.ts +++ b/src/app/static/src/app/store/plotSelections/getters.ts @@ -71,10 +71,6 @@ export const getters = { // in the order specified in the "cascade" instead of in the default indicator order const indicatorOrder = rootGetters["modelCalibrate/cascadePlotIndicators"]; sortDatasets(data.datasets, disaggregateSelections, indicatorOrder) - data.datasets.forEach((dataset: ChartDataSetsWithErrors) => { - dataset.barPercentage = 1.0; // Ensure no gap between disaggregated bars - dataset.maxBarThickness = 250; // High value to stop gap being introduced due to bar width limit - }); } return data } else { diff --git a/src/app/static/src/tests/plotSelections/getters.test.ts b/src/app/static/src/tests/plotSelections/getters.test.ts index 8da4f6d43..31abe40bf 100644 --- a/src/app/static/src/tests/plotSelections/getters.test.ts +++ b/src/app/static/src/tests/plotSelections/getters.test.ts @@ -390,11 +390,6 @@ describe("plotSelections getters", () => { filterSelections, Language.en); expect(mockPlotDataToChartData.mock.calls.length).toBe(1) - // Cascade bars take up full width - data.datasets.forEach(dataset => { - expect(dataset.maxBarThickness).toBe(250); - expect(dataset.barPercentage).toBe(1.0); - }); // Datasets are in correct order expect(data.datasets[0].label).toBe("Option B");