Introducing bar charts
In Highcharts there are two ways to specify bar charts—setting series' type
to 'bar'
or setting the
chart.inverted
option to true
with column series (also true for switching from bar to column). Switching between column and bar is simply a case of swapping the display orientation between the y and x axes; all the label rotations are still intact. Moreover, the actual configurations still remain in the x and y axes. To demonstrate this we will use the previous example along with the inverted
option set to true
, as follows:
chart: { .... , type: 'column', inverted: true },
The preceding code snippet produces a bar graph, as follows:
The rotation of the country name and the logarithmic axis labels still remain the same. In fact, now the value labels are muddled together and the category names are not aligning properly to the bars. The next step is to reset the label orientations to restore the graph...