zoukankan      html  css  js  c++  java
  • 构建一个highcharts

    示例:http://www.helloweba.com/demo/highcharts/line.html
    <!doctype html>
    <html lang="en">
    <head>
        <meta charset="utf-8">
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
        <script type="text/javascript" src="http://code.highcharts.com/highcharts.js"></script>
        <script type="text/javascript">    
            var options = {
                chart: {
                    renderTo: 'container',
                    type:'spline'
                },
                xAxis: {
                    tickInterval: 5,
                    categories:['2013-08-01 00:00:00','2013-08-01 00:00:10','2013-08-01 00:00:20','2013-08-01 00:00:30','2013-08-01 00:00:40','2013-08-01 00:00:50','2013-08-01 00:01:00','2013-08-01 00:01:10','2013-08-01 00:01:20','2013-08-01 00:01:30','2013-08-01 00:01:40','2013-08-01 00:01:50','2013-08-01 00:02:00','2013-08-01 00:02:10','2013-08-01 00:02:20','2013-08-01 00:02:30','2013-08-01 00:02:40','2013-08-01 00:02:50','2013-08-01 00:03:00','2013-08-01 00:03:10','2013-08-01 00:03:20','2013-08-01 00:03:30','2013-08-01 00:03:40','2013-08-01 00:03:50','2013-08-01 00:04:00'],
                    labels:{
                        x:45,//调节x偏移
                        //y:-35,//调节y偏移
                        //rotation:25//调节倾斜角度偏移
                     }
                  },
                  series: [{
                    data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4,29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
                  }],
                  legend :{
                       align: 'right',
                    verticalAlign: 'top',
                    x: -10,
                    y: 50,
                    floating: true
                  }
            };
     
            $(document).ready(function(){
                var chart = new Highcharts.Chart(options);        
            });
        </script>
    </head>
     
    <body>
        <div id="container"></div>
    </body>
    </html>
  • 相关阅读:
    创建一个带有Event Receiver的List Definition
    查看安全日志的方式
    SysWOW64是个什么文件夹?
    IIS Log的位置
    IIS的metabase文件的位置
    Server Error in '哪一个' Application, 值得注意哦
    记录一个在SharePoint的代码中提升运行权限的方法
    Rollup and cube
    杀死数据库连接
    VS2005最近项目和最近文件清除
  • 原文地址:https://www.cnblogs.com/nickhan/p/4221777.html
Copyright © 2011-2022 走看看