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

Display chartimage in 2 places

4 Answers 59 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
XXXX
Top achievements
Rank 1
XXXX asked on 03 May 2010, 02:03 PM
I have a RadChart on a webpage.
I want to display the same chart (image) in a RadWindow (popup).
Is that possible without having to create a second RadChart control ?

Yours
  Bjössi

4 Answers, 1 is accepted

Sort by
0
XXXX
Top achievements
Rank 1
answered on 04 May 2010, 12:10 AM
I found a solution that may not be perfect.
                    var img = document.getElementById("<%=RadChart1.ClientID %>").getElementsByTagName("img")[0];  
                    window.radopen("editProposal.aspx?ChartImage="+ encodeURIComponent(imgUrl) , "RadWindowEditProposal");  
                    return false;  
                 

Yours,
    B
0
XXXX
Top achievements
Rank 1
answered on 18 May 2010, 11:17 AM
It looks like that I'm the only one that is interested in this :-).

My previous work-around has serious limitation.
The scenario :
    A RadChart that displays detail info for the selected record in a RadGrid. The chart is updated on "onselectedindexchanged" in the grid. The record is edited in a RadWindow.  There it is helpful for the user to see the chart-image.
However the chart hasn't always finished the refresh before the RadWindow opens and the previous chart-image is shown in the RadWindow.
And before anyone points out that this can be prevented by edit button outside the grid so the user has to select before opening.
That approach doesn't go well with our design.

Thanks to everyone that has taken the time to read this.
Yours
   Bjössi
PS: I ended up putting second RadChart on the RadWindow, impact was less than expected.
0
Accepted
Ves
Telerik team
answered on 20 May 2010, 12:43 PM
Hello Bjössi,

An alternative approach would be to use the RadChart.Save method to save the chart to an image or a stream and use it as per your requirements. Yes, you can also use a second RadChart, in this case you may consider disabling its ViewState to improve the performance.

Best regards,
Ves
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
XXXX
Top achievements
Rank 1
answered on 20 May 2010, 03:49 PM
Thanks for the input.
   The .Save method is a better and more elegant solution than my first workaround.
But it would still require some logic to ensure that the onselectedindexchanged server event has completed before the RadWindow is opened.

Thanks for the ViewState observation I hadn't thought about that but will check it out.

Yours
   Bjössi
Tags
Chart (Obsolete)
Asked by
XXXX
Top achievements
Rank 1
Answers by
XXXX
Top achievements
Rank 1
Ves
Telerik team
Share this question
or