Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/17/15 09:32:01 (9 years ago)
Author:
abeham
Message:

#2431:

  • Added label on last data point
  • Changed target in cost view to display as ratio to best-known or best found
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Analysis.Views/3.3/IndexedDataTableView.cs

    r12826 r12865  
    3636    protected List<Series> invisibleSeries;
    3737    protected Dictionary<IObservableList<Tuple<T, double>>, IndexedDataRow<T>> valuesRowsTable;
    38     /// <summary>
    39     /// Gets or sets the variable to represent visually.
    40     /// </summary>
    41     /// <remarks>Uses property <see cref="ViewBase.Item"/> of base class <see cref="ViewBase"/>.
    42     /// No own data storage present.</remarks>
     38
    4339    public new IndexedDataTable<T> Content {
    4440      get { return (IndexedDataTable<T>)base.Content; }
     
    4642    }
    4743
    48     /// <summary>
    49     /// Initializes a new instance of <see cref="VariableView"/> with caption "Variable".
    50     /// </summary>
    5144    public IndexedDataTableView() {
    5245      InitializeComponent();
     
    5952
    6053    #region Event Handler Registration
    61     /// <summary>
    62     /// Removes the eventhandlers from the underlying <see cref="Variable"/>.
    63     /// </summary>
    64     /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    6554    protected override void DeregisterContentEvents() {
    6655      foreach (var row in Content.Rows)
     
    7463    }
    7564
    76     /// <summary>
    77     /// Adds eventhandlers to the underlying <see cref="Variable"/>.
    78     /// </summary>
    79     /// <remarks>Calls <see cref="ViewBase.AddItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    8065    protected override void RegisterContentEvents() {
    8166      base.RegisterContentEvents();
     
    177162      else series.Color = Color.Empty;
    178163      series.IsVisibleInLegend = row.VisualProperties.IsVisibleInLegend;
     164
     165      series.SmartLabelStyle.Enabled = true;
     166      series.SmartLabelStyle.AllowOutsidePlotArea = LabelOutsidePlotAreaStyle.Yes;
     167      series.SmartLabelStyle.CalloutLineAnchorCapStyle = LineAnchorCapStyle.None;
     168      series.SmartLabelStyle.CalloutLineColor = series.Color;
     169      series.SmartLabelStyle.CalloutLineWidth = 2;
     170      series.SmartLabelStyle.CalloutStyle = LabelCalloutStyle.Underlined;
     171      series.SmartLabelStyle.IsOverlappedHidden = false;
     172      series.SmartLabelStyle.MaxMovingDistance = 200;
    179173
    180174      switch (row.VisualProperties.ChartType) {
     
    564558      for (int i = 0; i < row.Values.Count; i++) {
    565559        var value = row.Values[i];
    566         DataPoint point = new DataPoint();
     560        var point = new DataPoint();
    567561        point.SetValueXY(value.Item1, value.Item2);
     562        if (i == row.Values.Count - 1) {
     563          point.Label = series.Name;
     564          point.MarkerStyle = MarkerStyle.Cross;
     565          point.MarkerSize = 15;
     566          point.MarkerBorderWidth = 1;
     567        }
    568568        series.Points.Add(point);
    569569      }
Note: See TracChangeset for help on using the changeset viewer.