# Event APIs

The event system definition for `cv.api` class (`cv.api.event`). Contains all necessary calls for creating and registering events.

## Constructor

| Name          | Description |
| ------------- | ----------- |
| `new event()` |             |

## Methods

| Name                                                 | Description                                                                                                                                                                                                                                                     |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `disableDragAndDrop(disableDragAndDrop)`             | Sets flag to indicate drag and drop should be disabled.                                                                                                                                                                                                         |
| `disableTableContextMenu(disableTableContextMenu)`   | Disables or enables the table context menu event.                                                                                                                                                                                                               |
| `disableTableDoubleClick(disableTableDoubleClick)`   | Disables or enables the table double click event.                                                                                                                                                                                                               |
| `isEventDisabled(event) : boolean`                   | Returns whether an event should be stopped.                                                                                                                                                                                                                     |
| `registerActionEventListener(listener) : Event`      | Registers a listener that runs after report actions and before refresh report.                                                                                                                                                                                  |
| `registerBuildMenuListener(listener) : Event`        | Registers a listener which runs before showing any of the menus in Analyzer.                                                                                                                                                                                    |
| `registerChartDoubleClickListener(listener) : Event` | Registers a listener which runs when double-clicking on a chart item in Analyzer.                                                                                                                                                                               |
| `registerChartSelectItemsListener(listener) : Event` | Registers a listener which runs when a user selects a chart data point or lassos a collection of data points. The listener can also run when the user clears chart items by clicking on the selected chart item or by clicking the **Clear Selections** button. |
| `registerDragEventListener(listener) : Event`        | Registers a listener which runs when a user starts dragging an object in the report area, layout panel, or available fields.                                                                                                                                    |
| `registerDropEventListener(listener) : Event`        | Registers a listener which runs after a drop has occurred in the report area, filter area, trash can, or layout panel.                                                                                                                                          |
| `registerInitListener(listener) : Event`             | Registers a listener that runs during the initialization of Analyzer.                                                                                                                                                                                           |
| `registerPostExecutionListener(listener) : Event`    | Registers a listener which is called after the report has completely finished executing in Mondrian and the server has returned with either an HTML or JSON result, depending on the visualization type.                                                        |
| `registerPreExecutionListener(listener) : Event`     | Registers a listener which is called just before the browser sends the report XML to the server for processing.                                                                                                                                                 |
| `registerRenderListener(listener) : Event`           | Registers a listener that runs after the UI has drawn the visualization.                                                                                                                                                                                        |
| `registerTableClickListener(listener) : Event`       | Registers a listener that runs at clicking on table cell of Analyzer.                                                                                                                                                                                           |
| `registerTableContextMenuListener(listener) : Event` | Registers a listener that runs at opened context menu of table cell of Analyzer.                                                                                                                                                                                |
| `registerTableDoubleClickListener(listener) : Event` | Registers a listener which runs when double-clicking on a table cell in Analyzer.                                                                                                                                                                               |
| `registerTableMouseMoveListener(listener) : Event`   | Registers a listener which runs when a user moves the mouse cursor across any table cell in Analyzer.                                                                                                                                                           |
| `registerTableMouseOverListener(listener) : Event`   | Registers a listener which runs when a user positions the mouse cursor over any table cell in Analyzer.                                                                                                                                                         |

## Constructor Details

| `new event()`                                                                                                                                                                                |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Source: [javascript/scripts/cv\_api\_event.js, line 28](https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L28) |

## Methods Details

| `disableDragAndDrop(disableDragAndDrop)`                                                                                                                                                                                                                                                                                                                     |               |         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | ------- |
| <p>Sets flag to indicate drag and drop should be disabled.</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L447">javascript/scripts/cv\_api\_event.js, line 447</a></p><ul><li><strong>Parameters</strong></li></ul> |               |         |
| Name                                                                                                                                                                                                                                                                                                                                                         | Default Value | Summary |
| `disableDragAndDrop :`                                                                                                                                                                                                                                                                                                                                       |               |         |

| Name                   | Default Value | Summary |
| ---------------------- | ------------- | ------- |
| `disableDragAndDrop :` |               |         |

| `disableTableContextMenu(disableTableContextMenu)`                                                                                                                                                                                                                                                                                                     |               |         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | ------- |
| <p>Disables or enables the table context menu event.</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L475">javascript/scripts/cv\_api\_event.js, line 475</a></p><ul><li><strong>Parameters</strong></li></ul> |               |         |
| Name                                                                                                                                                                                                                                                                                                                                                   | Default Value | Summary |
| \`disableTableContextMenu : boolean                                                                                                                                                                                                                                                                                                                    | string\`      |         |

| Name                                | Default Value | Summary |
| ----------------------------------- | ------------- | ------- |
| \`disableTableContextMenu : boolean | string\`      |         |

| `disableTableDoubleClick(disableTableDoubleClick)`                                                                                                                                                                                                                                                                                                     |               |         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | ------- |
| <p>Disables or enables the table double click event.</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L460">javascript/scripts/cv\_api\_event.js, line 460</a></p><ul><li><strong>Parameters</strong></li></ul> |               |         |
| Name                                                                                                                                                                                                                                                                                                                                                   | Default Value | Summary |
| \`disableTableDoubleClick : boolean                                                                                                                                                                                                                                                                                                                    | string\`      |         |

| Name                                | Default Value | Summary |
| ----------------------------------- | ------------- | ------- |
| \`disableTableDoubleClick : boolean | string\`      |         |

| `isEventDisabled(event) : boolean`                                                                                                                                                                                                                                                                                                                                                |                                               |                            |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -------------------------- |
| <p>Returns whether an event should be stopped.</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L488">javascript/scripts/cv\_api\_event.js, line 488</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li></ul> |                                               |                            |
| Name                                                                                                                                                                                                                                                                                                                                                                              | Default Value                                 | Summary                    |
| `event : string`                                                                                                                                                                                                                                                                                                                                                                  |                                               | Name of event in question. |
| Name                                                                                                                                                                                                                                                                                                                                                                              | Description                                   |                            |
| `boolean`                                                                                                                                                                                                                                                                                                                                                                         | Flag to indicated if event should be stopped. |                            |

| Name      | Description                                   |
| --------- | --------------------------------------------- |
| `boolean` | Flag to indicated if event should be stopped. |

| Name             | Default Value | Summary                    |
| ---------------- | ------------- | -------------------------- |
| `event : string` |               | Name of event in question. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>registerActionEventListener(listener) : Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener that runs after report actions and before refresh report.</p><ul><li><strong>Since</strong></li></ul><p>5.4</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L178">javascript/scripts/cv_api_event.js, line 178</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerActionEventListener(function(event, api, actionCode, actionCtx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which is executed after report actions and before refresh report.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>Object which allows you to remove the listener post registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                       |
| ------- | ----------------------------------------------------------------- |
| `Event` | Object which allows you to remove the listener post registration. |

| Name                  | Default Value | Summary                                                                                         |
| --------------------- | ------------- | ----------------------------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed after report actions and before refresh report. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>registerBuildMenuListener(listener) : Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener which runs before showing any of the menus in Analyzer.</p><ul><li><strong>Since</strong></li></ul><p>5.4</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L346">javascript/scripts/cv_api_event.js, line 346</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerBuildMenuListener(function(event, api, menuId, menu, x, y) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which runs before showing any of the menus in Analyzer.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>This is the object which allows you to remove the listener after registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                                    |
| ------- | ------------------------------------------------------------------------------ |
| `Event` | This is the object which allows you to remove the listener after registration. |

| Name                  | Default Value | Summary                                                                               |
| --------------------- | ------------- | ------------------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which runs before showing any of the menus in Analyzer. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>registerChartDoubleClickListener(listener) : Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener which runs when double-clicking on a chart item in Analyzer.</p><ul><li><strong>Since</strong></li></ul><p>5.4</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L254">javascript/scripts/cv_api_event.js, line 254</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerChartDoubleClickListener(function(event, api, ctx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which is executed when double-clicking a chart item.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>This is the object which allows you to remove the listener after registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                                    |
| ------- | ------------------------------------------------------------------------------ |
| `Event` | This is the object which allows you to remove the listener after registration. |

| Name                  | Default Value | Summary                                                                            |
| --------------------- | ------------- | ---------------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed when double-clicking a chart item. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>registerChartSelectItemsListener(listener) : Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener which runs when a user selects a chart data point or lassos a collection of data points. The listener can also run when the user clears chart items by clicking on the selected chart item or by clicking the <strong>Clear Selections</strong> button.</p><ul><li><strong>Since</strong></li></ul><p>5.4</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L231">javascript/scripts/cv_api_event.js, line 231</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerChartSelectItemsListener(function(event, api, ctx[]) { // Perform Action on api.* event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which is executed when a user selects a chart data point or lassos a collection of data points.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>This is the object which allows you to remove the listener after registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                                    |
| ------- | ------------------------------------------------------------------------------ |
| `Event` | This is the object which allows you to remove the listener after registration. |

| Name                  | Default Value | Summary                                                                                                                       |
| --------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed when a user selects a chart data point or lassos a collection of data points. |

| `registerDragEventListener(listener) : Event`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                                                                                |                                                                            |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| <p>Registers a listener which runs when a user starts dragging an object in the report area, layout panel, or available fields.</p><ul><li><strong>Since</strong></li></ul><p>5.4</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L378">javascript/scripts/cv\_api\_event.js, line 378</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript"> |                                                                                |                                                                            |
| </code></pre></li></ul><p>cv.api.event.registerDragEventListener(function(event, api, formula) { // Perform Action on api.\* event.stopImmediatePropagation(); }); \`\`\`</p>                                                                                                                                                                                                                                                                                                                                                                                                                                     |                                                                                |                                                                            |
| Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Default Value                                                                  | Summary                                                                    |
| `listener : function`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                | This is the listener function which is executed after a drag has occurred. |
| Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Description                                                                    |                                                                            |
| `Event`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | This is the object which allows you to remove the listener after registration. |                                                                            |

| Name    | Description                                                                    |
| ------- | ------------------------------------------------------------------------------ |
| `Event` | This is the object which allows you to remove the listener after registration. |

| Name                  | Default Value | Summary                                                                    |
| --------------------- | ------------- | -------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed after a drag has occurred. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>registerDropEventListener(listener) : Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener which runs after a drop has occurred in the report area, filter area, trash can, or layout panel.</p><ul><li><strong>Since</strong></li></ul><p>5.4</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L201">javascript/scripts/cv_api_event.js, line 201</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerDropEventListener(function(event, api, formula, dropClass) { // Perform Action on api.* event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which is executed after a drop has occurred.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>object which allows you to remove the listener after registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                        |
| ------- | ------------------------------------------------------------------ |
| `Event` | object which allows you to remove the listener after registration. |

| Name                  | Default Value | Summary                                                                    |
| --------------------- | ------------- | -------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed after a drop has occurred. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>registerInitListener(listener) : Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener that runs during the initialization of analyzer.</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L96">javascript/scripts/cv_api_event.js, line 96</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerInitListener(function(event, cv)) { // Perform Action on cv.api.* event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which is executed during the initialization.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>This is the object which allows you to remove the listener after registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                                    |
| ------- | ------------------------------------------------------------------------------ |
| `Event` | This is the object which allows you to remove the listener after registration. |

| Name                  | Default Value | Summary                                                                    |
| --------------------- | ------------- | -------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed during the initialization. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>registerPostExecutionListener</strong>(listener) : <code>Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener which is called after the report has completely finished executing in Mondrian and the server has returned with either an HTML or JSON result, depending on the visualization type.</p><ul><li><strong>Since</strong></li></ul><p>5.4</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L423">javascript/scripts/cv_api_event.js, line 423</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerPostExecutionListener(function(event, api, message) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which is called after the report has completely finished executing.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>This is the object which allows you to remove the listener after registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                                    |
| ------- | ------------------------------------------------------------------------------ |
| `Event` | This is the object which allows you to remove the listener after registration. |

| Name                  | Default Value | Summary                                                                                           |
| --------------------- | ------------- | ------------------------------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is called after the report has completely finished executing. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>registerPreExecutionListener(listener) : Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener which is called just before the browser sends the report XML to the server for processing.</p><ul><li><strong>Since</strong></li></ul><p>5.4</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L400">javascript/scripts/cv_api_event.js, line 400</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerPreExecutionListener(function(event, api) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which runs before a report is run.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>This is the object which allows you to remove the listener after registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                                    |
| ------- | ------------------------------------------------------------------------------ |
| `Event` | This is the object which allows you to remove the listener after registration. |

| Name                  | Default Value | Summary                                                          |
| --------------------- | ------------- | ---------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which runs before a report is run. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>registerRenderListener(listener) : Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener that runs after the UI has drawn the visualization.</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L158">javascript/scripts/cv_api_event.js, line 158</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerRenderListener(function(event, api, reportArea) { // Perform Action on api.* event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which is executed after the UI has drawn the visualization.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>Object which allows you to remove the listener post registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                       |
| ------- | ----------------------------------------------------------------- |
| `Event` | Object which allows you to remove the listener post registration. |

| Name                  | Default Value | Summary                                                                                   |
| --------------------- | ------------- | ----------------------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed after the UI has drawn the visualization. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>registerTableClickListener(listener) : Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener that runs at clicking on table cell of Analyzer.</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L116">javascript/scripts/cv_api_event.js, line 116</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerTableClickListener(function(event, api, td, ctx, filterCtx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which is executed at click on table cell.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>Object which allows you to remove the listener post registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                       |
| ------- | ----------------------------------------------------------------- |
| `Event` | Object which allows you to remove the listener post registration. |

| Name                  | Default Value | Summary                                                                 |
| --------------------- | ------------- | ----------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed at click on table cell. |

| `registerTableContextMenuListener(listener) : Event`                                                                                                                                                                                                                                                                                                                                                                                                                                                                |                                                                   |                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| <p>Registers a listener that runs at opened context menu of table cell of Analyzer.</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L137">javascript/scripts/cv\_api\_event.js, line 137</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript"> |                                                                   |                                                                                     |
| </code></pre></li></ul><p>cv.api.event.registerTableContextMenuListener(function(event, api, td, ctx, filterCtx) { // Perform Action on api.\* event.preventDefault(); event.stopImmediatePropagation(); }); \`\`\`</p>                                                                                                                                                                                                                                                                                             |                                                                   |                                                                                     |
| Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Default Value                                                     | Summary                                                                             |
| `listener : function`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                                                                   | This is the listener function which is executed at open context menu on table cell. |
| Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Description                                                       |                                                                                     |
| `Event`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Object which allows you to remove the listener post registration. |                                                                                     |

| Name    | Description                                                       |
| ------- | ----------------------------------------------------------------- |
| `Event` | Object which allows you to remove the listener post registration. |

| Name                  | Default Value | Summary                                                                             |
| --------------------- | ------------- | ----------------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed at open context menu on table cell. |

| `registerTableDoubleClickListener(listener) : Event`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                                                                |                                                                                       |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
| <p>Registers a listener which runs when double-clicking on a table cell in Analyzer.</p><ul><li><strong>Since</strong></li></ul><p>5.4</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L277">javascript/scripts/cv\_api\_event.js, line 277</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript"> |                                                                                |                                                                                       |
| </code></pre></li></ul><p>cv.api.event.registerTableDoubleClickListener(function(event, api, td, ctx, filterCtx) { // Perform Action on api.\* event.preventDefault(); event.stopImmediatePropagation(); }); \`\`\`</p>                                                                                                                                                                                                                                                                                                                                                |                                                                                |                                                                                       |
| Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Default Value                                                                  | Summary                                                                               |
| `listener : function`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |                                                                                | This is the listener function which is executed when double-clicking on a table cell. |
| Name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Description                                                                    |                                                                                       |
| `Event`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | This is the object which allows you to remove the listener after registration. |                                                                                       |

| Name    | Description                                                                    |
| ------- | ------------------------------------------------------------------------------ |
| `Event` | This is the object which allows you to remove the listener after registration. |

| Name                  | Default Value | Summary                                                                               |
| --------------------- | ------------- | ------------------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed when double-clicking on a table cell. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>registerTableMouseMoveListener(listener) : Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener which runs when a user moves the mouse cursor across any table cell in Analyzer.</p><ul><li><strong>Since</strong></li></ul><p>5.4</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L323">javascript/scripts/cv_api_event.js, line 323</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerTableMouseMoveListener(function(event, api, td, ctx, filterCtx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which is executed when a user moves the mouse cursor across any table cell in Analyzer.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>This is the object which allows you to remove the listener after registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                                    |
| ------- | ------------------------------------------------------------------------------ |
| `Event` | This is the object which allows you to remove the listener after registration. |

| Name                  | Default Value | Summary                                                                                                               |
| --------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed when a user moves the mouse cursor across any table cell in Analyzer. |

<table data-header-hidden><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><code>registerTableMouseOverListener(listener) : Event</code></td><td></td><td></td></tr><tr><td><p>Registers a listener which runs when a user positions the mouse cursor over any table cell in Analyzer.</p><ul><li><strong>Since</strong></li></ul><p>5.4</p><ul><li><strong>Source</strong></li></ul><p><a href="https://github.com/pentaho/pentaho-analyzer/tree/master/b/pentaho/p-analyzer/client/src/main/javascript/scripts/cv_api_event.js#L300">javascript/scripts/cv_api_event.js, line 300</a></p><ul><li><strong>Parameters</strong></li><li><strong>Returns</strong></li><li><p><strong>Example</strong></p><pre class="language-javascript"><code class="lang-javascript">
</code></pre></li></ul><p>cv.api.event.registerTableMouseOverListener(function(event, api, td, ctx, filterCtx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });</p><pre><code>```
</code></pre></td><td></td><td></td></tr><tr><td>Name</td><td>Default Value</td><td>Summary</td></tr><tr><td><code>listener : function</code></td><td></td><td>This is the listener function which is executed when a user positions the mouse cursor over any table cell in Analyzer.</td></tr><tr><td>Name</td><td>Description</td><td></td></tr><tr><td><code>Event</code></td><td>This is the object which allows you to remove the listener after registration.</td><td></td></tr></tbody></table>

| Name    | Description                                                                    |
| ------- | ------------------------------------------------------------------------------ |
| `Event` | This is the object which allows you to remove the listener after registration. |

| Name                  | Default Value | Summary                                                                                                                 |
| --------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `listener : function` |               | This is the listener function which is executed when a user positions the mouse cursor over any table cell in Analyzer. |


---

# 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://docs.pentaho.com/analyzer-external-javascript-api/cv-apis-pentaho-analyzer-external-javascript-api-cp/event-apis-pentaho-analyzer-external-javascript-api.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.
