# Using Trend Graphs to View Historical Data

You can display a trend graph's past data that has been cleared from the trend graph. This function is useful for evaluating changes in the data over a time.

## Example Operation

Note: To configure Data Logging settings, refer to Logging Data at Constant Intervals.

## Setting Workflow

1. Set up Parts
2. Set up Scripts

## Set up Parts

### Project Explorer : [Screen Design] ➞ [Screens] ➞ [Screen1]

Drag and drop the following objects from the [Tool Chest] to the screen.

#### Trend Graph (Name: TrendGraph1) properties : A-1

Tab | Sub Tab | Property | Value
[Function] | [Basic] | [GroupName] | [LoggingGroup1]
[Channels] | 3
[Channel 1] | [Variable] | [Variable] [Name]: Var1
[Use Global Range] |
[Visibility] |
[Display Format] | [Line]
[Mark] | [None]
[Channel 2] | [Variable] | [Variable] [Name]: Var2
[Use Global Range] |
[Visibility] |
[Display Format] | [Line]
[Mark] | [None]
[Channel 3] | [Variable] | [Variable] [Name]: Var3
[Use Global Range] |
[Visibility] |
[Display Format] | [Line]
[Mark] | [None]
[Display Mode] | [Full]
[Graph Type] | [Pen Recorder]
[Min Global Range] | 0
[Max Global Range] | 1000
[Interval] | 1
[Unit] | Min
[Detail] | [Display Cursor] |
[Display Cursor Labels] |

Note: You can display both historical data and current data at the same time by enabling Trend Graph's [Display Historical Data] property. For details, refer to the following.

[Display Historical Data]

#### Switch object (Name: Switch1) properties : B-1

Default Value

#### Switch object (Name: Switch2) properties : B-2

Default Value

#### Switch object (Name: Switch3) properties : B-3

Default Value

## Set up Scripts

### Project Explorer : [Screen1]

Set the following script on the object.

From the [Tool Chest] drag and drop the script to the Script editor.

#### Switch object (Name : Switch1) script : B-1 Mode Change

#### Switch object (Name : Switch2) script : B-2 Move Graph Plot to Past Time

#### Switch object (Name : Switch3) script : B-3 Move Graph Plot to New Time

Legend | Block
1 | [Triggers] ➞ [Touch] ➞ [Touch]
2 | [Values] ➞ [Screen Object]
3 | [Operations] ➞ [Screen/GraphicObject] ➞ [Trend Graph]