Open utterances-bot opened 5 years ago
Showing Error message ("Argument of type 'SVGElement' is not assignable to parameter of type 'ContainerElement'. Type 'SVGElement' is missing the following properties from type 'SVGGElement': transform, getBBox, getCTM, getScreenCTM, and 2 more.ts(2345)")
for "this.svg.node()" :
Code used is below one:
bars.on("mouseover", (d) => {
let mouse = d3.mouse(this.svg.node());
let x = mouse[0];
let y = mouse[1];
this.host.tooltipService.move({
dataItems: d.tooltips,
identities: [d.identity],
coordinates: [x, y],
isTouchEvent: false
});
});
How to rectify this?
Hi @MaheswariR08. Both the Power BI API and D3 have changed a lot since I made this short course and this is now too outdated to be useful. The problem there is now greater than a simple syntax issue. I recommend you follow the official bar chart sample instead as the Microsoft team appears to keep it up-to-date to the current API and D3 versions.
Please provide tutorial for tooltip... as official bar chart sample is not easy to digest...
Adding Tooltips To Your Power BI Custom Visual
Performance & Scalability
https://jorgecandeias.github.io/2017/09/16/adding-tooltips-to-your-power-bi-custom-visual/