Create Concise Line-Bar Combined Chart for Reporting
Chonghua Yin
Head of Data Science | Climate Risk & Extreme Event Modeling | AI & Geospatial Analytics
In previous two tutorials, I presented some examples for creating concise charts for reporting, where we mentioned the two most widely used chart types - Line and Bar. Generally, we use line charts to present temperature, while bar chart is applied for precipitation. Moreover, we present temperature and precipitation separately.
However, quite often we may find that many users like to put them in one chart. When the data values in a chart vary widely from data series to data series, or when you have mixed types of data (for example, currency and percentages), you have to plot one or more data series on a secondary vertical (Y) axis. For temperature and precipitation, they are often visualized with line and bar combined charts, as the two variables often come with very different magnitudes.
I do not support using such a kind of mixed charts (also called double Y charts, dual axis charts, dual-scale data charts or superimposed charts). Charts with two different y-axes make it complicated for most people to intuitively make right statements about two data series. Even worse, the scales of dual axis charts are arbitrary and can therefore (deliberately) mislead readers about the relationship between the two data series. Although I strongly recommend using two charts instead of one, it does not mean that you should never use them.
Our steps or the underlying philosophy for creating concise charts could also be applicable to the combined line-bar charts. In this practical tutorial, I would only present some comparisons between the original design and re-design. As stated before, everybody can do visualization. So the following tutorial is presented only from my own experience.
A bar with three lines
Let's start directly from a complex case, where only monthly precipitation and temperature (max, min and mean) will be visualize in one chart. The original chart is presented in the following image. Sure, it is good and it expresses all important information just like the line or bar chart in the previous tutorial.
However, take another look at this visual with an eye. You will find the chart contain too many elements that may distract our concentration on some key information. In another word, some visual elements take up space but don’t increase understanding. Moreover, there is a big flaw in the above image. Could you find it?? Take a close glance.
Yes. The number of major ticks of the left y-axis does not match those of the right y-axis. That is to say, the left uses 7 ticks, while the right only applies 6 ticks. Let's add the major gridlines for the right y-axis and you can find it soon.
Therefore, when using double y-axes, the first step is to make sure that they have the same number of major ticks (or scales).
领英推荐
Now let's delete some redundant elements, and use the same number of major ticks for both left and right y-axes. The final resultant image looks as follows. Coming to this step, we stopped further simplifying the chart. Sometimes, some people may use colors to replace the double y-axes. However, I think such a case is more suitable for the combination of a single line and a single bar, where colors could explicitly represent each data series. You can have a try.
Summary
In this tutorial, I presented an example about how to simplify a line and bar combined chart. Just as said before, you can do more. You can use specific colors for the bars, specific fonts (size and style) for the title and tick labels, etc. However, I strongly recommend using using two charts instead of one (i.e., side-by-side charts) when you do not have to use a combined chart.
Everybody should keep in mind?A Graph is Worth a 1000 Words. Although, visualization looks easy, in fact it is hard to master. It is half art and half science. The best way always is Keeping Practicing. Here I suggest any visualization should also follow the?DRY?(Do Not Repeat Yourself) principle that I did not mention before. That is, it is not necessary to present the same information twice on a chart.
References
Knaflic, Cole Nussbaumer. Storytelling With Data: A Data Visualization Guide for Business Professionals. Hoboken, New Jersey: John Wiley & Sons, Inc, 2015.