2013-04-30 85 views
0

有無論如何設置Y軸上的最小刻度嗎?我曾經嘗試這樣做:顯示Y軸上的最小刻度JQPlot

plot1 = $.jqplot('graphCanvas', [<?php echo $line1; ?>], { 
       animate: true, 
       series:[{renderer:$.jqplot.BarRenderer}], 
       axesDefaults: { 
        tickRenderer: $.jqplot.CanvasAxisTickRenderer , 
        tickOptions: { 
         angle: -30, 
         fontSize: '10pt' 
        }, 
        showMinorTicks:true 
       }, 
       axes: { 
        xaxis: { 
         renderer: $.jqplot.CategoryAxisRenderer, 
        }, 
        yaxis:{ 

        } 
       } 
      }); 

即使我showMinor蜱設置爲true,Y軸總是顯示3次,例如最大的價值:如果12是我最大的價值最大的厚爲36,我怎麼能限制它由14或12?

回答

0

在y軸的選擇,我們可以設置

yaxis : { 
     min : 0, 
     tickInterval : 1     
     } 

yaxis : { 
     min : 0, 
     tickInterval : 1, 
      max:14    
     } 

Example