private void PlotAreaData() { currAreaInspectionIndex = inspectorTool.areaInspectorPanel.areaInspector.CurrAreaInspection; if (currAreaInspectionIndex == -1) { return; } AreaPS currPS = areaPS[currAreaInspectionIndex]; foreach (var inspectorOutputItem in areaDO.itemslist) { InspectorOutputItemLabel inspectorOutputItemLabel = null; string itemName = inspectorOutputItem.name; if (areaDO.inspectorOutputItemLabels.ContainsKey(itemName)) { inspectorOutputItemLabel = areaDO.inspectorOutputItemLabels[itemName]; } else { inspectorOutputItemLabel = Instantiate(itemPrefab, areaPSUIRef.container, false); inspectorOutputItemLabel.name = itemName; inspectorOutputItemLabel.SetName(itemName); inspectorOutputItemLabel.SetUnitsValue(inspectorOutputItem.units); inspectorOutputItemLabel.SetDotColor(inspectorOutputItem.dotColor); areaDO.inspectorOutputItemLabels.Add(itemName, inspectorOutputItemLabel); } float max = inspectorOutputItem.maxVal, min = inspectorOutputItem.minVal, median = inspectorOutputItem.medianVal, mean = inspectorOutputItem.meanVal, sum = inspectorOutputItem.sumVal; inspectorOutputItemLabel.SetMaxValue(max.ToString("#,##0.##")); inspectorOutputItemLabel.SetMedianValue(median.ToString("#,##0.##")); inspectorOutputItemLabel.SetMinValue(min.ToString("#,##0.##")); inspectorOutputItemLabel.SetMeanValue(mean.ToString("#,##0.##")); inspectorOutputItemLabel.SetSumValue(sum.ToString("#,##0.##")); PS.AddOrUpdateMetric(currPS.maxVal, itemName, max); PS.AddOrUpdateMetric(currPS.minVal, itemName, min); PS.AddOrUpdateMetric(currPS.medianVal, itemName, median); PS.AddOrUpdateMetric(currPS.meanVal, itemName, mean); PS.AddOrUpdateMetric(currPS.sumVal, itemName, sum); } }
private void PlotData() { currLineInspectionIndex = inspectorTool.lineInspectorPanel.lineInspector.CurrLineInspection; if (currLineInspectionIndex == -1) { return; } PropertiesAndSummaries currPropertiesAndSummaries = propertiesAndSummaries[currLineInspectionIndex]; foreach (var inspectorOutputItem in itemslist) { InspectorOutputItemLabel inspectorOutputItemLabel = null; string itemName = inspectorOutputItem.name; if (inspectorOutputItemLabels.ContainsKey(itemName)) { inspectorOutputItemLabel = inspectorOutputItemLabels[itemName]; } else { inspectorOutputItemLabel = Instantiate(itemPrefab, container, false); inspectorOutputItemLabel.name = itemName; inspectorOutputItemLabel.SetName(itemName); inspectorOutputItemLabel.SetUnitsValue(inspectorOutputItem.units); inspectorOutputItemLabel.SetDotColor(inspectorOutputItem.dotColor); inspectorOutputItemLabels.Add(itemName, inspectorOutputItemLabel); } float max = inspectorOutputItem.maxVal, min = inspectorOutputItem.minVal, median = inspectorOutputItem.medianVal; inspectorOutputItemLabel.SetMaxValue(max.ToString("#,##0.##")); inspectorOutputItemLabel.SetMedianValue(median.ToString("#,##0.##")); inspectorOutputItemLabel.SetMinValue(min.ToString("#,##0.##")); AddOrUpdateMetric(currPropertiesAndSummaries.maxVal, itemName, max); AddOrUpdateMetric(currPropertiesAndSummaries.minVal, itemName, min); AddOrUpdateMetric(currPropertiesAndSummaries.medianVal, itemName, median); } }
private void PlotContourData() { foreach (var inspectorOutputItem in contourDO.itemslist) { InspectorOutputItemLabel inspectorOutputItemLabel = null; string itemName = inspectorOutputItem.name; if (contourDO.inspectorOutputItemLabels.ContainsKey(itemName)) { inspectorOutputItemLabel = contourDO.inspectorOutputItemLabels[itemName]; } else { inspectorOutputItemLabel = Instantiate(itemPrefab, contourPSUIRef.container, false); inspectorOutputItemLabel.name = itemName; inspectorOutputItemLabel.SetName(itemName); inspectorOutputItemLabel.SetUnitsValue(inspectorOutputItem.units); inspectorOutputItemLabel.SetDotColor(inspectorOutputItem.dotColor); contourDO.inspectorOutputItemLabels.Add(itemName, inspectorOutputItemLabel); } float max = inspectorOutputItem.maxVal, min = inspectorOutputItem.minVal, mean = inspectorOutputItem.meanVal, median = inspectorOutputItem.medianVal, sum = inspectorOutputItem.sumVal; inspectorOutputItemLabel.SetMaxValue(max.ToString("#,##0.##")); inspectorOutputItemLabel.SetMeanValue(mean.ToString("#,##0.##")); inspectorOutputItemLabel.SetMedianValue(median.ToString("#,##0.##")); inspectorOutputItemLabel.SetMinValue(min.ToString("#,##0.##")); inspectorOutputItemLabel.SetSumValue(sum.ToString("#,##0.##")); PS.AddOrUpdateMetric(contourPS.maxVal, itemName, max); PS.AddOrUpdateMetric(contourPS.minVal, itemName, min); PS.AddOrUpdateMetric(contourPS.meanVal, itemName, mean); PS.AddOrUpdateMetric(contourPS.medianVal, itemName, median); PS.AddOrUpdateMetric(contourPS.sumVal, itemName, sum); } }