ChartWindow: Change gebunden color to yellow

This commit is contained in:
2024-01-20 02:09:03 +01:00
parent 6a5676f916
commit bf90543ad8

View File

@ -19,6 +19,9 @@ using ScottPlot.Plottable;
namespace Elwig.Windows { namespace Elwig.Windows {
public partial class ChartWindow : ContextWindow { public partial class ChartWindow : ContextWindow {
public static readonly Color ColorUngebunden = Color.Blue;
public static readonly Color ColorGebunden = Color.Gold;
public readonly int Year; public readonly int Year;
public readonly int AvNr; public readonly int AvNr;
private readonly PaymentVar PaymentVar; private readonly PaymentVar PaymentVar;
@ -132,14 +135,14 @@ namespace Elwig.Windows {
private void InitPlot() { private void InitPlot() {
if (SelectedGraphEntry?.GebundenGraph != null) { if (SelectedGraphEntry?.GebundenGraph != null) {
GebundenPlot = OechslePricePlot.Plot.AddScatter(SelectedGraphEntry.GebundenGraph.DataX, SelectedGraphEntry.GebundenGraph.DataY); GebundenPlot = OechslePricePlot.Plot.AddScatter(SelectedGraphEntry.GebundenGraph.DataX, SelectedGraphEntry.GebundenGraph.DataY);
GebundenPlot.LineColor = Color.Green; GebundenPlot.LineColor = ColorGebunden;
GebundenPlot.MarkerColor = Color.Green; GebundenPlot.MarkerColor = ColorGebunden;
GebundenPlot.MarkerSize = 9; GebundenPlot.MarkerSize = 9;
} }
DataPlot = OechslePricePlot.Plot.AddScatter(SelectedGraphEntry!.DataGraph.DataX, SelectedGraphEntry!.DataGraph.DataY); DataPlot = OechslePricePlot.Plot.AddScatter(SelectedGraphEntry!.DataGraph.DataX, SelectedGraphEntry!.DataGraph.DataY);
DataPlot.LineColor = Color.Blue; DataPlot.LineColor = ColorUngebunden;
DataPlot.MarkerColor = Color.Blue; DataPlot.MarkerColor = ColorUngebunden;
DataPlot.MarkerSize = 9; DataPlot.MarkerSize = 9;
if (SelectedGraphEntry?.GebundenGraph == null) { if (SelectedGraphEntry?.GebundenGraph == null) {
@ -327,7 +330,7 @@ namespace Elwig.Windows {
private void PriceInput_TextChanged(object sender, TextChangedEventArgs evt) { private void PriceInput_TextChanged(object sender, TextChangedEventArgs evt) {
if (PrimaryMarkedPoint != -1 && ActiveGraph != null) { if (PrimaryMarkedPoint != -1 && ActiveGraph != null) {
bool success = Double.TryParse(PriceInput.Text, out double price); bool success = double.TryParse(PriceInput.Text, out double price);
if (success) { if (success) {
ActiveGraph.SetPriceAt(PrimaryMarkedPoint, price); ActiveGraph.SetPriceAt(PrimaryMarkedPoint, price);