Oxyplot.Avalonia 2.2.0

dotnet add package Oxyplot.Avalonia --version 2.2.0
                    
NuGet\Install-Package Oxyplot.Avalonia -Version 2.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Oxyplot.Avalonia" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Oxyplot.Avalonia" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Oxyplot.Avalonia" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Oxyplot.Avalonia --version 2.2.0
                    
#r "nuget: Oxyplot.Avalonia, 2.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Oxyplot.Avalonia@2.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Oxyplot.Avalonia&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Oxyplot.Avalonia&version=2.2.0
                    
Install as a Cake Tool

nuget License Size

OxyPlot.Avalonia

OxyPlot is a plotting library for .NET. This package targets Avalonia applications.

dotnet add package OxyPlot.Avalonia

Usage

To use the library, add the following to your App.xaml:

<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             x:Class="Sensei.Presentation.Avalonia.App">
    <Application.Styles>
        <StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
        <StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
      
        
        <StyleInclude Source="resm:OxyPlot.Avalonia.Themes.Default.xaml?assembly=OxyPlot.Avalonia"/>
      
        
        <StyleInclude Source="avares://OxyPlot.Avalonia/Themes/Default.axaml"/>
    </Application.Styles>
</Application>

Then, you can add plots to your application, as such:

<avalonia:Plot Height="150" 
               PlotMargins="50 0 0 0"
               PlotAreaBorderColor="#999999">
    <avalonia:Plot.Series>
        <avalonia:AreaSeries 
            DataFieldX="Index"
            DataFieldY="Value"
            ItemsSource="{Binding Path=Values}"
            Color="#fd6d00" />
    </avalonia:Plot.Series>
</avalonia:Plot>

See the AvaloniaExamples project and OxyPlot Documentation to learn how to create more complex plots.

Installing Preview Versions

To access the latest version of OxyPlot.Avalonia you can add this repo as a submodule to your own git repo:

mkdir ./external
git submodule add git@github.com:oxyplot/oxyplot-avalonia.git ./external/oxyplot-avalonia
# Reference the ../external/oxyplot-avalonia/Source/OxyPlot.Avalonia/OxyPlot.Avalonia.csproj project then.

Another way is to import our Azure Artifacts NuGet package feed by creating the following nuget.config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear /> 
    <add key="OxyPlot.Avalonia-CI" value="https://worldbeater.pkgs.visualstudio.com/OxyPlot.Avalonia/_packaging/OxyPlot.Avalonia-CI/nuget/v3/index.json" />
  </packageSources>
</configuration>

Next, install the latest preview version of the OxyPlot.Avalonia package as such:

dotnet add package OxyPlot.Avalonia
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Oxyplot.Avalonia:

Package Downloads
TrendsControl.Avalonia

Trends control library

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Oxyplot.Avalonia:

Repository Stars
kkokosa/dotnet-counters-ui
Multiplatform UI tool for observing .NET counters, written and maintained by an awesome contributors from Dotnetos community🌶
Version Downloads Last Updated
2.2.0 76 10/25/2026
2.1.0 30,315 12/14/2022
2.1.0-Preview1 14,184 12/26/2021
2.1.0-Avalonia11 112,355 9/11/2023
2.1.0-20210506.4 5,824 8/21/2021
2.1.0-20201211.2 5,071 12/11/2020
2.1.0-20200725.1 933 7/26/2020
2.1.0-20200605.6 847 7/24/2020
2.0.0-unstable0956 1,709 1/8/2017
2.0.0-unstable0952 1,513 1/7/2017