# SetActiveChart

Use the SetActiveChart method to set the active chart using the chart ID. Learn its syntax and parameters in documentation.

## Content

Sets the active chart using the chart ID.

## Syntax

[JavaScript]

```javascript
FpSpread1.SetActiveChart("chartid");
```

## Parameters

***chartid***
String, chart ID

## Return Type

None

## Remarks

This method changes the active chart to the one specified. This method does not cause a postback to occur.

## Example

This is a sample that contains the method. On the client side, the script that contains the method would look like this:

```javascript
<script type="text/javascript">
  function moveSelection() {
    FpSpread1.SetActiveChart("chart_1");
  }
</script>
```

## See Also

[GetActiveChart](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members/clientscript-allmeths/CSSR-GetActiveChart)
[Scripting Members](/spreadnet/docs/latest/online-asp/overview/spweb-clientscriptref/clientscript-members)