hi i have two question
1- how to show multi tooltips in XamDataChart that doesn't cross and over lap together
i attach the picture that i want to make something like this
i use ItemToolTipLayer but all tooltips cross and mix together
2- how to draw spline series in high quality and nice graphics
please help me for solve this problem
Hello Behzad,
Rather than using an ItemTooltipLayer in this case, which will follow the individual items and have an inherent possibility that the tooltips of your series could overlap, I would recommend using a CategoryTooltipLayer instead. This layer will stack all of your series' tooltips inside of a single box that you can align to the top, bottom, or center of the chart. It will track along each category on the X Axis by default, rather than tracking each item's point on the chart's plot area. You can read further about the CategoryTooltipLayer at this article in our online documentation, and I have attached a sample demonstrating how to use this layer.
Regarding your second point, I am rather unsure of what you are asking, but perhaps playing with the Resolution property of each of your XamDataChart series could help you here? Are you seeing blurriness in the SplineSeries that you are plotting in your chart, or the ones that exist in the sample project I have attached? Would it be possible for you to please provide some additional information on the requirement you are looking for here, and how our chart does not satisfy it?
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
thanks for your reply
actually i test CategoryToolTipLayer but this is not satisfy me
i want to show tooltips like picture that i was sent .
for second my question you help me and i change resolution property to shows series in good style.
I am glad that the resolution property was able to help you on your requirement to show the series in the quality that you were looking for.
Regarding the tooltip, in the sample project that I had sent you, I had constructed a rough example with the CategoryTooltipLayer that looks much like the tooltip that exists in your screenshot, in that it follows the X Axis, and lines up multiple pieces of information about all of the series that correspond to each category. Would it be possible for you to please provide some information on how the CategoryTooltipLayer is not along the lines of the functionality that you are looking for with the tooltips on the XamDataChart?
dear andrew
when i use CategoryTooltipLayer this show my tooltips like this picture and stacked all tooltips.
and i try build style for CategoryTooltipLayer.Style and don't acquire good result.
and i know ,you can help me :D
thanks
In order to obtain the "column" result on your CategoryTooltipLayer, I would recommend a couple of approaches. The first is to do something along the lines of what I did in the original sample project that I had sent you, in that you construct a multi-column tooltip for each of your series. Or, perhaps you could do this for just a single series and set the TargetSeries property of the CategoryTooltipLayer. Since you are using a category series here, you can have access to all of your data points from a single series' tooltip, as the Item property of the data context will contain all of the value member properties of the other series as long as the ItemsSource of the series remains the same.
The alternative option is a bit more complex. The "stacked" layout that you are seeing with the CategoryTooltipLayer is internally created, but it can be overridden. To override this behavior, I would recommend that you pull in the default style for the CategoryTooltipLayer, and assign it to your CategoryTooltipLayer. This default style exists in the generic.xaml file commonly found at the following directory:
C:\Program Files (x86)\Infragistics\<your version here>\WPF\DefaultStyles\XamDataChart
After bringing in this style, I would recommend that you hook the Loaded event of the ContentPresenter that exists in that default style, either in a Behavior<ContentPresenter> or through code-behind. This is what shows the tooltip. When the Loaded event fires, I would recommend casting the sender of that event to your ContentPresenter and navigating down its visual tree to find your tooltip content. This structure is rather complex, as there are multiple ContentPresenters and ContentControls that you will need to walk through.
At a point, you will reach the StackPanel that is used for the current, internally created layout of the CategoryTooltipLayer. This StackPanel is what you need to replace, likely with a Grid with multiple columns or something of the like, but first you will need to get your actual tooltip content. Each of the Children in the StackPanel will be a ContentControl whose Content should be a CategoryToolTipItemContext element. The SubContent property of this element will return another ContentControl, whose Content will be your tooltip's content. You can then cache this content, detach it from its current parent, and place it in your multi-column tooltip structure that will replace the built-in StackPanel.
I have attached a sample project to demonstrate this process.
thanks alot Andrew
actually i work on this and your sample help me
when i can show tooltip like that i sent sample to you
have nice year