$("#flux_chart_container").highcharts('               

           },

           borderWidth : 1,

           borderRadius : 10,           

           spacingTop : 2,

spacingBottom : 3,

spacingLeft : 1,

spacingRight : 3

},

credits:{

enabled : false

},

title: {

text: title + " 流量明细"

},

legend: {

enabled: true,

layout: 'vertical',

           labelFormatter: function() {

           
if(this.name=='入流量'){

               return
this.name +' 均值:' + Highcharts.numberFormat(datas.avginput,2) + ' kbps
峰值:' + Highcharts.numberFormat(datas.maxinput,2) + ' kbps';

               }else if(this.name=='出流量'){

               return
this.name +' 均值:' + Highcharts.numberFormat(datas.avgoutput,2) + ' kbps
峰值:' + Highcharts.numberFormat(datas.maxoutput,2) + ' kbps';

               }else{

               return this.name;

               }

           }

       },


/*xAxis: {

categories : categories,

labels: {

               step: step,

               staggerLines : 2

           }

},*/

yAxis: [{

title: {

text: "流量(kbps)"

},

tickPixelInterval:20,

offset:90,

labels: {

               formatter: function() {

                   return Highcharts.numberFormat(this.value,2) +' kbps';

               }

           },

min:0

}],

plotOptions : {

series : {

marker: {

                        enabled: false

                        }

}

},

pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +

                '<td style="padding:0"><b>{point.y:.2f} kps</b></td></tr>',

            footerFormat: '</table>',

            shared: true,

            useHTML: true

},

series:[{name:'入流量',tooltip:{valueSuffix:'Kbps'},data : inputs},{name:'出流量',tooltip:{valueSuffix:'Kbps'},data : outputs}]

//,{name:'入端口利用率',yAxis:
1,tooltip:{valueSuffix:'%'},data : intportur},{name:'出端口利用率',yAxis:
1,tooltip:{valueSuffix:'%'},data : outportur}

});

========================================highchart的使用和对比=====================

function initReport(chartId,chartTitle,chartCategories,chartY,chartSeries) {

var chart = new Highcharts.Chart({

chart: {

renderTo: chartId,

zoomType: 'x',

style: {

color: '#000000',

               fontFamily: '楷体'

           }

},

title: {

text: chartTitle,

style: { 

               fontWeight: 'bold'

           }

},

xAxis: {

categories: chartCategories,

labels: {

rotation:340,

y:35,

style: {

                   color: 'black',

                   fontSize: 12,

                   fontFamily: '微软雅黑'

               }

           }

},

yAxis: [{

title: {

text: "流量(kbps)"

},

tickPixelInterval:20,

labels: {//highchart Y 轴保留两位小数点的办法

               formatter: function() {

                   return Highcharts.numberFormat(this.value,2) +' kbps';

               }

           },

min:0

}],

tooltip: {

crosshairs: [{color:'blue',dashStyle: 'dot'},{color:'blue',dashStyle: 'dot'}],

shared: true

},

plotOptions : {

column: {//控制柱状宽度

       pointPadding: 0.2,

       borderWidth: 0,

       pointWidth: 30

   },

series : {

marker: {

                        enabled: false

                        },

cursor: 'pointer',

point : {

events : {

click: function(event) {

queryPortFlux(this.options.portid);

                   }

               }

}

}

},

credits:{

enabled : false

},

series: chartSeries,

navigation: {

           buttonOptions: {

               enabled: false

           }

       
}

       });

reportCharts.push(chart);

}

最新文章

  1. Officel常用操作
  2. log4php的配置
  3. Android USB Host与HID通讯
  4. Linux覆盖率一点研究:获取覆盖率数据
  5. C# WinForm 技巧十: 开发工具
  6. format——MATLAB
  7. UML Distilled - Development Process
  8. MHA工作原理
  9. 【转】字符编码笔记:ASCII,Unicode和UTF-8
  10. UVa 10837 A Research Problem 欧拉函数
  11. Guava API学习之Multimap
  12. Android内存泄漏分析及调试
  13. 代码块(Block)回调一般阐述
  14. Asp.Net MVC 身份验证-Forms
  15. [Swift]LeetCode765. 情侣牵手 | Couples Holding Hands
  16. git tag 查看标签列表、切换标签
  17. 数据结构Java实现02----单向链表的插入和删除
  18. 更新node的版本,node没有安装到c盘,安装到了D盘
  19. Handler实现线程间的通信2
  20. 【libreOJ模板】并查集(输入挂,取模与find优化)

热门文章

  1. 警告 “util.NativeCodeLoader: Unable to load native-hadoop library for your platform”
  2. 【poj1741】 Tree
  3. js 日报 周报 月报 时间扩展 js
  4. SQL Server发布订阅功能研究
  5. SQL Server配置管理器”远程过程调用失败“的问题解决
  6. asp.net项目发布打包研究
  7. VC++ 比较两个字符串是否相等,字母大小写相关。
  8. K米--案例分析
  9. ASP.NET WEB API 测试
  10. 【Alpha阶段】第四次Scrum例会