> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-tools/data-and-code/visualize-dataset.md).

# Visualize Dataset

Turn CSV data into a chart that makes a comparison, trend, or distribution easier to understand. Use this tool when the next step needs a visual result rather than only a number.

## Create a visualization

1. Pass the CSV contents to **CSV Data**, including column headers. The field accepts a list of CSV strings, not a list of file names.
2. Use **Query** to specify the question, measures, grouping, and any filters. Choose **Visualization Type** when you need a particular presentation.
3. Run the tool and check **Success**. Open the returned visualization and check the labels, units, and aggregation against the input.

**Result:** **Outputs** contains the generated visualization details, such as an embed link or image link when available.

## Behavior and troubleshooting

If **Success** is false, read **Error** and keep **Request ID** when reporting the failure. A chart can render correctly while using the wrong grouping or aggregation. Check its values before sharing it.

## Inputs

| Field    | Parameter  | Description                                    |
| -------- | ---------- | ---------------------------------------------- |
| Query    | `query`    | Instructions for how to visualize the dataset. |
| CSV Data | `csv_data` | List of serialized CSV strings to visualize.   |

## Configuration

| Field              | Parameter            | Description                                            |
| ------------------ | -------------------- | ------------------------------------------------------ |
| Visualization Type | `viz_component_type` | The type of visualization to generate.                 |
| Model              | `model`              | The AI model to use for generating the visualization.  |
| Debug Mode         | `debug`              | Whether to return debug information. Default: `false`. |

## Outputs

| Field      | Parameter    | Description                                           |
| ---------- | ------------ | ----------------------------------------------------- |
| Success    | `success`    | Whether the visualization was generated successfully. |
| Outputs    | `outputs`    | List of generated visualizations.                     |
| Request ID | `request_id` | The Tako request ID for this visualization.           |
| Error      | `error`      | Error message if the visualization failed.            |

## Related guidance

[Data Types, Lists, Missing Values, and Empty Results](https://docs.stackai.com/technical-reference/workflow-execution/data-types-lists-missing-values-and-empty-results.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.stackai.com/stackai-tools/data-and-code/visualize-dataset.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.
