> For the complete documentation index, see [llms.txt](https://docs.trymito.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trymito.io/how-to-1/create-a-line-chart-of-time-series-data.md).

# Create a line chart of time series data

A step-by-step guide to visualizing time series data with Mito graphing.

#### Step 1: Check the dtype

Make sure that dtpye of your time series data is properly recognized as `datetime` by looking at the dtype indicator in the column header.

If the dtype indicator does not say "date", see our [reference guide](/how-to/type-changes.md) for converting the dtype of a column and convert the column to a `datetime`.

![Checking the dtype of a graph](https://2294704369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP_U5ZCmiamDOXEOOTC%2Fuploads%2Fgit-blob-a41cee73791008c245b6fe85b44f9386cf4617c7%2FScreen%20Shot%202022-03-23%20at%203.31.08%20PM.png?alt=media)

#### Step 2: Create a new graph

To create a new graph, click on the `Graph` button in the Mito toolbar.

![Creating a new graph](https://2294704369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP_U5ZCmiamDOXEOOTC%2Fuploads%2Fgit-blob-1bbd8be8cff825de8b1c33ff0dd2204d77fc8d73%2FScreen%20Shot%202022-03-23%20at%203.32.15%20PM.png?alt=media)

#### Step 3: Select the correct data

Set the sheet you want to graph as the graph's `Data Source`.

![Select the data source](https://2294704369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP_U5ZCmiamDOXEOOTC%2Fuploads%2Fgit-blob-ec50d5c9c460c06d36d5c271624c54659fef14c6%2FScreen%20Shot%202022-03-23%20at%203.34.39%20PM.png?alt=media)

#### Step 4: Select the line chart

Set the chart type to `line`.

![Create a line chart](https://2294704369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP_U5ZCmiamDOXEOOTC%2Fuploads%2Fgit-blob-c2b95b40b93ccfa9526cb7c8e97ae0fdcbe2e9d5%2FScreen%20Shot%202022-03-23%20at%203.40.57%20PM.png?alt=media)

#### Step 5: Add data to your graph

Add data to the X and Y axis by clicking the `+ Add` button and selecting the column header of the data you want to add.

In this example, I'm going to add my time series data, the column called Date, to the X axis, and I'm going to add the daily high Tesla stock price to my Y axis.

![A line chart of time series data](https://2294704369-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MP_U5ZCmiamDOXEOOTC%2Fuploads%2Fgit-blob-564945b3aecae820d52e84a4771b9c8b11a16f90%2FScreen%20Shot%202022-03-23%20at%203.45.00%20PM.png?alt=media)

For more detailed information about graphing, see the [graph reference page](/how-to/graphing.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.trymito.io/how-to-1/create-a-line-chart-of-time-series-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
