Introduction
This article looks at the line chart data objects available in Astrato. Line charts are best used with continuous axes like time dimensions, numeric dimensions, etc.
Line charts are best used to look at trends and compare trends between different periods or different entities.
A Line Chart data object displays chart data in a line or lines. Figure 1 shows an example of a line chart being added to a sheet in a workbook.
Line Chart Types
Astrato already supports multiple line chart types, with plans to add more in the future (these are greyed-out icons in the toolbar). You can display the data in a line or a line area, where the space between the line and the axis or the next value displayed is shaded. Line charts in Astrato can be created using one (or more) measures and one (or two) dimensions, depending on the chart type (Table 1). Adding a measure converts a line (or line area) chart to a multi-line (or stacked area) chart.
Table 1: Line Chart Types
Chart Icon / Type / Data | Description |
Line / Line Area 1 Dimension, 1 Measure | Line and line area charts show how values change over time, or through a sequence. |
Multi-Line 1 Dimension, 2 (or more) Measures | Show and compare how multiple values change over time, or through a sequence. |
Stacked Area 2 Dimensions, 1 Measure | Compare the totals of values across categories over time, or through a sequence. |
Line Chart Settings
Building a Line Chart
In the data tab, you define the data to use in the chart and define all the settings for the measures.
A line chart data can include:Two dimensions and one measure
One dimension and up to 10 measures.
Measure Settings
Color- set the color and opacity of the line.
Format- set the number format for the measure
Line style- set the line style: solid or dashed
Line size- set the line width.
Shape-
set the shape for the data points to display labels on the points a shape must be enabled.
The image below shows a measure with shape enabled.
Advanced calculation- apply advanced calculations in the chart, such as period-over-period, moving average, and more.
To learn more, check out this article.Axis- set the axis for the measure.
Trendlines
Select a measure to calculate the trendline and a type of trendline.
Customize the line look and feel.
Add multiple trendlines.
Reference Lines
Add a reference line on either axes to show goals or important timestamps.
Customize the reference line display.
A reference line can have a static or dynamic value set by a variable.
Using a variable allows users to change the display interactively as part of their data exploration.
To learn more about how to use variables, check out this article.
Forecasting
Add a forecast to the line chart using a selected measure.
Customize the display of the forecasting line.
To learn more about forecasting, check out this article.
Styling a Line Chart
Line- set the display as either line or area
Line type- select the desired line type.
Labels-
show- activate labels in the chart.
Labels will be displayed only for measures where shapes(points) are enabled.
(check this part of the manual to learn how to enable shapes for a measure)
In the image below (labels only appear for the line with the points)Label density- select how many labels will appear on each line.
(by default, labels are disabeld)
Below are examples of the difference between each option, which is displayed in the same chart.Colored label- Customize the label font and backdrop color.
(by default the color of the line is used)
Color- customize the coloring of the chart.
Legend- set the legend position and title.
Data gaps- set the approach to handle gaps in the lines.
Axes Settings of a Line Chart
Control the axes display and add grid lines and a scroll bar to improve the chart display.
Dimension
Control the color and display of labels, titles, ticks, and lines.
Show axis tooltips: When enabled, hovering over the axis will show a vertical dashed line across the chart (see an example in the image below).
Enable continuous axis- automatically set the number of labels on the axis and change it dynamically according to the range of values in the axis.
(this is the same chart as in the image above when a continuous axis is enabled)Invert axis- invert the labels' order from left to right.
Axis labels- Set how labels should behave when they overlap.
Auto- will distribute labels evenly.
Show last- will always display the last label.
Label length- control the length of the label or keep it auto-fit for the best display.
Limit visible domain (scroll bar) -
Set the limit of data point width or number of data points displayed; if the limit is reached, a scroll bar will appear below the axis.
There are two modes of scroll bars depending on whether a continuous axis is enabled.
Continuous axis disabled
There are two options to set the limit:Minimum size- this option is better when building for different screen sizes, as it sets the limit by the number of pixels given for each data point.
Minimum count- this option is simpler to control when the scroll bar will appear.
Continuous axis enabled
Gridlines- add vertical grid lines to the chart.
Measure
Control the measure axis display and range.
Control the color and display of labels, titles, ticks, and lines.
Default axis name- Override the axis title with a manual value.
Range- control the range of values display on the axis.
Gridlines- display horizontal gridline.
Axis bands- define ranges of bands that color the chart's background.
This feature helps show when values vary off the expected range.The axis band range can be defined by static values or variables.
Variable values can be changed either by user inputs or by actions.
This can be used to create control charts, for example.