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

[Solved] Setting chart title font

1 Answer 79 Views
Chart for HTML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Scott
Top achievements
Rank 1
Scott asked on 14 Jan 2013, 06:27 PM
How would I set the chart title font (either declaratively in HTML or programmatically) of a RadChart? I have had success setting other properties of the chart title, such as the alignment and color as such:
var chart = document.getElementById("chartContainer").winControl;
chart.title.text = "Positions by Department";
chart.title.color = "black";
chart.title.align = "left";

but when I try to set the chart title font as follows, it simply ignores the request:
chart.title.font = "Times New Roman";

What is the proper way to set the chart title font?

1 Answer, 1 is accepted

Sort by
0
Scott
Top achievements
Rank 1
answered on 14 Jan 2013, 07:47 PM
I figured it out...it seems that you must specify the font size in addition to the font name, as you would in a CSS font definition, as such:
chart.title.font = "48px Times New Roman";
Tags
Chart for HTML
Asked by
Scott
Top achievements
Rank 1
Answers by
Scott
Top achievements
Rank 1
Share this question
or