Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Source/Examples/ExampleLibrary/ExampleLibrary.core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProductVersion>10.0.0</ProductVersion>
<RootNamespace>ExampleLibrary</RootNamespace>
<AssemblyName>ExampleLibrary</AssemblyName>
<ProjectGuid>{FACB89E5-53A5-4748-9F5B-E0714EBB37B2}</ProjectGuid>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>ExampleLibrary.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Bergensbanen.csv" />
<EmbeddedResource Include="Resources\OxyPlot.png" />
<EmbeddedResource Include="Resources\west0479.mtx" />
<EmbeddedResource Include="Resources\WorldPopulation.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\OxyPlot\OxyPlot.core.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="ExampleLibrary.snk" />
</ItemGroup>
</Project>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace LegendsDemo
using OxyPlot;
using OxyPlot.Series;

using PropertyTools.DataAnnotations;
using WpfExamples;

using HorizontalAlignment = OxyPlot.HorizontalAlignment;
Expand Down Expand Up @@ -101,7 +100,7 @@ public LegendSymbolPlacement LegendSymbolPlacement
}
}

[DisplayName("Curves"), Slidable(1, 32)]
[DisplayName("Curves"), PropertyTools.DataAnnotations.Slidable(1, 32)]
public int NumberOfSeries
{
get { return numberOfSeries; }
Expand Down Expand Up @@ -156,4 +155,4 @@ private PlotModel CreateModel(int n)
return newModel;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:oxy="clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf" xmlns:pt="clr-namespace:PropertyTools.Wpf;assembly=PropertyTools.Wpf"
Title="LegendsDemo" Height="720" Width="1280">
<DockPanel>
<pt:PropertyControl SelectedObject="{Binding}" DockPanel.Dock="Left" Width="300" UseTabs="False" Margin="8"/>
<pt:PropertyGrid SelectedObject="{Binding}" DockPanel.Dock="Left" Width="300" Margin="8"/>
<Grid>
<oxy:PlotView Model="{Binding Model}" Background="White"/>
</Grid>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 85 additions & 0 deletions Source/Examples/WPF/WpfExamples/WpfExamples.core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>WinExe</OutputType>
<RootNamespace>WpfExamples</RootNamespace>
<AssemblyName>WpfExamples</AssemblyName>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\</SolutionDir>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>..\..\..\..\Icons\OxyPlot.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<Resource Include="Images\ScatterErrorSeriesDemo.png" />
<Resource Include="Images\ResizeDemo.png" />
<Resource Include="Images\HeatMapDemo.png" />
<Resource Include="Images\ContextMenuDemo.png" />
<Resource Include="Images\OverlayDemo.png" />
<Resource Include="Images\ColorBindingDemo.png" />
<Resource Include="Images\ColumnSeriesDemo.png" />
<Resource Include="Images\TaskDemo.png" />
<Resource Include="Images\AxesDemo.png" />
<Resource Include="Images\CoupledAxesDemo.png" />
<Resource Include="Images\UserControlDemo.png" />
<Resource Include="Images\AreaDemo.png" />
<Resource Include="Images\BarSeriesDemo.png" />
<Resource Include="Images\BindingDemo.png" />
<Resource Include="Images\ContourDemo.png" />
<Resource Include="Images\CsvDemo.png" />
<Resource Include="Images\CustomTrackerDemo.png" />
<Resource Include="Images\DateTimeDemo.png" />
<Resource Include="Images\HistogramDemo.png" />
<Resource Include="Images\LegendsDemo.png" />
<Resource Include="Images\PieDemo.png" />
<Resource Include="Images\PolarDemo.png" />
<Resource Include="Images\RealtimeDemo.png" />
<Resource Include="Images\RefreshDemo.png" />
<Resource Include="Images\ScatterDemo.png" />
<Resource Include="Examples\HistogramDemo\hare.jpg" />
<Resource Include="..\..\..\..\Icons\OxyPlot_64.png">
<Link>OxyPlot_64.png</Link>
</Resource>
<Content Include="Examples\CsvDemo\Data\GlobalTemperatureAnomaly.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Examples\CsvDemo\Data\RiverFlow.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Examples\CsvDemo\Data\WorldPopulation.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\AnnotationDemo.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\OxyPlot.OpenXml\OxyPlot.OpenXml.core.csproj" />
<ProjectReference Include="..\..\..\OxyPlot.Pdf\OxyPlot.Pdf.core.csproj" />
<ProjectReference Include="..\..\..\OxyPlot.Wpf\OxyPlot.Wpf.core.csproj" />
<ProjectReference Include="..\..\..\OxyPlot.Xps\OxyPlot.Xps.core.csproj" />
<ProjectReference Include="..\..\..\OxyPlot\OxyPlot.core.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Workitems\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="PropertyTools.Wpf" Version="3.1.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
</Project>
43 changes: 43 additions & 0 deletions Source/OxyPlot.OpenXml/OxyPlot.OpenXml.core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<OutputType>Library</OutputType>
<RootNamespace>OxyPlot.OpenXml</RootNamespace>
<AssemblyName>OxyPlot.OpenXml</AssemblyName>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup>
<NoWarn>$(NoWarn);1573;1591;1712;CA1416</NoWarn>
<AssemblyTitle>OxyPlot.OpenXml</AssemblyTitle>
<Description>OxyPlot OpenXml export library</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>..\..\Output\NET45\</OutputPath>
<DocumentationFile>..\..\Output\NET45\OxyPlot.OpenXml.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OxyPlot.Wpf\OxyPlot.Wpf.core.csproj" />
<ProjectReference Include="..\OxyPlot\OxyPlot.core.csproj" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\StyleCop.Analyzers.Unstable.1.2.0.435\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
<Analyzer Include="..\packages\StyleCop.Analyzers.Unstable.1.2.0.435\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DocumentFormat.OpenXml" Version="3.3.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" />
<PackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.435" />
<PackageReference Include="System.Drawing.Common" Version="9.0.9" />
</ItemGroup>
</Project>
3 changes: 0 additions & 3 deletions Source/OxyPlot.OpenXml/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@
// --------------------------------------------------------------------------------------------------------------------

using System.Reflection;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to bring this back and use a compile conditional to exclude for .NET core


[assembly: AssemblyTitle("OxyPlot.OpenXml")]
[assembly: AssemblyDescription("OxyPlot OpenXml export library")]
4 changes: 2 additions & 2 deletions Source/OxyPlot.OpenXml/Reporting/WordDocumentReportWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ private void Dispose(bool disposing)
this.Save();
}

this.package.Close();
this.package.Dispose();
}
}

Expand All @@ -858,4 +858,4 @@ private void SetPackageProperties(OpenXmlPackage p)
p.PackageProperties.LastModifiedBy = this.Creator;
}
}
}
}
39 changes: 39 additions & 0 deletions Source/OxyPlot.Pdf/OxyPlot.Pdf.core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetPlatformMinVersion>6.1</TargetPlatformMinVersion> <!-- Windows 7 -->
<OutputType>Library</OutputType>
<RootNamespace>OxyPlot.Pdf</RootNamespace>
<AssemblyName>OxyPlot.Pdf</AssemblyName>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup>
<NoWarn>$(NoWarn);1573;1591;1712;CA1416</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>..\..\Output\NET45\</OutputPath>
<DocumentationFile>..\..\Output\NET45\OxyPlot.Pdf.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>OxyPlot.Pdf.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OxyPlot\OxyPlot.core.csproj" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\StyleCop.Analyzers.Unstable.1.2.0.435\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
<Analyzer Include="..\packages\StyleCop.Analyzers.Unstable.1.2.0.435\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="PDFsharp-MigraDoc-GDI" Version="6.2.2" />
</ItemGroup>
</Project>
10 changes: 5 additions & 5 deletions Source/OxyPlot.Pdf/PdfRenderContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ public override void DrawText(
return;
}

var fs = XFontStyle.Regular;
var fs = XFontStyleEx.Regular;
if (fontWeight > FontWeights.Normal)
{
fs = XFontStyle.Bold;
fs = XFontStyleEx.Bold;
Comment on lines +254 to +257
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from XFontStyle to XFontStyleEx suggests an API migration. Ensure this is the correct replacement and that XFontStyleEx provides equivalent functionality to the original XFontStyle enum.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to upgrade the older projects to use the new NuGet packages

}

var font = new XFont(fontFamily, (float)fontSize * FontsizeFactor, fs);
Expand Down Expand Up @@ -332,10 +332,10 @@ public override OxySize MeasureText(string text, string fontFamily, double fontS
return OxySize.Empty;
}

var fs = XFontStyle.Regular;
var fs = XFontStyleEx.Regular;
if (fontWeight > FontWeights.Normal)
{
fs = XFontStyle.Bold;
fs = XFontStyleEx.Bold;
}

var font = new XFont(fontFamily, (float)fontSize * FontsizeFactor, fs);
Expand Down Expand Up @@ -529,4 +529,4 @@ private void Dispose(bool disposing)
this.disposed = true;
}
}
}
}
3 changes: 0 additions & 3 deletions Source/OxyPlot.Pdf/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@
// --------------------------------------------------------------------------------------------------------------------

using System.Reflection;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to bring this back and use a compile conditional to exclude for .NET core


[assembly: AssemblyTitle("OxyPlot.Pdf")]
[assembly: AssemblyDescription("OxyPlot PDF export library")]
15 changes: 7 additions & 8 deletions Source/OxyPlot.Tests/Axes/AxisTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ public void A18_AxisWithHiddenLabelsGridlines()
OxyAssert.AreEqual(plot, "A18");
}


[Test]
public void B01_LogarithmicAxis()
{
Expand Down Expand Up @@ -434,7 +433,7 @@ public void D01_InvalidAbsoluteMaxMin()
var plot = new PlotModel { Title = "Simple plot" };
plot.Axes.Add(new LinearAxis { AbsoluteMaximum = 0, AbsoluteMinimum = 0 });
((IPlotModel)plot).Update(true);
Assert.IsNotNull(plot.GetLastUpdateException() as InvalidOperationException);
Assert.That(plot.GetLastUpdateException() as InvalidOperationException, Is.Not.Null);
Copy link
Author

@lafleurh lafleurh Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to upgrade .NET 4 project to latest NUnit NuGet

}

[Test]
Expand All @@ -443,8 +442,8 @@ public void D02_InvalidMaxMin()
var plot = new PlotModel { Title = "Simple plot" };
plot.Axes.Add(new LinearAxis { Maximum = 0, Minimum = 0 });
((IPlotModel)plot).Update(true);
Assert.AreEqual(100, plot.Axes[0].ActualMaximum);
Assert.AreEqual(0, plot.Axes[0].ActualMinimum);
Assert.That(100, Is.EqualTo(plot.Axes[0].ActualMaximum));
Assert.That(0, Is.EqualTo(plot.Axes[0].ActualMinimum));
}

[Test]
Expand All @@ -453,8 +452,8 @@ public void D03_InvalidMaxMin()
var plot = new PlotModel { Title = "Simple plot" };
plot.Axes.Add(new LogarithmicAxis { Maximum = 1, Minimum = 1 });
((IPlotModel)plot).Update(true);
Assert.AreEqual(100, plot.Axes[0].ActualMaximum);
Assert.AreEqual(1, plot.Axes[0].ActualMinimum);
Assert.That(100, Is.EqualTo(plot.Axes[0].ActualMaximum));
Assert.That(1, Is.EqualTo(plot.Axes[0].ActualMinimum));
}

[Test]
Expand All @@ -463,8 +462,8 @@ public void D04_InvalidLogAxis()
var plot = new PlotModel { Title = "Simple plot" };
plot.Axes.Add(new LogarithmicAxis { Maximum = 1, Minimum = 0 });
((IPlotModel)plot).Update(true);
Assert.AreEqual(100, plot.Axes[0].ActualMaximum);
Assert.AreEqual(1, plot.Axes[0].ActualMinimum);
Assert.That(100, Is.EqualTo(plot.Axes[0].ActualMaximum));
Assert.That(1, Is.EqualTo(plot.Axes[0].ActualMinimum));
}
}
}
Loading
Loading