maximum: Number/Date/Timestamp

Sets the maximum value permitted on Axis. Values greater than maximum are clipped. maximum also sets the upper limit while panning chart.


Default: Automatically Calculated based on the data
Example: 100, 350..

Notes
  • If maximum value is not set, it is automatically calculated.
  • While setting maximum, it should be taken care that maximum should be greater than minimum.
  • maximum supports dateTime values in the form of Date object or a timeStamp.


var  chart =  new  CanvasJS.Chart("container",
{
 .
 .
 axisX:{
   maximum: 150,
 },
 .
 .
});
chart.render();


Try it Yourself by Editing the Code below.

  Also See:    



If you have any questions, please feel free to ask in our forums.Ask Question

Comments 5

  1. It’s possible display chart with Max and Min, if the max value in data is not near max ?

    Example :

    Min : 0
    Max : 100

    => Data [12, 23, 14, 25, 36]

  2. I am using dynamic data. Is it possible to clear the maximum after it has been set?
    For example, I set the maximum = 200, then after I have 200 data points I want the maximum to be auto calculated.
    How can I do that?

If you have any questions, please feel free to ask in our forums. Ask Question