> For the complete documentation index, see [llms.txt](https://docs.datasuite.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasuite.vn/english/features/chart/edit-chart/conditional-formatting.md).

# Conditional Formatting

**Conditional Formatting** allows users to apply visual styles (like colors, icons, and fonts) to data elements based on their values. Its purpose is to help users quickly identify trends, highlights, warnings, or anomalies in Reports.

This feature is currently supported on the following components:

* **Data Table**: Format cell background, text color, or icons based on each cell’s value.
* **Scorecard**: Highlight KPI values with color or an icon depending on a set threshold.
* **Bar Chart / Column Chart**: Change bar color based on value (e.g., >100 is red, <50 is green).
* **Bar/Column with Line Combination Chart**: Allows separate formatting rules for each part (bar or line), supporting clearer hierarchical data representation.

#### How to Set Up Conditional Formatting

{% stepper %}
{% step %}

#### Open Chart or Table Settings

Click the chart or data table where you want to apply Conditional Formatting.
{% endstep %}

{% step %}

#### Go to the “Style” Tab

In the right-hand sidebar, open the **Visualizations** panel, then select the **Style** tab.
{% endstep %}

{% step %}

#### Add Conditional Formatting Rule

In the **Conditional Formatting** section, click the **Add** button to create a new rule.

<figure><img src="/files/yXpO8vfLBHUkZvXlO7kb" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Define the Condition(s)

Click **Add Rule** to set conditions.

* Conditions are combined using the **AND** operator (i.e., all conditions must be met for formatting to apply).
* Use the **Copy** icon to duplicate a rule and the **Delete** icon to remove it.

<figure><img src="/files/L5b6c4UIp019EjzwYAvY" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Select the Target Scope

Depending on the visualization type, choose the scope where the rule applies (e.g., specific column, dimension, or legend).
{% endstep %}

{% step %}

#### Choose the Format Style when Condition is Satisfied

Pick the desired format style (e.g., background color, text color) to apply when the condition is true. You can use predefined presets or customize your own.

<figure><img src="/files/XvBdM34GufCym0u8KizN" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/MUfW09OtwpscrLFhfqJq" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Save Changes

Click **Save** to confirm the rule.\
Then **Save** the report to apply the formatting settings permanently.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}

#### **Notes:**

* You can apply **multiple rules**; the system will prioritize them **top-down**.
* Formatting capabilities may vary depending on the chart type.
* Avoid using too many formatting colors to maintain clarity and prevent visual overload.
  {% 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datasuite.vn/english/features/chart/edit-chart/conditional-formatting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
