erp-platform/api/src/Kurs.Platform.Domain/Queries/ChartSeries.cs

78 lines
2.7 KiB
C#
Raw Normal View History

2025-09-26 20:34:03 +00:00
using System.Collections.Generic;
2025-09-26 23:40:39 +00:00
using System.Text.Json.Serialization;
2025-09-26 20:34:03 +00:00
using Volo.Abp.Domain.Values;
namespace Kurs.Platform.Queries;
public class ChartSeries : ValueObject
{
2025-09-26 23:40:39 +00:00
[JsonPropertyName("ArgumentField")]
2025-09-26 20:34:03 +00:00
public string ArgumentField { get; private set; } = "arg";
2025-09-26 23:40:39 +00:00
[JsonPropertyName("Axis")]
2025-09-26 20:34:03 +00:00
public string Axis { get; private set; }
2025-09-26 23:40:39 +00:00
[JsonPropertyName("BarOverlapGroup")]
2025-09-26 20:34:03 +00:00
public string BarOverlapGroup { get; private set; }
2025-09-26 23:40:39 +00:00
[JsonPropertyName("BarPadding")]
2025-09-26 20:34:03 +00:00
public int BarPadding { get; private set; }
2025-09-26 23:40:39 +00:00
[JsonPropertyName("BarWidth")]
2025-09-26 20:34:03 +00:00
public int BarWidth { get; private set; }
2025-09-26 23:40:39 +00:00
[JsonPropertyName("Color")]
2025-09-26 20:34:03 +00:00
public string Color { get; private set; }
2025-09-26 23:40:39 +00:00
[JsonPropertyName("CornerRadius")]
2025-09-26 20:34:03 +00:00
public int CornerRadius { get; private set; } = 0;
2025-09-26 23:40:39 +00:00
[JsonPropertyName("DashStyle")]
2025-09-26 20:34:03 +00:00
public string DashStyle { get; private set; } = "solid";
2025-09-26 23:40:39 +00:00
[JsonPropertyName("IgnoreEmptyPoints")]
2025-09-26 20:34:03 +00:00
public bool IgnoreEmptyPoints { get; private set; } = false;
2025-09-26 23:40:39 +00:00
[JsonPropertyName("Name")]
2025-09-26 20:34:03 +00:00
public string Name { get; private set; }
2025-09-26 23:40:39 +00:00
[JsonPropertyName("Pane")]
2025-09-26 20:34:03 +00:00
public string Pane { get; private set; }
2025-09-26 23:40:39 +00:00
[JsonPropertyName("RangeValue1Field")]
2025-09-26 20:34:03 +00:00
public string RangeValue1Field { get; private set; } = "val1";
2025-09-26 23:40:39 +00:00
[JsonPropertyName("RangeValue2Field")]
2025-09-26 20:34:03 +00:00
public string RangeValue2Field { get; private set; } = "val2";
2025-09-26 23:40:39 +00:00
[JsonPropertyName("SelectionMode")]
2025-09-26 20:34:03 +00:00
public string SelectionMode { get; private set; } = "none";
2025-09-26 23:40:39 +00:00
[JsonPropertyName("ShowInLegend")]
2025-09-26 20:34:03 +00:00
public bool ShowInLegend { get; private set; } = true;
2025-09-26 23:40:39 +00:00
[JsonPropertyName("Type")]
2025-09-26 20:34:03 +00:00
public string Type { get; private set; }
2025-09-26 23:40:39 +00:00
[JsonPropertyName("ValueField")]
2025-09-26 20:34:03 +00:00
public string ValueField { get; private set; }
2025-09-26 23:40:39 +00:00
[JsonPropertyName("Visible")]
2025-09-26 20:34:03 +00:00
public bool Visible { get; private set; } = true;
2025-09-26 23:40:39 +00:00
[JsonPropertyName("Width")]
2025-09-26 20:34:03 +00:00
public int Width { get; private set; } = 2;
2025-09-26 23:40:39 +00:00
[JsonPropertyName("Label")]
2025-09-26 20:34:03 +00:00
public ChartLabel Label { get; private set; }
2025-09-26 23:40:39 +00:00
// EF Core + JSON için korumalı ctor
public ChartSeries() { }
2025-09-26 20:34:03 +00:00
protected override IEnumerable<object> GetAtomicValues()
{
yield return ArgumentField;
yield return Axis;
yield return BarOverlapGroup;
yield return BarPadding;
yield return BarWidth;
yield return Color;
yield return CornerRadius;
yield return DashStyle;
yield return IgnoreEmptyPoints;
yield return Name;
yield return Pane;
yield return RangeValue1Field;
yield return RangeValue2Field;
yield return SelectionMode;
yield return ShowInLegend;
yield return Type;
yield return ValueField;
yield return Visible;
yield return Width;
yield return Label;
}
}