2014-02-27 35 views
0

当我将它设置为放大xy时,HighCharts出现问题。它可以很好地放大,但其余的轴重置,但绘图区域保持不变。有时需要2或3分钟才能中断,但一旦中断,它就会中断。我的代码如下:HighCharts休息缩放在​​xy上失败

$(function() { 


     $('#container').highcharts({ 
      chart: { 
       plotBorderWidth: 1, 
       spacingTop: 0, 
       spacingBottom: 0, 
       marginRight: 15, 
       zoomType: 'xy' 
      }, 
      credits: { 
       enabled: false 
      }, 
      title: "Test", 
      xAxis: { 
       title: { 
        text: "Year" 
       }, 
       allowDecimals: false 
      }, 
      yAxis: { 
       title: { 
        text: '' 
       }, 
       plotLines: [{ 
        value: 0, 
        width: 1, 
        color: '#808080' 
       }], 
       labels: { 
        format: '${value:,.0f}', 
        minPadding: 1000 
       } 
      }, 
      tooltip: { 
       useHTML: true, 
       headerFormat: '<bold>{series.name}</bold><table>', 
       pointFormat: '<tr><td style="color:#000000">Year {point.x} : ${point.y:,.0f}</td></tr>', 
       footerFormat: '</table>' 
      }, 

      series: [ 
        { data: [[1, 805.593193551804], [2, 805.593193551804], [3, 805.593193551804], [4, 805.593193551804], [5, 805.593193551804], [6, 805.593193551804], [7, 805.593193551804], [8, 805.593193551804], [9, 805.593193551804], [10, 805.593193551804], [11, 805.593193551804], [12, 805.593193551804]], name: 'Before', color: '#EDF2DB', type: 'area' }, 
        { data: [[1, 805.593193551804], [2, 805.593193551804], [3, 805.593193551804], [4, 805.593193551804], [5, 805.593193551804], [6, 805.593193551804], [7, 805.593193551804], [8, 805.593193551804], [9, 805.593193551804], [10, 805.593193551804], [11, 836.4400689934657], [12, 867.8232333655329]], name: 'After', color: '#FF6600', type: 'column' } 
      ] 
     }); 
    }); 

回答

0

这是暂时的问题,但在最新的主分支它是固定的。

见例如:http://jsfiddle.net/fZBjS/

<script src="http://github.highcharts.com/master/highcharts.js"></script>