Replies: 1 comment
-
|
So changing the XAML to <lvc:CartesianChart XAxes={Binding XAxes}>
<lvc:CartesianChart.Series>
<lvc:XamlColumnSeries SeriesName="Mary" Values="{Binding MaryValues}"/>
<lvc:XamlColumnSeries SeriesName="Ana" Values="{Binding AnaValues}"/>
</lvc:CartesianChart.Series>
</lvc:CartesianChart>And the MVVM model to namespace ViewModelsSamples.Bars.Basic;
public partial class ViewModel : ObservableObject
{
public List<double> MaryValues { get; set; } =
[2, 5, 4];
public List<double> AnaValues { get; set; } =
[3, 1, 6];
[ObservableProperty] private Axis[] _xAxes = { new Axis { Labels = new List<string>() } };
}Works fine and I don't have a single clue why is this working... Would be intersting if anyone can explain what is happening |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm learning Avalonia and XAML, and I have an exception that I don't understand.
And the XAML
If I run this code in an empty project it works.
If I run it In my application, with many things around as you can expect, this does not work and throws an exception.
And If I comment the XAxes the application works.
Since I'm very new to the XAML / Avalonia world, do you have any advice on how I should troubleshoot this kind of exception ?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions