Drilldown Pie Chart

Thread is closed for posting
2 posts, 0 answers
  1. Tim Rankel
    Tim Rankel avatar
    7 posts
    Member since:
    Feb 2010

    Posted 07 Jun 2010 Link to this post

    Hi,

    I'm having an issue with the RadChart.Series collection when performing a drilldown operation utilizing the Click event.

    I'm able to perform the operation without any issues if I have drilldown target chart on the webpage (just discretely placed) and just copy its series to the primary chart, however, this seems like cheating.

    My goal is to have pie charts that can drill into more detail per click. They are currently using different SQLDataSources.

    My problem is that when I drilldown to the secondary chart, only the first datarow appears to be populating the chart. The datasource is working correctly as I have another chart setup ( as mentioned above ) to check the results. I believe there is an attribute that I am missing or not overriding correctly and would appreciate any assistance in locating it.

    Attached: (1) Before, (2) After, (3) Target goal. (Had to black out the labels due to privacy)

    Here's the code behind:

    protected void RadChart2_Click(object sender, Telerik.Charting.ChartClickEventArgs args)  
            {  
                          
                if (args.SeriesItem != null)  
                    if (args.SeriesItem.Parent.Name == "a1")  
                    {  
                         
                            //Switch chart to b1  
     
                            RadChart2.Series[0].Clear();  
                            RadChart2.PlotArea.XAxis.DataLabelsColumn = "bX1";  
     
                            RadChart2.Series[0].DataLabelsColumn = "bX1";  
                            RadChart2.Series[0].DataXColumn = "bX1";  
                            RadChart2.Series[0].DataYColumn = "bY1";  
                            RadChart2.PlotArea.XAxis.DataLabelsColumn = "bX1";  
                            RadChart2.Series[0].Name = "b1";  
     
                            RadChart2.ChartTitle.TextBlock.Text = args.SeriesItem.Name  
                                + " b1";  
                            RadChart2.DataSourceID = "datasourceB1";  
     
                    }  
                    else if (args.SeriesItem.Parent.Name == "b1")  
                    {  
                     //Switch chart to a1  
                          
                        RadChart2.Series[0].Clear();  
                        RadChart2.PlotArea.XAxis.DataLabelsColumn = "aX1";  
                          
                        RadChart2.Series[0].DataLabelsColumn = "aX1";  
                        RadChart2.Series[0].DataXColumn = "aX1";  
                        RadChart2.Series[0].DataYColumn = "aY1";  
                        RadChart2.Series[0].DefaultLabelValue = "#Y";  
                        RadChart2.Series[0].Name = "a1";  
     
                          
                        RadChart2.ChartTitle.TextBlock.Text = "a1";  
                        RadChart2.DataSourceID = "datasourceA1";  
                     
                    }  
                   
              
     
            } 
  2. Tim Rankel
    Tim Rankel avatar
    7 posts
    Member since:
    Feb 2010

    Posted 07 Jun 2010 Link to this post

    Disregard - figured it out. Apparently posting an issue on the forum is something I should do after spending twenty minutes looking into an issue, because until then, I'm smacking my head against the wall and then I magically find the solution.

    Issue was that the XAxis items were databound and an error was occuring (yet not being thrown) because the SqlDatasource difference in column names. Strange beans. So I fixed it by doing what I was intending to do after I resolved this issue -- handle the different SqlDataSource tooltips.
Back to Top