Skip to content

Commit

Permalink
Merge pull request #38 from bonsai-rx/fix/heatmap-max-min-auto
Browse files Browse the repository at this point in the history
Fix heatmap color axis when max or min properties are set to auto
  • Loading branch information
ncguilbeault authored Jan 10, 2025
2 parents 12f0d79 + 0400072 commit db0ab0e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Bonsai.ML.Design/HeatMapSeriesOxyPlotBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit db0ab0e

Please sign in to comment.