root/trunk/flowmon-web/charts/phplot-5.0.5/NEWS.txt

Revision 1, 15.7 kB (checked in by ixs, 16 years ago)

initial checkin of RH revision

Line 
1 This is the NEWS file for PHPlot, with release documentation.
2 The project web site is http://sourceforge.net/projects/phplot/
3 The project home page is http://phplot.sourceforge.net/
4 Refer the the ChangeLog file for detailed source changes.
5 -----------------------------------------------------------------------------
6
7 2008-01-13 Released 5.0.5
8
9 Overview:
10
11 This is the current stable release of PHPlot. The emphasis of this release
12 is to improve text positioning, margin calculation, and error handling.
13
14 Although this is considered a stable release, it has a large amount
15 of changed code compared to the previous release 5.0.4. Two of the more
16 complex components of PHPlot - text and margin calculations - were mostly
17 re-written in this release. You are advised to carefully test your own
18 applications with PHPlot-5.0.5 to see how your plots look. Refer to the
19 README.txt file included in the release for information on reporting problems.
20
21 Starting with this release, PHPlot no longer supports PHP4, since the PHP
22 group officially declared end-of-life for PHP4 as of 31 December 2007.
23 PHPlot-5.0.5 was tested only with PHP-5.2.5 and we are unlikely to address
24 any issues using PHPlot with older versions of PHP.
25
26 The PHPlot reference manual has been updated to match this release.  The
27 manual is available as a separate download from Sourceforge. The manual is
28 now also now available for on-line viewing at http://phplot.sourceforge.net
29
30 The callback feature added in 5.0.4 is now documented in the reference
31 manual. It is still considered experimental and subject to change, however.
32
33
34
35 Visible Changes and Possible Incompatibilities:
36
37 + Dropped support for PHP4.
38
39 + Eliminated remaining order-dependent behavior related to margins and
40 text. PHPlot should now do nothing at all, except record parameters, until
41 you draw the graph with DrawGraph. I believe this was always the intended
42 behavior of PHPlot, but over time perhaps various pre-calculations and
43 dependencies crept in. Fixing this simplifies processing and should lead to
44 more consistent behavior.
45
46 + The rewritten margin calculation code now uses actual sizes of all tick
47 and data labels and tick marks, rather than guesses. Margins collapse to
48 remove unused elements, but a minimum margin (currently fixed at 15 pixels)
49 is applied so the plot edges don't get to close to the image edges. The
50 result is that most graphs with auto-calculated margins will change in
51 appearance. It most cases, the margins get slightly smaller. In other
52 cases, earlier releases mis-calculated the margins, so this release will
53 produce much neater margins.
54
55 + The X and Y titles are now offset out from the plot area, not in from the
56 image area.  For auto-calculated margins this should not make any
57 difference, but if you use SetMarginsPixels or SetPlotAreaPixels to set
58 larger margins, the axis titles will move in closer to the plot with this
59 release.
60
61 + Changes were made to PHPlot internals, including removal of some class
62 variables and functions, and addition of new variables and functions.
63 These are documented in the ChangeLog. Relying on any internal variables
64 or functions in an application using PHPlot is unwise. The following
65 internal functions were removed:
66      SetImageArea() DrawDotSeries() DrawLineSeries() CalcXHeights()
67      CalcYWidths() DrawLabels() InitImage() DrawDashedLine()
68          These were marked 'deprecated', were undocumented and unmaintained.
69      TTFBBoxSize()
70          This was replaced with SizeText().
71
72 + Line spacing set with SetLineSpacing() now affects TTF text as well as
73 GD text. Previously, it only affected GD text. The default line spacing
74 happens to be usable for TTF text.
75
76 + Changes were made to error handling. PHPlot will now trigger a user-level
77 error after producing an error image, instead of exiting.  If no error
78 handler has been set, it will exit, as before. But now the error message
79 should also get logged, or written to the standard error stream, depending
80 on the SAPI in use.  You can now establish an error handler to catch most
81 PHPlot errors and do some cleanup before exit.
82
83 + PHPlot no longer accepts some invalid option values (such as a substring
84 of a valid value, or empty strings) passed to functions. If your
85 application aborts in CheckOption with PHPlot-5.0.5 but 'worked' with
86 previous releases, them you were probably using an invalid option value.
87
88
89
90 Bug Fixes in 5.0.5:
91
92 #945439: x_tick_label_height not set correctly
93   Exact sizes of labels are now used to calculate margins.
94
95 #1813070: Bad position for multi-line TrueType text
96   Fixed as part of text functions rewrite. Use correct basepoint
97   (lower left of each line) when positioning text lines.
98
99 #1813071: Wrong title height for multi-line TTF text
100   Fixed as part of text functions rewrite: calculate height of
101   multi-line text correctly. Also now uses the line-spacing setting.
102
103 #1813474: DrawText alignment arguments wrong
104   Fixed so 'top' and 'bottom' now have the usual meaning: top means
105   align top of text with reference, bottom means align bottom of text.
106   This was switched before. Changed every internal caller to compensate.
107
108 #1816844: Fix order dependency for setting titles
109   Defer processing of title strings until DrawGraph(),
110   so it doesn't matter if fonts, etc. are set before or after.
111
112 #1819668: Horiz. align multi-line text: GD vs TTF
113   The text functions were rewritten to draw TTF text line-by-line,
114   like GD text, and correctly align each line.
115
116 #1823774: Default Font Path and Error Message
117   Error handling has been improved to make sure a message is logged, in
118   addition to the error image, and use error_trigger rather than exit.
119
120 #1826513: FIXME in DrawLegend: Max label length
121   The actual size needed for legend text is now used.
122
123 #1827263: Spoiled up pie-chart if $val is close to zero
124   Fixed by skipping over any segment that rounds to 0 degrees of
125   arc. (The GD function uses integer angles only, and 0 degrees
126   means draw a complete circle.)
127
128 #1836528: Insufficient checking of parameter values
129   Rewrote validator function to reject improper parameter values.
130
131 #1843012: Make margins, drawing consistent
132   Margin code logic was rewritten and checked for consistency.
133
134 #1856207: Margin error with 'xaxis'/'yaxis' position
135   Margin space is now allocated for ticks and labels if their position
136   is 'xaxis' or 'yaxis' and the axis is at the plot edge. This is not
137   a perfect fix (the axis could be close but not at the edge).
138
139
140 -----------------------------------------------------------------------------
141
142 2007-10-20 Released 5.0.4
143
144 Overview:
145
146 This is the latest stable release of PHPlot. We are abandoning the 'rc'
147 version naming style, because we don't consider these last releases
148 'release candidate' versions. As we continue to make changes to PHPlot,
149 we are not converging toward a final "5.0" release, however we do consider
150 these releases stable and complete enough for production use.
151
152 This release fixes a number of problems and introduces a few new features.
153
154 The PHPlot reference manual has also been updated to match this release.
155 New material has been added documenting some of the PHPlot internals.
156 The manual is available as a separate download from Sourceforge.
157
158
159 Code Cleanup:
160
161 Some code cleanup is going in to this release. It is hoped that these
162 changes will not impact any existing scripts using PHPlot, but will make
163 the PHPlot code itself easier to understand and maintain.
164
165 PHPlot now avoids making changes outside its own class definition. There
166 are no longer any functions defined outside the class, nor any constants.
167 Three constants (MINY MAXY TOTY) were removed, and 2 functions were removed
168 (see Visible Changes below).  Also PHPlot no longer sets the PHP error
169 reporting level to E_ALL. Although we highly recommend setting error
170 reporting to E_ALL in your php.ini file or scripts, it is not right for
171 PHPlot to assume that you want it.
172
173
174 Visible Changes and Possible Incompatibilities:
175
176 Arrays containing color and style information are used with several PHPlot
177 functions to control the plot style array. These functions are:
178     SetPointShapes, SetPointSizes, SetLineWidths, SetLineStyles,
179     SetDataColors, SetDataBorderColors, and SetErrorBarColors.
180 The arrays passed to these functions MUST used sequential integer 0-based
181 indexes. This is what the PHP manual calls "Usual integer indices (starting
182 from zero, increasing by one)". This is the type of array you get in PHP by
183 default if you use array() without specifying key values, or use the
184 empty-bracket assignment operator to add values onto an array.  In previous
185 versions of PHPlot, some of these functions would also work with
186 string-indexed or non-sequentially-indexed arrays, but this was not clearly
187 defined. Starting with PHPlot-5.0.4, only arrays with "usual integer
188 indices" work, and other array indexes will cause errors.
189
190 Some internal-use-only functions have had their usage changed or been removed.
191 If you are using functions that are not documented in the PHPlot Function
192 Reference in the manual, your code may have to be changed.
193
194 As part of the code cleanup, two functions which were defined outside the
195 PHPlot class were removed: array_pad_array(), and array_merge_php4().
196 If your code used these, you need to fix your code.
197
198 The routines which accept a color name, value, or array now check for a valid
199 color name. If you specify a color name which is not in your current color
200 table, PHPlot will draw an error and exit. Previously, PHP would report an
201 index error, continue, and get a 'headers already sent' message.
202
203
204 Bug Fixes in 5.0.4:
205
206 #1813021: Miss-positioned right-justified vertical GD text.
207   Fixed DrawText() to correctly position 90 degree right-justified text
208   drawn in a fixed GD font. This could be seen with 90 degree Y tick labels.
209
210 #1790441 Removed destructor/shutdown function, and no longer recommend
211   using reference assignment when creating a PHPlot object. This was
212   interfering with memory usage.
213   Credit to annajilly for analysis.
214
215 #1779115 SetLegendWorld() failed because of undefined variables. The
216   required order dependency was too hard to meet. This is now fixed.
217   You can now use SetLegendWorld anywhere before DrawGraph.
218
219 #1726810 (feature request, but actually a bug fix) Ignore empty strings
220   as data labels when doing time or data label formatting. These would
221   previously produce errors or bad formatting. Now you can omit labels
222   as needed even with time and data formatting.
223   Credit to exgerhardr for finding this.
224
225 #1605555 Y data labels used wrong font and not formatted (bar charts only).
226
227 #1208054 Localization of number formatting in 'data' format type. PHPlot
228   will attempt to format the numbers in a way appropriate to your locale.
229   You can also force the formatting with the new function SetNumberFormat.
230   Credit to David Hernández Sanz.
231
232 #937944 X/Y Tick counts: PHPlot could draw one two few Y tick counts, and
233   one too many X tick counts. This is not a perfect fix, and more work is
234   needed here, but this fixes an error case in both X and Y values.
235
236
237 New Features in 5.0.4:
238
239 New function SetLegendStyle allows control of the alignment of text and
240   color boxes within the legend.  Also allows removing the color boxes.
241   Based on bug #1208054.
242   Credit to David Hernández Sanz.
243
244 New function SetNumberFormat. See bug report #1208054 above.
245
246 Callbacks are added. PHPlot can call back your functions while generating the
247   plot. This is experimental, and documented only in the file "Callbacks".
248   Credit to annajilly for the idea and design.
249
250 -----------------------------------------------------------------------------
251
252 2006-11-13 Released 5.0rc3
253
254 Overview:
255
256 This is an interim release. It has been a long time since the previous
257 release 5.0rc2, and there have been a lot of changes. There are still more
258 changes likely to go in before we have "5.0", but there are enough for now.
259
260 The PHPlot Reference Manual has also been released, and is available as a
261 separate download from Sourceforge. PHPlot users and developers are
262 strongly encouraged to read the manual.
263
264 This release does not include the "doc/" and "examples/" directories of
265 previous releases. The Reference Manual contains more complete and
266 up-to-date information and examples, and I am unable to maintain the doc/
267 and examples/ files while also maintaining the Reference Manual. If you
268 need those files, they can be accessed with the Sourceforge web CVS
269 browser.
270
271
272 New Features:
273
274 The emphasis for this release is bug fixing, so there are few new features.
275
276 + You can now suppress lines or points on individual plots in a linepoints
277   graph. This feature was added because I needed a graph with several
278   linepoints lines, but also with a solid line showing an "80% goal".
279   Use SetPointShapes with the value 'none' in the array to suppress the
280     point markers for that plot (and only draw the line).
281   Use SetLineStyles with the value 'none' in the array to suppress the
282     line for that plot (and only draw the point markers).
283   [Bug # 1594458]
284
285 + Bar charts can have data labels above the bar with the value. Turn
286   these on with SetYDataLabelPos('plotin'). This is somewhat experimental,
287   since there isn't a lot of room for labels on top of the bars and you
288   may find the results are not useful.
289
290
291 Visible Changes:
292
293 Here are the more significant changes in this release. These are changes
294 which may affect existing scripts and output from PHPlot.  See the
295 ChangeLog file for information about all changes and bug fixes.
296
297 + A bug fix on bar chart bar borders results in black borders around the
298   bars if shading is turned off. The border was previously covered up,
299   but was supposed to be there. If you need borderless, unshaded bars,
300   you need to use SetDataBorderColors to make the borders the same colors
301   as the bars. [Bug # 1096197]
302
303 + TrueType font pathname handling was fixed. You no longer need to use
304   SetUseTTF(True). You can either use full paths to the font files with
305   SetDefaultTTFont() and SetFont(), or you can call SetTTFPath() to point
306   to a directory of font files, and then use simple font filenames without
307   paths in SetDefaultTTFont() and SetFont().
308   [Bug # 1144644 plus several others]
309
310 + There have been several fixes regarding automatically calculated ranges
311   and scales. The result is that you may see less extra space and fewer
312   tick marks in some cases.
313
314 + A fix was made to bar and stackedbar graph bar widths in order to get
315   the X axis labels to properly center. As part of the fix, the bar widths
316   now match between the two graph types. (Before this fix, the bars were
317   narrower in bar graphs compared to the same data plotted as a stacked
318   bar.) As a result, bar graph bars will now be drawn with wider bars, and
319   stackedbar graph bars will be narrower. You can adjust this with the new
320   class variable bar_extra_space.     [Bug # 1437912]
321
322 + Dot shapes and sizes were off by 1 or 2 slots in the array of shapes or
323   sizes. After the fix, you may get different dot shapes or sizes per
324   plot line. [Bug # 1096194]
325
326
327 Testing:
328  
329 Since its output is visual (graphics), and it has so many interconnected
330 modes and options, PHPlot is difficult to test. But at least we are now
331 trying. I have a collection of PHPlot scripts (currently about 60) and a
332 script to run through them. The script automatically checks that:
333     1) Nothing was written to the standard error stream;
334     2) An image file of size greater than 0 was written;
335     3) Neither the test script nor PHPlot did exit(). This catches cases
336        where PHPlot aborts with DrawError().
337
338 The automated test is an easy way to check for serious regression, but you
339 really need to inspect the output files to validate PHPlot. This takes a
340 little time, and it is easy to overlook problems.
341
342 The real issue is test coverage. Just as we can be sure that future
343 PHPlot releases will pass the test collection, we can also be sure that
344 future bug reports will be written against untested cases.
345
346 --------------------
347
348 2006-11-08 PHPlot on Sourceforge has a new maintainer: lbayuk
349
350 --------------------
351
352 2004-10-24 Released 5.0rc2
353
354 --------------------
355
Note: See TracBrowser for help on using the browser.