DevExtreme v23.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

Discrete Data

Documentation

This example demonstrates how to visualize discrete data using the PolarChart component. Months in the data source form discrete categories that divide the PolarChart. In addition, you can spot the difference between series types. Use the drop-down menu below the PolarChart to change the applied series type.

www.wikipedia.org
Backend API
$(() => { const radarOptions = { margin: { top: 50, bottom: 50, left: 100, }, dataSource, series: [{ valueField: 'day', name: 'Day', color: '#ba4d51' }, { valueField: 'night', name: 'Night', color: '#5f8b95' }], commonSeriesSettings: { type: 'scatter', }, }; const radar = $('#radarChart').dxPolarChart(radarOptions).dxPolarChart('instance'); $('#radarTypes').dxSelectBox({ width: 200, dataSource: types, inputAttr: { 'aria-label': 'Series Type' }, value: types[0], onValueChanged(e) { radar.option('commonSeriesSettings.type', e.value); }, }); });
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/23.2.5/css/dx.light.css" /> <script src="js/dx.all.js"></script> <script src="data.js"></script> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <div class="long-title"><h3>Average temperature in London</h3></div> <div id="chart-demo"> <div id="radarChart"></div> <div class="center"> <div>Series Type</div>&nbsp; <div id="radarTypes"></div> </div> </div> </div> </body> </html>
#chart-demo { height: 600px; } #radarChart { height: 500px; } #chart-demo > .center { text-align: center; } #chart-demo > .center > div, #chart-demo > .center > .dx-widget { display: inline-block; vertical-align: middle; } .long-title h3 { font-family: 'Segoe UI Light', 'Helvetica Neue Light', 'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana; font-weight: 200; font-size: 28px; text-align: center; margin-bottom: 20px; }
const dataSource = [{ arg: 'January', day: 6, night: 2, }, { arg: 'February', day: 7, night: 2, }, { arg: 'March', day: 10, night: 3, }, { arg: 'April', day: 14, night: 5, }, { arg: 'May', day: 18, night: 8, }, { arg: 'June', day: 21, night: 11, }, { arg: 'July', day: 22, night: 13, }, { arg: 'August', day: 22, night: 13, }, { arg: 'September', day: 19, night: 11, }, { arg: 'October', day: 15, night: 8, }, { arg: 'November', day: 10, night: 5, }, { arg: 'December', day: 7, night: 3, }]; const types = ['scatter', 'line', 'area', 'bar', 'stackedbar'];