Clone an existing chart

2 posts, 0 answers
  1. Pablo Andres
    Pablo Andres avatar
    3 posts
    Member since:
    May 2013

    Posted 19 Sep 2013 Link to this post

    Hi to all,

    I need to clone an existing chart in another part of the dom in the same page, I was doing it by copying  the options using the following:

    var _options  =  jQuery.extend(true, {}, myExistingChart.options);

    $("#myNewChart").kendoChart(_options);

    This worked pretty fine with the 2013 . 1514 version of kendo ui, but when I updated to the last version it just doesnt work longer.

    Anyway, my case is the following, I have a chart, I need to create a new chart on the same page using the same information that is actually showing
    the existing chart. What would be the best way to do this??


    Thanks a lot.

    Pablo.
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1444 posts

    Posted 20 Sep 2013 Link to this post

    Hi Pablo,

    You can initialize the second Chart by using the first one's options, as shown in this example.
     

    Regards,
    Alexander Popov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top