Hot to update the Title on an existing chart?

3 posts, 0 answers
  1. Joe Sugden
    Joe Sugden avatar
    53 posts
    Member since:
    Feb 2010

    Posted 12 Sep 2012 Link to this post

    var chart = $("#chart").data("kendoChart");
    chart.title.text = "Test";

    Does not do it.
    I get a JS exception:

    Error: TypeError: chart.title is undefined

    Thanks in advance for any help!
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 13 Sep 2012 Link to this post

    Hello Joe,

    You could reach the title via the chart's options. For example: 
    var chart = $("#chart").data("kendoChart");
    chart.options.title.text("Test");

    Please note that in order to get the updated title you need to refresh the chart: 
    chart.refresh()

    I hope this helps. 

    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!
  3. Joe Sugden
    Joe Sugden avatar
    53 posts
    Member since:
    Feb 2010

    Posted 13 Sep 2012 Link to this post

    This worked:

    chart.options.title.text = "Test";
Back to Top