Book Image

Learning Highcharts 4

By : Joe Kuan
Book Image

Learning Highcharts 4

By: Joe Kuan

Overview of this book

Table of Contents (23 chapters)
Learning Highcharts 4
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Constructing a mirror chart


Using a mirror chart is another way of comparing two column series. Instead of aligning the two series as columns adjacent to each other, mirror charts align them in bars opposite to each other. Sometimes, this is used as a preferred way for presenting the trend between the two series.

In Highcharts, we can make use of a stacked bar chart and change it slightly into a mirror chart for comparing two sets of data horizontally side by side. To do that, let's start with a new data series from Patents Granted, which shows the comparison between the United Kingdom and China with respect to the number of patents granted for the past decade.

The way we configure the chart is really a stacked-column bar chart, with one set of data being positive and another set being manually converted to negative values, so that the zero value axis is in the middle of the chart. Then we invert the column chart into a bar chart and label the negative range as positive. To demonstrate this...