Line charts allow you to visualize change over a continuous range, such as time or distance. Visualizing change with a line chart allows for the overall trend to be displayed at once, and for multiple trends to be compared simultaneously.

## Variables

Line charts are made up of a continuous Date or Number on the x-axis, and an optional Number on the y-axis.

The x-axis of a line chart displays a continuous variable such as time or distance, and the y-axis measures change over that continuous variable. When a date field is chosen for the x-axis, the dates will be binned, or aggregated, into time intervals. When a number field is chosen for the x-axis and each number appears in the table only once, no aggregation is necessary for the y-axis.

If the x-axis number field has values that repeat, an Aggregation method must be chosen. The aggregation method can be one of the following:

- COUNT—The number of times each unique category appears in the field.
- SUM
- MEAN
- MEDIAN

## Time aggregation options

Time aggregation, or binning, occurs automatically when a date field is chosen for the x-axis. Several options control the interval size and related settings applied to the binning.

### Interval size

Temporal data is binned into time intervals along the x-axis. A default interval size is chosen based on the temporal extent of the dataset and can be manually changed using the Interval Size.

### Empty bins

Depending on the sparsity of the dataset and the time interval size chosen for binning, there may be bins that contain no data. Empty bins may be treated as zero when lack of data truly represents a value of zero (for example, no illnesses were reported in May or no rain was collected during a week span). It is not appropriate to assign a zero to a bin in which no data exists because none was collected (for example, no reading from a temperature gauge does not mean there was a temperature of zero).

There are three options available for dealing with empty bins.

- Treat them as zero (Treat as zero)—This is most appropriate when counting incidents, as no incidents counted likely means zero incidents took place.
- Interpolate neighboring values (Connect line)—Null values can be visually interpolated by connecting the line between the bins on either side of the empty bin.
- Break the line (Break line)—Leaves a blank space where an empty bin falls.

### Interval alignment

Time intervals may align to the first data point or to the last data point.

Align to first data point initiates binning with the earliest date and works forward.

Align to last data point initiates binning with the most recent date and works backward.

This is important to consider because the last bin created may be partially empty, which can give the misleading impression that there is a dip in the value or count during that time, when really the data collection began or ended during the span of that bin. To avoid bin bias, check the Trim incomplete interval option. This will remove the partially filled bin from the visualization:

## Series

Line chart series can be defined from one or more value fields on the y-axis or from one value field split into series by a second category field.

### From one or more fields

Each line's marker corresponds to a numeric value. In a chart with a COUNT Aggregation method, no numeric value field needs to be specified because the value corresponds to how many unique records fall into each time interval. For example, in a dataset of crime incidents, a date field is binned into 2 week intervals with a COUNT Aggregation method. The resulting chart will display a marker for every 2 week interval representing how many crimes took place during those 2 weeks.

Other times, the numeric value corresponding to marker's placement will come from a field in the attribute table. This field can be specified in the Series table by selecting it from the Fields list. For example, in a dataset of crime incidents, a date field is binned into 2 week intervals with a SUM Aggregation method and a PropertyLoss Fields selected. The resulting chart will display a marker for every 2 week interval representing the sum of the PropertyLoss values that took place during those 2 weeks.

Additional Fields can be chosen to create a chart with multiple series. For example, in a dataset of crime incidents, a date field is binned into 2 week intervals with a SUM Aggregation method and two Fields selected, PropertyLoss and TotalDamage. The resulting chart will display two lines, one representing the sum of PropertyLoss and the other the sum of TotalDamage for every 2 week interval.

### From one field split into series

A category field can also be used to make a line chart with multiple series. For example, in a dataset of crime incidents, a date field is binned into 2 week intervals with a COUNT Aggregation method and a CrimeType Split by field. The Series table will populate with each unique CrimeType (Theft, Vandalism, Arson) and the resulting chart will display three lines, each representing the total number of crimes of that type that took place during those 2 weeks.

##### Note:

Category fields with many unique values are not appropriate for splitting a field into multiple series.

## Axes

### Y-axis bounds

Default minimum and maximum y-axis bounds are set based on the range of data values represented on the axis. These values can be customized by typing in a new desired axis bound value. Clicking the reset icon will revert the axis bound back to the default value.

### Log axis

By default, line chart axes are displayed on a linear scale. Numeric (non-date) axes can be displayed on a logarithmic scale by checking the Log axis checkbox in the Axes section of the Chart Properties pane.

Logarithmic scales are useful when visualizing data with large positive skew, where the bulk of data points have a small value, with a few data points with very large values. Changing the scale of the axis does not change the value of the data, just the way it is displayed.

Linear scales are based on addition, and logarithmic scales are based on multiplication.

On a linear scale, each increment on the axis represents the same distance in value. For example, in the axis diagram below, each increment on the axis increases by adding 10.

On a logarithmic scale, increments increase by magnitudes. In the axis diagram below, each increment on the axis increases by multiplying by 10.

##### Note:

Logarithmic scales cannot display negative values or zero. If you chose to log the axis of a variable with negative values or zero, those values will not appear on the chart.

### Number format

You can format the way an axis will display numeric values by specifying a number format category or by defining a custom format string.

## Appearance

### Titles and description

Charts and axes are given default titles based on the variable names and chart type. These can be edited on the General tab in the Chart Properties pane. You can also provide a chart Description, which is a block of text that appears at the bottom of the chart window.

### Visual formatting

When a chart window is active, a Chart Format context ribbon becomes available, allowing visual formatting of the chart. Chart formatting options include the following:

- Changing the size, color, and style of the font used for axis titles, axis labels, description text, and legend text
- Changing the color, width, and line type for grid and axis lines
- Changing the background color of the chart

### Color

Line colors can be changed by clicking the Symbol color swatch in the Series table and choosing a new color.

## Example

Create a line chart to visualize trends in fire events in Naperville from 2007-2010.

**Date or Number**— Date**Aggregation**— COUNT**Time Interval Size**— 3 Months**Series > From one field split into series****Number**— <empty>**Split by**— Time of day