2010-09-24 69 views
1

顯示Y軸顯示jqPlot的Y軸在右側,但其只顯示我在左側:上圖的右側jqPlot

$.jqplot.config.enablePlugins = true; 

     var test2 = readXML(posi); 

     plot2 = $.jqplot('chart2', [test2], { 
      series: [{ renderer: $.jqplot.OHLCRenderer, rendererOptions: { candleStick: true, wickColor: '282828', 
       upBodyColor: '00C000', fillUpBody: true, downBodyColor: 'F81700', 
       fillDownBody: true, lineWidth: 1.5, tickLength: true, background: 'C8C8C6', 
       closeColor: '282828', openColor: '282828' 
      } 
      }, { xaxis: 'x2axis', yaxis: 'y2axis'}], 
      axesDefaults: { 
       tickRenderer: $.jqplot.CanvasAxisTickRenderer, 
       tickOptions: { 
        angle: 30 
       } 
      }, 
      axes: { 
       xaxis: { 
        renderer: $.jqplot.CategoryAxisRenderer 
       }, 
       x2axis: { 
        renderer: $.jqplot.CategoryAxisRenderer 
       }, 
       yaxis: { 
        autoscale: true 
       }, 
       y2axis: { 
        autoscale: true 
       } 
      } 
     }); 

請告訴我在哪裏,我在哪裏我的錯誤是。

我已經從參考中得到了上面的代碼:http://www.jqplot.com/tests/canvasAxisTests.php在這個第三個例子顯示的是右側的值。我正在使用jqPlot的燭臺圖表。

謝謝

回答

1

看看jqplot附帶的CSS文件。它定義了jqplot-yaxis的設置,因此您可以使用它來設置所需的位置。