diff options
| author | Matthew Strasiotto <[email protected]> | 2021-05-01 20:09:43 +1000 |
|---|---|---|
| committer | Matthew Strasiotto <[email protected]> | 2021-05-01 20:10:15 +1000 |
| commit | fe5cd0a2f0c02878af32c80655d1bd3f3b6a2107 (patch) | |
| tree | 2cf2d5a47a3e1d4dfeafc4d7df9aca2b42fa051b | |
| parent | add colours to contants (diff) | |
| download | rawaccel-fe5cd0a2f0c02878af32c80655d1bd3f3b6a2107.tar.xz rawaccel-fe5cd0a2f0c02878af32c80655d1bd3f3b6a2107.zip | |
Implement ChartXY.SetStreaming, sets colours, colors not set in setup
| -rw-r--r-- | grapher/Models/Charts/ChartXY.cs | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/grapher/Models/Charts/ChartXY.cs b/grapher/Models/Charts/ChartXY.cs index 237538f..d2247cb 100644 --- a/grapher/Models/Charts/ChartXY.cs +++ b/grapher/Models/Charts/ChartXY.cs @@ -89,10 +89,10 @@ namespace grapher #region Methods - public static void setChartColors(Chart chart) + 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 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; @@ -176,8 +176,6 @@ namespace grapher ElementPosition legendPosNew = new ElementPosition(75, 0, 25, 25); legend.Position = legendPosNew; - - setChartColors(chart); } public static void DrawPoint(Chart chart, PointData pointOne, PointData pointTwo = null) @@ -374,6 +372,22 @@ namespace grapher ChartY.Height = height; } + public void SetStreaming(bool streaming) + { + var fgColor = Constants.fgNoStreamer; + var bgColor = Constants.bgNoStreamer; + + if (streaming) + { + fgColor = Constants.fgStreamer; + bgColor = Constants.bgStreamer; + } + + setChartColors(ChartX, fgColor, bgColor); + setChartColors(ChartY, fgColor, bgColor); + Update(); + } + private string SetComponentTitle(string component) { return $"{Title} : {component}"; |