From 9a506f235ce7903e345f2deecccdfd91bbc88304 Mon Sep 17 00:00:00 2001 From: Matthew Strasiotto <39424834+matthewstrasiotto@users.noreply.github.com> Date: Sat, 1 May 2021 20:33:57 +1000 Subject: remove Settings.Settings based config, migrate defintitions to constants --- grapher/Models/Charts/ChartXY.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'grapher/Models') diff --git a/grapher/Models/Charts/ChartXY.cs b/grapher/Models/Charts/ChartXY.cs index 969607c..d247264 100644 --- a/grapher/Models/Charts/ChartXY.cs +++ b/grapher/Models/Charts/ChartXY.cs @@ -91,8 +91,6 @@ namespace grapher public static void setChartColors(Chart chart, System.Drawing.Color fgColor, System.Drawing.Color bgColor) { - // System.Drawing.Color fgColor = global::grapher.Properties.Settings.Default.Chart_FG_Colour; - // System.Drawing.Color bgColor = global::grapher.Properties.Settings.Default.Chart_BG_Colour; System.Drawing.Color bgTrans = System.Drawing.Color.Transparent; chart.ForeColor = fgColor; @@ -154,15 +152,15 @@ namespace grapher chart.Series[1].Points.Clear(); chart.Series[1].Points.AddXY(0, 0); - area.AxisX.TitleFont = new System.Drawing.Font(area.AxisX.TitleFont.Name, global::grapher.Properties.Settings.Default.Chart_Axis_Font_Size, System.Drawing.FontStyle.Bold); + area.AxisX.TitleFont = new System.Drawing.Font(area.AxisX.TitleFont.Name, Constants.ChartAxisFontSize, System.Drawing.FontStyle.Bold); area.AxisY.TitleFont = area.AxisX.TitleFont; - title.Font = new System.Drawing.Font(title.Font.Name, global::grapher.Properties.Settings.Default.Chart_Font_Size, System.Drawing.FontStyle.Italic | System.Drawing.FontStyle.Bold); - int line_width = global::grapher.Properties.Settings.Default.Chart_Series_Line_Width; - chart.Series[0].BorderWidth = line_width; - chart.Series[0].MarkerSize = line_width * 2; - chart.Series[2].BorderWidth = line_width; - chart.Series[2].MarkerSize = line_width * 2; + title.Font = new System.Drawing.Font(title.Font.Name, Constants.ChartTitleFontSize, System.Drawing.FontStyle.Italic | System.Drawing.FontStyle.Bold); + + chart.Series[0].BorderWidth = Constants.ChartSeriesLineWidth; + chart.Series[0].MarkerSize = Constants.ChartSeriesLineWidth * 2; + chart.Series[2].BorderWidth = Constants.ChartSeriesLineWidth; + chart.Series[2].MarkerSize = Constants.ChartSeriesLineWidth * 2; area.AxisX.MinorGrid.Enabled = true; area.AxisX.MinorGrid.LineDashStyle = ChartDashStyle.Dot; -- cgit v1.2.3