ChartWindow: Upgrade to Scottplot 5

This commit is contained in:
2024-01-22 21:41:01 +01:00
parent 6cee604448
commit 3642c5ac07
4 changed files with 233 additions and 123 deletions

View File

@ -1,4 +1,3 @@
using ScottPlot;
using System;
using System.Collections.Generic;
using System.Linq;
@ -16,15 +15,15 @@ namespace Elwig.Helpers.Billing {
Precision = precision;
MinX = minX;
MaxX = maxX;
DataX = DataGen.Range(minX, maxX + 1);
DataY = DataGen.Zeros(maxX - minX + 1);
DataX = Enumerable.Range(minX, maxX - minX + 1).Select(n => (double)n).ToArray();
DataY = new double[DataX.Length];
}
public Graph(Dictionary<double, decimal> data, int precision, int minX, int maxX) {
Precision = precision;
MinX = minX;
MaxX = maxX;
DataX = DataGen.Range(minX, maxX + 1);
DataX = Enumerable.Range(minX, maxX - minX + 1).Select(n => (double)n).ToArray();
DataY = DataX.Select(i => (double)BillingData.GetCurveValueAt(data, i)).ToArray();
}