Create your first line chart in Sigma
1. Create your first line chart in Sigma
Before we begin, note that in this course, you'll use a sandbox version of Sigma unique to the DataCamp experience. It's possible that the appearance of the course version of Sigma differs slightly from your organization's version of Sigma. Don't worry - the overall experience will be very similar. Let's get started building a basic line chart showing the number of calls flagged for fraudulent activity each month. In Sigma, it's best practice to create charts as child elements of existing table elements in your workbook. This allows you to easily filter or re-arrange the parent table to fit your needs. For a refresher on parent-child lineage in Sigma, see our Intro to Sigma course. Using the table's element toolbar, let's create a child chart element. By default, Sigma creates bar charts, but this is easily changed in the properties panel. To create the line chart, we drag columns from the properties panel onto the X-Axis and Y-Axis sections. Our [Fraud Flagged] column is numeric, containing a 1 when fraud was identified and a 0 when it was not. Setting our Y axis to a Sum of this column will sum up the 1s, giving us a count of calls in which fraud was flagged. The granularity of our [Call Date] column is the day the call was received. To display calls by month instead, the column drop-down menu on any date column will give us the option to "Truncate date" to a less granular frequency. We'll choose month. You can change the appearance of axis labels with the column's drop-down. To see the abbreviated month name along the X axis, we can choose Format > Month Year. Or if we want to display this chart by quarter, perhaps we'd rather see the labels appear with the quarter number rather than the month the quarter started. This isn't a predefined format option, but in the column's custom format menu, we can leverage d3 notation to indicate that we'd like the letter Q followed by the quarter number. It's important to understand that formatting a column's appearance is not the same as truncating it. Changing the format simply changes how the date appears on screen, its granularity is not changed. Truncating, however, is like taking a pair of scissors to a date value such that only the truncated level of detail appears. For example, when truncating to "month", the dates February 5th, 2025 and February 27th, 2025 appear identically as February 2025. For the purpose of showing the month of February on a chart axis, this is fine. But if we intend to do row-level calculations on truncated dates, we should use caution. If needed, you can always remove truncation and return a column to its original form. Finally, let's cover some of Sigma's chart formatting options. In the Format panel, we can make stylistic choices about our chart's appearance. We can give the chart a title and choose whether to display, and how to orient, axis titles and labels. Legends and data labels can also be customized. If you ever find that some labels aren't visible on a chart, try toggling label display to "All". This forces all labels to be displayed, even if they overlap with one another or other parts of the chart. Taking a step back, we now have a simple line chart which indicates a generally flat trend in fraudulent activity calls. This is critical information for Oakmark's hiring team that they can start using right away. Now it's your turn! In the next exercises, you'll test your knowledge of basic charts in Sigma, and help Oakmark Bank build a line chart to monitor call volumes.2. Let's practice!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.