Line Chart

Learn about line charts and how to create them.

We'll cover the following


After setting the stage in the previous lesson, let’s take a look at one important chart, a line chart. A line chart is a chart used to visualize data over time. It is also known as a line graph. The line chart consists of the x-axis, y-axis, and the line, which shows the change in the dependent variable on the y-axis with respect to the independent variable on the x-axis.


Let’s look at an example to learn how to draw a line chart. In the following example, we have data from the hospital that shows the number of patients in different months. Let’s draw a line graph for this data with the help of a line generator and scaleTime() scale which is used when we are dealing with time.

Get hands-on with 1200+ tech skills courses.