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

# Create Chart

> Create interactive charts and visualizations in Google Sheets

The **Create Chart** node creates interactive charts and visualizations in Google Sheets workbooks. Perfect for automated reporting, data visualization, and dashboard creation. This is an **AI-powered node** that can understand natural language instructions.

***

## When to Use It

* Automate chart creation for reports and dashboards
* Visualize data trends and patterns
* Create interactive business intelligence charts
* Generate charts from dynamic data ranges
* Build automated visualization workflows
* Create professional presentations with data charts

***

## Inputs

| Field           | Type     | Required | Description                                           |
| --------------- | -------- | -------- | ----------------------------------------------------- |
| **Spreadsheet** | Text     | Yes      | Google Sheets spreadsheet URL or ID                   |
| **Sheet Name**  | Text     | Yes      | Name of the sheet to create the chart in              |
| **Data Range**  | Text     | Yes      | Cell range containing the data to chart               |
| **Chart Type**  | Dropdown | Yes      | Type of chart to create                               |
| **Chart Title** | Text     | No       | Title to display on the chart                         |
| **Alt Text**    | Text     | No       | Alternative text for accessibility and identification |

### Spreadsheet Input Options

**URL Format:**

```
https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit
```

**Spreadsheet ID Format:**

```
1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms
```

### Data Range Format

**A1 Notation Examples:**

```
A1:C10        # Simple range
Sales!A1:D50  # Specific sheet and range
A:C           # Entire columns A through C
1:5           # Entire rows 1 through 5
```

### Chart Type Options

| Type       | Best For    | Description                                  |
| ---------- | ----------- | -------------------------------------------- |
| **COLUMN** | Comparisons | Vertical bar charts for comparing categories |
| **LINE**   | Trends      | Line charts showing data over time           |
| **AREA**   | Cumulative  | Area charts showing volume and trends        |
| **BAR**    | Rankings    | Horizontal bar charts for rankings           |
| **PIE**    | Proportions | Pie charts showing parts of a whole          |

***

## Output

Returns information about the created chart:

```json theme={"dark"}
{
  "chart_id": 1234567890,
  "chart_title": "Monthly Sales Performance",
  "chart_type": "COLUMN",
  "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
  "sheet_name": "Dashboard",
  "data_range": "A1:C12",
  "alt_text": "sales_chart_q4",
  "position": {
    "row": 15,
    "column": 5,
    "width": 600,
    "height": 400
  },
  "chart_url": "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit#gid=0&range=A15:I32"
}
```

### Output Fields:

| Field               | Description                             |
| ------------------- | --------------------------------------- |
| **chart\_id**       | Unique identifier for the created chart |
| **chart\_title**    | Title displayed on the chart            |
| **chart\_type**     | Type of chart created                   |
| **spreadsheet\_id** | Google Sheets spreadsheet ID            |
| **sheet\_name**     | Sheet where chart was created           |
| **data\_range**     | Cell range used for chart data          |
| **alt\_text**       | Alternative text for identification     |
| **position**        | Chart position and dimensions           |
| **chart\_url**      | Direct link to view the chart           |

***

## Credit Cost

* **Cost per run**: 2 credits

***

## Common Workflows

**Automated Dashboard Creation:**

```
[Read Sheet Data] → [Process/Clean Data] → [Create Chart] → [Position Charts] → [Share Dashboard]
```

**Reporting Automation:**

```
[Get Latest Data] → [Calculate Metrics] → [Create Multiple Charts] → [Generate Report]
```

**Trend Analysis:**

```
[Historical Data] → [Time Series Processing] → [Create Line Charts] → [Add Trend Lines]
```

**Comparative Analysis:**

```
[Multi-Source Data] → [Normalize Data] → [Create Column Charts] → [Add Comparisons]
```

***

## Chart Type Guide

### Column Charts (COLUMN)

**Best for:** Comparing categories, showing discrete data points

```
Use Case: Monthly sales by product
Data Structure: Categories in column A, values in column B
Example Range: A1:B12 (months and sales figures)
```

### Line Charts (LINE)

**Best for:** Showing trends over time, continuous data

```
Use Case: Website traffic over time
Data Structure: Time periods in column A, metrics in column B
Example Range: A1:B365 (daily traffic data)
```

### Area Charts (AREA)

**Best for:** Showing volume and cumulative trends

```
Use Case: Revenue growth by quarter
Data Structure: Time periods in column A, cumulative values in column B
Example Range: A1:B16 (quarterly cumulative revenue)
```

### Bar Charts (BAR)

**Best for:** Rankings, horizontal comparisons

```
Use Case: Top 10 products by sales
Data Structure: Items in column A, values in column B
Example Range: A1:B10 (product names and sales)
```

### Pie Charts (PIE)

**Best for:** Showing parts of a whole, percentages

```
Use Case: Market share by competitor
Data Structure: Categories in column A, percentages in column B
Example Range: A1:B6 (companies and market share)
```

***

## Data Preparation Tips

**Structure Your Data:**

```
Row 1: Headers (Category, Value)
Row 2+: Data points
Clean Data: No empty cells in range
Consistent Types: Numbers as numbers, not text
```

**Example Data Layout:**

```
     A          B
1   Month     Sales
2   Jan       15000
3   Feb       18000
4   Mar       22000
5   Apr       19000
```

**Range Selection:**

* **Include headers** for automatic labeling
* **Ensure data continuity** (no gaps)
* **Use absolute ranges** for consistent results
* **Consider data growth** when selecting ranges

***

## Use Cases

### Sales Dashboard

**Create monthly performance charts:**

```
- Data: Monthly sales figures
- Chart Type: COLUMN
- Title: "Monthly Sales Performance"
- Alt Text: "monthly_sales_chart"
```

### Trend Analysis

**Track metrics over time:**

```
- Data: Daily/weekly metrics
- Chart Type: LINE
- Title: "Growth Trend Analysis"
- Alt Text: "trend_chart"
```

### Portfolio Breakdown

**Show investment allocation:**

```
- Data: Asset categories and percentages
- Chart Type: PIE
- Title: "Portfolio Allocation"
- Alt Text: "portfolio_pie_chart"
```

### Performance Comparison

**Compare team performance:**

```
- Data: Team names and scores
- Chart Type: BAR
- Title: "Team Performance Rankings"
- Alt Text: "team_comparison"
```

***

## Tips

**Data Quality:**

* **Clean your data** before creating charts
* **Use consistent formatting** for dates and numbers
* **Remove empty rows/columns** from data range
* **Sort data** appropriately for the chart type

**Chart Design:**

* **Choose meaningful titles** that explain the chart
* **Use alt text** for chart identification in workflows
* **Consider your audience** when selecting chart types
* **Keep data ranges focused** for clear visualizations

**Workflow Integration:**

* **Create charts after data processing** for best results
* **Use chart\_id** to reference charts in subsequent operations
* **Position charts strategically** for dashboard layouts
* **Test with sample data** before automating large datasets

**Performance:**

* **Limit data range size** for faster chart creation
* **Consider chart complexity** vs. performance needs
* **Use appropriate chart types** for your data volume
