Index: trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.Designer.cs	(revision 6099)
+++ trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.Designer.cs	(revision 6342)
@@ -60,5 +60,5 @@
             this.copyImageToClipboardBitmapToolStripMenuItem});
       this.contextMenuStrip.Name = "contextMenuStrip";
-      this.contextMenuStrip.Size = new System.Drawing.Size(257, 48);
+      this.contextMenuStrip.Size = new System.Drawing.Size(257, 76);
       // 
       // exportChartToolStripMenuItem
@@ -78,6 +78,6 @@
       // saveFileDialog
       // 
-      this.saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|EMF (*.emf)|*.emf|PNG (*.png)|*.png|GIF " +
-          "(*.gif)|*.gif|TIFF (*.tif)|*.tif\"";
+      this.saveFileDialog.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|EMF (*.emf)|*.emf|PNG (*.png)|*.png|GIF (" +
+          "*.gif)|*.gif|TIFF (*.tif)|*.tif\"";
       this.saveFileDialog.FilterIndex = 2;
       // 
Index: trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.resx
===================================================================
--- trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.resx	(revision 6342)
+++ trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/EnhancedChart.resx	(revision 6342)
@@ -0,0 +1,129 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="contextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>146, 17</value>
+  </metadata>
+  <metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </metadata>
+</root>
Index: trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj	(revision 6099)
+++ trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj	(revision 6342)
@@ -122,4 +122,10 @@
     </Compile>
     <Compile Include="HeuristicLabVisualizationChartControlsExtensionsPlugin.cs" />
+    <Compile Include="HistogramControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="HistogramControl.Designer.cs">
+      <DependentUpon>HistogramControl.cs</DependentUpon>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
@@ -130,8 +136,17 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
       <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
     </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="EnhancedChart.resx">
+      <DependentUpon>EnhancedChart.cs</DependentUpon>
+    </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HeuristicLabVisualizationChartControlsExtensionsPlugin.cs.frame
===================================================================
--- trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HeuristicLabVisualizationChartControlsExtensionsPlugin.cs.frame	(revision 6099)
+++ trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HeuristicLabVisualizationChartControlsExtensionsPlugin.cs.frame	(revision 6342)
@@ -28,4 +28,5 @@
   [Plugin("HeuristicLab.Visualization.ChartControlsExtensions", "3.3.4.$WCREV$")]
   [PluginFile("HeuristicLab.Visualization.ChartControlsExtensions-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
   public class HeuristicLabVisualizationChartControlsExtensionsPlugin : PluginBase { }
 }
Index: trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HistogramControl.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HistogramControl.Designer.cs	(revision 6342)
+++ trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HistogramControl.Designer.cs	(revision 6342)
@@ -0,0 +1,140 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Visualization.ChartControlsExtensions {
+  partial class HistogramControl {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+      System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
+      this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
+      this.binsNumericUpDown = new System.Windows.Forms.NumericUpDown();
+      this.label1 = new System.Windows.Forms.Label();
+      this.exactCheckBox = new System.Windows.Forms.CheckBox();
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.binsNumericUpDown)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // chart
+      // 
+      this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      chartArea1.Name = "ChartArea1";
+      this.chart.ChartAreas.Add(chartArea1);
+      this.chart.Location = new System.Drawing.Point(0, 27);
+      this.chart.Name = "chart";
+      series1.ChartArea = "ChartArea1";
+      series1.Name = "Series1";
+      this.chart.Series.Add(series1);
+      this.chart.Size = new System.Drawing.Size(465, 336);
+      this.chart.TabIndex = 0;
+      // 
+      // binsNumericUpDown
+      // 
+      this.binsNumericUpDown.Location = new System.Drawing.Point(91, 3);
+      this.binsNumericUpDown.Maximum = new decimal(new int[] {
+            100000,
+            0,
+            0,
+            0});
+      this.binsNumericUpDown.Minimum = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+      this.binsNumericUpDown.Name = "binsNumericUpDown";
+      this.binsNumericUpDown.Size = new System.Drawing.Size(61, 20);
+      this.binsNumericUpDown.TabIndex = 1;
+      this.binsNumericUpDown.Value = new decimal(new int[] {
+            10,
+            0,
+            0,
+            0});
+      this.binsNumericUpDown.ValueChanged += new System.EventHandler(this.binsNumericUpDown_ValueChanged);
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(3, 5);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(82, 13);
+      this.label1.TabIndex = 2;
+      this.label1.Text = "Number of Bins:";
+      // 
+      // exactCheckBox
+      // 
+      this.exactCheckBox.AutoSize = true;
+      this.exactCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+      this.exactCheckBox.Location = new System.Drawing.Point(158, 4);
+      this.exactCheckBox.Name = "exactCheckBox";
+      this.exactCheckBox.Size = new System.Drawing.Size(56, 17);
+      this.exactCheckBox.TabIndex = 3;
+      this.exactCheckBox.Text = "Exact:";
+      this.exactCheckBox.UseVisualStyleBackColor = true;
+      this.exactCheckBox.CheckedChanged += new System.EventHandler(this.exactCheckBox_CheckedChanged);
+      // 
+      // HistogramControl
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.exactCheckBox);
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.binsNumericUpDown);
+      this.Controls.Add(this.chart);
+      this.Name = "HistogramControl";
+      this.Size = new System.Drawing.Size(465, 363);
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
+      ((System.ComponentModel.ISupportInitialize)(this.binsNumericUpDown)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private EnhancedChart chart;
+    private System.Windows.Forms.NumericUpDown binsNumericUpDown;
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.CheckBox exactCheckBox;
+  }
+}
Index: trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HistogramControl.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HistogramControl.cs	(revision 6342)
+++ trunk/sources/HeuristicLab.Visualization.ChartControlsExtensions/3.3/HistogramControl.cs	(revision 6342)
@@ -0,0 +1,161 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+
+namespace HeuristicLab.Visualization.ChartControlsExtensions {
+  public partial class HistogramControl : UserControl {
+    private static readonly string SeriesName = "Histogram";
+
+    private List<double> points;
+    public int NumberOfBins {
+      get { return (int)binsNumericUpDown.Value; }
+      set { binsNumericUpDown.Value = value; }
+    }
+
+    public int MinimumNumberOfBins {
+      get { return (int)binsNumericUpDown.Minimum; }
+      set { binsNumericUpDown.Minimum = value; }
+    }
+
+    public int MaximumNumberOfBins {
+      get { return (int)binsNumericUpDown.Maximum; }
+      set { binsNumericUpDown.Maximum = value; }
+    }
+
+    public int IncrementNumberOfBins {
+      get { return (int)binsNumericUpDown.Increment; }
+      set { binsNumericUpDown.Increment = value; }
+    }
+
+    public bool CalculateExactBins {
+      get { return exactCheckBox.Checked; }
+      set { exactCheckBox.Checked = value; }
+    }
+
+    public bool ShowExactCheckbox {
+      get { return exactCheckBox.Visible; }
+      set { exactCheckBox.Visible = value; }
+    }
+
+    public HistogramControl() {
+      InitializeComponent();
+      points = new List<double>();
+      InitializeChart();
+    }
+
+    public void AddPoint(double point) {
+      points.Add(point);
+      UpdateHistogram();
+    }
+
+    public void AddPoints(IEnumerable<double> points) {
+      this.points.AddRange(points);
+      UpdateHistogram();
+    }
+
+    public void ClearPoints() {
+      points.Clear();
+      UpdateHistogram();
+    }
+
+    private void InitializeChart() {
+      chart.Series.Clear();
+      Series s = chart.Series.Add(SeriesName);
+      s.ChartType = SeriesChartType.Column;
+      s.BorderColor = Color.Black;
+      s.BorderWidth = 1;
+      s.BorderDashStyle = ChartDashStyle.Solid;
+    }
+
+    private void UpdateHistogram() {
+      if (InvokeRequired) {
+        Invoke((Action)UpdateHistogram, null);
+        return;
+      }
+      Series histogramSeries = chart.Series[SeriesName];
+      histogramSeries.Points.Clear();
+
+      if (!points.Any()) return;
+      int bins = (int)binsNumericUpDown.Value;
+
+      double minValue = points.Min();
+      double maxValue = points.Max();
+      double intervalWidth = (maxValue - minValue) / bins;
+      if (intervalWidth <= 0) return;
+
+      if (!exactCheckBox.Checked) {
+        intervalWidth = HumanRoundRange(intervalWidth);
+        minValue = Math.Floor(minValue / intervalWidth) * intervalWidth;
+        maxValue = Math.Ceiling(maxValue / intervalWidth) * intervalWidth;
+      }
+
+      double current = minValue, intervalCenter = intervalWidth / 2.0;
+      int count = 0;
+      foreach (double v in points.OrderBy(x => x)) {
+        while (v > current + intervalWidth) {
+          histogramSeries.Points.AddXY(current + intervalCenter, count);
+          current += intervalWidth;
+          count = 0;
+        }
+        count++;
+      }
+      histogramSeries.Points.AddXY(current + intervalCenter, count);
+
+      histogramSeries["PointWidth"] = "1";
+
+      ChartArea chartArea = chart.ChartAreas[histogramSeries.ChartArea];
+      chartArea.AxisY.Title = "Frequency";
+      chartArea.AxisX.Minimum = minValue;
+      chartArea.AxisX.Maximum = maxValue;
+
+      double axisInterval = intervalWidth;
+      while ((maxValue - minValue) / axisInterval > 10.0) {
+        axisInterval *= 2.0;
+      }
+      chartArea.AxisX.Interval = axisInterval;
+    }
+
+    private double HumanRoundRange(double range) {
+      double base10 = Math.Pow(10.0, Math.Floor(Math.Log10(range)));
+      double rounding = range / base10;
+      if (rounding <= 1.5) rounding = 1;
+      else if (rounding <= 2.25) rounding = 2;
+      else if (rounding <= 3.75) rounding = 2.5;
+      else if (rounding <= 7.5) rounding = 5;
+      else rounding = 10;
+      return rounding * base10;
+    }
+
+    private void binsNumericUpDown_ValueChanged(object sender, EventArgs e) {
+      UpdateHistogram();
+    }
+
+    private void exactCheckBox_CheckedChanged(object sender, EventArgs e) {
+      UpdateHistogram();
+    }
+  }
+}
