Line charts display information as a series of data points connected by straight line segments on an X-Y axis. They are best used to track changes over time, using equal intervals of time between each data point. For example: monthly earnings.
Whether you’re tracking the fluctuation of stock prices or the number of new subscriptions to your app this month, line charts give you an accurate and quickly understandable assessment of the trend, acceleration, deceleration, and volatility of the data in question.
In this article:
- When to use a line chart
- Example uses
- Anatomy of the line chart
- Tips for creating line charts
- API and integrations
When to use a line chart
Line graphs are useful in that they show data variables and trends very clearly and can help to make predictions about the results of data not yet recorded. If seeing the trend of your data is the goal, then this is the chart to use. Line charts show time-series relationships using continuous data. They allow a quick assessment of acceleration (lines curving upward), deceleration (lines curving downward), and volatility (up/down frequency). They are excellent for tracking multiple data sets on the same chart to see any correlation in trends.
They can also be used to display several dependent variables against one independent variable. Some experts recommend no more than 4 lines on a single graph. We agree with that recommendation. Any more than that and the line chart becomes difficult to interpret.
Line charts are great visualizations to see how a metric changes over time. For example, the exchange rate for GBP to USD.
Another use for line charts is comparing two or more series of data over time. For example, the difference in median household income between California and the rest of the United States
Anatomy of the line chart
The line chart consists of an x-axis and a y-axis. The x-axis values are defined as number or date/time values. Y-axis values must be numbers and can be set to be interpreted (formatted) as decimal, percent, and currency.
This widget supports more than one series of data with each series corresponding to a unique line in the chart.
Tips for Creating Line Charts
With their innate simplicity, line charts are some of the easiest visualizations to get right. Add a little polish, and your data can really shine. We recommend:
1. Labeling series appropriately
This is particularly relevant if you have more than one series. If you have just one series, choosing a relevant title for your widget (i.e. MRR added this month) can be enough.
2. Using a maximum of 4 series
Less is more when it comes to making your visualization easy to get at first glance. Multiple series are great for comparing the behavior of one metric to another but too many comparisons could be an overkill. If you ever need more than 4 series, consider creating more than one widget.
Other than that, you should decide on a clear title for your line chart. The title should be a brief description of the data that you want to show.
3. Adjusting precision
Use the Decimal Places feature to manually set the precision of numbers in your widgets, so that you can show the level of detail appropriate for your dashboard.
If needed, you can also override our automatic settings for what abbreviation and unit to show.
Abbreviation, Decimal Places and Unit are part of the "Fine-tune" settings
Abbreviation: Numbers can be shown in their raw state, or as Thousands (K), Millions (M), or Billions (B).
Unit: Allows you to manually enter any prefix or suffix up to 3 characters long. This means if you’d prefer to display your currency differently to our default option you now can. As examples you might want Swedish Krona to show as 100 Kr instead of SEK 100, or New Zealand Dollars to just have the $.
API and integrations
You can build line charts using the API (custom widgets).
For detailed information on how to display a line chart using custom widgets, please visit our Developer Documentation.