Hi,
I can't get the pan/scroll functionality to work when reloading the chartview.
Please see the code below. When I call the LoadChart function for the first time in form load event, it works fine. When it is called for the second time in button click event, the pan/scroll does not work (zoom works, however). As You can see, I clear the series and axes in the beginning, I tried both axes.clear and axes.purge, neither of them helps.
Regards,
Pirjo
I can't get the pan/scroll functionality to work when reloading the chartview.
Please see the code below. When I call the LoadChart function for the first time in form load event, it works fine. When it is called for the second time in button click event, the pan/scroll does not work (zoom works, however). As You can see, I clear the series and axes in the beginning, I tried both axes.clear and axes.purge, neither of them helps.
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load rcvSchedule.ShowPanZoom = True LoadChart() End Sub Private Sub LoadChart() rcvSchedule.Series.Clear() rcvSchedule.Axes.Purge() rcvSchedule.Area.View.Palette = KnownPalette.Metro Dim horizontalAxis As New CategoricalAxis horizontalAxis.LabelFitMode = Telerik.Charting.AxisLabelFitMode.Rotate Dim bar1DataSource As New List(Of CustomObject)() bar1DataSource.Add(New CustomObject() With {.Value1 = 250, .Category = "19.09.2013"}) bar1DataSource.Add(New CustomObject() With {.Value1 = 200, .Category = "30.09.2013"}) bar1DataSource.Add(New CustomObject() With {.Value1 = 25, .Category = "06.10.2013"}) bar1DataSource.Add(New CustomObject() With {.Value1 = 300, .Category = "17.10.2013"}) bar1DataSource.Add(New CustomObject() With {.Value1 = 300, .Category = "18.10.2013"}) bar1DataSource.Add(New CustomObject() With {.Value1 = 300, .Category = "19.10.2013"}) bar1DataSource.Add(New CustomObject() With {.Value1 = 300, .Category = "20.10.2013"}) bar1DataSource.Add(New CustomObject() With {.Value1 = 300, .Category = "21.10.2013"}) bar1DataSource.Add(New CustomObject() With {.Value1 = 300, .Category = "22.10.2013"}) bar1DataSource.Add(New CustomObject() With {.Value1 = 300, .Category = "23.10.2013"}) bar1DataSource.Add(New CustomObject() With {.Value1 = 300, .Category = "24.10.2013"}) Dim bar1 As New BarSeries() bar1.ValueMember = "Value1" bar1.CategoryMember = "Category" bar1.LegendTitle = "Tot." bar1.DataSource = bar1DataSource bar1.HorizontalAxis = horizontalAxis rcvSchedule.Series.Add(bar1) End Sub Private Sub RadButton1_Click(sender As System.Object, e As System.EventArgs) Handles RadButton1.Click LoadChart() End SubRegards,
Pirjo