Changeset 14006 for branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/GradientChart.cs
- Timestamp:
- 07/05/16 22:43:11 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/GradientChart.cs
r13995 r14006 82 82 if ((value.HasValue && fixedXAxisMin.HasValue && !value.Value.IsAlmost(fixedXAxisMin.Value)) || (value.HasValue != fixedXAxisMin.HasValue)) { 83 83 fixedXAxisMin = value; 84 SetupAxis(chart.ChartAreas[0].AxisX, trainingMin, trainingMax, XAxisTicks, FixedXAxisMin, FixedXAxisMax); 85 RecalculateInternalDataset(); 84 if (trainingMin < trainingMax) { 85 SetupAxis(chart.ChartAreas[0].AxisX, trainingMin, trainingMax, XAxisTicks, FixedXAxisMin, FixedXAxisMax); 86 RecalculateInternalDataset(); 87 // set the vertical line position 88 if (VerticalLineAnnotation.X <= fixedXAxisMin) { 89 var axisX = chart.ChartAreas[0].AxisX; 90 var step = (axisX.Maximum - axisX.Minimum) / drawingSteps; 91 VerticalLineAnnotation.X = axisX.Minimum + step; 92 } 93 } 86 94 } 87 95 } … … 93 101 if ((value.HasValue && fixedXAxisMax.HasValue && !value.Value.IsAlmost(fixedXAxisMax.Value)) || (value.HasValue != fixedXAxisMax.HasValue)) { 94 102 fixedXAxisMax = value; 95 SetupAxis(chart.ChartAreas[0].AxisX, trainingMin, trainingMax, XAxisTicks, FixedXAxisMin, FixedXAxisMax); 96 RecalculateInternalDataset(); 103 if (trainingMin < trainingMax) { 104 SetupAxis(chart.ChartAreas[0].AxisX, trainingMin, trainingMax, XAxisTicks, FixedXAxisMin, FixedXAxisMax); 105 RecalculateInternalDataset(); 106 // set the vertical line position 107 if (VerticalLineAnnotation.X >= fixedXAxisMax) { 108 var axisX = chart.ChartAreas[0].AxisX; 109 var step = (axisX.Maximum - axisX.Minimum) / drawingSteps; 110 VerticalLineAnnotation.X = axisX.Maximum - step; 111 } 112 } 97 113 } 98 114 } … … 267 283 var minimum = chart.ChartAreas[0].AxisX.Minimum; 268 284 var maximum = chart.ChartAreas[0].AxisX.Maximum; 269 if (defaultValue .IsAlmost(minimum))285 if (defaultValue <= minimum) 270 286 VerticalLineAnnotation.X = minimum + step; 271 else if (defaultValue .IsAlmost(maximum))287 else if (defaultValue >= maximum) 272 288 VerticalLineAnnotation.X = maximum - step; 273 289 else … … 536 552 537 553 lowerStripLine.IntervalOffset = axisX.Minimum; 538 lowerStripLine.StripWidth = trainingMin - axisX.Minimum;554 lowerStripLine.StripWidth = Math.Abs(trainingMin - axisX.Minimum); 539 555 540 556 upperStripLine.IntervalOffset = trainingMax; 541 upperStripLine.StripWidth = axisX.Maximum - trainingMax;557 upperStripLine.StripWidth = Math.Abs(axisX.Maximum - trainingMax); 542 558 } 543 559
Note: See TracChangeset
for help on using the changeset viewer.