多边形图表效果
代码语言:html
所属分类:图表
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> .polygon-chart { display: block; width: 400px; height: 400px; } * { margin: 0; padding: 0; border: 0; outline: none; box-sizing: border-box; font-family: 'AmstelvarAlphaDefault', sans-serif; } html, body { display: block; height: 100vh; width: 100vw; background-color: #000; background: linear-gradient(#1f1f21, #000); } .main { display: flex; height: 100vh; width: 100vw; flex-direction: row; justify-content: center; align-items: center; } </style> </head> <body translate="no"> <div class="main"> <div class="polygon-chart" id="polygon-chart"></div> </div> <script type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/PolygonChart.umd.js"></script> <script> let sides = 5; let data = [[ 0.7045, 0.87, 0.5049, 0.8418, 0.5450]]; let el = document.getElementById("polygon-char.........完整代码请登录后点击上方下载按钮下载查看
网友评论0