This article describes how to create a line chart visualization from a data table. It will take you from a table like this:
To a Page that like this:
Requirements
- A crosstab table with at least two rows or columns.
Please note this requires the Data Stories module or a Displayr license.
Method 1 - via the visualization menu
- Go to the Visualization icon > Line > Line. A new object will be created on the Page and you'll notice the controls (the object inspector) on the right-hand side of the screen.
- Under Data > DATA SOURCE click the drop-down to see all your tables and other outputs in this project. Select the desired crosstab table.
- You'll notice that the chart shows the data split by columns as a series. To fix it, go to Inputs > DATA MANIPULATION and check the Switch rows and columns box.
- OPTIONAL: To change the color selection, go to Chart > DATA SERIES > Color palette and change it to the desired palette.
Method 2 - using an existing table
- Select the table.
- From the object inspector, go to the Visualization icon > Line > Line.
- OPTIONAL: Under Chart, you can make further adjustments to the appearance of the visualization.
Note
Important information about editing captions:
Visualization caption edits may not be retained when a visualization with a nested table is switched back to table. Normally, this only occurs when you double-click the caption and edit the text directly. As a workaround, we recommend using Appearance > CAPTION > Edit caption to edit your captions.
Next
How to Smooth the Curves on a Line Chart Visualization
How to Show a Moving (Rolled) Average on a Line Chart Visualization
How to Add a Line to a Column Chart (Second Y-axis)