Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1974 for trunk/sources


Ignore:
Timestamp:
05/30/09 12:31:03 (15 years ago)
Author:
shofstad
Message:

DataRowSettings updated (#636)

File:
1 edited

Legend:

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

    r1965 r1974  
    303303        int ix = (int) Math.Round(dx);
    304304        foreach (var rowEntry in rowEntries) {
    305           if ((rowEntry.DataRow.Count > ix) && (ix > 0) && ((rowEntry.DataRow.LineType == DataRowType.Normal)||(rowEntry.DataRow.LineType==DataRowType.Points))) {
     305          if ((rowEntry.DataRow.Count > ix) && (ix > 0) && ((rowEntry.DataRow.RowSettings.LineType == DataRowType.Normal) || (rowEntry.DataRow.RowSettings.LineType == DataRowType.Points))) {
    306306            Point screenDataP = Transform.ToScreen(new PointD(ix, rowEntry.DataRow[ix]), rowEntry.LinesShape.Viewport,
    307307                                                   rowEntry.LinesShape.ClippingArea);
     
    465465      rowToRowEntry[row] = rowEntry;
    466466
    467       if ((row.LineType == DataRowType.SingleValue)) {
     467      if ((row.RowSettings.LineType == DataRowType.SingleValue)) {
    468468        if (row.Count > 0) {
    469469          LineShape lineShape = new HorizontalLineShape(0, row[0], double.MaxValue, row[0], row.RowSettings.Color, row.RowSettings.Thickness,
    470                                                         row.Style);
     470                                                        row.RowSettings.Style);
    471471          rowEntry.LinesShape.AddShape(lineShape);
    472472        }
    473       } else if (row.LineType == DataRowType.Points) {
     473      } else if (row.RowSettings.LineType == DataRowType.Points) {
    474474        rowEntry.ShowMarkers(true);      //no lines, only markers are shown!!
    475475        for (int i = 0; i < row.Count; i++)
    476476          rowEntry.LinesShape.AddMarkerShape(new MarkerShape(i, row[i], 8, row.RowSettings.Color));
    477       } else if (row.LineType == DataRowType.Normal) {
    478         rowEntry.ShowMarkers(row.ShowMarkers);
     477      } else if (row.RowSettings.LineType == DataRowType.Normal) {
     478        rowEntry.ShowMarkers(row.RowSettings.ShowMarkers);
    479479        for (int i = 1; i < row.Count; i++) {
    480           LineShape lineShape = new LineShape(i - 1, row[i - 1], i, row[i], row.RowSettings.Color, row.RowSettings.Thickness, row.Style);
     480          LineShape lineShape = new LineShape(i - 1, row[i - 1], i, row[i], row.RowSettings.Color, row.RowSettings.Thickness, row.RowSettings.Style);
    481481          rowEntry.LinesShape.AddShape(lineShape);
    482482          rowEntry.LinesShape.AddMarkerShape(new MarkerShape(i - 1, row[i - 1], 8, row.RowSettings.Color));
     
    500500      RowEntry rowEntry = rowToRowEntry[row];
    501501
    502       if (row.LineType == DataRowType.SingleValue) {
     502      if (row.RowSettings.LineType == DataRowType.SingleValue) {
    503503        if (action == Action.Added) {
    504504          LineShape lineShape = new HorizontalLineShape(0, row[0], double.MaxValue, row[0], row.RowSettings.Color, row.RowSettings.Thickness,
    505                                                         row.Style);
     505                                                        row.RowSettings.Style);
    506506          rowEntry.LinesShape.AddShape(lineShape);
    507507        } else if(action==Action.Deleted) {
     
    512512          lineShape.Y2 = value;
    513513        }
    514       } else if (row.LineType == DataRowType.Points) {
     514      } else if (row.RowSettings.LineType == DataRowType.Points) {
    515515        if (action == Action.Added) {
    516516          if(rowEntry.LinesShape.Count==0)
     
    518518          if (index > 0 && index == rowEntry.LinesShape.Count + 1) {
    519519            LineShape lineShape = new LineShape(index - 1, row[index - 1], index, row[index], row.RowSettings.Color, row.RowSettings.Thickness,
    520                                                 row.Style);
     520                                                row.RowSettings.Style);
    521521            rowEntry.LinesShape.AddShape(lineShape);
    522522            rowEntry.LinesShape.AddMarkerShape(new MarkerShape(index, row[index], 8, row.RowSettings.Color));
     
    542542            throw new NotSupportedException("Deleting of values other than the last one is not supported!");
    543543        }
    544        
    545       } else if (row.LineType == DataRowType.Normal) {
     544
     545      } else if (row.RowSettings.LineType == DataRowType.Normal) {
    546546        if (index > rowEntry.LinesShape.Count + 1) {
    547547          throw new NotImplementedException();
     
    553553          if (index > 0 && index == rowEntry.LinesShape.Count + 1) {
    554554            LineShape lineShape = new LineShape(index - 1, row[index - 1], index, row[index], row.RowSettings.Color, row.RowSettings.Thickness,
    555                                                 row.Style);
     555                                                row.RowSettings.Style);
    556556            rowEntry.LinesShape.AddShape(lineShape);
    557557            rowEntry.LinesShape.AddMarkerShape(new MarkerShape(index, row[index], 8, row.RowSettings.Color));
     
    746746          if (lineShape != null) {
    747747            lineShape.LSColor = row.RowSettings.Color;
    748             lineShape.LSDrawingStyle = row.Style;
     748            lineShape.LSDrawingStyle = row.RowSettings.Style;
    749749            lineShape.LSThickness = row.RowSettings.Thickness;
    750750          }
    751751        }
    752         markersShape.ShowChildShapes = row.ShowMarkers;
     752        markersShape.ShowChildShapes = row.RowSettings.ShowMarkers;
    753753      }
    754754
Note: See TracChangeset for help on using the changeset viewer.