File tree Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -194,10 +194,6 @@ dashboards embedded with the :ref:`Embedding SDK
194194 dashboard.setAutoRefresh(true);
195195 dashboard.setMaxDataAge(30);
196196
197- Use the following methods to set the theme and automatic
198- refresh rate of the Dashboard instance returned by
199- ``DashboardsEmbedSDK.createDashboard({ ... })``.
200-
201197 .. list-table::
202198 :header-rows: 1
203199 :widths: 50 50
@@ -230,6 +226,12 @@ dashboards embedded with the :ref:`Embedding SDK
230226 your dashboard's background color has appropriate
231227 contrast so that the information is visible.
232228
229+ * - ``getChart('<chartID>')``
230+ - Retrieves a specific chart from the embedded dashboard
231+ using the chart's ``chartId`` string. After calling this
232+ method, you can :ref:`highlight elements <highlight-chart-elements>`
233+ or :ref:`filter data <filter-embedded-sdk>` on the chart.
234+
233235 .. seealso::
234236
235237 - `Embedding SDK API Documentation
Original file line number Diff line number Diff line change @@ -14,13 +14,8 @@ Highlight Chart Elements
1414
1515The Charts Embedding JavaScript SDK enables you to programmatically
1616highlight specific elements and :ref:`clicked events
17- <handle-click-events>` on charts.
18-
19- .. note::
20-
21- You can highlight specific elements only on embedded charts. You
22- can't highlight specific elements on charts within embedded
23- dashboards.
17+ <handle-click-events>` on embedded charts and charts within :ref:`embedded
18+ dashboards <embedding-dashboards>`.
2419
2520.. _highlight-chart-elements-prereqs:
2621
@@ -42,6 +37,16 @@ has the following syntax:
4237
4338 charts.setHighlight(selectionFilter);
4439
40+ .. note::
41+
42+ If you want to highlight charts within an embedded dashboard,
43+ first run the following method to retrieve a specific chart
44+ from the Dashboard instance:
45+
46+ .. code-block:: javascript
47+
48+ dashboard.getChart('<chartID>');
49+
4550The ``setHighlight`` method takes an :abbr:`MQL (MongoDB Query
4651Language` filter. You can provide the MQL filter directly to the
4752``setHighlight`` method as shown in the example below or through the
You can’t perform that action at this time.
0 commit comments