-This is the Change Log for PHPlot.
-The project home page is http://sourceforge.net/projects/phplot/
------------------------------------------------------------------------------
-
-2011-01-15 (lbayuk) ===== Released as 5.3.1 =====
- * phplot.php: Updated version
- * README.txt: Updated for new release
- * NEWS.txt: Add text for new release
-
-2011-01-09
- * Fixed some style / indent errors, and 1 redundant test.
-
-2011-01-03
- * For bug 3143586 "Multiple plots per image - fixes & docs":
- Make sure there is a documented way to reset PHPlot feature
- settings, especially those for which the default settings result
- in automatic calculated values. Where possible, calling a Set*()
- function with no arguments should reset the feature to defaults.
-
- + Changed SetLegendPixels() arguments to be optional with default
- NULL meaning reset to automatic positioning.
-
- + Fixed SetXAxisPosition() and SetYAxisPosition() to accept empty
- string '' to mean reset to default automatic positioning.
- Make arguments optional, defaulting to empty string.
-
- + Changed SetNumXTicks() and SetNumYTicks() arguments to be
- optional with default empty string '' meaning reset to
- of automatic calculation.
-
- * Changed SetPointShapes() to use CheckOptionArray(). This
- simplifies the function with no change in operation.
-
- * Extend copyright years to 2011.
-
-2010-12-30
- * Fix for bug 3147397 "Data colors missing with multiple plots":
- + Do not truncate the data_colors and related arrays, so the full
- set of colors will be available for subsequent plots on the image.
- (Color indexes are still allocated in the image only as needed.)
- + New internal functions GetColorIndexArray() and
- GetDarkColorIndexArray(), replacing previous use of array_map().
- + Removed internal function truncate_array() - no longer used.
- + Changed SetColorIndexes(), NeedDataDarkColors(), and
- NeedErrorBarColors() to only allocate the color indexes that will
- be needed (instead of allocating all colors in the truncated color
- descriptor arrays).
-
-2010-12-28
- * Instead of throwing an error, SetLegend(NULL) now clears the legend
- array. This can be useful with multiple plots on an image. Before
- this change, only SetLegend(array()) did that (possibly by accident).
-
-2010-12-27
- * Do not have SetDefaultStyles() call deprecated SetLabelColor().
-
- * Fixes for bug 3143586 "Multiple plots per image - fixes & docs":
- + Fix DrawLegend so it doesn't forget that the legend position
- was specified in world coordinates. This fixes the legend
- position for plots after the first.
- + Don't draw the image border more than once (although this would
- probably have no impact on the resulting image). This parallels
- the behavior for the main plot title and the image background.
- Replaced member variables background_done and title_done with a new
- member array done[] which will track when these elements were done.
-
-2010-12-06
- * Fix comments above CalcPlotAreaWorld(). Deleted incorrect information
- from before data-data-yx existed, and before DecodeDataType rewrite.
-
-2010-12-04 (lbayuk) ===== Released as 5.3.0 =====
- * phplot.php: Updated version
- * README.txt: Updated for new release
- * NEWS.txt: Add text for new release
-
-2010-12-03
- * Feature request 3127005 "Ability to suppress X/Y axis lines":
- Added SetDrawXAxis() and SetDrawYAxis() to control flags which
- will suppress drawing the X or Y axis lines. (These lines were
- probably the only PHPlot elements that could not be turned off.)
- Changed DrawXAxis() and DrawYAxis() to conditionally draw the
- axis lines.
-
-2010-11-28
- * Feature request 3117873 "Data value labels in more plot types":
- Implemented Data Value Labels for plot types points, lines,
- linepoints, and squared. Added 2 class variables which can be
- set to control the distance and angle of the labels from points.
- New internal function CheckDataValueLabels() calculates position
- and text alignment for these labels.
-
- * Updated comments for Set[XY]DataLabelPos to match the text in
- the manual, which was rewritten to clarify label types.
-
-2010-11-23
- * Code cleanup. Moved some functions around to group "plot drawing
- helpers" separately from "plot drawing". No changes to operation.
-
-2010-11-21
- * Feature request 3111166 "Control legend colorbox width":
- Added a class variable legend_colorbox_width which can be changed
- to make the colorboxes wider or narrower.
-
-2010-11-16
- * Feature request 3093483 "Investing support chart types":
- Added 3 new plot types: Basic OHLC (Open/High/Low/Close), Candlesticks,
- and Filled Candlesticks. Implemented with one new function to handle the
- 3 new plot types: ohlc, candlesticks, and candlesticks2.
-
-2010-11-11
- * Moved information about plot types into a new static member array
- plots[]. (This is an internal change with no impact on usage, but will
- make it easier to add new plot types.) SetPlotType() no longer needs a
- list of plot types to check, FindDataLimits() does not need to check for
- specific plot types to to process the data array, and DrawGraph() uses
- data from the array rather than knowing about all the plot types.
-
-2010-10-31
- * Changed internal CalcBarWidths() to take two arguments which indicate
- how it should calculate bar widths, rather than having it check the
- plot_type directly. (Taken from another, experimental change. This
- minimizes places where plot_type is directly used.)
-
-2010-10-03 (lbayuk) ===== Released as 5.2.0 =====
- * phplot.php: Updated version
- * README.txt: Updated for new release
- * NEWS.txt: Add text for new release
- * Makefile: Removed HorizontalBars.txt from release. This is now all
- documented in the reference manual.
-
-2010-10-01
- * Rewrite color handling. Default and specified colors are now validated,
- converted to RGBA arrays, and saved. The colors indexes are not
- allocated until graph drawing time. Unneeded colors are not allocated.
-
- Fix bug 3045131 "SetTransparentColor problems": Transparency setup is
- deferred to graph drawing time, after most other colors are allocated.
- Fixes SetTransparentColor order dependency, and works with data colors.
-
- Fix bug 3049726 "Optimize color allocation": Colors allocation is
- deferred to graph drawing time, and colors for most elements are only
- allocated if needed. In particular, the data colors and dark colors,
- which used 32 slots, now only get defined as needed.
-
- Feature request (partial) 3077554 "Finer control over plot element
- colors": The colors of the main, X, and Y titles can now be controlled
- separately.
-
- Change details:
- New internal functions:
- GetColorIndex(), GetDarkColorIndex()
- Allocate pre-parsed colors for elements.
- SetColorIndexes()
- Does the deferred color allocation and defaults.
- NeedDataDarkColors(), NeedErrorBarColors()
- Called by graph drawing functions if those colors are needed.
- GetDataColor(), GetDataErrorColors(), GetBarColors()
- Custom or standard data color assignment for most plot types.
- truncate_array()
- Shorten an array. Used to limit data color allocation.
-
- Removed internal functions:
- SetIndexColor(), SetIndexDarkColor()
- Unneeded. Color handling is now in two separate phases.
-
- Removed internal member variable:
- data_colors_alpha
- PHPlot no longer calls SetDataColors before plotting, so this
- variable is not needed to preserve the default alpha.
-
- New internal member variables:
- transparent_color
- Saves color value from SetTransparentColor. For bug 3045131.
- x_title_color, y_title_color, ndx_x_title_color, ndx_y_title_color
- For title colors. DrawXTitle and DrawYTitle use them now.
-
- Changed internal member variables:
- i_border, plot_bg_color, bg_color, label_color, text_color, etc.
- All variables for colors now always hold a parsed 4-component
- (RGBA) color specification as an array, and are no longer
- statically initialized to a color name.
-
- New public functions:
- SetXTitleColor(), SetYTitleColor()
- These can be used to make the 3 titles have different colors.
-
-2010-09-26
- * Don't let SetXDataLabelPos() accept 'xaxis' or 'all' as valid.
- Don't let SetXTickLabelPos(), SetYTickLabelPos() accept 'all' as valid.
- These were never implemented and never documented.
-
-
- * Feature request #3073679 "Stacked bar plots with negative values":
- Allow stacked bar plots (vertical and horizontal) to work with negative
- values. Changed FindDataLimits() to not take abs() values for
- stackedbar when calculating the data range. Changed DrawStackedBars()
- and DrawHorizStackedBars() to handle negative values, including proper
- label positions. The first non-zero value in a row sets the direction
- of the bar. Mixing positive and negative values within a row works but
- the results are not useful.
-
- * New internal DrawBar() moves common code from 4 bars and stackedbars
- drawing functions and makes it easier to deal with shading vs bar
- direction.
-
-2010-09-24
- * Fix bug 3074402 "Fix Y axis default for horizontal plots":
- Make the default axis positions symmetrical for vertical plots
- (X and Y) and horizontal plots (Y and X). This fixes the problem
- with horizontal bar/thinbarline plots that have negative data,
- where the Y axis stayed on the left and the bars went rightward.
-
-2010-09-01
- * Fix bug 3056991 "Internal methods should be 'protected'":
- Changed CheckDataArray(), number_format(), FindDataLimits(), and
- DrawBackground() to be 'protected'. The test suite no longer calls
- these directly. For SetIndexColor(), SetRGBColor(), DrawText(),
- SizeText(), xtr(), and ytr(), left these as public with a comment
- indicating they should be treated as protected.
-
- * Fix bug 3057000 "Review 'deprecated' methods":
- + Changed deprecated method SetNewPlotAreaPixels() to just call
- SetPlotAreaPixels(). It was suspicious as coded, and was found
- to be equivalent to SetPlotAreaPixels().
- + Removed SetColor(), which didn't do anything. It was calling
- SetRGBColor and discarding the result. After reviewing the
- history of this in all CVS versions, it does not seem to have
- ever been coded correctly, so there is no harm in removing it.
- + All other deprecated methods seem OK and are left as is.
-
-2010-08-30 (lbayuk) ===== Released as 5.1.3 =====
- * phplot.php: Updated version
- * README.txt: Updated for new release
- * NEWS.txt: Add text for new release
-
-2010-08-27
- * Fix bug 3051832 "Let PHP/GD find the font file":
- Instead of checking for file existence, PHPlot now uses a non-drawing GD
- operation to validate a TrueType font in SetFontTTF(). This allows GD to
- use its internal search path, making it likely that fonts can be found
- without needing a platform-dependent path in your script. Full paths
- will still work, so there is no compatibility issue.
-
- * Fix bug 3051906 "Better choice for default TT font":
- Removed "benjamingothic.ttf" as the default TT font setting. This has
- not been included in PHPlot since 2004. Changed SetFontTTF() to call
- new GetDefaultFontTTF(), which will try a number of sans-serif font
- names the first time it needs a default TT font. Considering the above
- fix to finding fonts, this has a good chance of finding a working
- font. It is known to work on Windows and some Linux distributions.
-
-2010-08-19
- * Makefile: Removed phplot_data.php from list of files to release.
- Reference bug report 3048267. This file has not been maintained or
- tested, and has bugs. It will remain in CVS, but not be included
- in PHPlot releases.
-
-2010-08-17
- * Change new DrawLinePoints(). It does not have to check and
- handle error bar plots, as DrawDots and DrawLines will do that.
-
-2010-08-16
- * Rewrote DecodeDataType(). Previous implementation was hard to
- extend and inefficient. Now it uses new class variables (not a
- returned array) and is only called once, by DrawGraph. Changed all
- users of data_type to use the new variables.
-
- In CheckDataArray(), calculate data_columns properly for
- text-data-single data type (pie chart) too. Simplify DrawPie
- to use this, and merge 2 of the 3 cases.
-
- Have a single function handle each plot type, so it can properly
- check the data type and report a correct error message showing
- all supported types. For example, DrawBars is now the entry point
- for both bars and horizontal bars; DrawGraph does not directly
- call DrawHorizBars. Similar for DrawStackedBars and
- DrawHorizStackedBars. Lines, Points, and Linepoints also now
- have a single function each, dispatching to others as needed.
- (These changes were split off from an upcoming, larger change.)
-
-2010-08-14
- * Fixes to SetDataValues: need to clear out the 2 arrays before
- setting values in a loop, else if the function is used more than
- once then old values will remain.
- Move records_per_group calculation outside the loop.
- (These were split off from upcoming, larger changes.)
-
- * Part 4 of horizontal plots: implement horizontal thinbarline plots.
- Added new data type 'data-data-yx' (label, Y, X1, X2, ...).
- DrawThinBarLines() now draws either vertical or horizontal plots, and
- supports data types text-data, data-data, text-data-yx, data-data-yx.
-
- Fixed DecodeDataType() to handle text-data-single too, for completeness.
-
- * Fix for over-padding style and color arrays. These were padded to
- records_per_group, but that is the maximum data array row size.
- The number of actual data sets is less, and depends on the data type.
- Calculate the correct number as data_columns at the top of DrawGraph,
- and use that to pad the arrays. Also moved early error checking in
- DrawGraph() into new CheckDataArray().
-
-2010-08-09
- * Code cleanup. This is a large change to unify the comment and
- coding stye used in PHPlot. The PEAR style guide is being used
- as a reference, but PHPlot will never be 100% compliant.
- This patch introduces no functional changes at all.
- - Limit line length to 110.
- - Remove obsolete, partially implemented Doxygen comments.
- - Add descriptive comment above functions where missing.
- - Use consistent comment markers and control structure spacing.
- - Remove ctags-confusing end of function comments.
- - Rewrote a few if/else blocks for cleaner logic.
- - Re-order some functions for consistency (X, then Y).
-
-2010-08-04
- * Implemented horizontal stacked bar plots:
- Use the same data type introduced for horizontal bars, 'text-data-yx',
- and the same plot type 'stackedbars', to make a horizontal stacked bar
- plot. Data value labels, both at the ends of the bars and within the
- bars ('plotstack' labels) are available with horizontal stacked bars.
-
- * Internal function DrawDataLabel() is replaced by DrawDataValueLabel(),
- with different usage. The new function can also check to see if a label
- fits in the allocated space.
-
- * Fixed the text size check in stacked bar plots for data value labels
- within the bars. The check only worked correctly for 0 degree labels. It
- now works with any text angle. It suppresses the label if it is too high
- (for vertical stacked bar plots) or too wide (for horizontal stacked bar
- plots) to fit in the bar segment to which it belongs. Note that it only
- checks in the bar direction. If the text is too wide (for vertical bars),
- or too high (for horizontal bars), it will still be plotted, but will
- cross the sides of the bar.
-
-2010-07-28
- * Allow callbacks to return a value (to support new data_color callback).
- * Feature request 3034164 "Extended control of data colors":
- Define new callback 'data_color' for picking the data color.
- Changed internal plot drawing functions DrawDots, DrawLines, DrawSquared,
- DrawBars, DrawStackedBars, DrawDotsError, DrawThinBarLines,
- DrawLinesError, and DrawHorizBars to use the data_color callback
- (if defined) to select the data colors.
- * SetRGBArray code cleanup (no functional changes).
-
-2010-07-27
- * Fixes for error bars:
- Code cleanup in DrawYErrorBar(), with no functional change.
- Suppress duplicate drawing of error bars with 'linepoints' error plots.
- This was already fixed for data labels. Now error bars will only be
- drawn by the 'points' part, not the 'lines' part. There should be no
- visible changes to plots. (This is needed for a future change).
-
-2010-07-26
- * Horizontal bar charts (still an experimental feature) can now have data
- value labels.
- * HorizontalBars.txt: Fix incorrect description of bar direction. Add
- text explaining the new data value labels.
-
-2010-06-29 (lbayuk) ===== Released as 5.1.2 =====
- * phplot.php: Updated version
- * README.txt: Updated for new release
- * NEWS.txt: Add text for new release
-
-2010-06-26
- * Feature request 2885930 "Horizontal Bars":
- Horizontal bar charts are implemented, as an experimental feature.
- A new data type 'text-data-yx' was added, which works with
- 'bars' plot type to produce a horizontal bar chart from a data
- array with X values for each Y value. Changes were made to
- FindDataLimits, CalcMargins, CalcPlotAreaWorld, CalcBarWidths,
- and CalcMaxDataLabelSize to handle the new data type. Other
- changes were made to handle label position defaults and grid
- defaults. New drawing functions were added for horizontal bars.
-
- * HorizontalBars.txt: new documentation file for experimental feature.
- * Makefile: List new documentation file.
-
-2010-06-25
- * Each plot-type drawing function now checks that it is getting a data
- type that it knows how to handle. A new internal function unifies the
- checking and error message. (This is associated with an upcoming,
- bigger change.)
-
- Compatibility: If you were using an invalid data type for a plot type
- whose function did not check, will now get an error.
-
- * Removed some dubious code from DrawLines() and DrawSquared() and
- rewrote comments there. The code initialized lastx[0] and lasty[0],
- but lasty was mapped using the X (rather than Y) function. This was
- obviously wrong, but closer inspection showed that the values were
- never, used so the code was removed.
-
-2010-06-13
- * Truecolor.txt: removed
- * Makefile, README.txt: Removed reference to Truecolor.txt. Full
- documentation for truecolor images is now in the Reference Manual.
-
-2010-06-02
- * Fix bug 3010116 "Bad rendering of title in multi-plot image
- when using TTF":
- Make sure the main title is drawn only once. (If drawn multiple
- times with TrueType font text, the anti-aliasing effects result
- in poor quality text.)
-
-2010-05-31
- * Improvements to truecolor support (from feature request 2947679):
- Truecolor support is now better integrated. The derived class only
- has the constructor now, and the base class itself provides the alpha
- color component support through the internal functions SetIndexColor(),
- SetIndexDarkColor(), and SetRGBColor(). This means alpha channel
- works with palette images too (in so far as GD supports this).
-
- * Truecolor.txt: Updated per changes to truecolor support.
-
- * Image tiling with mode 'scale' in tile_img(), used with image and
- plot area backgrounds, now uses imagecopyresampled() rather than
- imagecopyresized(). They are the same with palette images, but the
- resampled copy gets better results with truecolor images.
-
-2010-05-29
- * Feature request 3002606 "Add to plot and image border options":
- Added options 'right', 'top', and 'bottom' to SetPlotBorderType()
- (existing options are 'left', 'sides', 'none', and 'full'). This
- now also accepts an array of the above options, giving complete
- control over which sides to draw.
- Added option 'solid' to SetImageBorderType() to use the actual
- color set with SetImageBorderColor(), rather than the darker
- shade as type 'plain' does (for some reason).
- New function SetImageBorderWidth() sets the width of the image
- border. The image border width is now accounted for in margin
- calculations, although existing plots will not change.
-
-2010-04-04 (lbayuk) ===== Released as 5.1.1 =====
- * phplot.php: Updated version
- * README.txt: Updated for new release
- * NEWS.txt: Add text for new release
-
-2010-04-01
- * Remove & from argument in SetDataValues(). The data array is not
- modified and does not need to be passed by reference. (There is
- no performance advantage, either.)
-
-2010-03-29
- * Feature request 2947679 "Support for alpha blending/Truecolor":
- Implemented truecolor image support with a new class
- PHPlot_truecolor, extended color specifications to allow
- specification of an alpha value, and added a new optional parameter
- to SetDataColors for a default alpha value for all data colors.
- This feature is *EXPERIMENTAL* (see next item).
-
- * Truecolor.txt: New file, documentation for the new truecolor capability.
- (The Truecolor feature is experimental, which means it is subject to
- change in incompatible ways and the documentation has not yet been
- incorporated into the PHPlot Reference Manual.)
-
- * Makefile: Include new documentation file in release.
-
-2010-03-26
- Fixed bug 2976735 "Improvements and fixes for 'area' plots":
- Rewrote DrawArea() function which handles 'area' plot.
- Part 1: This is related to feature request 2947679, Truecolor support
- with transparency. The area plot function was filling each area from the X
- axis up to the Y value, resulting in area overlaps. This wasn't a problem
- with opaque colors, but with transparency, the overlapping areas resulted
- in changed colors. The rewritten function fills the area between each line
- instead of from each line down to the X axis. Plots with opaque colors
- will not change.
- Part 2: Area plots now work when the X axis is moved up with
- SetXAxisPosition().
- Part 3: Fixed FindDataLimits() for area (and stackedbars too) to
- take absolute values of Y values. The drawing function was doing this,
- but not FindDataLimits, resulting in incorrect limits if any Y<0.
- Part 4: The rewritten DrawArea() also handles a new plot type
- 'stackedarea'. This is an area plot where the Y values are stacked,
- similar to 'stackedbars'.
- Note: As part of the changes, it is now an error to try an area plot
- with an unequal number of Y points for each X.
-
-2010-03-23
- * Feature request 2973995 "Add y-Data to Stackedbars":
- Implemented Y Data Labels for Stacked Bar charts (stackedbars).
- The labels are enabled with SetYDataLabelPos, same as with bar charts.
- There are two types of labels: above the stack with the total, and
- within the bars at each segment. 'plotin' turns on the upper ones, and
- 'plotstack' turns both on.
-
- * Other changes:
- + Removed unimplemented second argument to SetYDataLabelPos.
- + Fixed questionable logic in SetYDataLabelPos when given an argument
- that belongs with SetYTickLabelPos.
- + Fix comments at top of plot-type Draw functions.
-
- * Fix for bug 2974639 "Stacked bars plot breaks with X axis != 0":
- Stacked bar plots with non-zero X axis position no longer break apart
- into segments with gaps. The bars are drawn up from the X axis, and
- any segments or partial segments below the X axis are not drawn.
-
-2010-03-22
- * Change related to feature request 2947679 - Fix 'dot' point shape:
- Use imagefilledellipse(), not imagefilledarc(), when drawing the 'dot'
- point shape. The fix was needed for future support of truecolor images
- with transparency, but filled dots from imagefilledellipse() look
- better (rounder) with regular images and opaque colors.
- Credit to mvaldez for identifying the problem and providing the fix.
-
-2010-03-04
- * Fix for bug 2963757 "point_counts undefined error in 5.1.0":
- Fixed CheckPointParams so it sets point_counts even when the point shape
- and point size arrays are already the same size and do not need padding.
-
-2010-01-26
- * Fix for bug 2938219 "Bars go in wrong direction":
- Fixed CalcAxisPositions() to be consistent in positioning the X axis.
- When all Y values are <0 and the Y=0 line is not part of the plot range,
- PHPlot will now default the X axis to the top of the plot, not the
- bottom. This fixes the problem with bars to negative Y values being
- drawn downward if Y=0 is visible, but upward if Y=0 is not visible.
- This also affects thinbarline plots.
- Credit to lauryn1298 for finding the bug.
-
-2009-12-24 (lbayuk) ===== Released as 5.1.0 =====
-
-2009-12-18
- * Change for bug 1795971 "Fix default data colors":
- The default Data Color and Error Bar Color arrays now have 16
- different colors, no duplicates, and nothing so light that it
- is invisible.
- Using '' or False as the argument to SetDataColors, SetErrorBarColors,
- and SetDataBorderColors now re-initializes the map to the defaults.
- This was previously undocumented, and in some cases set the map to
- something different from the default.
-
-2009-12-15
- * Cleanup: Remove DrawAxisLegend() - empty function marked TODO,
- not really clear what it was meant to do.
-
-2009-12-14
- * Fix for bug 2914403 "Pie + X/Y titles: Undefined property error":
- In DrawGraph(), don't try to draw X or Y titles for pie charts.
-
- * Feature request 2899921: "allow different format for data and tick
- labels"; Bug 2906436: "Fixes for X Tick Labels vs X Data Labels",
- and partial implementation of changes from user 'adoll' regarding
- tick vs data labels:
-
- New public functions:
- + SetXDataLabelType() : Sets formatting for X Data Labels
- + SetYDataLabelType() : Sets formatting for Y Data Labels (bar charts)
- + SetXDataLabelAngle() : Sets text angle for X Data Labels
- + SetYDataLabelAngle() : Sets text angle for Y Data Label (bar charts)
- The defaults for these are set up to be fully backward compatible
- with previous releases of PHPlot (except see the next item).
-
- Re-used function name SetXDataLabelAngle():
- + This has been deprecated and undocumented since 2003-12-07, and
- used to just call SetXLabelAngle(). For new behavior, see above.
-
- Changes to public functions:
- + SetXDataLabelPos() and SetXTickLabelPos() no longer cancel each
- other out (set the other control variable to 'none'). Instead,
- they are both considered before plot drawing.
-
- Changes to internal functions:
- + DrawDataLabel() now uses the font, angle, and color arguments as
- provided, and does not substitute values if they are empty.
- + SetLabelType() now takes mode='xd' and 'yd' for X Data and Y Data
- label formatting; 'x' and 'y' are for tick labels only now.
- + Functions that work on Data labels now call FormatLabel() with the
- new mode parameter value 'xd' or 'yd, and use the new
- data_label_angle variables.
- + New CheckLabels(), used by DrawGraph to process label parameters.
- + CalcMargins() - Rewritten to handle changes to Tick and Data labels.
-
- Changes to internal class variables:
- + New: x_data_label_angle, y_data_label_angle
- + Do not initialize x_tick_label_pos or x_data_label_pos, so that
- CheckLabels() can tell if they were set or not and apply defaults.
- + Initialize y_data_label_pos to 'none', not 'plotleft'.
- + Add 2 more indexes to label_format[] array: 'xd' and 'yd'.
-
- * Cleanup:
- + Delete unused internal class variable: draw_y_data_label_lines
- + Delete unused function SetDrawYDataLabelLines()
-
-2009-12-07
- * Fix bug 1795972 "Fix default point shapes":
- + Added 10 new point shapes to the existing 10 shapes.
- + Changed the default point shape from all 'diamond' to a
- selection of up to 10 different shapes.
- + Fixed bug in the code that tried to set the point shapes
- and sizes arrays to be the same size. This was not working,
- resulting in unexpected point sizes.
- + Changed default point size to 6 for all shapes. It was trying
- to be "5, 5, 3" but due to several bugs this was not working.
- + Do not adjust shape sizes to even numbers (was done for only two
- shapes). Instead, consistently truncate size/2 when needed.
- NOTE: These may change the look of 'points' and 'linepoints' plots.
-
- * Changed startup initialization code:
- + SetDefaultStyles() was doing some odd things using a variable
- called "session_set", with comments referring to non-existent
- session support code. This has been removed. There should be
- no visible changes from this. PHPlot does not use PHP sessions.
-
-2009-12-04
- * Fix for bug 2908256, errors in pie charts with bad data array:
- (From a Drupal contrib module report by thekevinday.)
- With pie charts only, a data array with no valid Y values resulted
- in PHP error messages. All other plot types handle this by producing
- an image without a graph.
- Fixed DrawPieChart to behave this way too. If there are no valid Y
- values, or if the sum of all Y values is 0, do not error out, but
- don't draw a pie chart either.
- Also, pie charts now ignore non-numeric Y values, like other plot types.
-
-2009-11-20 (lbayuk)
- * Fix for bug 2900914 "Problem with display of 0 on Y axis":
- Changed how X and Y values are stepped by tick intervals, to avoid
- cumulative round-off error. This fixes the problem when Y crosses 0 with
- a tick step such as 0.1 resulting in a long label for a very small but
- non-zero number. Fixed DrawXTicks, DrawYTicks, and CalcMaxTickLabelSize.
- (Originally reported by cncnet)
-
-2009-11-19 (lbayuk)
- * Improve support for using callbacks to annotate plots:
- Added new callback 'draw_all', called after all drawing.
- Supply plot_area[] as argument to some drawing callbacks.
- Added new method GetDeviceXY() to translate from world coordinates.
- Allow NULL or '' for $font in DrawText() internal method, meaning to
- use the generic font. If callbacks want to use DrawText, this
- avoids them having to reference the internal fonts[] array.
-
-2009-11-01 (lbayuk)
- * Address bug report 2886365 "Declare all functions and variables in
- PHP5 style"
- PHP5 deprecates the use of 'var' to declare a class member variable.
- All initialized class member variables are now declared 'public'.
- (It was tempting to make most or all 'protected' or 'private', but
- that would likely break too much, including the PHPlot Test Suite.)
-
- Most class member functions which are meant for internal use only are
- now declared 'protected', so they cannot be called from scripts
- (except in child classes). (Note PHP5 does not deprecate the use of
- just 'function' to mean public, so public functions were not changed.)
- Internal functions are those documented in the manual under Developer's
- Guide, Internal Functions. If your code breaks because you are using
- a method which is now protected, please post the details on the help
- forum.
-
- Some member variables which were set in the constructor are now
- initialized with the class instead. (No impact.)
-
- Removed commented-out, FIXME-noted code for interim labels.
-
-2009-10-12 (lbayuk)
- * Bug report 2839547, allow SetImageBorderType('none') to reset the image
- border type. Also checked for other cases where there is no reset;
- found one that exists (Set[XY]LabelType) but needs to be documented.
-
-2009-07-09 (lbayuk)
- * Added a hook $plot->locale_override which can be set to True to prevent
- PHPlot from loading locale settings from the environment with
- setlocale(LC_ALL, ''). This is necessary for testing PHPlot on Windows,
- where you cannot force a locale with an environment variable. It might
- also be needed for people who want PHPlot's locale to differ from the
- web server's locale.
-
-2009-06-12 (lbayuk) ===== Released as 5.0.7 =====
-
-2009-06-11 (lbayuk)
- * Change PHPlot license to LGPL, per Afan.
- phplot.php, phplot_data.php - Change license notice.
- rgb.inc.php - Change top comments and remove bottom marker.
- COPYING - new file, text of LGPL.
- LICENSE.* - removed files - old licenses.
- Makefile - change list of distributed files.
-
- * Fix for bug 2803900: SetRGBArray('large') does not work. The include
- file defined a different array name than the main script expected.
- (This bug seems to have happened over 8 years ago.) Fixed the array
- names to match. Also removed the ./ prefix from the included filename
- so it will be found if on the include path but not in the script
- directory. Also added error check if the rgb.inc.php include file
- is needed and not found.
-
-2009-05-25 (lbayuk)
- * Added new feature to allow partial margin or plot area specification.
- You can omit, or specify as NULL, any of the 4 arguments to
- SetMarginsPixels() or SetPlotAreaPixels(), and this means PHPlot
- should use the automatically calculated margin on that side.
- Credit to adoll for this feature.
-
-2009-05-17 (lbayuk)
- * Fix for bug 2791502 "Error plots treat missing Y values as 0":
- Plots with data type data-data-error now support missing Y values,
- instead of treating them as 0. This works with lines, points,
- and linepoints plot types, and also honors SetDrawBrokenLines.
-
-
- * Fix for bug 2792860 "Wrong DataLabelLines with missing Y":
- Do not draw X Data Label Lines at points with missing Y values.
-
-
- * Fix for bug 2786350 "Missing Y data results in bad auto-range":
- Rewrote FindDataLimits to ignore missing Y values, rather than
- treating them as if 0, for calculating range.
- Bug report and analysis by mrten.
-
- * Fix for bug 2786354 "Incorrect auto-range for data-data-error":
- For data-data-error data type, apply the positive and negative error
- amounts for each Y point to that point only, rather than applying the
- largest errors to the overall minimum and maximum Y value for the row.
-
- Note: The two fixes above can change existing plots which rely on
- automatic Y range calculation. The first fix affects plots with
- missing Y values and min(Y)>0. The second fix can affect plots using
- data-data-error data type and different error values for different
- points. In both cases the new Y range can be smaller than before.
-
-2009-01-20 (lbayuk) ===== Released as 5.0.6 =====
-
-2009-01-18 (lbayuk)
- * Fix for bug 1891636 "Misaligned TTF X Labels":
- PHPlot was using the actual bounding box of each line of text
- to allocate space and set the text positioning, but was ignoring the
- fact that the text baseline is not the same as the bottom of the
- bounding box. This resulted in uneven alignment of the X labels if
- they had different heights (for example, month names Jul and Aug).
-
- PHPlot now calculates the size of text for allocation (SizeText) using
- the descenders on the last line, and calculates the size for drawing
- (DrawText) only to the baseline. PHPlot also now uses a fixed line
- spacing for each line of text in a font, rather than the actual text
- height. This allows separately drawn multi-line labels to align.
-
- * Changes to line spacing when using multi-line labels:
- PHPlot was using the class variable line_spacing to mean the
- number of pixels between lines of multi-line labels. This made the
- spacing too small for larger fonts, and it was not possible to adjust
- line spacing for different types of text.
-
- PHPlot now interprets line_spacing as the number of pixels only
- for GD text, and as a scale factor for the font's built-in line
- spacing for TrueType text. In addition, a new optional argument is
- added to SetFont, SetFontGD, and SetFontTTF to set a line spacing
- specific to that type of text.
-
- * Changes had to be made to the legend drawing code to accommodate the
- changes to font handling.
-
- Note: The line spacing change results in slightly looser spacing on
- multi-line TrueType text labels, and slightly taller legends, compared
- to version 5.0.5.
-
-2008-09-21 (lbayuk)
- * Interim fix for bug 1932571 "Data-Data Plot fails with same X values".
- PHPlot will no longer hang when the range of X values is 0 (that is, when
- x_min == x_max). It will arbitrarily set an X range of 1, so the
- calculated tick step is not 0. This is a temporary fix. Work on a smarter
- X and Y range calculation is in progress, which will handle edge cases
- like this better, but it isn't ready and this bug has been open too long.
- Credit to andyl for finding the bug.
-
- * Fix font path: Use DIRECTORY_SEPARATOR constant not '/'.
-
- Extended the label formatting capabilities, adding 'printf' and 'custom'
- types, added a prefix and suffix for 'data' type, and allow format controls
- to be included in SetXLabelType and SetYLabelType.
-
- External changes:
- * Added 'printf' label type. The caller specifies the print format as the
- 2nd argument to SetXLabelType or SetYLabelType (default '%e').
- $plot->SetXLabelType('printf', '%5.2f');
-
- * Added 'custom' label type. The caller supplies a callback (typically a
- function name) and optional pass-through argument as the 2nd and 3rd
- arguments to Set[XY]LabelType. The function is called as $f($value, $arg)
- to return the formatted $value.
- $plot->SetXLabelType('custom', 'myfunction', $arg_value);
-
- * In addition to Set[XY]TimeFormat, the format string for type 'time' can
- now be set as the 2nd argument to Set[XY]LabelType.
- $plot->SetXLabelType('time', '%H:%M');
-
- * In addition to SetPrecision[XY], the precision for type 'data' can now be
- set as the 2nd argument to Set[XY]LabelType. A 3rd and 4th argument
- can supply a prefix and suffix for 'data' formatting. (All optional)
- $plot->SetXLabelType('data', 2, '$', 'US');
-
- Internal changes:
- * Class variables x_precision, y_precision, x_label_type, y_label_type,
- x_time_format, and y_time_format have been removed.
-
- * New class array variable label_format[], with elements 'x' and 'y' which
- are arrays for label formatting. Elements in the sub-arrays are not
- initialized until needed.
-
- * New function SetLabelType, which implements Set[XY]LabelType now.
-
- * FormatLabel() was rewritten to support the new label formatting.
-
- Compatibility:
- * Any code that directly references class variables related to label
- formatting will break, except for data_units_text. Use the documented
- function methods instead. Setting data_units_text as a suffix is
- deprecated but still works.
-
- * The 'data' type precision for 'Y' is still used for pie chart labels.
-
-2008-07-12 (lbayuk)
- Multiple comment spelling error fixes. No functional changes.
-
-2008-07-06 (lbayuk)
- Changes to allow mixing GD fixed-font text and TrueType Font (TTF) text
- on the same plot.
- (This change came from work done trying to fix TTF text positioning,
- where it looks like additional information needs to be stored for TrueType
- fonts. The old font data structure was awkward to extend, and allowing
- mixed GD/TTF text was on the to-do list anyway.)
-
- External changes:
- * SetFontGD(), SetFontTTF(): New functions to set a font, with type.
- * SetFont(): Now calls SetFontGD or SetFontTTF depending on $use_ttf.
- These changes should be fully compatible with existing programs.
-
- Internal changes:
- * Updated comments explaining SetUseTTF() now sets the default type
- (not the only type) of text used.
- * Put all the font data into a class array. (Replaces $this->generic_font
- with $this->fonts['generic'], etc.)
- * ProcessTextGD() and ProcessTextTTF() now take the font array as one
- argument, rather than separate arguments for font path and size.
-
-2008-01-13 (lbayuk) ===== Released as 5.0.5 =====
- * phplot.php: Updated version
- * README.txt: Updated for new release
- * NEWS.txt: Add text for new release
- * Makefile: Remove 'Callbacks' from release target, as this material is
- now in the reference manual.
-
-2008-01-07 (lbayuk)
- Copyright updated to 2008 and PHP4 no longer listed as supported.
-
- Major rewrite of the margin calculation functions to address multiple
- problems. Fixes for bugs 1856207 "Margin error with 'xaxis'/'yaxis'
- position, 1843012 "Make margins, drawing consistent", and 945439
- "x_tick_label_height not set correctly".
-
- Note: These changes are inter-dependent and cannot be split up.
-
- * Defer all calculations to DrawGraph time, to eliminate order dependencies.
- These functions now just store their arguments in the object, and all
- calculations happen later:
- + SetXAxisPosition, SetYAxisPosition
- + SetMarginsPixels
- + SetPlotAreaPixels (Stores margins, not area, now.)
- + SetPlotAreaWorld
- + SetXTickIncrement, SetYTickIncrement
-
- * A new callback 'debug_scale' was added to trace the margin and scale
- calculations.
-
- * CalcMargins was rewritten. Actual sizes of tick and data labels are now
- used, rather than guesses like "use size of biggest Y value". A minimum
- value (3 x safe_margin, or 15 pixels) applies to each margin.
-
- * FindDataLimits no longer needs to find the longest data label, since
- CalcMargins now does that more precisely.
-
- * DrawXTitle and DrawYTitle now use position offsets calculated by
- CalcMargins. Note: These titles are now offset from the plot area,
- not the image area. The titles will move if you had set the plot area
- or margins.
-
- * DrawYTick, DrawXTick rewritten to use pre-calculated offsets, and common
- code moved to new CalcTicks().
-
- * DrawXDataLabel: Use pre-calculated offsets for text.
-
- * DrawGraph: Rewrote top section (before drawing anything) to do the
- calculations in the proper order, unconditionally.
-
- * Class variables removed:
- x_label_inc, y_label_inc, _x_label_cnt : These were never used.
- title_height, x_title_height, y_title_width : Now internal to CalcMargins.
- data_limits_done : No more need to remember if FindDataLimits called.
-
- * New class variables added:
- plot_margins_set : Keeps track of user-set plot area or automatic.
- x_label_top_offset, x_label_bot_offset, x_offset_axis_offset,
- y_label_left_offset, y_label_right_offset, y_label_axis_offset,
- x_title_top_offset, x_title_bot_offset,
- y_title_left_offset, y_title_left_offset : Label offsets
-
- * New internal functions:
- CalcPlotAreaPixels : Deferred calculations taken out of SetPlotAreaPixels
- and SetMarginsPixels.
- CalcPlotAreaWorld : Deferred calculations taken out of SetPlotAreaWorld.
- CalcAxisPositions : Calculate axis positions, moved from CalcTranslation.
- CalcTicks : Calculate X and Y tick interval. This still uses the
- same simple method (basically range/10), but now we could drop in a new
- algorithm much more easily. This is now also used by CalcMargins.
- Code taken out of DrawXTicks and DrawYTicks.
- CalcMaxTickLabelSize : So CalcMargins can use the exact tick label sizes.
- CalcMaxDataLabelSize : So CalcMargins can use the exact data label sizes.
- DrawXTick : Code split out from DrawXTicks for symmetry with DrawYTick.
-
-
-2007-12-13 (lbayuk)
- * Changed ProcessTextTTF() so SizeText() will return integers. It rounds
- the calculated values up, so the bounding box really contains the text.
- This also prevents unneeded float calculations in derived values.
-
-2007-12-09 (lbayuk)
- Major rewrite of the text drawing functions to address multiple problems.
- Note: These changes are inter-dependent and cannot be split up.
-
- * Fixed bug 1813070 "Bad position for multi-line TrueType text":
- TTF text is now drawn line-by-line, not as a block, for proper
- alignment and positioning.
-
- * Fixed bug 1813071 "Wrong title height for multi-line TTF text":
- Corrected miscalculation of overall height of multi-line TTF titles.
- This bug resulted in over-sized margins.
- The height is now computed line-by-line, including the inter-line spacing.
-
- * Fixed bug 1813474 "DrawText alignment arguments wrong":
- Corrected meaning of 'top' vs 'bottom' alignment. PHPlot now follows
- the usual conventions: 'top' alignment means top of text to reference.
- DrawText default for vertical alignment is still 'bottom', but the
- meaning was corrected. All callers of DrawText were fixed.
-
- * Fixed bug 1816844 "Fix order dependency for setting titles":
- Defer processing titles strings until DrawGraph(), so there is no
- more order dependency (no need to set font before setting title strings).
-
- * Fixed bug 1819668 "Horiz. align multi-line text: GD vs TTF":
- The new text routines draw TTF text line-by-line and correctly do
- right-, center-, and left- alignment of each line within a text block.
-
- * Fixed bug 1826513 "FIXME in DrawLegend: Max label length":
- Use actual width of widest legend line to calculate legend box size.
-
- * Partial fix for bug 945439 "x_tick_label_height not set correctly":
- In FindDataLimits(), save the longest data label, not just its length,
- and use the actual rendered size of that string in CalcMargins() for
- the margin calculations.
- Also take into account which of the tick or data labels are visible.
- This is not a complete fix, but is a significant improvement.
-
- The following changes were made related to the above fixes:
-
- + Replaced internal function TTFBBoxSize(), which didn't work right, with
- SizeText(). It returns the orthogonal bounding box of a block of text,
- and works with both GD and TTF text.
-
- + DrawText() and SizeText() call a single function ProcessText(), which is
- the only place GD text and TTF text are distinguished. (So eventually
- we will be able to mix GD and TTF text on a plot.)
-
- + New internal functions ProcessTextGD() and ProcessTextTTF() draw (or size)
- GD and TTF text respectively. These are only called by ProcessText().
- These are re-implementations which properly position and align text.
-
- + Removed class variables title_angle, x_title_angle, and y_title_angle. The
- titles only work at their fixed angles anyway (0, 0, and 90 respectively).
-
- + Line spacing set with SetLineSpacing() now affects TTF text as well as
- GD text. Previously, it only affected GD text. The default line spacing
- happens to be usable for TTF text.
-
- + Added new callback hook 'debug_textbox' for developing, testing, and
- documenting. It provides access to the text area bounding box.
-
- + Removed unneeded class variables x_tick_label_height, y_tick_label_width,
- x_tot_margin, y_tot_margin.
-
-2007-11-25
- * Improve error handling:
- Internal functions PrintError() and DrawError() are now the same. Both
- will draw the error message into the image and output it, and then
- trigger a user-level error. If no error handler has been set, it will
- exit, as before. But now the error message should also get logged, or
- written to the standard error stream, depending on the SAPI in use.
- You can now establish an error handler to catch most PHPlot errors and
- do some cleanup before exit.
-
- This fix also covers bug #1823774 "Default Font Path and Error Message
- Output".
-
- Fixed the return value of most PHPlot functions, to return False on
- error, else True. Since uncaught errors are fatal anyway, this only
- affects code with an error handler that returns, which is not
- recommended and unsupported at this time. These changes are for
- possible future error handling options.
-
-2007-11-22
- * Fix bug 1836528 "Insufficient checking of parameter values":
- Rewrote CheckOption to correctly validate option choices.
- (It previously accepted substrings and other incorrect values.)
- PHPlot methods that use CheckOption now must be called with valid option
- values. Empty strings are also no longer accepted.
-
-2007-11-17 (lbayuk)
- * Change to callbacks to support extra arguments.
- The PHPlot class can now pass extra arguments to a callback function.
- Callback functions now take the following form:
- my_callback($img, $passthru_arg, ...)
- Where '...' is zero or more additional arguments supplied by PHPlot to
- the callback. Each implemented callback reason will define any
- additional arguments it uses. The existing defined callbacks have not
- changed and do not currently pass any extra arguments.
-
-2007-11-10 (lbayuk)
- * Fix bug 1827263 "Spoiled up pie-chart if $val is close to zero":
- Skip pie slices which would result in an integer angle of zero
- degrees, because the GD arc filling function will draw a complete
- circle for that case.
- Credit to Viacheslav <webdeveloper.ua at gmail.com> for finding this.
-
- * Removed 8 of the functions (class methods) marked 'deprecated'. Only
- deprecated functions which seem to have been for internal use have
- been removed. Even old scripts shouldn't be using them, and they are
- becoming a problem to maintain.
- Removed: SetImageArea() DrawDotSeries() DrawLineSeries() CalcXHeights()
- CalcYWidths() DrawLabels() InitImage() DrawDashedLine().
-
-2007-10-20 (lbayuk) ===== Released as 5.0.4 =====
- * phplot.php: Updated copyright, version, and authors comments at top.
- * README.txt: Updated for new release
- * NEWS.txt: Add text for new release
-
-2007-10-18 (lbayuk)
- * Add callbacks - experimental feature:
- New functions SetCallback, GetCallback, RemoveCallback.
- New internal function DoCallback.
- Added callback hooks to DrawGraph.
-
- Re-arranged code in DrawGraph to bring pie chart drawing into the main
- switch on plot type, rather than a special case in its own block. This
- makes it easier to follow and easier to add callback hooks.
-
- * Callbacks: New file, documentation for the new callbacks feature.
- (This won't be in the manual while it is an experimental feature.)
-
-2007-10-15 (lbayuk)
- * Fix for bug 1813021: Miss-positioned right-justified vertical GD text.
- Fixed DrawText() to correctly position 90 degree right-justified text
- drawn in a fixed GD font. This could be seen with 90 degree Y tick
- labels. (Found by accident while working on TrueType text problems.)
- Also some code cleanup in DrawText: use elseif where appropriate.
-
-2007-10-09 (lbayuk)
- * Code cleanup: Simplify SetIndexColor() and SetIndexDarkColor().
- There is no need to first try ImageColorExact, then ImageColorResolve
- if that fails. ImageColorResolve does all that for us.
-
- Code cleanup: Rewrite SetRGBColor(). It now detects if an unrecognized
- color name or color value form is used, and draws an error message.
- Before this it would get a PHP index error and "headers already sent"
- condition.
-
- * Code cleanup: Remove duplicated code for loading image files.
- Added new class-private function GetImage() which loads an image based
- on the image type, and also returns the image size. This replaces
- duplicated code in tile_img() and SetInputFile().
- Also fixed comment at top of SetImageFile which said it was deprecated.
- It isn't - it is used by the constructor. Moved the function out of the
- 'deprecated' area up to below where it is used.
-
- * Code cleanup: PHPlot should not define or affect anything outside its
- own class.
- - Removed the check for __FUNCTION__ (PHP 4.3 and up). This is obsolete.
- - Do not set error_reporting to E_ALL. Although it is recommended that
- scripts do this, it is not the place of loaded classes to do it.
- - Remove unused global constant TOTY.
- - Removed constants MAXY and MINY. Global constants like this are bad.
- These were used as magic index values into data[] to hold min and max Y
- values for the row. Instead, put them in separate arrays which are
- named data_miny[] and data_maxy[]. (This seems to be only used by the
- data line drawing function.)
-
- Comment cleanup: Remove one commented-out partial function DrawPlotLabel,
- and fix another commented-out code fragment in DrawYErrorBar. Both of
- these had unmatched braces in them which caused a balance-braces check
- to fail.
-
- * Code cleanup, array padding: Get rid of functions outside the class
- and remove the interim fix for PHP 5 (which changed the behavior of
- array_merge). Rewrote external function array_pad_array() as a new
- class function pad_array(). It does not need access to the class,
- but I don't think PHPlot should add to the global namespace more
- than necessary. The third argument (array to use for padding) was
- never used, so it was removed. It always pads the array with itself.
- It now only works on 'usual integer indexed' arrays (0-based
- sequential integer index). The was previously required but
- undocumented for some of the arrays (like line_widths); now it is
- required for all style arrays and will be documented. Now we can pad
- the array to the required length, not just N times its previous
- length, and we don't need array_merge. Deleted external function
- array_merge_php4() as it is no longer used.
-
- Deleted PHP end marker ?>. You don't need this and it can cause
- problems with extra whitespace in your output.
-
-2007-09-24 (lbayuk)
- * Code cleanup: Fix ternary operator misuse. This doesn't change
- behavior, but it was annoying me so I fixed it.
- Replaced all cases of code like this: $a = ($a > $b) ? $b : $a
- With just: if ($a > $b) $a = $b
-
- * Fix Makefile 'release' target to set owner/group when creating
- the tar file. This avoids having to run it as root, but it needs
- GNU tar to work.
-
-2007-09-08 (lbayuk)
- * Fix for bug 1790441: Removed the PHPlot quasi-destructor function and
- the register_shutdown_function() call which arranged for it to be used.
- This was preventing release of memory when a PHPlot object was unset,
- because the registered shutdown function held a reference to it.
- So rather than improving memory use, it had the opposite effect.
- Note: It is no longer necessary or recommended to use reference
- assignment ($plot =& new PHPlot) for PHPlot object creation.
- Thanks to annajilly for the thorough analysis, bug report, and fix.
-
-2007-09-05 (lbayuk)
- * Rewrote FormatLabel() to ignore blank label values. Adapted from a
- patch and feature request submitted by Gerhard Reithofer (exgerhardr).
- Blank labels used to produce an error if the LabelType was set to
- 'time', and zero if set to 'data'. Now they are just ignored. This
- provides a simple way to have labels only at selected intervals when
- using time or data formats. For example, you can have a date/time
- label at every 10th data point by setting the labels for the other 9
- to be empty strings. Also: Removed $which_pos values 'plotx' and
- 'ploty'. These were unused by PHPlot and this is an internal-only
- function so there is no compatibility issue. Removed error checking on
- $which_pos for the same reason; the error message used an undefined
- variable anyway so it wouldn't have worked.
-
-2007-08-26 (lbayuk)
- * Allow SetLegendStyle colorbox_align argument to be 'none', to suppress
- the colorboxes in the legend.
-
- Fix comment on $legend_text_align: empty means right, not left.
-
- Rewrote DrawLegend layout code to make it easier to understand. The
- result should be within 1 or 2 pixels of the previous size and position.
-
- * Fixes for bug 1779115: SetLegendWorld() fails on undefined vars
- Store the given coordinates and remember that they need to be converted
- from world to pixel coordinates, but defer trying to actually convert
- them until it is time to draw the legend. This way, there are no
- problems with the scale having to being set up first (which is nearly
- impossible to do). Made the following changes:
-
- Changed legend class variables to be uninitialized, and unset (rather
- than empty string) means use the defaults. Added a new variable:
- $legend_xy_world. If it is set, (legend_x_pos, legend_y_pos) need to
- be converted to pixel coords. If it is unset, they are already pixel
- coords (or undefined, meaning defaults).
-
- Changed usage of internal function DrawLegend(): removed all arguments.
- X and Y were always the class variables anyway, and now it needs to
- also use the new flag to tell it if X and Y are world or pixel coords.
- The third argument was unused.
-
- Removed third, unused, default NULL argument from SetLegendPixels and
- SetLegendWorld.
-
- Changes to DrawLegend to convert x, y coords to pixel coordinates
- if they came from SetLegendWorld. Also account for new usage of
- the class variables: Test for unset to mean use default.
-
-2007-08-04 (lbayuk)
- * New feature: control legend text and color box alignment.
- Adds a new function SetLegendStyle to adjust the alignment of the
- text and the color boxes inside the legend.
- Based on part of bug 1208054, contributed by David Hernández Sanz.
-
-2006-12-02 (lbayuk)
- * Fixes for bug 1605555: Y Data Labels use wrong font and not formatted.
- Use y_label_font (not x_label_font) for Y Data Labels.
- Use the formatted value for the label, not the original text.
- (This applies to bar charts only, with the new Y data labels.)
-
- * One fix for bug 1208054: Localization of number format.
- If number formatting is enabled with 'data' format type, PHPlot previously
- used dot for decimal point and comma for thousands separator, and there
- was no way to change it.
-
- This fix adds a new function:
- SetNumberFormat($decimal_point, $thousands_separator)
- to set the separators. In addition, if that function is not used,
- PHPlot will now try to use locale-dependent separators. If locale
- information is not available, it will fall back to the old defaults
- of dot and comma.
-
- Note: This change may have some negative effects. 1) If your locale is
- "C" or "Posix", you might not get a thousands separator now by default.
- You should be using a more specific locale. 2) If your PHP script is
- forcing a specific locale with setlocale(), PHPlot will probably undo
- that because it uses setlocale(LC_ALL, '') to import locale information
- from the environment. We have to do that, or a locale set through
- the environment is ignored. But it will override a manually set locale.
-
- * Fix for bug 937944: X/Y Tick Counts
- PHPlot could draw one too few Y tick marks, and one too many X tick marks.
-
- Changed the code to stop drawing X (Y) tick marks when the current X (Y)
- value exceeds the maximum X (Y) value plus a small fudge factor. The fudge
- factor accounts for cumulative error when repeatedly adding a delta to
- the X (Y) value.
-
- Notes: The bug report was writing about Y tick counts only, but X tick
- counts can also be wrong. The proposed fix in the bug report does not
- work in all cases.
-
- This fix changes the appearance of many plots which were missing the
- top-most Y tick mark. The extra X-tick mark problem is less common.
-
-===== Released as 5.0rc3 =====
-
-2006-11-13 (lbayuk)
- * Fix for bug 1437912: x-axis label misalignment [bar charts]
- The calculations were redone from scratch.
- New control variable 'bar_extra_space', which works in addition to
- 'group_frac_width' to control how much extra space is around the bars.
- Made bar widths match for 'stackedbars' and 1-bar-per-group 'bars'.
-
- NOTE: This changes the appearance of charts. bars in 'stackedbars'
- will now be thinner, and bars in 'bars' graphs will be thicker. I
- saw no reason for them being different before.
-
- This fix required fixing the positioning on the new bar data labels,
- which was off before. The bar data labels will now be centered.
- Additional fixes to bar chart data labels:
- For negative values, the label will center under the bar.
- Fixed X-adjustment to account for shading.
- Fixed to not suppress the data label if the value is 0.
-
-
-2006-11-10 (lbayuk)
- * Fix for bug 1594457: DrawError text wrap and background fix
- Do error image white background correctly, and word-wrap the text.
-
- * Fix for bug 1594458: Suppress lines or points in 'linepoints'
- Don't draw X data labels twice for 'linepoints'.
- Allow SetPointShapes value 'none' to suppress points, and allow
- SetLineStyles value 'none' to suppress lines. This allows a 'linepoints'
- graph to mix lines only, points only, and both on the same graph.
-
-
-2006-11-09 (lbayuk)
- * Fixes for bug 1446523:
- + Wrong variable name in deprecated SetAxisFontSize()
- + Fails to properly handle error if SetDataValues() was never
- called, or not called with a data array.
-
- * Fix for bug 1117122: Pie Chart ignores SetPlotAreaPixels
- Don't let DrawGraph recalculate the plot area for pie charts if the
- user already set it with SetPlotAreaPixels.
-
- NOTE: This fix may slightly change the appearance of some pie charts,
- whether or not they use SetPlotAreaPixels.
-
- * Fix for bug 1103992: Wrong max Y calculated for stackedbars
- Changes FindDataLimits to calculate max Y correctly. It was counting
- the first Y value in each record twice, which is always wrong but
- only affected stackedbars because the Y values are summed.
-
- * Fix for bug 1096199: Wrong error bar colors in DrawDotsError.
- Rewrites DrawDotsError to make it work like DrawLinesError to
- correctly increment the record and color indexes.
- Also fixes uninitialized x_now_pixels.
-
- * Fix for bug 1096197: No borders on unshaded Draw[Stacked]Bars
- Unshaded Bars and StackedBars covered the border with the rectangle.
- The fix is to draw the rectangle, then the border.
-
- NOTE: This fix changes chart appearance. Bars and Stacked Bars
- will now get a black border around each bar by default, if you
- turn off the 3D-shading. If you want borderless, unshaded bars
- you need to use SetDataBorderColors to set the data border colors
- to be the same as the data colors.
-
- * Fix for bug 1333164: Negative data values, if string variables, result
- in unfilled bars. The problem was a string-to-string compare of a
- negative number with the empty string x_axis_position. Fixed by
- initializing x_axis_y_pixels to 0 if SetXAxisPosition was not used.
-
-
-2005-04-17 (afan)
- * Fix for bug [ 1161072 ] SetInputFile warning, background overwrite
-
- * Bug 1182672 fixed
-
-2005-04-15 (afan)
- * fix for bug: [ 1182666 ] Y Auto-scale rounds in wrong direction
-
- * Fix for bugs 1144644 TrueType font path problems and 1106328 TTF
- path/filename inconsistency
-
- * Fix Bug: [ 1117120 ] X Title sizing uses Y Title font height
-
-2005-04-13 (afan)
- * Error in SetLineStyles() - does not accept an array argument
-
-
-2005-03-29 (afan)
- * Small typo fixed in SetYDataLabelPos
-
- * Update SetDataLabelPos: For past compatibility we accept plotleft,
- ...but pass it to SetTickLabelPos
-
-2005-03-26 (afan)
- * Change to line 3802: data lables now work with multiple bars with *$idx
-
-2005-03-25 (afan)
- * Added Function DrawDataLabels to put data labels in world coords,
- added call from DrawBars and modified SetYDataLabelPos to flag
- whether or not to call DrawDataLabels.
-
-2005-01-20 (migueldb)
- * Many bugfixes reported and solved by L. J. Bayuk. Thanks!
- + fixed bug #1096190
- + FindDataLimits(): fixed bug #1096192
- + CalcTranslation(): fixed bug #1101317
- + DrawImageBorder(): fixed bug 1096200
- + DrawXDataLabel(): fixed bug 1099879
- + DrawDots(): fixed bug #1096194
-
-===== Released as 5.0rc2 =====
-
-2004-10-24 (migueldb)
- * array_merge_php4(): added to cope with the bug introduced by
- the change in array_merge() from PHP4 to PHP5 (I haven't verified this)
- * Fixed some divisions by zero, thanks to an old bug report.
-
-2004-09-09 (migueldb)
- * SetPointSize(): deprecated
- * SetPointSizes(): added as replacement for SetPointSize().
- Now able to set point sizes on a per line basis.
- * SetPointShape(): deprecated.
- * SetPointShapes(): added as replacement for SetPointShape().
- Now able to set point shape on a per line basis.
- * DrawDot(): now needs record number to decide which dot shape and
- size to draw.
- * CalcMargins(): dirty fix for x data label placing.
- * tile_img(): fixed tile placement.
-
-2004-06-14 (migueldb)
- * SetXTickLabelPos() and others: more on the bug reported by Jo Demol.
- * Fixed bug reported by Jo Demol.
-
-2004-05-11 (migueldb)
- * SetBgImage(): added.
- * SetPlotAreaBgImage(): added.
- * SetInputFile(): deprecated.
- * DrawBackground(): now accepts images as backgrounds.
- * DrawPlotAreaBackground(): now accepts images as backgrounds.
- * tile_img(): internal method added.
-
-..........
-Editor's Note: For older changes to PHPlot, please see the CVS logs.
+This is the Change Log for PHPlot.\r
+The project home page is http://sourceforge.net/projects/phplot/\r
+-----------------------------------------------------------------------------\r
+\r
+2011-01-15 (lbayuk) ===== Released as 5.3.1 =====\r
+ * phplot.php: Updated version\r
+ * README.txt: Updated for new release\r
+ * NEWS.txt: Add text for new release\r
+\r
+2011-01-09\r
+ * Fixed some style / indent errors, and 1 redundant test.\r
+\r
+2011-01-03\r
+ * For bug 3143586 "Multiple plots per image - fixes & docs":\r
+ Make sure there is a documented way to reset PHPlot feature\r
+ settings, especially those for which the default settings result\r
+ in automatic calculated values. Where possible, calling a Set*()\r
+ function with no arguments should reset the feature to defaults.\r
+\r
+ + Changed SetLegendPixels() arguments to be optional with default\r
+ NULL meaning reset to automatic positioning.\r
+\r
+ + Fixed SetXAxisPosition() and SetYAxisPosition() to accept empty\r
+ string '' to mean reset to default automatic positioning.\r
+ Make arguments optional, defaulting to empty string.\r
+\r
+ + Changed SetNumXTicks() and SetNumYTicks() arguments to be\r
+ optional with default empty string '' meaning reset to\r
+ of automatic calculation.\r
+\r
+ * Changed SetPointShapes() to use CheckOptionArray(). This\r
+ simplifies the function with no change in operation.\r
+\r
+ * Extend copyright years to 2011.\r
+\r
+2010-12-30\r
+ * Fix for bug 3147397 "Data colors missing with multiple plots":\r
+ + Do not truncate the data_colors and related arrays, so the full\r
+ set of colors will be available for subsequent plots on the image.\r
+ (Color indexes are still allocated in the image only as needed.)\r
+ + New internal functions GetColorIndexArray() and\r
+ GetDarkColorIndexArray(), replacing previous use of array_map().\r
+ + Removed internal function truncate_array() - no longer used.\r
+ + Changed SetColorIndexes(), NeedDataDarkColors(), and\r
+ NeedErrorBarColors() to only allocate the color indexes that will\r
+ be needed (instead of allocating all colors in the truncated color\r
+ descriptor arrays).\r
+\r
+2010-12-28\r
+ * Instead of throwing an error, SetLegend(NULL) now clears the legend\r
+ array. This can be useful with multiple plots on an image. Before\r
+ this change, only SetLegend(array()) did that (possibly by accident).\r
+\r
+2010-12-27\r
+ * Do not have SetDefaultStyles() call deprecated SetLabelColor().\r
+\r
+ * Fixes for bug 3143586 "Multiple plots per image - fixes & docs":\r
+ + Fix DrawLegend so it doesn't forget that the legend position\r
+ was specified in world coordinates. This fixes the legend\r
+ position for plots after the first.\r
+ + Don't draw the image border more than once (although this would\r
+ probably have no impact on the resulting image). This parallels\r
+ the behavior for the main plot title and the image background.\r
+ Replaced member variables background_done and title_done with a new\r
+ member array done[] which will track when these elements were done.\r
+\r
+2010-12-06\r
+ * Fix comments above CalcPlotAreaWorld(). Deleted incorrect information\r
+ from before data-data-yx existed, and before DecodeDataType rewrite.\r
+\r
+2010-12-04 (lbayuk) ===== Released as 5.3.0 =====\r
+ * phplot.php: Updated version\r
+ * README.txt: Updated for new release\r
+ * NEWS.txt: Add text for new release\r
+\r
+2010-12-03\r
+ * Feature request 3127005 "Ability to suppress X/Y axis lines":\r
+ Added SetDrawXAxis() and SetDrawYAxis() to control flags which\r
+ will suppress drawing the X or Y axis lines. (These lines were\r
+ probably the only PHPlot elements that could not be turned off.)\r
+ Changed DrawXAxis() and DrawYAxis() to conditionally draw the\r
+ axis lines.\r
+\r
+2010-11-28\r
+ * Feature request 3117873 "Data value labels in more plot types":\r
+ Implemented Data Value Labels for plot types points, lines,\r
+ linepoints, and squared. Added 2 class variables which can be\r
+ set to control the distance and angle of the labels from points.\r
+ New internal function CheckDataValueLabels() calculates position\r
+ and text alignment for these labels.\r
+\r
+ * Updated comments for Set[XY]DataLabelPos to match the text in\r
+ the manual, which was rewritten to clarify label types.\r
+\r
+2010-11-23\r
+ * Code cleanup. Moved some functions around to group "plot drawing\r
+ helpers" separately from "plot drawing". No changes to operation.\r
+\r
+2010-11-21\r
+ * Feature request 3111166 "Control legend colorbox width":\r
+ Added a class variable legend_colorbox_width which can be changed\r
+ to make the colorboxes wider or narrower.\r
+\r
+2010-11-16\r
+ * Feature request 3093483 "Investing support chart types":\r
+ Added 3 new plot types: Basic OHLC (Open/High/Low/Close), Candlesticks,\r
+ and Filled Candlesticks. Implemented with one new function to handle the\r
+ 3 new plot types: ohlc, candlesticks, and candlesticks2.\r
+\r
+2010-11-11\r
+ * Moved information about plot types into a new static member array\r
+ plots[]. (This is an internal change with no impact on usage, but will\r
+ make it easier to add new plot types.) SetPlotType() no longer needs a\r
+ list of plot types to check, FindDataLimits() does not need to check for\r
+ specific plot types to to process the data array, and DrawGraph() uses\r
+ data from the array rather than knowing about all the plot types.\r
+\r
+2010-10-31\r
+ * Changed internal CalcBarWidths() to take two arguments which indicate\r
+ how it should calculate bar widths, rather than having it check the\r
+ plot_type directly. (Taken from another, experimental change. This\r
+ minimizes places where plot_type is directly used.)\r
+\r
+2010-10-03 (lbayuk) ===== Released as 5.2.0 =====\r
+ * phplot.php: Updated version\r
+ * README.txt: Updated for new release\r
+ * NEWS.txt: Add text for new release\r
+ * Makefile: Removed HorizontalBars.txt from release. This is now all\r
+ documented in the reference manual.\r
+\r
+2010-10-01\r
+ * Rewrite color handling. Default and specified colors are now validated,\r
+ converted to RGBA arrays, and saved. The colors indexes are not\r
+ allocated until graph drawing time. Unneeded colors are not allocated.\r
+\r
+ Fix bug 3045131 "SetTransparentColor problems": Transparency setup is\r
+ deferred to graph drawing time, after most other colors are allocated.\r
+ Fixes SetTransparentColor order dependency, and works with data colors.\r
+\r
+ Fix bug 3049726 "Optimize color allocation": Colors allocation is\r
+ deferred to graph drawing time, and colors for most elements are only\r
+ allocated if needed. In particular, the data colors and dark colors,\r
+ which used 32 slots, now only get defined as needed.\r
+\r
+ Feature request (partial) 3077554 "Finer control over plot element\r
+ colors": The colors of the main, X, and Y titles can now be controlled\r
+ separately.\r
+\r
+ Change details:\r
+ New internal functions:\r
+ GetColorIndex(), GetDarkColorIndex()\r
+ Allocate pre-parsed colors for elements.\r
+ SetColorIndexes()\r
+ Does the deferred color allocation and defaults.\r
+ NeedDataDarkColors(), NeedErrorBarColors()\r
+ Called by graph drawing functions if those colors are needed.\r
+ GetDataColor(), GetDataErrorColors(), GetBarColors()\r
+ Custom or standard data color assignment for most plot types.\r
+ truncate_array()\r
+ Shorten an array. Used to limit data color allocation.\r
+\r
+ Removed internal functions:\r
+ SetIndexColor(), SetIndexDarkColor()\r
+ Unneeded. Color handling is now in two separate phases.\r
+\r
+ Removed internal member variable:\r
+ data_colors_alpha\r
+ PHPlot no longer calls SetDataColors before plotting, so this\r
+ variable is not needed to preserve the default alpha.\r
+\r
+ New internal member variables:\r
+ transparent_color\r
+ Saves color value from SetTransparentColor. For bug 3045131.\r
+ x_title_color, y_title_color, ndx_x_title_color, ndx_y_title_color\r
+ For title colors. DrawXTitle and DrawYTitle use them now.\r
+\r
+ Changed internal member variables:\r
+ i_border, plot_bg_color, bg_color, label_color, text_color, etc.\r
+ All variables for colors now always hold a parsed 4-component\r
+ (RGBA) color specification as an array, and are no longer\r
+ statically initialized to a color name.\r
+\r
+ New public functions:\r
+ SetXTitleColor(), SetYTitleColor()\r
+ These can be used to make the 3 titles have different colors.\r
+\r
+2010-09-26\r
+ * Don't let SetXDataLabelPos() accept 'xaxis' or 'all' as valid.\r
+ Don't let SetXTickLabelPos(), SetYTickLabelPos() accept 'all' as valid.\r
+ These were never implemented and never documented.\r
+\r
+\r
+ * Feature request #3073679 "Stacked bar plots with negative values":\r
+ Allow stacked bar plots (vertical and horizontal) to work with negative\r
+ values. Changed FindDataLimits() to not take abs() values for\r
+ stackedbar when calculating the data range. Changed DrawStackedBars()\r
+ and DrawHorizStackedBars() to handle negative values, including proper\r
+ label positions. The first non-zero value in a row sets the direction\r
+ of the bar. Mixing positive and negative values within a row works but\r
+ the results are not useful.\r
+\r
+ * New internal DrawBar() moves common code from 4 bars and stackedbars\r
+ drawing functions and makes it easier to deal with shading vs bar\r
+ direction.\r
+\r
+2010-09-24\r
+ * Fix bug 3074402 "Fix Y axis default for horizontal plots":\r
+ Make the default axis positions symmetrical for vertical plots\r
+ (X and Y) and horizontal plots (Y and X). This fixes the problem\r
+ with horizontal bar/thinbarline plots that have negative data,\r
+ where the Y axis stayed on the left and the bars went rightward.\r
+\r
+2010-09-01\r
+ * Fix bug 3056991 "Internal methods should be 'protected'":\r
+ Changed CheckDataArray(), number_format(), FindDataLimits(), and\r
+ DrawBackground() to be 'protected'. The test suite no longer calls\r
+ these directly. For SetIndexColor(), SetRGBColor(), DrawText(),\r
+ SizeText(), xtr(), and ytr(), left these as public with a comment\r
+ indicating they should be treated as protected.\r
+\r
+ * Fix bug 3057000 "Review 'deprecated' methods":\r
+ + Changed deprecated method SetNewPlotAreaPixels() to just call\r
+ SetPlotAreaPixels(). It was suspicious as coded, and was found\r
+ to be equivalent to SetPlotAreaPixels().\r
+ + Removed SetColor(), which didn't do anything. It was calling\r
+ SetRGBColor and discarding the result. After reviewing the\r
+ history of this in all CVS versions, it does not seem to have\r
+ ever been coded correctly, so there is no harm in removing it.\r
+ + All other deprecated methods seem OK and are left as is.\r
+\r
+2010-08-30 (lbayuk) ===== Released as 5.1.3 =====\r
+ * phplot.php: Updated version\r
+ * README.txt: Updated for new release\r
+ * NEWS.txt: Add text for new release\r
+\r
+2010-08-27\r
+ * Fix bug 3051832 "Let PHP/GD find the font file":\r
+ Instead of checking for file existence, PHPlot now uses a non-drawing GD\r
+ operation to validate a TrueType font in SetFontTTF(). This allows GD to\r
+ use its internal search path, making it likely that fonts can be found\r
+ without needing a platform-dependent path in your script. Full paths\r
+ will still work, so there is no compatibility issue.\r
+\r
+ * Fix bug 3051906 "Better choice for default TT font":\r
+ Removed "benjamingothic.ttf" as the default TT font setting. This has\r
+ not been included in PHPlot since 2004. Changed SetFontTTF() to call\r
+ new GetDefaultFontTTF(), which will try a number of sans-serif font\r
+ names the first time it needs a default TT font. Considering the above\r
+ fix to finding fonts, this has a good chance of finding a working\r
+ font. It is known to work on Windows and some Linux distributions.\r
+\r
+2010-08-19\r
+ * Makefile: Removed phplot_data.php from list of files to release.\r
+ Reference bug report 3048267. This file has not been maintained or\r
+ tested, and has bugs. It will remain in CVS, but not be included\r
+ in PHPlot releases.\r
+\r
+2010-08-17\r
+ * Change new DrawLinePoints(). It does not have to check and\r
+ handle error bar plots, as DrawDots and DrawLines will do that.\r
+\r
+2010-08-16\r
+ * Rewrote DecodeDataType(). Previous implementation was hard to\r
+ extend and inefficient. Now it uses new class variables (not a\r
+ returned array) and is only called once, by DrawGraph. Changed all\r
+ users of data_type to use the new variables.\r
+\r
+ In CheckDataArray(), calculate data_columns properly for\r
+ text-data-single data type (pie chart) too. Simplify DrawPie\r
+ to use this, and merge 2 of the 3 cases.\r
+\r
+ Have a single function handle each plot type, so it can properly\r
+ check the data type and report a correct error message showing\r
+ all supported types. For example, DrawBars is now the entry point\r
+ for both bars and horizontal bars; DrawGraph does not directly\r
+ call DrawHorizBars. Similar for DrawStackedBars and\r
+ DrawHorizStackedBars. Lines, Points, and Linepoints also now\r
+ have a single function each, dispatching to others as needed.\r
+ (These changes were split off from an upcoming, larger change.)\r
+\r
+2010-08-14\r
+ * Fixes to SetDataValues: need to clear out the 2 arrays before\r
+ setting values in a loop, else if the function is used more than\r
+ once then old values will remain.\r
+ Move records_per_group calculation outside the loop.\r
+ (These were split off from upcoming, larger changes.)\r
+\r
+ * Part 4 of horizontal plots: implement horizontal thinbarline plots.\r
+ Added new data type 'data-data-yx' (label, Y, X1, X2, ...).\r
+ DrawThinBarLines() now draws either vertical or horizontal plots, and\r
+ supports data types text-data, data-data, text-data-yx, data-data-yx.\r
+\r
+ Fixed DecodeDataType() to handle text-data-single too, for completeness.\r
+\r
+ * Fix for over-padding style and color arrays. These were padded to\r
+ records_per_group, but that is the maximum data array row size.\r
+ The number of actual data sets is less, and depends on the data type.\r
+ Calculate the correct number as data_columns at the top of DrawGraph,\r
+ and use that to pad the arrays. Also moved early error checking in\r
+ DrawGraph() into new CheckDataArray().\r
+\r
+2010-08-09\r
+ * Code cleanup. This is a large change to unify the comment and\r
+ coding stye used in PHPlot. The PEAR style guide is being used\r
+ as a reference, but PHPlot will never be 100% compliant.\r
+ This patch introduces no functional changes at all.\r
+ - Limit line length to 110.\r
+ - Remove obsolete, partially implemented Doxygen comments.\r
+ - Add descriptive comment above functions where missing.\r
+ - Use consistent comment markers and control structure spacing.\r
+ - Remove ctags-confusing end of function comments.\r
+ - Rewrote a few if/else blocks for cleaner logic.\r
+ - Re-order some functions for consistency (X, then Y).\r
+\r
+2010-08-04\r
+ * Implemented horizontal stacked bar plots:\r
+ Use the same data type introduced for horizontal bars, 'text-data-yx',\r
+ and the same plot type 'stackedbars', to make a horizontal stacked bar\r
+ plot. Data value labels, both at the ends of the bars and within the\r
+ bars ('plotstack' labels) are available with horizontal stacked bars.\r
+\r
+ * Internal function DrawDataLabel() is replaced by DrawDataValueLabel(),\r
+ with different usage. The new function can also check to see if a label\r
+ fits in the allocated space.\r
+\r
+ * Fixed the text size check in stacked bar plots for data value labels\r
+ within the bars. The check only worked correctly for 0 degree labels. It\r
+ now works with any text angle. It suppresses the label if it is too high\r
+ (for vertical stacked bar plots) or too wide (for horizontal stacked bar\r
+ plots) to fit in the bar segment to which it belongs. Note that it only\r
+ checks in the bar direction. If the text is too wide (for vertical bars),\r
+ or too high (for horizontal bars), it will still be plotted, but will\r
+ cross the sides of the bar.\r
+\r
+2010-07-28\r
+ * Allow callbacks to return a value (to support new data_color callback).\r
+ * Feature request 3034164 "Extended control of data colors":\r
+ Define new callback 'data_color' for picking the data color.\r
+ Changed internal plot drawing functions DrawDots, DrawLines, DrawSquared,\r
+ DrawBars, DrawStackedBars, DrawDotsError, DrawThinBarLines,\r
+ DrawLinesError, and DrawHorizBars to use the data_color callback\r
+ (if defined) to select the data colors.\r
+ * SetRGBArray code cleanup (no functional changes).\r
+\r
+2010-07-27\r
+ * Fixes for error bars:\r
+ Code cleanup in DrawYErrorBar(), with no functional change.\r
+ Suppress duplicate drawing of error bars with 'linepoints' error plots.\r
+ This was already fixed for data labels. Now error bars will only be\r
+ drawn by the 'points' part, not the 'lines' part. There should be no\r
+ visible changes to plots. (This is needed for a future change).\r
+\r
+2010-07-26\r
+ * Horizontal bar charts (still an experimental feature) can now have data\r
+ value labels.\r
+ * HorizontalBars.txt: Fix incorrect description of bar direction. Add\r
+ text explaining the new data value labels.\r
+\r
+2010-06-29 (lbayuk) ===== Released as 5.1.2 =====\r
+ * phplot.php: Updated version\r
+ * README.txt: Updated for new release\r
+ * NEWS.txt: Add text for new release\r
+\r
+2010-06-26\r
+ * Feature request 2885930 "Horizontal Bars":\r
+ Horizontal bar charts are implemented, as an experimental feature.\r
+ A new data type 'text-data-yx' was added, which works with\r
+ 'bars' plot type to produce a horizontal bar chart from a data\r
+ array with X values for each Y value. Changes were made to\r
+ FindDataLimits, CalcMargins, CalcPlotAreaWorld, CalcBarWidths,\r
+ and CalcMaxDataLabelSize to handle the new data type. Other\r
+ changes were made to handle label position defaults and grid\r
+ defaults. New drawing functions were added for horizontal bars.\r
+\r
+ * HorizontalBars.txt: new documentation file for experimental feature.\r
+ * Makefile: List new documentation file.\r
+\r
+2010-06-25\r
+ * Each plot-type drawing function now checks that it is getting a data\r
+ type that it knows how to handle. A new internal function unifies the\r
+ checking and error message. (This is associated with an upcoming,\r
+ bigger change.)\r
+\r
+ Compatibility: If you were using an invalid data type for a plot type\r
+ whose function did not check, will now get an error.\r
+ \r
+ * Removed some dubious code from DrawLines() and DrawSquared() and\r
+ rewrote comments there. The code initialized lastx[0] and lasty[0],\r
+ but lasty was mapped using the X (rather than Y) function. This was\r
+ obviously wrong, but closer inspection showed that the values were\r
+ never, used so the code was removed.\r
+\r
+2010-06-13\r
+ * Truecolor.txt: removed\r
+ * Makefile, README.txt: Removed reference to Truecolor.txt. Full\r
+ documentation for truecolor images is now in the Reference Manual.\r
+ \r
+2010-06-02\r
+ * Fix bug 3010116 "Bad rendering of title in multi-plot image\r
+ when using TTF":\r
+ Make sure the main title is drawn only once. (If drawn multiple\r
+ times with TrueType font text, the anti-aliasing effects result\r
+ in poor quality text.)\r
+\r
+2010-05-31\r
+ * Improvements to truecolor support (from feature request 2947679):\r
+ Truecolor support is now better integrated. The derived class only\r
+ has the constructor now, and the base class itself provides the alpha\r
+ color component support through the internal functions SetIndexColor(),\r
+ SetIndexDarkColor(), and SetRGBColor(). This means alpha channel\r
+ works with palette images too (in so far as GD supports this).\r
+\r
+ * Truecolor.txt: Updated per changes to truecolor support.\r
+\r
+ * Image tiling with mode 'scale' in tile_img(), used with image and\r
+ plot area backgrounds, now uses imagecopyresampled() rather than\r
+ imagecopyresized(). They are the same with palette images, but the\r
+ resampled copy gets better results with truecolor images.\r
+\r
+2010-05-29\r
+ * Feature request 3002606 "Add to plot and image border options":\r
+ Added options 'right', 'top', and 'bottom' to SetPlotBorderType()\r
+ (existing options are 'left', 'sides', 'none', and 'full'). This\r
+ now also accepts an array of the above options, giving complete\r
+ control over which sides to draw.\r
+ Added option 'solid' to SetImageBorderType() to use the actual\r
+ color set with SetImageBorderColor(), rather than the darker\r
+ shade as type 'plain' does (for some reason).\r
+ New function SetImageBorderWidth() sets the width of the image\r
+ border. The image border width is now accounted for in margin\r
+ calculations, although existing plots will not change.\r
+\r
+2010-04-04 (lbayuk) ===== Released as 5.1.1 =====\r
+ * phplot.php: Updated version\r
+ * README.txt: Updated for new release\r
+ * NEWS.txt: Add text for new release\r
+\r
+2010-04-01\r
+ * Remove & from argument in SetDataValues(). The data array is not\r
+ modified and does not need to be passed by reference. (There is\r
+ no performance advantage, either.)\r
+\r
+2010-03-29\r
+ * Feature request 2947679 "Support for alpha blending/Truecolor":\r
+ Implemented truecolor image support with a new class\r
+ PHPlot_truecolor, extended color specifications to allow\r
+ specification of an alpha value, and added a new optional parameter\r
+ to SetDataColors for a default alpha value for all data colors.\r
+ This feature is *EXPERIMENTAL* (see next item).\r
+\r
+ * Truecolor.txt: New file, documentation for the new truecolor capability.\r
+ (The Truecolor feature is experimental, which means it is subject to\r
+ change in incompatible ways and the documentation has not yet been\r
+ incorporated into the PHPlot Reference Manual.)\r
+\r
+ * Makefile: Include new documentation file in release.\r
+\r
+2010-03-26\r
+ Fixed bug 2976735 "Improvements and fixes for 'area' plots":\r
+ Rewrote DrawArea() function which handles 'area' plot.\r
+ Part 1: This is related to feature request 2947679, Truecolor support\r
+ with transparency. The area plot function was filling each area from the X\r
+ axis up to the Y value, resulting in area overlaps. This wasn't a problem\r
+ with opaque colors, but with transparency, the overlapping areas resulted\r
+ in changed colors. The rewritten function fills the area between each line\r
+ instead of from each line down to the X axis. Plots with opaque colors\r
+ will not change.\r
+ Part 2: Area plots now work when the X axis is moved up with\r
+ SetXAxisPosition().\r
+ Part 3: Fixed FindDataLimits() for area (and stackedbars too) to\r
+ take absolute values of Y values. The drawing function was doing this,\r
+ but not FindDataLimits, resulting in incorrect limits if any Y<0.\r
+ Part 4: The rewritten DrawArea() also handles a new plot type\r
+ 'stackedarea'. This is an area plot where the Y values are stacked,\r
+ similar to 'stackedbars'.\r
+ Note: As part of the changes, it is now an error to try an area plot\r
+ with an unequal number of Y points for each X.\r
+\r
+2010-03-23\r
+ * Feature request 2973995 "Add y-Data to Stackedbars":\r
+ Implemented Y Data Labels for Stacked Bar charts (stackedbars).\r
+ The labels are enabled with SetYDataLabelPos, same as with bar charts.\r
+ There are two types of labels: above the stack with the total, and\r
+ within the bars at each segment. 'plotin' turns on the upper ones, and\r
+ 'plotstack' turns both on.\r
+\r
+ * Other changes:\r
+ + Removed unimplemented second argument to SetYDataLabelPos.\r
+ + Fixed questionable logic in SetYDataLabelPos when given an argument\r
+ that belongs with SetYTickLabelPos.\r
+ + Fix comments at top of plot-type Draw functions.\r
+\r
+ * Fix for bug 2974639 "Stacked bars plot breaks with X axis != 0":\r
+ Stacked bar plots with non-zero X axis position no longer break apart\r
+ into segments with gaps. The bars are drawn up from the X axis, and\r
+ any segments or partial segments below the X axis are not drawn.\r
+\r
+2010-03-22\r
+ * Change related to feature request 2947679 - Fix 'dot' point shape:\r
+ Use imagefilledellipse(), not imagefilledarc(), when drawing the 'dot'\r
+ point shape. The fix was needed for future support of truecolor images\r
+ with transparency, but filled dots from imagefilledellipse() look\r
+ better (rounder) with regular images and opaque colors.\r
+ Credit to mvaldez for identifying the problem and providing the fix.\r
+\r
+2010-03-04\r
+ * Fix for bug 2963757 "point_counts undefined error in 5.1.0":\r
+ Fixed CheckPointParams so it sets point_counts even when the point shape\r
+ and point size arrays are already the same size and do not need padding.\r
+\r
+2010-01-26\r
+ * Fix for bug 2938219 "Bars go in wrong direction":\r
+ Fixed CalcAxisPositions() to be consistent in positioning the X axis.\r
+ When all Y values are <0 and the Y=0 line is not part of the plot range,\r
+ PHPlot will now default the X axis to the top of the plot, not the\r
+ bottom. This fixes the problem with bars to negative Y values being\r
+ drawn downward if Y=0 is visible, but upward if Y=0 is not visible.\r
+ This also affects thinbarline plots.\r
+ Credit to lauryn1298 for finding the bug.\r
+\r
+2009-12-24 (lbayuk) ===== Released as 5.1.0 =====\r
+\r
+2009-12-18\r
+ * Change for bug 1795971 "Fix default data colors":\r
+ The default Data Color and Error Bar Color arrays now have 16\r
+ different colors, no duplicates, and nothing so light that it\r
+ is invisible.\r
+ Using '' or False as the argument to SetDataColors, SetErrorBarColors,\r
+ and SetDataBorderColors now re-initializes the map to the defaults.\r
+ This was previously undocumented, and in some cases set the map to\r
+ something different from the default.\r
+\r
+2009-12-15\r
+ * Cleanup: Remove DrawAxisLegend() - empty function marked TODO,\r
+ not really clear what it was meant to do.\r
+\r
+2009-12-14\r
+ * Fix for bug 2914403 "Pie + X/Y titles: Undefined property error":\r
+ In DrawGraph(), don't try to draw X or Y titles for pie charts.\r
+\r
+ * Feature request 2899921: "allow different format for data and tick\r
+ labels"; Bug 2906436: "Fixes for X Tick Labels vs X Data Labels",\r
+ and partial implementation of changes from user 'adoll' regarding\r
+ tick vs data labels:\r
+\r
+ New public functions:\r
+ + SetXDataLabelType() : Sets formatting for X Data Labels\r
+ + SetYDataLabelType() : Sets formatting for Y Data Labels (bar charts)\r
+ + SetXDataLabelAngle() : Sets text angle for X Data Labels\r
+ + SetYDataLabelAngle() : Sets text angle for Y Data Label (bar charts)\r
+ The defaults for these are set up to be fully backward compatible\r
+ with previous releases of PHPlot (except see the next item).\r
+\r
+ Re-used function name SetXDataLabelAngle():\r
+ + This has been deprecated and undocumented since 2003-12-07, and\r
+ used to just call SetXLabelAngle(). For new behavior, see above.\r
+\r
+ Changes to public functions:\r
+ + SetXDataLabelPos() and SetXTickLabelPos() no longer cancel each\r
+ other out (set the other control variable to 'none'). Instead,\r
+ they are both considered before plot drawing.\r
+\r
+ Changes to internal functions:\r
+ + DrawDataLabel() now uses the font, angle, and color arguments as\r
+ provided, and does not substitute values if they are empty.\r
+ + SetLabelType() now takes mode='xd' and 'yd' for X Data and Y Data\r
+ label formatting; 'x' and 'y' are for tick labels only now.\r
+ + Functions that work on Data labels now call FormatLabel() with the\r
+ new mode parameter value 'xd' or 'yd, and use the new\r
+ data_label_angle variables.\r
+ + New CheckLabels(), used by DrawGraph to process label parameters.\r
+ + CalcMargins() - Rewritten to handle changes to Tick and Data labels.\r
+\r
+ Changes to internal class variables:\r
+ + New: x_data_label_angle, y_data_label_angle\r
+ + Do not initialize x_tick_label_pos or x_data_label_pos, so that\r
+ CheckLabels() can tell if they were set or not and apply defaults.\r
+ + Initialize y_data_label_pos to 'none', not 'plotleft'.\r
+ + Add 2 more indexes to label_format[] array: 'xd' and 'yd'.\r
+\r
+ * Cleanup:\r
+ + Delete unused internal class variable: draw_y_data_label_lines\r
+ + Delete unused function SetDrawYDataLabelLines()\r
+\r
+2009-12-07\r
+ * Fix bug 1795972 "Fix default point shapes":\r
+ + Added 10 new point shapes to the existing 10 shapes.\r
+ + Changed the default point shape from all 'diamond' to a\r
+ selection of up to 10 different shapes.\r
+ + Fixed bug in the code that tried to set the point shapes\r
+ and sizes arrays to be the same size. This was not working,\r
+ resulting in unexpected point sizes.\r
+ + Changed default point size to 6 for all shapes. It was trying\r
+ to be "5, 5, 3" but due to several bugs this was not working.\r
+ + Do not adjust shape sizes to even numbers (was done for only two\r
+ shapes). Instead, consistently truncate size/2 when needed.\r
+ NOTE: These may change the look of 'points' and 'linepoints' plots.\r
+\r
+ * Changed startup initialization code:\r
+ + SetDefaultStyles() was doing some odd things using a variable\r
+ called "session_set", with comments referring to non-existent\r
+ session support code. This has been removed. There should be\r
+ no visible changes from this. PHPlot does not use PHP sessions.\r
+\r
+2009-12-04\r
+ * Fix for bug 2908256, errors in pie charts with bad data array:\r
+ (From a Drupal contrib module report by thekevinday.)\r
+ With pie charts only, a data array with no valid Y values resulted\r
+ in PHP error messages. All other plot types handle this by producing\r
+ an image without a graph.\r
+ Fixed DrawPieChart to behave this way too. If there are no valid Y\r
+ values, or if the sum of all Y values is 0, do not error out, but\r
+ don't draw a pie chart either.\r
+ Also, pie charts now ignore non-numeric Y values, like other plot types.\r
+\r
+2009-11-20 (lbayuk)\r
+ * Fix for bug 2900914 "Problem with display of 0 on Y axis":\r
+ Changed how X and Y values are stepped by tick intervals, to avoid\r
+ cumulative round-off error. This fixes the problem when Y crosses 0 with\r
+ a tick step such as 0.1 resulting in a long label for a very small but\r
+ non-zero number. Fixed DrawXTicks, DrawYTicks, and CalcMaxTickLabelSize.\r
+ (Originally reported by cncnet)\r
+\r
+2009-11-19 (lbayuk)\r
+ * Improve support for using callbacks to annotate plots:\r
+ Added new callback 'draw_all', called after all drawing.\r
+ Supply plot_area[] as argument to some drawing callbacks.\r
+ Added new method GetDeviceXY() to translate from world coordinates.\r
+ Allow NULL or '' for $font in DrawText() internal method, meaning to\r
+ use the generic font. If callbacks want to use DrawText, this\r
+ avoids them having to reference the internal fonts[] array.\r
+\r
+2009-11-01 (lbayuk)\r
+ * Address bug report 2886365 "Declare all functions and variables in\r
+ PHP5 style"\r
+ PHP5 deprecates the use of 'var' to declare a class member variable.\r
+ All initialized class member variables are now declared 'public'.\r
+ (It was tempting to make most or all 'protected' or 'private', but\r
+ that would likely break too much, including the PHPlot Test Suite.)\r
+\r
+ Most class member functions which are meant for internal use only are\r
+ now declared 'protected', so they cannot be called from scripts\r
+ (except in child classes). (Note PHP5 does not deprecate the use of\r
+ just 'function' to mean public, so public functions were not changed.)\r
+ Internal functions are those documented in the manual under Developer's\r
+ Guide, Internal Functions. If your code breaks because you are using\r
+ a method which is now protected, please post the details on the help\r
+ forum.\r
+\r
+ Some member variables which were set in the constructor are now\r
+ initialized with the class instead. (No impact.)\r
+\r
+ Removed commented-out, FIXME-noted code for interim labels.\r
+\r
+2009-10-12 (lbayuk)\r
+ * Bug report 2839547, allow SetImageBorderType('none') to reset the image\r
+ border type. Also checked for other cases where there is no reset;\r
+ found one that exists (Set[XY]LabelType) but needs to be documented.\r
+\r
+2009-07-09 (lbayuk)\r
+ * Added a hook $plot->locale_override which can be set to True to prevent\r
+ PHPlot from loading locale settings from the environment with\r
+ setlocale(LC_ALL, ''). This is necessary for testing PHPlot on Windows,\r
+ where you cannot force a locale with an environment variable. It might\r
+ also be needed for people who want PHPlot's locale to differ from the\r
+ web server's locale.\r
+\r
+2009-06-12 (lbayuk) ===== Released as 5.0.7 =====\r
+\r
+2009-06-11 (lbayuk)\r
+ * Change PHPlot license to LGPL, per Afan.\r
+ phplot.php, phplot_data.php - Change license notice.\r
+ rgb.inc.php - Change top comments and remove bottom marker.\r
+ COPYING - new file, text of LGPL.\r
+ LICENSE.* - removed files - old licenses.\r
+ Makefile - change list of distributed files.\r
+\r
+ * Fix for bug 2803900: SetRGBArray('large') does not work. The include\r
+ file defined a different array name than the main script expected.\r
+ (This bug seems to have happened over 8 years ago.) Fixed the array\r
+ names to match. Also removed the ./ prefix from the included filename\r
+ so it will be found if on the include path but not in the script\r
+ directory. Also added error check if the rgb.inc.php include file\r
+ is needed and not found.\r
+\r
+2009-05-25 (lbayuk)\r
+ * Added new feature to allow partial margin or plot area specification.\r
+ You can omit, or specify as NULL, any of the 4 arguments to\r
+ SetMarginsPixels() or SetPlotAreaPixels(), and this means PHPlot\r
+ should use the automatically calculated margin on that side.\r
+ Credit to adoll for this feature.\r
+\r
+2009-05-17 (lbayuk)\r
+ * Fix for bug 2791502 "Error plots treat missing Y values as 0":\r
+ Plots with data type data-data-error now support missing Y values,\r
+ instead of treating them as 0. This works with lines, points,\r
+ and linepoints plot types, and also honors SetDrawBrokenLines.\r
+\r
+\r
+ * Fix for bug 2792860 "Wrong DataLabelLines with missing Y":\r
+ Do not draw X Data Label Lines at points with missing Y values.\r
+\r
+\r
+ * Fix for bug 2786350 "Missing Y data results in bad auto-range":\r
+ Rewrote FindDataLimits to ignore missing Y values, rather than\r
+ treating them as if 0, for calculating range.\r
+ Bug report and analysis by mrten.\r
+\r
+ * Fix for bug 2786354 "Incorrect auto-range for data-data-error":\r
+ For data-data-error data type, apply the positive and negative error\r
+ amounts for each Y point to that point only, rather than applying the\r
+ largest errors to the overall minimum and maximum Y value for the row.\r
+\r
+ Note: The two fixes above can change existing plots which rely on\r
+ automatic Y range calculation. The first fix affects plots with\r
+ missing Y values and min(Y)>0. The second fix can affect plots using\r
+ data-data-error data type and different error values for different\r
+ points. In both cases the new Y range can be smaller than before.\r
+\r
+2009-01-20 (lbayuk) ===== Released as 5.0.6 =====\r
+\r
+2009-01-18 (lbayuk)\r
+ * Fix for bug 1891636 "Misaligned TTF X Labels":\r
+ PHPlot was using the actual bounding box of each line of text\r
+ to allocate space and set the text positioning, but was ignoring the\r
+ fact that the text baseline is not the same as the bottom of the\r
+ bounding box. This resulted in uneven alignment of the X labels if\r
+ they had different heights (for example, month names Jul and Aug).\r
+\r
+ PHPlot now calculates the size of text for allocation (SizeText) using\r
+ the descenders on the last line, and calculates the size for drawing\r
+ (DrawText) only to the baseline. PHPlot also now uses a fixed line\r
+ spacing for each line of text in a font, rather than the actual text\r
+ height. This allows separately drawn multi-line labels to align.\r
+\r
+ * Changes to line spacing when using multi-line labels:\r
+ PHPlot was using the class variable line_spacing to mean the\r
+ number of pixels between lines of multi-line labels. This made the\r
+ spacing too small for larger fonts, and it was not possible to adjust\r
+ line spacing for different types of text.\r
+\r
+ PHPlot now interprets line_spacing as the number of pixels only\r
+ for GD text, and as a scale factor for the font's built-in line\r
+ spacing for TrueType text. In addition, a new optional argument is\r
+ added to SetFont, SetFontGD, and SetFontTTF to set a line spacing\r
+ specific to that type of text.\r
+\r
+ * Changes had to be made to the legend drawing code to accommodate the\r
+ changes to font handling.\r
+\r
+ Note: The line spacing change results in slightly looser spacing on\r
+ multi-line TrueType text labels, and slightly taller legends, compared\r
+ to version 5.0.5.\r
+\r
+2008-09-21 (lbayuk)\r
+ * Interim fix for bug 1932571 "Data-Data Plot fails with same X values".\r
+ PHPlot will no longer hang when the range of X values is 0 (that is, when\r
+ x_min == x_max). It will arbitrarily set an X range of 1, so the\r
+ calculated tick step is not 0. This is a temporary fix. Work on a smarter\r
+ X and Y range calculation is in progress, which will handle edge cases\r
+ like this better, but it isn't ready and this bug has been open too long.\r
+ Credit to andyl for finding the bug.\r
+\r
+ * Fix font path: Use DIRECTORY_SEPARATOR constant not '/'.\r
+\r
+ Extended the label formatting capabilities, adding 'printf' and 'custom'\r
+ types, added a prefix and suffix for 'data' type, and allow format controls\r
+ to be included in SetXLabelType and SetYLabelType.\r
+\r
+ External changes:\r
+ * Added 'printf' label type. The caller specifies the print format as the\r
+ 2nd argument to SetXLabelType or SetYLabelType (default '%e').\r
+ $plot->SetXLabelType('printf', '%5.2f');\r
+\r
+ * Added 'custom' label type. The caller supplies a callback (typically a\r
+ function name) and optional pass-through argument as the 2nd and 3rd\r
+ arguments to Set[XY]LabelType. The function is called as $f($value, $arg)\r
+ to return the formatted $value.\r
+ $plot->SetXLabelType('custom', 'myfunction', $arg_value);\r
+\r
+ * In addition to Set[XY]TimeFormat, the format string for type 'time' can\r
+ now be set as the 2nd argument to Set[XY]LabelType.\r
+ $plot->SetXLabelType('time', '%H:%M');\r
+\r
+ * In addition to SetPrecision[XY], the precision for type 'data' can now be\r
+ set as the 2nd argument to Set[XY]LabelType. A 3rd and 4th argument\r
+ can supply a prefix and suffix for 'data' formatting. (All optional)\r
+ $plot->SetXLabelType('data', 2, '$', 'US');\r
+\r
+ Internal changes:\r
+ * Class variables x_precision, y_precision, x_label_type, y_label_type,\r
+ x_time_format, and y_time_format have been removed.\r
+\r
+ * New class array variable label_format[], with elements 'x' and 'y' which\r
+ are arrays for label formatting. Elements in the sub-arrays are not\r
+ initialized until needed.\r
+\r
+ * New function SetLabelType, which implements Set[XY]LabelType now.\r
+\r
+ * FormatLabel() was rewritten to support the new label formatting.\r
+\r
+ Compatibility:\r
+ * Any code that directly references class variables related to label\r
+ formatting will break, except for data_units_text. Use the documented\r
+ function methods instead. Setting data_units_text as a suffix is\r
+ deprecated but still works.\r
+\r
+ * The 'data' type precision for 'Y' is still used for pie chart labels.\r
+\r
+2008-07-12 (lbayuk)\r
+ Multiple comment spelling error fixes. No functional changes.\r
+\r
+2008-07-06 (lbayuk)\r
+ Changes to allow mixing GD fixed-font text and TrueType Font (TTF) text\r
+ on the same plot.\r
+ (This change came from work done trying to fix TTF text positioning,\r
+ where it looks like additional information needs to be stored for TrueType\r
+ fonts. The old font data structure was awkward to extend, and allowing\r
+ mixed GD/TTF text was on the to-do list anyway.)\r
+\r
+ External changes:\r
+ * SetFontGD(), SetFontTTF(): New functions to set a font, with type.\r
+ * SetFont(): Now calls SetFontGD or SetFontTTF depending on $use_ttf.\r
+ These changes should be fully compatible with existing programs.\r
+\r
+ Internal changes:\r
+ * Updated comments explaining SetUseTTF() now sets the default type\r
+ (not the only type) of text used.\r
+ * Put all the font data into a class array. (Replaces $this->generic_font\r
+ with $this->fonts['generic'], etc.)\r
+ * ProcessTextGD() and ProcessTextTTF() now take the font array as one\r
+ argument, rather than separate arguments for font path and size.\r
+\r
+2008-01-13 (lbayuk) ===== Released as 5.0.5 =====\r
+ * phplot.php: Updated version\r
+ * README.txt: Updated for new release\r
+ * NEWS.txt: Add text for new release\r
+ * Makefile: Remove 'Callbacks' from release target, as this material is\r
+ now in the reference manual.\r
+\r
+2008-01-07 (lbayuk)\r
+ Copyright updated to 2008 and PHP4 no longer listed as supported.\r
+\r
+ Major rewrite of the margin calculation functions to address multiple\r
+ problems. Fixes for bugs 1856207 "Margin error with 'xaxis'/'yaxis'\r
+ position, 1843012 "Make margins, drawing consistent", and 945439\r
+ "x_tick_label_height not set correctly".\r
+\r
+ Note: These changes are inter-dependent and cannot be split up.\r
+\r
+ * Defer all calculations to DrawGraph time, to eliminate order dependencies.\r
+ These functions now just store their arguments in the object, and all\r
+ calculations happen later:\r
+ + SetXAxisPosition, SetYAxisPosition\r
+ + SetMarginsPixels\r
+ + SetPlotAreaPixels (Stores margins, not area, now.)\r
+ + SetPlotAreaWorld\r
+ + SetXTickIncrement, SetYTickIncrement\r
+\r
+ * A new callback 'debug_scale' was added to trace the margin and scale\r
+ calculations.\r
+\r
+ * CalcMargins was rewritten. Actual sizes of tick and data labels are now\r
+ used, rather than guesses like "use size of biggest Y value". A minimum\r
+ value (3 x safe_margin, or 15 pixels) applies to each margin.\r
+\r
+ * FindDataLimits no longer needs to find the longest data label, since\r
+ CalcMargins now does that more precisely.\r
+\r
+ * DrawXTitle and DrawYTitle now use position offsets calculated by\r
+ CalcMargins. Note: These titles are now offset from the plot area,\r
+ not the image area. The titles will move if you had set the plot area\r
+ or margins.\r
+\r
+ * DrawYTick, DrawXTick rewritten to use pre-calculated offsets, and common\r
+ code moved to new CalcTicks().\r
+\r
+ * DrawXDataLabel: Use pre-calculated offsets for text.\r
+\r
+ * DrawGraph: Rewrote top section (before drawing anything) to do the\r
+ calculations in the proper order, unconditionally.\r
+\r
+ * Class variables removed:\r
+ x_label_inc, y_label_inc, _x_label_cnt : These were never used.\r
+ title_height, x_title_height, y_title_width : Now internal to CalcMargins.\r
+ data_limits_done : No more need to remember if FindDataLimits called.\r
+\r
+ * New class variables added:\r
+ plot_margins_set : Keeps track of user-set plot area or automatic.\r
+ x_label_top_offset, x_label_bot_offset, x_offset_axis_offset,\r
+ y_label_left_offset, y_label_right_offset, y_label_axis_offset,\r
+ x_title_top_offset, x_title_bot_offset,\r
+ y_title_left_offset, y_title_left_offset : Label offsets\r
+ \r
+ * New internal functions:\r
+ CalcPlotAreaPixels : Deferred calculations taken out of SetPlotAreaPixels\r
+ and SetMarginsPixels.\r
+ CalcPlotAreaWorld : Deferred calculations taken out of SetPlotAreaWorld.\r
+ CalcAxisPositions : Calculate axis positions, moved from CalcTranslation.\r
+ CalcTicks : Calculate X and Y tick interval. This still uses the\r
+ same simple method (basically range/10), but now we could drop in a new\r
+ algorithm much more easily. This is now also used by CalcMargins.\r
+ Code taken out of DrawXTicks and DrawYTicks.\r
+ CalcMaxTickLabelSize : So CalcMargins can use the exact tick label sizes.\r
+ CalcMaxDataLabelSize : So CalcMargins can use the exact data label sizes.\r
+ DrawXTick : Code split out from DrawXTicks for symmetry with DrawYTick.\r
+\r
+\r
+2007-12-13 (lbayuk)\r
+ * Changed ProcessTextTTF() so SizeText() will return integers. It rounds\r
+ the calculated values up, so the bounding box really contains the text.\r
+ This also prevents unneeded float calculations in derived values.\r
+\r
+2007-12-09 (lbayuk)\r
+ Major rewrite of the text drawing functions to address multiple problems.\r
+ Note: These changes are inter-dependent and cannot be split up.\r
+\r
+ * Fixed bug 1813070 "Bad position for multi-line TrueType text":\r
+ TTF text is now drawn line-by-line, not as a block, for proper\r
+ alignment and positioning.\r
+\r
+ * Fixed bug 1813071 "Wrong title height for multi-line TTF text":\r
+ Corrected miscalculation of overall height of multi-line TTF titles.\r
+ This bug resulted in over-sized margins.\r
+ The height is now computed line-by-line, including the inter-line spacing.\r
+\r
+ * Fixed bug 1813474 "DrawText alignment arguments wrong":\r
+ Corrected meaning of 'top' vs 'bottom' alignment. PHPlot now follows\r
+ the usual conventions: 'top' alignment means top of text to reference.\r
+ DrawText default for vertical alignment is still 'bottom', but the\r
+ meaning was corrected. All callers of DrawText were fixed.\r
+\r
+ * Fixed bug 1816844 "Fix order dependency for setting titles":\r
+ Defer processing titles strings until DrawGraph(), so there is no\r
+ more order dependency (no need to set font before setting title strings).\r
+\r
+ * Fixed bug 1819668 "Horiz. align multi-line text: GD vs TTF":\r
+ The new text routines draw TTF text line-by-line and correctly do\r
+ right-, center-, and left- alignment of each line within a text block.\r
+\r
+ * Fixed bug 1826513 "FIXME in DrawLegend: Max label length":\r
+ Use actual width of widest legend line to calculate legend box size.\r
+\r
+ * Partial fix for bug 945439 "x_tick_label_height not set correctly":\r
+ In FindDataLimits(), save the longest data label, not just its length,\r
+ and use the actual rendered size of that string in CalcMargins() for\r
+ the margin calculations.\r
+ Also take into account which of the tick or data labels are visible.\r
+ This is not a complete fix, but is a significant improvement.\r
+\r
+ The following changes were made related to the above fixes:\r
+\r
+ + Replaced internal function TTFBBoxSize(), which didn't work right, with\r
+ SizeText(). It returns the orthogonal bounding box of a block of text,\r
+ and works with both GD and TTF text.\r
+\r
+ + DrawText() and SizeText() call a single function ProcessText(), which is\r
+ the only place GD text and TTF text are distinguished. (So eventually\r
+ we will be able to mix GD and TTF text on a plot.)\r
+\r
+ + New internal functions ProcessTextGD() and ProcessTextTTF() draw (or size)\r
+ GD and TTF text respectively. These are only called by ProcessText().\r
+ These are re-implementations which properly position and align text.\r
+\r
+ + Removed class variables title_angle, x_title_angle, and y_title_angle. The\r
+ titles only work at their fixed angles anyway (0, 0, and 90 respectively).\r
+\r
+ + Line spacing set with SetLineSpacing() now affects TTF text as well as\r
+ GD text. Previously, it only affected GD text. The default line spacing\r
+ happens to be usable for TTF text.\r
+\r
+ + Added new callback hook 'debug_textbox' for developing, testing, and\r
+ documenting. It provides access to the text area bounding box.\r
+\r
+ + Removed unneeded class variables x_tick_label_height, y_tick_label_width,\r
+ x_tot_margin, y_tot_margin.\r
+\r
+2007-11-25\r
+ * Improve error handling:\r
+ Internal functions PrintError() and DrawError() are now the same. Both\r
+ will draw the error message into the image and output it, and then\r
+ trigger a user-level error. If no error handler has been set, it will\r
+ exit, as before. But now the error message should also get logged, or\r
+ written to the standard error stream, depending on the SAPI in use.\r
+ You can now establish an error handler to catch most PHPlot errors and\r
+ do some cleanup before exit.\r
+\r
+ This fix also covers bug #1823774 "Default Font Path and Error Message\r
+ Output".\r
+\r
+ Fixed the return value of most PHPlot functions, to return False on\r
+ error, else True. Since uncaught errors are fatal anyway, this only\r
+ affects code with an error handler that returns, which is not\r
+ recommended and unsupported at this time. These changes are for\r
+ possible future error handling options.\r
+\r
+2007-11-22\r
+ * Fix bug 1836528 "Insufficient checking of parameter values":\r
+ Rewrote CheckOption to correctly validate option choices.\r
+ (It previously accepted substrings and other incorrect values.)\r
+ PHPlot methods that use CheckOption now must be called with valid option\r
+ values. Empty strings are also no longer accepted.\r
+\r
+2007-11-17 (lbayuk)\r
+ * Change to callbacks to support extra arguments.\r
+ The PHPlot class can now pass extra arguments to a callback function.\r
+ Callback functions now take the following form:\r
+ my_callback($img, $passthru_arg, ...)\r
+ Where '...' is zero or more additional arguments supplied by PHPlot to\r
+ the callback. Each implemented callback reason will define any\r
+ additional arguments it uses. The existing defined callbacks have not\r
+ changed and do not currently pass any extra arguments.\r
+\r
+2007-11-10 (lbayuk)\r
+ * Fix bug 1827263 "Spoiled up pie-chart if $val is close to zero":\r
+ Skip pie slices which would result in an integer angle of zero\r
+ degrees, because the GD arc filling function will draw a complete\r
+ circle for that case.\r
+ Credit to Viacheslav <webdeveloper.ua at gmail.com> for finding this.\r
+\r
+ * Removed 8 of the functions (class methods) marked 'deprecated'. Only\r
+ deprecated functions which seem to have been for internal use have\r
+ been removed. Even old scripts shouldn't be using them, and they are\r
+ becoming a problem to maintain.\r
+ Removed: SetImageArea() DrawDotSeries() DrawLineSeries() CalcXHeights()\r
+ CalcYWidths() DrawLabels() InitImage() DrawDashedLine().\r
+\r
+2007-10-20 (lbayuk) ===== Released as 5.0.4 =====\r
+ * phplot.php: Updated copyright, version, and authors comments at top.\r
+ * README.txt: Updated for new release\r
+ * NEWS.txt: Add text for new release\r
+\r
+2007-10-18 (lbayuk)\r
+ * Add callbacks - experimental feature:\r
+ New functions SetCallback, GetCallback, RemoveCallback.\r
+ New internal function DoCallback.\r
+ Added callback hooks to DrawGraph.\r
+\r
+ Re-arranged code in DrawGraph to bring pie chart drawing into the main\r
+ switch on plot type, rather than a special case in its own block. This\r
+ makes it easier to follow and easier to add callback hooks.\r
+\r
+ * Callbacks: New file, documentation for the new callbacks feature.\r
+ (This won't be in the manual while it is an experimental feature.)\r
+\r
+2007-10-15 (lbayuk)\r
+ * Fix for bug 1813021: Miss-positioned right-justified vertical GD text.\r
+ Fixed DrawText() to correctly position 90 degree right-justified text\r
+ drawn in a fixed GD font. This could be seen with 90 degree Y tick\r
+ labels. (Found by accident while working on TrueType text problems.)\r
+ Also some code cleanup in DrawText: use elseif where appropriate.\r
+\r
+2007-10-09 (lbayuk)\r
+ * Code cleanup: Simplify SetIndexColor() and SetIndexDarkColor().\r
+ There is no need to first try ImageColorExact, then ImageColorResolve\r
+ if that fails. ImageColorResolve does all that for us.\r
+\r
+ Code cleanup: Rewrite SetRGBColor(). It now detects if an unrecognized\r
+ color name or color value form is used, and draws an error message.\r
+ Before this it would get a PHP index error and "headers already sent"\r
+ condition.\r
+\r
+ * Code cleanup: Remove duplicated code for loading image files.\r
+ Added new class-private function GetImage() which loads an image based\r
+ on the image type, and also returns the image size. This replaces\r
+ duplicated code in tile_img() and SetInputFile().\r
+ Also fixed comment at top of SetImageFile which said it was deprecated.\r
+ It isn't - it is used by the constructor. Moved the function out of the\r
+ 'deprecated' area up to below where it is used.\r
+\r
+ * Code cleanup: PHPlot should not define or affect anything outside its\r
+ own class.\r
+ - Removed the check for __FUNCTION__ (PHP 4.3 and up). This is obsolete.\r
+ - Do not set error_reporting to E_ALL. Although it is recommended that\r
+ scripts do this, it is not the place of loaded classes to do it.\r
+ - Remove unused global constant TOTY.\r
+ - Removed constants MAXY and MINY. Global constants like this are bad.\r
+ These were used as magic index values into data[] to hold min and max Y\r
+ values for the row. Instead, put them in separate arrays which are\r
+ named data_miny[] and data_maxy[]. (This seems to be only used by the\r
+ data line drawing function.)\r
+\r
+ Comment cleanup: Remove one commented-out partial function DrawPlotLabel,\r
+ and fix another commented-out code fragment in DrawYErrorBar. Both of\r
+ these had unmatched braces in them which caused a balance-braces check\r
+ to fail.\r
+\r
+ * Code cleanup, array padding: Get rid of functions outside the class\r
+ and remove the interim fix for PHP 5 (which changed the behavior of\r
+ array_merge). Rewrote external function array_pad_array() as a new\r
+ class function pad_array(). It does not need access to the class,\r
+ but I don't think PHPlot should add to the global namespace more\r
+ than necessary. The third argument (array to use for padding) was\r
+ never used, so it was removed. It always pads the array with itself.\r
+ It now only works on 'usual integer indexed' arrays (0-based\r
+ sequential integer index). The was previously required but\r
+ undocumented for some of the arrays (like line_widths); now it is\r
+ required for all style arrays and will be documented. Now we can pad\r
+ the array to the required length, not just N times its previous\r
+ length, and we don't need array_merge. Deleted external function\r
+ array_merge_php4() as it is no longer used.\r
+\r
+ Deleted PHP end marker ?>. You don't need this and it can cause\r
+ problems with extra whitespace in your output.\r
+\r
+2007-09-24 (lbayuk)\r
+ * Code cleanup: Fix ternary operator misuse. This doesn't change\r
+ behavior, but it was annoying me so I fixed it.\r
+ Replaced all cases of code like this: $a = ($a > $b) ? $b : $a\r
+ With just: if ($a > $b) $a = $b\r
+\r
+ * Fix Makefile 'release' target to set owner/group when creating\r
+ the tar file. This avoids having to run it as root, but it needs\r
+ GNU tar to work.\r
+\r
+2007-09-08 (lbayuk)\r
+ * Fix for bug 1790441: Removed the PHPlot quasi-destructor function and\r
+ the register_shutdown_function() call which arranged for it to be used.\r
+ This was preventing release of memory when a PHPlot object was unset,\r
+ because the registered shutdown function held a reference to it.\r
+ So rather than improving memory use, it had the opposite effect.\r
+ Note: It is no longer necessary or recommended to use reference\r
+ assignment ($plot =& new PHPlot) for PHPlot object creation.\r
+ Thanks to annajilly for the thorough analysis, bug report, and fix.\r
+\r
+2007-09-05 (lbayuk)\r
+ * Rewrote FormatLabel() to ignore blank label values. Adapted from a\r
+ patch and feature request submitted by Gerhard Reithofer (exgerhardr).\r
+ Blank labels used to produce an error if the LabelType was set to\r
+ 'time', and zero if set to 'data'. Now they are just ignored. This\r
+ provides a simple way to have labels only at selected intervals when\r
+ using time or data formats. For example, you can have a date/time\r
+ label at every 10th data point by setting the labels for the other 9\r
+ to be empty strings. Also: Removed $which_pos values 'plotx' and\r
+ 'ploty'. These were unused by PHPlot and this is an internal-only\r
+ function so there is no compatibility issue. Removed error checking on\r
+ $which_pos for the same reason; the error message used an undefined\r
+ variable anyway so it wouldn't have worked.\r
+\r
+2007-08-26 (lbayuk)\r
+ * Allow SetLegendStyle colorbox_align argument to be 'none', to suppress\r
+ the colorboxes in the legend.\r
+\r
+ Fix comment on $legend_text_align: empty means right, not left.\r
+\r
+ Rewrote DrawLegend layout code to make it easier to understand. The\r
+ result should be within 1 or 2 pixels of the previous size and position.\r
+\r
+ * Fixes for bug 1779115: SetLegendWorld() fails on undefined vars\r
+ Store the given coordinates and remember that they need to be converted\r
+ from world to pixel coordinates, but defer trying to actually convert\r
+ them until it is time to draw the legend. This way, there are no\r
+ problems with the scale having to being set up first (which is nearly\r
+ impossible to do). Made the following changes:\r
+\r
+ Changed legend class variables to be uninitialized, and unset (rather\r
+ than empty string) means use the defaults. Added a new variable:\r
+ $legend_xy_world. If it is set, (legend_x_pos, legend_y_pos) need to\r
+ be converted to pixel coords. If it is unset, they are already pixel\r
+ coords (or undefined, meaning defaults).\r
+\r
+ Changed usage of internal function DrawLegend(): removed all arguments.\r
+ X and Y were always the class variables anyway, and now it needs to\r
+ also use the new flag to tell it if X and Y are world or pixel coords.\r
+ The third argument was unused.\r
+\r
+ Removed third, unused, default NULL argument from SetLegendPixels and\r
+ SetLegendWorld.\r
+ \r
+ Changes to DrawLegend to convert x, y coords to pixel coordinates\r
+ if they came from SetLegendWorld. Also account for new usage of\r
+ the class variables: Test for unset to mean use default.\r
+\r
+2007-08-04 (lbayuk)\r
+ * New feature: control legend text and color box alignment.\r
+ Adds a new function SetLegendStyle to adjust the alignment of the\r
+ text and the color boxes inside the legend.\r
+ Based on part of bug 1208054, contributed by David Hernández Sanz.\r
+\r
+2006-12-02 (lbayuk)\r
+ * Fixes for bug 1605555: Y Data Labels use wrong font and not formatted.\r
+ Use y_label_font (not x_label_font) for Y Data Labels.\r
+ Use the formatted value for the label, not the original text.\r
+ (This applies to bar charts only, with the new Y data labels.)\r
+\r
+ * One fix for bug 1208054: Localization of number format.\r
+ If number formatting is enabled with 'data' format type, PHPlot previously\r
+ used dot for decimal point and comma for thousands separator, and there\r
+ was no way to change it.\r
+ \r
+ This fix adds a new function:\r
+ SetNumberFormat($decimal_point, $thousands_separator)\r
+ to set the separators. In addition, if that function is not used,\r
+ PHPlot will now try to use locale-dependent separators. If locale\r
+ information is not available, it will fall back to the old defaults\r
+ of dot and comma.\r
+\r
+ Note: This change may have some negative effects. 1) If your locale is\r
+ "C" or "Posix", you might not get a thousands separator now by default.\r
+ You should be using a more specific locale. 2) If your PHP script is\r
+ forcing a specific locale with setlocale(), PHPlot will probably undo\r
+ that because it uses setlocale(LC_ALL, '') to import locale information\r
+ from the environment. We have to do that, or a locale set through\r
+ the environment is ignored. But it will override a manually set locale.\r
+\r
+ * Fix for bug 937944: X/Y Tick Counts\r
+ PHPlot could draw one too few Y tick marks, and one too many X tick marks.\r
+\r
+ Changed the code to stop drawing X (Y) tick marks when the current X (Y)\r
+ value exceeds the maximum X (Y) value plus a small fudge factor. The fudge\r
+ factor accounts for cumulative error when repeatedly adding a delta to\r
+ the X (Y) value.\r
+\r
+ Notes: The bug report was writing about Y tick counts only, but X tick\r
+ counts can also be wrong. The proposed fix in the bug report does not\r
+ work in all cases.\r
+\r
+ This fix changes the appearance of many plots which were missing the\r
+ top-most Y tick mark. The extra X-tick mark problem is less common.\r
+\r
+===== Released as 5.0rc3 =====\r
+\r
+2006-11-13 (lbayuk)\r
+ * Fix for bug 1437912: x-axis label misalignment [bar charts]\r
+ The calculations were redone from scratch.\r
+ New control variable 'bar_extra_space', which works in addition to\r
+ 'group_frac_width' to control how much extra space is around the bars.\r
+ Made bar widths match for 'stackedbars' and 1-bar-per-group 'bars'.\r
+\r
+ NOTE: This changes the appearance of charts. bars in 'stackedbars'\r
+ will now be thinner, and bars in 'bars' graphs will be thicker. I\r
+ saw no reason for them being different before.\r
+\r
+ This fix required fixing the positioning on the new bar data labels,\r
+ which was off before. The bar data labels will now be centered.\r
+ Additional fixes to bar chart data labels:\r
+ For negative values, the label will center under the bar.\r
+ Fixed X-adjustment to account for shading.\r
+ Fixed to not suppress the data label if the value is 0.\r
+\r
+\r
+2006-11-10 (lbayuk)\r
+ * Fix for bug 1594457: DrawError text wrap and background fix\r
+ Do error image white background correctly, and word-wrap the text.\r
+\r
+ * Fix for bug 1594458: Suppress lines or points in 'linepoints' \r
+ Don't draw X data labels twice for 'linepoints'.\r
+ Allow SetPointShapes value 'none' to suppress points, and allow\r
+ SetLineStyles value 'none' to suppress lines. This allows a 'linepoints'\r
+ graph to mix lines only, points only, and both on the same graph.\r
+\r
+\r
+2006-11-09 (lbayuk)\r
+ * Fixes for bug 1446523:\r
+ + Wrong variable name in deprecated SetAxisFontSize()\r
+ + Fails to properly handle error if SetDataValues() was never\r
+ called, or not called with a data array.\r
+\r
+ * Fix for bug 1117122: Pie Chart ignores SetPlotAreaPixels\r
+ Don't let DrawGraph recalculate the plot area for pie charts if the\r
+ user already set it with SetPlotAreaPixels.\r
+\r
+ NOTE: This fix may slightly change the appearance of some pie charts,\r
+ whether or not they use SetPlotAreaPixels.\r
+\r
+ * Fix for bug 1103992: Wrong max Y calculated for stackedbars\r
+ Changes FindDataLimits to calculate max Y correctly. It was counting\r
+ the first Y value in each record twice, which is always wrong but\r
+ only affected stackedbars because the Y values are summed.\r
+\r
+ * Fix for bug 1096199: Wrong error bar colors in DrawDotsError.\r
+ Rewrites DrawDotsError to make it work like DrawLinesError to\r
+ correctly increment the record and color indexes.\r
+ Also fixes uninitialized x_now_pixels.\r
+\r
+ * Fix for bug 1096197: No borders on unshaded Draw[Stacked]Bars\r
+ Unshaded Bars and StackedBars covered the border with the rectangle.\r
+ The fix is to draw the rectangle, then the border.\r
+\r
+ NOTE: This fix changes chart appearance. Bars and Stacked Bars\r
+ will now get a black border around each bar by default, if you\r
+ turn off the 3D-shading. If you want borderless, unshaded bars\r
+ you need to use SetDataBorderColors to set the data border colors\r
+ to be the same as the data colors.\r
+\r
+ * Fix for bug 1333164: Negative data values, if string variables, result\r
+ in unfilled bars. The problem was a string-to-string compare of a\r
+ negative number with the empty string x_axis_position. Fixed by\r
+ initializing x_axis_y_pixels to 0 if SetXAxisPosition was not used.\r
+\r
+\r
+2005-04-17 (afan)\r
+ * Fix for bug [ 1161072 ] SetInputFile warning, background overwrite\r
+\r
+ * Bug 1182672 fixed\r
+\r
+2005-04-15 (afan)\r
+ * fix for bug: [ 1182666 ] Y Auto-scale rounds in wrong direction\r
+\r
+ * Fix for bugs 1144644 TrueType font path problems and 1106328 TTF\r
+ path/filename inconsistency\r
+\r
+ * Fix Bug: [ 1117120 ] X Title sizing uses Y Title font height\r
+\r
+2005-04-13 (afan)\r
+ * Error in SetLineStyles() - does not accept an array argument\r
+\r
+\r
+2005-03-29 (afan)\r
+ * Small typo fixed in SetYDataLabelPos\r
+\r
+ * Update SetDataLabelPos: For past compatibility we accept plotleft,\r
+ ...but pass it to SetTickLabelPos\r
+\r
+2005-03-26 (afan)\r
+ * Change to line 3802: data lables now work with multiple bars with *$idx\r
+\r
+2005-03-25 (afan)\r
+ * Added Function DrawDataLabels to put data labels in world coords,\r
+ added call from DrawBars and modified SetYDataLabelPos to flag\r
+ whether or not to call DrawDataLabels.\r
+\r
+2005-01-20 (migueldb)\r
+ * Many bugfixes reported and solved by L. J. Bayuk. Thanks!\r
+ + fixed bug #1096190\r
+ + FindDataLimits(): fixed bug #1096192\r
+ + CalcTranslation(): fixed bug #1101317\r
+ + DrawImageBorder(): fixed bug 1096200\r
+ + DrawXDataLabel(): fixed bug 1099879\r
+ + DrawDots(): fixed bug #1096194\r
+\r
+===== Released as 5.0rc2 =====\r
+\r
+2004-10-24 (migueldb)\r
+ * array_merge_php4(): added to cope with the bug introduced by\r
+ the change in array_merge() from PHP4 to PHP5 (I haven't verified this)\r
+ * Fixed some divisions by zero, thanks to an old bug report.\r
+\r
+2004-09-09 (migueldb)\r
+ * SetPointSize(): deprecated\r
+ * SetPointSizes(): added as replacement for SetPointSize().\r
+ Now able to set point sizes on a per line basis.\r
+ * SetPointShape(): deprecated.\r
+ * SetPointShapes(): added as replacement for SetPointShape().\r
+ Now able to set point shape on a per line basis.\r
+ * DrawDot(): now needs record number to decide which dot shape and\r
+ size to draw.\r
+ * CalcMargins(): dirty fix for x data label placing.\r
+ * tile_img(): fixed tile placement.\r
+\r
+2004-06-14 (migueldb)\r
+ * SetXTickLabelPos() and others: more on the bug reported by Jo Demol.\r
+ * Fixed bug reported by Jo Demol.\r
+\r
+2004-05-11 (migueldb)\r
+ * SetBgImage(): added.\r
+ * SetPlotAreaBgImage(): added.\r
+ * SetInputFile(): deprecated.\r
+ * DrawBackground(): now accepts images as backgrounds.\r
+ * DrawPlotAreaBackground(): now accepts images as backgrounds.\r
+ * tile_img(): internal method added.\r
+\r
+..........\r
+Editor's Note: For older changes to PHPlot, please see the CVS logs.\r