CreateSeries not working Properly

Thread is closed for posting
2 posts, 0 answers
  1. henzard
    henzard avatar
    5 posts
    Member since:
    Dec 2009

    Posted 28 Jun 2012 Link to this post

    The Xaxis does not show the correct labels and all the september's are not grouped together 

    What am i doing wrong

    Dim oldsubcategory_id As String = "ZZ"
            Dim subcategory_id As String
            Dim currentSeries As ChartSeries = Nothing
            If (ShowList().Count > 0) Then
                For Each DataRow In GuiDataSource().Rows
                    subcategory_id = DataRow("ACCOUNTNUM")
                    If subcategory_id <> oldsubcategory_id Then
                        currentSeries = BarChartForAcc.CreateSeries(DataRow("ACCOUNTNUM"), Color.Empty, Color.Empty, ChartSeriesType.Bar)
                        currentSeries.Appearance.Border.Color = Color.Black

                        currentSeries.Appearance.ShowLabels = False
                        oldsubcategory_id = subcategory_id
                    End If
                    If Not (currentSeries Is Nothing) Then
                        currentSeries.AddItem(DataRow("AMOUNTCUR"), DataRow("TRANSDATE"))
                    End If
            End If
            BarChartForAcc.ChartTitle.TextBlock.Text = "By Month For " & TheYear.ToString
  2. Peshito
    Peshito avatar
    524 posts

    Posted 03 Jul 2012 Link to this post

    Hi Henzard,

    I have replied to your question in the other support thread you have started. I would suggest to keep the conversation in a single thread so it is easier for both sides to follow.

    As I explained there the reason of this behavior is caused of not firing the ItemDataBound event. In order to fire it you need to attach the chart to a DataSource.

    All the best,
    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.
Back to Top