You must be logged in to post your query.
Home › Forums › Chart Support › y-Axis Scaling
Tagged: scaling
Hi all,
I have a simple problem.. but I really getting it not solved. I try to define my y-Axis range (max:100, min: 50) and tried to follow the documentation. However, scaling does not react at all. My code is the following:
window.chart1 = new CanvasJS.Chart("chart1ContainerDisk", { animationEnabled: true, theme: "light2", title: { text: title, fontSize: 14 }, axisX: { title: xtitle, titleFontSize: 13, includeZero: false }, axisY: { title: ytitle, titleFontSize: 13, includeZero: false }, data: [{ type: "line", indexLabelFontSize: 12, dataPoints: arr_Datapoints }], options: { scales: { yAxes: [{ ticks: { min: 50, max: 100 } }] } } }); window.chart1.render();
Can someone tell me what is wrong with that code? Thank in advance, Cheers J
@tschounes,
It seems you are not using valid chart options to set the axis range. You can set the range of axisY by setting minimum and maximum properties, please refer documentation for live examples & more customizations available.
— Vishwas R Team CanvasJS
Thanks, that worked. Is there something like the “suggestedmin” function: when datapoints are between the min-max values the max and min values are taken, if there outside the larger value is used.
Thanks for your support!
Is there something like the “suggestedmin” function: when datapoints are between the min-max values the max and min values are taken, if there outside the larger value is used.
Sorry, we don’t have such option as of now.
You must be logged in to reply to this topic. Login/Register