Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/21/10 17:16:00 (14 years ago)
Author:
swagner
Message:

Worked on visual appearance of charts and added some minor corrections in HeuristicLab.Visualization.ChartControlsExtensions (#1237)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.cs

    r4636 r4637  
    2525using System.Windows.Forms;
    2626using System.Windows.Forms.DataVisualization.Charting;
     27
    2728namespace HeuristicLab.Visualization.ChartControlsExtensions {
    2829  public partial class EnhancedChart : Chart {
     
    4546        axis.MajorTickMark.TickMarkStyle = TickMarkStyle.AcrossAxis;
    4647        axis.ScrollBar.BackColor = Color.Transparent;
    47         axis.ScrollBar.LineColor = Color.Transparent;
     48        axis.ScrollBar.LineColor = Color.Gray;
    4849        axis.ScrollBar.ButtonColor = SystemColors.GradientInactiveCaption;
    49         axis.ScrollBar.ButtonStyle = ScrollBarButtonStyles.SmallScroll;
     50        axis.ScrollBar.ButtonStyle = ScrollBarButtonStyles.All;
    5051        axis.ScrollBar.Size = 12;
    5152        axis.TitleFont = new Font(axis.TitleFont.FontFamily, 10);
    5253      }
    53       chartArea.CursorX.Interval = 0;
    54       chartArea.CursorY.Interval = 0;
    5554      chartArea.CursorX.IsUserSelectionEnabled = true;
    5655      chartArea.CursorY.IsUserSelectionEnabled = true;
    5756      chartArea.CursorX.IsUserEnabled = false;
    5857      chartArea.CursorY.IsUserEnabled = false;
    59       chartArea.CursorX.SelectionColor = SystemColors.GradientActiveCaption;
    60       chartArea.CursorY.SelectionColor = SystemColors.GradientActiveCaption;
     58      chartArea.CursorX.SelectionColor = Color.Gray;
     59      chartArea.CursorY.SelectionColor = Color.Gray;
    6160    }
    6261
     
    6766    }
    6867
    69     #region Mouse event ehancements
    70 
     68    #region Mouse Event Ehancements
    7169    protected override void OnMouseDoubleClick(MouseEventArgs e) {
    7270      if (EnableDoubleClickResetsZoom) {
    7371        HitTestResult result = HitTest(e.X, e.Y);
    74         if (result.ChartArea != null && result.ChartElementType == ChartElementType.PlottingArea) {
     72        if (result.ChartArea != null && (result.ChartElementType == ChartElementType.PlottingArea || result.ChartElementType == ChartElementType.Gridlines)) {
    7573          foreach (var axis in result.ChartArea.Axes)
    7674            axis.ScaleView.ZoomReset(int.MaxValue);
     
    8078    }
    8179
    82     #region panning
     80    #region Panning
    8381    private class PanningSupport {
    8482      public ChartArea ChartArea { get; private set; }
     
    140138    }
    141139    #endregion
    142 
    143140    #endregion
    144141
Note: See TracChangeset for help on using the changeset viewer.