Line Chart

Line Chart

The most common use case for line charts is to compare several data sets, or to show data over a period of time. As a rule of thumb, line charts are a great way to show continuous data over time. If you want to show and compare categorical data, you may consider using a bar chart.

Multiple lines on the same chart allow the user to visualize relationships between varying data sets, such as correlated events, similarities or unexpected differences. We recommend displaying no more than 6 lines on a single graph to avoid confusion.

Line Chart

Single Line Chart

Line Chart

Horizontal Axis Labels: When visualizing data over a period of time, the horizontal axis labels display time

Vertical Axis Labels: When visualizing data over a period of time, the vertical axis labels display values.

Axis Tick Marks (optional): Major and minor tick marks on both axes may be shown.

Grid Lines (optional):

Horizontal grid lines are recommended.

Vertical grid lines are not recommended.

Line:
- Interaction (optional): If supported, right clicking on an individual line will bring up a contextual menu with associated actions.
- Data Point: Data points are visually represented as dots on the line. A user can view information related to a specific data point by hovering over it. To help the user see which point they are hovering, the dot expands and a vertical line is displayed. In addition, a tooltip should appear with the associated values for that specific point in time.
- Color: For recommendations on line colors, see the Color Palette.

Legend: It is recommended to include a legend to define the colors on the chart. On the line chart, may be left aligned and centered underneath the chart or left aligned and to the right of the chart.
- Interactive Legend (optional): Clicking on a series in the legend should toggle the visibility of the series in the chart. Hovering over a series in the legend will highlight the blocks associated with that attribute.