jqwidgets-framework
Version:
jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.
61 lines (53 loc) • 1.64 kB
text/typescript
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { jqxHeatMapComponent } from 'jqwidgets-ng/jqxheatmap';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
@ViewChild('myHeatMap', { static: false }) myHeatMap: jqxHeatMapComponent;
xAxis: object = {
labels: ['John', 'Marry', 'Alba', 'Steven', 'Josh', 'Alica', 'Robert', 'Kim', 'Ann', 'Paul', 'Regina', 'Dorothy'],
opposedPosition: true
};
yAxis: object = {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
opposedPosition: true
};
data: number[][] = [
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ]
];
legendSettings: object = {
position: 'Bottom'
};
paletteSettings: object = {
palette: [
{ value: 10, color: '#6bbd49' },
{ value: 30, color: '#22aaaa' },
{ value: 60, color: '#53b9e6' },
]
};
setGradientType(event: any): void {
if (this.myHeatMap) {
this.myHeatMap.setPaletteType('Gradient');
}
}
setFixedType(event: any): void {
if (this.myHeatMap) {
this.myHeatMap.setPaletteType('Fixed');
}
}
}