Initial Commit

This commit is contained in:
2026-05-29 14:17:46 -04:00
commit b7d0676d5b
498 changed files with 30308 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
using System.Collections.Generic;
using Model.Chart.Enums;
namespace Model.Chart;
public class ChartModel
{
public List<PointModel> Points { get; set; } = new();
public string ChartColor { get; set; } = ChartColorType.Red.ToString();
public int Offset { get; set; } = 0;
public int IntervalDisplayMax { get; set; } = 300;
public int ValueDisplayMax { get; set; } = 5000;
public float HighestIntervalPoint { get; set; } = 5000;
public float HighestValuePoint { get; set; } = 5000;
public static List<ChartModel> GetAll()
{
var cs = new List<ChartModel>();
var c1 = new ChartModel
{
IntervalDisplayMax = 1000,
ValueDisplayMax = 300,
ChartColor = "Orange",
Points = new List<PointModel>()
};
for (var i = 0; i < c1.IntervalDisplayMax; i++)
c1.Points.Add(new PointModel
{ Interval = i, Value = (int)(i / (float)c1.IntervalDisplayMax * c1.ValueDisplayMax) });
cs.Add(c1);
return cs;
}
}
@@ -0,0 +1,12 @@
namespace Model.Chart.Enums;
public enum ChartColorType
{
Red,
LightGreen,
Cyan,
Yellow,
Orange,
LightBlue,
Pink
}
+21
View File
@@ -0,0 +1,21 @@
namespace Model.Chart;
public class PointModel
{
public float Interval { get; set; } = 0;
public float Value { get; set; } = 0;
public float TempValue { get; set; } = 0;
public string GetInterval(float highestInterval, float displayScale)
{
var display = Interval / highestInterval * displayScale;
return ((int)display).ToString();
}
public string GetValue(float highestValue, float displayScale)
{
var display = Value / highestValue * displayScale;
return ((int)display).ToString();
}
}