# JSSlope

> Returns the Module.getSlope API.

```javascript
var Slope = Module.getSlope();
```

### clearAnalysisData()

> Resets the analysis data.

{% tabs %}
{% tab title="Information" %}

{% endtab %}

{% tab title="Template" %}

```javascript
Module.getSlope().clearAnalysisData();
```

{% endtab %}
{% endtabs %}

### clearColorList() → boolean

> Resets the registered legend color list.

{% tabs %}
{% tab title="Information" %}

* Return
  * true : Reset successful.
  * false : Reset failed.
    {% endtab %}

{% tab title="Template" %}

```javascript
Module.getSlope().clearColorList();
```

{% endtab %}
{% endtabs %}

### getColorArea(key, index) → number

> Returns the area value for each legend index.

{% tabs %}
{% tab title="Information" %}

| Name  | Type   | Description                                      |
| ----- | ------ | ------------------------------------------------ |
| key   | string | Name of the object to analyze.                   |
| index | number | Legend index for which to return the area value. |

* Return
  * number(0 \~) : Success in returning the area corresponding to the legend (in square meters).
  * -1 : If the index is not valid or the object corresponding to the key cannot be found.
    {% endtab %}

{% tab title="Template" %}

```javascript
```

{% endtab %}
{% endtabs %}
