-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSeriesStyle.cs
62 lines (44 loc) · 1.52 KB
/
SeriesStyle.cs
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
62
using System;
using System.ComponentModel;
using System.Drawing;
namespace SuperPerformanceChart
{
[TypeConverter(typeof(ExpandableObjectConverter))]
public class SeriesStyle
{
public SeriesStyle(Color basecolor)
{
// Defaults
Text = new TextStyle(Color.Black);
Text.Font = new Font("Verdana", 8);
Line = new LineStyle(basecolor);
Line.Width = 2;
AverageLine = new LineStyle(basecolor);
AverageLine.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
AverageLine.Visible = false;
BestFitLine = new LineStyle(basecolor);
BestFitLine.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
BestFitLine.Visible = false;
Fill = new FillStyle(basecolor);
Fill.Alpha = 120;
Point = new PointStyle(basecolor);
Point.Visible = false;
Smooth = false;
Tension = 0.5F;
}
public SeriesStyle() : this(Color.CornflowerBlue)
{
}
#region Properties
public string NumberFormat { get; set; } = "0.00";
public bool Smooth { get; set; }
public float Tension { get; set; } = 0.3F;
public FillStyle Fill { get; }
public LineStyle Line { get; }
public LineStyle BestFitLine { get; }
public LineStyle AverageLine { get; }
public TextStyle Text { get; }
public PointStyle Point { get; }
#endregion
}
}