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:
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"; |
} |
} |