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

RadChart axis and ChartSeries don't update when resubmitting form

1 Answer 61 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 11 Sep 2012, 07:51 PM
I'm creating my RadChart progrmatically on postback and making a curve like this,

Dim radChart As New Telerik.Web.UI.RadChart()
  
Dim chartSeries2 As New Telerik.Charting.ChartSeries()
chartSeries2.Type = Telerik.Charting.ChartSeriesType.Line
chartSeries2.Appearance.LabelAppearance.Visible = False
chartSeries2.Appearance.LineSeriesAppearance.Color = System.Drawing.ColorTranslator.FromHtml("#123252")
  
Dim csItem As New Telerik.Charting.ChartSeriesItem
Dim csItems As New Telerik.Charting.ChartSeriesItemsCollection
  
For i = 5 To 1000
    csItem = New Telerik.Charting.ChartSeriesItem
    csItem.XValue = i
  
    'lcyNet(i) is calculated each time based on form input values
    csItem.YValue = lcYNet(i)                      
  
    csItems.Add(csItem)
Next i
  
chartSeries2.AddItem(csItems)
radChart.Series.Add(chartSeries2)


This works perfectly first time, the problem occurs when I change values and resubmit the form. The axis and curve don't update, even though my values and the ChartSeriesItem YValues definitely do.

I tried adding the current time to the end of the ChartTitle text and that updates OK every time.

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 14 Sep 2012, 10:19 AM
Hello Simon,

I tried to reproduce a scenario like yours but with no avail. Please find attached a sample demonstrating an update of a series item and its properly update when the value is changed runtime.

Hope this helps.

Kind regards,
Peshito
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Chart (Obsolete)
Asked by
Simon
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or