# Radar Chart Widget

**General Setting**

User can change following things in Radar Chart widget:

* Name for widget which will be used data reference. For Example, if widget name is 'Radar Chart', then data of widget is referenced as Radar Chart.data
* Show title - User can show/hide widget title
* Title Color
* Background Color

![Configure Radar Chart Widget](https://365492316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7aTljSjWsfbXZ_OP_9%2Fuploads%2FUD9VYv4sRps345JIXq3A%2FradarChart_general.png?alt=media\&token=3457af9c-bf4e-4232-b33f-20a769130725)

**Widget Setting**

In Widget Setting option, user can change following parameters:

* Index By - key parameter of JSON Object which will used as Index for Radar Chart.
* Keys - key parameter of JSON Object which will define parameters for Radar Chart. Here, user can provide label and color for each key.
* Show Legend - Enable to show legends

![Configure Radar Chart Widget](https://365492316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7aTljSjWsfbXZ_OP_9%2Fuploads%2FtSAHTzsc29B1vhypnlKx%2FradarChart_widget.png?alt=media\&token=0eba7cfd-28fb-4e0f-ba9b-f1804801fe97)

#### Source <a href="#source" id="source"></a>

User can select a source mode as MQTT or Action.

**Using MQTT**

Here, to update data on Radar Chart user can publish JSON array on given **data** MQTT topic. No need to provide \<account\_id> while providing the MQTT topic. The JSON array will be as below.

```
// Example

[
  {
    "taste": "fruity",
    "a": 94,
    "b": 114,
    "c": 31
  },
  {
    "taste": "bitter",
    "a": 22,
    "b": 65,
    "c": 88
  },
  {
    "taste": "heavy",
    "a": 108,
    "b": 47,
    "c": 119
  },
  {
    "taste": "strong",
    "a": 30,
    "b": 84,
    "c": 94
  },
  {
    "taste": "sunny",
    "a": 74,
    "b": 114,
    "c": 60
  }
]

// here, 'taste' is set as Index By value and 'a','b' and 'c' are set as keys with 
respective labels and colors.
```

![Configure Radar Chart Widget](https://365492316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7aTljSjWsfbXZ_OP_9%2Fuploads%2F9TpDfezRT8wpmEhBa2Du%2FlineChartSourceMQTT.png?alt=media\&token=b0bfa019-9a71-4c4d-9679-532b175a6288)

**Using Action**

Here, to update the Radar Chart widget, output of the action should contain JSON array as given in above example. User can also update the widget either onLoad or periodically by providing refresh interval.

![Configure Radar Chart Widget](https://365492316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7aTljSjWsfbXZ_OP_9%2Fuploads%2FPvNnAJI3Vj3sQzgxw2nh%2FlineChartSourceAction.png?alt=media\&token=5350c595-ade8-4fa5-aacc-3b98614a3e5b)

#### Event Handling

Radar Chart widget does not support any event.

#### Example

Here, data in below format published on configured topic, will appear as shown in image.

```
// Example

[
  {
    "taste": "fruity",
    "a": 94,
    "b": 114,
    "c": 31
  },
  {
    "taste": "bitter",
    "a": 22,
    "b": 65,
    "c": 88
  },
  {
    "taste": "heavy",
    "a": 108,
    "b": 47,
    "c": 119
  },
  {
    "taste": "strong",
    "a": 30,
    "b": 84,
    "c": 94
  },
  {
    "taste": "sunny",
    "a": 74,
    "b": 114,
    "c": 60
  }
]

// here, 'taste' is set as 'Index By' value and 'a','b' and 'c' are set as keys with respective labels and colors.
```

![MQTT Data for Radar Chart](https://365492316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7aTljSjWsfbXZ_OP_9%2Fuploads%2F8xJIB24ptRq3tk3DBDSs%2FradarChart_MQTT_Example.png?alt=media\&token=8c87495a-8975-4fe8-aa7e-b777da970acc)

![Radar Chart Example](https://365492316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7aTljSjWsfbXZ_OP_9%2Fuploads%2FbrWtw1bWFUfrjlndrIyz%2FradarChart_example.png?alt=media\&token=2d106741-14fd-4f3e-9647-8c7b0b23592c)
