Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/28/13 15:38:12 (11 years ago)
Author:
mkommend
Message:

#2020: Integrated changes developed in the CMA-ES branch by abeham in the trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs

    r8339 r9258  
    2020#endregion
    2121
     22using HeuristicLab.Collections;
     23using HeuristicLab.Core.Views;
     24using HeuristicLab.MainForm;
    2225using System;
    2326using System.Collections.Generic;
     
    2629using System.Windows.Forms;
    2730using System.Windows.Forms.DataVisualization.Charting;
    28 using HeuristicLab.Collections;
    29 using HeuristicLab.Core.Views;
    30 using HeuristicLab.MainForm;
    3131
    3232namespace HeuristicLab.Analysis.Views {
     
    115115    public void ShowConfiguration() {
    116116      if (Content != null) {
    117         using (DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(Content)) {
     117        using (var dialog = new DataTableVisualPropertiesDialog(Content)) {
    118118          dialog.ShowDialog(this);
    119119        }
     
    123123      foreach (var row in rows) {
    124124        RegisterDataRowEvents(row);
    125         Series series = new Series(row.Name);
     125        var series = new Series(row.Name);
    126126        if (row.VisualProperties.DisplayName.Trim() != String.Empty) series.LegendText = row.VisualProperties.DisplayName;
    127127        else series.LegendText = row.Name;
     
    231231      if (!Content.VisualProperties.AxisTitleColor.IsEmpty) area.AxisY2.TitleForeColor = Content.VisualProperties.AxisTitleColor;
    232232      area.AxisY2.Title = Content.VisualProperties.SecondYAxisTitle;
     233
     234      area.AxisX.IsLogarithmic = Content.VisualProperties.XAxisLogScale;
     235      area.AxisX2.IsLogarithmic = Content.VisualProperties.SecondXAxisLogScale;
     236      area.AxisY.IsLogarithmic = Content.VisualProperties.YAxisLogScale;
     237      area.AxisY2.IsLogarithmic = Content.VisualProperties.SecondYAxisLogScale;
    233238    }
    234239
     
    500505          break;
    501506        default: {
     507            bool yLogarithmic = series.YAxisType == AxisType.Primary
     508                                  ? Content.VisualProperties.YAxisLogScale
     509                                  : Content.VisualProperties.SecondYAxisLogScale;
     510            bool xLogarithmic = series.XAxisType == AxisType.Primary
     511                                  ? Content.VisualProperties.XAxisLogScale
     512                                  : Content.VisualProperties.SecondXAxisLogScale;
    502513            for (int i = 0; i < row.Values.Count; i++) {
    503514              var value = row.Values[i];
    504               DataPoint point = new DataPoint();
    505               point.XValue = row.VisualProperties.StartIndexZero ? i : i + 1;
    506               if (IsInvalidValue(value))
     515              var point = new DataPoint();
     516              point.XValue = row.VisualProperties.StartIndexZero && !xLogarithmic ? i : i + 1;
     517              if (IsInvalidValue(value) || (yLogarithmic && value <= 0))
    507518                point.IsEmpty = true;
    508519              else
Note: See TracChangeset for help on using the changeset viewer.