]> git.sur5r.net Git - bacula/bacula/blob - gui/bacula-web/includes/external/phplot/ChangeLog
af66bd1cf82c65609ac387ed6a1192235f2fb6e6
[bacula/bacula] / gui / bacula-web / includes / external / phplot / ChangeLog
1 This is the Change Log for PHPlot.
2 The project home page is http://sourceforge.net/projects/phplot/
3 -----------------------------------------------------------------------------
4
5 2011-01-15 (lbayuk)     ===== Released as 5.3.1 =====
6     * phplot.php: Updated version
7     * README.txt: Updated for new release
8     * NEWS.txt: Add text for new release
9
10 2011-01-09
11     * Fixed some style / indent errors, and 1 redundant test.
12
13 2011-01-03
14     * For bug 3143586 "Multiple plots per image - fixes & docs":
15       Make sure there is a documented way to reset PHPlot feature
16       settings, especially those for which the default settings result
17       in automatic calculated values. Where possible, calling a Set*()
18       function with no arguments should reset the feature to defaults.
19
20       + Changed SetLegendPixels() arguments to be optional with default
21         NULL meaning reset to automatic positioning.
22
23       + Fixed SetXAxisPosition() and SetYAxisPosition() to accept empty
24         string '' to mean reset to default automatic positioning.
25         Make arguments optional, defaulting to empty string.
26
27       + Changed SetNumXTicks() and SetNumYTicks() arguments to be
28         optional with default empty string '' meaning reset to
29         of automatic calculation.
30
31     * Changed SetPointShapes() to use CheckOptionArray(). This
32       simplifies the function with no change in operation.
33
34     * Extend copyright years to 2011.
35
36 2010-12-30
37     * Fix for bug 3147397 "Data colors missing with multiple plots":
38       + Do not truncate the data_colors and related arrays, so the full
39         set of colors will be available for subsequent plots on the image.
40         (Color indexes are still allocated in the image only as needed.)
41       + New internal functions GetColorIndexArray() and
42         GetDarkColorIndexArray(), replacing previous use of array_map().
43       + Removed internal function truncate_array() - no longer used.
44       + Changed SetColorIndexes(), NeedDataDarkColors(), and
45         NeedErrorBarColors() to only allocate the color indexes that will
46         be needed (instead of allocating all colors in the truncated color
47         descriptor arrays).
48
49 2010-12-28
50     * Instead of throwing an error, SetLegend(NULL) now clears the legend
51       array. This can be useful with multiple plots on an image. Before
52       this change, only SetLegend(array()) did that (possibly by accident).
53
54 2010-12-27
55     * Do not have SetDefaultStyles() call deprecated SetLabelColor().
56
57     * Fixes for bug 3143586 "Multiple plots per image - fixes & docs":
58       + Fix DrawLegend so it doesn't forget that the legend position
59         was specified in world coordinates. This fixes the legend
60         position for plots after the first.
61       + Don't draw the image border more than once (although this would
62         probably have no impact on the resulting image). This parallels
63         the behavior for the main plot title and the image background.
64         Replaced member variables background_done and title_done with a new
65         member array done[] which will track when these elements were done.
66
67 2010-12-06
68     * Fix comments above CalcPlotAreaWorld(). Deleted incorrect information
69       from before data-data-yx existed, and before DecodeDataType rewrite.
70
71 2010-12-04 (lbayuk)     ===== Released as 5.3.0 =====
72     * phplot.php: Updated version
73     * README.txt: Updated for new release
74     * NEWS.txt: Add text for new release
75
76 2010-12-03
77     * Feature request 3127005 "Ability to suppress X/Y axis lines":
78       Added SetDrawXAxis() and SetDrawYAxis() to control flags which
79       will suppress drawing the X or Y axis lines. (These lines were
80       probably the only PHPlot elements that could not be turned off.)
81       Changed DrawXAxis() and DrawYAxis() to conditionally draw the
82       axis lines.
83
84 2010-11-28
85     * Feature request 3117873 "Data value labels in more plot types":
86       Implemented Data Value Labels for plot types points, lines,
87       linepoints, and squared.  Added 2 class variables which can be
88       set to control the distance and angle of the labels from points.
89       New internal function CheckDataValueLabels() calculates position
90       and text alignment for these labels.
91
92     * Updated comments for Set[XY]DataLabelPos to match the text in
93       the manual, which was rewritten to clarify label types.
94
95 2010-11-23
96     * Code cleanup. Moved some functions around to group "plot drawing
97       helpers" separately from "plot drawing". No changes to operation.
98
99 2010-11-21
100     * Feature request 3111166 "Control legend colorbox width":
101       Added a class variable legend_colorbox_width which can be changed
102       to make the colorboxes wider or narrower.
103
104 2010-11-16
105     * Feature request 3093483 "Investing support chart types":
106       Added 3 new plot types: Basic OHLC (Open/High/Low/Close), Candlesticks,
107       and Filled Candlesticks. Implemented with one new function to handle the
108       3 new plot types: ohlc, candlesticks, and candlesticks2.
109
110 2010-11-11
111     * Moved information about plot types into a new static member array
112       plots[]. (This is an internal change with no impact on usage, but will
113       make it easier to add new plot types.) SetPlotType() no longer needs a
114       list of plot types to check, FindDataLimits() does not need to check for
115       specific plot types to to process the data array, and DrawGraph() uses
116       data from the array rather than knowing about all the plot types.
117
118 2010-10-31
119     * Changed internal CalcBarWidths() to take two arguments which indicate
120       how it should calculate bar widths, rather than having it check the
121       plot_type directly. (Taken from another, experimental change. This
122       minimizes places where plot_type is directly used.)
123
124 2010-10-03 (lbayuk)     ===== Released as 5.2.0 =====
125     * phplot.php: Updated version
126     * README.txt: Updated for new release
127     * NEWS.txt: Add text for new release
128     * Makefile: Removed HorizontalBars.txt from release. This is now all
129           documented in the reference manual.
130
131 2010-10-01
132     * Rewrite color handling. Default and specified colors are now validated,
133       converted to RGBA arrays, and saved. The colors indexes are not
134       allocated until graph drawing time. Unneeded colors are not allocated.
135
136       Fix bug 3045131 "SetTransparentColor problems": Transparency setup is
137       deferred to graph drawing time, after most other colors are allocated.
138       Fixes SetTransparentColor order dependency, and works with data colors.
139
140       Fix bug 3049726 "Optimize color allocation": Colors allocation is
141       deferred to graph drawing time, and colors for most elements are only
142       allocated if needed. In particular, the data colors and dark colors,
143       which used 32 slots, now only get defined as needed.
144
145       Feature request (partial) 3077554 "Finer control over plot element
146       colors": The colors of the main, X, and Y titles can now be controlled
147       separately.
148
149       Change details:
150       New internal functions:
151           GetColorIndex(), GetDarkColorIndex()
152               Allocate pre-parsed colors for elements.
153           SetColorIndexes()
154               Does the deferred color allocation and defaults.
155           NeedDataDarkColors(), NeedErrorBarColors()
156               Called by graph drawing functions if those colors are needed.
157           GetDataColor(), GetDataErrorColors(), GetBarColors()
158               Custom or standard data color assignment for most plot types.
159           truncate_array()
160              Shorten an array. Used to limit data color allocation.
161
162       Removed internal functions:
163           SetIndexColor(), SetIndexDarkColor()
164               Unneeded. Color handling is now in two separate phases.
165
166       Removed internal member variable:
167           data_colors_alpha
168               PHPlot no longer calls SetDataColors before plotting, so this
169               variable is not needed to preserve the default alpha.
170
171       New internal member variables:
172           transparent_color
173               Saves color value from SetTransparentColor. For bug 3045131.
174           x_title_color, y_title_color, ndx_x_title_color, ndx_y_title_color
175               For title colors. DrawXTitle and DrawYTitle use them now.
176
177       Changed internal member variables:
178           i_border, plot_bg_color, bg_color, label_color, text_color, etc.
179               All variables for colors now always hold a parsed 4-component
180               (RGBA) color specification as an array, and are no longer
181               statically initialized to a color name.
182
183       New public functions:
184           SetXTitleColor(), SetYTitleColor()
185               These can be used to make the 3 titles have different colors.
186
187 2010-09-26
188     * Don't let SetXDataLabelPos() accept 'xaxis' or 'all' as valid.
189       Don't let SetXTickLabelPos(), SetYTickLabelPos() accept 'all' as valid.
190       These were never implemented and never documented.
191
192
193     * Feature request #3073679 "Stacked bar plots with negative values":
194       Allow stacked bar plots (vertical and horizontal) to work with negative
195       values.  Changed FindDataLimits() to not take abs() values for
196       stackedbar when calculating the data range.  Changed DrawStackedBars()
197       and DrawHorizStackedBars() to handle negative values, including proper
198       label positions.  The first non-zero value in a row sets the direction
199       of the bar. Mixing positive and negative values within a row works but
200       the results are not useful.
201
202     * New internal DrawBar() moves common code from 4 bars and stackedbars
203       drawing functions and makes it easier to deal with shading vs bar
204       direction.
205
206 2010-09-24
207     * Fix bug 3074402 "Fix Y axis default for horizontal plots":
208       Make the default axis positions symmetrical for vertical plots
209       (X and Y) and horizontal plots (Y and X). This fixes the problem
210       with horizontal bar/thinbarline plots that have negative data,
211       where the Y axis stayed on the left and the bars went rightward.
212
213 2010-09-01
214     * Fix bug 3056991 "Internal methods should be 'protected'":
215       Changed CheckDataArray(), number_format(), FindDataLimits(), and
216       DrawBackground() to be 'protected'. The test suite no longer calls
217       these directly. For SetIndexColor(), SetRGBColor(), DrawText(),
218       SizeText(), xtr(), and ytr(), left these as public with a comment
219       indicating they should be treated as protected.
220
221     * Fix bug 3057000 "Review 'deprecated' methods":
222       + Changed deprecated method SetNewPlotAreaPixels() to just call
223       SetPlotAreaPixels(). It was suspicious as coded, and was found
224       to be equivalent to SetPlotAreaPixels().
225       +  Removed SetColor(), which didn't do anything. It was calling
226       SetRGBColor and discarding the result. After reviewing the
227       history of this in all CVS versions, it does not seem to have
228       ever been coded correctly, so there is no harm in removing it.
229       + All other deprecated methods seem OK and are left as is.
230
231 2010-08-30 (lbayuk)     ===== Released as 5.1.3 =====
232     * phplot.php: Updated version
233     * README.txt: Updated for new release
234     * NEWS.txt: Add text for new release
235
236 2010-08-27
237     * Fix bug 3051832 "Let PHP/GD find the font file":
238       Instead of checking for file existence, PHPlot now uses a non-drawing GD
239       operation to validate a TrueType font in SetFontTTF(). This allows GD to
240       use its internal search path, making it likely that fonts can be found
241       without needing a platform-dependent path in your script.  Full paths
242       will still work, so there is no compatibility issue.
243
244     * Fix bug 3051906 "Better choice for default TT font":
245       Removed "benjamingothic.ttf" as the default TT font setting. This has
246       not been included in PHPlot since 2004. Changed SetFontTTF() to call
247       new GetDefaultFontTTF(), which will try a number of sans-serif font
248       names the first time it needs a default TT font. Considering the above
249       fix to finding fonts, this has a good chance of finding a working
250       font. It is known to work on Windows and some Linux distributions.
251
252 2010-08-19
253     * Makefile: Removed phplot_data.php from list of files to release.
254       Reference bug report 3048267. This file has not been maintained or
255       tested, and has bugs.  It will remain in CVS, but not be included
256       in PHPlot releases.
257
258 2010-08-17
259     * Change new DrawLinePoints(). It does not have to check and
260       handle error bar plots, as DrawDots and DrawLines will do that.
261
262 2010-08-16
263     * Rewrote DecodeDataType(). Previous implementation was hard to
264       extend and inefficient. Now it uses new class variables (not a
265       returned array) and is only called once, by DrawGraph. Changed all
266       users of data_type to use the new variables.
267
268       In CheckDataArray(), calculate data_columns properly for
269       text-data-single data type (pie chart) too. Simplify DrawPie
270       to use this, and merge 2 of the 3 cases.
271
272       Have a single function handle each plot type, so it can properly
273       check the data type and report a correct error message showing
274       all supported types. For example, DrawBars is now the entry point
275       for both bars and horizontal bars; DrawGraph does not directly
276       call DrawHorizBars. Similar for DrawStackedBars and
277       DrawHorizStackedBars.  Lines, Points, and Linepoints also now
278       have a single function each, dispatching to others as needed.
279       (These changes were split off from an upcoming, larger change.)
280
281 2010-08-14
282     * Fixes to SetDataValues: need to clear out the 2 arrays before
283       setting values in a loop, else if the function is used more than
284       once then old values will remain.
285       Move records_per_group calculation outside the loop.
286       (These were split off from upcoming, larger changes.)
287
288     * Part 4 of horizontal plots: implement horizontal thinbarline plots.
289       Added new data type 'data-data-yx' (label, Y, X1, X2, ...).
290       DrawThinBarLines() now draws either vertical or horizontal plots, and
291       supports data types text-data, data-data, text-data-yx, data-data-yx.
292
293       Fixed DecodeDataType() to handle text-data-single too, for completeness.
294
295     * Fix for over-padding style and color arrays. These were padded to
296       records_per_group, but that is the maximum data array row size.
297       The number of actual data sets is less, and depends on the data type.
298       Calculate the correct number as data_columns at the top of DrawGraph,
299       and use that to pad the arrays. Also moved early error checking in
300       DrawGraph() into new CheckDataArray().
301
302 2010-08-09
303     * Code cleanup. This is a large change to unify the comment and
304       coding stye used in PHPlot. The PEAR style guide is being used
305       as a reference, but PHPlot will never be 100% compliant.
306       This patch introduces no functional changes at all.
307         - Limit line length to 110.
308         - Remove obsolete, partially implemented Doxygen comments.
309         - Add descriptive comment above functions where missing.
310         - Use consistent comment markers and control structure spacing.
311         - Remove ctags-confusing end of function comments.
312         - Rewrote a few if/else blocks for cleaner logic.
313         - Re-order some functions for consistency (X, then Y).
314
315 2010-08-04
316     * Implemented horizontal stacked bar plots:
317       Use the same data type introduced for horizontal bars, 'text-data-yx',
318       and the same plot type 'stackedbars', to make a horizontal stacked bar
319       plot.  Data value labels, both at the ends of the bars and within the
320       bars ('plotstack' labels) are available with horizontal stacked bars.
321
322     * Internal function DrawDataLabel() is replaced by DrawDataValueLabel(),
323       with different usage. The new function can also check to see if a label
324       fits in the allocated space.
325
326     * Fixed the text size check in stacked bar plots for data value labels
327       within the bars. The check only worked correctly for 0 degree labels. It
328       now works with any text angle. It suppresses the label if it is too high
329       (for vertical stacked bar plots) or too wide (for horizontal stacked bar
330       plots) to fit in the bar segment to which it belongs. Note that it only
331       checks in the bar direction. If the text is too wide (for vertical bars),
332       or too high (for horizontal bars), it will still be plotted, but will
333       cross the sides of the bar.
334
335 2010-07-28
336     * Allow callbacks to return a value (to support new data_color callback).
337     * Feature request 3034164 "Extended control of data colors":
338       Define new callback 'data_color' for picking the data color.
339       Changed internal plot drawing functions DrawDots, DrawLines, DrawSquared,
340       DrawBars, DrawStackedBars, DrawDotsError, DrawThinBarLines,
341       DrawLinesError, and DrawHorizBars to use the data_color callback
342       (if defined) to select the data colors.
343     * SetRGBArray code cleanup (no functional changes).
344
345 2010-07-27
346     * Fixes for error bars:
347       Code cleanup in DrawYErrorBar(), with no functional change.
348       Suppress duplicate drawing of error bars with 'linepoints' error plots.
349       This was already fixed for data labels. Now error bars will only be
350       drawn by the 'points' part, not the 'lines' part. There should be no
351       visible changes to plots. (This is needed for a future change).
352
353 2010-07-26
354     * Horizontal bar charts (still an experimental feature) can now have data
355       value labels.
356     * HorizontalBars.txt: Fix incorrect description of bar direction. Add
357       text explaining the new data value labels.
358
359 2010-06-29 (lbayuk)     ===== Released as 5.1.2 =====
360     * phplot.php: Updated version
361     * README.txt: Updated for new release
362     * NEWS.txt: Add text for new release
363
364 2010-06-26
365    * Feature request 2885930 "Horizontal Bars":
366      Horizontal bar charts are implemented, as an experimental feature.
367      A new data type 'text-data-yx' was added, which works with
368      'bars' plot type to produce a horizontal bar chart from a data
369      array with X values for each Y value. Changes were made to
370      FindDataLimits, CalcMargins, CalcPlotAreaWorld, CalcBarWidths,
371      and CalcMaxDataLabelSize to handle the new data type. Other
372      changes were made to handle label position defaults and grid
373      defaults. New drawing functions were added for horizontal bars.
374
375    * HorizontalBars.txt: new documentation file for experimental feature.
376    * Makefile: List new documentation file.
377
378 2010-06-25
379    * Each plot-type drawing function now checks that it is getting a data
380      type that it knows how to handle. A new internal function unifies the
381      checking and error message. (This is associated with an upcoming,
382      bigger change.)
383
384      Compatibility: If you were using an invalid data type for a plot type
385      whose function did not check, will now get an error.
386      
387    * Removed some dubious code from DrawLines() and DrawSquared() and
388      rewrote comments there. The code initialized lastx[0] and lasty[0],
389      but lasty was mapped using the X (rather than Y) function.  This was
390      obviously wrong, but closer inspection showed that the values were
391      never, used so the code was removed.
392
393 2010-06-13
394    * Truecolor.txt: removed
395    * Makefile, README.txt: Removed reference to Truecolor.txt. Full
396      documentation for truecolor images is now in the Reference Manual.
397      
398 2010-06-02
399    * Fix bug 3010116 "Bad rendering of title in multi-plot image
400      when using TTF":
401      Make sure the main title is drawn only once. (If drawn multiple
402      times with TrueType font text, the anti-aliasing effects result
403      in poor quality text.)
404
405 2010-05-31
406    * Improvements to truecolor support (from feature request 2947679):
407      Truecolor support is now better integrated. The derived class only
408      has the constructor now, and the base class itself provides the alpha
409      color component support through the internal functions SetIndexColor(),
410      SetIndexDarkColor(), and SetRGBColor(). This means alpha channel
411      works with palette images too (in so far as GD supports this).
412
413    * Truecolor.txt: Updated per changes to truecolor support.
414
415    * Image tiling with mode 'scale' in tile_img(), used with image and
416      plot area backgrounds, now uses imagecopyresampled() rather than
417      imagecopyresized(). They are the same with palette images, but the
418      resampled copy gets better results with truecolor images.
419
420 2010-05-29
421     * Feature request 3002606 "Add to plot and image border options":
422         Added options 'right', 'top', and 'bottom' to SetPlotBorderType()
423       (existing options are 'left', 'sides', 'none', and 'full'). This
424       now also accepts an array of the above options, giving complete
425       control over which sides to draw.
426         Added option 'solid' to SetImageBorderType() to use the actual
427       color set with SetImageBorderColor(), rather than the darker
428       shade as type 'plain' does (for some reason).
429         New function SetImageBorderWidth() sets the width of the image
430       border. The image border width is now accounted for in margin
431       calculations, although existing plots will not change.
432
433 2010-04-04 (lbayuk)     ===== Released as 5.1.1 =====
434     * phplot.php: Updated version
435     * README.txt: Updated for new release
436     * NEWS.txt: Add text for new release
437
438 2010-04-01
439     * Remove & from argument in SetDataValues(). The data array is not
440       modified and does not need to be passed by reference. (There is
441       no performance advantage, either.)
442
443 2010-03-29
444     * Feature request 2947679 "Support for alpha blending/Truecolor":
445       Implemented truecolor image support with a new class
446       PHPlot_truecolor, extended color specifications to allow
447       specification of an alpha value, and added a new optional parameter
448       to SetDataColors for a default alpha value for all data colors.
449       This feature is *EXPERIMENTAL* (see next item).
450
451     * Truecolor.txt: New file, documentation for the new truecolor capability.
452       (The Truecolor feature is experimental, which means it is subject to
453       change in incompatible ways and the documentation has not yet been
454       incorporated into the PHPlot Reference Manual.)
455
456     * Makefile: Include new documentation file in release.
457
458 2010-03-26
459     Fixed bug 2976735 "Improvements and fixes for 'area' plots":
460     Rewrote DrawArea() function which handles 'area' plot.
461         Part 1: This is related to feature request 2947679, Truecolor support
462     with transparency. The area plot function was filling each area from the X
463     axis up to the Y value, resulting in area overlaps. This wasn't a problem
464     with opaque colors, but with transparency, the overlapping areas resulted
465     in changed colors. The rewritten function fills the area between each line
466     instead of from each line down to the X axis. Plots with opaque colors
467     will not change.
468         Part 2: Area plots now work when the X axis is moved up with
469     SetXAxisPosition().
470         Part 3: Fixed FindDataLimits() for area (and stackedbars too) to
471     take absolute values of Y values. The drawing function was doing this,
472     but not FindDataLimits, resulting in incorrect limits if any Y<0.
473         Part 4: The rewritten DrawArea() also handles a new plot type
474     'stackedarea'.  This is an area plot where the Y values are stacked,
475     similar to 'stackedbars'.
476         Note: As part of the changes, it is now an error to try an area plot
477     with an unequal number of Y points for each X.
478
479 2010-03-23
480     * Feature request 2973995 "Add y-Data to Stackedbars":
481       Implemented Y Data Labels for Stacked Bar charts (stackedbars).
482       The labels are enabled with SetYDataLabelPos, same as with bar charts.
483       There are two types of labels: above the stack with the total, and
484       within the bars at each segment. 'plotin' turns on the upper ones, and
485       'plotstack' turns both on.
486
487     * Other changes:
488       + Removed unimplemented second argument to SetYDataLabelPos.
489       + Fixed questionable logic in SetYDataLabelPos when given an argument
490         that belongs with SetYTickLabelPos.
491       + Fix comments at top of plot-type Draw functions.
492
493     * Fix for bug 2974639 "Stacked bars plot breaks with X axis != 0":
494       Stacked bar plots with non-zero X axis position no longer break apart
495       into segments with gaps. The bars are drawn up from the X axis, and
496       any segments or partial segments below the X axis are not drawn.
497
498 2010-03-22
499     * Change related to feature request 2947679 - Fix 'dot' point shape:
500       Use imagefilledellipse(), not imagefilledarc(), when drawing the 'dot'
501       point shape. The fix was needed for future support of truecolor images
502       with transparency, but filled dots from imagefilledellipse() look
503       better (rounder) with regular images and opaque colors.
504       Credit to mvaldez for identifying the problem and providing the fix.
505
506 2010-03-04
507     * Fix for bug 2963757 "point_counts undefined error in 5.1.0":
508       Fixed CheckPointParams so it sets point_counts even when the point shape
509       and point size arrays are already the same size and do not need padding.
510
511 2010-01-26
512     * Fix for bug 2938219 "Bars go in wrong direction":
513       Fixed CalcAxisPositions() to be consistent in positioning the X axis.
514       When all Y values are <0 and the Y=0 line is not part of the plot range,
515       PHPlot will now default the X axis to the top of the plot, not the
516       bottom.  This fixes the problem with bars to negative Y values being
517       drawn downward if Y=0 is visible, but upward if Y=0 is not visible.
518       This also affects thinbarline plots.
519       Credit to lauryn1298 for finding the bug.
520
521 2009-12-24 (lbayuk)     ===== Released as 5.1.0 =====
522
523 2009-12-18
524     * Change for bug 1795971 "Fix default data colors":
525       The default Data Color and Error Bar Color arrays now have 16
526       different colors, no duplicates, and nothing so light that it
527       is invisible.
528       Using '' or False as the argument to SetDataColors, SetErrorBarColors,
529       and SetDataBorderColors now re-initializes the map to the defaults.
530       This was previously undocumented, and in some cases set the map to
531       something different from the default.
532
533 2009-12-15
534     * Cleanup: Remove DrawAxisLegend() - empty function marked TODO,
535       not really clear what it was meant to do.
536
537 2009-12-14
538     * Fix for bug 2914403 "Pie + X/Y titles: Undefined property error":
539       In DrawGraph(), don't try to draw X or Y titles for pie charts.
540
541     * Feature request 2899921: "allow different format for data and tick
542       labels"; Bug 2906436: "Fixes for X Tick Labels vs X Data Labels",
543       and partial implementation of changes from user 'adoll' regarding
544       tick vs data labels:
545
546       New public functions:
547       + SetXDataLabelType() : Sets formatting for X Data Labels
548       + SetYDataLabelType() : Sets formatting for Y Data Labels (bar charts)
549       + SetXDataLabelAngle() : Sets text angle for X Data Labels
550       + SetYDataLabelAngle() : Sets text angle for Y Data Label (bar charts)
551       The defaults for these are set up to be fully backward compatible
552       with previous releases of PHPlot (except see the next item).
553
554       Re-used function name SetXDataLabelAngle():
555       + This has been deprecated and undocumented since 2003-12-07, and
556         used to just call SetXLabelAngle(). For new behavior, see above.
557
558       Changes to public functions:
559       + SetXDataLabelPos() and SetXTickLabelPos() no longer cancel each
560         other out (set the other control variable to 'none'). Instead,
561         they are both considered before plot drawing.
562
563       Changes to internal functions:
564       + DrawDataLabel() now uses the font, angle, and color arguments as
565         provided, and does not substitute values if they are empty.
566       + SetLabelType() now takes mode='xd' and 'yd' for X Data and Y Data
567         label formatting; 'x' and 'y' are for tick labels only now.
568       + Functions that work on Data labels now call FormatLabel() with the
569         new mode parameter value 'xd' or 'yd, and use the new
570         data_label_angle variables.
571       + New CheckLabels(), used by DrawGraph to process label parameters.
572       + CalcMargins() - Rewritten to handle changes to Tick and Data labels.
573
574       Changes to internal class variables:
575       + New: x_data_label_angle, y_data_label_angle
576       + Do not initialize x_tick_label_pos or x_data_label_pos, so that
577         CheckLabels() can tell if they were set or not and apply defaults.
578       + Initialize y_data_label_pos to 'none', not 'plotleft'.
579       + Add 2 more indexes to label_format[] array: 'xd' and 'yd'.
580
581     * Cleanup:
582       + Delete unused internal class variable: draw_y_data_label_lines
583       + Delete unused function SetDrawYDataLabelLines()
584
585 2009-12-07
586     * Fix bug 1795972 "Fix default point shapes":
587       +  Added 10 new point shapes to the existing 10 shapes.
588       +  Changed the default point shape from all 'diamond' to a
589          selection of up to 10 different shapes.
590       +  Fixed bug in the code that tried to set the point shapes
591          and sizes arrays to be the same size. This was not working,
592          resulting in unexpected point sizes.
593       +  Changed default point size to 6 for all shapes. It was trying
594          to be "5, 5, 3" but due to several bugs this was not working.
595       +  Do not adjust shape sizes to even numbers (was done for only two
596          shapes).  Instead, consistently truncate size/2 when needed.
597       NOTE: These may change the look of 'points' and 'linepoints' plots.
598
599     * Changed startup initialization code:
600       +  SetDefaultStyles() was doing some odd things using a variable
601          called "session_set", with comments referring to non-existent
602          session support code. This has been removed. There should be
603          no visible changes from this. PHPlot does not use PHP sessions.
604
605 2009-12-04
606     * Fix for bug 2908256, errors in pie charts with bad data array:
607       (From a Drupal contrib module report by thekevinday.)
608       With pie charts only, a data array with no valid Y values resulted
609       in PHP error messages. All other plot types handle this by producing
610       an image without a graph.
611       Fixed DrawPieChart to behave this way too. If there are no valid Y
612       values, or if the sum of all Y values is 0, do not error out, but
613       don't draw a pie chart either.
614       Also, pie charts now ignore non-numeric Y values, like other plot types.
615
616 2009-11-20 (lbayuk)
617     * Fix for bug 2900914 "Problem with display of 0 on Y axis":
618       Changed how X and Y values are stepped by tick intervals, to avoid
619       cumulative round-off error. This fixes the problem when Y crosses 0 with
620       a tick step such as 0.1 resulting in a long label for a very small but
621       non-zero number. Fixed DrawXTicks, DrawYTicks, and CalcMaxTickLabelSize.
622       (Originally reported by cncnet)
623
624 2009-11-19 (lbayuk)
625     * Improve support for using callbacks to annotate plots:
626       Added new callback 'draw_all', called after all drawing.
627       Supply plot_area[] as argument to some drawing callbacks.
628       Added new method GetDeviceXY() to translate from world coordinates.
629       Allow NULL or '' for $font in DrawText() internal method, meaning to
630           use the generic font. If callbacks want to use DrawText, this
631           avoids them having to reference the internal fonts[] array.
632
633 2009-11-01 (lbayuk)
634     * Address bug report 2886365 "Declare all functions and variables in
635       PHP5 style"
636       PHP5 deprecates the use of 'var' to declare a class member variable.
637       All initialized class member variables are now declared 'public'.
638       (It was tempting to make most or all 'protected' or 'private', but
639       that would likely break too much, including the PHPlot Test Suite.)
640
641       Most class member functions which are meant for internal use only are
642       now declared 'protected', so they cannot be called from scripts
643       (except in child classes). (Note PHP5 does not deprecate the use of
644       just 'function' to mean public, so public functions were not changed.)
645       Internal functions are those documented in the manual under Developer's
646       Guide, Internal Functions. If your code breaks because you are using
647       a method which is now protected, please post the details on the help
648       forum.
649
650       Some member variables which were set in the constructor are now
651       initialized with the class instead. (No impact.)
652
653       Removed commented-out, FIXME-noted code for interim labels.
654
655 2009-10-12 (lbayuk)
656     * Bug report 2839547, allow SetImageBorderType('none') to reset the image
657       border type.  Also checked for other cases where there is no reset;
658       found one that exists (Set[XY]LabelType) but needs to be documented.
659
660 2009-07-09 (lbayuk)
661     * Added a hook $plot->locale_override which can be set to True to prevent
662       PHPlot from loading locale settings from the environment with
663       setlocale(LC_ALL, ''). This is necessary for testing PHPlot on Windows,
664       where you cannot force a locale with an environment variable. It might
665       also be needed for people who want PHPlot's locale to differ from the
666       web server's locale.
667
668 2009-06-12 (lbayuk)     ===== Released as 5.0.7 =====
669
670 2009-06-11 (lbayuk)
671     * Change PHPlot license to LGPL, per Afan.
672         phplot.php, phplot_data.php - Change license notice.
673         rgb.inc.php - Change top comments and remove bottom marker.
674         COPYING - new file, text of LGPL.
675         LICENSE.* - removed files - old licenses.
676         Makefile - change list of distributed files.
677
678     * Fix for bug 2803900: SetRGBArray('large') does not work. The include
679       file defined a different array name than the main script expected.
680       (This bug seems to have happened over 8 years ago.) Fixed the array
681       names to match. Also removed the ./ prefix from the included filename
682       so it will be found if on the include path but not in the script
683       directory.  Also added error check if the rgb.inc.php include file
684       is needed and not found.
685
686 2009-05-25 (lbayuk)
687     * Added new feature to allow partial margin or plot area specification.
688       You can omit, or specify as NULL, any of the 4 arguments to
689       SetMarginsPixels() or SetPlotAreaPixels(), and this means PHPlot
690       should use the automatically calculated margin on that side.
691       Credit to adoll for this feature.
692
693 2009-05-17 (lbayuk)
694     * Fix for bug 2791502 "Error plots treat missing Y values as 0":
695       Plots with data type data-data-error now support missing Y values,
696       instead of treating them as 0. This works with lines, points,
697       and linepoints plot types, and also honors SetDrawBrokenLines.
698
699
700     * Fix for bug 2792860 "Wrong DataLabelLines with missing Y":
701       Do not draw X Data Label Lines at points with missing Y values.
702
703
704     * Fix for bug 2786350 "Missing Y data results in bad auto-range":
705       Rewrote FindDataLimits to ignore missing Y values, rather than
706       treating them as if 0, for calculating range.
707       Bug report and analysis by mrten.
708
709     * Fix for bug 2786354 "Incorrect auto-range for data-data-error":
710       For data-data-error data type, apply the positive and negative error
711       amounts for each Y point to that point only, rather than applying the
712       largest errors to the overall minimum and maximum Y value for the row.
713
714     Note: The two fixes above can change existing plots which rely on
715       automatic Y range calculation. The first fix affects plots with
716       missing Y values and min(Y)>0. The second fix can affect plots using
717       data-data-error data type and different error values for different
718       points. In both cases the new Y range can be smaller than before.
719
720 2009-01-20 (lbayuk)     ===== Released as 5.0.6 =====
721
722 2009-01-18 (lbayuk)
723     * Fix for bug 1891636 "Misaligned TTF X Labels":
724           PHPlot was using the actual bounding box of each line of text
725       to allocate space and set the text positioning, but was ignoring the
726       fact that the text baseline is not the same as the bottom of the
727       bounding box. This resulted in uneven alignment of the X labels if
728       they had different heights (for example, month names Jul and Aug).
729
730       PHPlot now calculates the size of text for allocation (SizeText) using
731       the descenders on the last line, and calculates the size for drawing
732       (DrawText) only to the baseline. PHPlot also now uses a fixed line
733       spacing for each line of text in a font, rather than the actual text
734       height. This allows separately drawn multi-line labels to align.
735
736     * Changes to line spacing when using multi-line labels:
737           PHPlot was using the class variable line_spacing to mean the
738       number of pixels between lines of multi-line labels. This made the
739       spacing too small for larger fonts, and it was not possible to adjust
740       line spacing for different types of text.
741
742           PHPlot now interprets line_spacing as the number of pixels only
743       for GD text, and as a scale factor for the font's built-in line
744       spacing for TrueType text. In addition, a new optional argument is
745       added to SetFont, SetFontGD, and SetFontTTF to set a line spacing
746       specific to that type of text.
747
748     * Changes had to be made to the legend drawing code to accommodate the
749       changes to font handling.
750
751       Note: The line spacing change results in slightly looser spacing on
752       multi-line TrueType text labels, and slightly taller legends, compared
753       to version 5.0.5.
754
755 2008-09-21 (lbayuk)
756     * Interim fix for bug 1932571 "Data-Data Plot fails with same X values".
757       PHPlot will no longer hang when the range of X values is 0 (that is, when
758       x_min == x_max). It will arbitrarily set an X range of 1, so the
759       calculated tick step is not 0. This is a temporary fix. Work on a smarter
760       X and Y range calculation is in progress, which will handle edge cases
761       like this better, but it isn't ready and this bug has been open too long.
762       Credit to andyl for finding the bug.
763
764     * Fix font path: Use DIRECTORY_SEPARATOR constant not '/'.
765
766     Extended the label formatting capabilities, adding 'printf' and 'custom'
767     types, added a prefix and suffix for 'data' type, and allow format controls
768     to be included in SetXLabelType and SetYLabelType.
769
770     External changes:
771     * Added 'printf' label type. The caller specifies the print format as the
772       2nd argument to SetXLabelType or SetYLabelType (default '%e').
773              $plot->SetXLabelType('printf', '%5.2f');
774
775     * Added 'custom' label type. The caller supplies a callback (typically a
776       function name) and optional pass-through argument as the 2nd and 3rd
777       arguments to Set[XY]LabelType.  The function is called as $f($value, $arg)
778       to return the formatted $value.
779              $plot->SetXLabelType('custom', 'myfunction', $arg_value);
780
781     * In addition to Set[XY]TimeFormat, the format string for type 'time' can
782       now be set as the 2nd argument to Set[XY]LabelType.
783              $plot->SetXLabelType('time', '%H:%M');
784
785     * In addition to SetPrecision[XY], the precision for type 'data' can now be
786       set as the 2nd argument to Set[XY]LabelType. A 3rd and 4th argument
787       can supply a prefix and suffix for 'data' formatting. (All optional)
788              $plot->SetXLabelType('data', 2, '$', 'US');
789
790     Internal changes:
791     * Class variables x_precision, y_precision, x_label_type, y_label_type,
792       x_time_format, and y_time_format have been removed.
793
794     * New class array variable label_format[], with elements 'x' and 'y' which
795       are arrays for label formatting. Elements in the sub-arrays are not
796       initialized until needed.
797
798     * New function SetLabelType, which implements Set[XY]LabelType now.
799
800     * FormatLabel() was rewritten to support the new label formatting.
801
802     Compatibility:
803     * Any code that directly references class variables related to label
804       formatting will break, except for data_units_text. Use the documented
805       function methods instead.  Setting data_units_text as a suffix is
806       deprecated but still works.
807
808     * The 'data' type precision for 'Y' is still used for pie chart labels.
809
810 2008-07-12 (lbayuk)
811     Multiple comment spelling error fixes. No functional changes.
812
813 2008-07-06 (lbayuk)
814     Changes to allow mixing GD fixed-font text and TrueType Font (TTF) text
815     on the same plot.
816     (This change came from work done trying to fix TTF text positioning,
817     where it looks like additional information needs to be stored for TrueType
818     fonts. The old font data structure was awkward to extend, and allowing
819     mixed GD/TTF text was on the to-do list anyway.)
820
821     External changes:
822     * SetFontGD(), SetFontTTF(): New functions to set a font, with type.
823     * SetFont(): Now calls SetFontGD or SetFontTTF depending on $use_ttf.
824     These changes should be fully compatible with existing programs.
825
826     Internal changes:
827     * Updated comments explaining SetUseTTF() now sets the default type
828       (not the only type) of text used.
829     * Put all the font data into a class array. (Replaces $this->generic_font
830       with $this->fonts['generic'], etc.)
831     * ProcessTextGD() and ProcessTextTTF() now take the font array as one
832       argument, rather than separate arguments for font path and size.
833
834 2008-01-13 (lbayuk)     ===== Released as 5.0.5 =====
835     * phplot.php: Updated version
836     * README.txt: Updated for new release
837     * NEWS.txt: Add text for new release
838     * Makefile: Remove 'Callbacks' from release target, as this material is
839       now in the reference manual.
840
841 2008-01-07 (lbayuk)
842     Copyright updated to 2008 and PHP4 no longer listed as supported.
843
844     Major rewrite of the margin calculation functions to address multiple
845     problems.  Fixes for bugs 1856207 "Margin error with 'xaxis'/'yaxis'
846     position, 1843012 "Make margins, drawing consistent", and 945439
847     "x_tick_label_height not set correctly".
848
849     Note: These changes are inter-dependent and cannot be split up.
850
851     * Defer all calculations to DrawGraph time, to eliminate order dependencies.
852       These functions now just store their arguments in the object, and all
853       calculations happen later:
854     + SetXAxisPosition, SetYAxisPosition
855     + SetMarginsPixels
856     + SetPlotAreaPixels (Stores margins, not area, now.)
857     + SetPlotAreaWorld
858     + SetXTickIncrement, SetYTickIncrement
859
860     * A new callback 'debug_scale' was added to trace the margin and scale
861       calculations.
862
863     * CalcMargins was rewritten. Actual sizes of tick and data labels are now
864       used, rather than guesses like "use size of biggest Y value". A minimum
865       value (3 x safe_margin, or 15 pixels) applies to each margin.
866
867     * FindDataLimits no longer needs to find the longest data label, since
868       CalcMargins now does that more precisely.
869
870     * DrawXTitle and DrawYTitle now use position offsets calculated by
871       CalcMargins. Note: These titles are now offset from the plot area,
872       not the image area. The titles will move if you had set the plot area
873       or margins.
874
875     * DrawYTick, DrawXTick rewritten to use pre-calculated offsets, and common
876       code moved to new CalcTicks().
877
878     * DrawXDataLabel: Use pre-calculated offsets for text.
879
880     * DrawGraph: Rewrote top section (before drawing anything) to do the
881       calculations in the proper order, unconditionally.
882
883     * Class variables removed:
884       x_label_inc, y_label_inc, _x_label_cnt : These were never used.
885       title_height, x_title_height, y_title_width : Now internal to CalcMargins.
886       data_limits_done : No more need to remember if FindDataLimits called.
887
888     * New class variables added:
889       plot_margins_set : Keeps track of user-set plot area or automatic.
890       x_label_top_offset, x_label_bot_offset, x_offset_axis_offset,
891           y_label_left_offset, y_label_right_offset, y_label_axis_offset,
892           x_title_top_offset, x_title_bot_offset,
893           y_title_left_offset, y_title_left_offset : Label offsets
894       
895     * New internal functions:
896       CalcPlotAreaPixels : Deferred calculations taken out of SetPlotAreaPixels
897         and SetMarginsPixels.
898       CalcPlotAreaWorld : Deferred calculations taken out of SetPlotAreaWorld.
899       CalcAxisPositions : Calculate axis positions, moved from CalcTranslation.
900       CalcTicks : Calculate X and Y tick interval. This still uses the
901         same simple method (basically range/10), but now we could drop in a new
902         algorithm much more easily. This is now also used by CalcMargins.
903         Code taken out of DrawXTicks and DrawYTicks.
904       CalcMaxTickLabelSize : So CalcMargins can use the exact tick label sizes.
905       CalcMaxDataLabelSize : So CalcMargins can use the exact data label sizes.
906       DrawXTick : Code split out from DrawXTicks for symmetry with DrawYTick.
907
908
909 2007-12-13 (lbayuk)
910     * Changed ProcessTextTTF() so SizeText() will return integers. It rounds
911       the calculated values up, so the bounding box really contains the text.
912       This also prevents unneeded float calculations in derived values.
913
914 2007-12-09 (lbayuk)
915     Major rewrite of the text drawing functions to address multiple problems.
916     Note: These changes are inter-dependent and cannot be split up.
917
918     * Fixed bug 1813070 "Bad position for multi-line TrueType text":
919       TTF text is now drawn line-by-line, not as a block, for proper
920       alignment and positioning.
921
922     * Fixed bug 1813071 "Wrong title height for multi-line TTF text":
923       Corrected miscalculation of overall height of multi-line TTF titles.
924       This bug resulted in over-sized margins.
925       The height is now computed line-by-line, including the inter-line spacing.
926
927     * Fixed bug 1813474 "DrawText alignment arguments wrong":
928       Corrected meaning of 'top' vs 'bottom' alignment. PHPlot now follows
929       the usual conventions: 'top' alignment means top of text to reference.
930       DrawText default for vertical alignment is still 'bottom', but the
931       meaning was corrected.  All callers of DrawText were fixed.
932
933     * Fixed bug 1816844 "Fix order dependency for setting titles":
934       Defer processing titles strings until DrawGraph(), so there is no
935       more order dependency (no need to set font before setting title strings).
936
937     * Fixed bug 1819668 "Horiz. align multi-line text: GD vs TTF":
938       The new text routines draw TTF text line-by-line and correctly do
939       right-, center-, and left- alignment of each line within a text block.
940
941     * Fixed bug 1826513 "FIXME in DrawLegend: Max label length":
942       Use actual width of widest legend line to calculate legend box size.
943
944     * Partial fix for bug 945439 "x_tick_label_height not set correctly":
945       In FindDataLimits(), save the longest data label, not just its length,
946       and use the actual rendered size of that string in CalcMargins() for
947       the margin calculations.
948       Also take into account which of the tick or data labels are visible.
949       This is not a complete fix, but is a significant improvement.
950
951     The following changes were made related to the above fixes:
952
953     + Replaced internal function TTFBBoxSize(), which didn't work right, with
954       SizeText(). It returns the orthogonal bounding box of a block of text,
955       and works with both GD and TTF text.
956
957     + DrawText() and SizeText() call a single function ProcessText(), which is
958       the only place GD text and TTF text are distinguished. (So eventually
959       we will be able to mix GD and TTF text on a plot.)
960
961     + New internal functions ProcessTextGD() and ProcessTextTTF() draw (or size)
962       GD and TTF text respectively. These are only called by ProcessText().
963       These are re-implementations which properly position and align text.
964
965     + Removed class variables title_angle, x_title_angle, and y_title_angle. The
966       titles only work at their fixed angles anyway (0, 0, and 90 respectively).
967
968     + Line spacing set with SetLineSpacing() now affects TTF text as well as
969       GD text. Previously, it only affected GD text. The default line spacing
970       happens to be usable for TTF text.
971
972     + Added new callback hook 'debug_textbox' for developing, testing, and
973       documenting. It provides access to the text area bounding box.
974
975     + Removed unneeded class variables x_tick_label_height, y_tick_label_width,
976       x_tot_margin, y_tot_margin.
977
978 2007-11-25
979     * Improve error handling:
980       Internal functions PrintError() and DrawError() are now the same. Both
981       will draw the error message into the image and output it, and then
982       trigger a user-level error. If no error handler has been set, it will
983       exit, as before. But now the error message should also get logged, or
984       written to the standard error stream, depending on the SAPI in use.
985       You can now establish an error handler to catch most PHPlot errors and
986       do some cleanup before exit.
987
988       This fix also covers bug #1823774 "Default Font Path and Error Message
989       Output".
990
991       Fixed the return value of most PHPlot functions, to return False on
992       error, else True. Since uncaught errors are fatal anyway, this only
993       affects code with an error handler that returns, which is not
994       recommended and unsupported at this time. These changes are for
995       possible future error handling options.
996
997 2007-11-22
998     * Fix bug 1836528 "Insufficient checking of parameter values":
999       Rewrote CheckOption to correctly validate option choices.
1000       (It previously accepted substrings and other incorrect values.)
1001       PHPlot methods that use CheckOption now must be called with valid option
1002       values. Empty strings are also no longer accepted.
1003
1004 2007-11-17 (lbayuk)
1005     * Change to callbacks to support extra arguments.
1006       The PHPlot class can now pass extra arguments to a callback function.
1007       Callback functions now take the following form:
1008           my_callback($img, $passthru_arg, ...)
1009       Where '...' is zero or more additional arguments supplied by PHPlot to
1010       the callback. Each implemented callback reason will define any
1011       additional arguments it uses. The existing defined callbacks have not
1012       changed and do not currently pass any extra arguments.
1013
1014 2007-11-10 (lbayuk)
1015     * Fix bug 1827263 "Spoiled up pie-chart if $val is close to zero":
1016       Skip pie slices which would result in an integer angle of zero
1017       degrees, because the GD arc filling function will draw a complete
1018       circle for that case.
1019       Credit to Viacheslav <webdeveloper.ua at gmail.com> for finding this.
1020
1021     * Removed 8 of the functions (class methods) marked 'deprecated'.  Only
1022       deprecated functions which seem to have been for internal use have
1023       been removed. Even old scripts shouldn't be using them, and they are
1024       becoming a problem to maintain.
1025       Removed: SetImageArea() DrawDotSeries() DrawLineSeries() CalcXHeights()
1026       CalcYWidths() DrawLabels() InitImage() DrawDashedLine().
1027
1028 2007-10-20 (lbayuk)     ===== Released as 5.0.4 =====
1029     * phplot.php: Updated copyright, version, and authors comments at top.
1030     * README.txt: Updated for new release
1031     * NEWS.txt: Add text for new release
1032
1033 2007-10-18 (lbayuk)
1034     * Add callbacks - experimental feature:
1035       New functions SetCallback, GetCallback, RemoveCallback.
1036       New internal function DoCallback.
1037       Added callback hooks to DrawGraph.
1038
1039       Re-arranged code in DrawGraph to bring pie chart drawing into the main
1040       switch on plot type, rather than a special case in its own block. This
1041       makes it easier to follow and easier to add callback hooks.
1042
1043     * Callbacks: New file, documentation for the new callbacks feature.
1044       (This won't be in the manual while it is an experimental feature.)
1045
1046 2007-10-15 (lbayuk)
1047     * Fix for bug 1813021: Miss-positioned right-justified vertical GD text.
1048       Fixed DrawText() to correctly position 90 degree right-justified text
1049       drawn in a fixed GD font. This could be seen with 90 degree Y tick
1050       labels. (Found by accident while working on TrueType text problems.)
1051       Also some code cleanup in DrawText: use elseif where appropriate.
1052
1053 2007-10-09 (lbayuk)
1054     * Code cleanup: Simplify SetIndexColor() and SetIndexDarkColor().
1055       There is no need to first try ImageColorExact, then ImageColorResolve
1056       if that fails. ImageColorResolve does all that for us.
1057
1058       Code cleanup: Rewrite SetRGBColor(). It now detects if an unrecognized
1059       color name or color value form is used, and draws an error message.
1060       Before this it would get a PHP index error and "headers already sent"
1061       condition.
1062
1063     * Code cleanup: Remove duplicated code for loading image files.
1064       Added new class-private function GetImage() which loads an image based
1065       on the image type, and also returns the image size. This replaces
1066       duplicated code in tile_img() and SetInputFile().
1067       Also fixed comment at top of SetImageFile which said it was deprecated.
1068       It isn't - it is used by the constructor. Moved the function out of the
1069       'deprecated' area up to below where it is used.
1070
1071     * Code cleanup: PHPlot should not define or affect anything outside its
1072       own class.
1073       - Removed the check for __FUNCTION__ (PHP 4.3 and up). This is obsolete.
1074       - Do not set error_reporting to E_ALL. Although it is recommended that
1075       scripts do this, it is not the place of loaded classes to do it.
1076       - Remove unused global constant TOTY.
1077       - Removed constants MAXY and MINY. Global constants like this are bad.
1078       These were used as magic index values into data[] to hold min and max Y
1079       values for the row. Instead, put them in separate arrays which are
1080       named data_miny[] and data_maxy[]. (This seems to be only used by the
1081       data line drawing function.)
1082
1083       Comment cleanup: Remove one commented-out partial function DrawPlotLabel,
1084       and fix another commented-out code fragment in DrawYErrorBar. Both of
1085       these had unmatched braces in them which caused a balance-braces check
1086       to fail.
1087
1088     * Code cleanup, array padding: Get rid of functions outside the class
1089       and remove the interim fix for PHP 5 (which changed the behavior of
1090       array_merge).  Rewrote external function array_pad_array() as a new
1091       class function pad_array().  It does not need access to the class,
1092       but I don't think PHPlot should add to the global namespace more
1093       than necessary.  The third argument (array to use for padding) was
1094       never used, so it was removed. It always pads the array with itself.
1095       It now only works on 'usual integer indexed' arrays (0-based
1096       sequential integer index). The was previously required but
1097       undocumented for some of the arrays (like line_widths); now it is
1098       required for all style arrays and will be documented. Now we can pad
1099       the array to the required length, not just N times its previous
1100       length, and we don't need array_merge.  Deleted external function
1101       array_merge_php4() as it is no longer used.
1102
1103       Deleted PHP end marker ?>. You don't need this and it can cause
1104       problems with extra whitespace in your output.
1105
1106 2007-09-24 (lbayuk)
1107     * Code cleanup: Fix ternary operator misuse.  This doesn't change
1108       behavior, but it was annoying me so I fixed it.
1109       Replaced all cases of code like this: $a = ($a > $b) ? $b : $a
1110       With just: if ($a > $b) $a = $b
1111
1112     * Fix Makefile 'release' target to set owner/group when creating
1113       the tar file. This avoids having to run it as root, but it needs
1114       GNU tar to work.
1115
1116 2007-09-08 (lbayuk)
1117     * Fix for bug 1790441: Removed the PHPlot quasi-destructor function and
1118       the register_shutdown_function() call which arranged for it to be used.
1119       This was preventing release of memory when a PHPlot object was unset,
1120       because the registered shutdown function held a reference to it.
1121       So rather than improving memory use, it had the opposite effect.
1122         Note: It is no longer necessary or recommended to use reference
1123         assignment ($plot =& new PHPlot) for PHPlot object creation.
1124       Thanks to annajilly for the thorough analysis, bug report, and fix.
1125
1126 2007-09-05 (lbayuk)
1127     * Rewrote FormatLabel() to ignore blank label values. Adapted from a
1128       patch and feature request submitted by Gerhard Reithofer (exgerhardr).
1129       Blank labels used to produce an error if the LabelType was set to
1130       'time', and zero if set to 'data'. Now they are just ignored. This
1131       provides a simple way to have labels only at selected intervals when
1132       using time or data formats. For example, you can have a date/time
1133       label at every 10th data point by setting the labels for the other 9
1134       to be empty strings. Also: Removed $which_pos values 'plotx' and
1135       'ploty'.  These were unused by PHPlot and this is an internal-only
1136       function so there is no compatibility issue. Removed error checking on
1137       $which_pos for the same reason; the error message used an undefined
1138       variable anyway so it wouldn't have worked.
1139
1140 2007-08-26 (lbayuk)
1141     * Allow SetLegendStyle colorbox_align argument to be 'none', to suppress
1142       the colorboxes in the legend.
1143
1144       Fix comment on $legend_text_align: empty means right, not left.
1145
1146       Rewrote DrawLegend layout code to make it easier to understand. The
1147       result should be within 1 or 2 pixels of the previous size and position.
1148
1149     * Fixes for bug 1779115: SetLegendWorld() fails on undefined vars
1150       Store the given coordinates and remember that they need to be converted
1151       from world to pixel coordinates, but defer trying to actually convert
1152       them until it is time to draw the legend. This way, there are no
1153       problems with the scale having to being set up first (which is nearly
1154       impossible to do).  Made the following changes:
1155
1156         Changed legend class variables to be uninitialized, and unset (rather
1157         than empty string) means use the defaults. Added a new variable:
1158         $legend_xy_world. If it is set, (legend_x_pos, legend_y_pos) need to
1159         be converted to pixel coords. If it is unset, they are already pixel
1160         coords (or undefined, meaning defaults).
1161
1162         Changed usage of internal function DrawLegend(): removed all arguments.
1163         X and Y were always the class variables anyway, and now it needs to
1164         also use the new flag to tell it if X and Y are world or pixel coords.
1165         The third argument was unused.
1166
1167         Removed third, unused, default NULL argument from SetLegendPixels and
1168         SetLegendWorld.
1169  
1170         Changes to DrawLegend to convert x, y coords to pixel coordinates
1171         if they came from SetLegendWorld. Also account for new usage of
1172         the class variables: Test for unset to mean use default.
1173
1174 2007-08-04 (lbayuk)
1175     * New feature: control legend text and color box alignment.
1176       Adds a new function SetLegendStyle to adjust the alignment of the
1177       text and the color boxes inside the legend.
1178       Based on part of bug 1208054, contributed by David Hernández Sanz.
1179
1180 2006-12-02 (lbayuk)
1181     * Fixes for bug 1605555: Y Data Labels use wrong font and not formatted.
1182       Use y_label_font (not x_label_font) for Y Data Labels.
1183       Use the formatted value for the label, not the original text.
1184       (This applies to bar charts only, with the new Y data labels.)
1185
1186     * One fix for bug 1208054: Localization of number format.
1187       If number formatting is enabled with 'data' format type, PHPlot previously
1188       used dot for decimal point and comma for thousands separator, and there
1189       was no way to change it.
1190       
1191       This fix adds a new function:
1192                SetNumberFormat($decimal_point, $thousands_separator)
1193       to set the separators.  In addition, if that function is not used,
1194       PHPlot will now try to use locale-dependent separators. If locale
1195       information is not available, it will fall back to the old defaults
1196       of dot and comma.
1197
1198       Note: This change may have some negative effects. 1) If your locale is
1199       "C" or "Posix", you might not get a thousands separator now by default.
1200       You should be using a more specific locale. 2) If your PHP script is
1201       forcing a specific locale with setlocale(), PHPlot will probably undo
1202       that because it uses setlocale(LC_ALL, '') to import locale information
1203       from the environment.  We have to do that, or a locale set through
1204       the environment is ignored. But it will override a manually set locale.
1205
1206     * Fix for bug 937944: X/Y Tick Counts
1207       PHPlot could draw one too few Y tick marks, and one too many X tick marks.
1208
1209       Changed the code to stop drawing X (Y) tick marks when the current X (Y)
1210       value exceeds the maximum X (Y) value plus a small fudge factor. The fudge
1211       factor accounts for cumulative error when repeatedly adding a delta to
1212       the X (Y) value.
1213
1214       Notes: The bug report was writing about Y tick counts only, but X tick
1215       counts can also be wrong. The proposed fix in the bug report does not
1216       work in all cases.
1217
1218       This fix changes the appearance of many plots which were missing the
1219       top-most Y tick mark. The extra X-tick mark problem is less common.
1220
1221 ===== Released as 5.0rc3 =====
1222
1223 2006-11-13 (lbayuk)
1224     * Fix for bug 1437912: x-axis label misalignment [bar charts]
1225       The calculations were redone from scratch.
1226       New control variable 'bar_extra_space', which works in addition to
1227       'group_frac_width' to control how much extra space is around the bars.
1228       Made bar widths match for 'stackedbars' and 1-bar-per-group 'bars'.
1229
1230       NOTE: This changes the appearance of charts. bars in 'stackedbars'
1231       will now be thinner, and bars in 'bars' graphs will be thicker. I
1232       saw no reason for them being different before.
1233
1234       This fix required fixing the positioning on the new bar data labels,
1235       which was off before.  The bar data labels will now be centered.
1236       Additional fixes to bar chart data labels:
1237          For negative values, the label will center under the bar.
1238          Fixed X-adjustment to account for shading.
1239          Fixed to not suppress the data label if the value is 0.
1240
1241
1242 2006-11-10 (lbayuk)
1243     * Fix for bug 1594457: DrawError text wrap and background fix
1244       Do error image white background correctly, and word-wrap the text.
1245
1246     * Fix for bug 1594458: Suppress lines or points in 'linepoints' 
1247       Don't draw X data labels twice for 'linepoints'.
1248       Allow SetPointShapes value 'none' to suppress points, and allow
1249       SetLineStyles value 'none' to suppress lines. This allows a 'linepoints'
1250       graph to mix lines only, points only, and both on the same graph.
1251
1252
1253 2006-11-09 (lbayuk)
1254     * Fixes for bug 1446523:
1255       + Wrong variable name in deprecated SetAxisFontSize()
1256       + Fails to properly handle error if SetDataValues() was never
1257         called, or not called with a data array.
1258
1259     * Fix for bug 1117122: Pie Chart ignores SetPlotAreaPixels
1260       Don't let DrawGraph recalculate the plot area for pie charts if the
1261       user already set it with SetPlotAreaPixels.
1262
1263       NOTE: This fix may slightly change the appearance of some pie charts,
1264       whether or not they use SetPlotAreaPixels.
1265
1266     * Fix for bug 1103992: Wrong max Y calculated for stackedbars
1267       Changes FindDataLimits to calculate max Y correctly. It was counting
1268       the first Y value in each record twice, which is always wrong but
1269       only affected stackedbars because the Y values are summed.
1270
1271     * Fix for bug 1096199: Wrong error bar colors in DrawDotsError.
1272       Rewrites DrawDotsError to make it work like DrawLinesError to
1273       correctly increment the record and color indexes.
1274       Also fixes uninitialized x_now_pixels.
1275
1276     * Fix for bug 1096197: No borders on unshaded Draw[Stacked]Bars
1277       Unshaded Bars and StackedBars covered the border with the rectangle.
1278       The fix is to draw the rectangle, then the border.
1279
1280       NOTE: This fix changes chart appearance. Bars and Stacked Bars
1281       will now get a black border around each bar by default, if you
1282       turn off the 3D-shading. If you want borderless, unshaded bars
1283       you need to use SetDataBorderColors to set the data border colors
1284       to be the same as the data colors.
1285
1286     * Fix for bug 1333164: Negative data values, if string variables, result
1287       in unfilled bars. The problem was a string-to-string compare of a
1288       negative number with the empty string x_axis_position. Fixed by
1289       initializing x_axis_y_pixels to 0 if SetXAxisPosition was not used.
1290
1291
1292 2005-04-17 (afan)
1293     * Fix for bug [ 1161072 ] SetInputFile warning, background overwrite
1294
1295     * Bug 1182672 fixed
1296
1297 2005-04-15 (afan)
1298     * fix for bug: [ 1182666 ] Y Auto-scale rounds in wrong direction
1299
1300     * Fix for bugs 1144644 TrueType font path problems and 1106328 TTF
1301       path/filename inconsistency
1302
1303     * Fix Bug: [ 1117120 ] X Title sizing uses Y Title font height
1304
1305 2005-04-13 (afan)
1306     * Error in SetLineStyles() - does not accept an array argument
1307
1308
1309 2005-03-29 (afan)
1310     * Small typo fixed in SetYDataLabelPos
1311
1312     * Update SetDataLabelPos: For past compatibility we accept plotleft,
1313       ...but pass it to SetTickLabelPos
1314
1315 2005-03-26 (afan)
1316     * Change to line 3802: data lables now work with multiple bars with *$idx
1317
1318 2005-03-25 (afan)
1319     * Added Function DrawDataLabels to put data labels in world coords,
1320       added call from DrawBars and modified SetYDataLabelPos to flag
1321       whether or not to call DrawDataLabels.
1322
1323 2005-01-20 (migueldb)
1324     * Many bugfixes reported and solved by L. J. Bayuk. Thanks!
1325       + fixed bug #1096190
1326       + FindDataLimits(): fixed bug #1096192
1327       + CalcTranslation(): fixed bug #1101317
1328       + DrawImageBorder(): fixed bug 1096200
1329       + DrawXDataLabel(): fixed bug 1099879
1330       + DrawDots(): fixed bug #1096194
1331
1332 ===== Released as 5.0rc2 =====
1333
1334 2004-10-24 (migueldb)
1335     * array_merge_php4(): added to cope with the bug introduced by
1336         the change in array_merge() from PHP4 to PHP5 (I haven't verified this)
1337     * Fixed some divisions by zero, thanks to an old bug report.
1338
1339 2004-09-09 (migueldb)
1340     * SetPointSize(): deprecated
1341     * SetPointSizes(): added as replacement for SetPointSize().
1342       Now able to set point sizes on a per line basis.
1343     * SetPointShape(): deprecated.
1344     * SetPointShapes(): added as replacement for SetPointShape().
1345       Now able to set point shape on a per line basis.
1346     * DrawDot(): now needs record number to decide which dot shape and
1347       size to draw.
1348     * CalcMargins(): dirty fix for x data label placing.
1349     * tile_img(): fixed tile placement.
1350
1351 2004-06-14 (migueldb)
1352     * SetXTickLabelPos() and others: more on the bug reported by Jo Demol.
1353     * Fixed bug reported by Jo Demol.
1354
1355 2004-05-11 (migueldb)
1356     * SetBgImage(): added.
1357     * SetPlotAreaBgImage(): added.
1358     * SetInputFile(): deprecated.
1359     * DrawBackground(): now accepts images as backgrounds.
1360     * DrawPlotAreaBackground(): now accepts images as backgrounds.
1361     * tile_img(): internal method added.
1362
1363 ..........
1364 Editor's Note: For older changes to PHPlot, please see the CVS logs.