Changeset 1979 for trunk/sources/HeuristicLab.Visualization
- Timestamp:
- 05/31/09 20:12:04 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/sources/HeuristicLab.Visualization/3.2/LineChart.cs ¶
r1977 r1979 72 72 UpdateLayout(); 73 73 ZoomToFullView(); 74 } 75 76 public Bitmap Snapshot() { 77 UpdateLayout(); 78 Bitmap bmp = new Bitmap(Width, Height); 79 using (Graphics g = Graphics.FromImage(bmp)) { 80 canvas.Draw(g); 81 } 82 return bmp; 74 83 } 75 84 … … 392 401 393 402 foreach (RowEntry rowEntry in rowEntries) { 394 YAxisDescriptor yAxisDescriptor = rowEntry.DataRow.YAxis; 395 396 SetClipY(rowEntry, 397 yAxisDescriptor.MinValue - ((yAxisDescriptor.MaxValue - yAxisDescriptor.MinValue)*0.05), 398 yAxisDescriptor.MaxValue + ((yAxisDescriptor.MaxValue - yAxisDescriptor.MinValue)*0.05)); 403 YAxisDescriptor yAxis = rowEntry.DataRow.YAxis; 404 405 double padding = (yAxis.MaxValue - yAxis.MinValue)*0.05; 406 407 double ymin = yAxis.MinValue - padding; 408 double ymax = yAxis.MaxValue + padding; 409 410 if (Math.Abs(ymin-ymax) < double.Epsilon*5) { 411 ymin -= 0.1; 412 ymax += 0.1; 413 } 414 415 SetClipY(rowEntry, ymin, ymax); 399 416 } 400 417
Note: See TracChangeset
for help on using the changeset viewer.