app.component.html:
<ejs-chart style='display:block' align='center' id='container'
[tooltip]='tooltip' (load)='load($event)' (pointClick)='pointClick($event)' > // add your additional code here</ejs-chart> app.component.ts:
// add your additional code here public tooltip: Object = { enable: true,
template:
'<div id="Tooltip"><table style="width:100%; border: 1px solid black;" class="table-borderless">' +
'<tr><th rowspan="2" style="background-color: #C1272D"><div><button ejs-button cssClass="e-info" (click)="onChange($event)" style="text-transform:none !important">Close</button></div>' +
'</th><td style="height: 25px; width: 50px; background-color: #C1272D; font-size: 14px; color: #E7C554; font-weight: bold; padding-left: 5px">' +
'${y}</td></tr><tr ><td style="height: 25px; width: 50px; background-color: #C1272D; font-size: 18px; color: #FFFFFF; font-weight: bold; padding-left: 5px">${x}</td>' +
'</tr></table></div>' };
public pointClick(args: IPointEventArgs): void { var tooltip = document.getElementById('container_tooltipparent_template');
tooltip.className += "addCSS"; };app.component.css:
.control-fluid {
padding: 0px !important;
}
.addCSS {
display: block !important;
}
#container_tooltip{
pointer-events: all !important; } |
public pointClick(args: IPointEventArgs): void {
var tooltip = document.getElementById('container_tooltipparent_template'); alert('triggered'); tooltip.className += "addCSS"; }; |