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

Issue with the pan/scroll functionality when reloading the chartview

1 Answer 50 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Pirjo
Top achievements
Rank 1
Pirjo asked on 24 Oct 2013, 12:24 PM
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.

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 Sub

Regards,
Pirjo

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 29 Oct 2013, 06:01 AM
Hi Pirjo,

Thank you for contacting us.

We have this issue already logged in our Public Issue Tracking System. You can add your votes/comments or subscribe for changes at the following url - http://www.telerik.com/support/pits.aspx#/details/Issue=16025.

Unfortunately a workaround is not available due to the nature of the issue.

Let me know if you have any further questions.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
ChartView
Asked by
Pirjo
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or