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

'SeparatorsPaint' and 'Legend' are wrong in 'Change Series Instance' #928

Closed
kojima-imamura opened this issue Feb 8, 2023 · 2 comments
Closed
Labels
bug Something isn't working priority 0 needs to be fixed asap.

Comments

@kojima-imamura
Copy link

If you use 'SeparatorsPaint' and 'Legend' in 'ChangeSeriesInstance' of the sample program, the display will collapse.
'SeparatorsPaint' is displayed in a wrong order when used with 'DrawMarginFrame'.
The display position of 'Legend' is different every time. Characters disappear.

Version in which the problem occurred
--> beta.701

2023-02-08.14-32-47.mp4

.\LiveCharts2-master\samples\WPFSample\Test\ChangeSeriesInstance\View.xaml
Edit Code
<lvc:CartesianChart Grid.Row="1" Series="{Binding CartesianSeries}" />
--> <lvc:CartesianChart Grid.Row="1" Series="{Binding CartesianSeries}" DrawMarginFrame="{Binding DrawMarginFrame}" YAxes="{Binding YAxes}" LegendPosition="Bottom" />

.\LiveCharts2-master\samples\ViewModelsSamples\Test\ChangeSeriesInstance\ViewModel.cs
Edit Code

    [ObservableProperty]
        private IGeoSeries[]? _geoSeries;

-->

    [ObservableProperty]
        private IGeoSeries[]? _geoSeries;

    [ObservableProperty]
        private DrawMarginFrame? _drawMarginFrame;

    [ObservableProperty]
        private Axis[]? _yAxes;

Edit Code

        GeoSeries = new IGeoSeries[]
        {
            new HeatLandSeries
            {
                Lands = new HeatLand[]
                {
                    new() { Name = "bra", Value = 13 },
                    new() { Name = "mex", Value = 10 },
                    new() { Name = "usa", Value = 15 },
                    new() { Name = "can", Value = 8 }
                }
            }
        };

-->

        GeoSeries = new IGeoSeries[]
        {
            new HeatLandSeries
            {
                Lands = new HeatLand[]
                {
                    new() { Name = "bra", Value = 13 },
                    new() { Name = "mex", Value = 10 },
                    new() { Name = "usa", Value = 15 },
                    new() { Name = "can", Value = 8 }
                }
            }
        };

        DrawMarginFrame = new DrawMarginFrame
        {
            Stroke = new SolidColorPaint(SKColors.Black, 2),
        };

        YAxes = new Axis[]
        {
            new Axis
            {
                MinLimit = 0,
                SeparatorsPaint = new SolidColorPaint
                {
                    Color = SKColors.LightGray,
                    StrokeThickness = 2
                },
            }
        };
@beto-rodriguez
Copy link
Owner

Thanks for the report, fixed in #1021, this will be included in the next version of the library.

@beto-rodriguez beto-rodriguez added bug Something isn't working priority 0 needs to be fixed asap. labels Jun 7, 2023
@kojima-imamura
Copy link
Author

Confirmed the fix.
thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority 0 needs to be fixed asap.
Projects
None yet
Development

No branches or pull requests

2 participants