Skip to content

Commit c26dc6e

Browse files
committed
Release 3.9.1 - .NET Framework 4.5.2
1 parent d504f8b commit c26dc6e

18 files changed

Lines changed: 938 additions & 354 deletions

.hgtags

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ cc22b265c1958c6707af431b0d3fd103c1566e9b V-03-05-00
4040
ec1eda80b38fa705d5ea8dbab4d2d2e05d468003 V-03-05-02
4141
b897a70e9ff4e2d5991bf2d05018748394031f27 V-03-06-00
4242
34159d2dd274f2204afbf9ca836c2c8a51eaa5a9 V-03-07-00
43+
5844e91ab7f4e2fab159c2a882b70f1176b6baeb V-03-07-01
44+
2018d99f7aef3e9755bf37f487751d997f49da24 V-03-07-03
45+
f44bea040065b8c033148f56fe63f5dd75c3f0be V-03-08-00
46+
c38baf3c78e6b6f60885f10166d506c43d9b0ed5 V-03-08-01
47+
16b43d00aa855d7dc5b332bc2b92356d0ffbafa9 V-03-09-00
48+
6fda79169d975d0871190e68925bb918445eb354 V-03-09-01
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace System.Windows.Forms.DataVisualization.Charting
7+
{
8+
/// <summary>
9+
/// Chart cursor label format
10+
/// </summary>
11+
public class ChartCursorLabel
12+
{
13+
/// <summary>
14+
/// Label value format
15+
/// </summary>
16+
/// <remarks>More details regarding string format at https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings </remarks>
17+
public string StringFormat { get; set; }
18+
/// <summary>
19+
/// Label prefix
20+
/// </summary>
21+
public string Prefix { get; set; }
22+
/// <summary>
23+
/// Label postfix
24+
/// </summary>
25+
public string Postfix { get; set; }
26+
/// <summary>
27+
/// Show / hide labels
28+
/// </summary>
29+
public bool Visible { get; set; } = true;
30+
}
31+
}

MSChartExtension/ChartOption.cs

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,18 @@ public class ChartOption
2525
/// </summary>
2626
public Color Cursor1Color { get; set; } = Color.Red;
2727
/// <summary>
28+
/// Cursor 1 text color, default is <see cref="Color.White"/>
29+
/// </summary>
30+
public Color Cursor1TextColor { get; set; } = Color.White;
31+
/// <summary>
2832
/// Cursor 2 Color, default is <see cref="Color.Green"/>
2933
/// </summary>
3034
public Color Cursor2Color { get; set; } = Color.Green;
3135
/// <summary>
36+
/// Cursor 2 text color, default is <see cref="Color.White"/>
37+
/// </summary>
38+
public Color Cursor2TextColor { get; set; } = Color.White;
39+
/// <summary>
3240
/// Cursor 1 Dash Style, default is <see cref="ChartDashStyle.Dash"/>
3341
/// </summary>
3442
public ChartDashStyle Cursor1DashStyle { get; set; } = ChartDashStyle.Dash;
@@ -49,6 +57,24 @@ public class ChartOption
4957
/// This feature is enabled by default.
5058
/// </summary>
5159
public bool SnapCursorToData { get; set; } = true;
60+
61+
/// <summary>
62+
/// Label format for X1
63+
/// </summary>
64+
public ChartCursorLabel CursorLabelFormatX1 { get; set; } = new ChartCursorLabel();
65+
/// <summary>
66+
/// Label format for X2
67+
/// </summary>
68+
public ChartCursorLabel CursorLabelFormatX2 { get; set; } = new ChartCursorLabel();
69+
/// <summary>
70+
/// Label format for Y1
71+
/// </summary>
72+
public ChartCursorLabel CursorLabelFormatY1 { get; set; } = new ChartCursorLabel();
73+
/// <summary>
74+
/// Label format for Y2
75+
/// </summary>
76+
public ChartCursorLabel CursorLabelFormatY2 { get; set; } = new ChartCursorLabel();
77+
5278
/// <summary>
5379
/// Define string format of cursor value. Default is "F4", 4 digits fixed decimal.
5480
/// <see cref="double.ToString(string)"/>
@@ -61,69 +87,81 @@ public class ChartOption
6187
/// <para><see cref="CursorLabelStringFormatY2"/></para>
6288
/// </summary>
6389
/// <remarks>More details regarding string format at https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings </remarks>
64-
90+
[Obsolete("Replaced by CursorLabelFormatX1, CursorLabelFormatX2, CursorLabelFormatY1, CursorLabelFormatY2")]
6591
public string CursorLabelStringFormat
6692
{
67-
get => CursorLabelStringFormatY1;
93+
get => CursorLabelFormatX1.StringFormat;
6894
set
6995
{
70-
CursorLabelStringFormatX1 = CursorLabelStringFormatX2 = value;
71-
CursorLabelStringFormatY1 = CursorLabelStringFormatY2 = value;
96+
CursorLabelFormatX1.StringFormat = CursorLabelFormatX2.StringFormat = value;
97+
CursorLabelFormatY1.StringFormat = CursorLabelFormatY2.StringFormat = value;
7298
}
7399
}
74100
/// <summary>
75101
/// Define string format for cursor value which use X primary axis.
76102
/// </summary>
77103
/// <remarks>More details regarding string format at https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings </remarks>
104+
[Obsolete("Replaced by CursorLabelFormatX1")]
78105
public string CursorLabelStringFormatX1 { get; set; }
79106
/// <summary>
80107
/// Define string format for cursor value which use X secondary axis.
81108
/// </summary>
82109
/// <remarks>More details regarding string format at https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings </remarks>
110+
[Obsolete("Replaced by CursorLabelFormatX2")]
83111
public string CursorLabelStringFormatX2 { get; set; }
84112
/// <summary>
85113
/// Define string format for cursor value which use Y primary axis.
86114
/// </summary>
87115
/// <remarks>More details regarding string format at https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings </remarks>
88-
public string CursorLabelStringFormatY1 { get; set; }
116+
[Obsolete("Replaced by CursorLabelFormatY1")]
117+
public string CursorLabelStringFormatY1 { get; set; }
89118
/// <summary>
90119
/// Define string format for cursor value which use Y secondary axis.
91120
/// </summary>
92121
/// <remarks>More details regarding string format at https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings </remarks>
122+
[Obsolete("Replaced by CursorLabelFormatY2")]
93123
public string CursorLabelStringFormatY2 { get; set; }
94124

95125
/// <summary>
96126
/// Assign prefix on label string, default is empty
97127
/// </summary>
128+
[Obsolete("Replaced by CursorLabelFormatX1")]
98129
public string CursorLabelPrefixX1 { get; set; }
99130
/// <summary>
100131
/// Assign prefix on label string, default is empty
101132
/// </summary>
133+
[Obsolete("Replaced by CursorLabelFormatX2")]
102134
public string CursorLabelPrefixX2 { get; set; }
103135
/// <summary>
104136
/// Assign prefix on label string, default is empty
105137
/// </summary>
138+
[Obsolete("Replaced by CursorLabelFormatY1")]
106139
public string CursorLabelPrefixY1 { get; set; }
107140
/// <summary>
108141
/// Assign prefix on label string, default is empty
109142
/// </summary>
143+
[Obsolete("Replaced by CursorLabelFormatY2")]
110144
public string CursorLabelPrefixY2 { get; set; }
111145

112146
/// <summary>
113147
/// Assign postfix on label string, default is empty
114148
/// </summary>
149+
[Obsolete("Replaced by CursorLabelFormatX1")]
115150
public string CursorLabelPostfixX1 { get; set; }
116151
/// <summary>
117152
/// Assign postfix on label string, default is empty
118153
/// </summary>
154+
[Obsolete("Replaced by CursorLabelFormatX2")]
119155
public string CursorLabelPostfixX2 { get; set; }
120156
/// <summary>
121157
/// Assign postfix on label string, default is empty
122158
/// </summary>
159+
[Obsolete("Replaced by CursorLabelFormatY1")]
123160
public string CursorLabelPostfixY1 { get; set; }
124161
/// <summary>
125162
/// Assign postfix on label string, default is empty
126163
/// </summary>
164+
[Obsolete("Replaced by CursorLabelFormatY2")]
127165
public string CursorLabelPostfixY2 { get; set; }
128166

129167
/// <summary>

0 commit comments

Comments
 (0)