projects/ng2-google-charts/src/lib/google-chart/chart-html-tooltip.ts
Properties |
|
Methods |
|
Public
constructor(el: ElementRef)
|
||||||
|
Parameters :
|
| Static Readonly PIXELS |
Type : string
|
Default value : 'px'
|
| Public getDOMElement |
getDOMElement()
|
|
Returns :
ElementRef
|
| Public setPosition |
setPosition(x: number, y: number)
|
|
Returns :
void
|
import { ElementRef } from '@angular/core';
export class ChartHTMLTooltip {
public static readonly PIXELS: string = 'px';
public constructor(private el: ElementRef) {}
public setPosition(x: number, y: number): void {
this.el.nativeElement.style.left = x + ChartHTMLTooltip.PIXELS;
this.el.nativeElement.style.top = y + ChartHTMLTooltip.PIXELS;
}
public getDOMElement(): ElementRef {
return this.el;
}
}