Changes from Prior Versions

  • AxisChange() - If you have used a prior version of ZedGraph, then some minor changes will be required to make your current code work. Improvements to the scaling and sizing logic require that a drawing context (Graphics class) be available to the methods called by AxisChange(). Therefore, in the older versions (prior to version 2.0), you could call AxisChange() with no parameters. It is now necessary to call it with AxisChange( CreateGraphics() ). If you are calling AxisChange() from within an event handler, you can typically use AxisChange( e.Graphics ) rather than creating a new Graphics class.
  • PointPair - Prior to version 2.0, ZedGraph stored the data values internally in X and Y arrays of type double. To improve data handling flexibility, the internal storage format was changed over the the PointPair struct. One PointPair is made for each data point, and the points are maintained in a PointPairList collection class. The advantage of this format is that it allows you to insert and delete points at any location. Although you can still use double arrays in the GraphPane.AddCurve() methods, the data are copied into a PointPairList internally. This is transparent to the user unless you are actually trying to modify or access the internal data storage within a CurveItem. The data are still available, you just have to use PointPair to access them.
    To access an individual X value (in this case, the X value at index 5), for example, you can use the following form:
    double x = curveItem.Points[5].X;
    However, in order to modify the X value, you have to first get a copy of the PointPair as follows:
    PointPair pt = curveItem.Points[5];
    		pt.X = 1234.5;
    		curveItem.Points[5] = pt;
    		
    The PointPairList class includes methods to add a single or a set of points (Add() and AddPoints()), to remove a point (Remove(), to sort the points (Sort()), and to remove all the points (Clear()). Refer to the ZedGraph documentation for more information.
  • Defaults - Prior to version 2.0, the default values were stored together in the Def class. To make the code more clearly organized, the default values were moved to each individual class as static values inside a class called Default. The default value names match the class property names. For example, the default value for Axis.IsShowGrid is available as Axis.Default.IsShowGrid. The default values can be changed at runtime so that the modified properties will be applied to all subsequent class instantiations (but they won't affect current instantiations).
  • Fill - Prior to version 2.5, the area fills were handled with simple solid colors, and properties were typically provided as foo.FillColor and foo.IsFilled. The Fill class provides enhanced fill capabilities, but does require some minor code changes. Enabling the color fill now requires (typically) foo.Fill.Type = FillType.Brush and foo.Fill.Color = Color.Blue. This will create a linear gradient fill from white to blue.
  • AlignV, AlignH - Prior to version 2.5, the FontSpec class used FontAlignH and FontAlignV enumerations for alignment. These were renamed to AlignH and AlignV enumerations since they are now used for more than just fonts.
  • CurveItem - As of version 3.5, CurveItem is now an abstract base class, and the different curve types are different classes (LineItem, BarItem, ErrorBarItem, and HiLowBarItem).
  • GraphItemList - As of version 3.5, TextItem and ArrowItem objects were combined into a single list, and other shape and image object types were added.
  • Date Format - As of version 3.5, the XDate format strings (also the Axis.ScaleFormat strings) are compatible with the .Net DateTime struct. The old formatting characters are no longer working.
  • Border class - As of version 3.5, the frame borders around most objects have been standardized into a common Border class. For example, to hide the Legend border, you would use Legend.Border.IsVisible = false; To change the Symbol border color, you would use Symbol.Border.Color = Color.Blue;. The Border class is used in FontSpec, Bar, BoxItem, GraphPane.AxisBorder, GraphPane.PaneBorder, and Legend classes.

History

(See the complete revision history file here)
  • 17-Jan-2006 (Version 4.2.4)
    • Add support for multiple Y and Y2 axes (major mods throughout)
    • Make ScrollBar SmallChange proportional to LargeChange (thanks to tafkat)
    • Major changes to the web interface
    • Add IsEnableVZoom and IsEnableHZoom to constrain zoom in ZedGraphControl
    • Add MouseUpEvent, MouseMoveEvent and change MouseDownEvent to just use (object sender, MouseEventArgs)
    • Add Exponential axis option (thanks to jackply)
    • Add Scale class and one subtype for each AxisType
    • Many bug fixes
  • 4-Sep-2005 (Version 4.2.2)
    • Add Localization to ZedGraphControl
    • Add new AxisType's LinearAsOrdinal and DateAsOrdinal
    • Add new CoordTypes to allow mixed coordinate systems
    • Add IPointList interface
    • Add BasicArrayPointList
    • Add strong name key to assembly
    • Various bug fixes
  • 2-Aug-2005 (Version 4.2)
    • Added scrollbar options to ZedGraphControl
    • Use Axis.ScaleFormat for numeric labels and dates (removed Axis.NumDec and Axis.NumDecAuto)
    • Add subscription event for pan/zoom
    • Add subscription event for custom formatting of point value tooltips
    • Add CurveItem.IsOverrideOrdinal to allow user-specified ordinal positioning
    • Add GraphItem.IsClippedToAxisRect
    • Revamp Axis.Cross logic, and add Axis.IsScaleLabelsInside, Axis.IsSkipFirstLabel, and Axis.IsSkipLastLabel
    • Add StickItem curve type
    • Add PolyItem polygon GraphItem type
    • Add CurveItem.FontSpec for custom font colors/types in legend
    • Large variety of bug fixes and minor additions.
  • 19-Mar-2005 (Version 4.0)
    • Added LineType to GraphPane to allow stacked lines, area shading between curves, etc.
    • Major improvements to the web control, exposing much more of the interface to the HTML code
    • Added serialization capability
    • Add pie charts
    • Added MasterPane and PaneBase to facilitate multiple graphs
    • ZedGraphControl GUI improvements: zooming, panning, tool tips
    • Added Axis.BaseTic, Axis.Cross, Axis.IsPreventLabelOverlap, and GraphPane.IsBoundedRanges properties
    • New demo project shows wide variety of graphs in a tabbed control
    • Various other bug fixes and additions
  • 20-Dec-2004 (Version 3.5)
    • Added Border class to provide consistent frame border options
    • Added web page code interface for asp .net
    • Added ErrorBar, HiLowBar, Stacked, SortedOverlay, and PercentStack bar types
    • Fixed scaling logic throughout - more consistent look
    • Fixed print scaling issues
    • Added new GraphItem types: Image, Box, Ellipse
    • Added minor grid lines
    • Added Legend float mode
    • Added Gradient fill types
    • Added transparency capability
    • Various other bug fixes and additions
  • 21-Sep-2004 (Version 3.0)
    • Added Fill class to provide gradient fills
    • Added area under the curve fills (area charts)
    • Added horizontal and stacked bar capabilities
    • Added Axis.MinSpace and GraphPane.SetMinSpaceBuffer() to control axis "twitching" due to rapid resizing/rescaling
  • 1-Sep-2004 (Version 2.0)
    • Added Graphics param to AxisChange() so internal code could calculate string widths
    • Changed internal data storage over to PointPair and PointPairList
    • Moved default values out of Def struct and into the individual classes
    • Improved axis scale picking code to avoid overlapping labels when space is limited
    • Improve protection against null, NaN, and Infinity values.
    • Added Axis.MinGrace and Axis.MaxGrace
    • Added Line.IsSmooth and Line.SmoothTension
  • 13-Jul-2004 (Version 1.5)
    • Fixed many cosmetic bugs
    • Added AxisType.Ordinal
  • 10-Jun-2004 (Version 1.4)
    • Added Bar Charts
    • Added FindNearestPoint() method
    • Minor Bug Fixes
    • Added zero-line when axis ranges from negative to positive
    • Added ScaleFormatAuto property so the ScaleFormat can be manual even when the scale range is auto
    • Added IsAxisRectAuto property so the AxisRect can be set manually
  • 1-Mar-2004 (Version 1.3)
    • Added Date-Time Axis capability
    • Added Text Axis capability
    • Added ReverseTransform() function (returns axis values associated with a mousePt location on the graph)
    • Made some optimizations that dramatically increase the drawing speed for large datasets
  • 20-Jan-2004 (Version 1.2)
    • Updated code to implement ICloneable interface and copy constructor for primary classes
    • Updated axis label code so that axis edge does not have to begin with a label (ex: axis min is 175, but first label is 200 and step is 50)
    • (Only the ZedGraphControl source file has changed)
  • 28-Nov-2003 (Version 1.1)
    • Fixed the Axis.IsMinorOppositeTic bug (it wasn't working)
    • Changed over the ZedGraph code so that it can also be a UserControl
  • 13-Nov-2003 (Version 1.0)
    • Fixed a minor bug in FontSpec.BoundingBox() calculation
    • Included ZedGraph.chm in source zip file
    • Changed sample zip file to include updated DLL