Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/18/09 14:41:09 (15 years ago)
Author:
bspisic
Message:

Model.Title bug fixed (#590)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/3.2/LineChart.cs

    r1603 r1608  
    8383    private void UpdateLayout() {
    8484      canvas.ClearShapes();
     85
     86      titleShape.Text = model.Title;
    8587
    8688      foreach (YAxisDescriptor yAxisDescriptor in model.YAxes) {
     
    249251    public void setLegendBottom() {
    250252      // 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()*/);
    252254      legendShape.ClippingArea = new RectangleD(0, 0, legendShape.BoundingBox.Width, legendShape.BoundingBox.Height);
    253255      legendShape.Row = true;
     
    393395          LineShape lineShape = new LineShape(i - 1, row[i - 1], i, row[i], row.Color, row.Thickness, row.Style);
    394396          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) {
    398400          rowEntry.LinesShape.AddMarkerShape(new MarkerShape((row.Count - 1), row[(row.Count - 1)], 8, row.Color));
     401        }
    399402      }
    400403
     
    410413                                                        row.Style);
    411414          rowEntry.LinesShape.AddShape(lineShape);
    412          
    413415        } else {
    414416          LineShape lineShape = rowEntry.LinesShape.GetShape(0);
     
    417419        }
    418420      } 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
    420423          throw new NotImplementedException();
    421424        }
     
    429432            rowEntry.LinesShape.AddMarkerShape(new MarkerShape(index, row[index], 8, row.Color));
    430433          }
    431         } else if(action == Action.Modified){
     434        } else if (action == Action.Modified) {
    432435          // not the first value
    433436          if (index > 0) {
    434437            rowEntry.LinesShape.GetShape(index - 1).Y2 = value;
    435             ((MarkerShape) rowEntry.LinesShape.markersShape.GetShape(index - 1)).Y = value;
     438            ((MarkerShape)rowEntry.LinesShape.markersShape.GetShape(index - 1)).Y = value;
    436439          }
    437440
     
    439442          if (index > 0 && index < row.Count - 1) {
    440443            rowEntry.LinesShape.GetShape(index).Y1 = value;
    441             ((MarkerShape) rowEntry.LinesShape.markersShape.GetShape(index)).Y = value;
     444            ((MarkerShape)rowEntry.LinesShape.markersShape.GetShape(index)).Y = value;
    442445          }
    443446        }
     
    454457
    455458    private void OnModelChanged() {
    456       titleShape.Text = model.Title;
    457 
    458459      canvasUI.Invalidate();
    459460    }
     
    524525    }
    525526
    526     private void canvasUI1_KeyDown(object sender, KeyEventArgs e) {
    527     }
     527    private void canvasUI1_KeyDown(object sender, KeyEventArgs e) {}
    528528
    529529    private void canvasUI1_MouseDown(object sender, MouseEventArgs e) {
     
    582582          world = Transform.ToWorld(e.Location, rowEntry.LinesShape.Viewport, rowEntry.LinesShape.ClippingArea);
    583583
    584           double y1 = world.Y - (world.Y - rowEntry.LinesShape.ClippingArea.Y1) * zoomFactor;
     584          double y1 = world.Y - (world.Y - rowEntry.LinesShape.ClippingArea.Y1)*zoomFactor;
    585585          double y2 = world.Y + (rowEntry.LinesShape.ClippingArea.Y2 - world.Y)*zoomFactor;
    586586
     
    631631
    632632      public LineShape GetShape(int index) {
    633         return (LineShape)shapes[index];     //shapes[0] is markersShape!!
     633        return (LineShape)shapes[index]; //shapes[0] is markersShape!!
    634634      }
    635635    }
     
    658658    }
    659659
    660     private class YAxisInfo { 
     660    private class YAxisInfo {
    661661      private readonly Grid grid = new Grid();
    662662      private readonly YAxis yAxis = new YAxis();
Note: See TracChangeset for help on using the changeset viewer.