HighCharts终极版本

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了HighCharts终极版本相关的知识,希望对你有一定的参考价值。

    <script type="text/javascript">
    var legendDate="";
    var series="";
    var ser="";
    var legend="";
    var option={};
    function opSeries(){
        option ={
                  title: {
                         text: ‘性能数据采集到入库关键节点处理效率报表‘
                     },
                  xAxis: {  
                      categories: legendDate  
                  },  
                  yAxis: { 
                         title: {
                             text: ‘关键节点处理时间 (分钟)‘
                         } 
                  },
                  tooltip: {
                      enabled: false,
                      formatter: function() {
                          return ‘<b>‘+ this.series.name +‘</b><br/>‘+this.x +‘: ‘+ this.y +‘°C‘;
                      }
                  },
                  plotOptions: {
                      line: {
                          dataLabels: {
                              enabled: true
                          },
                          enableMouseTracking: false
                      }
                  },
                  tooltip: {
                         enabled: false,
                         formatter: function() {
                             return ‘<b>‘+ this.series.name +‘</b><br/>‘+this.x +‘: ‘+ this.y +‘°C‘;
                         } 
                  }, 
                  series: []
          }
    }
    
  $(function () {
      $.ajax({
          type: "post",
          async: false, //同步执行
          url: "",
          dataType: "json", //返回数据形式为json
          success: function (result) {
             
          },
          error: function (errorMsg) {
                 legendDate = ["2014","2015","2016"];
                 series =  [ { "name":"2014", "type":"bar", "data":[51, 2, 43],"len":"中国"} ,{ "name":"2015", "type":"bar", "data":[55, 36, 4] ,"len":"美国"},{ "name":"2016", "type":"bar", "data":[5, 20, 40],"len":"英国"}];
                 ser = [ { "name":"2014", "type":"bar", "data":[51, 2, 43]} ,{ "name":"2015", "type":"bar", "data":[55, 36, 4]},{ "name":"2016", "type":"bar", "data":[5, 20, 40]}];
                 legend = ["中国","美国","德国"];
                 //showChart();
                 opSeries(); 
                 for(i=0;series.length>i;i++){
                         console.log("highchart循环内i的值:"+i);
                         option.series[i]=series[i];
                         console.log("option2.series["+i+"]--------"+"series["+i+"]:"+series[i]);
                 }
          }
      }); 
      

      $("#container").highcharts(option); 
  });
  </script>

 

以上是关于HighCharts终极版本的主要内容,如果未能解决你的问题,请参考以下文章

highcharts中用<%=%>获得一个数组,如何将该数组赋给data呀?????

ng升级两个版本的Highcharts,错误16

权昌TSC条码打印机终极使用教程与开发版本代码大全

如何用highcharts制作3d图

Highcharts版本7.1.1如何使用amd模块离线导出PDF

Highcharts 导出功能