owid-grapher
owid-grapher copied to clipboard
StackedDiscreteBar: Negative values lead to incorrect bar placement
Description
- This chart looks broken because one of the indicators (Land use change) has negative values that stacked discrete bar charts don't support
- This leads to incorrect bar placements
Expected behaviour
- In the long term, we should probably support negative values for (discrete) stacked bar charts (see #1166)
- For now, we should make sure that negative values don't break the chart (probably by ignoring them)
Steps to reproduce
- Go to https://ourworldindata.org/grapher/food-emissions-supply-chain?country=Apples~Bananas
- Note that bars overflow
- Hover over one of the bars
- Note that Land use change has a negative value