Home Forums Chart Support Why same label on chart not display label on x axis

Why same label on chart not display label on x axis

Viewing 3 posts - 1 through 3 (of 3 total)
  • #23332
    <!DOCTYPE HTML>
    <html>
    <head>
    	<script type="text/javascript">
    	window.onload = function () {
    		var chart = new CanvasJS.Chart("chartContainer", {
    			title: {
    				text: "Understanding Labels"
    			},
    			axisY: {
    				labelFontSize: 20,
    				labelFontColor: "dimGrey"
    			},
    			axisX: {
    				labelAngle: -30
    			},
    			data: [
    			{
    				type: "column",
    				dataPoints: [
    				{ y: 10, label: "Apples" },
    				{ y: 15, label: "Mangos" },
    				{ y: 25, label: "Oranges" },
    				{ y: 30, label: "Grapes" },
                      { y: 10, label: "Apples" },
    				{ y: 15, label: "Mangos" },
    				{ y: 25, label: "Oranges" },
    				{ y: 30, label: "Grapes" },
                      { y: 10, label: "Apples" },
    				{ y: 15, label: "Mangos" },
    				{ y: 25, label: "Oranges" },
    				{ y: 30, label: "Grapes" },
    				{ y: 28, label: "Bananas" }
    				]
    			}
    			]
    		});
    
    	chart.render();
    	}
    	</script>
    	<script type="text/javascript" src="https://cdn.canvasjs.com/canvasjs.min.js"></script>
    </head>
    <body>
    	<div id="chartContainer" style="height: 300px; width: 100%;">
    	</div>
    </body>
    </html>
    #23338

    @triiglobal,

    Setting interval: 1 in axisX will show all labels.

    If this doesn’t solve your requirement, kindly brief us further about it and share a JSFiddle reproducing the issue you are facing(if any) so that we can understand your requirement better and help you out.

    __
    Priyanka M S
    Team CanvasJS

    #23418

    thanks is work.

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

You must be logged in to reply to this topic.