You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Please take this only as an idea for simplifying work with the library.
Default tooltip will be for most users almost the same. Let's make it buildable for everyone (or better) if it needs to be customized.
Describe the solution you'd like Part 1 - Internal access modifier on BackgroundPaint blocks to build copied SKDefaultTooltip
Trying to make custom tooltip based on SKDefaultTooltip leads to a block or usage of obsolete method (without inspecting the source code). DefaultTooltip should be propably like a template for custom ones.
if(_fillis not null)_fill.PaintStyle=PaintStyle.Fill;
Part 2 - Show/Hide virtual
My reason for customization was to add Hide interval to leave tooltip visible for specific time (and extend it's time if touch is made again before timeout).
If method "Show" and method "Hide" for SKDefaultTooltip were virtual - inheriting could be possible instead of remaking whole file.
Then it could be like (just example - not the most performant but it will explain the situation):
Is your feature request related to a problem? Please describe.
Please take this only as an idea for simplifying work with the library.
Default tooltip will be for most users almost the same. Let's make it buildable for everyone (or better) if it needs to be customized.
Describe the solution you'd like
Part 1 - Internal access modifier on BackgroundPaint blocks to build copied SKDefaultTooltip
Trying to make custom tooltip based on SKDefaultTooltip leads to a block or usage of obsolete method (without inspecting the source code). DefaultTooltip should be propably like a template for custom ones.
LiveChartsCore.Painting.Paint
internal PaintStyle PaintStyle { get; set; }
is internal (cannot be made the same way as default one) - possible to set[Obsolete] <paint>.IsStroke = false;
LiveChartsCore.Painting.PaintStyle - is public (no problem here)
LiveChartsCore.SkiaSharpView.SKCharts.SKDefaultTooltip
Because of _container.Geometry.Fill = BackgroundPaint; that applies the color and changes PaintStyle to Fill - BackgroundPaint's PaintStyle can be removed and access modifier won't be problem anymore.
LiveCharts2/src/LiveChartsCore/Drawing/DrawnGeometry.cs
Line 200 in 41d09e4
Part 2 - Show/Hide virtual
My reason for customization was to add Hide interval to leave tooltip visible for specific time (and extend it's time if touch is made again before timeout).
If method "Show" and method "Hide" for SKDefaultTooltip were virtual - inheriting could be possible instead of remaking whole file.
Then it could be like (just example - not the most performant but it will explain the situation):
Summary
https://github.com/beto-rodriguez/LiveCharts2/blob/master/src/skiasharp/LiveChartsCore.SkiaSharp/SKCharts/SKDefaultTooltip.cs#L73
Before:
After:
Additionally:
LiveCharts2/src/skiasharp/LiveChartsCore.SkiaSharp/SKCharts/SKDefaultTooltip.cs
Line 89 in 41d09e4
Before:
public void Show(IEnumerable<ChartPoint> foundPoints, Chart chart)
After:
public virtual void Show(IEnumerable<ChartPoint> foundPoints, Chart chart)
LiveCharts2/src/skiasharp/LiveChartsCore.SkiaSharp/SKCharts/SKDefaultTooltip.cs
Line 233 in 41d09e4
Before:
public void Hide(Chart chart)
After:
public virtual void Hide(Chart chart)
Thanks for all your work!
The text was updated successfully, but these errors were encountered: