Introducing bar charts
In Highcharts, there are two ways to specify bar charts—setting the 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 remains the same. ...
Get Learning Highcharts 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.