Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPF: Subsequent change of fill via OnPointMeasured() does not adapt icon color in tooltip #1335

Closed
network-interface-controller opened this issue Oct 27, 2023 · 1 comment
Labels
priority 1 might not be fixed in the next release of the library, but it will soon! visual glitch
Milestone

Comments

@network-interface-controller

Describe the bug
A subsequent change of the Fill for single columns in a column series by means of OnPointMeasured() does not adapt the Fill of the icon in the associated tooltip.

Code excerpt

var series = new ColumnSeries<int>
{
    Values = input.Select(x => x.Rank),
    XToolTipLabelFormatter = (chartPoint) => $"TooltipText...",
    IsVisibleAtLegend = false
}.OnPointMeasured(point =>
{
    if (point.Coordinate.PrimaryValue == 1)
        point.Visual!.Fill = new SolidColorPaint(new SKColor(0, 128, 0));
    if (point.Coordinate.PrimaryValue == 2)
        point.Visual!.Fill = new SolidColorPaint(new SKColor(255, 255, 0));
    if (point.Coordinate.PrimaryValue == 3)
        point.Visual!.Fill = new SolidColorPaint(new SKColor(255, 128, 0));
    if (point.Coordinate.PrimaryValue == 4)
        point.Visual!.Fill = new SolidColorPaint(new SKColor(255, 0, 0));
});

To Reproduce
Steps to reproduce the behavior:
Create a column series and adapte the Fill of the columns based on their value => The Fill of the icon in the tooltip has a different color than the associated column

Expected behavior
An adaption of a columns Fill via OnPointMeasured() should also adapt the color of the associated tooltip icon, i.e. the color of the icon in the tooltip is defined per column and may differ within a series.

Screenshots
If applicable, add screenshots to help explain your problem.
grafik

Desktop (please complete the following information):
OS: Windows 10, Version 22H2
Browser --> Not applicable; WPF app
Version: LiveChartsCore 2.0.0-rc1.2, LiveChartsCore.SkiaSharpView.WPF 2.0.0-rc1.2
Framework: .NET 7.0

Smartphone (please complete the following information):
--> NA

Additional context
Add any other context about the problem here.

@beto-rodriguez
Copy link
Owner

Fixed with the referenced commit and will be included in the next version of the library, thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority 1 might not be fixed in the next release of the library, but it will soon! visual glitch
Projects
None yet
Development

No branches or pull requests

2 participants