jqwidgets-framework
Version:
jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.
48 lines (40 loc) • 1.5 kB
text/typescript
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { jqxHeatMapComponent } from 'jqwidgets-ng/jqxheatmap';
import { jqxDropDownListComponent } from 'jqwidgets-ng/jqxdropdownlist';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
@ViewChild('myHeatMap', { static: false }) myHeatMap: jqxHeatMapComponent;
@ViewChild('myDropDownList', { static: false }) myDropDownList: jqxDropDownListComponent;
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[][] = [
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ]
];
source: string[] = ['Right', 'Left', 'Top', 'Bottom'];
setLegendPosition(event: any): void {
const item: string = this.myDropDownList.getSelectedItem().label;
this.myHeatMap.setLegendPosition(item);
}
}