This is a migrated thread and some comments may be shown as answers.

Margins in the legend

7 Answers 381 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 26 Feb 2013, 08:21 PM
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: 

7 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 27 Feb 2013, 08:44 AM
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!
0
Stefania
Top achievements
Rank 1
answered on 06 Nov 2013, 12:13 PM
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
                   }
            }
         }
0
Iliana Dyankova
Telerik team
answered on 07 Nov 2013, 04:07 PM
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!
0
Jonas
Top achievements
Rank 1
answered on 02 Jun 2014, 12:01 PM
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?
0
Iliana Dyankova
Telerik team
answered on 02 Jun 2014, 02:06 PM
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!
 
0
Donald
Top achievements
Rank 1
answered on 02 Jun 2015, 05:48 PM

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

0
Iliana Dyankova
Telerik team
answered on 04 Jun 2015, 12:03 PM

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!
 
Tags
Charts
Asked by
Karl
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Stefania
Top achievements
Rank 1
Jonas
Top achievements
Rank 1
Donald
Top achievements
Rank 1
Share this question
or