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

RadCharts are not updating with new series

2 Answers 152 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Marco
Top achievements
Rank 1
Marco asked on 14 Aug 2008, 03:02 PM
Hi

I saw this issue before but I didn't see any answer that worked for my situation.
The basic issue is i have a radchart within an ajax updatepanel (i have also tried just having it on the page itself) and i want to update the series and refresh the chart but every time i try it just puts reloads with the old series data.

Here are some snipit from the code:

  
            Service_Desk_SQL data; 
            RadChart RadChart1; 
            ChartSeries empData; 
            ChartSeries stackEmpData; 
 
            stackEmpData = new ChartSeries(); 
            data = new Service_Desk_SQL(); 
            empData = new ChartSeries(); 
            RadChart1 = new RadChart(); 
             
            RadChart1.ChartTitle.TextBlock.Text = "Time Breakdown by Employee"
            RadChart1.PlotArea.XAxis.Appearance.LabelAppearance.Visible = false
            RadChart1.RemoveAllSeries(); 
            RadChart1.Width = 800
            RadChart1.Height = 800
            RadChart1.SeriesOrientation = ChartSeriesOrientation.Horizontal;

... GET DATA ...
            RadChart1.RemoveAllSeries(); 
             
            RadChart1.AddChartSeries(empData); 
            if (styleDropDown.SelectedValue.ToString().ToLower() == "stacked %"
                RadChart1.AddChartSeries(stackEmpData); 
            UpdatePanel1.ContentTemplateContainer.Controls.Add(RadChart1); 

Now I'm not positive if I'm not adding the chart back properly or if I shouldn't be adding it this way at all.  But if anyone knows anything that might help me out that would be great.  If you need any more information please ask and i'll try and give you what you need.

2 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 15 Aug 2008, 06:20 AM
Hi Marco,

Can you please open a formal support ticket and attach a small runnable page which reproduces the issue. You can replace your datasource with a dummy one just for demo purpose. Once we review it locally, we will provide further assistance.

Looking forward to hearing from you,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Marco
Top achievements
Rank 1
answered on 15 Aug 2008, 12:21 PM
Hi,

I actually figured out how to get it to work properly.  Instead of having the chart created in a function, I added it in the designer.  Then I just did all the formatting and data binding in the code.

Thanks for the reply!
Tags
Chart (Obsolete)
Asked by
Marco
Top achievements
Rank 1
Answers by
Ves
Telerik team
Marco
Top achievements
Rank 1
Share this question
or