Tooltip not working #1493

Closed
opened 2026-01-29 17:54:25 +00:00 by claunia · 8 comments
Owner

Originally created by @Cornelis83 on GitHub (Nov 20, 2024).

I am using Radzen for the donut charts and until version 5.2.2 it worked fine. But then I updated to version 5.6.5 and I had this error:

Cannot provide a value for property 'TooltipService' on type 'Radzen.Blazor.RadzenChart'. There is no registered service of type 'Radzen.TooltipService'.

I found a sort of fix for this error in this topic

https://forum.radzen.com/t/cannot-provide-a-value-for-property-tooltipservice/5185

which redirected me to this page:

https://www.radzen.com/documentation/blazor/tooltip/

I added the TooltipService to the scope and I added the

in my mainLayout.razor

but now my tooltips are broken on my page. No tooltips are shown and no errors are thrown. I found this in the version history:
(https://github.com/radzenhq/radzen-blazor/releases)

  • Render chart tooltips in the same way as standard tooltips.

but I have no clue what this means due to the lack of more descriptive information.

Also, in this document I mentioned before (https://www.radzen.com/documentation/blazor/tooltip/) I have no clue what to do with step 3 and 4 in my situation for opening the tooltip. I used these examples to open the tooltip before:

https://blazor.radzen.com/chart-tooltip?theme=material3

but it looks like these examples aren't updated yet either.

So, how do I open the tooltips on my donut charts in version 5.4 and greater?

Originally created by @Cornelis83 on GitHub (Nov 20, 2024). I am using Radzen for the donut charts and until version 5.2.2 it worked fine. But then I updated to version 5.6.5 and I had this error: Cannot provide a value for property 'TooltipService' on type 'Radzen.Blazor.RadzenChart'. There is no registered service of type 'Radzen.TooltipService'. I found a sort of fix for this error in this topic https://forum.radzen.com/t/cannot-provide-a-value-for-property-tooltipservice/5185 which redirected me to this page: https://www.radzen.com/documentation/blazor/tooltip/ I added the TooltipService to the scope and I added the <RadzenTooltip /> in my mainLayout.razor but now my tooltips are broken on my page. No tooltips are shown and no errors are thrown. I found this in the version history: (https://github.com/radzenhq/radzen-blazor/releases) - Render chart tooltips in the same way as standard tooltips. but I have no clue what this means due to the lack of more descriptive information. Also, in this document I mentioned before (https://www.radzen.com/documentation/blazor/tooltip/) I have no clue what to do with step 3 and 4 in my situation for opening the tooltip. I used these examples to open the tooltip before: https://blazor.radzen.com/chart-tooltip?theme=material3 but it looks like these examples aren't updated yet either. So, how do I open the tooltips on my donut charts in version 5.4 and greater?
Author
Owner

@akorchev commented on GitHub (Nov 20, 2024):

Check here: https://blazor.radzen.com/get-started/net9?theme=material3#additional

@akorchev commented on GitHub (Nov 20, 2024): Check here: https://blazor.radzen.com/get-started/net9?theme=material3#additional
Author
Owner

@Cornelis83 commented on GitHub (Nov 20, 2024):

This doesn't solve the issue I am having. I am not gonna add Radzen themes and other stuff. I use a different component framework for that. All I want is that my tooltip keeps working after I update Radzen from version 5.3.5 (last version tooltip works without any changes required in my project) to the latest version. If I cannot do that without being required to add Radzen themes and stuff to my project then I guess I stick to version 5.3.5.

@Cornelis83 commented on GitHub (Nov 20, 2024): This doesn't solve the issue I am having. I am not gonna add Radzen themes and other stuff. I use a different component framework for that. All I want is that my tooltip keeps working after I update Radzen from version 5.3.5 (last version tooltip works without any changes required in my project) to the latest version. If I cannot do that without being required to add Radzen themes and stuff to my project then I guess I stick to version 5.3.5.
Author
Owner

@akorchev commented on GitHub (Nov 20, 2024):

The linked article shows how to enable tooltips. Look for AddRadzenComponents and <RadzenComponents /> in the linked page.

@akorchev commented on GitHub (Nov 20, 2024): The linked article shows how to enable tooltips. Look for AddRadzenComponents and `<RadzenComponents />` in the linked page.
Author
Owner

@Cornelis83 commented on GitHub (Nov 20, 2024):

Yeah... I got it working now after adding <RadzenComponents /> to my MainLayout.razor. But I had to add stuff to my Program.cs as well which I don't like.

I had to register these services:

//Add Radzen stuff... suddenly required after version 5.2.2
builder.Services.AddScoped<RadzenTooltipService>()
                .AddScoped<RadzenDialogService>()
                .AddScoped<RadzenNotificationService>()
                .AddScoped<RadzenContextMenuService>(); 

but I don't like it. I am not using DialogService, NotificationService or ContextMenuService. Why do I need to add them now anways and what is the reason this was not required in version 5.2.2 but is made required in a later version?

@Cornelis83 commented on GitHub (Nov 20, 2024): Yeah... I got it working now after adding `<RadzenComponents />` to my MainLayout.razor. But I had to add stuff to my Program.cs as well which I don't like. I had to register these services: ``` //Add Radzen stuff... suddenly required after version 5.2.2 builder.Services.AddScoped<RadzenTooltipService>() .AddScoped<RadzenDialogService>() .AddScoped<RadzenNotificationService>() .AddScoped<RadzenContextMenuService>(); ``` but I don't like it. I am not using DialogService, NotificationService or ContextMenuService. Why do I need to add them now anways and what is the reason this was not required in version 5.2.2 but is made required in a later version?
Author
Owner

@akorchev commented on GitHub (Nov 20, 2024):

The chart now uses the tooltip service. Solves some positioning issues that the older tooltip had.

You can use <RadzenTooltip /> instead of <RadzenComponents />. Then you would only need to register RadzenTooltipService.

@akorchev commented on GitHub (Nov 20, 2024): The chart now uses the tooltip service. Solves some positioning issues that the older tooltip had. You can use `<RadzenTooltip />` instead of `<RadzenComponents />`. Then you would only need to register RadzenTooltipService.
Author
Owner

@Cornelis83 commented on GitHub (Nov 20, 2024):

Using <RadzenTooltip /> doesn't seem to work. I found that solution before in the link I mentioned earlier: https://www.radzen.com/documentation/blazor/tooltip/

but when I use the RadzenTooltip, the tooltip doesn't appear. Is this a bug perhaps?

@Cornelis83 commented on GitHub (Nov 20, 2024): Using `<RadzenTooltip />` doesn't seem to work. I found that solution before in the link I mentioned earlier: https://www.radzen.com/documentation/blazor/tooltip/ but when I use the RadzenTooltip, the tooltip doesn't appear. Is this a bug perhaps?
Author
Owner

@akorchev commented on GitHub (Nov 20, 2024):

Try with <RadzenChartTooltip />.

That documentation link is quite old by the way (I keep forgetting to redirect to blazor.radzen.com)

@akorchev commented on GitHub (Nov 20, 2024): Try with `<RadzenChartTooltip />`. That documentation link is quite old by the way (I keep forgetting to redirect to blazor.radzen.com)
Author
Owner

@Cornelis83 commented on GitHub (Nov 20, 2024):

Thank you, that works. The old link is the link I found indirectly when I searched for the error on google.

@Cornelis83 commented on GitHub (Nov 20, 2024): Thank you, that works. The old link is the link I found indirectly when I searched for the error on google.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1493