Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/21/09 13:43:10 (15 years ago)
Author:
bspisic
Message:

Panning and zooming (#424) Implemented deactivating of YAxis clipping in OptionsDialog

Location:
trunk/sources/HeuristicLab.Visualization
Files:
3 edited

Legend:

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

    r1388 r1390  
    443443
    444444      foreach (RowEntry rowEntry in rowEntries) {
    445         clippingArea = Translate.ClippingArea(startPoint, endPoint, rowEntry.LinesShape.ClippingArea, rowEntry.LinesShape.Viewport);
    446         SetClipY(rowEntry, clippingArea.Y1, clippingArea.Y2);
     445        if (rowEntry.DataRow.YAxis.ClipChangeable) {
     446          clippingArea = Translate.ClippingArea(startPoint, endPoint, rowEntry.LinesShape.ClippingArea, rowEntry.LinesShape.Viewport);
     447          SetClipY(rowEntry, clippingArea.Y1, clippingArea.Y2);
     448        }
    447449      }
    448450
     
    460462
    461463      foreach (RowEntry rowEntry in rowEntries) {
    462         clippingArea = Transform.ToWorld(rectangle, rowEntry.LinesShape.Viewport, rowEntry.LinesShape.ClippingArea);
    463 
    464         SetClipY(rowEntry, clippingArea.Y1, clippingArea.Y2);
     464        if (rowEntry.DataRow.YAxis.ClipChangeable) {
     465          clippingArea = Transform.ToWorld(rectangle, rowEntry.LinesShape.Viewport, rowEntry.LinesShape.ClippingArea);
     466
     467          SetClipY(rowEntry, clippingArea.Y1, clippingArea.Y2);
     468        }
    465469      }
    466470
  • trunk/sources/HeuristicLab.Visualization/Options/OptionsDialog.cs

    r1389 r1390  
    106106        dataRowsFlowLayout.Controls.Add(chkbox);
    107107      }
     108
     109      for (int i = 0; i < model.YAxes.Count; i++) {
     110        YAxisDescriptor yAxisDescriptor = model.YAxes[i];
     111
     112        CheckBox chkbox = new CheckBox();
     113        chkbox.Text = yAxisDescriptor.Label;
     114        chkbox.Checked = yAxisDescriptor.ClipChangeable;
     115        chkbox.CheckedChanged += delegate { yAxisDescriptor.ClipChangeable = chkbox.Checked; };
     116
     117        dataRowsFlowLayout.Controls.Add(chkbox);
     118      }
    108119    }
    109120
  • trunk/sources/HeuristicLab.Visualization/YAxisDescriptor.cs

    r1350 r1390  
    1111    private bool showYAxis = true;
    1212    private string label = "";
     13    public bool ClipChangeable = true;
    1314
    1415    public event YAxisDescriptorChangedHandler YAxisDescriptorChanged;
     
    7273    }
    7374
     75    public bool Zoom_ {
     76      get { return ClipChangeable; }
     77      set { ClipChangeable = value; }
     78    }
     79
    7480    public void AddDataRow(IDataRow row) {
    7581      if (row.YAxis != null) {
Note: See TracChangeset for help on using the changeset viewer.