diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-11-26 14:07:57 +0200 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-11-26 14:07:57 +0200 |
| commit | 274c76530dc20060832dd0e274851f5c5f3af6f2 (patch) | |
| tree | 51f86d51332487ab96a4954edf1a28af8adc15c9 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels | |
| parent | 5e0350325fc8082509731fb33753825aaf21e924 (diff) | |
| download | Tango-274c76530dc20060832dd0e274851f5c5f3af6f2.tar.gz Tango-274c76530dc20060832dd0e274851f5c5f3af6f2.zip | |
Set Max X axis in graph 100 or by input max value.
Related Work Items: #4153
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs index f04eccd90..4e4a0edc3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorCalibrationViewVM.cs @@ -178,6 +178,20 @@ namespace Tango.MachineStudio.RML.ViewModels set { _LabMaxVal = value; RaisePropertyChangedAuto(); } } + private int _maxLABPlotX; + /// <summary> + /// Gets or sets the maximum lab plot X values for LinearizationGraph left part + /// </summary> + public int MaxLABPlotX + { + get { return _maxLABPlotX; } + set + { + _maxLABPlotX = value; + RaisePropertyChangedAuto(); + } + } + public Plot LABLinearizationPlotControl { get; set; } public Plot LinearizationPlotControl { get; set; } private IList<DataPoint> _linearizationPoints; @@ -407,6 +421,7 @@ namespace Tango.MachineStudio.RML.ViewModels APoints.Clear(); BPoints.Clear(); LabMinVal = LabMaxVal = 0; + MaxLABPlotX = 100; LABLinearizationPlotControl.InvalidatePlot(true); List<ColorLinearizationModel.LinearizationDataItem> items; @@ -433,6 +448,12 @@ namespace Tango.MachineStudio.RML.ViewModels APoints.Add(new DataPoint(labItem.InkPercentage, labItem.A)); BPoints.Add(new DataPoint(labItem.InkPercentage, labItem.B)); } + int maxValue = (int)(items.Max(x => x.InkPercentage)); + if(maxValue >100) + { + MaxLABPlotX = maxValue; + } + LABLinearizationPlotControl.InvalidatePlot(true); if (outputPoints == null || outputPoints.Count != items.Count) |
