# Function Setting

## Function Editor

The function editor is an area where you can write, run, add, delete, and name functions. Each function has its own code area and code output, and its code does not affect the other functions.&#x20;

### Code area

<figure><img src="https://209745228-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRB9zlm2euYUzs82cWD4l%2Fuploads%2FhqcyIPa3NpAi5tE9MU1S%2Fimage.png?alt=media&#x26;token=98c7360e-cf40-4e74-933f-43aeef8534b9" alt=""><figcaption></figcaption></figure>

The code area is where you are going to write down your function code. When you type **spacebar**, the auto complete dropdown is given. The Auto complete dropdown suggests functions by using the keyword you write after typing spacebar. Use **up/down arrow** keys to get to the item you want to add and press **enter** to add the function into the code area.

You can run and get the result of the functions as follows:

1. Select a function tab you want to code.
2. After code is completely written, click **Run** button.
3. At the **Code Output** area below the code editor, you'll find out the result.
4. You can visualize the result in chart at **Visualization Setting** tab.

### Code Output

<figure><img src="https://209745228-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRB9zlm2euYUzs82cWD4l%2Fuploads%2FdkskQy4koR0EB97TZPFv%2Fimage.png?alt=media&#x26;token=0d1601ed-e842-403d-b641-42fd047efbc2" alt=""><figcaption></figcaption></figure>

When you click a **run** button after filling out the functions, you can get the result of every function you made. And the table filled with the result can be seen at the code output.&#x20;

If the result is not shown or the error comes out, then it means that your function may has an error somewhere. Fix your function code and run again to get the right result.

***

## Add Function

<figure><img src="https://209745228-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRB9zlm2euYUzs82cWD4l%2Fuploads%2FPX5uITg6ZtvrGAQxVuY7%2Fimage.png?alt=media&#x26;token=2791a765-94b2-4a56-8c73-712e0e540268" alt=""><figcaption></figcaption></figure>

You can add the Function as follows:

1. Click the ADD button at the right side.
2. You can add up to 5.

***

## Delete Function

<figure><img src="https://209745228-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRB9zlm2euYUzs82cWD4l%2Fuploads%2FSSZ05Xd8AYWB3ysrOGZ9%2Fimage.png?alt=media&#x26;token=3b1462f0-9e32-47cf-907f-b5e4cc7f976e" alt=""><figcaption></figcaption></figure>

<img src="https://209745228-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRB9zlm2euYUzs82cWD4l%2Fuploads%2FLS94kOlg1E8Vk0xJ2sI8%2Fimage.png?alt=media&#x26;token=bb2a1ebd-b440-4919-bb27-841a5db4d494" alt="" data-size="original">

You can delete the Function as follows:

1. Select the Function on the code editor you want to delete.
2. Click the **DELETE** button at the right side.
3. The message will pop up to ask you confirm deletion. Click **DELETE**

***

## Name Function

<figure><img src="https://209745228-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRB9zlm2euYUzs82cWD4l%2Fuploads%2FbNka99WzB22549xqFCR1%2Fimage.png?alt=media&#x26;token=3aeb209e-e2f1-46f3-9338-ef910f349d29" alt=""><figcaption></figcaption></figure>

You can name the function. It'll be displayed when the function is visualized as chart.

1. Select the Function on the code editor you want to rename.
2. Press the input right below the function tab
3. Name changes will be automatically saved and applied to chart.
