79370711

Date: 2025-01-20 08:44:46
Score: 3.5
Natty:
Report link

I have the same issue but finally found a way out!

First,check ur project csproj file make sure packages are set suitable for Avalonia 11.Mine as following:

<PackageReference Include="Avalonia" Version="11.2.1" />    
<PackageReference Include="OxyPlot.Core" Version="2.2.0" />
<PackageReference Include="OxyPlot.Avalonia" Version="2.1.0-Avalonia11" />

Second,the App.axaml should set like:

<Application.Styles>
  <FluentTheme />
  <StyleInclude Source="avares://OxyPlot.Avalonia/Themes/Default.axaml"/>
</Application.Styles>

Finally,add xmlns:oxy="http://oxyplot.org/avalonia" in your view's axaml then try yo add

<oxy:Plot Height="150"
         PlotMargins="50 0 0 0"
         PlotAreaBorderColor="#999999">
  <oxy:Plot.Series>
    <oxy:AreaSeries
        DataFieldX="Index"
        DataFieldY="Value"
        Color="#fd6d00" />
  </oxy:Plot.Series>
</oxy:Plot>

for test. Anythings further can check in this github issues page

Reasons:
  • Blacklisted phrase (1): I have the same issue
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I have the same issue
  • Low reputation (1):
Posted by: Martin Hung