2014-05-03 52 views
0

我想通過morris.js Chart顯示匯率。 如何更改或設置Y軸的分辨率/精度,我必須這樣做,因爲現在我看不到任何貨幣的利率變化。我只看到一條水平線。如何設置Morris Chart y軸分辨率

Example : EUR->USD timestamp1 1.321 
        timestamp2 1.341 
        timestamp3 1.301 

利率差異很小,因爲它只能看到水平線。

function drawChart() 
{ 
    $('#chart_container').empty(); 
     new Morris.Line({ 
      element: 'chart_container', 
      data: data, 
      xkey: 'time', 
      ykeys: ['rate'], 
      gridIntegers: true, 
      labels: ['Value'], 
      ymin: 0, 
      yLabelMargin: 10 
     }); 
} 

我附上了一張照片。 enter image description here

回答

0

只是試圖改變YMIN值:ymin : 400 & ymax : 5001

+0

謝謝你,它的工作原理。 :) –