gauge实现一个仪表盘计量显示器指示器效果代码

代码语言:html

所属分类:图表

代码描述:gauge实现一个仪表盘计量显示器指示器效果代码

代码标签: gauge 仪表盘

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!doctype html>

<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">


    <style>
        body {
            background: #efefef;
            
        }

  

        #demo {
            height: 300px;
            width: 300px;
        }

        #preview-textfield {
            width: 300px;
            text-align: center;
            font-size: 2em;
            font-weight: bold;
            color: black;
            font-family: 'Amaranth', sans-serif;
        }
    </style>
</head>

<body>

    <div class="container">

        <div id="preview-textfield"></div>
        <canvas id="demo"></canvas>

    </div>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/gauge.js"></script>
    <script>
        var opts = {
            angle: -0.25,
            lineWidth: 0.2,
            radiusScale: 0.9,
            pointer: {
            .........完整代码请登录后点击上方下载按钮下载查看

网友评论0