Search code examples
jqueryrgraph

rGraph y label generated wrong when data is 1


gene

id: 'bar_active',
data: [0,1,0,0,0],

I have a bar graph generated using rgraph and passing data into it. My data pass is '[0,1,0,0,0]'. When this graph is generated the Y Label is generated incorrectly. I am expecting to get 1 only in the Y label but im getting dupicate 1 label.

  1. Why is this happening?
  2. How to correct this behaviour?

Solution

  • The Y scale values are being rounded. You can remedy this by setting:

    scaleDecimals: 1
    

    In order to get a decimal place on the Y scale.