highcharts

来源:互联网 发布:淘宝卖家评价回复模板 编辑:程序博客网 时间:2024/05/27 10:42



//js代码

$.ajax({
url:"",
data:{},
beforeSend:function(){
showLoading("#container9");
},
success:function(resString){
//var datas=eval("("+resString+")");
$(function () {                                                               
   $('#container9').highcharts({                                          
       chart: { 
        width:950,
           height:220,
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
       },                                                                
       title: {                                                          
           text: ''                                     
       }, 
       yAxis: [{
title: {
text: '融资性担保余额',
style: {
color: '#4572A7'
}
},
labels: {
formatter: function() {
return this.value +' 万元';
},
style: {
color: '#4572A7'
}
}


}],
       xAxis: {                                                          
           categories: ['2015年3月', '2015年4月', '2015年5月', '2015年6月', '2015年7月','2015年8月', '2015年9月', '2015年10月', '2015年11月', '2015年12月', '2016年1月', '2016年2月']
       },                                                                
       tooltip: {                                                        
           formatter: function() {                                       
               var s;                                                    
               if (this.point.name) { // the pie chart                   
                   s = ''+                                               
                       this.point.name +': '+ this.y +' fruits';         
               } else {                                                  
                   s = ''+                                               
                       this.x  +': '+ this.y;                            
               }                                                         
               return s;                                                 
           }                                                             
       },                                                                
       series: [{                                                        
           type: 'column',                                               
           name: '金额',                                                 
           data: [100,106,111,121,121,123,128,133,134,135,144,150]                                         
       }, {                                                              
           type: 'spline',                                               
           name: '增长率',                                              
           data: [12.7,15.9,14,14.5,15,17.4,16.4,13.8,15.6,14.6,12.3,14.9],                               
           marker: {                                                     
            lineWidth: 2,                                               
            lineColor: Highcharts.getOptions().colors[3],               
            fillColor: 'white'                                          
           }                                                             
       }]                                                                
   });                                                                   
});                       
}
});

//jsp代码

<div class="fenbu_ul_img">
<div id="container9" ></div>
</div>

0 0
原创粉丝点击