Skip to content

Latest commit

History

128 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

nugetLicenseSize

OxyPlot.Avalonia

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

Installation

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.

Usage

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

<Applicationxmlns="https://github.com/avaloniaui"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"x:Class="Sensei.Presentation.Avalonia.App">
<Application.Styles>
<StyleIncludeSource="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
<StyleIncludeSource="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
<!-- Add the line below to get OxyPlot UI theme applied. -->
<StyleIncludeSource="resm:OxyPlot.Avalonia.Themes.Default.xaml?assembly=OxyPlot.Avalonia"/>
</Application.Styles>
</Application>

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

<avalonia:PlotHeight="150"PlotMargins="50 0 0 0"PlotAreaBorderColor="#999999">
<avalonia:Plot.Series>
<avalonia:AreaSeriesDataFieldX="Index"DataFieldY="Value"Items="{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.

About

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

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages