Skip to main content
For line charts, we recommend an ideal state of 3 data sets for optimal readability and immediate understanding. Our color palette offers additional options, allowing users to add more lines as needed. However, we advise limiting the total to no more than 6 data sets to prevent visual clutter and maintain clarity. This approach balances a clean default view with flexibility for more complex analysis.
Note: Use only when data points are continuous; the chart assumes a logical progression and meaningful connection between all points.

General Design Guidelines

Example of a line chart using and hover state:
A line chart with redlines
  1. Headline
  2. Axis label
  3. Legend label
  4. Direct labeling
  5. Hover state tooltip

Variable ordering

1 Variable2 Variables3 Variables4+ Variables
If your chart has one variable, start with the default blue hue in the palette.If your chart has two variables, use the default and dark blue.If your chart has three variables, add the cyan.For 4+ variables, continue with the categorical color palette.
variable ordering, 1 variablevariable ordering, 2 variablesvariable ordering, 1 variablevariable ordering, 4+ variables
One Variable1 variable line chart example
Two Variables2 variables line chart example
Three Variables3 variables line chart example
Four Variables4+ variables line chart example

Shapes

Shapes in line charts help tell data series apart. When using 3 or more variables, adding distinct shapes improves accessibility for color-blind or visually impaired users. Make sure the legend uses shapes only to clearly show each series. Follow the shape order as it is displayed below.
Note: Working with an edge case and need more shape options? Feel free to reach out in the #askvizd channel, we’re happy to help!
Triangle
Square
Circle
Additional shapes for edge case scenarios:
Rhombus
Hexagon
Kite

Real Example #1

The following is a real-world example from our product. This example displays 3 variables in a single line chart. It uses the first three colors of the categorical color palette and shapes to show the difference between each line.
Average ranking in Google's local pack when searching for the business's categories (chart)

How to Use

The following Do’s and Don’ts illustrate best practices and common mistakes to help guide effective use of line charts in data visualizations.
line chart with consistent shape sizing
Domake sure the shapes in your line charts are a consistent, readable size—neither too small nor too large. Match the shape size to the example above. The final size may vary depending on factors like chart dimensions and screen resolution.
line chart with inconsistent shape sizing
Don'tuse large chart shapes - it will make the layout look visually unbalanced.
line chart with shapes for data points at 3+ variables
Douse shapes for line charts with 3+ variables
line chart with shapes for data points with less than 3 variables
Don'tuse shapes on line charts with less than 2 variables.
line chart with balanced axises
Doensure readability by using a clear and balanced number of axis labels.
line chart without balanced axises
Don'tclutter the chart with excessive Y-axis labels that hinder clarity. The example above shows Y-axis labels in increments of 100 (100, 200, 300, and so on). When possible, reduce labels to increase clarity and legibility.
line chart with line ending on the year the data ends
Dorepresent the current year's line up to the last available data point, keeping it cut off or partially shown, not extending fully to the end of the year.
line chart with line ending on the year the chart ends
Don'textend the current year's line fully to the end of the year if data is not yet complete, as this misleadingly suggests that the full year's data is available and potentially distorts the perception of trends or performance.
line chart with six variables
Doensure optimal clarity and prevent visual clutter in line charts by limiting variables to no more than 6 total. Please utilize the categorical color palette in its defined order, as specific highlighting is generally not needed when users can access detailed information via hover states.
line chart with random color choices
Don'tuse more than 6 colors or variables in a line chart. This creates visual clutter, making it hard to distinguish lines and understand the data effectively.

Area of Focus & Hover States

Below is an example of Area of Focus charts that use subtle emphasis of color to highlight key data without losing overall context.
In contrast, hover states apply stronger, interactive visual changes to indicate active user engagement and selection.

Area of Focus

To highlight a single variable, use the default blue for the focused variable and grey 600 for all others. In this scenario, there should be no cursor for the area of focus, this represents a focus state, not a hover interaction.

Hover State

When in hover states, set all non-hovered elements to 20% opacity to keep focus on the highlighted data point, and use Anvil’s Tooltip component to display the value/label on hover.
Line chart with the highlighted line
Line chart with the highlighted line with a hover state

Keep the Content Consistent

On the “Progress Over Time January” line chart below, the viewer can toggle six variables. To ensure each variable keeps its assigned color when toggled: turning a variable off should only hide it, not reassign or shift colors among the remaining series. For example, if Completed Tasks is unchecked, its color remains reserved so the visible lines, legend, and visual mapping stay stable. Do not change the styling or reassign colors (for example, altering color, stroke, or pattern).

All checked variables are visibleLine chart with the highlighted line with a hover state

Unchecked, one variableLine chart with the highlighted line with a hover state

Questions? Challenges?

Contact the Visual Design team on the #ask-vizd channel
Last modified on January 23, 2026