> For the complete documentation index, see [llms.txt](https://documentation.dnanexus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.dnanexus.com/user/cohort-browser/chart-types/row-chart.md). Agents can also search and read this documentation through its [MCP server](https://documentation.dnanexus.com/~gitbook/mcp).

# Row Chart

Learn to build and use row charts in the Cohort Browser.

{% hint style="info" %}
An Apollo license is required to use Cohort Browser on the DNAnexus Platform. Org approval may also be required. [Contact DNAnexus Sales](mailto:sales@dnanexus.com) for more information.
{% endhint %}

## When to Use Row Charts

Row charts can be used to visualize categorical data.

When creating a row chart:

* The data must be from a field that contains either categorical or categorical multi-select data
* This field must contain no more than 20 distinct category values
* The values cannot be organized in a hierarchy

## Supported Field Types

| **Supported Data Types**                  | **Limitations**              |
| ----------------------------------------- | ---------------------------- |
| Categorical, including sparse categorical | ≤20 distinct category values |
| Categorical Multi-Select                  | ≤20 distinct category values |

See [When to Use List Views for Categorical Data](#when-to-use-list-views-for-categorical-data) if you need to visualize hierarchical categorical data.

### When to Use List Views for Categorical Data

Row charts can't be used to visualize data in categorical fields that have a hierarchical structure. For this type of data, use a [list view](https://documentation.dnanexus.com/user/cohort-browser/chart-types/list-view.md).

Row charts aren't supported in Cohort Compare mode. In Cohort Compare mode, row charts are converted to [list views](https://documentation.dnanexus.com/user/cohort-browser/chart-types/list-view.md#list-views-in-cohort-compare).

### Using Stacked Row Charts for Multivariate Visualizations

Row charts can't be used to visualize data from more than one field. To visualize categorical data from two fields, you can use a [Stacked Row Chart](https://documentation.dnanexus.com/user/cohort-browser/chart-types/stacked-row-chart.md).

## Using Row Charts in the Cohort Browser

In a row chart, each row shows a single category value, along with the number of records - the "count" - in which that value appears in the selected field. Also shown is the percentage of total cohort records in which it appears - its "freq." or "frequency."

The following sample row chart shows the distribution of values in a field *Salt added to food*. In the current cohort selection of 100,000 participants, 27,979 records contain the value "Sometimes", which represents 27.98% of the current cohort size.

![Row Chart in the Cohort Browser](https://3410363935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1s2UHuAFgrsxnijuHMc%2Fuploads%2Fgit-blob-4d41c7763b00c0295c2305344da0a7dfc85ea41b%2Frow-chart.png?alt=media)

{% hint style="info" %}
When records are missing values for the displayed field, the sum of the "count" figures is smaller than the total cohort size, and the sum of the "freq." figures is less than 100%. See [Chart Totals and Missing Data](https://documentation.dnanexus.com/user/cohort-browser/chart-types.md#chart-totals-and-missing-data) for more information on how missing data affects chart calculations.
{% endhint %}

## Preparing Data for Visualization in Row Charts

When [ingesting data using Data Model Loader](https://documentation.dnanexus.com/developer/ingesting-data/data-model-loader/ingestion-data-types.md), the following data types can be visualized in row charts, if category values are specified as such in the coding file used at ingestion:

* String Categorical
* String Categorical Sparse
* String Categorical Multi-select
* Integer Categorical
* Integer Categorical Multi-select

{% hint style="info" %}
While sparse categorical data can be visualized using row charts, non-encoded values are not supported. These values do not appear as rows.
{% endhint %}


---

# 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://documentation.dnanexus.com/user/cohort-browser/chart-types/row-chart.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.
