2013-02-08 51 views
1

我使用jqplot在我的jsp page..successfully集成條形圖,折線圖和etc.now我面臨的問題,當我看到這個圖表軸在Chrome中,mozila同一圖表中呈現完美的與Y和X軸標籤的其排列,但是當我在Chrome中看到相同的圖表y軸和x軸的對準和填充看起來很奇怪,很conjusted ...讓我給ü片斷此jqplot呈現不好的鍍鉻?鉻顯示jqplot不當alignement和填充

Mozila瀏覽器顯示這樣

enter image description here

然後爲什麼在這個Chrome瀏覽器中,軸的標籤看起來如此混亂而且非常靠近軸線呢?

enter image description here

所以任何人都可以請指導我怎樣才能消除這種差異在Chrome和mozila瀏覽器,以及如何可以使圖表ATLEAST看起來體面與軸

這裏的正確對準是我試過的代碼

$(document).ready(function(){ 
    var line2 = [['1/1/2008', 3.03], ['2/14/2008', 2.30], ['3/7/2008', 3.12], ['4/22/2008', 1.25]]; 

    var plot1 = $.jqplot('chart7', [line2], { animate: !$.jqplot.use_excanvas, 

      axes:{ 
      xaxis:{ 
       renderer:$.jqplot.DateAxisRenderer, 
       tickOptions:{ 
        pad:2.5, 
        left:10, 
       formatString:'%b ', 
       angle: - 40, 
       fontSize: '7pt' 
       } 
      }, 
      yaxis:{ 
       pad:2.5, 
       tickOptions:{ 
       formatString:'%.2f' 
       } 
      } 
      }, 
      highlighter: { 
      show: true, 
      sizeAdjust: 1.5 
      }, 
      cursor: { 
       style: 'default', 
      show: true, 

      followMouse: true, 
      },grid: {background: 'white'} 
     }); 
    }); 
+0

發佈你試過代碼 – Nandu

+0

請參閱我的更新問題,本 –

回答

1

我設置你的代碼提琴例如:http://jsfiddle.net/WdLnm/330/這對我Chrome瀏覽器看起來不錯。

如果它看起來你也沒關係,你面對你的網站上的CSS問題。

+0

是......它的外觀與年鏈接鉻好......那我該怎麼解決這個問題? –

+0

嘗試簡化(除去非必需品元素)你在哪裏顯示該曲線圖的網頁,刪除所有的CSS樣式,... – sdespont

+0

它不是workig ......嘗試過只放一個圖表必要的JS和CSS它的過去。但仍然沒有變化 –