Bar Chart

Get a brief introduction to bar charts and learn how to draw a bar chart in D3.js.

We'll cover the following


In this lesson, let’s dive into the last graph in this course, the bar chart. A bar chart or bar graph is used to represent categorical data with rectangular bars of varying heights representing the values of the respective categories.

A bar graph shows comparisons among categorical data. The x-axis of the chart shows the specific categories being compared, and the y-axis represents the values associated with each category.


Let’s look at an example where we want to show the number of students that belong to different categories of grades.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy