Changeset 570 for trunk/sources/HeuristicLab.CEDMA.Charting
- Timestamp:
- 09/14/08 17:36:38 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChart.cs
r569 r570 139 139 double minSize = 1; 140 140 if(sizeDimension != null) { 141 var sizes = records.Select(r => r.Get(sizeDimension)) ;142 m axSize = sizes.Max();143 m inSize = sizes.Min();141 var sizes = records.Select(r => r.Get(sizeDimension)).Where(x => !double.IsInfinity(x) && x != double.MaxValue && x != double.MinValue).OrderBy(x=>x); 142 minSize = sizes.ElementAt((int)(sizes.Count() * 0.1)); 143 maxSize = sizes.ElementAt((int)(sizes.Count() * 0.9)); 144 144 } 145 145 UpdateEnabled = false; … … 175 175 176 176 private int CalculateSize(double size, double minSize, double maxSize) { 177 if(double.IsNaN(size)) return minBubbleSize; 177 if(double.IsNaN(size) || double.IsInfinity(size) || size == double.MaxValue || size == double.MinValue) return minBubbleSize; 178 if(size > maxSize) size = maxSize; 179 if(size < minSize) size = minSize; 178 180 double sizeDifference = ((size - minSize) / (maxSize - minSize) * (maxBubbleSize - minBubbleSize)); 179 181 if(invertSize) return maxBubbleSize - (int)sizeDifference;
Note: See TracChangeset
for help on using the changeset viewer.