# Insights Chart Editor

<figure><img src="https://4088726956-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LATDgYqVMe0hChW7efU-3423413209%2Fuploads%2FlYtGNzrwiN0F5MwFeJCL%2Finsights-chart-editor-light.png?alt=media&#x26;token=8ca5d30e-e0bd-4fcd-82ec-b1e95c657d74" alt=""><figcaption><p>Insights Chart Editor</p></figcaption></figure>

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

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

```javascript
const insightsChartEditor = appmixer.ui.InsightsChartEditor(config)

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

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

{% hint style="info" %}
Learn about `widget` `config` [here](https://docs.appmixer.com/6.0/v4.4/appmixer-sdk/ui-and-widgets/..#configuration).
{% endhint %}

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

{% hint style="info" %}
Learn about `widget` instance [here](https://docs.appmixer.com/6.0/v4.4/appmixer-sdk/ui-and-widgets/..#instance).
{% endhint %}

### State

```javascript
insightsChartEditor.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
insightsChartEditor.on(event, handler)
```

#### **`close`**

```javascript
insightsChartEditor.on('close', () => {/* ... */})
```

Close the editor.

## Example

```javascript
const insightsChartEditor = appmixer.ui.InsightsChartEditor({
    el: '#insights-chart-editor'
})

insightsChartEditor.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/v4.4/appmixer-sdk/ui-and-widgets/insights-chart-editor.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.
