> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/governed-dashboards-6/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bdb.ai/governed-dashboards-6/charts-gallery/advanced-charts/decision-tree.md).

# Decision Tree

{% hint style="success" %}
*Check out the walk-through to use the Decision Tree chart component in the Designer module.*
{% endhint %}

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2Fe36wf4CRDmDiGFqQtLTJ%2FDecision%20Tree%20.gif?alt=media&#x26;token=a1ce0069-5fdf-4c98-bd4a-5048f2b5ff62" alt=""><figcaption></figcaption></figure>

A Decision Tree chart that helps determine a course of action or show a statistical probability. The chart is called a decision tree due to its resemblance to the namesake plant, usually outlined as an upright or a horizontal diagram that branches out.&#x20;

The Decision Tree chart is made up of various nodes. It contains three types of nodes: Decision nodes, chance nodes, and outcome nodes. Starting from the Decision node, each ***branch*** of the Decision Tree represents a possible decision, outcome, or reaction. The furthest branches on the tree represent the results of a certain decision pathway and are called the "leaves".

## **The Best Situation to Use a Decision Tree Chart**

* To classify the data based on a condition
* To display continuous nodes as endpoints in a Regression Tree

Some examples where Decision Tree may be used:

* To predict the Customer's action/reaction
* To forecast Stock market movements

## **Default Chart Image**

<figure><img src="https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2FZhPaFrwkI1mGlmdebcc8%2Fdtree_default.png?alt=media&#x26;token=c25f00f7-b97c-4862-af07-87833d323ac1" alt=""><figcaption></figcaption></figure>

## **Properties of the Decision Tree Chart**

### **General**

* **Component Name**: The unique identifier for the Decision Tree chart.
* **Left**: The position of the chart from the left edge of the containing element.
* **Top**: The position of the chart from the top edge of the containing element.
* **Height**: The vertical dimension of the chart.
* **Width**: The horizontal dimension of the chart.
* **Initial Visibility**: Whether the chart is visible when initially rendered.
* **Max Button**: Indicates if a button is available to maximize the chart.

&#x20;      ![](https://2748020991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3b0OCsxHg64sEwjM1HIh%2Fuploads%2FxKWKTaFsFSXLB4TXvhug%2Fimage.png?alt=media\&token=dc935fe6-49b9-41bb-9e89-5d9480b9704e)

### Tooltip

* **Show Tool Tip**: Enable or disable the display of tooltips on the chart.&#x20;

  * Click the ***Show Tool Tip*** icon to access the ***Tool Tip Configuration*** window.
  * Select the ***Default*** option.
  * Click the ***Save*** option to display Tool Tip in the default display.

  &#x20;       ![](https://2748020991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3b0OCsxHg64sEwjM1HIh%2Fuploads%2FPxORKCTBowtys9WRo2nC%2Fimage.png?alt=media\&token=72bb8dfd-f71c-41ac-9e4e-7f4c28a79b38)

* **Background Color**: Choose the background color of the tooltip.

* **Opacity**: The transparency level of the tooltip's background.

* **Border Color**: Choose the color of the border around the tooltip.

* **Tooltip Font Size**: Set the font size of the displayed text within the tooltip.

* **Box Width**: Select an option from the drop-down to display the width of the tooltip box.![](https://2748020991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3b0OCsxHg64sEwjM1HIh%2Fuploads%2FEWoL7RPUdETLNwEo97pA%2Fimage.png?alt=media\&token=b85a44c0-10a7-474c-8319-88b132c019e5)

### Background

* **Gradient Rotation**: The angle at which the gradient background is applied to the chart.
* **Opacity**: The transparency level of the chart's background.
* **Gradient**: The type and direction of the gradient fill used in the background.&#x20;

  * Click the ***Gradient*** icon to access the ***Background gradient colors*** window for selecting background gradient colors.

  &#x20;      ![](https://2748020991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3b0OCsxHg64sEwjM1HIh%2Fuploads%2FMUfJR34vbDxibLST4JBq%2Fimage.png?alt=media\&token=5925c15d-f6f6-4c02-ab7c-a48ad9e340f7)

  * Click the ***Add Color*** option to insert more colors.
  * Click the ***Save*** option to save the selected background colors.

  &#x20;      ![](https://2748020991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3b0OCsxHg64sEwjM1HIh%2Fuploads%2FCyOfRGswpKmgITpn8LP8%2Fimage.png?alt=media\&token=accbfb0a-e827-4f8e-a726-64bdba9bddbc)

  &#x20;     &#x20;
* **Border**: The style or type of border surrounding the chart.
* **Border Color**: The color of the border surrounding the chart.
* **Border Radius**: The curvature of the chart's corners.
* **Shadow**: Enable the shadow effect on the chart by marking the given checkbox.
* **Shadow Color**: The color of the shadow effect.
* **Shadow Transparency**: Set the transparency level of the shadow effect. ![](https://2748020991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3b0OCsxHg64sEwjM1HIh%2Fuploads%2FFlTxLm9JG6MO8Bcv5KpQ%2Fimage.png?alt=media\&token=6b8186f2-a965-4a61-b9c7-42c6716e41f5)

### Export Options

* **Enable Context Menu**: Activate a right-click context menu for quick access to export options in the preview mode of the chart.
* **Export Excel**: Save the chart data in an Excel file format (.xlsx).
* **Export CSV**: Export the chart data to a CSV file format (.csv).
* **Export JPEG**: Export the chart as a JPEG image (.jpg).
* **Export PNG**: Export the chart as a PNG image (.png).
* **Export PPT**: Export the chart to a PowerPoint presentation (.pptx).
* **Export PDF**: Export the chart as a PDF document (.pdf).
* **Show Print**: Include an option to print the chart directly.
* **Export Heading**: Add a custom heading to the exported file.
* **Export Sub Heading**: Add a custom subheading to the exported file.
* **Export File Name**: Specify the file name for the exported file/dashboard.
* **Global Export Type**: Define the default export format using the drop-down (e.g., Screenshot, Tabular).

&#x20;      ![](https://2748020991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3b0OCsxHg64sEwjM1HIh%2Fuploads%2FvWQXUXqMEgQxTD3Wu87z%2Fimage.png?alt=media\&token=9bd0540b-567d-4b1d-ab61-3d363aba06c8)

* *The user can get the **Export Context Menu** from the preview mode to download the reports in different export formats.*        &#x20;

<figure><img src="https://2748020991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3b0OCsxHg64sEwjM1HIh%2Fuploads%2FeMPpyg66TzV643i619CN%2Fimage.png?alt=media&amp;token=affbebe6-939d-46b3-bef3-85add3d48529" alt=""><figcaption></figcaption></figure>

### Styling Properties

Use the **Styling Properties** to customize the look and feel of the Decision Tree chart. Here are some key properties you can adjust:

* **Node Color**: Change the color of the notes in the chart.
* **Node Transparency**: Adjust the transparency level of the nodes.
* **Node Border Color**: Set the color of the borders around each node.
* **Node Opacity**: Control the opacity of the nodes.
* **Percent Box Color**: Define the color for the percentage boxes.
* **Percent Box Opacity**: Adjust the opacity of the percentage boxes.
* **Percent Border Opacity**: Set the opacity for the borders of the percentage boxes.
* **Line Color**: Change the color of the lines connecting nodes.
* **Line Opacity**: Adjust the opacity of the connecting lines.
* **Font Color**: Customize the color of the text.
* **Font Family**: Set the font style for the chart text.

&#x20;     ![](https://2748020991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3b0OCsxHg64sEwjM1HIh%2Fuploads%2F5OvZzeHypFEjLlu9nBMn%2Fimage.png?alt=media\&token=8113e9c8-a30e-45af-8f87-0238e0af32b1)

## **Property Tab for Dataset Properties Pallet**

![](https://859511478-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGDmsjfjJBNqow7Fo97cO%2Fuploads%2FUokhUQUekbDafi2HsdO2%2Fdtree_dataset.png?alt=media\&token=9db31453-d150-4e01-8c23-988e897b5cfb)

## **Decision Tree chart by changing the Properties**

<figure><img src="https://2748020991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3b0OCsxHg64sEwjM1HIh%2Fuploads%2FzZnMqCYqg9nrdLYiqsba%2Fimage.png?alt=media&amp;token=2502dcd3-497a-4b59-8f7b-b8746e303b24" alt=""><figcaption></figcaption></figure>

## Sample Data

Download the given sample data and map it as mentioned below to plot your ***Decision*** chart:

The Data has been selected for specific fields based on their names&#x20;

{% file src="/files/fKrwbPmdXIiPga7JFnbL" %}
