jqwidgets-framework
Version:
jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.
53 lines (44 loc) • 1.68 kB
text/typescript
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { jqxHeatMapComponent } from 'jqwidgets-ng/jqxheatmap';
import { jqxCheckBoxComponent } from 'jqwidgets-ng/jqxcheckbox';
@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('myCheckBoxXAxis', { static: false }) myCheckBoxXAxis: jqxCheckBoxComponent;
@ViewChild('myCheckBoxYAxis', { static: false }) myCheckBoxYAxis: jqxCheckBoxComponent;
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[][] = [
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ],
[ ]
];
changeXAxisPosition(event: any): void {
const isChecked = this.myCheckBoxXAxis.val();
this.myHeatMap.setOpposedXAxisPosition(isChecked);
}
changeYAxisPosition(event: any): void {
const isChecked = this.myCheckBoxYAxis.val();
this.myHeatMap.setOpposedYAxisPosition(isChecked);
}
}