import { Component, ViewChild, AfterViewInit, ViewEncapsulation } from '@angular/core'; import { jqxKnobComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxknob'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], encapsulation: ViewEncapsulation.None }) export class AppComponent implements AfterViewInit { @ViewChild('myKnobOne') myKnobOne: jqxKnobComponent; startValue1: number = 60; startValue2: number = 60; startValue3: number = 60; ngAfterViewInit(): void { // Create Second and Third Knobs let knobOneContainer = this.myKnobOne.elementRef.nativeElement; let knobTwoContainer = document.createElement('div'); let knobThreeContainer = document.createElement('div'); knobTwoContainer.id = 'myKnobTwo'; knobThreeContainer.id = 'myKnobThree'; knobOneContainer.appendChild(knobTwoContainer); let knobTwoOptions = { value: 60, min: 0, max: 100, startAngle: 190, width: 300, height: 300, endAngle: 350, snapToStep: true, pointerGrabAction: 'progressBar', rotation: 'clockwise', style: { fill: 'transparent' }, progressBar: { style: { fill: '#ef6100', stroke: '#ef6100' }, size: '18%', offset: '78%', background: { fill: '#cfd0d4', stroke: '#cfd0d4' } }, pointer: { type: 'line', visible: false, style: { fill: '#33AADD' }, size: '18%', offset: '78%', thickness: 0 } }; let myKnobTwo = jqwidgets.createInstance('#myKnobTwo', 'jqxKnob', knobTwoOptions); knobTwoContainer.appendChild(knobThreeContainer); let knobThreeOptions = { value: 60, min: 0, max: 100, startAngle: 10, width: 300, height: 300, endAngle: 170, snapToStep: true, pointerGrabAction: 'progressBar', rotation: 'clockwise', style: { fill: 'transparent' }, progressBar: { style: { fill: '#18a25e', stroke: '#18a25e' }, size: '18%', offset: '78%', background: { fill: '#cfd0d4', stroke: '#cfd0d4' } }, pointer: { type: 'line', visible: false, style: { fill: '#00a4e1' }, size: '18%', offset: '78%', thickness: 0 } }; let myKnobThree = jqwidgets.createInstance('#myKnobThree', 'jqxKnob', knobThreeOptions); knobTwoContainer.style.cssText = 'position: absolute !important; top: 90px; left: 60px;'; knobThreeContainer.style.cssText = 'position: absolute !important; top: 0px; left: 0px;'; myKnobTwo.addEventHandler('change', (event: any): void => { if (event.target !== event.currentTarget) { return; } let inputDiv = document.getElementsByClassName('inputField2')[0]; inputDiv.children[1].innerHTML = event.args.value; }); myKnobThree.addEventHandler('change', (event: any): void => { if (event.target !== event.currentTarget) { return; } let inputDiv = document.getElementsByClassName('inputField3')[0]; inputDiv.children[0].innerHTML = event.args.value; }); // End Creating Second and Third Knobs // Create Input Div's let inputDiv = document.createElement('div'); inputDiv.className = 'inputField1'; inputDiv.innerHTML = 'All' + this.startValue1 + 'Calls' knobOneContainer.appendChild(inputDiv); let inputDiv2 = document.createElement('div'); inputDiv2.className = 'inputField2'; inputDiv2.innerHTML = '