@@ -58,9 +58,9 @@ Payload
58
58
-------
59
59
60
60
You can use the click event payload to construct a custom filter that
61
- you can apply on another chart or charts in your application. The
62
- syntax of the payload object for the callback function looks similar to
63
- the following:
61
+ you can apply on other charts in your application. The syntax of the
62
+ payload object for the callback function looks similar to the
63
+ following:
64
64
65
65
.. code-block:: sh
66
66
:copyable: false
@@ -79,6 +79,8 @@ payload:
79
79
80
80
chart.addEventListener("click", (payload) => {
81
81
"chartId": "xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
82
+ "chartTitle": "This is my chart's title",
83
+ "chartDescription": "This is my chart's description",
82
84
"event": { // information about the mouse event. For example:
83
85
"type": "click", // event type
84
86
@@ -175,6 +177,18 @@ contains:
175
177
- The ``value`` of the clicked element
176
178
- The lower bound for numeric or date binning only
177
179
180
+ For :ref:`data tables <data-table-ref>`, the Charts Embedding
181
+ JavaScript SDK click event handler captures click events for the
182
+ following elements:
183
+
184
+ - Chart title
185
+ - Fields that represent the channel data for the clicked element:
186
+
187
+ - ``groups`` field, which contains all Groups channels including
188
+ label and value
189
+ - ``cell`` field, which contains the column header label and value of
190
+ the clicked cell
191
+
178
192
.. _click-event-payload-selection-filter:
179
193
180
194
``selectionFilter`` Element
@@ -226,6 +240,18 @@ contains information about the clicked target including:
226
240
- The role of mark, such as ``mark``, ``legend``, ``axis-label``, etc.
227
241
- The fill color of the mark
228
242
243
+ For :ref:`data tables <data-table-ref>`, the Charts Embedding
244
+ JavaScript SDK click event handler payload captures the following:
245
+
246
+ - Mark type, which is ``text``
247
+ - Mark role, such as ``group-cell``, ``value-cell``,
248
+ ``dynamic-value-cell``, ``row-total-cell``,
249
+ ``column-total-cell``, ``header-column-total-cell``, and
250
+ ``grand-total-cell``
251
+
252
+ The Charts Embedding JavaScript SDK click event handler does not
253
+ capture click events on column headers.
254
+
229
255
.. _click-event-egs:
230
256
231
257
Examples
0 commit comments