> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Time-series Data

> Learn how to upload time-series data and configure channel view settings using Encord's SDK.

Time-series items (commonly CSV files) hold one or more channels of values over time. Upload them to a storage folder with `StorageFolder.upload_time_series()`, and control how each channel is rendered in the label editor with `TimeSeriesViewSettings`.

## Channel View Settings

`TimeSeriesViewSettings` maps each channel to its render style. Channel keys are the **CSV header names**, and headers must be unique. A view can define at most 100 channels.

Each channel is either a `TimeSeriesLineChannelViewSettings` (rendered as a line) or a `TimeSeriesPointsChannelViewSettings` (rendered as points). Both accept:

* `label` — the display name for the channel. Optional.
* `color` — a 3, 6, or 8 digit hex color. Optional.
* `hidden` — whether the channel is hidden from the default view. Defaults to `False`.

Line channels also take a `line_width` (0.5–6), and points channels a `point_radius` (1–8).

<Note>
  **New in SDK v0.1.205:** `label` and `color` are now optional. Omit `label` and the channel uses its CSV header name; omit `color` and it uses the editor's palette. Omitting the style renders the channel as a line.
</Note>

## Upload and Configure Time-series Data

Pass `settings` to `upload_time_series()` to set the initial view, read the current settings from `StorageItem.timeseries_settings`, and change them later with `StorageItem.update(timeseries_settings=...)`.

```python Configure Time-series Channel View Settings expandable theme={"dark"}

from encord import EncordUserClient
from encord.orm.storage import (
    TimeSeriesLineChannelViewSettings,
    TimeSeriesPointsChannelViewSettings,
    TimeSeriesViewSettings,
)

# --- Configuration ---
SSH_PATH = "/Users/user-encord/ssh-private-key.txt"  # Replace with the path to your SSH private key
FOLDER_ID = "00000000-0000-0000-0000-000000000000"   # Replace with your storage folder ID
CSV_PATH = "/path/to/sensor_readings.csv"             # Replace with the path to your time-series CSV

# --- Connect to Encord ---
user_client: EncordUserClient = EncordUserClient.create_with_ssh_private_key(
    ssh_private_key_path=SSH_PATH,
    # For US platform users use "https://api.us.encord.com"
    domain="https://api.encord.com",
)

folder = user_client.get_storage_folder(FOLDER_ID)

# --- Build channel view settings ---
# Channel keys are CSV header names. As of SDK v0.1.205, `label` and `color` are optional:
# omit them and the channel falls back to the CSV header name and the editor's palette.
# Omitting the style renders the channel as a line.
settings = TimeSeriesViewSettings(
    channels={
        # Fully specified line channel.
        "speed": TimeSeriesLineChannelViewSettings(
            label="Speed (km/h)",
            color="#3366FF",
            line_width=2.0,
        ),
        # Minimal line channel: no label or color, so the CSV header and palette are used.
        "rpm": TimeSeriesLineChannelViewSettings(),
        # Render a channel as points instead of a line.
        "gear": TimeSeriesPointsChannelViewSettings(
            point_radius=3,
        ),
        # Keep a channel out of the default view.
        "debug_flag": TimeSeriesLineChannelViewSettings(hidden=True),
    },
)

# --- Upload a time-series file with initial view settings ---
item_uuid = folder.upload_time_series(
    file_path=CSV_PATH,
    title="sensor_readings",
    settings=settings,
)

item = user_client.get_storage_item(item_uuid)

# --- Read the current settings ---
print(f"Current time-series settings: {item.timeseries_settings}")

# --- Update the settings on an existing item ---
item.update(
    timeseries_settings=TimeSeriesViewSettings(
        channels={
            "speed": TimeSeriesLineChannelViewSettings(color="#FF8A00"),
        },
    ),
)
```
