Hi Freddie. I'm thinking how to work around several issues. I've attached a png picture of a couple of controls containing radcharts. The left chart shows a pie with the pink slice selected. Clicking that slice selects or unselects it. I catch the click event in a chart area click handler. When you act on the left hand chart, the right hand chart changes may filter itself based on your selection. The rad expanders that you see (center right in each chart) let you drill in N levels deep based on various fields in an underlying radgrid (not shown).
Each control knows who its parent is and who its child is. When constructed, the control needs to know what its parent has selected, if anything.
Issue 1: There isn't a way to ask the radchart what is selected, so I have to implement that logic myself in my control by saving the information about the clicked datapoint when the chart area click handler runs.
void ChartArea_ItemClick(object sender, Telerik.Windows.Controls.Charting.ChartItemClickEventArgs e)
DataPoint dp = e.DataPoint;
if (dp.DataItem.ToString() == "All Others")
MessageBox.Show("Can't drill into All Others.");
selectedSlice = dp.DataItem.ToString();
if (selectedSlice == lastSelectedSlice)
// simulate unselect
selectedSlice = "";
// but if we actually selected something different then zap all child drill down selects
lastSelectedSlice = selectedSlice;
if (childChart != null)
Issue 2: If the user clicks on a legend item, the appropriate slice is selected or unselected and the visuals change, but there is no event that I can catch to notify me to redraw the charts. This causes the logic to become out of sync with the visuals.
Notice the checkboxes labeled "Bar" in the picture ? Clicking those changes the charts from pie charts to bar charts. If a user changes the chart type then the Bar checkbox handler has to ensure that whatever was selected in the pie ends up selected when the bar chart displays.
Issue 3: There isn't a way to tell the radchart what to select and I have no idea how to handle this.
So, if I were requesting new features I guess I would ask for:
1) A click event on legend item clicks
2) A way to ask the chart what is selected
3) A way to tell the chart what to select
Thanks Freddie ...