How to move the labels of CategoryAxis to the middle when setting step

7 posts, 1 answers
  1. kako
    kako avatar
    36 posts
    Member since:
    Mar 2015

    Posted 13 May Link to this post

    Thank you as always!

    Is there a way to move the labels of CategoryAxis to the middle when setting step to CategoryAxis?

    https://dojo.telerik.com/iWeWeDUs

  2. kako
    kako avatar
    36 posts
    Member since:
    Mar 2015

    Posted 13 May Link to this post

    I'm sorry, but please let me edit the image.

    In the last image, I deleted "2011" at the far right, but I will cancel it.

    I also want to move "2011" at the far right and extend plotArea to the right accordingly.

    Is this possible?

  3. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2278 posts

    Posted 16 May Link to this post

    Hello Kako,

    You can set the categoryAxis lables property with a padding:
    labels: {
                          margin: {
                            left: 105,
                          }
                        }

    For your convenience, following is a dojo example with the result that you want to achieve:

    Best Regards,
    Konstantin Dikov
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. kako
    kako avatar
    36 posts
    Member since:
    Mar 2015

    Posted 16 May Link to this post

    Thank you for answering!

    Can I change the area at the top of 2011 to PlotArea?

  5. Answer
    Tsvetina
    Admin
    Tsvetina avatar
    2238 posts

    Posted 18 May Link to this post

    Hi Kako,

    When a margin is used to offset the labels, it is not possible to display more of the Chart content on top of the 2011 label, as the margin just moves the labels position independently from the rest of the Chart content.

    Another way to move the labels to the middle of major units is to set justified: false for the categoryAxis. However, this will also make the series start and end at the middle of major units. Here, you can see the result:
    https://dojo.telerik.com/iWeWeDUs/2

    Regards,
    Tsvetina
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  6. kako
    kako avatar
    36 posts
    Member since:
    Mar 2015

    Posted 24 May Link to this post

    OK.

    Thanks!!

  7. kako
    kako avatar
    36 posts
    Member since:
    Mar 2015

    Posted 24 May Link to this post

    OK.

    Thanks!

Back to Top