100 Percent Stacked Bar Chart won't show tooltip if value is 0

Hi I found strange issue for not displaying tooltip if we found Y axis value is 0. In my example, I have Y1Series and Y2Series .. for Y1Series I have 0 value and Y2Series got 100 , so in tooltip it's shows Y2Series with tooltip information , but not Y1Series. 

In example below Genotyped is Y1Series and Total is Y2Series , I always get tooltip for Total (Y2series) , but not Genotype(Y1Series). Note: Y1Series has >0 values , tooltip showing Y1Series data. It has issue with 0 value only



Note: tooltip showing for Y1Series(Genotyped) when we have value, in this case 16% for Cows does display value

Image_4455_1714056362361


5 Replies

PR Priyansh April 25, 2024 02:50 PM UTC

I added Custom tooltip

Image_9334_1714056598719



DG Durga Gopalakrishnan Syncfusion Team April 26, 2024 01:49 PM UTC

Hi Priyansh,


Greetings from Syncfusion.


We suggest you to enable shared tooltip for chart to view the zero value in tooltip. By default, for normal tooltip while hovering over the column rectangle tooltip will be displayed, for zero value rectangle won’t be rendered so there is no option to display tooltip. When shared is enabled, closest point will be displayed in tooltip. We have prepared sample based on your requirement.


<SfChart>

   <ChartTooltipSettings Shared=true Enable="true"></ChartTooltipSettings>

</SfChart>


Image_7873_1714139345556


Sample : https://blazorplayground.syncfusion.com/rjrzNpBHzrUFUhSf


Kindly revert us if you have any concerns.


Regards,

Durga Gopalakrishnan.



PR Priyansh April 26, 2024 08:56 PM UTC

Thanks for the solution, I used shared property in my project . Default tooltip shows 0%, but  in custom tooltip 0% not displaying as well for series "Genotyped"



My custom tooltip code is as following : so on custom tooltip , we can't able to show 0%


Image_9553_1714163686399



GV Gopalakrishnan Veeraraghavan Syncfusion Team April 29, 2024 03:37 PM UTC

Hi Priyansh,


We have considered your reported issue as a bug and have logged a defect report for it. This fix will be available in our patch release, which is scheduled to be rolled out on May 14th, 2024. We appreciate your patience until then. You can keep track of the bug using the feedback link below.


Feedback Link: In 100 percent stacked bar chart, when set YValue to 0, In custom tooltip YValue not visible in Blazor | Feedback Portal (syncfusion.com)


If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”



Regards,

Gopalakrishnan Veeraraghavan



DG Durga Gopalakrishnan Syncfusion Team May 14, 2024 11:36 AM UTC

Hi Priyansh,


We are glad to announce that our v25.2.4 patch release is rolled out; we have added the fix for reported issue. You can use the latest Syncfusion.Blazor.Charts NuGet package.


Root Cause:

In the tooltip template, if the YValue is set to 0, then the tooltip's YValue is set to an empty string, making it not visible in the tooltip.


Fix:

When YValue is set to 0, then specified the tooltip's YValue to 0 instead of an empty string, making it visible in the tooltip.


NuGet Package : https://www.nuget.org/packages/Syncfusion.Blazor.Charts/


Sample : https://blazorplayground.syncfusion.com/rjVfZSMfUCSTuKMC


Feedback Link : https://www.syncfusion.com/feedback/54951/in-a-100-percent-stacked-bar-chart-when-the-yvalue-is-set-to-0-the-yvalue-is-not


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


Regards,

Durga Gopalakrishnan.


Loader.
Up arrow icon