#1052 - added tooltip component for diagram

This commit is contained in:
Vito Albano
2016-12-05 00:05:30 +00:00
parent 91d9503b37
commit 2deb8092c3
17 changed files with 262 additions and 22 deletions

View File

@@ -0,0 +1,22 @@
import { Component, Input } from '@angular/core';
@Component({
moduleId: module.id,
selector: 'diagram-tooltip',
templateUrl: './diagram-tooltip.component.html',
styleUrls: ['./diagram-tooltip-style.css']
})
export class DiagramTooltip {
@Input()
data: any;
getTooltipHeader(data: any) {
let headerValue = data.name || data.id;
return data.type + ' ' + headerValue;
}
getTooltipMessage(data: any) {
return (data.value !== undefined && data.value !== null ) ? data.value + ' ' + data.dataType : '';
}
}