Changeset 1608
- Timestamp:
- 04/18/09 14:41:09 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/3.2/LineChart.cs
r1603 r1608 83 83 private void UpdateLayout() { 84 84 canvas.ClearShapes(); 85 86 titleShape.Text = model.Title; 85 87 86 88 foreach (YAxisDescriptor yAxisDescriptor in model.YAxes) { … … 249 251 public void setLegendBottom() { 250 252 // legend bottom 251 legendShape.BoundingBox = new RectangleD(100, 10, canvasUI.Width, canvasUI.Height /*legendShape.GetHeight4Rows()*/);253 legendShape.BoundingBox = new RectangleD(100, 10, canvasUI.Width, canvasUI.Height /*legendShape.GetHeight4Rows()*/); 252 254 legendShape.ClippingArea = new RectangleD(0, 0, legendShape.BoundingBox.Width, legendShape.BoundingBox.Height); 253 255 legendShape.Row = true; … … 393 395 LineShape lineShape = new LineShape(i - 1, row[i - 1], i, row[i], row.Color, row.Thickness, row.Style); 394 396 rowEntry.LinesShape.AddShape(lineShape); 395 rowEntry.LinesShape.AddMarkerShape(new MarkerShape(i -1,row[i-1],8,row.Color));396 } 397 if (row.Count>0)397 rowEntry.LinesShape.AddMarkerShape(new MarkerShape(i - 1, row[i - 1], 8, row.Color)); 398 } 399 if (row.Count > 0) { 398 400 rowEntry.LinesShape.AddMarkerShape(new MarkerShape((row.Count - 1), row[(row.Count - 1)], 8, row.Color)); 401 } 399 402 } 400 403 … … 410 413 row.Style); 411 414 rowEntry.LinesShape.AddShape(lineShape); 412 413 415 } else { 414 416 LineShape lineShape = rowEntry.LinesShape.GetShape(0); … … 417 419 } 418 420 } else { 419 if (index > rowEntry.LinesShape.Count + 1) { //MarkersShape is on position zero 421 if (index > rowEntry.LinesShape.Count + 1) { 422 //MarkersShape is on position zero 420 423 throw new NotImplementedException(); 421 424 } … … 429 432 rowEntry.LinesShape.AddMarkerShape(new MarkerShape(index, row[index], 8, row.Color)); 430 433 } 431 } else if (action == Action.Modified){434 } else if (action == Action.Modified) { 432 435 // not the first value 433 436 if (index > 0) { 434 437 rowEntry.LinesShape.GetShape(index - 1).Y2 = value; 435 ((MarkerShape) 438 ((MarkerShape)rowEntry.LinesShape.markersShape.GetShape(index - 1)).Y = value; 436 439 } 437 440 … … 439 442 if (index > 0 && index < row.Count - 1) { 440 443 rowEntry.LinesShape.GetShape(index).Y1 = value; 441 ((MarkerShape) 444 ((MarkerShape)rowEntry.LinesShape.markersShape.GetShape(index)).Y = value; 442 445 } 443 446 } … … 454 457 455 458 private void OnModelChanged() { 456 titleShape.Text = model.Title;457 458 459 canvasUI.Invalidate(); 459 460 } … … 524 525 } 525 526 526 private void canvasUI1_KeyDown(object sender, KeyEventArgs e) { 527 } 527 private void canvasUI1_KeyDown(object sender, KeyEventArgs e) {} 528 528 529 529 private void canvasUI1_MouseDown(object sender, MouseEventArgs e) { … … 582 582 world = Transform.ToWorld(e.Location, rowEntry.LinesShape.Viewport, rowEntry.LinesShape.ClippingArea); 583 583 584 double y1 = world.Y - (world.Y - rowEntry.LinesShape.ClippingArea.Y1) *zoomFactor;584 double y1 = world.Y - (world.Y - rowEntry.LinesShape.ClippingArea.Y1)*zoomFactor; 585 585 double y2 = world.Y + (rowEntry.LinesShape.ClippingArea.Y2 - world.Y)*zoomFactor; 586 586 … … 631 631 632 632 public LineShape GetShape(int index) { 633 return (LineShape)shapes[index]; 633 return (LineShape)shapes[index]; //shapes[0] is markersShape!! 634 634 } 635 635 } … … 658 658 } 659 659 660 private class YAxisInfo { 660 private class YAxisInfo { 661 661 private readonly Grid grid = new Grid(); 662 662 private readonly YAxis yAxis = new YAxis();
Note: See TracChangeset
for help on using the changeset viewer.