Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1603


Ignore:
Timestamp:
04/17/09 17:01:50 (16 years ago)
Author:
dwagner
Message:

Bug fix: Fixed Problem when drawing markers for added values (#581)

File:
1 edited

Legend:

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

    r1561 r1603  
    421421        }
    422422
    423         // new value was added
    424         if (index > 0 && index == rowEntry.LinesShape.Count + 1) {
    425           LineShape lineShape = new LineShape(index - 1, row[index - 1], index, row[index], row.Color, row.Thickness, row.Style);
    426           rowEntry.LinesShape.AddShape(lineShape);
    427           rowEntry.LinesShape.AddMarkerShape(new MarkerShape(index, row[index ], 8, row.Color));
    428         }
    429 
    430         // not the first value
    431         if (index > 0) {
    432           rowEntry.LinesShape.GetShape(index - 1).Y2 = value;
    433           ((MarkerShape)rowEntry.LinesShape.markersShape.GetShape(index - 1)).Y = value;
    434         }
    435 
    436         // not the last value
    437         if (index > 0 && index < row.Count - 1) {
    438           rowEntry.LinesShape.GetShape(index).Y1 = value;
    439           ((MarkerShape)rowEntry.LinesShape.markersShape.GetShape(index)).Y = value;
     423        if (action == Action.Added) {
     424          // new value was added
     425          if (index > 0 && index == rowEntry.LinesShape.Count + 1) {
     426            LineShape lineShape = new LineShape(index - 1, row[index - 1], index, row[index], row.Color, row.Thickness,
     427                                                row.Style);
     428            rowEntry.LinesShape.AddShape(lineShape);
     429            rowEntry.LinesShape.AddMarkerShape(new MarkerShape(index, row[index], 8, row.Color));
     430          }
     431        } else if(action == Action.Modified){
     432          // not the first value
     433          if (index > 0) {
     434            rowEntry.LinesShape.GetShape(index - 1).Y2 = value;
     435            ((MarkerShape) rowEntry.LinesShape.markersShape.GetShape(index - 1)).Y = value;
     436          }
     437
     438          // not the last value
     439          if (index > 0 && index < row.Count - 1) {
     440            rowEntry.LinesShape.GetShape(index).Y1 = value;
     441            ((MarkerShape) rowEntry.LinesShape.markersShape.GetShape(index)).Y = value;
     442          }
    440443        }
    441444      }
Note: See TracChangeset for help on using the changeset viewer.