visualization-tool
visualization-tool copied to clipboard
Display a warning / error when there are negative values in stacked area chart
A stacked area chart isn't able to properly display negative values; that's why if it encounters some, results may look quite weird and confusing. We should display some kind of a warning / error that at least would let user know that it could be better to switch to a stacked bar chart or present some call to action to disable affected series from a chart.
Example of a stacked area chart with negative values: https://int.visualize.admin.ch/en/v/YLxa9XigmcbX?dataSource=Prod
cc @sosiology
Example dataset: Greenhouse gas emissions by sector and by gas