import { Component, ViewChild } from '@angular/core'; import { jqxChartComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxchart'; @Component({ selector: 'app-root', templateUrl: './app.component.html' }) export class AppComponent { @ViewChild('myChart') myChart: jqxChartComponent; sampleData: any[] = [29, undefined, 10, 15, 10, undefined, NaN, 30, 25, undefined, 33, 19, 11]; padding: any = { left: 5, top: 5, right: 15, bottom: 5 }; titlePadding: any = { left: 0, top: 0, right: 0, bottom: 10 }; xAxis: any = { text: 'x', valuesOnTicks: false }; getWidth() : any { if (document.body.offsetWidth < 850) { return '90%'; } return 850; } seriesGroups: any[] = [ { type: 'line', source: this.sampleData, toolTipFormatFunction: (value: any, itemIndex: any, serie: any, group: any, categoryValue: any, categoryAxis: any) => { let dataItem = this.sampleData[itemIndex]; return '