# 2.1	Return value from UDI.onInit()

The return value from UDI.onInit() should be an object, as in the example above, with the following members:

| Member            | Description                                                                                                                                                                            |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| caption           | The name to display for your UDI                                                                                                                                                       |
| isOverlay         | True/false depending on whether your UDI should be shown in the main chart panel (true) or in its own sub-panel (false)                                                                |
| plots\[]          | Array describing the types of values which your UDI draws: lines, histograms, bars etc. The array can be empty if your UDI only creates drawings, or event markers, or bar highlights. |
| settingsFields\[] | Array of user-configurable parameters which your UDI wants. This array can be empty if your indicator does not need any configurable settings.                                         |
| noAlerts          | Can be used to turn off the ability for the user to set alerts on any of the UDI's plots. You can also disable this for each individual plot, using its own noAlerts property.         |
| noIOI             | Can be used to prevent your UDI participating in the ability to apply one indicator to another indicator.                                                                              |
| axis              | Overrides the default settings for the value axis, by including any or all of the following properties. Only applicable if the indicator is in its own sub-panel (isOverlay:false).    |
| axis.min          | Minimum value for the axis                                                                                                                                                             |
| axis.max          | Maximum value for the axis                                                                                                                                                             |
| axis.step         | Increment between markers on the axis                                                                                                                                                  |
| axis.noYGrid      | Turns off horizontal grid lines in the sub-panel                                                                                                                                       |
| axis.baseline     | Baseline value (which turns a line plot into a filled area either side of the baseline)                                                                                                |


---

# 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://sway-technologies.gitbook.io/sway-charts-pro-scripts-documentation/sway-charts-pro-user-defined-indicators/initialisation-udi.oninit/2.1-return-value-from-udi.oninit.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.
