using System.Collections.Generic; using Model.Chart.Enums; namespace Model.Chart; public class ChartModel { public List 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 GetAll() { var cs = new List(); var c1 = new ChartModel { IntervalDisplayMax = 1000, ValueDisplayMax = 300, ChartColor = "Orange", Points = new List() }; 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; } }