98 |
- |
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 |
See NEWS_part1.txt for older release documentation.
|
|
|
6 |
-----------------------------------------------------------------------------
|
|
|
7 |
|
|
|
8 |
2015-11-01 Release 6.2.0
|
|
|
9 |
|
|
|
10 |
=== Overview:
|
|
|
11 |
|
|
|
12 |
This is the current stable release of PHPlot. This is the first release
|
|
|
13 |
that will work with the upcoming PHP-7. This release also adds two new plot
|
|
|
14 |
types.
|
|
|
15 |
|
|
|
16 |
The PHPlot Reference Manual has been updated to match this release.
|
|
|
17 |
|
|
|
18 |
=== Cautions, Important Notes, and Compatibility Issues:
|
|
|
19 |
|
|
|
20 |
PHP-7 deprecated use of older-style class constructor method names, where
|
|
|
21 |
the constructor name matches the class name. The PHPlot class constructor
|
|
|
22 |
name in this release has been fixed to work with PHP-7. This release
|
|
|
23 |
also works with PHP-5.4, 5.5, and 5.6. However, there is a compatibility
|
|
|
24 |
issue with extended classes. This applies even if you are using PHP-5.
|
|
|
25 |
|
|
|
26 |
If you define a class which extends the PHPlot class, you must use this
|
|
|
27 |
syntax to call the PHPlot constructor from your class constructor:
|
|
|
28 |
parent::__construct(...); // Call parent class constructor
|
|
|
29 |
This syntax also works in previous releases of PHPlot. However, the
|
|
|
30 |
following syntax also worked in older releases, and will no longer work:
|
|
|
31 |
$this->PHPlot(...); // Do Not Use This to call parent class constructor
|
|
|
32 |
or: parent::PHPlot(...); // Do Not Use This Either
|
|
|
33 |
You must use the correct syntax parent::__construct() even if using PHP-5.
|
|
|
34 |
|
|
|
35 |
If you are using PHP-7 with PHPlot, here are a few other items to be aware of.
|
|
|
36 |
(Some of these affected the PHPlot test suite.)
|
|
|
37 |
|
|
|
38 |
+ PHPlot uses is_numeric() to check for missing points in the data array.
|
|
|
39 |
Starting with PHP-7, hexadecimal strings are no longer considered numeric.
|
|
|
40 |
This means if your data array contains the string "0x10", for example, PHPlot
|
|
|
41 |
will consider that to be the number 16 when using PHP-5.x, but will treat it
|
|
|
42 |
as a missing point with PHP-7. (Unquoted hexadecimal values are still numbers.)
|
|
|
43 |
|
|
|
44 |
+ PHP-7 no longer allows multiple function parameters with the same name.
|
|
|
45 |
A typical case which fails in PHP-7 is:
|
|
|
46 |
function myfunction($s, $unused, $unused); // Fails in PHP-7
|
|
|
47 |
This broke some PHPlot Test Suite scripts that implemented PHPlot callbacks
|
|
|
48 |
with unused parameters.
|
|
|
49 |
|
|
|
50 |
+ New objects cannot be assigned by reference. Very old versions of the
|
|
|
51 |
PHPlot Reference Manual had this syntax (and there may still be some old
|
|
|
52 |
versions out there):
|
|
|
53 |
$plot =& new PHPlot(600, 400); // Do not use &
|
|
|
54 |
|
|
|
55 |
+ Division by zero no longer results in E_WARNING, but you end up with one
|
|
|
56 |
of the special float values +INF, -INF, or NAN instead.
|
|
|
57 |
|
|
|
58 |
|
|
|
59 |
=== Bugs Fixed in 6.2.0:
|
|
|
60 |
|
|
|
61 |
Fixed bug #170 "replace eval() ...":
|
|
|
62 |
This was a request to remove use of eval() from SetDashedStyle(), because
|
|
|
63 |
eval() makes people nervous about security, and is not supported by some
|
|
|
64 |
Virtual Machines. Removed eval() by using a string template instead of a
|
|
|
65 |
code string for the dashed line pattern. There are no changes in usage or
|
|
|
66 |
behavior.
|
|
|
67 |
|
|
|
68 |
Fixed bug #172 "Fixes for PHP7":
|
|
|
69 |
This release now works with PHP-7 (currently pre-release). The constructor
|
|
|
70 |
name was changed; there were no problems with the rest of the code.
|
|
|
71 |
(Although several scripts in the PHPlot Test Suite also had to be fixed.)
|
|
|
72 |
Any class that extends PHPlot must now use the correct syntax to call the
|
|
|
73 |
parent constructor: parent::__construct(...). If they used the old syntax
|
|
|
74 |
$this->PHPlot(...) they will not work (even with PHP-5.x).
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
=== New features in 6.2.0:
|
|
|
78 |
|
|
|
79 |
Feature Request #55 "Method documentation in PHPDoc format":
|
|
|
80 |
PHPlot now uses "phpdoc"-style comments in the code, which apparently is
|
|
|
81 |
supported by some editors/IDEs. Note that the PHPlot Reference Manual does
|
|
|
82 |
currently make use of these comments.
|
|
|
83 |
|
|
|
84 |
Feature Request #56 "Hidden Y values when zero":
|
|
|
85 |
The request was for a way to hide Y label values when zero, but the
|
|
|
86 |
implementation is much more general. When using 'printf' label formatting
|
|
|
87 |
type, you can now specify 1, 2, or 3 separate format strings. These are
|
|
|
88 |
applied in the same way spreadsheets support cell format strings: which
|
|
|
89 |
format is used depends on the sign of the value.
|
|
|
90 |
|
|
|
91 |
Feature Request #57 "squarefilled plot type":
|
|
|
92 |
Two new plot types are added: 'squaredarea' and 'stackedsquaredarea'.
|
|
|
93 |
These are like area and stackedarea, but the edges are stepped like
|
|
|
94 |
'squared' plots.
|
|
|
95 |
|
|
|
96 |
Feature Request #58 "Data borders for area plot types":
|
|
|
97 |
After data borders support was added to the two new plot types 'squaredarea'
|
|
|
98 |
and 'stackedsquaredarea', this was extended to the existing, similar plot
|
|
|
99 |
types 'area' and 'stackedarea'. Data borders are off by default for all 4
|
|
|
100 |
plot types.
|
|
|
101 |
|
|
|
102 |
-----------------------------------------------------------------------------
|
|
|
103 |
|
|
|
104 |
2013-05-11 Release 6.1.0
|
|
|
105 |
|
|
|
106 |
=== Overview:
|
|
|
107 |
|
|
|
108 |
This is the current stable release of PHPlot. This release includes two new
|
|
|
109 |
plot type features (which were not completed in time to make it into
|
|
|
110 |
PHPlot-6.0.0).
|
|
|
111 |
|
|
|
112 |
The PHPlot Reference Manual has been updated to match this release.
|
|
|
113 |
|
|
|
114 |
|
|
|
115 |
=== Cautions, Important Notes, and Compatibility Issues:
|
|
|
116 |
|
|
|
117 |
There are no new compatibility issues in this release. However, if
|
|
|
118 |
upgrading from PHPlot-5.8.0 or older, please read the Cautions, Important
|
|
|
119 |
Notes, and Compatibility Issues from the PHPlot-6.0.0 release. Everything
|
|
|
120 |
there is still applicable.
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
=== Bugs Fixed in 6.1.0:
|
|
|
124 |
|
|
|
125 |
(none)
|
|
|
126 |
|
|
|
127 |
|
|
|
128 |
=== New features in 6.1.0:
|
|
|
129 |
|
|
|
130 |
Feature Request #47 "Extend horizontal plots to more types":
|
|
|
131 |
This feature request was mostly implemented in PHPlot-6.0.0, except for
|
|
|
132 |
horizontal error plots, which are now implemented. A new data type
|
|
|
133 |
'data-data-yx-error' is used for horizontal error plots of type lines,
|
|
|
134 |
points, and linepoints.
|
|
|
135 |
|
|
|
136 |
Feature request #52 "Box Plots":
|
|
|
137 |
A new plot type 'boxes' is added. This produces a Box Plot, which is used
|
|
|
138 |
to present a 5-number statistical summary of a data set.
|
|
|
139 |
|
|
|
140 |
|
|
|
141 |
-----------------------------------------------------------------------------
|
|
|
142 |
|
|
|
143 |
2013-04-03 Release 6.0.0
|
|
|
144 |
|
|
|
145 |
=== Overview:
|
|
|
146 |
|
|
|
147 |
This is the current stable release of PHPlot. This release includes a
|
|
|
148 |
significant rewrite how PHPlot automatically calculates the plot area range
|
|
|
149 |
and tick increments from the data points. A number of new features and bug
|
|
|
150 |
fixes are also included.
|
|
|
151 |
|
|
|
152 |
The PHPlot Reference Manual has been updated to match this release. A
|
|
|
153 |
previously-experimental feature to help create HTML image maps is now
|
|
|
154 |
fully documented in the manual.
|
|
|
155 |
|
|
|
156 |
|
|
|
157 |
=== Cautions, Important Notes, and Compatibility Issues:
|
|
|
158 |
|
|
|
159 |
There are some important compatibility issues you need to be aware of
|
|
|
160 |
before upgrading to PHPlot-6.0.0 from any previous version. Many scripts
|
|
|
161 |
will produce different-looking plots with PHPlot-6.0.0 compared to earlier
|
|
|
162 |
versions. This is mostly due to changes in the automatic plot range and
|
|
|
163 |
tick increment calculations. Also, some scripts may fail, if they access
|
|
|
164 |
PHPlot class internal variables (properties) which have been changed to
|
|
|
165 |
have 'protected' visibility. See the details below.
|
|
|
166 |
|
|
|
167 |
+ Plot range calculations changed
|
|
|
168 |
|
|
|
169 |
PHPlot-6.0.0 uses a completely new method to calculate each of the 4 limits
|
|
|
170 |
of the plot area which are not defined using SetPlotAreaWorld(). As a
|
|
|
171 |
result, most plots that don't use SetPlotAreaWorld() with all 4 coordinates
|
|
|
172 |
given will look different under PHPlot-6.0.0. The two most notable changes
|
|
|
173 |
are that PHPlot-6.0.0 will usually stretch the range to include zero (if
|
|
|
174 |
the range does not already include zero), and under most conditions will
|
|
|
175 |
ensure that the X axis and Y axis both start and end at a tick mark position
|
|
|
176 |
(even if tick marks and labels are not visible). See bug #101 below.
|
|
|
177 |
|
|
|
178 |
+ Tick increment calculations changed
|
|
|
179 |
|
|
|
180 |
PHPlot-6.0.0 uses a completely new method to calculate tick increments
|
|
|
181 |
along the X axis and Y axis. This only occurs if the tick increments have
|
|
|
182 |
not been set using SetXTickIncrement() or SetNumXTicks() for X, and
|
|
|
183 |
SetYTickIncrement() or SetNumXTicks() for Y. If you let PHPlot calculate
|
|
|
184 |
the tick increments, your plot will likely have fewer or more tick
|
|
|
185 |
intervals than before, and the tick increment will be different. In
|
|
|
186 |
general, PHPlot-6.0.0 makes much better choices for tick increment.
|
|
|
187 |
See bug #132 below.
|
|
|
188 |
|
|
|
189 |
+ Class variable visibility changed
|
|
|
190 |
|
|
|
191 |
Most PHPlot class variables now have 'protected' visibility, so they are no
|
|
|
192 |
longer accessible from scripts that use the class. If your script directly
|
|
|
193 |
accesses PHPlot class variables - other than those documented in the manual
|
|
|
194 |
for 'tuning' - your script will not work with PHPlot-6.0.0. This change was
|
|
|
195 |
necessary because some internal class variables change in each PHPlot release,
|
|
|
196 |
and it is impossible to maintain compatibility with direct access to all these
|
|
|
197 |
class variables. If your script breaks because of variable visibility changes,
|
|
|
198 |
please: (1) see if you can use a public PHPlot class function instead, or
|
|
|
199 |
(2) post a message to the PHPlot help forum explaining why you need access to
|
|
|
200 |
a particular class variable.
|
|
|
201 |
|
|
|
202 |
+ SetPlotAreaWorld() now validates arguments
|
|
|
203 |
|
|
|
204 |
Starting with PHPlot-6.0.0, the SetPlotAreaWorld() function checks non-NULL
|
|
|
205 |
arguments for validity. For both X and Y, it is required that min < max if
|
|
|
206 |
both are specified. If you have a script that calls SetPlotAreaWorld() with
|
|
|
207 |
max <= min for either X or Y, that script will now fail. On the other hand,
|
|
|
208 |
some valid cases where you specify only one end of a range would previously
|
|
|
209 |
fail and now work.
|
|
|
210 |
|
|
|
211 |
+ SetRGBArray() now validates argument
|
|
|
212 |
|
|
|
213 |
If you use SetRGBArray() to load a custom color map but pass an invalid
|
|
|
214 |
argument (not an array or one of the known keywords), PHPlot will now fail
|
|
|
215 |
with an error message. In previous releases, a default black/white color
|
|
|
216 |
map was loaded in that case, with no error reported.
|
|
|
217 |
|
|
|
218 |
+ Removed order dependency: number of ticks and tick increment
|
|
|
219 |
|
|
|
220 |
If you want to control the tick increments (rather than letting PHPlot
|
|
|
221 |
calculate them), you should set either the number of ticks (SetNumXTicks(),
|
|
|
222 |
SetNumYTicks()) or the tick increment (SetXTickIncrement(),
|
|
|
223 |
SetYTickIncrement()), but not both, for each axis. If you do set both,
|
|
|
224 |
PHPlot-5.8.0 and earlier will use the last setting you made, and ignore the
|
|
|
225 |
other. PHPlot-6.0.0 gives priority to the tick increment setting and
|
|
|
226 |
ignores the number of ticks, regardless of the order. (The new behavior is
|
|
|
227 |
consistent with the PHPlot design goal that you can use the various Set*()
|
|
|
228 |
functions in any order and get the same plot.)
|
|
|
229 |
|
|
|
230 |
|
|
|
231 |
=== Bugs Fixed in 6.0.0:
|
|
|
232 |
|
|
|
233 |
Fixed bug #101 Fix automatic Y range calculations":
|
|
|
234 |
PHPlot now calculates the Y (and X) ranges using a completely different
|
|
|
235 |
method, which is described in the manual. There are new functions to 'tune'
|
|
|
236 |
the algorithm used, and of course you can still set the range limits manually.
|
|
|
237 |
In most cases, PHPlot now makes much better choices for the plot range limits.
|
|
|
238 |
|
|
|
239 |
Fixed bug #132 "Improve tick interval calculations":
|
|
|
240 |
PHPlot now by default picks a tick increment which is 1, 2, or 5 times a
|
|
|
241 |
power of 10, for much more 'natural' results. There are alternate
|
|
|
242 |
algorithms for selecting a 'binary' (power of 2) or date/time-based tick
|
|
|
243 |
increment instead. Rather than simply dividing the plot range by 10, PHPlot
|
|
|
244 |
now selects a tick increment based on the above requirement and which
|
|
|
245 |
results in at least 8 (by default) tick intervals. Of course, you can
|
|
|
246 |
still specify the tick increment(s) directly.
|
|
|
247 |
|
|
|
248 |
Fixed bug #164 "Calculated defaults applied to subsequent plots":
|
|
|
249 |
This has been fixed for the cases of grid visibility, X data label angle,
|
|
|
250 |
and label format. A new bug #168 was written for a remaining issue with
|
|
|
251 |
label position defaults. This only apples when creating multiple plots on a
|
|
|
252 |
single image (overlay or side-by-side).
|
|
|
253 |
|
|
|
254 |
Fixed bug #165 "Missing axis labels on some empty plots":
|
|
|
255 |
In some cases, X axis labels would be absent for a plot with an empty data
|
|
|
256 |
array. PHPlot will now draw the axis labels even when the data array is empty.
|
|
|
257 |
|
|
|
258 |
Fixed bug #166 "Legend, UsePointShapes, and shape='none'":
|
|
|
259 |
PHPlot will now fall back to using a point marker in the legend when doing
|
|
|
260 |
a linepoints plot with a dataset using 'none' as the point shape (rather
|
|
|
261 |
than doing no marker at all). This only applies with SetLegendUseShapes(True).
|
|
|
262 |
|
|
|
263 |
Fixed bug #167 "Fails to find a default font on Ubuntu":
|
|
|
264 |
Ubuntu (via Debian) changed the installation path for the TrueType font
|
|
|
265 |
that PHPlot used as a default, causing font selection to fail. The new
|
|
|
266 |
font installation path has been added to the search list, and now PHPlot
|
|
|
267 |
can find the default TrueType font on Ubuntu.
|
|
|
268 |
|
|
|
269 |
|
|
|
270 |
=== New features in 6.0.0:
|
|
|
271 |
|
|
|
272 |
Feature request #29 "Finer control over plot element colors":
|
|
|
273 |
This was an open-ended feature request that is partially implemented and
|
|
|
274 |
now closed. New functions were added to control element colors. (Some other
|
|
|
275 |
functions were added in previous releases.) In PHPlot-6.0.0, these functions
|
|
|
276 |
were added: SetLegendBgColor() for legend background color;
|
|
|
277 |
SetLegendTextColor() for legend text color, and functions for pie chart
|
|
|
278 |
border colors (see feature request #46 below).
|
|
|
279 |
|
|
|
280 |
Feature request #45 "Control pie chart start angle":
|
|
|
281 |
Implemented with new functions SetPieStartAngle() and SetPieDirection().
|
|
|
282 |
The angle for the first segment, and the direction (clockwise or
|
|
|
283 |
counter-clockwise) can now be set for pie charts.
|
|
|
284 |
|
|
|
285 |
Feature request #46 "Control pie chart borders":
|
|
|
286 |
Implemented with new functions SetDrawPieBorders() and SetPieBorderColor().
|
|
|
287 |
Pie segment borders can now be on (default for unshaded) or off (default for
|
|
|
288 |
shaded), and the color can be set independent of other elements.
|
|
|
289 |
|
|
|
290 |
Feature request #47 "Extend horizontal plots to more types":
|
|
|
291 |
This is partially implemented. Horizontal lines, linepoints, and points plots
|
|
|
292 |
are now implemented. Error plot versions of those horizontal plot types are
|
|
|
293 |
not yet implemented, but will probably be in the next release 6.1.0 (with
|
|
|
294 |
the introduction of a new data type).
|
|
|
295 |
|
|
|
296 |
Note: In implementing feature request #47, the code for 'error' and
|
|
|
297 |
'non-error' versions of the 3 plot types above were merged. A side effect
|
|
|
298 |
of this is that data value labels (the labels within the plot area,
|
|
|
299 |
identifying the data value at each point) now work for error plots, if
|
|
|
300 |
enabled. However, the default label position at 90 degrees will be crossed
|
|
|
301 |
by the positive error bar. To avoid this, you can use the tuning variable
|
|
|
302 |
data_value_label_angle; for example setting it to 45 degrees.
|
|
|
303 |
|
|
|
304 |
Feature request #50 "Control legend colorbox borders":
|
|
|
305 |
Implemented with new function SetLegendColorboxBorders(). There are now 3
|
|
|
306 |
choices for the borders around color boxes in the legend: 1) use the 'text'
|
|
|
307 |
color (the default, and compatible with PHPlot-5.8.0 and older); 2) use
|
|
|
308 |
data border colors; and 3) disable the borders.
|
|
|
309 |
|
|
|
310 |
Note: Along with the implementation of feature request #50, a new function
|
|
|
311 |
SetDrawDataBorders() was added to control drawing the data borders on bars
|
|
|
312 |
and stackedbars plots. This supports having the same style (borders with
|
|
|
313 |
matching color, or no borders) on both the legend color boxes and the data
|
|
|
314 |
bars. The default is backward compatible: borders on unshaded plots, and
|
|
|
315 |
no borders on shaded plots.
|
|
|
316 |
|
|
|
317 |
Feature request #51 "Lines instead of colorboxes in legend":
|
|
|
318 |
Implemented with existing function SetLegendUseShapes(). PHPlot now has
|
|
|
319 |
the option of showing short line segments (with correct color and width) in
|
|
|
320 |
the legend, rather than color boxes. This applies to lines and squared
|
|
|
321 |
plots only.
|
|
|
322 |
|
|
|
323 |
-----------------------------------------------------------------------------
|
|
|
324 |
|
|
|
325 |
2012-04-06 Release 5.8.0
|
|
|
326 |
|
|
|
327 |
=== Overview:
|
|
|
328 |
|
|
|
329 |
This is the current stable release of PHPlot. This release adds several new
|
|
|
330 |
features, including the ability to generate "streaming plots" - a video
|
|
|
331 |
stream showing updated plot data.
|
|
|
332 |
|
|
|
333 |
The PHPlot Reference Manual has been updated to match this release.
|
|
|
334 |
|
|
|
335 |
|
|
|
336 |
=== Cautions, Important Notes, and Compatibility Issues:
|
|
|
337 |
|
|
|
338 |
There are no known compatibility issues in upgrading from PHPlot-5.7.0 to
|
|
|
339 |
this release. For issues with previous releases, see below in this file.
|
|
|
340 |
|
|
|
341 |
|
|
|
342 |
=== Bugs Fixed in 5.8.0:
|
|
|
343 |
|
|
|
344 |
Fix bug #3506408 "Data Label Lines vs new plot types":
|
|
|
345 |
Data label lines do work with bubble plots. This is now documented. Data
|
|
|
346 |
label lines did not work well with OHLC plot types. This was never documented
|
|
|
347 |
to work, and is now disabled.
|
|
|
348 |
|
|
|
349 |
|
|
|
350 |
=== New features in 5.8.0:
|
|
|
351 |
|
|
|
352 |
Feature request #3488042 "Display only some data value labels":
|
|
|
353 |
Custom label formatting functions now have access to the data point row and
|
|
|
354 |
column for data value labels, and to the row for axis data labels. You can
|
|
|
355 |
now filter or modify labels based on their position in the data array.
|
|
|
356 |
Documentation was updated.
|
|
|
357 |
|
|
|
358 |
Feature request #3501500 "Looping plot section (updating plot data)":
|
|
|
359 |
PHPlot can now produce "streaming plots", with updating data presented as a
|
|
|
360 |
Motion-JPEG stream. Documentation has been added to the reference manual.
|
|
|
361 |
|
|
|
362 |
Feature request #3515519 "Support object serialize/unserialize":
|
|
|
363 |
You can now serialize and unserialize a PHPlot object, subject to some
|
|
|
364 |
minor restrictions. Details are in the PHPlot Reference Manual.
|
|
|
365 |
|
|
|
366 |
-----------------------------------------------------------------------------
|
|
|
367 |
|
|
|
368 |
2012-02-25 Release 5.7.0
|
|
|
369 |
|
|
|
370 |
=== Overview:
|
|
|
371 |
|
|
|
372 |
This is the current stable release of PHPlot. This release includes several
|
|
|
373 |
bug fixes, new color controls for labels, a new feature for application-level
|
|
|
374 |
error handling, and an experimental feature for creating plot image maps.
|
|
|
375 |
|
|
|
376 |
The PHPlot reference manual has been updated to match this release.
|
|
|
377 |
|
|
|
378 |
|
|
|
379 |
=== Cautions, Important Notes, and Compatibility Issues:
|
|
|
380 |
|
|
|
381 |
This release includes a change in how the color is set for data value
|
|
|
382 |
labels. (These are the labels inside the plot area that identify the tops
|
|
|
383 |
of bars, for example.) This can change the color of some labels. See the
|
|
|
384 |
bug report "Wrong color for data value labels" below.
|
|
|
385 |
|
|
|
386 |
This release reverts a change from PHPlot-5.4.0 to stackedbars plots. It
|
|
|
387 |
affects plots with stacked bar segments of size 0 that are at the top or
|
|
|
388 |
end of a stack. Starting in PHPlot-5.4.0, a zero-size segment at the top or
|
|
|
389 |
end would result in a color 'cap' on the bar stack, using the data color of
|
|
|
390 |
the zero-size segment. In PHPlot-5.7.0 this has been fixed. This will
|
|
|
391 |
change the appearance of some stackedbars plots. See the bug report "Top
|
|
|
392 |
dropshadow [sic] of stacked bars..."
|
|
|
393 |
|
|
|
394 |
|
|
|
395 |
=== Bugs Fixed in 5.7.0:
|
|
|
396 |
|
|
|
397 |
|
|
|
398 |
#3396931 "Top dropshadow of stacked bars is always the same color":
|
|
|
399 |
PHPlot will no longer draw a color 'cap' at the top or end of a bar stack
|
|
|
400 |
if the last segment has a 0 value. (The term 'dropshadow' isn't correct.)
|
|
|
401 |
Drawing the color for zero-size segments started in PHPlot-5.4.0 as part of
|
|
|
402 |
the fix for bug #3296884, but the behavior was unexpected, so it was reverted.
|
|
|
403 |
In general, PHPlot will now ignore segments with size 0, and if a stack
|
|
|
404 |
contains all 0 values it will not be drawn. (The exception is if the axis is
|
|
|
405 |
moved.)
|
|
|
406 |
|
|
|
407 |
#3488064 "Pie label failures in locales with comma decimal":
|
|
|
408 |
Two work-arounds are implemented for what is essentially a PHP problem with
|
|
|
409 |
locales that use something other than a period (typically comma) for the
|
|
|
410 |
decimal separator. When formatting labels as type 'data', PHPlot loads the
|
|
|
411 |
locale settings to get the separator characters, but now it resets ('unloads')
|
|
|
412 |
the settings afterwards. This helps avoid an error seen in PHPlot-5.6.0 with
|
|
|
413 |
pie chart labels, where an incidental conversion of the label to a string
|
|
|
414 |
resulted in use of the comma separator, followed by PHP failing to convert
|
|
|
415 |
the number back to floating point because of the comma. The second
|
|
|
416 |
work-around is to avoid the conversion to string, in the case where the pie
|
|
|
417 |
label has a single value. Together, these work-arounds should prevent the
|
|
|
418 |
problem, but this is an imperfect fix.
|
|
|
419 |
|
|
|
420 |
#3486834 "Wrong color for data value labels":
|
|
|
421 |
PHPlot was using the 'title' color (SetTitleColor()) for data value labels,
|
|
|
422 |
which was wrong, as the title color is for the 3 plot title strings. PHPlot
|
|
|
423 |
will now use the general text color (SetTextColor()) for data value labels,
|
|
|
424 |
same as tick labels and axis data labels. This will change the appearance
|
|
|
425 |
of some plots. In order to help with the compatibility issue, 4 new
|
|
|
426 |
functions are introduced to control the colors of individual label types:
|
|
|
427 |
SetTickLabelColor(), SetPieLabelColor(), SetDataLabelColor(), and
|
|
|
428 |
SetDataValueLabelColor(). The defaults have been set up to be compatible
|
|
|
429 |
(except for data value labels). Details are in the PHPlot Reference Manual.
|
|
|
430 |
|
|
|
431 |
=== New features in 5.7.0:
|
|
|
432 |
|
|
|
433 |
#3442041 "Provide data for generating image maps":
|
|
|
434 |
An experimental feature has been added to allow a callback function to
|
|
|
435 |
process the coordinates of individual plotted data points. This is most
|
|
|
436 |
useful for generating an HTML image map for the plot. Refer to the text
|
|
|
437 |
file Imagemaps.txt included in the PHPlot release for details. Caution:
|
|
|
438 |
This is an experimental feature. It is subject to change, and not yet
|
|
|
439 |
documented in the reference manual.
|
|
|
440 |
|
|
|
441 |
#3481195 "Custom message image":
|
|
|
442 |
A new function DrawMessage() has been implement for special cases where you
|
|
|
443 |
need to display an image containing a message, rather than a plot. This
|
|
|
444 |
extends the PHPlot error reporting mechanism, and is intended for
|
|
|
445 |
application-level errors. More information and an example can be found
|
|
|
446 |
in the PHPlot Reference Manual.
|
|
|
447 |
|
|
|
448 |
|
|
|
449 |
-----------------------------------------------------------------------------
|
|
|
450 |
|
|
|
451 |
2012-01-02 Release 5.6.0
|
|
|
452 |
|
|
|
453 |
=== Overview:
|
|
|
454 |
|
|
|
455 |
This is the current stable release of PHPlot. This release includes
|
|
|
456 |
significant changes to pie charts. There are new ways to label pie charts,
|
|
|
457 |
and PHPlot does a better job calculating the size and positioning the labels.
|
|
|
458 |
|
|
|
459 |
The PHPlot reference manual has been updated to match this release.
|
|
|
460 |
|
|
|
461 |
|
|
|
462 |
=== Cautions, Important Notes, and Compatibility Issues:
|
|
|
463 |
|
|
|
464 |
Pie charts will change appearance when you upgrade to PHPlot-5.6.0 from any
|
|
|
465 |
previous release. This is due to changes resulting from bug #3403297,
|
|
|
466 |
described below. You may notice these changes:
|
|
|
467 |
|
|
|
468 |
1. The pie chart itself will usually be drawn larger, taking up more of
|
|
|
469 |
the image. This may result in interference with a plot legend.
|
|
|
470 |
|
|
|
471 |
2. Pie chart labels will be closer to the edge of the pie, if you are letting
|
|
|
472 |
the label positions default. If you are using SetLabelScalePosition() to
|
|
|
473 |
set the label positions, the results may vary even more.
|
|
|
474 |
|
|
|
475 |
3. Text alignment on pie chart labels will change.
|
|
|
476 |
|
|
|
477 |
4. World Coordinates are now undefined with pie charts.
|
|
|
478 |
|
|
|
479 |
If you are producing pie charts with PHPlot, you should review the output
|
|
|
480 |
of your scripts before using PHPlot-5.6.0 in production. If the output is
|
|
|
481 |
not acceptable, one or more of these steps might help:
|
|
|
482 |
|
|
|
483 |
1. If pie charts are too large, and/or interfere with a legend, try moving the
|
|
|
484 |
legend. Alternatively, use SetPlotAreaPixels() or SetMarginsPixels() to
|
|
|
485 |
limit the plot area. Note, however, that starting in this release PHPlot
|
|
|
486 |
sizes the pie so the labels fit inside the plot area too. You can control
|
|
|
487 |
this with SetPieAutoSize().
|
|
|
488 |
|
|
|
489 |
2. If you want labels positioned just outside the pie chart, do not call
|
|
|
490 |
SetLabelScalePosition(), or set the value to the default 0.5. If you want
|
|
|
491 |
labels just inside the pie, use 0.49. If you want labels to be about
|
|
|
492 |
half-way inside the pie, use 0.25. (In previous releases, PHPlot multiple
|
|
|
493 |
the label scale position by 1.2 before using it to position the labels,
|
|
|
494 |
but this was not documented.)
|
|
|
495 |
|
|
|
496 |
3. Your pie chart script will report errors if you use GetDeviceXY(),
|
|
|
497 |
SetLegendWorld(), or SetLegendPosition(...,..., 'world'). This is because
|
|
|
498 |
these functions require world coordinates, and world coordinates are not
|
|
|
499 |
defined for pie charts. (Previous releases did define a world coordinate
|
|
|
500 |
space for pie charts, but the values were meaningless.)
|
|
|
501 |
|
|
|
502 |
|
|
|
503 |
|
|
|
504 |
=== Bugs Fixed in 5.6.0:
|
|
|
505 |
|
|
|
506 |
#3403297 Pie chart sizing and label issues:
|
|
|
507 |
In addition to the fixes listed here, new features were added as a result
|
|
|
508 |
of this bug fix (see New features below).
|
|
|
509 |
|
|
|
510 |
+ Use both width and height of the pie when calculating its maximum size.
|
|
|
511 |
(The bug was that the pie diameter would be sized to fit in the smaller
|
|
|
512 |
of the image width and height. But a shaded pie is oval, so when the width
|
|
|
513 |
if the pie was sized to the height of the image, the pie was too small.)
|
|
|
514 |
|
|
|
515 |
+ Fixed the text alignment of pie labels so they extend more naturally
|
|
|
516 |
away from the pie chart (if outside the pie). (Don't just use center/center
|
|
|
517 |
alignment for all labels.)
|
|
|
518 |
|
|
|
519 |
+ Do not multiply the label scale position by 1.2 in the hope that this will
|
|
|
520 |
prevent labels from overlapping the pie. Use the label scale position
|
|
|
521 |
as intended, and take other measures to prevent label overlap (such as
|
|
|
522 |
fixing the text alignment).
|
|
|
523 |
|
|
|
524 |
+ Label positions along the bottom of the pie are now adjusted to account for
|
|
|
525 |
the pie shading depth.
|
|
|
526 |
|
|
|
527 |
+ Plot area borders now work with pie charts. Use SetPlotBorderType() to
|
|
|
528 |
enable them. The default is not to draw borders.
|
|
|
529 |
|
|
|
530 |
=== New features in 5.6.0:
|
|
|
531 |
|
|
|
532 |
A number of new features were added as a result of bug #3403297, described
|
|
|
533 |
above. The new features are:
|
|
|
534 |
+ Use the new function SetPieLabelType() to select the type of pie labels
|
|
|
535 |
to be displayed. Labels can show segment percentages, segment values,
|
|
|
536 |
string labels, or any other value using a custom function.
|
|
|
537 |
|
|
|
538 |
+ SetPieLabelType() also allows control over formatting of pie labels,
|
|
|
539 |
similar to the way X and Y tick and data labels can be formatted.
|
|
|
540 |
|
|
|
541 |
+ Plot labels can be suppressed with SetLabelScalePosition(0).
|
|
|
542 |
|
|
|
543 |
+ The aspect ratio of shaded pies can be controlled with a tuning variable
|
|
|
544 |
$pie_diam_factor. The default remains 0.5, making the pie height equal to
|
|
|
545 |
half its width.
|
|
|
546 |
|
|
|
547 |
|
|
|
548 |
|
|
|
549 |
#413925 Table of values:
|
|
|
550 |
This very old feature request was implemented by adding a new script to the
|
|
|
551 |
"contrib" directory. The data_table.php script contains a function to draw
|
|
|
552 |
a simple table of values on a PHPlot image. Examples are provided.
|
|
|
553 |
|
|
|
554 |
|
|
|
555 |
-----------------------------------------------------------------------------
|
|
|
556 |
For older releases, see NEWS_part1.txt
|