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

Controlling Chart Legend Font

2 Answers 466 Views
Charts
This is a migrated thread and some comments may be shown as answers.
sara
Top achievements
Rank 1
sara asked on 20 Mar 2012, 05:15 PM
I am attempting to change the font size of the legend using the following:
legend: {
    visible: true,
    position: "top",
    margin: 5,
    padding: 2,
    font: "8px Arial"
}

According to your demos: http://demos.kendoui.com/dataviz/bar-charts/index.html
Under Configuration > legend it shows a font property as a string, as I did above.  However, when I do this, the font size does not change (additionally, I am unable to change the font family).  I noticed in one of the forum posts that someone did:
legend: {
    visible: true,
    position: "top",
    margin: 5,
    padding: 2,
    labels: {
        font: "10px Verdana"
    }
}

This seems to work much better.  Is this a typo or an undocumented API change?

Thanks,
Sara

2 Answers, 1 is accepted

Sort by
0
Accepted
Iliana Nikolova
Telerik team
answered on 22 Mar 2012, 09:47 AM
Hello Sara,

Thank you for the feedback. Actually, we have missed to add  this in our documentation, but we will amend it.

I have also updated your telerik points as token of gratitude.  


 All the best,

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
TISAL
Top achievements
Rank 1
answered on 04 Jun 2015, 08:49 PM
In MVC mode, I use:

.Legend(legend => legend
  .Position(ChartLegendPosition.Bottom).Labels(x => x.Font(font: "9px Arial,Helvetica,sans-serif"))
)
Tags
Charts
Asked by
sara
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
TISAL
Top achievements
Rank 1
Share this question
or