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

# Tables & Charts

> Add data tables and visualizations alongside your markup

## Overview

This document explains how to format a table so AxNote can display it as a chart. Follow the rules below to ensure your data is parsed correctly.

***

## Quick rules (TL;DR)

1. **Labels must exist in the first row and the first column.**
2. **All chart data cells (the body of the table) must contain valid numbers.** If a cell contains a non-number, it will be skipped.
3. The **first column** is used for category labels (x-axis). The **first row** (except the top-left cell) becomes series names.

***

## Table layout and how AxNote interprets it

Given a table like this:

|           | Jan | Feb | Mar |
| :-------- | :-- | :-- | :-- |
| Product A | 100 | 150 | 120 |
| Product B | 80  | 90  | 110 |

* **Top-left cell** (here empty) is reserved — it can be blank or contain a short title.
* **First row (Jan, Feb, Mar)** becomes the *series* names if your chart type treats columns as series (default behaviour).
* **First column (Product A, Product B)** becomes the *category* labels (rows).
* **Numeric cells** (100, 150, etc.) are the data points.

> Default mapping: columns after the first are treated as separate series and the first column provides categories (x axis). Example above will be plotted as three series (`Jan`, `Feb`, `Mar`) across the categories `Product A`, `Product B`.

***

## Accepted numeric formats

A cell is considered a *valid number* if it contains:

* Integer (e.g. `42`)
* Decimal (e.g. `3.14`)
* Negative numbers (e.g. `-7`)

**Do not include** currency symbols (`$`, `€`), thousands separators (`,`), percent signs (`%`), or text inside numeric cells — those will make the cell *non-numeric* and it will be skipped.

If you need to show currency or percent to readers, keep the displayed label outside the numeric cell (for example in the row/column header) and place the raw numeric value in the cell.

***

## What "skipped" means

* If a data cell is non-numeric, AxNote treats it as *missing* for that series/category.
* Charts will omit the point — usually resulting in a gap or no bar for that series/category depending on chart type.
* If an entire column (series) contains no numeric values, that series is ignored.
* If an entire row (category) contains no numeric values, that category is ignored.

***

## Examples

### 1) Valid table (line/column chart)

|        | Q1  | Q2  | Q3  |
| :----- | :-- | :-- | :-- |
| Sales  | 100 | 150 | 200 |
| Profit | 10  | 15  | 25  |

* `Q1`,`Q2`,`Q3` → series
* `Sales`,`Profit` → categories (rows)
* All cells numeric → chart plots all points.

### 2) Mixed table with a non-number

|       | Jan | Feb | Mar |
| :---- | :-- | :-- | :-- |
| North | 200 | N/A | 250 |
| South | 180 | 210 | 190 |

* `N/A` in `North`–`Feb` is non-numeric and will be skipped.
* The chart will plot `North` for Jan and Mar, omit the Feb point (gap) for that series.

### 3) CSV-friendly example

```
,2019,2020,2021
Apples,120,130,140
Oranges,90,95,100
```

* First row after the empty top-left cell gives the series `2019`,`2020`,`2021`.
* First column gives categories `Apples`,`Oranges`.

***

## Tips for preparing data

* **Keep numeric cells "clean"**: paste raw numbers (no currency, no commas, no percent signs).
* **Use the top-left cell** for a short table title or leave it blank — never place a series/category label there.
* **If copying from Numbers/Excel/Sheets**, paste as plain text to avoid formatted characters (e.g. `₹`, `£`, `,`).
* **Dates:** enter dates as category labels (first column) in a readable string format, e.g. `2025-01-01`, `Jan 2025`. The parser treats date strings in the first column as labels only — they must not appear in numeric cells.

***

## Common mistakes & fixes

* **Problem:** `1,234` shows as non-numeric.\
  **Fix:** Remove the comma (`1234`).
* **Problem:** `$100` is skipped.\
  **Fix:** Remove the symbol (`100`) or include an additional column that documents currency.
* **Problem:** Headers are missing in the first row/column.\
  **Fix:** Add labels to the first row and first column — parsing requires them.
* **Problem:** Entire column disappears from charts.\
  **Fix:** Check that at least one numeric value exists in the column; otherwise it will be ignored.

***

## FAQ

**Q: Can I include labels for units (e.g. USD) in the header?**\
A: Yes — unit labels are fine in the header (first row or first column) but keep the numeric cells themselves plain numbers.

**Q: What happens with percentages?**\
A: Enter percentages as plain numbers (e.g. `12.5` for 12.5 percentage points). If you enter `12.5%`, it will be treated as non-numeric and skipped.

***

## Troubleshooting checklist

1. First row and first column contain labels.
2. Numeric cells have only digits, optional `.` and an optional leading `-`.
3. No currency symbols, percent signs, commas, or stray text in numeric cells.
4. Paste data as plain text when copying from spreadsheets.
5. If points are missing, inspect the raw table for unexpected characters.
