> For the complete documentation index, see [llms.txt](https://docs-v3.toucantoco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-v3.toucantoco.com/visualizations-and-layouts/creating-visualizations/customize-charts/customize-charts-with-js.md). Agents can also search and read this documentation through its [MCP server](https://docs-v3.toucantoco.com/~gitbook/mcp).

# Customize Charts with JSON

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-0fa76f980b77e779cf2db2624a903080c0e538c2%2FJSON_Customization_Overview.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

### 🧭 Overview <a href="#overview" id="overview"></a>

JSON Prefilled Code Mode allows you to personalize your charts by directly editing pre-filled JSON templates.\
Instead of writing CSS or code from scratch, you simply adjust structured JSON values such as colors, fonts, sizes, borders, and spacing.

* **App-level JSON**: applies global styling across all chart types.
* **Chart-level JSON**: applies specific styling to a single chart (only the relevant section of code is included).

This feature makes customization accessible for everyone - from builders to non-technical users -while maintaining brand consistency and readability across dashboards.

The feature is available for the following chart designs:

* New Heatmap
* New Barchart
* New Linechart
* New Bubblechart
* New Leaderboard
* New Barlinechart
* New Circularchart
* New Stackedbarchart

***

### How It Works <a href="#how-it-works" id="how-it-works"></a>

* Open the **Customization panel** at the app level to apply bulk styling.
* Open a specific chart’s **Chart configuration → Style tab** to edit chart-level JSON.
* Modify the JSON properties. Changes are instantly reflected in your charts.
* Built-in **error detection** will alert you if something is misconfigured.

#### ✨ App-Level Customization (Global Styling)

**Use case:** Apply a unified look across all charts in your app for brand consistency.

**Steps:**

1. Go to your app’s **Customization** panel.
2. Find the **JSON styling section**.
3. Edit the JSON (fonts, colors, borders, etc.).
4. Save and apply — changes will reflect on all supported charts.

{% @arcade/embed url="<https://app.arcade.software/share/AeTpxd84xO2tvG4Mm0MC>" flowId="AeTpxd84xO2tvG4Mm0MC" %}

#### 🧩 Chart-Level Customization (Individual Styling)

**Use case:** Adjust the appearance of one specific chart.

**Steps:**

1. Open your **chart configuration**.
2. Got to **style** tab.
3. Enter or adjust the pre-filled JSON.
4. Save to apply changes to that chart only.

{% @arcade/embed url="<https://app.arcade.software/share/AhRccIxR2dke1qj6nJHq>" flowId="AhRccIxR2dke1qj6nJHq" %}

***

### JSON Structure by Chart Type <a href="#json-structure-by-chart-type" id="json-structure-by-chart-type"></a>

### Barchart <a href="#barchart" id="barchart"></a>

<details>

<summary>JSON Default: Barchart</summary>

```
{
  "barchart": {
    "axisLabel": {
      "fontSize": 12,
      "fontWeight": 500,
      "color": "#172134"
    },
    "bars": {
      "minWidth": 16,
      "minWidthCompact": 8,
      "maxWidth": 110,
      "maxWidthCompact": 55,
      "borderRadius": 5,
      "gap": 16,
      "gapCompact": 8,
      "crossfilterShadowBlur": 10,
      "lighterColorPercent": 0.45
    },
    "dataLabel": {
      "borderRadius": 4,
      "minWidth": 304,
      "minWidthCompact": 200
    },
    "dataZoom": {
      "backgroundColor": "#F0F1F4",
      "color": "#88B2A8"
    },
    "legends": {
      "fontSize": 14,
      "fontWeight": 500
    },
    "value": {
      "color": "#172134",
      "fontSize": 12,
      "fontSizeCompact": 12,
      "fontWeight": 600,
      "fontWeightCompact": 600
    }
```

</details>

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-04f354cf8c973ec3b43394a8b2aa73affc445638%2FJSON_Customization_Barchart.jpg?alt=media" alt=""><figcaption></figcaption></figure>

1: Axis-Label

2: Bars

3: Datalabel

4: Datazoom

5: Legends

6: Value

***

### Linechart <a href="#linechart" id="linechart"></a>

<details>

<summary>JSON Default: Linechart</summary>

```
{
  "linechart": {
    "axisLabel": {
      "fontSize": 12,
      "fontWeight": 500,
      "color": "#172134"
    },
    "dataLabel": {
      "borderRadius": 4,
      "minWidth": 304,
      "minWidthCompact": 200
    },
    "legends": {
      "fontSize": 14,
      "fontWeight": 500
    },
    "lines": {
      "width": 3,
      "smooth": true
    },
    "value": {
      "color": "#172134",
      "fontSize": 12,
      "fontSizeCompact": 12,
      "fontWeight": 600,
      "fontWeightCompact": 600
    }
```

</details>

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-85cc7a44604f7b050e6bdeef563643d0000d88d8%2FJSON_Customization_Linechart.jpg?alt=media" alt=""><figcaption></figcaption></figure>

1: Axis-label

2: Datalabel

3: Legends

4: Lines

5: Value

***

### Stackedbarchart <a href="#stackedbarchart" id="stackedbarchart"></a>

<details>

<summary>JSON Default: Stackedbarchart</summary>

```
{
  "stacked-barchart": {
    "axisLabel": {
      "fontSize": 12,
      "fontWeight": 500,
      "color": "#172134"
    },
    "bars": {
      "minWidth": 16,
      "minWidthCompact": 8,
      "maxWidth": 110,
      "maxWidthCompact": 55,
      "borderRadius": 5,
      "gap": 16,
      "gapCompact": 8,
      "crossfilterShadowBlur": 10,
      "lighterColorPercent": 0.45
    },
    "dataLabel": {
      "borderRadius": 4,
      "minWidth": 304,
      "minWidthCompact": 200
    },
    "dataZoom": {
      "backgroundColor": "#F0F1F4",
      "color": "#88B2A8"
    },
    "legends": {
      "fontSize": 14,
      "fontWeight": 500
    },
    "value": {
      "color": "#172134",
      "fontSize": 12,
      "fontSizeCompact": 12,
      "fontWeight": 600,
      "fontWeightCompact": 600
    }
```

</details>

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-11e4429e4c0721e337416764ec2fb7f5400a421e%2FJSON_Customization_Stackedbarchart.jpg?alt=media" alt=""><figcaption></figcaption></figure>

1: Axis-label

2: Bars

3: Datalabel

4: Datazoom

5: Legends

6: Value

***

### Barlinechart <a href="#stackedbarchart" id="stackedbarchart"></a>

<details>

<summary>JSON Default: Barlinechart</summary>

{\
"barlinechart": {\
"axisLabel": {\
"fontSize": 12,\
"fontWeight": 500,\
"color": "#172134"\
},\
"bars": {\
"minWidth": 16,\
"minWidthCompact": 8,\
"maxWidth": 110,\
"maxWidthCompact": 55,\
"borderRadius": 5,\
"gap": 16,\
"gapCompact": 8,\
"crossfilterShadowBlur": 10,\
"lighterColorPercent": 0.45\
},\
"dataLabel": {\
"borderRadius": 4,\
"minWidth": 304,\
"minWidthCompact": 200\
},\
"dataZoom": {\
"backgroundColor": "#F0F1F4",\
"color": "#88B2A8"\
},\
"legends": {\
"fontSize": 14,\
"fontWeight": 500\
},\
"lines": {\
"width": 3,\
"smooth": true\
},\
"value": {\
"color": "#172134",\
"fontSize": 12,\
"fontSizeCompact": 12,\
"fontWeight": 600,\
"fontWeightCompact": 600\
}

</details>

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-67fc92cc073e0851e480e2958b005ee791fd9b05%2FJSON_Customization_Barlinechart.jpg?alt=media" alt=""><figcaption></figcaption></figure>

1: Axis-label

2: Bars

3: Datalabel

4: Datazoom

5: Legends

6: Lines

7: Value

***

### Circularchart <a href="#stackedbarchart" id="stackedbarchart"></a>

<details>

<summary>JSON Default: Circularchart</summary>

{\
"circularchart": {\
"arcs": {\
"borderRadius": 4,\
"borderRadiusCompact": 2,\
"legendLineWidth": 36,\
"lighterColorPercent": 0.45\
},\
"categoryLabel": {\
"color": "#172134",\
"fontSize": 16,\
"fontSizeCompact": 14,\
"fontWeight": 600,\
"fontWeightCompact": 400\
},\
"dataLabel": {\
"borderRadius": 4,\
"minWidth": 304,\
"minWidthCompact": 200\
},\
"legends": {\
"fontSize": 14,\
"fontWeight": 500\
},\
"value": {\
"color": "#172134",\
"fontSize": 12,\
"fontSizeCompact": 12,\
"fontWeight": 600,\
"fontWeightCompact": 600\
}

</details>

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-2af34fd25dac204c1f3a64931d63cd1b85dfb7b8%2FJSON_Customization_Circularchart.jpg?alt=media" alt=""><figcaption></figcaption></figure>

1: Arcs

2: Categorylabel

3: Datalabel

4: Legends

5: Value

***

### Heatmap <a href="#stackedbarchart" id="stackedbarchart"></a>

<details>

<summary>JSON Default: Heatmap</summary>

{\
"heatmap": {\
"rects": {\
"borderRadius": 8,\
"strokeLineWidth": 3,\
"strokeColor": "#525E75",\
"valueFontSize": 16,\
"valueFontWeight": 600,\
"subValueFontSize": 12,\
"subValueFontWeight": 600\
},\
"axisLabel": {\
"fontSize": 12,\
"fontWeight": 500,\
"color": "#172134"\
},\
"dataLabel": {\
"borderRadius": 4,\
"minWidth": 304,\
"minWidthCompact": 200\
},\
"dataZoom": {\
"backgroundColor": "#F0F1F4",\
"color": "#88B2A8"\
}

</details>

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-85dbf216d220d03937f597685ed2e4cb9a49c382%2FJSON_Customization_Heatmap.jpg?alt=media" alt=""><figcaption></figcaption></figure>

1: Rects

2: Axislabel

3: Datalabel

4: Datazoom

***

### Bubblechart <a href="#stackedbarchart" id="stackedbarchart"></a>

<details>

<summary>JSON Default: Bubblechart</summary>

{\
"bubblechart": {\
"axisLabel": {\
"fontSize": 12,\
"fontWeight": 500,\
"color": "#172134"\
},\
"dataLabel": {\
"borderRadius": 4,\
"minWidth": 304,\
"minWidthCompact": 200\
},\
"value": {\
"color": "#172134",\
"fontSize": 12,\
"fontSizeCompact": 12,\
"fontWeight": 600,\
"fontWeightCompact": 600\
}

</details>

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-89b26b296ab66b2b6041b52409d36d4b721bde70%2FJSON_Customization_Bubblechart.jpg?alt=media" alt=""><figcaption></figcaption></figure>

1: Axis-label

2: Datalabel

3: Value

***

### Leaderboard <a href="#stackedbarchart" id="stackedbarchart"></a>

<details>

<summary>JSON Default: Leaderboard</summary>

{\
"leaderboard": {\
"categoryLabel": {\
"fontSize": 16,\
"fontSizeCompact": 14,\
"fontWeight": 600,\
"fontWeightCompact": 400\
},\
"legends": {\
"fontSize": 14,\
"fontWeight": 500\
},\
"value": {\
"color": "#172134",\
"fontSize": 12,\
"fontSizeCompact": 12,\
"fontWeight": 600,\
"fontWeightCompact": 600\
}

</details>

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-48bb0c30223cfadd9ccb797895af186ff17bb569%2FJSON_Customization_Leaderboard.jpg?alt=media" alt=""><figcaption></figcaption></figure>

1: Categorylabel

2: Legends

3: Value


---

# 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-v3.toucantoco.com/visualizations-and-layouts/creating-visualizations/customize-charts/customize-charts-with-js.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.
