javascript 里程表车速表jquery插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7016261/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 22:42:17  来源:igfitidea点击:

Odometer Speedometer jquery plugin

javascriptjquery

提问by Ricardo Binns

Is there any plugin who give's the chart type = ODOMETER ?

有没有提供图表类型 = ODOMETER 的插件?

incrideble how is so hard to find this, even highchart's that i'm using ( very good chart library ) dont have a odometer, dont know why.

令人难以置信的是,很难找到这个,即使是我正在使用的 highchart(非常好的图表库)也没有里程表,不知道为什么。

i found some "speedometer", Demobut wont help-me.

我找到了一些“速度计”,Demo,但不会帮助我。

anyone know any plugin or something like who work with odometer's ?

任何人都知道任何插件或类似谁使用里程表的东西?

Thanks.

谢谢。

回答by Joe

Google Charts

谷歌图表

Super easy to use and well documented.

超级易于使用且有据可查。



google.charts.load('current', {'packages':['gauge']});
      google.charts.setOnLoadCallback(drawChart);

      function drawChart() {

        var data = google.visualization.arrayToDataTable([
          ['Label', 'Value'],
          ['Memory', 80],
          ['CPU', 55],
          ['Network', 68]
        ]);

        var options = {
          width: 400, height: 120,
          redFrom: 90, redTo: 100,
          yellowFrom:75, yellowTo: 90,
          minorTicks: 5
        };

        var chart = new google.visualization.Gauge(document.getElementById('chart_div'));

        chart.draw(data, options);

        setInterval(function() {
          data.setValue(0, 1, 40 + Math.round(60 * Math.random()));
          chart.draw(data, options);
        }, 13000);
        setInterval(function() {
          data.setValue(1, 1, 40 + Math.round(60 * Math.random()));
          chart.draw(data, options);
        }, 5000);
        setInterval(function() {
          data.setValue(2, 1, 60 + Math.round(20 * Math.random()));
          chart.draw(data, options);
        }, 26000);
      }
<script src="https://www.gstatic.com/charts/loader.js"></script>

    <div id="chart_div" style="width: 400px; height: 120px;"></div>

回答by Ricardo Binns

Let this question up-to-date. New features from highcharts, i was looking for this, and now they have available:

让这个问题是最新的。highcharts 的新功能,我一直在寻找这个,现在它们可用:

Highcharts gauge-speedometer

Highcharts 仪表速度表

回答by Manivannan

jquery speedometer plugin is available.

jquery 车速表插件可用。

https://github.com/rmanivannan/speedometer-jquery-plugin

https://github.com/rmanivannan/speedometer-jquery-plugin

may be this could help

可能这会有所帮助