11 private SKColor backgroundColor = SKColors.White;
12 private SKColor axisColor = SKColors.Black;
13 private SKColor gridColor = SKColors.LightGray;
14 private string fontName =
"Segoe UI";
15 private double labelFontSize = 12;
16 private int axisWidth = 2;
17 private int gridWidth = 1;
18 private int approxNrLabelsX = 5;
19 private int approxNrLabelsY = 10;
20 private int width = 640;
21 private int height = 480;
22 private int marginTop = 10;
23 private int marginBottom = 10;
24 private int marginLeft = 15;
25 private int marginRight = 15;
26 private int marginLabel = 5;
43 backgroundColor = this.backgroundColor,
44 axisColor = this.axisColor,
45 gridColor = this.gridColor,
46 fontName = this.fontName,
47 labelFontSize = this.labelFontSize,
48 axisWidth = this.axisWidth,
49 gridWidth = this.gridWidth,
50 approxNrLabelsX = this.approxNrLabelsX,
51 approxNrLabelsY = this.approxNrLabelsY,
54 marginTop = this.marginTop,
55 marginBottom = this.marginBottom,
56 marginLeft = this.marginLeft,
57 marginRight = this.marginRight,
58 marginLabel = this.marginLabel
71 throw new ArgumentOutOfRangeException(
"Value must be positive.", nameof(this.
Width));
86 throw new ArgumentOutOfRangeException(
"Value must be positive.", nameof(this.
Height));
97 get => this.backgroundColor;
98 set => this.backgroundColor = value;
106 get => this.axisColor;
107 set => this.axisColor = value;
115 get => this.axisWidth;
119 throw new ArgumentOutOfRangeException(
"Value must be non-negative.", nameof(this.
AxisWidth));
121 this.axisWidth = value;
130 get => this.gridColor;
131 set => this.gridColor = value;
139 get => this.gridWidth;
143 throw new ArgumentOutOfRangeException(
"Value must be non-negative.", nameof(this.
GridWidth));
145 this.gridWidth = value;
154 get => this.marginTop;
158 throw new ArgumentOutOfRangeException(
"Value must be non-negative.", nameof(this.
MarginTop));
160 this.marginTop = value;
169 get => this.marginBottom;
173 throw new ArgumentOutOfRangeException(
"Value must be non-negative.", nameof(this.
MarginBottom));
175 this.marginBottom = value;
184 get => this.marginLeft;
188 throw new ArgumentOutOfRangeException(
"Value must be non-negative.", nameof(this.
MarginLeft));
190 this.marginLeft = value;
199 get => this.marginRight;
203 throw new ArgumentOutOfRangeException(
"Value must be non-negative.", nameof(this.
MarginRight));
205 this.marginRight = value;
214 get => this.marginLabel;
218 throw new ArgumentOutOfRangeException(
"Value must be non-negative.", nameof(this.
MarginLabel));
220 this.marginLabel = value;
229 get => this.fontName;
232 if (
string.IsNullOrEmpty(value))
233 throw new ArgumentException(
"Value cannot be empty.", nameof(this.
FontName));
235 this.fontName = value;
244 get => this.labelFontSize;
248 throw new ArgumentOutOfRangeException(
"Value must be positive.", nameof(this.
LabelFontSize));
250 this.labelFontSize = value;
259 get => this.approxNrLabelsX;
263 throw new ArgumentOutOfRangeException(
"Value must be non-negative.", nameof(this.
ApproxNrLabelsX));
265 this.approxNrLabelsX = value;
274 get => this.approxNrLabelsY;
278 throw new ArgumentOutOfRangeException(
"Value must be non-negative.", nameof(this.
ApproxNrLabelsY));
280 this.approxNrLabelsY = value;
SKColor AxisColor
Axis color.
SKColor BackgroundColor
Background color.
int ApproxNrLabelsY
Approximate number of labels along the Y-axis.
int MarginLabel
Label margin.
int MarginRight
Right margin.
int ApproxNrLabelsX
Approximate number of labels along the X-axis.
GraphSettings()
Graph settings.
int MarginLeft
Left margin.
int MarginBottom
Bottom margin.
double LabelFontSize
Label font size
SKColor GridColor
Grid color.
int Width
Width of graph, in pixels. (Default=640 pixels.)
int Height
Height of graph, in pixels. (Default=480 pixels.)
GraphSettings Copy()
Copies the graph settings.
string FontName
Font name.