- Timestamp:
- 04/12/11 20:19:50 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HistogramControl.cs
r5994 r6007 114 114 } 115 115 116 double current = minValue ;116 double current = minValue, intervalCenter = intervalWidth / 2.0; 117 117 int count = 0; 118 118 foreach (double v in points.OrderBy(x => x)) { 119 if (v < current + intervalWidth) { 120 count++; 121 } else { 122 histogramSeries.Points.AddXY(current + intervalWidth / 2.0, count); 123 count = 1; 124 while (v >= current + intervalWidth) current += intervalWidth; 119 while (v > current + intervalWidth) { 120 histogramSeries.Points.AddXY(current + intervalCenter, count); 121 current += intervalWidth; 122 count = 0; 125 123 } 124 count++; 126 125 } 127 histogramSeries.Points.AddXY(current + interval Width / 2.0, count);126 histogramSeries.Points.AddXY(current + intervalCenter, count); 128 127 129 128 histogramSeries["PointWidth"] = "1";
Note: See TracChangeset
for help on using the changeset viewer.