Home Forums Chart Support Can’t adjust scale of Y axis when re-rendering

Can’t adjust scale of Y axis when re-rendering

Viewing 2 posts - 1 through 2 (of 2 total)
  • #31910

    See this at jsfiddle.net/canvasjs/QwZuf

    function ChangeScale() {
    	var iMax = chart.axisY[0].maximum;
      var iMaxNew = iMax * 3;
      var iInterval = chart.axisY[0].interval;
      var iIntervalNew = iInterval * 3;
      
      chart.axisY[0].maximum = iMaxNew;
      chart.axisY[0].interval = iIntervalNew;
    
      chart.render();
      
      alert(iMaxNew + ' is bigger than ' + iMax + ', but the scale did not change.');
    }
    #31917

    @scottpendleton,

    You can update interval & maximum by updating chart options or by using set method. Please take a look at this updated JSFiddle.


    Vishwas R
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.