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

Change the title of an existing chart

1 Answer 858 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Iron
Iron
Andrew asked on 08 Nov 2012, 04:59 AM
I know how you can set the title of a chart when you first create it:

$("#chart").kendoChart({
    title: {
        text: "Players in Error"
    },
   /* etc */


but is there any way to change it afterwards?

I've tried this:

var chart = $("#chart").data("kendoChart");
chart.title = { text: kendo.toString(queryDate, "dddd MMMM d, yyyy") };
chart.refresh();


but it doesn't have any effect.


1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 09 Nov 2012, 10:04 AM
Hello Andrew,

You can change the chart's title through the options
var chart =$('#chart').data('kendoChart');
chart.options.title.text="NewTitle";
chart.refresh();

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