/
ivan
/
ModMas
Обзор
Документация
Войти
/
ivan
/
ModMas
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
OpenFlash/Charts/xaxis.cs
52 строки
1 KB
i.krivokon
Initial commit
13 мар 2026, 13:49
13 мар 2026, 13:49
00d9fb6
Код
Авторство
О чём код?
using System.Collections.Generic; using System.ComponentModel; using OpenFlashChartLib.Json; namespace OpenFlashChartLib.Charts { public class XAxis : Axis { private XLabelsCollection labels; private bool _offset = true; [JsonProperty("offset")] [DefaultValue(true)] public bool Offset { get { return _offset; } set { _offset = value; } } [JsonProperty("labels")] public XLabelsCollection Labels { get { if (labels == null) labels = new XLabelsCollection(); return labels; } set { labels = value; } } [JsonProperty("tick-height")] public string TickHeight { get; set; } public void SetRange(double min, double max) { Max = max; Min = min; } public bool HasLabelsChanged() { return labels != null && labels.Labels.Count > 0; } public override bool IsSpecified() { return !string.IsNullOrEmpty(TickHeight) || Offset == false || HasLabelsChanged() || base.IsSpecified(); } } }