We would like to adapt the xamDataChart control so that the user can highlight regions of the chart. In some kind the function is similar to the zoom / pan function, but instead of panning / zooming the selected region should be shown a little different (e.g. alpha-blended). The function should allow to select a specific region of the X-Axis, Y-Axis selection is not needed so the whole height of the plot can be used.
After looking at the source I think that re-using the zoom / pan thing would not be the best way and instead developing something new here is the better way. My plan is:
Now I have some questions:
Kind regards
cgrill said:How do get access to the PlotAreaBorder from outside. Is the PlotAreaBackgroundContent right?
I'm not sure what you mean by PlotAreaBorder. Do you want to apply a border brush to the PlotArea? If so, yes, you can assign a Border element to the PlotAreaBackgroundContent.
cgrill said:How do I get the dimensions of the plot. Again: Is PlotAreaBackgroundContent right?
If you assign something to the PlotAreaBackgroundContent, its bounds should match up with the dimensions of the plot. Or, you can use the ViewportRect property.
cgrill said:How do I highlight the selected region afterwards. I thought about re-using the info-strips from the samples but these are in the background (meaning that the plot is in front of it). Or would I need to add a custom UI element such as a path which is used for the highlighting?
There are a number of ways to do this, but I would recommend writing a custom series for this purpose.
HI,
I’m just following up on this forum post.
Is there anything further that I can help you with regarding this question?
I understand cgrill question and have a similar requirement to highlight sections of the chart, in fact landed on this post by searching the forum. Is there a way to display something similar to Stripline but on top of section of the chart?
@cgrill,
Did you get around implementing it, how did you get the chart co-ordinates for a particular axis value on the plot and the plot area size?
-Raji
Hi Raji,
Sorry to be so delayed in answering you.
Have you looked at our Feature Browser samples for the XamDataChart in the Editing and Selection section? Please take a look at Category Item Hightlight Layer. Set the Outline to a darker color and change the Thickness to a larger size, then mouse over the chart items and you will see that a hightlighting layer is over top of the item.
Please let me know if this is what you want to do.