jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
54 lines (46 loc) • 1.28 kB
text/typescript
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { jqxKnobComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxknob';
import { jqxInputComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxinput';
export class AppComponent {
myKnob: jqxKnobComponent;
myInput: jqxInputComponent;
progressBar: any =
{
style: { fill: '#00a644' },
background: { fill: '#eeeeee' },
size: '30%',
offset: '70%'
};
pointer: any =
{
type: 'line',
style: { fill: '#00a644' },
size: '30%',
offset: '70%',
thickness: 20
};
dial: any =
{
style: {
fill: '#fff'
},
innerRadius: '68%',
outerRadius: '92%',
startAngle: 0,
endAngle: 360
};
myKnobOnChange(event: any): void {
if (event.target.nodeName === 'INPUT')
return;
this.myInput.val(event.args.value);
};
myInputOnChange(): void {
this.myKnob.val(this.myInput.val());
};
}