78 lines
2 KiB
C#
78 lines
2 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text.Json.Serialization;
|
|
using Volo.Abp.Domain.Values;
|
|
|
|
namespace Sozsoft.Platform.Queries;
|
|
|
|
public class ChartValueAxis : ValueObject
|
|
{
|
|
[JsonInclude]
|
|
[JsonPropertyName("Grid")]
|
|
public ChartAxisGrid Grid { get; private set; }
|
|
|
|
[JsonInclude]
|
|
[JsonPropertyName("Name")]
|
|
public string Name { get; private set; }
|
|
|
|
[JsonInclude]
|
|
[JsonPropertyName("Position")]
|
|
public string Position { get; private set; } = "left";
|
|
|
|
[JsonInclude]
|
|
[JsonPropertyName("Title")]
|
|
public string Title { get; private set; }
|
|
|
|
[JsonInclude]
|
|
[JsonPropertyName("ValueType")]
|
|
public string ValueType { get; private set; } = "numeric";
|
|
|
|
[JsonInclude]
|
|
[JsonPropertyName("Visible")]
|
|
public bool Visible { get; private set; } = true;
|
|
|
|
[JsonInclude]
|
|
[JsonPropertyName("Width")]
|
|
public int Width { get; private set; } = 1;
|
|
|
|
[JsonInclude]
|
|
[JsonPropertyName("Breaks")]
|
|
public List<Break> Breaks { get; private set; } = new();
|
|
|
|
[JsonInclude]
|
|
[JsonPropertyName("BreakStyle")]
|
|
public BreakStyle BreakStyle { get; private set; } = new();
|
|
|
|
[JsonInclude]
|
|
[JsonPropertyName("Type")]
|
|
public string Type { get; private set; }
|
|
|
|
[JsonInclude]
|
|
[JsonPropertyName("AutoBreaksEnabled")]
|
|
public bool AutoBreaksEnabled { get; private set; } = true;
|
|
|
|
[JsonInclude]
|
|
[JsonPropertyName("MaxAutoBreakCount")]
|
|
public int MaxAutoBreakCount { get; private set; } = 2;
|
|
|
|
[JsonConstructor]
|
|
protected ChartValueAxis() { }
|
|
|
|
protected override IEnumerable<object> GetAtomicValues()
|
|
{
|
|
yield return Grid;
|
|
yield return Name;
|
|
yield return Position;
|
|
yield return Title;
|
|
yield return ValueType;
|
|
yield return Visible;
|
|
yield return Width;
|
|
foreach (var br in Breaks)
|
|
yield return br;
|
|
yield return BreakStyle;
|
|
yield return Type;
|
|
yield return AutoBreaksEnabled;
|
|
yield return MaxAutoBreakCount;
|
|
}
|
|
}
|
|
|