# Insights Dashboard

<figure><img src="/files/hsXlaWok8z3mnmWurbEA" alt=""><figcaption><p>Insights Dashboard</p></figcaption></figure>

## Configuration <a href="#configuration" id="configuration"></a>

Set up a new instance with `config` parameters and `set`/`get` methods:

```javascript
const insightsDashboard = appmixer.ui.InsightsDashboard(config)

insightsDashboard.set(key, value)
insightsDashboard.get(key)
```

#### **`config.el`** **`...`**

{% hint style="info" %}
Learn about `widget` `config` [here](/6.0/5.0/appmixer-sdk/ui-and-widgets.md#configuration).
{% endhint %}

## Instance <a href="#state" id="state"></a>

{% hint style="info" %}
Learn about `widget` instance [here](/6.0/5.0/appmixer-sdk/ui-and-widgets.md#instance).
{% endhint %}

### State

```javascript
insightsDashboard.state(name, value)
```

#### **`loader`**

Type: `Boolean` | Default: `null`

Toggle a custom loading state.

#### **`error`**

Type: `String` | Default: `null`

Toggle a custom error message.

### Events <a href="#events" id="events"></a>

```javascript
insightsDashboard.on(event, handler)
```

#### **`chart:clone`**

```javascript
insightsDashboard.on('chart:clone', chartId => {/* ... */})
```

Clone chart.

#### **`chart:remove`**

```javascript
insightsDashboard.on('chart:remove', chartId => {/* ... */})
```

Remove chart.

#### **`chart:open`**

```javascript
insightsDashboard.on('chart:open', chartId => {/* ... */})
```

Open chart in **Chart Editor**.

## Example

```javascript
const insightsDashboard = appmixer.ui.InsightsDashboard({
    el: '#insights-dashboard'
})

insightsDashboard.open()
```


---

# Agent Instructions: 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.appmixer.com/6.0/5.0/appmixer-sdk/ui-and-widgets/insights-dashboard.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.
