Hi, I am using TS visual embed SDK to display a visualization. The visualization contains table with rows and columns. I am aiming to add a click event on one of the column names. On click I need to access the row info and use it to navigate to other page within my application. Tried multiple solution from docs(ex: EmbedEvent.VizPointClick) and some other sources. Still getting errors. What is the right way to implement this?
import { LiveboardEmbed, EmbedEvent } from '@thoughtspot/visual-embed-sdk/react';
const handleVizPointClick = (data) => {
// Access the row information from the data object
const row = data.clickedPoint.selectedAttributes[0].value;
console.log('Clicked row:', row);
};
<LiveboardEmbed
// Other props
on={EmbedEvent.VizPointClick}
callback={handleVizPointClick}
/>