dynamic radar diagram - Download Dynamic Customizable Radar Chart In JavaScript - jQuery radarGraph.js

Download Dynamic Customizable Radar Chart In JavaScript – jQuery radarGraph.js

Posted on

This time I will share jQuery Plugin and tutorial about Dynamic Customizable Radar Chart In JavaScript – jQuery radarGraph.js, hope it will help you in programming stack.

dynamic radar diagram - Download Dynamic Customizable Radar Chart In JavaScript - jQuery radarGraph.js
File Size: 7.07 KB
Views Total: 1178
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

radarGraph.js is a small jQuery plugin which dynamically renders a customizable, canvas-based radar chart (radar graph, radar diagram) with legends from JavaScript objects.

How to use it:

1. Put the latest version of the jQuery radarGraph plugin after jQuery slim build.

2         integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
3         crossorigin="anonymous">
4 </script>
5 <script src="radarGraph.min.js"></script>

2. Create an empty canvas element on which you want to draw the radar chart.

1 <canvas id="example" width="300" height="300"></canvas>

3. Call the function on the canvas element and override the default chart data.

01 $(function(){
02   $('#example').radarGraph({
03     labels: [
04       'data point1',
05       'data point2',
06       'data point3',
07       'data point4',
08     ],
09     chartData: {
10       // color accepts hex value also : #666666
11       '0':{'name':'thing1','score':[20,15,15,16.6], 'color':'red'},
12       '1':{'name':'thing2','score':[17,15,15,15.6], 'color':'blue'},
13       '2':{'name':'thing3','score':[20,25,20,21.6], 'color':'green'},
14       '3':{'name':'thing4','score':[25,15,25,21.6], 'color':'purple'},
15     },
16   });
17 });

4. Customize the number of lines and rings to draw on the radar chart.

1 $('#example').radarGraph({
2   dataPoints: 4,
3   levels: 5
4 });

5. Set the maximum score. Default: 25.

1 $('#example').radarGraph({
2   maxValue: 30
3 });

6. Customize the ring color.

1 $('#example').radarGraph({
2   levelColor: '#b5b5b5'
3 });

7. Customize the padding of the radar chart. Default: 25.

1 $('#example').radarGraph({
2   borderOffset: 10
3 });

This awesome jQuery plugin is developed by modnar1226. For more Advanced Usages, please check the demo page or visit the official website.

source : jquery.net