chart实现雷达图图表效果代码
代码语言:html
所属分类:图表
代码描述:chart实现雷达图图表效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/chart.js"></script> </head> <body> <div style="height:500px;width:50%;"> <canvas id="chartjs-radar-chart"></canvas></div> <script> window.chartColors = { red: 'rgb(255, 99, 132)', orange: 'rgb(255, 159, 64)', yellow: 'rgb(255, 205, 86)', green: 'rgb(75, 192, 192)', blue: 'rgb(54, 162, 235)', purple: 'rgb(153, 102, 255)', grey: 'rgb(201, 203, 207)' }; window.randomScalingFactor = function() { return (Math.random() > 0.5 ? 1.0 : -1.0) * Math.round(Math.random() * 100); }; var color = Chart.helpers.color; var radarConfig = { type: 'radar', data: { labels: [ ["Eating", "Dinner"], ["Drinking", "Water"], "Sleeping", ["Designing", "Graphics"], "Coding", "Cycling", "Running" ], datasets: [{ label: "My First dataset",.........完整代码请登录后点击上方下载按钮下载查看
网友评论0