import * as React from 'react'; import JqxChart, { IChartProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxchart'; import JqxCheckBox from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxcheckbox'; import JqxSlider from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxslider'; class App extends React.PureComponent<{}, IChartProps> { private myChart = React.createRef(); constructor(props: {}) { super(props); this.sliderStartAngle = this.sliderStartAngle.bind(this); this.sliderEndAngle = this.sliderEndAngle.bind(this); this.sliderRotate = this.sliderRotate.bind(this); this.sliderRadius = this.sliderRadius.bind(this); this.checkBoxTicksBetween = this.checkBoxTicksBetween.bind(this); this.checkBoxAutoRotate = this.checkBoxAutoRotate.bind(this); const dataset: any[] = [ { City: 'London', SalesCountJan: 210, SalesRevenueJan: 123 }, { City: 'Madrid', SalesCountJan: 190, SalesRevenueJan: 114 }, { City: 'Munich', SalesCountJan: 201, SalesRevenueJan: 112 }, { City: 'Amsterdam', SalesCountJan: 110, SalesRevenueJan: 98 }, { City: 'Paris', SalesCountJan: 105, SalesRevenueJan: 93 }, { City: 'Prague', SalesCountJan: 54, SalesRevenueJan: 100 } ]; this.state = { description: '(revenue in thousands)', padding: { left: 5, top: 5, right: 5, bottom: 5 }, seriesGroups: [ { endAngle: 270, polar: true, radius: 120, series: [ { dataField: 'SalesCountJan', displayText: 'Sales count', opacity: 0.7, radius: 2, lineWidth: 2, symbolType: 'circle' }, { dataField: 'SalesRevenueJan', displayText: 'Revenue', opacity: 0.7, radius: 2, lineWidth: 2, symbolType: 'square' } ], type: 'line' } ], source: dataset, title: 'Sales volume and revenue by city', titlePadding: { left: 0, top: 0, right: 0, bottom: 5 }, valueAxis: { labels: { autoRotate: true, formatSettings: { decimalPlaces: 0 } } }, xAxis: { dataField: 'City', labels: { autoRotate: true }, valuesOnTicks: true } }; } public render() { return (

Move the slider to change start angle:

Move the slider to change end angle:

Move the slider to rotate:

Move the slider to change the radius:

Tick marks between values Auto rotate axis text
); } private sliderStartAngle(event: any): void { const value = event.args.value; const newSeriesGroups = this.state.seriesGroups; newSeriesGroups![0].startAngle = value; this.setState({ seriesGroups: newSeriesGroups }, () => { this.myChart.current!.update(); }); } private sliderEndAngle(event: any): void { const value = 360 - event.args.value; const newSeriesGroups = this.state.seriesGroups; newSeriesGroups![0].endAngle = value; this.setState({ seriesGroups: newSeriesGroups }, () => { this.myChart.current!.update(); }); } private sliderRotate(event: any): void { const value = event.args.value; const newSeriesGroups = this.state.seriesGroups; let endAngle = newSeriesGroups![0].endAngle; if (isNaN(endAngle!)) { endAngle = 360; } let startAngle = newSeriesGroups![0].startAngle if (isNaN(startAngle!)) { startAngle = 0; } const diff = endAngle! - startAngle!; newSeriesGroups![0].startAngle = value; newSeriesGroups![0].endAngle = value + diff; this.setState({ seriesGroups: newSeriesGroups }, () => { this.myChart.current!.update(); }); } private sliderRadius(event: any): void { const value = event.args.value; const newSeriesGroups = this.state.seriesGroups; newSeriesGroups![0].radius = value; this.setState({ seriesGroups: newSeriesGroups }, () => { this.myChart.current!.update(); }); } private checkBoxTicksBetween(event: any): void { const newXAxis = this.state.xAxis; newXAxis!.valuesOnTicks = !event.args.checked; this.setState({ xAxis: newXAxis }, () => { this.myChart.current!.update(); }); } private checkBoxAutoRotate(event: any): void { const newXAxis = this.state.xAxis; const newValueAxis = this.state.valueAxis; newXAxis!.labels!.autoRotate = event.args.checked; newValueAxis!.labels!.autoRotate = event.args.checked; this.setState({ valueAxis: newValueAxis, xAxis: newXAxis }, () => { this.myChart.current!.update(); }); } } export default App;