Introduction
- Client-Side Chart Widget in HTML 5: Part 1 (Bar Chart)
- Client-Side Chart Widget in HTML 5: Part 2 (Pie Chart)
- Client-Side Chart Widget in HTML 5: Part 3 (Line Chart)
- Client-Side Chart Widget in HTML5: Part 4 (Doughnut Chart)
- Client-Side Chart Widget in HTML5: Part 5 (Polar Area Chart)
Now we will explain a client Radar Chart widget in HTML5.
Background
Please download the necessary files here http://www.chartjs.org/.
Using the code
A simple HTML
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title> Radar Chart Using Chart.js</title>
- </head>
- <body></body>
- </html>
Included JavaScript file
- <script src="Chart.js"></script>
Call the Chart Function
- window.onload = function () {
- var canvasObject = document.getElementById("myChart").getContext("2d");
- window.myRadar = new Chart(canvasObject).Radar(radarChartData, {
- responsive: true
- });
- }
- var radarChartData = {
- labels: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
- datasets: [
- {
- label: "Dataset 1",
- fillColor: "#66FFFF",
- strokeColor: "#800000",
- pointColor: "rgba(220,220,220,1)",
- pointStrokeColor: "#000",
- pointHighlightFill: "#FF1919",
- pointHighlightStroke: "rgba(220,220,220,1)",
- data: [65, 59, 90, 81, 56, 55, 40]
- },
- {
- label: "Dataset 2",
- fillColor: "#0033CC",
- strokeColor: "#800000",
- pointColor: "rgba(151,187,205,1)",
- pointStrokeColor: "#000",
- pointHighlightFill: "#FF1919",
- pointHighlightStroke: "rgba(151,187,205,1)",
- data: [28, 48, 40, 19, 96, 27, 100]
- }
- ]
- };


Join the conversation! Your thoughts help the community grow.