Files
radzen-blazor/Radzen.Blazor/IChartSeriesOverlay.cs
Maxim Becker 13326879f0 Render chart tooltips in the same way as standard tooltips (#1745)
* Render chart tooltips in the same way as standard tooltips

* Move OpenChartTooltip method to TooltipService to avoid code duplications

* Avoid partially hiding of chart tooltip near top of page

* Make some of the types internal.

---------

Co-authored-by: Atanas Korchev <akorchev@gmail.com>
2024-10-28 10:01:13 +02:00

40 lines
1.1 KiB
C#

using Microsoft.AspNetCore.Components;
namespace Radzen.Blazor
{
/// <summary>
/// Interface for chart overlays
/// </summary>
public interface IChartSeriesOverlay
{
/// <summary>
/// Render overlay
/// </summary>
/// <param name="categoryScale"></param>
/// <param name="valueScale"></param>
/// <returns>RenderFragment</returns>
RenderFragment Render(ScaleBase categoryScale, ScaleBase valueScale);
/// <summary>
/// Gets overlay visibility state
/// </summary>
bool Visible { get; }
/// <summary>
/// Hit test
/// </summary>
bool Contains(double mouseX, double mouseY, int tolerance);
/// <summary>
/// Renders tooltip
/// </summary>
RenderFragment RenderTooltip(double mouseX, double mouseY);
/// <summary>
/// Get position of the overlay tooltip.
/// </summary>
/// <returns>Position.</returns>
Point GetTooltipPosition(double mouseX, double mouseY);
}
}