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

Clone an existing chart

1 Answer 178 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Pablo Andres
Top achievements
Rank 1
Pablo Andres asked on 19 Sep 2013, 03:51 PM
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.

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 20 Sep 2013, 12:53 PM
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!
Tags
Charts
Asked by
Pablo Andres
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or