Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit c882de33 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

Changed setting the chart size slightly to avoid an additional dependency on Windows.Control

parent f86d821d
No related branches found
No related tags found
No related merge requests found
......@@ -31,16 +31,18 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Windows.Forms.DataVisualization.Charting;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using Point = TUGraz.VectoCommon.Utils.Point;
#if !NET5_0_OR_GREATER
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Windows.Forms.DataVisualization.Charting;
#endif
namespace TUGraz.VectoCore.Utils
{
......@@ -185,7 +187,8 @@ namespace TUGraz.VectoCore.Utils
var ymax = Math.Max(points.Max(p => p.Y), lastPoint?.Y ?? double.NaN);
using (var chart = new Chart { Width = 1000, Height = 1000 }) {
using (var chart = new Chart()) {
chart.Size = new Size(1000, 1000);
chart.ChartAreas.Add(new ChartArea("main") {
AxisX = new Axis { Minimum = Math.Min(xmin, xmin), Maximum = Math.Max(xmax, xmax) },
AxisY = new Axis { Minimum = Math.Min(ymin, ymin), Maximum = Math.Max(ymax, ymax) }
......
......@@ -11,7 +11,6 @@
<PackageReference Include="Ninject.Extensions.Factory" Version="3.3.3" />
<PackageReference Include="NLog" Version="4.7.13" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net45'">
......@@ -26,15 +25,7 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Forms.DataVisualization" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net5.0'">
<PackageReference Include="System.Windows.Forms.DataVisualization">
<Version>1.0.0-prerelease.20110.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="VectoAPI" />
<InternalsVisibleTo Include="VectoEngineeringAPI" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment