v2.1.0
OxyPlot 2.1
The primary goal of the 2.1 release is make the new SkiaSharp provisionals available: most users will be required to make code modifications if they wish to target 2.1. While this looks like a point release, there are some significant breaking changes in the API: some components have been removed, and others have been deprecated, but it should be fairly easy to port any code. Due to API changes, the 2.0 'Platform' libraries (e.g. OxyPlot.WPF and OxyPlot.WindowsForms) will not work with OxyPlot.Core 2.1, and will need to be updated: you cannot mix 2.0 and 2.1 binaries. Further details on compatability will be provided below: OxyPlot.WPF in particular has undergone significant changes.
We intend to provide 2.1 releases for OxyPlot.Avalonia, OxyPlot.Gtk, OyxPlot.Xamarin, and OxyPlot.Windows in time.
.NET Versions
-
Support for .NET Framework 4.0 has been re-introduced for
OxyPlot.WindowsFormsandOxyPlot.WPF. See #1452.Some APIs have been updated to support readonly collections. See #1600.
-
Support for .NET Core 3.0 has been removed; libraries now target .NET Core 3.1 instead. See #1488.
-
Core packages are now provided for .NET Standard 2.0 in addition to .NET Standard 1.0. See #1668.
Significant breaking changes (deprecated, removed, moved, or renamed functionality that was not just a bug)
-
Legend functionality has been overhauled. The many
Legendprefix properties have been removed fromPlotModel. See #644.The same legend properties that previously appeared in
PlotModelare supported in a newLegendclass, along with additional functionality. ThePlotModel.Legendscollection allows the inclusion of multiple legends on one plot.Hidden series are now shown in the legend by default, and visibility can be toggled by clicking on the legend entry. This new behaviour can be disabled by setting
Legend.ShowInvisibleSeries = false. See #1763 -
The
OxyPlot.Wpf.Plotclass and its associated components have been moved toOxyPlot.Contrib.Wpflibrary. A release of this library will be made soon to go with the 2.1 release. The codebase - which allows plot models to be defined in XAML as an alternative to using aPlotModelbound to aPlotView- will no longer be supported as part of the main library, but continues to function for the time being. In future, and issues with these components should be directed to the OxyPlot-Contrib repository, where we will continue to welcome community code submissions. See #1399.In order to make existing code work, it will be necessary to add a reference to the
OxyPlot.Contrib.Wpfnuget package (once it is released), and XAML namespace references will changed to"http://oxyplot.org/wpf/contrib". This changes does not affect code using thePlotViewcomponent, which remains inOxyPlot.WPF. -
OxyPlot.Wpfhas been split intoOxyPlot.WpfandOxyPlot.Wpf.Shared. The former depends on the latter, and is essential for all functionality. -
Various events on plot elements have been marked as obsolete. It is better to customise the
PlotControllerto seperate that logic from the plot elements themselves, and to avoid issues with conflicting events. See #111.These events will not be removed in the near future, and you can continue to use them for the time being where necessary.
-
ColumnSerieshas been removed. You should replace any usage ofColumnSerieswithBarSeries. See #1402. -
CandleStickAndVolumeSeriesis obsolete. Consider combining seperateCandleStickSeriesandVolumeSeries. See #1661. -
ErrorColumnSerieshas been renamed toErrorBarSeriesfor consistency. See #1402. -
OxyPlot.PdfExporterandOxyPlot.Pdf.PdfExporterare obsolete. Consider the newOxyPlot.SkiaSharp.PdfExporteras an alternative. See #1527. -
Exporter APIs have been simplified and made more consistent. Use
PlotModel.Backgroundto change the background color of export graphics. -
Reporting functionality has been moved to the
OxyPlot.Reportingpackage. The code resides in the Oxyplot-Reporting repository. See #1403. -
Various
RenderingExtensionsmethods have been removed. See #1661. -
The default color palette for color axes has been changed from 'Jet' to 'Viridis'. See #1505.
-
Axis.DesiredSizeis replaced withAxis.DesiredMargin. See #1562
New features and functionality
-
OxyPlot.SkiaSharp.WPFprovides an alternativePlotViewfor the WPF platform which uses the SkiaSharp library for immediate-mode rendering. This package targets .NET Core 3.1 and .NET Framework 4.5 and has native dependencies. -
OxyPlot.SkiaSharpprovides cross-platform JPEG, PNG, PDF, and SVG exporters based on the SkiaSharp library. The PDF exporter in particular provides a better alternative to the now obsoleteOxyPlot.Pdfprovision. This package targets .NET Standard 1.3 and .NET Framework 4.5 and has native dependencies. -
OxyPlot.ImageSharpprovides JPEG and PNG exporters based on a beta realease of the ImageSharp library. This is not an efficient implementation, and lacks full unicode support, but is a managed-only cross-platform option for raster graphics. This package targets .NET Standard 1.3. -
Screen-Space axis margins. See #1623.
-
ExtrapolationLineSeriesadded, which allows you to declare regions of the data-space which are extrapolated data. See #1740.
Pervasive fixes
OxyPlot.Core.Drawingnow shares its implementation withOxyPlot.WindowsForms.- Most X/Y Series and Annotations now support 'transposed' axes, where the
XAxisis vertical and theYAxishorizontal. - Clipping has been consolidated across plot components, providing a more consistent user experiance.
An issue-by-issue changelog can be found the changelog. See also the comparison between v2.0.0 and v2.1.0.
Notes for developers
Despite the previous suggestion that only bug-fixes would be kept after the 2.1.0-Preview1 release, we've decided that the new functionality is compartmentalised enough that it's simpler to publish the develop branch as-is.