Line graphs Trends
Line graphs plot numeric values for categorical data as a line that shows a progression through time. If you need to plot and/or compare data by amount from a common zero-line, use a Bar graph
Components
For components, go to:
- Web component: ChartGraph
- Figma component: Line graph
Usage guidelines
- When viewing or comparing data that changes over a certain time range
- When a visual representation is needed to see trends and understand data
Best practices
These are best practices specific to line graphs. For global best practices, see ChartGraph best practices and General guidelines.
Use to analyze and/or compare values as they progress through time.
Use to compare total amounts between categories. Use a bar graph instead.
Keep it to a maximum of 4 colors in a single line for easier readability.
Use 5 or more colors to compare data sets, as it can quickly become hard to read. Place single-line graphs in a grid instead.
Use line shapes that are true to the accuracy of the data presented—sharp ends for absolute data, curved lines for approximate historical data and dashed + curved lines for forecasts.
Use curved lines for visual appeal; they can make it hard to tell what the accuracy of the data is.
Variants
See the ChartGraph component for use cases and examples of all the different types of line graphs available:
- Line graph: for both single or multiple lines
- Biaxial: when comparing two trends that have significantly different amounts or units of measurement
- Precision in line graphs: for deciding when to use a rectilinear, curved or dashed line
Writing
For general writing and content formatting guidelines, refer to our Content standards.
- Keep labels short so that they don’t wrap and make it hard to read data
- Use abbreviations that are commonly understood and can be translated to all supported languages
- Create extra-long labels that have to wrap or truncate
- Use abbreviations that are only understood internally or that don't translate well.