Being able to fill the area between series is one of the details that help to make great-looking line charts in Datawrapper.
This chart needs a table with a date column and two series.
- There are too many gridlines by default. Take advantage of custom ticks and gridlines and split the y axis into three to five segments, no more.
- Label the last data point instead of using a legend. You can use line color for labels, but the labels may look like an extension of the line. If you want to make it clear that the message is about the difference between one series and the other, fill the gap between them.
This example compares cumulative excess deaths in Portugal in 2020 and 2021. The country was having a mild flu season in 2020, with death much below the baseline. Then, in March, Covid-19 came, and mortality began increasing. By the end of the year, excess mortality was much higher than any historical example, and half of it was associated with Covid-19.
In 2021, because people moved more or less freely and schools were open, Covid-19 cases increased exponentially, and mortality followed. On top of it, a cold wave in weeks 2-4 also impacted mortality. January of 2021 became the deadliest month in Portugal since 1918.
I calculated the series for the triangles in Excel. The value remains the same for the entire week and then uses the new value when a new week begins. When using the option Fill area between lines, I set line type to step.