Issue with the pan/scroll functionality when reloading the chartview

2 posts, 0 answers
  1. Pirjo
    Pirjo avatar
    10 posts
    Member since:
    Mar 2013

    Posted 24 Oct 2013 Link to this post

    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
  2. George
    Admin
    George avatar
    500 posts

    Posted 29 Oct 2013 Link to this post

    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 >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top