import * as React from 'react'; import JqxChart, { IChartProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxchart'; import JqxDropDownList from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownlist'; class App extends React.PureComponent<{}, IChartProps> { private myChart = React.createRef(); constructor(props: {}) { super(props); this.dropDownOnSelect = this.dropDownOnSelect.bind(this); const sampleData: any[] = [29, undefined, 10, 15, 10, undefined, NaN, 30, 25, undefined, 33, 19, 11]; this.state = { description: 'Sample line serie with missing and invalid values', padding: { left: 5, top: 5, right: 15, bottom: 5 }, seriesGroups: [ { series: [ { emptyPointsDisplay: 'skip', displayText: 'Value', lineWidth: 2, symbolSize: 8, symbolType: 'circle' } ], source: sampleData, toolTipFormatFunction: (value: any, itemIndex: any, serie: any, group: any, categoryValue: any, categoryAxis: any) => { return '
Index: ' + itemIndex + '
Value: ' + value + '
'; }, type: 'line', valueAxis: { title: { text: 'Value
' } } } ], source: sampleData, title: 'Line serie with missing points', titlePadding: { left: 0, top: 0, right: 0, bottom: 10 }, xAxis: { valuesOnTicks: false } }; } public render() { return (

Select missing points display mode:

); } private dropDownOnSelect(event: any): void { const args = event.args; if (args) { const value = args.item.value; const newSeriesGroups = this.state.seriesGroups; newSeriesGroups![0].series![0].emptyPointsDisplay = value; this.setState({ seriesGroups: newSeriesGroups }, () => { this.myChart.current!.update(); }); } } } export default App;