Forum Discussion
Custom visual - tables with tabs
- 8 years ago
That depends on what library you use. The common way is to add an event handler for click event:
- Vanila JS: element.addEventListener("click", () => {// TODO: Do something });
- D3.js / jQuery: selection.on("click", () => {// TODO: Do something })
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
v-viig Couldn't get anything from the D3 gallery. My requirement is very simple. There are four tabs. The data should be split into four tables based on a logic and should be displayed one in each tab. I'm trying to implement https://www.w3schools.com/howto/howto_js_vertical_tabs.asp but couldn't do it. I know it is very simple but I'm new to Typescript and custom visual coding. I implemented the HTML and the CSS part from the above link. There is a line which says onclick="openCity(event, 'London')" in the HTML. How to do this in typescript?
That depends on what library you use. The common way is to add an event handler for click event:
- Vanila JS: element.addEventListener("click", () => {// TODO: Do something });
- D3.js / jQuery: selection.on("click", () => {// TODO: Do something })
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- satishr8 years agoHelper III
Thanks, I used the D3 option and it is working.
d3.select("#id").on('click', function() { ... }