Skip to content

Commit

Permalink
Remove cascade plot special rendering, Jeff thinks better with a gap …
Browse files Browse the repository at this point in the history
…in the middle
  • Loading branch information
r-ash committed Nov 27, 2024
1 parent 10b63d7 commit f6fb6f9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
4 changes: 0 additions & 4 deletions src/app/static/src/app/store/plotSelections/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 0 additions & 5 deletions src/app/static/src/tests/plotSelections/getters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit f6fb6f9

Please sign in to comment.