From 0400072bd75cc37a1c0b39eb86cf340a62c998fe Mon Sep 17 00:00:00 2001 From: ncguilbeault Date: Tue, 19 Nov 2024 21:08:58 +0000 Subject: [PATCH] Added check to ensure heatmap color axis values if max or min text box is set to auto --- src/Bonsai.ML.Design/HeatMapSeriesOxyPlotBase.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Bonsai.ML.Design/HeatMapSeriesOxyPlotBase.cs b/src/Bonsai.ML.Design/HeatMapSeriesOxyPlotBase.cs index e9ddf640..d6944816 100644 --- a/src/Bonsai.ML.Design/HeatMapSeriesOxyPlotBase.cs +++ b/src/Bonsai.ML.Design/HeatMapSeriesOxyPlotBase.cs @@ -161,6 +161,11 @@ private void InitializeColorAxisValues() { colorAxis.Maximum = maxValue; } + else if (maxValueTextBox.Text.ToLower() == "auto") + { + colorAxis.Maximum = double.NaN; + maxValueTextBox.Text = "auto"; + } else { colorAxis.Maximum = heatMapSeries.MaxValue; @@ -187,6 +192,11 @@ private void InitializeColorAxisValues() { colorAxis.Minimum = minValue; } + else if (minValueTextBox.Text.ToLower() == "auto") + { + colorAxis.Minimum = double.NaN; + minValueTextBox.Text = "auto"; + } else { colorAxis.Minimum = heatMapSeries.MinValue;