labelAngle: Number

Sets the angle for Axis Labels.


Default: null
Example: 20, 45, -30 ..

Notes
  • Units in degrees
  • Values can be positive or negative


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


Try it Yourself by Editing the Code below.

  Also See:    



In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.

Comments 12

  1. Hi , i am very thankfull to you. it is very nice and unlimited editing .Once again i thankyou from the bottom of my heart. GoodLuck.

  2. With longer labels and more columns, it skip labels, even when labelAngle is 90 and there is no possibility of overlaps.
    Is there any way to display all labels (on x axis)?

  3. All the label options are nice, but it would be great if we had one to overlay the label on the column. I am mainly thinking of this feature for cases where the bars are running horizontally but it could be useful in some cases where the bars are running vertically too. Thanks for you work on Canvas.JS – it’s a great tool.

      • Thank you Vishwas. However I’m not sure this has the functionality I’m looking for, or maybe I have done something wrong. I am using a stacked bar chart. When I try this I am getting a numeric value for my label, instead of the actual label. So instead of seeing labels such as “milk”, “juice”, “water”, I’m seeing 0, 1, 2.

        I’m not sure if this is the intended behavior? Seems like a label *index* instead of the actual label. If I switch the parameter from {x} to {y} then the data value is shown instead.

      • Disregard my previous comment, I missed the {label} keyword.

        Is it possible to justify the placement of the index label? It is currently centered, I would like to left justify it if possible.

In order to provide better support,we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.