feat(Documents) Notes/Docs page improvements and warning cleanup
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using Model.Immortal.Chart.Enums;
|
||||
using Model.Chart.Enums;
|
||||
|
||||
namespace Model.Immortal.Chart;
|
||||
namespace Model.Chart;
|
||||
|
||||
public class ChartModel {
|
||||
public class ChartModel
|
||||
{
|
||||
public List<PointModel> Points { get; set; } = new();
|
||||
public string ChartColor { get; set; } = ChartColorType.Red.ToString();
|
||||
|
||||
@@ -14,10 +15,12 @@ public class ChartModel {
|
||||
public float HighestIntervalPoint { get; set; } = 5000;
|
||||
public float HighestValuePoint { get; set; } = 5000;
|
||||
|
||||
public static List<ChartModel> GetAll() {
|
||||
public static List<ChartModel> GetAll()
|
||||
{
|
||||
var cs = new List<ChartModel>();
|
||||
|
||||
var c1 = new ChartModel {
|
||||
var c1 = new ChartModel
|
||||
{
|
||||
IntervalDisplayMax = 1000,
|
||||
ValueDisplayMax = 300,
|
||||
ChartColor = "Orange",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
namespace Model.Immortal.Chart.Enums;
|
||||
namespace Model.Chart.Enums;
|
||||
|
||||
public enum ChartColorType {
|
||||
public enum ChartColorType
|
||||
{
|
||||
Red,
|
||||
LightGreen,
|
||||
Cyan,
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
namespace Model.Immortal.Chart;
|
||||
namespace Model.Chart;
|
||||
|
||||
public class PointModel {
|
||||
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) {
|
||||
public string GetInterval(float highestInterval, float displayScale)
|
||||
{
|
||||
var display = Interval / highestInterval * displayScale;
|
||||
return ((int)display).ToString();
|
||||
}
|
||||
|
||||
public string GetValue(float highestValue, float displayScale) {
|
||||
public string GetValue(float highestValue, float displayScale)
|
||||
{
|
||||
var display = Value / highestValue * displayScale;
|
||||
return ((int)display).ToString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user