Skip to content

Commit

Permalink
Active selections and parameters for custom widget
Browse files Browse the repository at this point in the history
  • Loading branch information
irefas committed Apr 6, 2023
1 parent 9476743 commit 2f5d4f3
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions chapter_3/create_dashboard/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,57 @@ To use the API the keyword is **datastore**. Datastore is an object that contain
}
**selections**

| returns: an array with all the selections done; each selection has informations about the dataset where the selection has been done, the column e the value passed through the selection
| params: no params
| example:
.. code-block:: javaScript
:linenos:
var activeSelection = datastore.selections;
| result:
.. code-block:: javaScript
:linenos:
[
{
"ds": "FOODMART_SALES",
"column": "PRODUCT_FAMILY",
"value": "Food"
},
{
"ds": "FOODMART_COST",
"column": "QUARTER",
"value": "Q1"
}
]
**parameters**

| returns: a key/value object with all the parameters associated to the dashboard
| params: no params
| example:
.. code-block:: javaScript
:linenos:
var myParameters = datastore.parameters;
| result:
.. code-block:: javaScript
:linenos:
{
"par_family": "Non-Consumable",
"par_number": 10
}
It is also possible to interact with the other cockpit widgets, to do so it's possible to use the **clickManager**:

.. code-block:: javaScript
Expand Down

0 comments on commit 2f5d4f3

Please sign in to comment.