- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>flot</title>
- <!--[if lte IE 8]>
- <script language="javascript" type="text/javascript" src="excanvas.min.js"></script>
- <![endif]-->
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="jquery.flot.js"></script>
- </head>
- <body>
- <script type="text/javascript">
- <!--
- var data = [];
- data.push({
- "label": "中国",
- "data": [[2000, 3.9], [2001, 2.0], [2002, 1.2], [2003, 1.3], [2004, 2.5], [2005, 2.0], [2006, 3.1]]
- });
- $(function(){
- var options = {
- lines: { show: true },
- points: { show: true },
- xaxis: { tickDecimals: 0, tickSize: 1 }
- };
- var placeholder = $("#placeholder");
- $.plot(placeholder, data, options);
- });
- //-->
- </script>
- <div id="placeholder" style="width:500px;height:240px"></div>
- </body>
- </html>
flot 例子代码
最新推荐文章于 2021-08-06 04:29:07 发布