Hi to All,
I would like to select/deselect (multiple) displayed points in a BubbleSeries, preferable with Click then Ctrl+Click. I suppose there will be 3 issues to solve:
Q1: How to catch the click then recognize what point is under the cursor? (what point was clicked)
Q2: How to change the point's appearance (say increase radius, by changing the binded data, any better idea?). Btw: Can I change the shape of an individual point, like from circle to square?
Q3: Maintain what is selected. (in a list.) (does any internal implementation for this?)
Thanks in advance
Hi Yanko,
Thanks for your very detailed and clear answer, and especially for the sample.
***
I have an other issue to solve, and your SeriesMouseLeftButtonDown gave me an idea. However I stucked.
I have ScatterLineSeries. I would like to display a tooltip like thing with one value when the user points to the line (_anywhere_). No other visual effect is accepted.
So I thought I will handle the OnSeriesMouseEnter. It works. However the e.Item is empty (correct, I was not pointed on an exact element in the serie, just the line.
Now I must know somehow the X and Y value of the mouse position according this ScatterLineSeries X and Y axes and the current zoom and pan.
Unfortunatelly I can not figure out how to do this. (btw the I would like to display a tooltip like thing where the mouse cursor is, that the next task and I also have no idea, how this can be accomplished.
Could you give me some directions?
Thx in advance
Hello Justin,
I am just checking if you require any further assistance on the matter.
Hi Justin,
Thank you for your post. I have been looking into your requirement and in order to get the clicked underlying data item you could handle the ‘SeriesMouseLeftButtonDown’ event of the XamDataChart like:
private void theChart_SeriesMouseLeftButtonDown(object sender, Infragistics.Controls.Charts.DataChartMouseButtonEventArgs e)
{
BubblePoint dataPoint = e.Item as BubblePoint; // where BubblePoint is the type of your data item
}
In order to notify that some data point is selected I am changing its color.
I am attaching a sample application(DataChartBubbleSeriesSelection.zip) that shows my approach on how to select multiple items when pressing Ctrl key.
Let me know, if you need any further assistance on this matter.