labelWrap - Enables / Disables Wrapping of Axis X Label - 0 | JSFiddle Sample Code

labelWrap - Enables / Disables Wrapping of Axis X Label - 0 | JSFiddle Sample Code

HTML

<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script>

<div id="chartContainer" style="height: 300px; width: 100%;"></div>
<div style="margin-top:16px;color:dimgrey;font-size:9px;font-family: Verdana, Arial, Helvetica, sans-serif;text-decoration:none;">Source: <a href="https://canvasjs.com/docs/charts/chart-options/axisx/labelwrap/" target="_blank" title="labelWrap - Enables / Disables Wrapping of Axis X Label ">https://canvasjs.com/docs/charts/chart-options/axisx/labelwrap/</a></div>

JavaScript

window.onload = function () {
	var chart = new CanvasJS.Chart("chartContainer", {
		axisX: {
    	labelMaxWidth: 70,
			interval: 1,
			
		},
    axisY: {
    	labelMaxWidth: 80,
    	prefix: "Very very very long label ",
      labelWrap: false
    },
		title: {
			text: "Enabling Label Wrapping"
		},
		data: [
		{
			type: "spline",
			dataPoints: [
				{ y: 71 }, 
				{ y: 55 },
				{ y: 50 }, 
				{ y: 65 }, 
				{ y: 95 }, 
				{ y: 68 }            
			]
		}
		]
	});
	chart.render();
}