--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class Axis : ChartNamedElement, IDisposable
+ {
+ #region Constructors
+ public Axis (ChartArea chartArea, AxisName axisTypeName)
+ {
+ }
+
+ public Axis ()
+ {
+ }
+ #endregion
+
+ #region Public Properties
+ public AxisArrowStyle ArrowStyle { get; set; }
+ public virtual AxisName AxisName { get; }
+ public virtual double Crossing { get; set; }
+ public CustomLabelCollection CustomLabels { get; }
+ public AxisEnabled Enabled { get; set; }
+ public Color InterlacedColor { get; set; }
+ public double Interval { get; set; }
+ public IntervalAutoMode IntervalAutoMode { get; set; }
+ public double IntervalOffset { get; set; }
+ public DateTimeIntervalType IntervalOffsetType { get; set; }
+ public DateTimeIntervalType IntervalType { get; set; }
+ public bool IsInterlaced { get; set; }
+ public bool IsLabelAutoFit { get; set; }
+ public bool IsLogarithmic { get; set; }
+ public bool IsMarginVisible { get; set; }
+ public virtual bool IsMarksNextToAxis { get; set; }
+ public bool IsReversed { get; set; }
+ public bool IsStartedFromZero { get; set; }
+ public int LabelAutoFitMaxFontSize { get; set; }
+ public int LabelAutoFitMinFontSize { get; set; }
+ public LabelAutoFitStyles LabelAutoFitStyle { get; set; }
+ public LabelStyle LabelStyle { get; set; }
+ public Color LineColor { get; set; }
+ public ChartDashStyle LineDashStyle { get; set; }
+ public int LineWidth { get; set; }
+ public double LogarithmBase { get; set; }
+ public Grid MajorGrid { get; set; }
+ public TickMark MajorTickMark { get; set; }
+ public double Maximum { get; set; }
+ public float MaximumAutoSize { get; set; }
+ public double Minimum { get; set; }
+ public Grid MinorGrid { get; set; }
+ public TickMark MinorTickMark { get; set; }
+
+ public override string Name {
+ get { return base.Name; }
+ set { base.Name = value; }
+ }
+
+ public virtual AxisScaleBreakStyle ScaleBreakStyle { get; set; }
+ public AxisScaleView ScaleView { get; set; }
+ public AxisScrollBar ScrollBar { get; set; }
+ public StripLinesCollection StripLines { get; }
+ public TextOrientation TextOrientation { get; set; }
+ public string Title { get; set; }
+ public StringAlignment TitleAlignment { get; set; }
+ public Font TitleFont { get; set; }
+ public Color TitleForeColor { get; set; }
+ public string ToolTip { get; set; }
+ #endregion
+
+ #region Public Methods
+ public double GetPosition (double axisValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public double PixelPositionToValue (double position)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public double PositionToValue (double position)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RoundAxisValues ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public double ValueToPixelPosition (double axisValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public double ValueToPosition (double axisValue)
+ {
+ throw new NotImplementedException ();
+ }
+ #endregion
+ }
+}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class AxisScaleView
+ {
+ }
+}
public Chart ()
{
BackColor = Color.White;
- ChartAreas = new List<ChartArea> ();
- Series = new List<Series> ();
+ ChartAreas = new ChartAreaCollection ();
+ Series = new SeriesCollection ();
}
- public List<ChartArea> ChartAreas { get; private set; }
- public List<Series> Series { get; private set; }
+ public ChartAreaCollection ChartAreas { get; private set; }
+ public SeriesCollection Series { get; private set; }
#region Protected Properties
protected override void OnPaint (PaintEventArgs e)
{
base.OnPaint (e);
+
+ ChartGraphics g = new ChartGraphics (e.Graphics);
+
+ PaintElement (g, this, new ElementPosition (0, 0, 100, 100));
+
+ foreach (var area in ChartAreas)
+ PaintElement (g, area, new ElementPosition (9.299009f, 6.15f, 86.12599f, 81.1875f));
+
+ foreach (var series in Series)
+ PaintElement (g, series, new ElementPosition (9.299009f, 6.15f, 86.12599f, 81.1875f));
}
protected override void OnPaintBackground (PaintEventArgs pevent)
{
base.OnPaintBackground (pevent);
}
+
+ protected virtual void OnPostPaint (ChartPaintEventArgs e)
+ {
+ }
+
+ protected virtual void OnPrePaint (ChartPaintEventArgs e)
+ {
+ }
+ #endregion
+
+ #region Private Methods
+ private void PaintElement (ChartGraphics g, object element, ElementPosition position)
+ {
+ ChartPaintEventArgs e = new ChartPaintEventArgs (this, element, g, position);
+
+ OnPrePaint (e);
+ OnPostPaint (e);
+ }
#endregion
}
}
\ No newline at end of file
namespace System.Windows.Forms.DataVisualization.Charting
{
- public class ChartArea
+ public class ChartArea : ChartNamedElement
{
- public string Name { get; set; }
+ public override string Name { get; set; }
}
}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class ChartArea3DStyle
+ {
+ #region Constructors
+ public ChartArea3DStyle (ChartArea chartArea)
+ {
+ }
+
+ public ChartArea3DStyle ()
+ {
+ }
+ #endregion
+
+ #region Public Properties
+ public bool Enable3D { get; set; }
+ public int Inclination { get; set; }
+ public bool IsClustered { get; set; }
+ public bool IsRightAngleAxes { get; set; }
+ public LightStyle LightStyle { get; set; }
+ public int Perspective { get; set; }
+ public int PointDepth { get; set; }
+ public int PointGapDepth { get; set; }
+ public int Rotation { get; set; }
+ public int WallWidth { get; set; }
+ #endregion
+ }
+}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class ChartAreaCollection : ChartNamedElementCollection<ChartArea>
+ {
+ #region Public Methods
+ public ChartArea Add (string name)
+ {
+ ChartArea ca = new ChartArea ();
+ ca.Name = name;
+
+ Add (ca);
+ return ca;
+ }
+ #endregion
+ }
+}
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
+using System.ComponentModel;
namespace System.Windows.Forms.DataVisualization.Charting
{
- public abstract class ChartElement
+ public abstract class ChartElement : IDisposable
{
#region Constructors
protected ChartElement ()
#endregion
#region Public Properties
+ [DefaultValue (null)]
public object Tag { get; set; }
#endregion
public override string ToString ()
{
+ if (this is ChartNamedElement)
+ return string.Format ("{0}-{1}", GetType ().Name, (this as ChartNamedElement).Name);
+
return GetType ().Name;
}
#endregion
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class ChartGraphics : ChartElement, IDisposable
+ {
+ #region Constructors
+ internal ChartGraphics (Graphics graphics)
+ {
+ Graphics = graphics;
+ }
+ #endregion
+
+ #region Public Properties
+ public Graphics Graphics { get; set; }
+ #endregion
+ }
+}
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
+using System.ComponentModel;
namespace System.Windows.Forms.DataVisualization.Charting
{
#endregion
#region Public Properties
+ [DefaultValue ("")]
public virtual string Name { get; set; }
#endregion
}
namespace System.Windows.Forms.DataVisualization.Charting
{
- public class ChartNamedElementCollection<T> where T : ChartNamedElement
+ public class ChartNamedElementCollection<T> : ChartElementCollection<T> where T : ChartNamedElement
{
}
}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class ChartPaintEventArgs : EventArgs
+ {
+ #region Constructors
+ internal ChartPaintEventArgs (Chart chart, object chartElement, ChartGraphics chartGraphics, ElementPosition position)
+ {
+ Chart = chart;
+ ChartElement = chartElement;
+ ChartGraphics = chartGraphics;
+ Position = position;
+ }
+ #endregion
+
+ #region Public Properties
+ public Chart Chart { get; private set; }
+ public object ChartElement { get; private set; }
+ public ChartGraphics ChartGraphics { get; private set; }
+ public ElementPosition Position { get; private set; }
+ #endregion
+ }
+}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class ElementPosition : ChartElement
+ {
+ #region Constructors
+ public ElementPosition ()
+ {
+ }
+
+ public ElementPosition (float x, float y, float width, float height)
+ {
+ X = x;
+ Y = y;
+ Width = width;
+ Height = height;
+ }
+ #endregion
+
+ #region Public Properties
+ public bool Auto { get; set; }
+ public float Bottom { get { return Y + Height; } }
+ public float Height { get; set; }
+ public float Right { get { return X + Width; } }
+ public SizeF Size { get { return new SizeF (Width, Height); } }
+ public float Width { get; set; }
+ public float X { get; set; }
+ public float Y { get; set; }
+ #endregion
+
+ #region Public Methods
+ public void FromRectangleF (RectangleF rect)
+ {
+ X = rect.X;
+ Y = rect.Y;
+ Width = rect.Width;
+ Height = rect.Height;
+ }
+
+ public RectangleF ToRectangleF ()
+ {
+ return new RectangleF (X, Y, Width, Height);
+ }
+ #endregion
+
+ public override string ToString ()
+ {
+ return string.Format ("{0}, {1}, {2}, {3}", X, Y, Width, Height);
+ }
+ }
+}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.ComponentModel;
+using System.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class FormatNumberEventArgs : EventArgs
+ {
+ #region Constructors
+ internal FormatNumberEventArgs ()
+ {
+ }
+ #endregion
+
+ #region Public Properties
+ public ChartElementType ElementType { get; private set; }
+ public string Format { get; private set; }
+ public string LocalizedValue { get; set; }
+ public object SenderTag { get; private set; }
+ public double Value { get; private set; }
+ public ChartValueType ValueType { get; private set; }
+ #endregion
+ }
+}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class Grid
+ {
+ #region Constructos
+ public Grid ()
+ {
+ Enabled = true;
+ Interval = 0d;
+ IntervalOffset = 0d;
+ IntervalOffsetType = DateTimeIntervalType.Auto;
+ IntervalType = DateTimeIntervalType.Auto;
+ LineColor = Color.Black;
+ LineDashStyle = ChartDashStyle.Solid;
+ LineWidth = 1;
+ }
+ #endregion
+
+ #region Public Properties
+ public bool Enabled { get; set; }
+ public double Interval { get; set; }
+ public double IntervalOffset { get; set; }
+ public DateTimeIntervalType IntervalOffsetType { get; set; }
+ public DateTimeIntervalType IntervalType { get; set; }
+ public Color LineColor { get; set; }
+ public ChartDashStyle LineDashStyle { get; set; }
+ public int LineWidth { get; set; }
+ #endregion
+ }
+}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.ComponentModel;
+using System.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class Margins
+ {
+ #region Constructors
+ public Margins ()
+ {
+ }
+
+ public Margins (int top, int bottom, int left, int right)
+ {
+ Bottom = bottom;
+ Left = left;
+ Right = right;
+ Top = top;
+ }
+ #endregion
+
+ #region Public Properties
+ [DefaultValue (0)]
+ public int Bottom { get; set; }
+
+ [DefaultValue (0)]
+ public int Left { get; set; }
+
+ [DefaultValue (0)]
+ public int Right { get; set; }
+
+ [DefaultValue (0)]
+ public int Top { get; set; }
+ #endregion
+
+ #region Public Methods
+ public override bool Equals (object obj)
+ {
+ Margins a = (Margins)obj;
+ return a.Bottom == Bottom && a.Left == Left && a.Right == Right && a.Top == Top;
+ }
+
+ [MonoTODO ()]
+ public override int GetHashCode ()
+ {
+ return base.GetHashCode ();
+ }
+
+ public bool IsEmpty ()
+ {
+ return Bottom == 0 && Left == 0 && Right == 0 && Top == 0;
+ }
+
+ public RectangleF ToRectangleF ()
+ {
+ return new RectangleF (Left, Top, Right, Bottom);
+ }
+
+ [MonoTODO ()]
+ public override string ToString ()
+ {
+ return base.ToString ();
+ }
+ #endregion
+ }
+}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public enum MarkerStyle
+ {
+ None = 0,
+ Square = 1,
+ Circle = 2,
+ Diamond = 3,
+ Triangle = 4,
+ Cross = 5,
+ Star4 = 6,
+ Star5 = 7,
+ Star6 = 8,
+ Star10 = 9
+ }
+}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.ComponentModel;
+using System.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ [DefaultProperty ("Name")]
+ public class NamedImage : ChartNamedElement, IDisposable
+ {
+ private string name;
+
+ #region Constructors
+ public NamedImage ()
+ {
+ }
+
+ public NamedImage (string name, Image image)
+ {
+ }
+ #endregion
+
+ #region Public Properties
+ [Bindable (false)]
+ public Image Image { get; set; }
+
+ [Bindable (false)]
+ public override string Name {
+ get { return name; }
+ set { name = value; }
+ }
+ #endregion
+
+ #region Protected Methods
+ protected override void Dispose (bool disposing)
+ {
+ base.Dispose (disposing);
+
+ if (Image != null)
+ Image.Dispose ();
+ }
+ #endregion
+ }
+}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class NamedImagesCollection : ChartNamedElementCollection<NamedImage>
+ {
+ }
+}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Drawing;
+using System.ComponentModel;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class Point3D
+ {
+ #region Constructors
+ public Point3D ()
+ {
+ }
+
+ public Point3D (float x, float y, float z)
+ {
+ X = x;
+ Y = y;
+ Z = z;
+ }
+ #endregion
+
+ #region Public Properties
+ [Bindable (false)]
+ [DefaultValue ("0f, 0f")]
+ public PointF PointF {
+ get { return new PointF (X, Y); }
+ set { X = value.X; Y = value.Y; }
+ }
+
+ [Bindable (false)]
+ [DefaultValue (0f)]
+ public float X { get; set; }
+
+ [Bindable (false)]
+ [DefaultValue (0f)]
+ public float Y { get; set; }
+
+ [Bindable (false)]
+ [DefaultValue (0f)]
+ public float Z { get; set; }
+ #endregion
+ }
+}
{
public class SeriesCollection : ChartNamedElementCollection<Series>
{
+ #region Public Methods
+ public Series Add (string name)
+ {
+ Series s = new Series ();
+ s.Name = name;
+
+ this.Add (s);
+
+ return s;
+ }
+ #endregion
}
}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class TickMark : Grid
+ {
+ #region Constructors
+ public TickMark ()
+ {
+ Size = 1f;
+ TickMarkStyle = TickMarkStyle.OutsideArea;
+ }
+ #endregion
+
+ #region Public Properties
+ public float Size { get; set; }
+ public TickMarkStyle TickMarkStyle { get; set; }
+ #endregion
+ }
+}
--- /dev/null
+//
+// Authors:
+// Jonathan Pobst (monkey@jpobst.com)
+//
+// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+using System;
+using System.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class ToolTipEventArgs : EventArgs
+ {
+ #region Constructors
+ //public ToolTipEventArgs (int x, int y, string text, HitTestResult result)
+ //{
+ //}
+ #endregion
+ }
+}
<DebugType>full</DebugType>\r
<Optimize>false</Optimize>\r
<OutputPath>bin\Debug\</OutputPath>\r
- <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+ <DefineConstants>TRACE;DEBUG;NET_4_0</DefineConstants>\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
</PropertyGroup>\r
<DebugType>pdbonly</DebugType>\r
<Optimize>true</Optimize>\r
<OutputPath>bin\Release\</OutputPath>\r
- <DefineConstants>TRACE</DefineConstants>\r
+ <DefineConstants>TRACE;NET_4_0</DefineConstants>\r
<ErrorReport>prompt</ErrorReport>\r
<WarningLevel>4</WarningLevel>\r
</PropertyGroup>\r
<ItemGroup>\r
+ <Reference Include="Accessibility">\r
+ <EmbedInteropTypes>True</EmbedInteropTypes>\r
+ </Reference>\r
<Reference Include="System" />\r
+ <Reference Include="System.configuration" />\r
<Reference Include="System.Core" />\r
<Reference Include="System.Drawing" />\r
<Reference Include="System.Windows.Forms" />\r
<Reference Include="System.Xml" />\r
</ItemGroup>\r
<ItemGroup>\r
+ <Compile Include="Assembly\AssemblyInfo.cs" />\r
<Compile Include="common\MonoTODOAttribute.cs" />\r
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnchorStyle.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\Axis.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisScaleView.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartArea3DStyle.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartGraphics.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartPaintEventArgs.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ElementPosition.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\FormatNumberEventArgs.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\Margins.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\MarkerStyle.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationPathPoint.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationPathPointCollection.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AnovaResult.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\Chart.cs">\r
<SubType>Component</SubType>\r
</Compile>\r
- <Compile Include="Properties\AssemblyInfo.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartArea.cs">\r
<SubType>Code</SubType>\r
</Compile>\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AntiAliasingStyles.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartAreaCollection.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartColorPalette.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartDashStyle.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartElement.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\Docking.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\FinancialFormula.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\GradientStyle.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\Grid.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\GridTickTypes.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\IDataPointFilter.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\IntervalAutoMode.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendTableStyle.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\LightStyle.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\LineAnchorCapStyle.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\NamedImage.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\NamedImagesCollection.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\Point3D.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\PointSortOrder.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ScrollBarButtonStyles.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ScrollBarButtonType.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\TextAntiAliasingQuality.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\TextOrientation.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\TextStyle.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\TickMark.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\TickMarkStyle.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ToolTipEventArgs.cs" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Compile Include="common\Consts.cs" />\r
</ItemGroup>\r
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
../../build/common/Consts.cs\r
../../build/common/MonoTODOAttribute.cs\r
Assembly/AssemblyInfo.cs\r
-System.Windows.Forms.DataVisualization.Charting/AnchorStyle.cs\r
System.Windows.Forms.DataVisualization.Charting/AnnotationPathPoint.cs\r
System.Windows.Forms.DataVisualization.Charting/AnnotationPathPointCollection.cs\r
System.Windows.Forms.DataVisualization.Charting/AnovaResult.cs\r
System.Windows.Forms.DataVisualization.Charting/DateTimeIntervalType.cs\r
System.Windows.Forms.DataVisualization.Charting/Docking.cs\r
System.Windows.Forms.DataVisualization.Charting/FinancialFormula.cs\r
+System.Windows.Forms.DataVisualization.Charting/FormatNumberEventArgs.cs\r
System.Windows.Forms.DataVisualization.Charting/GradientStyle.cs\r
System.Windows.Forms.DataVisualization.Charting/GridTickTypes.cs\r
System.Windows.Forms.DataVisualization.Charting/IDataPointFilter.cs\r
System.Windows.Forms.DataVisualization.Charting/LegendTableStyle.cs\r
System.Windows.Forms.DataVisualization.Charting/LightStyle.cs\r
System.Windows.Forms.DataVisualization.Charting/LineAnchorCapStyle.cs\r
+System.Windows.Forms.DataVisualization.Charting/Margins.cs\r
+System.Windows.Forms.DataVisualization.Charting/MarkerStyle.cs\r
+System.Windows.Forms.DataVisualization.Charting/NamedImage.cs\r
+System.Windows.Forms.DataVisualization.Charting/NamedImagesCollection.cs\r
System.Windows.Forms.DataVisualization.Charting/PointSortOrder.cs\r
+System.Windows.Forms.DataVisualization.Charting/Point3D.cs\r
System.Windows.Forms.DataVisualization.Charting/ScrollBarButtonStyles.cs\r
System.Windows.Forms.DataVisualization.Charting/ScrollBarButtonType.cs\r
System.Windows.Forms.DataVisualization.Charting/ScrollType.cs\r
System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint2 = new System.Windows.Forms.DataVisualization.Charting.DataPoint (0D, 9D);
System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint3 = new System.Windows.Forms.DataVisualization.Charting.DataPoint (0D, 3D);
System.Windows.Forms.DataVisualization.Charting.DataPoint dataPoint4 = new System.Windows.Forms.DataVisualization.Charting.DataPoint (0D, 5D);
- this.chart1 = new MyChart ();
+ this.chart1 = new WindowsFormsApplication1.Form1.MyChart ();
this.SuspendLayout ();
//
// chart1
#endregion
- private System.Windows.Forms.DataVisualization.Charting.Chart chart1;
+ private Form1.MyChart chart1;
+
}
}
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AnovaResultTest.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ArrowAnnotationTest.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisScaleBreakStyleTest.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartElementCollectionTest.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartElementTest.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartNamedElementCollectionTest.cs" />\r
<Compile Include="System.Windows.Forms.DataVisualization.Charting\DataPointTest.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\GridTest.cs" />\r
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\TickMarkTest.cs" />\r
</ItemGroup>\r
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r