json

bar chart axis issue


I have made a bar char which have two columns per category. These columns can have positive or negative values. The y-axis values does not seem to be consistent even after setting the number of y-axis values tick. I am quite curious on how that property is being computed


Solution

  • What about something like this:

     "signals": [
        {"name": "a", "update": "pluck(data('parsed'), 'max')"},
        {"name": "b", "update": "length(split(toString(a),'.')[0])"},
        {
          "name": "c",
          "update": "ceil(a/toNumber(pad('1',b,'0')))*toNumber(pad('1',b,'0'))"
        }
      ],
    
    
     "domainMax": {"signal": "c"}
    

    enter image description here