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

MAUI code-behind don't display chart #1736

Open
evolcano opened this issue Dec 20, 2024 · 4 comments
Open

MAUI code-behind don't display chart #1736

evolcano opened this issue Dec 20, 2024 · 4 comments

Comments

@evolcano
Copy link

evolcano commented Dec 20, 2024

Describe the bug
MAUI code-behind don't display chart similar as #481 , without any error.

internal class CodeBehindMainPage : ContentPage
{
public CodeBehindMainPage()
{
var chart = new CartesianChart();
chart.Series = new ISeries[]
{
new LineSeries
{
Values = new double[] { 2, 1, 3, 5, 3, 4, 6 },
Fill = null
}
};
var grid = new Grid();
grid.Add(chart);
Content = grid;
}
}

But when I drag the window to another display and resize the window , chart appears.

To Reproduce
Steps to reproduce the behavior:

  1. run code in debug or release model, chart don't display
  2. drag the window to another display, chart appears

Expected behavior
chart is visible .

Screenshots

Desktop (please complete the following information):

  • OS: windows 11
  • Visual studio :17.12.3
  • net : 9.0
  • LiveChartsCore.SkiaSharpView.Maui : 2.0.0-rc4.5
@evolcano
Copy link
Author

LiveChartsCore.SkiaSharpView.Maui Version 2.0.0-rc3 is OK.

So this maybe a repetitive issue。

@evolcano
Copy link
Author

No matter LiveChartsCore.SkiaSharpView.Maui : 2.0.0-rc4.5 or 2.0.0-rc3, when CartesianChart is hosted in a StackLayout using Code-Behind mode, CartesianChart will not visible, too.

@beto-rodriguez
Copy link
Owner

@evolcano

StackLayout using Code-Behind mode, CartesianChart will not visible, too.

Probably related to: #1483

@evolcano
Copy link
Author

@beto-rodriguez Yes, after I set size, CartesianChart appears in StackLayout. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants