in powerbi-visual-builder/src_visual/visual.ts [99:128]
constructor(options: VisualConstructorOptions) {
try {
this.selectionManager = options.host.createSelectionManager();
this.template = "<%= templateData %>" as any;
this.enableDrillDown = "<%= enableDrillDown %>" as any;
this.drillDownColumns = "<%= drillDownColumns %>" as any;
this.container = options.element;
this.divChart = document.createElement("div");
this.divChart.style.cursor = "default";
this.divChart.style.pointerEvents = "none";
this.host = options.host;
options.element.appendChild(this.divChart);
this.chartTemplate = new CharticulatorContainer.ChartTemplate(
this.template
);
this.properties = this.getProperties(null);
// Handles mouse move events for displaying tooltips.
window.addEventListener("mousemove", e => {
const bbox = this.container.getBoundingClientRect();
this.currentX = e.pageX - bbox.left;
this.currentY = e.pageY - bbox.top;
if (this.handleMouseMove) {
this.handleMouseMove();
}
});
} catch (e) {
console.log(e);
}
}