js制作图表(dygraphs)

来源:互联网 发布:软件配置管理论坛 编辑:程序博客网 时间:2024/05/05 10:39

dygraphs 是一个开源的Javascript库,它可以产生一个可交互式的,可缩放的的曲线表。其可以用来显示大密度的数据集(比如股票,气温,等等),并且可以让 用户来浏览和解释这个曲线图。在它的主页,你可以看到一些示例和用法。

简单示例:

<html><head>  <script type="text/javascript" src="dygraph-combined.js"></script></head><body><div id="graphdiv"></div><script type="text/javascript">  g = new Dygraph(        // containing div        document.getElementById("graphdiv"),        // CSV or path to a CSV file.        "Date,Temperature\n" +        "2008-05-07,75\n" +        "2008-05-08,70\n" +        "2008-05-09,80\n"      );</script></body></html>

 

官方网站:http://dygraphs.com/
原创粉丝点击