How to show a tooltip when hoverign over a chart point with point data information

I need to create e polar chart showing markers for every series of data. Each series has only one point and I need to show a tooltip like this:

tooltip.png

I've modified the Polar Chart example in Essential Studio to create the chart like the one I need but I'm not able to show the tooltip. Seems ToolTip are meant to show only over a chart segment and not a data point.

The chart I've created is this:

polar.png

Hovering on markers (or selecting a data point )  I need to show the tooltip. I've tried with this data template used as ToolTipTemplate for each PolarSeries but is not showing:


        <DataTemplate x:Key="ChartTooltipTemplate">

            <Border BorderThickness="1" BorderBrush="Black" Background="LightBlue" CornerRadius="3">

                <StackPanel Margin="3">

                    <StackPanel Orientation="Horizontal">

                        <TextBlock Text="XValue : " FontSize="14" FontWeight="Bold"/>

                        <TextBlock Text="{Binding Item.Direction}" FontSize="14" />

                    </StackPanel>

                    <StackPanel Orientation="Horizontal">

                        <TextBlock Text="YValue : " FontSize="14" FontWeight="Bold"/>

                        <TextBlock Text="{Binding Item.Value}" FontSize="14" />

                    </StackPanel>

                </StackPanel>

            </Border>

        </DataTemplate>


Thanks


Fabrizio


4 Replies

YP Yuvaraj Palanisamy Syncfusion Team August 2, 2021 02:19 PM UTC

Hi Fabrizio Frigerio, 
 
Greetings from Syncfusion. 
 
Currently we didn’t have tooltip support for polar series. Hence, we have achieved your requirement “Show tooltip for Polar series along with tooltip template for single series” by workaround. Please find the workaround sample from the below link. 
 
 
And currently we are working with multiple series  and we will provide the workaround sample with multiple series on or before 4th August 2021.  
 
Output: 
 
 
Regards, 
Yuvaraj. 



FF Fabrizio Frigerio August 4, 2021 07:20 AM UTC

Hi Yuvaraj,

I've worked on your example integrating my mockup with more series and trying to adapt the code. I've come up with something that is working, there still is some issues with the nearest point but it's working.

The chart.PointToValue(chart.SecondaryAxis, p) to get the Y of the mouse point is getting lower values so I've added a 15% to get an approximate value close enough.

Also your FindNearestChartPoint seem to work only on X values to find the nearest not considering the Y value, I've tried to calculate the points distance to the mouse location to evaluate the nearest and seems to work.

I've attached the project modified if you have any suggestion on how to improve.


Tooltip are working also on polar chart but they show only on segment connecting two point of the same series, the problem in my case is that I have one point per series.


Thanks, bye

Fabrizio


Attachment: Sample_Tooltip_MOD_c59c4bff.zip


FF Fabrizio Frigerio replied to Fabrizio Frigerio August 4, 2021 03:22 PM UTC

Hi Yuvaraj,

moving the code and xaml tags to the real mock-up I've found out that is not working correctly, I don't know if is due to different layout of the control or the presence of other controls but the minimal errors there was on the sample are becoming big errors in the new mock-up. The procedure linked to chart MouseLeftButtonUp is not working properly, the one I made on series MouseUp is working but the event is not always fired clicking on series markup.

Also should be good to have the ability to hide the ToolTIp i.e. clicking outside the chart area but I can't find a way to do that.


Bye

Fabrizio




YP Yuvaraj Palanisamy Syncfusion Team August 5, 2021 02:17 PM UTC

Hi Fabrizio Frigerio,

 
Thanks for your patience.

We have achieved your requirement “Tooltip template for multiple Polar series along with different symbol” by workaround to showing tooltip by touch on the Adornment symbol. Also, we have attached the sample for your reference. Please find the sample form the below link. 

  
Output
 

Also, currently we are not having direct support for “Tooltip support for Polar series”and we have already logged feature request for this. We will prioritize the features every release based on the demands and we do not have an immediate plan to implement this since we committed with already planned work. So, this feature will be available for any of our upcoming releases.    
   
You can track the status of this feature from below link    
    
Please cast your vote to make it count and If you have any more specifications/suggestions to the feature request, you can add it as a comment in the portal.   
 
Regards, 
Yuvaraj. 


Loader.
Up arrow icon