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