We want the Kendo chart widget (RadHtmlChart actually) to blend in with the webpage we use it in. In this page, we use font-weight 300. Since there is no way to specify the font-weight in the chart, we have had to use a hack to specify it:
function chartLoad(chart, args) {
chart.get_kendoWidget().setOptions({ title: { font: "20px sans-serif; font-weight: 300" }});
}
This is not only a clumpsy hack, but it also make use of a custom skin impossible (for setting the font).
Hi Fredrik,
Thanks a lot for your feature suggestion. We have transferred it to the RadHtmlChart backlog, so you can track its progress here:
https://feedback.telerik.com/aspnet-ajax/1443767
For the time being, the HtmlChart's title weight can be set either through its udnerlying Kendo UI widget (like found by you), or through the ChartTitle.Appearance.TextStyle.Bold property (accepting only Boolean values):
<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Width="700" Height="480px">
<ChartTitle Text="Some Title">
<Appearance>
<TextStyle Bold="true" />
</Appearance>
</ChartTitle>
</telerik:RadHtmlChart>
Regards,
Vessy
Progress Telerik
Thanks, I wasn't aware of that.
For the RadHtmlChart, though, it still would have to meant that we would have to use JavaScript, since there is no way to specify the font CSS string using the API, i.e. the by configuring the TextStyle class.
So, please provide FontWeight as a parameter to the TextStyle class.
Hi, Fredrik,
The font property accepts the font weight, however, you should add it before the size following the standard font syntax:
https://docs.telerik.com/kendo-ui/api/javascript/drawing/text/configuration/font
title: {
text: "Title",
font: "300 20px sans-serif"
},
// or
title: {
text: "Title",
font: "bold 20px sans-serif"
},
Kind
Regards,
Alex Hajigeorgieva
Progress Telerik