2013-05-15 164 views
3

我想添加一個多軸yaxis highstock。繪圖工作正常,但軸標籤重疊&整體給它一個笨拙的樣子。這裏是它的快照! Highchart Multi-Y多Y軸重疊的Y軸Highchart

我已使用this example創建多y圖表。

你能幫忙嗎?

這些都是我使用目前

var options = {}; 
options.xAxis = { 
     labels : { 
      enabled : true 
     } 

    }; 
    options.title = { 
     text : "Highchart", 
     style: { 
      fontSize: '14px', 
      fontWeight: '800' 
     } 
    }; 
    options.subtitle = { 
     text : "" 
    }; 
    options.chart = { 

     borderColor : '#BBBBBB', 
     borderWidth : 0, 
     borderRadius : 20, 
     zoomType : 'xy' 
    }; 
// options.yAxis={min:0}; 
    options.yAxis=[{ // Transaction Count_URL 
     labels: { 
      formatter: function() { 
       var value= this.value; 

       if(value>=1000000000) 
        ret = (value/1000000000) + 'G' 
       else if(value>=1000000) 
        ret = (value/1000000) + 'M'; 
       else if(value>=1000) 
        ret = (value/1000) + 'k'; 
       else 
        ret=value; 

       return ret; 
      }, 
      style: { 
       color: '#89A54E' 
      } 
     }, 
     title: { 
      text: 'Memory Used', 
      style: { 
       color: '#89A54E' 
      } 
     }, 
     opposite: true 

    }, { // Transaction count_EXEC 
     gridLineWidth: 0, 
     title: { 
      text: 'GC Count', 
      style: { 
       color: '#4572A7' 
      } 
     }, 
     labels: { 
      formatter: function() { 
       return this.value; 
      }, 
      style: { 
       color: '#4572A7' 
      } 
     } 

    }, { // Tertiary yAxis 
     gridLineWidth: 0, 
     title: { 
      text: 'TPS', 
      style: { 
       color: '#AA4643' 
      } 
     }, 
     labels: { 
      formatter: function() { 
       return this.value; 
      }, 
      style: { 
       color: '#AA4643' 
      } 
     }, 
     opposite: true 
    }], 

    options.navigator= 
    { 
     enabled: false 
    }; 

    options.credits = { 
     enabled : false 
    }; 

    options.xAxis = { 
     type : 'datetime' 
    }; 
    options.series = []; 



    options.rangeSelector = { 
     enabled : false 
    }; 
    options.series=[]; 

    options.tooltip = { 
     shared : false, 
     snap : 0 

    }; 
    options.scrollbar = { 
     enabled : false 
    }; 
    options.navigation = { 
     buttonOptions : { 
      enabled : false 
     } 
    }; 

回答