Articles on: Dashboards & Jobs

How to Create a Line Chart

In this guide, we'll walk you through the process of creating a Line Chart. Line charts are excellent for visualizing data trends over time. Let's dive in!

1. Access the Dashboard
2. Choose the Chart Type
3. Add a Chart Tag
4. Add a Chart Title
5. Add a Chart Description
6. Configure Chart Options
7. Choose Type of X Axis
8. Configure Scorecard Options
9. Add a Query

1. Access the Dashboard



To begin creating your Line Chart, first access your dashboard. If you haven't set up a dashboard yet, you'll need to create one. Once inside your dashboard, click on the "Add Chart" button if you're in the "Create New Dashboard" dialog. Alternatively, click on the plus (+) icon if you're in the "Edit Dashboard" dialog.




2. Choose the Chart Type



A dialog box will pop up prompting you to select the type of chart you wish to create. From the dropdown list, pick "Line Chart".



3. Add a Chart Tag



Next up, input a chart tag. This tag should correlate with the chart you're creating. For instance, if your chart is about tracking sales over time, a tag like "sales_line" might be applicable



4. Add a Chart Title



Now, designate a title for your chart. This title should entail what the chart represents. If your chart is tracking sales over time, a title like "Sales Overtime" would be fitting.



5. Add a Chart Description



Incorporate a description for your chart. This will define the chart's purpose and the function of the query. For instance, you might describe it as "This chart showcases sales overtime".



6. Configure Chart Options



In this phase, you'll adjust various chart options:

- Force the Display of the Chart in Full Width: Activate this if you desire the chart to span the entire width of the screen.
- Fill the Chart (with color): Activate this if you want the region beneath the line to be color-filled.




7. Choose Type of X Axis



Select the type of X axis based on your dataset. If you're aiming to display category values such as sales per quarter, the "Text" option is suitable. However, if your data encompasses timestamps and you wish to depict trends over distinct time intervals, like sales per day's hour, then "Time" is the way to go. Additionally, if you want to use a text field for dates, you can convert the date field from a timestamp to a date filter using a query. For instance:
This query converts the timestamp into a 'YYYY-MM-DD' format, allowing you to use it as a text field in the chart.



8. Configure Scorecard Options



In this step, you have the option to adjust the Total Scorecard and Scorecard Legend settings. These options are particularly useful when your dashboard type is set to "Mobile Only".

- Total Scorecard: This displays a summarized value, providing a quick overview or total of the data being visualized in the chart.

- Scorecard Legend: This displays a legend, helping users understand the data points or categories being represented in the chart.



9. Add a Query



To wrap things up, you need to input a query that will retrieve the data for your chart. This query should yield two values for the X and Y axes. Ensure these values are aliased as "x" and "y" respectively. This is crucial as it signals the tool to generate a Line Chart. Always test your query to confirm it produces the anticipated results.




add filters accordingly
ensure your query has only two columns aliased as x and y


That's all there is to it! You've now created your Line Chart. Bear in mind, you can always modify your chart later if adjustments are necessary.

Updated on: 28/08/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!