Question

I would like to display exchange rates via morris.js Chart. How can i change or set the resolution/precision of y-axis, i have to do this because now i can't see the rate change of any currency.I only see a horizontal line.

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

Difference is very small between rates, because of it i can see only a horizontal line.

 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
        });
 }

I attached a picture. enter image description here

Was it helpful?

Solution

Just try to change ymin values: ymin : 400 & ymax : 5001

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top