Margins in the legend

8 posts, 0 answers
  1. Karl
    Karl avatar
    15 posts
    Member since:
    Dec 2012

    Posted 26 Feb 2013 Link to this post

    I'm trying to prevent my legend from being too wide, I don't see a width property so I'm trying to set its padding or margin on the right. Unfortunately, I'm not having any luck. Is there any reason why what I'm trying to accomplish wouldn't work or is there a better way? Please see my settings attached: 
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 27 Feb 2013 Link to this post

    Hi Karl,

    You are right - there is no width property for the legend in Kendo UI Chart. In order to reduce the legend's width I recommend you setting a smaller font size. For example: 
    $("#chart").kendoChart({
      //....
       legend: {
          //...
          labels: {
              font: "10px Arial,Helvetica,sans-serif"
          }
       }
    });
    I hope this will fit your requirements. 

    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Stefania
    Stefania avatar
    5 posts
    Member since:
    Oct 2013

    Posted 06 Nov 2013 Link to this post

    Documentation describes legend.labels.margin properties, but nothing happens when I try to use them. For example:

    legend: {
                        position: "bottom",
                        offsetY : 10,
                        labels: {
                                      margin: 300,
                        }
                    }


    and also:

    legend: {
               labels: {
                       margin: {
                              left: 20
                       }
                }
             }
  4. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 07 Nov 2013 Link to this post

    Hello Stefania,

    This is a known issue, however we will do our best to address it as soon as possible. Please excuse us for the inconvenience caused.
     

    Regards,
    Iliana Nikolova
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Jonas
    Jonas avatar
    2 posts
    Member since:
    May 2014

    Posted 02 Jun 2014 in reply to Iliana Nikolova Link to this post

    Hello Iliana,

    is there any news about the legend.labels.margin property? Or is there another way to get some free space between the labels?
  6. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 02 Jun 2014 Link to this post

    Hi Jonas,

    I am afraid the discussed issue still persists and there is no a suitable workaround I can suggest. Once again I apologize for the inconvenience caused.

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  7. Donald
    Donald avatar
    8 posts
    Member since:
    Aug 2014

    Posted 02 Jun 2015 Link to this post

    Has this issue been resolved? I am having issues as well when placing the legend at the top or bottom...

  8. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 04 Jun 2015 Link to this post

    Hi Donald,

    The legend.labels margin / padding issue has been resolved and now both are working as expected (dojo). Also there is a legend.width option which can be used when the legend.orientation is set to "horizontal".

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top