Graphs

v2.0

Our graphs provide beautiful, simple, and accessible ways to understand sets of data.

Stylized graphic of a graph.

Considerations

Keep it simple

Progressive disclosure is key—ensure you are using data visualization as a tool to aid in understanding, not to overwhelm users with too much information all at once.

Tell a story

Focus on what you want to communicate and who you’re communicating to. Understanding data is much easier when there is a human narrative. Think about how you would tell the story in a sentence.

Scale thoughtfully

Our charts scale seamlessly for all screen sizes and users. Use designated colors, interactive states, and scaling behaviors to ensure they are simple and accessible in all contexts.

Anatomy

Graphs

Stacked bar chart with 6 bars. Each bar has 3 values.

Stacked bar chart

Used to compare multiple part-to-whole relationships or ranking a single data set.

Side-by-side bar chart values. Each values has 3 bars.

Side-by-side bar chart

Used to compare data across categories or two or more criteria.

Stacked area chart with 3 values.

Stacked area chart

Used to visualize a total over time and how each category contributes to the whole.

Line graph with 3 values. Each line is a different color. The first value is blue with circles, the second is teal with triangles, the third is navy blue with squares.

Line graph

Used to track changes over time for single or multiple data sets. Line graphs are better at showing smaller changes and/or longer time periods than bar charts.

Horizontal an circular progress bars with light gray background indicating the total amount and a blue to signal amount completed.

Progress bar

Used to show progress toward a single goal or total. Can be either linear or circular.

Donut chart with 3 segmented values. One value is bright blue, one value is navy blue and one value is light blue with bright blue outline and stripes.

Donut chart

Used to show the breakdown of a single part-to-whole relationship within a total.

Types

Single data sets

We use our primary blue when visualizing a single value, such as progress bars, or a single data set, like line graphs, bar charts, or area charts.

Three examples of different single data graphs. From left to right is progress bar, line, and bar graphs.

Part-to-whole data sets

We use shades of blue, and teal when needed, to represent part-to-whole relationships. This approach keeps the focus on a single, neutral color family, avoiding the use of hues like green and red that may carry specific meanings in other contexts.

Three examples of different part-to-whole graphs. From left to right is donut, stacked area, and bar graphs.

Content

Controls

Controls are used to change the type of data shown on a graph. They can be tabs, quick filters or drop-downs that are either left aligned or right aligned. Use clear, concise labels to name each option.

  • Use sentence case
  • No punctuation
  • Use parallel structure across options
A bar chart with tabs at the top left.

Tabs

A bar chart with quick filters at the top left.

Quick filters

A bar chart with a dropdown in the top right.

Dropdown

Axis

The X and Y axes help users compare data points consistently across graphs. Choose intervals that avoid overcrowding. For example, if the chart covers a full year of daily data, don't display all 365 days on the X-axis. 

Axis labels

Leave at least 16px between labels and include key anchor points. Start the Y-axis at 0 for accurate proportions, and mark significant time points on the X-axis, like financial quarters or days of the week.

Tooltips

Tooltips reveal precise data values when users hover over or interact with the chart, letting them explore specific data points. The title of the tooltip names the date or time the datapoint is from.

  • Use sentence case
  • No ending punctuation

Learn more about writing tooltips.

A stacked area chart with a title in the upper left and dropdown in the upper right. X-axis points to the labels across the bottom of the graph, as well as the marker in the middle of the graph. The marker in the middle of the graph has 3 data points and one of the data points has triggered a tooltip. Y-axis points to the labels moving up the right side.

Interactivity

Interactivity is crucial in maintaining our principles of simplicity and progressive disclosure. Graphs and charts should be simple enough to be understood at-a-glance. Progressive disclosure allows users to easily find the details they need by interacting with specific parts of the graph.

Density

Small screen

The size and number of bars in a bar chart can affect its clarity and meaning when the chart becomes too complex. If bars are narrower than 12px with less than 8px of padding, the chart starts to resemble an area chart, making the bars difficult to read. Aim to keep bars between 12px and 16px wide, with at least 8px of padding between them for optimal readability.

A bar chart containing 4 bars. There is 40px of padding between bars.

16px bars with 40px padding

A bar chart containing 6 bars. There is 32px of padding between bars.

16px bars with 32px padding

A bar chart containing 12 bars. There is 8px of padding between bars.

16px bars with 8px padding

Medium and Large screen

On medium and large screens, the increased real estate allows us to expand the X-axis to display more data in most graphs, often extending the time period and adding more bars in bar charts. However, if consistency in the time period across screen sizes is crucial for the user, you can maintain the same time period and instead adjust the bar width, spacing, and graph inset. On larger screens, bars can widen from 12px to 24px, with at least 8px of padding between them.

The same bar chart displayed across small, medium and large screens. As the screen size gets wider, the bars also get wider with more space in between.

Maintain time frame

Increase bar width, padding, and inset.

A bar chart displayed across small, medium and large screens. As the screen size gets wider, the bars increase in amount, and bar width and padding also become wider.

Increase time frame

Increase number of bars, width, and padding.

Color

Examples

Desktop screen showing eBay Selling Performance page which has a series of links in a left hand nav, a summary bar with 4 metrics across the top under the page title “Sales”, and a stacked bar chart underneath showing “Total sales”.
Three mobile screens. The first has a donut chart. The second has metrics tiles and a stacked area chart. The third has a top metric and a line graph.

Best practices