• Edit
  • Download
  • <!DOCTYPE html>
    <html>
    
    <head>
        <meta charset="utf-8">
        <title>ZingSoft Demo</title>
    
    
        <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
        <style>
            .inline {
                display: inline-block;
                margin: auto;
                text-align: center;
                width: 100%;
            }
    
            zing-grid[loading] {
                height: 800px;
            }
        </style>
    </head>
    
    <body>
        <div id='myChart'></div>
        <input id='updateChart' type='range' min='0' max='180' value='88' class='inline'>
        <div id='output' class='inline'>88</div>
        <script>
            ZC.LICENSE = ["b55b025e438fa8a98e32482b5f768ff5"];
            var myConfig = {
                "type": "gauge",
                "scale-r": {
                    minValue: 0,
                    maxValue: 180,
                    step: 20,
                },
                "series": [{
                    "values": [
                        88
                    ]
                }]
            };
    
            document.getElementById('updateChart').addEventListener('input', function(ev) {
                var inputValue = ev.currentTarget.value;
                document.getElementById('output').innerHTML = inputValue
                zingchart.exec('myChart', 'setseriesvalues', {
                    plotindex: 0,
                    values: [parseInt(inputValue)]
                });
            });
    
            zingchart.render({
                id: 'myChart',
                data: myConfig,
                height: 400,
                width: '100%'
            });
        </script>
    </body>
    
    </html>
    <!DOCTYPE html>
    <html>
    	<head>
        <meta charset="utf-8">
        <title>ZingSoft Demo</title>
    	
    	
    		<script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    </head>
    	<body>
    		<div id='myChart'></div>
    		<input id='updateChart' type='range' min='0' max='180' value='88' class='inline'>
    		<div id='output' class='inline'>88</div>
    	</body>
    </html>
    .inline {
      display:inline-block;
      margin:auto;
      text-align:center;
      width:100%;
    }
    var myConfig = {
        "type": "gauge",
        "scale-r": {
            minValue:0,
            maxValue:180,
            step:20,
        },
        "series": [
            {
                "values": [
                    88
                ]
            }
        ]
    };
    
    document.getElementById('updateChart').addEventListener('input', function(ev) {
      var inputValue = ev.currentTarget.value;
      document.getElementById('output').innerHTML = inputValue
      zingchart.exec('myChart', 'setseriesvalues', {
        plotindex:0,
        values: [parseInt(inputValue)]
      });
    });
    
    zingchart.render({ 
    	id : 'myChart', 
    	data : myConfig, 
    	height: 400, 
    	width: '100%' 
    });