Repository navigation
Expand file tree
/
Copy pathPlotItem.cs
More file actions
61 lines (50 loc) · 1.72 KB
/
Copy pathPlotItem.cs
File metadata and controls
61 lines (50 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using Newtonsoft.Json;
namespace MatplotlibCS.PlotItems
{
/// <summary>
/// Базовый класс для элементов, которые отрисовываются на графике
/// </summary>
public abstract class PlotItem : IHealthCheck
{
#region Properties
/// <summary>
/// Name of the type of the plot item (line, histogram, text etc
/// </summary>
[JsonProperty(PropertyName = "type")]
public string Type => GetType().Name;
/// <summary>
/// Unique (within axes) name of a plot item
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Optional fields which can be used to filter plot items. For example, one can precreate all plot items and then save several images with
/// different visible items, be setting IsVisible property
/// </summary>
public string Tags { get; set; } = "";
/// <summary>
/// If false, item will not be drawn
/// </summary>
[JsonProperty(PropertyName = "is_visible")]
public bool IsVisible { get; set; } = true;
/// <summary>
/// Whether to show this item in legend
/// </summary>
[JsonProperty(PropertyName = "show_legend")]
public bool ShowLegend { get; set; } = true;
#endregion
#region .ctor
/// <summary>
/// .ctor
/// </summary>
/// <param name="name">Unique name of a plot item</param>
protected PlotItem(string name)
{
Name = name;
}
#endregion
public virtual void HealthCheck()
{
}
}
}