Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/22/10 15:42:36 (14 years ago)
Author:
mkommend
Message:

added tooltips to RunCollectionBubbleChart (ticket #970)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs

    r3482 r3487  
    283283
    284284    private void chart_MouseMove(object sender, MouseEventArgs e) {
     285      HitTestResult h = this.chart.HitTest(e.X, e.Y);
    285286      if (!Locked) {
    286         HitTestResult h = this.chart.HitTest(e.X, e.Y);
    287287        if (this.draggedRun != null && h.ChartElementType != ChartElementType.DataPoint) {
    288288          DataObject data = new DataObject();
     
    301301        }
    302302      }
     303      string newTooltipText;
     304      string oldTooltipText;
     305      if (h.ChartElementType == ChartElementType.DataPoint) {
     306        IRun run = (IRun)((DataPoint)h.Object).Tag;
     307        newTooltipText = run.Name + System.Environment.NewLine;
     308        newTooltipText += xAxisComboBox.SelectedItem + " : " + Content.GetValue(run, xAxisComboBox.SelectedIndex).ToString() + Environment.NewLine;
     309        newTooltipText += yAxisComboBox.SelectedItem + " : " + Content.GetValue(run, yAxisComboBox.SelectedIndex).ToString() + Environment.NewLine; ;
     310      } else
     311        newTooltipText = string.Empty;
     312      oldTooltipText = this.tooltip.GetToolTip(chart);
     313      if (newTooltipText != oldTooltipText)
     314        this.tooltip.SetToolTip(chart, newTooltipText);
    303315    }
    304316    #endregion
Note: See TracChangeset for help on using the changeset viewer.