CHAPTER 5

image

Drawing a Bar Chart

In the previous chapter, you created a line chart, using the data in an HTML table. However, the same data can be represented by other charts, including the well-known bar chart. With this type of data visualization, you still have the two axes (x and y), but x, instead of being represented as a continuous scale of values, is used to represent groups, which may or may not follow an increasing trend.

In this chapter, you will continue to use the code written in the previous chapter, and you will see how, by making a few changes to the code (very few!), you can convert your line chart into a bar chart. Once you have ...

Get Beginning JavaScript Charts: With jqPlot, d3, and Highcharts 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.