Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
fmadore committed Nov 30, 2024
1 parent e81f204 commit dce504c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Visualisations/Overview/items_type_over_years/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@

const stackedData = stack(data.yearlyData);

// Recalculate totals based only on type values
data.yearlyData.forEach(d => {
d.total = Object.values(d.values).reduce((sum, val) => sum + (val || 0), 0);
});

// Calculate bar width based on data
const barWidth = width / data.yearlyData.length * 0.8;

Expand Down

0 comments on commit dce504c

Please sign in to comment.