码迷,mamicode.com
首页 > 其他好文 > 详细

highcharts 折线图

时间:2014-05-19 21:06:13      阅读:306      评论:0      收藏:0      [点我收藏+]

标签:style   blog   class   c   code   java   

bubuko.com,布布扣
<!doctype html> 
<html lang="en"> 
    <head> 
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
        <script type="text/javascript" src="js/highcharts.js"></script>
        <script type="text/javascript" src="js/exporting.js"></script> 
        <script>
            $(function () {
    $(#container).highcharts({
        chart:{
            type:line
        },
    
        xAxis: {
            categories: [Jan, Feb, Mar, Apr, May, Jun]
        },
        yAxis: {
            title: {
                text: Temperature (°C)
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: #808080
            }]
        },
        tooltip: {
            formatter:function(){
                return <b>+this.x + </b><br/> + this.series.name + : + this.y + <br/> + Total: + this.point.stackTotal;
            },
            valueSuffix: °C
        },
         plotOptions: { 
             column: { pointPadding: 0.2, borderWidth: 0 }
         },
        legend: {
            layout: vertical,
            align: right,
            verticalAlign: middle,
            borderWidth: 0
        },
        series: [{
            name: Tokyo,
            data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5]
        }, {
            name: New York,
            data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0]
        }, {
            name: Berlin,
            data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0]
        }]
    });
});
                
        </script> 
    </head>
    <body> 
        <div id="container" style="min-width:700px;height:400px"></div> 
    </body>
</html>
bubuko.com,布布扣

bubuko.com,布布扣

highcharts 折线图,布布扣,bubuko.com

highcharts 折线图

标签:style   blog   class   c   code   java   

原文地址:http://www.cnblogs.com/xiaoxian1369/p/3731622.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!