1 23 Aug 2003 JpGraph 1.13_BETA2
2 ==============================
3 * [me] Added Gradient line fill for line plots. See gradlinefillex1.php
5 * [me] Fix bug #140. A rounding problem in Gradient fill which
6 in some circumstances could cause a 2 pixels overflow in the filling.
8 * [me] Added option to let the user setup if the PHP error handler should
9 give an image with the error message. Useful during development.
10 Controlled by the define INSTALL_PHP_ERR_HANDLER
12 * [me] Added method Legend::SetReverse() to reverse the order of plots in
15 * [me] Since the example directory is now getting to big the example directory
16 is now split into several subdirectories depending on Graph type.
18 * [me] Added more Gantt chart examples.
20 * [me] Adjusted size for filled circles (as used for example in markers). By a
21 type they were previously 2 pixels to large copared to what they were
24 * [me] Fix for annoyance #147, #150. Fine tuning of legend layout and positioning of
25 markers. It should now look even better with some better calculated margins
26 and general positioning that depends on the actual markers use for the plots.
28 * [me] Fix (bug?) #134. Don't output any coordinates for bar CSIM if the target is an
31 * [me] Fix bug #133. Fill colors for individual bars was not honoured when
32 used together with an accumulated bar.
34 * [me] Fix bug #136. Labels for 2D pie does not follow start label when
35 anti-alias is enabled.
37 * [me] Feature request #154. Make it possible to use object methods as
38 callbacks wherever callbacks can be specified in the library
40 * [me] Fix problem #152. Values for PiePlotC wasn't parsed for
41 printf-formatting. (A bug that was introduced with AntiAlising in 1.12)
43 * [me] Fix problem #148. Explode array was specified clockwise while slices
44 are specified anti-clockwise.
45 NOTE: THIS GIVES THE WRONG LOOK ON EXISTING 2D PIE PLOTS WITH EXPLODEDED
46 SLICES SINCE THE WRONG SLICE WIll NOW BE EXPLODED
48 * [me] Updated class reference
50 * [me] Make colors have the same order in both 2D and 3D pie plots
52 * [me] Added possibility to make PiePlot percentage adjustment so that
53 integer percetage will add up to 100%. This is done by the Hare/Niemeyer
54 method. To activate the percetage adjustment you need to specify labeltype
55 of 2, as in $pieplot->SetLabeltype(2),
57 * [me] Y2 scale can now add lines, texts and band through a single call to
58 Graph::AddY2() in exactly the same way as Graph::Add()
60 * [me] Make sure there are no direct calls to GD except through the Image class
62 * [me] Make it possible to rotate polar graphs 90 degrees with Set90AndMargin()
64 * [me] Major improvements in the Gantt charts.
65 1. Now support for minute and hour scale as well
66 2. Suport for multiple columns in the title field, you can now have (for
67 example) Start date, end date, duration etc
68 3. Improved sizing to make the overall image as small as possible
69 4. Make it possible to use builtin or file based icons in the title columns
70 5. Improved 3D look & feel
72 * [me] Added support for using country flags as image markers. This
73 is added by jpgraph_flags.php together with the image files *.dat
74 At the moment 229 countries are supported. See Example/listallflags.php
75 for a current list of supported countries. All flags are available in 4
76 standard original sizes, as markers they may also be arbitrary scaled.
77 For a simple example see Examples/markflagex1.php
79 * [ryleyb] Multiple constrains for Gantt graphs
81 * [me] Added possibility to use the Free Vera TTF font. The font is available
82 from http://www.gnome.org/fonts/
84 * [me] Make PHP deault error handler show image if possible
86 * [me] Improved look for image error handler (added icon)
88 * [me] Fixed problem with gradient backgrounds for horizontal
91 * [me] Added possibility of 'max' value position for bar graphs. This
92 positions the value just inside tha bar at the max value of the bar.
94 * [me] Font files are now fully specified in the setup and doesn't assume an
97 30 May 2003 JpGraph 1.12.2
98 ===========================
99 * [me & A. Tang] Added support for Chinese font and character handling.
100 This requires you to install the "simhei.ttf" Chinese font.
102 * [J Sweat] Fix bug [#124] Make step line style ignore NULL values in data
104 * [J Sweat] Fix bug [#123] Divide by zero for line length of zero for dashed lines
106 * [me] Fix bug [#109]. Problem with pie color when a supplied color array
107 contains more colors than data. For anti-aliased images that meant that
108 the last n colors was used and not the first n colors.
110 * [me] For plotmarks that use the ALT string the wrong value was in due
111 to the recent addition of both Y and X value to control the plot callback.
112 This has now been fixed so that it will work as before and that previous
113 code that assumes one parameter in their ALT srting will see the Y-value at
114 the plotmar. New is also that the X-value is given as a second
115 parameter. This means that the ALT string can display both the Y and X value
116 for a specific point.
118 * [me] Make it possible to disable individual plot legends through the method
121 * [me] Fixed problem with SetTextTickInterval() together with grouped bars
124 * [me] Fixed a problem with shadows on accumulated bar plots (bug #111)
126 * [me] Fixed Legend::SetMarkAbsSize()
128 * [me] Add error check for the case that the server (Windows)
129 doesn't support SystemRoot and TEMP server variables.
131 * [me] Fix short-open-tags bug that made it's way into 1.12.1 (bug #121)
133 * [me] Make sure we only pass integers into GD when positioning texts.
135 * [me] Always treat "" (empty string) as NULL for bar plots
137 * [me] Allow links from vertical position 0 on gantt charts
140 12 Apr 2003 JpGraph 1.12.1
141 ==========================
143 * [me] Added Legend::SetLineSpacing() to control the vertical line
144 distcance (in pixels) between legend texts.
146 * [me] Compensate for bug in imagecopyresampled() in GD 2.01.
147 This made clipping unusable with GD 2.01
149 * [me] Added LinePlot::SetFillFromYMin() to make the fill start from
150 the bottom of a Y-scale with negative values rather than the 0-value
151 which is now the case.
153 * [me] Fix a problem with legend box layout in the case of TTF fonts
154 and different lengths of individual texts. The layout engine now
155 work out each column individually. This will also give the legend
156 box the minimum possible size.
158 * [me] Compensate for possible bug in strtok() when parsing color
159 specification as a string with adjustment factors.
162 06 Apr 2003 JpGraph 1.12
163 ========================
164 * [me] Added possibility to specify the position of the legend box
165 with absolute pixels coordinates not only as fractinos as before.
167 * [me] Improved legend layout. It is now possible to specify
168 the number of columns in the legend box. The preferred way of
169 specifyin the layout is now Legend::SetColumns(). The oild
170 way with SetLayout() is still available for backwards compatibility
171 reasons. The old vertical layout corresponds to a 1 column
172 layout (SetColumns(1) which is also the default).
174 * [me] Added possibility to specify text string position
175 using scale coordinates onto the plot by adding
176 Text::SetScalePos(). The autoscaling has been modifyied to
177 be aware of the text scale positions.
179 * [me] Added builtin images for plotmarks. This also meant a
180 refactoring exercise for the PlotMark class and it has now been
181 split in sevaral files.
183 * [me] Added footer capability to Radar, Pie and Gantt charts
185 * [me] Improved upon rounding problem with GD2 and pie slices
188 * [me] Take shadow color as specified with Graph::SetShadow() into account.
190 * [me] Don't rotate the footer if the graph is rotated.
192 * [me] Added Axis::HideLabels()
194 * [me] Adjusted of the automatic margin calculation so that it is
195 aware of when the x-axis have been hidden.
197 * [me] Added PlotMark::SetCallbackYX(), This allows for the
198 specification of a callback function which is given both X and Y
199 coordinates. Also extended the returned values from the callback so
200 that image in a marker can be dynamically modified both size and
201 actual image file used. This will enable the use of advanced
202 "push-pin" graphs. For example adding markers to a background image
203 map of certain size and type.
205 For backwards compatibility any callback specified with
206 PlotMark::SetCallback() will not be given the extra parameter. So
207 old code does not need to be changed.
209 * [me] Fixed handling of PHP array URL parameters with CSIM. [Bug #82]
211 * [me] Added Legend::SetFrameWeight() which adjusts the frame around
212 the legend. Legend::SetLineWeight() now works as documented and sets
213 the line weight for the markers instead.
215 * [me] Autoscaling will now also take the value of added lines into account.
217 * [me] Fixed problem with horizontal legend box becomming too small
220 * [me] Radar plot. SetColor() always sets a fill color. Fixed (Bug #83)
222 * [me] Added SetWidth() for tab-title. The tab can now easily extend
223 over the entire plot width. Added SetPos() as synonym in tab title
226 * [me] Gradient bar plots now show a gradient mark in the legend
228 * [me] PiePlot3D::SetSliceColors() now more correctly specifies the
229 color anti-clockwise. The same order that slices are drawn.
231 * [me] Pie position can now also be specified in absolute pixels
232 in PiePlot::SetCenter()
234 * [me] Added Bevel frame for entire graph
236 * [me] Added possibility for some more advanced Graph title
237 formatting through the Graph::SetTitleBackground() method.
239 * [me] Type safe comparison in auto-detection of GD version
241 * [me] Added Graph::SetCanvasColor() to specify the background color
242 the canvas is initialized with.
244 * [me] Fine tuned label positiong for pie labels and made 3D pies
245 take the specified labels into account.
247 * [me] Added Anti-aliasing to Pie charts. Looks good but it really
248 slows down the pie generation. Enable by acalling
249 PieGraph::SetAntiAliasing()
251 * [me] Ignore NULL values in Stock and bar plots
253 * [me] Some minor internal adjustments for rounding in log scales.
256 2 Feb 2003 JpGraph 1.11
257 =======================
258 * [Martijn] Compensate for GD 2.x bug in filledarc() which doesn't
259 like negative angles.
261 * [me] Added Graph::SetBackgroundGradient() . This allows
262 a gradient to be used as a background. The gradient can either fill
263 the whole frame, only the margin or just the plot area. See the
264 class reference or the manual for details regarding this method.
266 * [me] Modified adjustment factor for colors so that it now
267 is linear between dark and light, i.e. a factor of 1 is the original
268 color, a factor of 0 is black and a factor of 2 is white.
270 * [me] Added two new gradient style GRAD_LEFT_REFLECTION and
271 GRAD_RIGHT_REFLECTION
273 * [me] Some fine tuning of text layout in legend box
275 * [me] Radar plots can now have a background image and multiple
276 titles (sub-title, and subsub title).
277 Added RadarGraph::SetPos() as alias for
278 RadarGraph::SetCenter().
280 * [me] Fixed a small pre-read-loop error which could casue the
281 X-gridline to be outside the right edge of the plotarea if the
282 X-scale was indented.
284 * [me] Added possibility to use (scaled) images as markers by
285 introductin the new mark type MARK_IMG.
287 * [me] Added tab titles for graphs. See class reference and Example
290 * [me] Added filled grids by adding method Grid::SetFill(). This new
291 feature is illustrated in example filledgridex1.php. Documented in
292 section 6.2.11 in the manual.
294 * [me] Improved automatic margins so they adapt to one or more title
297 * [me] Fixed a class hierachy bug. RotImage::DashedLine() should not be
298 implemented but rather rely on the Image::DashedLine() since the
299 rotation will happen in the RotImage::Line() which gets called in
300 Image::DashedLine() by any istance of RotImage().
301 You could see the ffect of this by trying to create a 90 degrees
302 rotated graph with dashed gridlines, they would appear not to be
303 rotated at all where in fact they were rotated twice.
305 * [me] Added automatic default margins when using Set90AndMargin()
307 * [me] Added Box plots which is a variant of Stock charts with the
308 possibility to add the median as a horizontal line in the box.
310 * [me] Added Stock charts, (aka candle-bars) as new class StockPlot().
311 added example stockplotex1.php in the Example directory.
313 * [me] Added two new axis styles AXSTYLE_YBOXOUT, AXSTYLE_BOXIN which
314 suplicates the Y-axis on both sides but not the X-axis.
316 * [me] Set90AndMargin() now also adjusts the label alignment on the
317 axis to suit the rotation.
319 * [me] Added class LineErrorPlot which alolows a line plot to
320 have error bars (+/- delta error).
322 * [me] Added Ticks::SetSize()
324 * [me] Modified size for plot mark circle so it will have the
325 specified width as radius and not as diameter.
327 * [me] Added Ticks::SetSize() to be able to set the absolute size
328 in pixels of the tick marks.
330 * [me] Default directories for Fonts and Cache now gets set
334 13-Jan 2003 JpGraph 1.10.1
335 ==========================
337 * [me] Fix bug in Band pattern Left diagonal and Right Diagonal where
338 the drawing was incorrect when width < height
340 * [me] Take the border on/off switch into account for line AddArea()
342 * [me] Added color parameter to Axis::SetTickLabels() to make it
343 possible to set individual colors on labels.
345 * [me] Fixed PiePlot::SetSliceColor() so that colors are now specified
346 in the same order as slices.
348 * [me] Gantt, Radar and Canvas graph now also considers the special file
349 _IMG_HANDLER (returns the actual image handler and doesn't stream
352 * [Christian Reiser] Pie graphs can now also return the IMG_HANDLER
354 * [Richard Black] Removed case sensitivity for extension of
355 background images. Added support for handling file names with
356 multiple '.' characters in the path for background images.
358 * [me] Added error check for imagettfbbox() since it can give
359 a file not found error even though both file_exists() and
360 is_readable() reports that the file exists and is readable
361 in the case when PHP basedir restriction is in place.
363 * [me] Corrected CSIM handling in Gantt for non-file based
366 * [me] Note to self: 1.10p
368 * [me] Gracefully handle the abnormal case where no valid data points
369 is included in the Y-data array when creating a line plot.
371 16-Dec 2002 JpGraph 1.10
372 ========================
373 * [me] Added GanttGraph::CreateSimple() whihc is a utility method to
374 help create simple gantt charts with a minimum of code.
376 * [me] Added new plot (FieldPlot) type which handles field plots. This is
377 basically a variant of scatter plots where each point is represented
378 as an arrow which a specific direction (0-360 degrees).
380 * [me] Added Graph::SetY2OrderBack() to control of plots on Y2 should
381 be under (in z-order) te plots on Y. By default they are on top.
383 * [me] Avoided a potential 1-pixel off rounding problem if a user
384 supplies a non integer canvas width and height in the Graph() call.
386 * [me] Added two new formats for week scale in Gantt
387 charts. WEEKSTYLE_FIRSTDAYWNBR, WEEKSTYLE_FIRSTDAY2WNBR These
388 formats adds the weeknumber as well to displaying the date of the
389 start of the week. Also tweaked the auto-sizing of the Gantt charts
390 to adjust for the size of the text in the week scale.
392 * [me] Fixed wrong define in jpgraph_gantt.php for WEEKSTYLE_DAY2
395 * [me] Improvements on manual scaling. If a manual scale is specifed
396 (in the Graph::SetScale()) you are now longer required to specify a
397 major and minior tick interval (but of course you can still do it
398 with a call to Ticks::Set() ).
399 A suitable intervall will be automatically
400 caclulated in the same way as for autoscaling. By default the exact
401 limits for the scale as specified will be used. This means that
402 depending on the scale and tick intervall chosen the max value of
403 the scale may or may not fall on a major tick mark. If you want that
404 behaviour you need to call Scale::SetAutoTicks(). By using this call
405 you give the algorithm permission to slightly adjust the specified
406 min and max values (if needed) so that they wil fall on a even
409 * [me] Added error check if user tries to use SetTextLabelStart()
410 with a logarithmic scale (where it is undefined).
412 * [me] Default marker for scatter plots are now a filled square
414 * [me] Adjusted the x-axis labelling for a 1-pixel off limit. Which
415 sometimes (depending on the image size and scale) could cause a
416 linear scale's last label not to be shown.
418 * [me] Fixed bug report #40
420 * [me] Fixed positioning of caption for full odometers. (Bug #34)
422 * [me] Fixed spelling mistake in jpgraph_odo.php which casued
423 Odometer::SetLabelPos() to have no affect. (Bug #33)
425 * [me] Fixed an overzeoulous optimization which skipped both rotation
426 and translation for angle=0. Addresses (Bug #36)
428 * [me] Colors can now include an alpha channel specification as well.
429 The alpha channel is specified in the text string separated by a
430 a '@' , for example "red@0.5". The alphachannel is specified as a
431 fraction between 0.0 and 1.0.
433 * [me] Improved filled line plots so they now handle negative values
434 in a more standard way.
436 * [me] Added automatic detection of what version of GD is installed.
438 * [me] Aligned the order of legends and slices for pie and 3D pies so
439 that they now follow the more common order of clockwise slices with
440 legends from top to bottom.
442 * [me] Changed call to deprecated function SetLinePos() to SetLineSide()
444 * [me] Added clipping to generated plots. This means that if you have
445 plots (for example lines) which extends outside the scale range it
446 will be clipped. This might come in handy in for example balloon
447 plots. Clipping is enabled by default but can be controlled by a
448 call to Graph::SetClipping()
450 * [me] Fixed a problem with circles and filled circles when they were
451 rotated twice in a rotated graph. (Bugtraq #26)
453 * [me] Added Graph::Set90AndMargin() which helps for doing a 90
454 degrees rotation and getting the margins right. (Otherwise you have
455 to adjust them manually since height becomes width and width becomes
456 height when you rotate 90 degrees)
457 Changed the horizbar* examples to use the Set90AndMargin()
459 * [me] Changed the behaviour of plot marks in legends. The possible
460 format callback is no longer called. Instead the plotmarks are
461 set to a default size.
463 * [me] Added three more plotmarks MARK_LEFTTRIANGLE,
464 MARK_RIGHTTRIANGLE, MARK_FLASH. These new types are primarily meant
465 to be used with GanttCharts.
467 * [me] Added constrain lines to GanttCharts. It is now possible to
468 illustrate start-end, start-start, end-start and end-end
469 constrains. This is illustrated by adding lines with arrows,
470 Use GanttPlotObject::SetConstrain()
472 * [me] Added Image map support for Gantt chart. Bar and titles can now
473 have associated image map targets. Use GanttBar::SetCSIMTarget()
474 GanttBar::SetCSIMAlt() and for titles use
475 GanttBar::title::SetCSIMTarget() and GanttBar::title::SetCSIMAlt()
477 * [me] Fix problem in Gantt graph whereby the progress bar indicator
478 could extend over the end date if an explicit date scale was set.
480 * [me] By default logarithmic scale now print the labels as 10^3
481 instead of 1000. You can change the behaviour with the new
482 method for logarithmic ticks, SetLabelLogType().
483 Also added the possibility to have a callback for log scales
487 * [me] Added the possibility to specify a value > 1 as the position
488 for labels in PieGraph::SetLabel() to increase the margin between
489 the label and the edge of the pie.
491 * [Olaf Kandel] Fixed subtle bug in the printing of the month scale for the
492 case where the start and end month hjave the same number but
493 are on different year. This would cause the width for the
494 first month to be wrong.
499 * [me] Fixed defects #20 and #21 (spelling mistake and and one
500 overzelous last minute error check I added). I have to eat a lot
501 of humble pie over these ones. Sorry to all who have been affected.
502 What can I say? Human error........
506 * [me] Changed the way TTF fonts are handled. The font files are no
507 longer distributed with JpGraph due to potential copyright problem.
508 This change also has the advantage that it is now very
509 straigthforward to install new fonts whatever their naming
512 1. If you are running on a standard Windows system just point the
513 TTF directory to your standard font directory and use the available
516 2. If you are on a Unix system you can download the MS Core TTF
517 files from http://corefonts.sourceforge.net/. The old MS EULA allows
518 distribution of the fonts in unaltered form (Win EXE) and this
519 project exercises this right and provide tools to download and
520 install the fonts on a UNIX system.
522 * [me] Renamed this release from 1.8.1 to 1.9 due to the big
523 change in the handling of TTF fonts which breaks backward
524 compatibility due to the copyright problem with TTF fonts.
526 * [me] Improved the TTF pargagraph layout engine for consistency
527 in handling "\n\r" vs "\n". It is now always sufficient to
530 * [me] Adjusted the text positioning for StrokeBoxedText()
531 to use the new GetBBoxHeigh() and GetBBoxWidth().
533 * [me] Added Image::GetBBoxHeight(), Image::getBBoxWidth()
535 * [me] Once and for all fixed the handling of rotated TTF text by
536 adding Image::GetBBoxTTF() which returns the bounding rectangle
537 (which is not the same as the bounding box except for angle==0)
539 * [me] Added argument to Legend::SetColor() to make it possible
540 to specify both frame and font color.
542 * [me] Cosmetic adjustment of markers in legend so that they are
543 positioned exactly in the middle of the text string.
545 * [me] Corrected the positioning of TTF fonts when defining the
546 hotspot as 'bottom'. It could be up to 4 pixel off when using
547 texts that contained character that extended below the TTF
550 * [me] Added possibility to use a cache system with CSIM images
551 as well. The cache system is used slightly, slightly different
552 and require a call to the new method Graph::CheckCSIMCache()
553 This is unfortunately unavoidable due to the nature of CSIM in
554 HTML. The documentation is updated to deal with this. This also
555 added two more defines CSIMCACHE_DIR and CSIMCACHE_HTTP_DIR
557 * [me] Added CSIM (Client Side Image Maps) to legends, added
558 target and alt arguments to all Plot::SetLegend()
560 * [me] Added functionlity to pass on any URL arguments when using
561 StrokeCSIM() (Bug: #006)
563 * [me] Fixed so that Gantt charts can again have just the width
564 specified and have the height automtically sized. (This was a
565 regression introduced in 1.8) (Bug #005)
567 * [me] Added error check for return value from imaagecolorsforindex()
568 in Anti-aliased lines. In combination with GD2, no-true-color, a
569 true color background (ala JPG) this can fail since it gets a color
570 which doesn't exist (since it uses imagecolorat()).
572 * [me] Improved edges support in 3D Pies.
574 * [me] Changed Image::Polygon() so i now draws an open polygon and not
577 * [me] Legends for scatter plots no displays the mark used for
578 each scatter plot and not just a square with the correct
581 * [me] Fixed a small cosmetic problem in that horizontal legend
582 box was sometimes not wide enough and made a small adjustment
583 of the positioning of marks in the legend box for better
584 apperance. (Bug #0017)
586 * [me] Improved manual by adding linked TOC.
588 * [me] Added Bezier curve to canvas Shape class. Added Bezier canvas
589 example canvasbezierex1.php
591 * [me] Added Paragraph Alignment setting in Text::Align() as well to
592 avoid seprate call to Text::SetParagraphAlign()
594 * [me] Added Image::SetExpired() . By default the image now sends
595 back a couple of variants of "no-cache" headers to force the browser
598 * [me] Some serious speed improvments for 3D Pie plots. It can now be
599 up to 6000% faster (yes that's right 6000%!). This is the way I had
600 planned on doing it but for time reasons were pushed out of 1.8.
601 I have completely changed the algorithm that handles the individual
602 slices on the expense of a slightly more complicated implementation.
603 This means that there is no performance difference between 2D and
606 * [me] Fix bug for rotation of paragraphs (multi-line) texts.
607 A limitation for now is that rotated pargraphs always gets
608 paragraphs align "left". (Bug: #008)
612 * [me] Fixed a typo that had the strange affect that paragraph strings
613 which started with a number would have larger distance between the
614 individual lines since that number would be interpretated as the
617 * [me] Fixed a problem with marks getting out of sync if NULL values
618 are present in the line plot. (Bug #0018)
620 * [me] Scatterplot no skips NULL values instead of treating them
623 * [me] Added LinearScale::SetAutoMax() as complement to SetAutoMin()
625 * [me] Added LinearScale::SetAutoTicks() this makes it possible to
626 manually set a scale but still have the tick marks automatically
627 determined. By default this feature is off to keep old code
628 behave exactly the same as before. If this is enabled any
629 Ticks::Set() calls are ignored.
631 * [me] Added possibility to adjust the position of the displayed
632 value for bars via the BarPlot::SetValuePos() method. Added new
633 example example20.5 to demonstrate this.
635 * [me] Bugfix: Fixed color themes for 3D pie plot. The color array
636 was not wrapped around in the case where more slices (data points)
637 than colors is used. (Bug: #001)
639 * [me] Documentation is now 100% pure HTML and does not require
640 any PHP. Previously a PHP script was used to generate the
641 highlighted source used in the image/source frames. All this
642 is now pre-generated in the docs.
644 * [me] Position the values in a scatter plot in the center of the
645 plot mark by default (Setting align to 'center','center' and margin=0
647 * [me] Added LinePlot::SetBarCenter to make it possible to center the
648 line on the bars when combining a plot with both bars and lines.
649 The new example 'ceneterdlinebarex1.php' demonstrates this.
653 [19-Sep-2002] JpGraph 1.8
654 =========================
655 * [me] Added Text::SetPos() as alias for Text::Pos() to harmonize with
656 other setting methods.
658 * [me] Made Graph::Add() polymorphic. You can now use Graph::Add() to
659 add all plot objects and you don't longer have to use AddText(),
660 AddLine(), AddBand() and so on.
662 * [me] Added PiePlot::SetLabelPos(), added some more Pie examples.
664 * [me] Improved the API for class Text by adding SetShadow() to make
665 it more like the other objects. Extended Text::SetBox() with shadow
666 width and corner radius.
668 * [me] Added the possibility for Text object to use the new rounded
669 rectangles as the filled background.
671 * [me] Added possibility to add arbitrary labels inside the pie plot
673 * [me] Added special filename __IMG_HANDLER to make it possible to
674 have Graph::Stroke() return the image handler instead of stroking
675 the image to file (or stream it back).
677 * [me] Improve FilledCircle() to avoid moire-patterns in circle.
679 * [me] Added middle type pie plot
681 * [me] User specified values for the band position is truncated to the
682 min and max values of the axis.
684 * [me] Added possibility to use Text::SetMargin() for all the titles
687 * [me] Added SetSize() as synonym for SetWidth() for plot marks.
689 * [me] Updated some of the examples with more comments.
691 * [me] Fixed problem with with jpg background images wrongly being
692 loaded with imagecreatefromjpg instad of imagecreatefromjpeg
694 * [me] Corrected the positioning of individual titles for 3D
697 * [me] Added Text::SetMargin() to make it easy to have context
700 * [me] Added capability to have background images on Pie and 3D
703 * [me] Added method Axis::HideLine() which hides the axis line but
706 * [me] Fixed bug in Stroke::Text() where negative coordinates
707 wasn't properly handled. We must allow negative absolute
708 coordinates since these might be rotated/translated into
709 "real" screen coordinates. This fixes the bug, for example
710 in bar_csimex1.php where the first value of the bar wasn't
713 * [me] More adjustment of how the rounding takes place with
714 coordinates. This should now avoid all potential difference
715 between different graphic objects.
717 * [me] When you use automatic labelling on text scale it now starts
718 at 1 and not at 0. This makes more sense since most people (except
719 mathematicians) start counting from 1.
721 * [me] Example directory:
722 - Added more advanced canvas examples
723 - Updated all CSIM examples
724 - ~60 new example script which are used in the new documentation
726 * [me] Compensate for bug in imagettfbox() which return to small size for
729 * [me] Added jpgraph_canvtools.php which contain some utility classes for
730 use with canvas graphs.
732 * [me] DOCUMENTATION: The class reference is now included in the release.
734 * [me] DOCUMENTATION: Completely rewritten the original
735 Word-introduction to JpGraph to pure HTML. This will be a living
736 document that will be updated as time moves on. This is currently
737 considered "Beta" and more chapters need to be added but this is
740 * [me] Added full support for multiline legends. (See for example
741 nullvalueex01.php. Also improved the way lineplot with marks
742 are illustrated in the legend by adding the line underneth the
745 * [me] Added some utility classes to be able to draw DB schema for
746 DDDA. This is tailored for my DB abstraction layer (jpdb.php)
747 in DDDA but is generic enough to work in other circumstances as well.
748 The classes can be found in utils/misc/imgdbschema.inc
749 Please see (run) dbschema_ddda.php which shows how it looks
750 in a real life example.
752 * [me] Tweaked the positioning of TTF fonts and how the width and
753 height are determined. Making more carefull assumptions about
754 how the baseline is handled for individual lines of text.
756 * [me] Added class RectangleText() which makes it easier to work
757 with text inside a rectangle with rounded corner.
759 * [me] Added support for multi-line TTF paragraphs with paragraph
760 formatting. This was previously only supported for the builtin
761 fonts. All text object should now support fully formatted paragraphs
764 * [me] Added Image::RoundedRectangle() and
765 Image::FilledRoundedRectangle()
767 * [me] Added format callback to plot marks. This makes it
768 possible to individually adjust the plot marks depending
769 on it's specific data value. See balloonex1.php
771 * [me] Added some initial support for super script used for
772 scientific numbering, i.e properly print for example 10^2
773 where the 2 is in superscript. This is all handled by the
774 new class SuperScriptText(). Not yet used in the actual
775 labels drawing but will be added shortly.
777 * [me] Added a small tool mkgrad.php in the utils directory to
778 make it a breeze to create gradient squares which may be
779 used as background images.
781 * [me] Added footer class to graph. This makes it easy to have
782 left,center and right footers in your graphs.
784 * [me] Added subsubtitle to graphs
786 * [me] Improved/Changed the way you work with CSIM. This new method
787 makes it possible to generate CSIM without having to create an
788 intermediate image on disk.
789 Added Graph::StrokeCSIM(). Added new chapter in the docs on how to
792 * [me] Changed naming of Spider* to Radar* since SpiderGraph is a
795 * [me] Modified the automatic suppression of the first value of the
796 X-axis when the Y-axis have negative value so it don't happen
797 in the case where the X-axis is positioned at the minimum of
800 * [me] Fixed spelling error of BK* instead of the correct BG*
801 for the default settings of background image style.
803 * [me] Some internal code changes to RGB() class to make it easier
804 to use directly for external scripts.
806 * [me] Changed the behaviour of filled line plot so that they
807 don't go down to 0 for null values in the plot but instead
808 behaves like '-' for non-filed plots, just ignore them and
809 connect the previous and next point instead.
811 * [me] Fixed problem in integer scaling where it certain scale
812 combinations could generate floating point labels! Ooops..
813 (Affects IntCalcTicks())
816 [5-July-2002] JpGraph 1.7
817 ==========================
818 * [me] Removed the APACHE_CACHE_DIRECTORY define since it is
821 * [me] Added Image map functionlity for rotated bar graphs,
822 also added new example for this (bar_csimex3.php)
824 * [me] Made Ticks::SetPrecision() deprecated. Use SetFormatString()
827 * [me] Fixed problem with incorrect string being returned from
830 * [me] Allow Y2 axis to use "int" scale
832 * [me] Fixed problem with wrongly names framework function for
835 * [me] Fixed small problems with margins being slightly off for
838 * [me] Changed name of PlotMark::SetMarkColor() to PlotMark::SetColor()
841 * [me] Added example with "hidden" Y-axis.
843 [17-June-2002] JpGraph 1.7-BETA
844 ===============================
845 * [me] Added DisplayValue::SetFormatCallback() to make it possible to use
846 a user specified formatting callback routine.
847 (Note:: Yes, this is very nono-OO but the proper OO way, by forcing the
848 user to define a subclass of the plot class where the formatting method
849 is overridden will probably not fly with to many non-OO PHP peoples since
850 a callback is conceptually simpler.)
852 * [me] Added DisplayValue::HideZero(). Makes it possible to hide zero values
853 in labels, for example zero slices in pie's, (e.g. $pieplot->value->HideZero())
855 * [me] Added manual scaling to Gantt graphs, added example to illustrate
856 this, fixscale_gantt.php
858 * [me] Adding image maps for Y2 scale as well.
860 * [me] Fixed a small bug which made it impossible to use BRAND_TIMING with
861 Gantt charts. Enabling timestamping of graphs would give a "PlotArea to small"
864 * [me] Made a very small change to the AutoScaling algorithm to yield tighter
865 boundaries, i.e with the existing algorithm, depending on rounding problems
866 a plot which had a maximum value of, say 4, could get a autoscaling max
867 value of 5. Not a big problem (or hardly a bug) but not what I wanted.
868 All my 111 test cases works fine with the modification but I'm still
869 not convinced that this (very minor) adjustment is 100% (I can distinctly
870 remember that I had a good reason to do it the original way, I just can't
873 * [me] Graph titles may now have multiple rows. By default the lines will
874 be centered, but this may of course be adjusted by a call to, for
875 example, $graph->subtitle->ParagraphAlign('left');
877 * [me] Added class FuncGenerator() to make it easy to generate
878 function plots (both normal and polar). To illustrate this I have
879 added three new examples funcex1.php,funcex2.php,funcex3.php.
881 * [me] Added Axis::HideFirstLastLabel() to hide first and last label on
882 axis. This is usefull if we have a box around the plot area and we don't
883 want the labels to owerwrite the box (see funcex1.php)
885 * [me] Make sure GD2 variables is registred in $GLOABALS[]
887 * [me] Fixed bug in image maps for marks. Alt strings was incorrectly
888 indexed so it was only using values 0,2,4.. instead of 0,1,2,...
890 * [me] Added Graph::SetAxisStyle(). This makes it easy to use
891 a few number of preset axis setup. For example duplicating the axis
892 as a border around the plot. Preset axis position availabel are
893 AXSTYLE_SIMPLE, AXSTYLE_BOXIN, AXSTYLE_BOXOUT
895 * [me] Made Axis::SetTickLabelMargin() deprecated. Use
896 Axis::SetLabelMargin() instead. Name change to make it more
897 consistent with the other margin settings.
899 * [me] Made Ticks::SetSide() a synonym for Ticks::SetDirection()
900 to make it consistent with side setting for labels and values.
902 * [me] Added Axis::HideZeroLabel() as a shortcut for
903 axis->scale->ticks->SupressZeroLabel()
905 * [me] Internal code changed. Replace the use of FontProp in SpiderGraph
906 with Text() and some additoinal code cleanup.
908 * [me] Adjusted Image::Arc() so that no negative angles are
909 passed on to GD imagearc() since it barfs at negative angles.
911 * [me] Added PiePlot3D::SetHeight() which is used to specify the
912 height in pixels of the 3D pies instead of using the default
915 * [me] Pie plots (both 2D and 3D) now displays the slice labels
918 * [me] Added two more Examples. barintex1.php shows how to use
919 integer scale and barscalecallbackex1.php shows how to use
920 a callback function for formatting the scale.
922 * [me] Modified grace calculation for Integer scale to have higher
925 * [me] Restructured code so class DateLocale is now in jpgraph.php
926 rather than in jpgraph_gantt.php. Also added $gDateLocale as a
927 global instance of the class DateLocale
929 * [me] Modified integer autoscale to correctly handle very small values
930 (needs special handling of max==1 to avoid fraction)
932 * [me] Changed the way min value is extracted when finding the baseline
933 for bar plots. Now uses the function Scale::GetMinVal() instead of
934 reading the value directly fomr the instance variable. This makes it
935 work better with logscales so that the bar starts from the min value
936 of the log scale. Also added check in bar PreStrokeAdjust() to see if
937 we are using a log Y-scale to automatically adjust the Y-base.
939 * [me] Optimized Stroke() loop for LinePlot so calls to PlotMark::Stroke()
940 will only be done if the marks are really to be shown.
942 * [me] Added Axis::SetLabelAlign().
944 * [me] Made some internal modifiaction on how Axis title gets aligned
945 to make it possible to specify it manually without having it
946 automtically set. This makes it possible to generate nice
947 horizontal bar graphs.
949 * [me] Added three examples in the Example directory on how to make
950 horizontal bar graphs.
952 * [me] Don't always set Y-axis position automtically
954 * [me] Add Text::SetAngle() as synonym for SetOrientation()
955 Added SetLabelSide() as synonym for SetlabelPos()
957 * [me ]Make it possible to manually specify the alignment of the textstring
958 for the title position. This makes title looks nicer with horizontal
961 * [me] Allow Y-axis labels to be at an angle
963 [14-May-2002] JpGraph 1.6.3
964 ===========================
966 * [me] Added functionality to make AccBarPlot::SetAbsWidth() work in
969 * [me] LinePlot::SetColor() no longer sets the color of the plotmark.
970 The problem that some people had was that if you set the mark color
971 specifically first and then unsuspecting called SetColor() for the
972 line the color for the plotmark circumference would also be set making
973 it look like the PlotMark::SetColor() didn't work.
975 * [me] Improved the functionality of GanntGraph::SetDateRange() to make
976 it possible to display a section of the graph.
977 (In previous version it was a checked error if you tried to plot
978 a graph where any activity bar was outside the specified area.
979 This is now changed to only cap the bars to the area.
980 This makes it more suitable to handle big gantt charts
981 which now can be split into several images to show different
982 parts of the projects)
984 * [me] Added GanttScale::SetWeekStart() to set the start of week to an
985 arbitrary day. For example SetWeekStart(0) will make the weeks start
986 on Sunday, SetWeekStart(1), Monday and so on.
988 * [me] Fixed a rounding error in Gantt chart that could cause the week
989 start day to off by one.
991 * [me] Modified the Min() and Max() methods for AccLineBar's to avoid
992 them overestimating the max value. (Basically now using the same
993 methods as in AccBarPlot)
995 * [me] Added missing code to do percentage calculation for 3D Pies so
996 they work the same way as the 2D Pies.
998 * [me] Added error check for the case where the image is so small that
999 the available plot area becomes to small.
1001 * [me] Compensate for a PHP bug (#12474) in strtotime() which can affect
1002 Gantt chart so that the same month name is shown twice.
1003 See http://bugs.php.net/bug.php?id=12474
1005 * [me] Compensate for the documented shortcomming in my
1006 3D Pie algortitm whereby a small exploded slice close to 270 degrees
1007 get's slighthly nagged at tha base due to the fact that the z-order
1008 stroking algorithm is only perfect if the slices are not exploded.
1011 [20-April-2002] JpGraph 1.6.2
1012 =============================
1014 * [me] Slightly adjusted LinearTicks::Stroke() to better handle som
1015 potential rounding problems.
1017 * [Thomas George] Added LinePlot::AddArea() which makes it possible
1018 to just fill part of a line plot (a part that is specified with a
1019 start and end x-point)
1021 * [Thomas George] Fixed bug with missing coordinate when using filled
1022 line plot with step style.
1024 * [me] Added client side image maps to scatter and line plots
1026 * [me] Fixed problem with warning "IMG_ARC_CIRCLE not defined" when
1029 * [me] Removed test with is_null() in jpgraph.php to make JpGraph 1.6.2
1030 work with older versions of PHP (especially 4.02).
1033 [07-April-2002] JpGraph 1.6.1
1034 =============================
1036 * [me] Modified autoscaling for the case where all values are equal to
1037 make the min/max difference larger.
1039 * [me] Fixed bug in 3D pies for certain data values
1041 * [me] Fixed bug with images maps assuming that slices
1042 where order anti-clockwise and the new pie algorithm did them
1045 * [me] Added subtitle to Pie and Pie3D graphs.
1047 [02-April-2002] JpGraph 1.6
1048 ===========================
1050 * [me] Changed license to QPL
1052 * [me] Completely rewritten algorithm for 3D pies which gives MUCH better result. Will
1053 also allow exploded 3D pies.
1055 * [D. Reinbach] Better handling of filling line plot with negative
1058 * [me] Added LinePlot::StrokeDataValue() for easy handling of plotting
1060 * [Gyozo Papp,me] Real locales for Gantt chart. The locales now take a
1061 proper locale string (e.g. "en_UK", or "sv_SE") to get the real
1062 locales from the system. Note that this breaks the sc compatibility
1064 * [me] Removed jpgraph_dir.php and moved the directory settings back in
1065 jpgraph.php due to problems in PHP with nested includes and search
1068 * [me] Added possibility to show values for scatter plot by
1069 refactoring value support back into jpgraph.php Plot() class. This
1070 makes it easy for all subclasses that uses Plot() to add display
1073 * [me] Added possibility to use X-coordinates in Error plots
1075 * [me] Fixed missing LogScale::SetXLabelOffset(). This made it
1076 impossible to use linear plots with a log x-scale !!!
1078 * [me] Fixed bug so possible Y2 plots are also taken into account when auto
1079 scaling the X-axis. This could otherwise couse plots outside the
1080 scale when using Y and Y2 plots where Y2 plots had more data values.
1082 * [me] **********!!SC BREAK!!**************
1083 Aligned the way values are displayed on Bar graphs with line and
1084 scatter plots. The values to be displayed for these plots are now
1085 all accessed through the "value" property of the plot. For example
1086 $myBarPlot->value->Show();
1087 instead of the previous
1088 $myBarPlot->ShowValue();
1090 * [me] **********!!SC BREAK!!**************
1091 Aligned the way values are displayed in Pie plots with line and
1092 bar plots. You know use the "value" property in exactly the same way
1093 as in bars and lines.
1095 * [me] **********!!SC BREAK!!**************
1096 Aligned the way values are displayed in 3D Pie plots with line and
1097 bar plots. You know use the "value" property in exactly the same way
1098 as in bars and lines.
1100 * [me] Added possibility to display individual values in an
1101 accumulated bar graph in addition to the overall accumulated
1102 value. This is done as usual through setting the individual bars
1103 value property to what you want (size, color, format and so on)
1105 * [me] Added another default error handler which is image based to
1106 make it easier to see error messages when images are included
1107 in a page. This is now the default error handler.
1109 * [me] Added possibility to specify the location of the X-Axis
1110 to the top of the graph by using xaxis->SetPos("max") also
1111 added new Example topxaxisex1.php to demonstrate this feature.
1113 * [me] Added more 3D pie examples to demonstrate new functionlity.
1115 [01-March-2002] JpGraph 1.5.3
1116 =============================
1118 * [me] Make it possible to use JpGraph 1.5.3 with GD 1.8.x. In 1.5.2 I was
1119 using a function only available in GD 2.x.
1122 [29-Feb-2002] JpGraph 1.5.2
1123 ===========================
1127 * [me] Released the correct 3D pie file (By mistake I mixed the stable version with
1128 the development branch for 2.0 in the 1.5.1 release just to prove
1129 that I'm still human :-)
1131 * [me] Fixed out of bounds error when using shadows for bar graphs
1134 * [me] Fixed typo in DisplayValue::SetFormat()
1136 * [me] Fixed potential array out of bounds error in Plot::Min() and
1139 * [me] Fixed misplaced ')' in string construction in call to
1144 * [me] Added possibility to use "auto" file name when stroking
1148 * [me] Added tag 'title' to the image maps to make for better
1149 compatibility with Mozilla.
1151 * [me] Moved class LineProprty to jpgraph.php from jpgraph_gantt.php
1152 since it can be used in other modules as well.
1154 * [me]Added Text::GetTextHeight() which differs from
1155 Text::GetFontHeight() in that it takes the total text height
1156 (possible multiple lines) into account.
1158 * [me] Added Image::FilledArc()
1160 * [me] Added RotImage::SetTranslation()
1161 Added RotImage::Circle()
1162 Added RotImage::FilledCircle()
1163 Added RotImage::Arc()
1164 Added RotImage::FilledArc()
1167 [11-Feb-2002] JpGraph 1.5.1
1168 ===========================
1169 * [me] No longer treat a not set $y[0] value as an explicit error. Instead
1170 silently set $y[0] to 0.
1172 * [me] Changed "include" to "require" in jpgraph.php when including
1173 jpgraph_dir.php. This seems to fix the strange problem whereby
1174 the constants defined in jpgraph_dir.php didn't have a correct
1175 value in jpgraph.php.
1177 * [me] Fixed problem with correctly drawing of bars when all bars
1178 are negative. (Previously the baseline wasn't correctly handled
1179 since min/max values needs to be mirrored for negative bars)
1180 Note: Funny this problem has gone unnoticed so long.
1182 * [me] Fixed problem with doing gradient fill for negative bars.
1184 * [me] Fixed problem with autoscaling when there is a very small
1185 difference (< 0.00001) between min and max and when both min and max are
1186 negative. This might happen if you have a single negative value.
1188 * [me] Added labels for line graph. Each point my now also optionally
1189 display it's value on a line graph. Value are controlled trough
1190 class DisplayValue and it's instance in LinePlot.
1191 LinePlot->value->Show(),
1192 LinePlot->value->SetColor(),
1193 LinePlot->value->SetFont(),
1194 LinePlot->value->SetMargin(),
1195 LinePlot->value->SetFormat(),
1198 [27-Jan-2002] JpGraph 1.5
1199 =========================
1200 * [me] Fixed misnamed xmin variable in Min() for acc bars
1202 * [me] Added possibility to specify paragraph alignment for
1203 multi line text, i.e the text can be left,right or center aligned
1204 within it's bounded box. The lignment is set by the new method
1205 Text::ParagraphAlign()
1207 * [me] Changed position specification for text so that if the position
1208 is specified in range [0,1] it is interpreted as fraction of image
1209 height width and otherwise as absolute pixels.
1211 * [me] Added possibility to specify pie size (radius) both as a fraction and
1212 absolute size in pixels.
1214 * [me] Added possibility to tweak color specification by adding a
1215 saturation percentage, i.e you can specify color as "red:0.65"
1216 which means 65% of the red value (in other words 35% darker).
1218 * [me] Tweaked the estimation of number of segments to approximate an
1219 arc in Image::CakeSlice.
1221 [17-Jan-2002] JpGraph 1.5beta2a
1222 ===============================
1223 * [me] Fixed typo in Max() calculation for accumulated bar graphs
1224 which caused it to return wrong value.
1226 * [me] For Min() calculation for acc bars graphs take the user
1227 specified ymin into account.
1229 * [Peter Svistunov, me] Added Cyrillic unicode support through the
1230 global define LANGUAGE_CYRILLIC. This is also the start of a
1231 generic support for Unicode languages through the LanguageConv
1235 [15-Jan-2002] JpGraph 1.5beta2
1236 ==============================
1237 * [me] Rewrite of the pie-chart drawing algorithm. This version
1238 is slightly slower but avoids using GD floodfill function. This
1239 fixes problems with small slices not being filled completely. As
1240 an added bonus it is now possible to explode (and specify the
1241 explode radius) for all slices. It is also possible to draw the
1242 pie without having internal borders between the slices as well
1243 as turning on/off the border surronding the pie.
1245 * [me] Added graphic primitive CakeSlice() to the Image class.
1246 Used to simplify pie-drawing.
1248 * [me] Added more generic error handling. It is now possible to
1249 install your own error object with
1250 JpGraphError::Install(<name of error object>)
1251 The default error handler will just abort execution.
1253 * [me] Security whole in utility script for displaying source
1254 and image in frames fixed.
1256 * [Cedric Scheyder] Actively ignore hours in calculating Max/Min
1257 values for dates in Gantt charts to avoid problems in autoscaling
1258 when users specify start and end dates down to hours.
1260 * [Rick Widmer] Fixed problem in calculating min/max value when first
1261 Y-value was non-numeric.
1263 * [me] Fixed calculation of width and height of text with multiple lines.
1264 Multiple text lines (text blocks) should now be almost fully supported.
1267 [16-Dec-2001] JpGraph 1.5-BETA
1268 ==============================
1269 * Take "\n" into (some) account when calculating string height and width
1270 Text output now supports multiple lines better.
1272 * [me] Removed reference to global PHP_SELF, use HTTP_SERVER_VARS array
1273 instead. This makes JpGraph working with 'register_globals' turned
1276 * [me] Added some rudimentary check that GD is enabled before trying to
1279 * [me] Fixed silly cut-and-paste bug in AccBarPlot::Max() which could
1280 cause to small max values to be returned
1282 * [me] Added property 'title' to PlotMark. The title is printed in the center
1285 * [DanNY (dulcis28@hotmail.com)] Added JpGraph Logo. (Thanks!)
1287 * [me] Added jplintphp.php, jpgendoc.php, jplintdriver.php which are
1288 parsing, documentation and pretty printing tools I use to help
1289 me to documentation and find unused code.
1290 Tthat does some simple static analysis on PHP for silly mistakes
1291 that I do (Like using instance variables without qualifying them
1292 with "$this->" ) The tool also warns about unused instance variables.
1293 Since it also parses the classes and methods I use it to generate
1294 the documentation skeleton for the reference section.
1296 * [me] Added Gantt chart funcionality, jpgraph_gantt.php . See
1297 Gantt tutorial for help on usage.
1299 * [me] Added new Gantt tutorial
1301 * [me] Added BKIMG_CENTER, possibility to center the background image.
1303 * [me] Timeout function now also aplies when you generate an image
1304 off-line, i.e if the imagefile exist and is within the time window
1305 now file will be written.
1307 * [Rasmus Lerdorf] Added patch to make background images work with GD 2.x
1308 N.B GD 2.01 has bugs in handling TTF font with truecolor images which
1309 are fixed in 2.02 but that has (of this writing) still not been officially
1310 released. GD 2.x support in JpGraph is still to be considered experimental.
1312 * [me] Fixed some potential rounding errors in 2D Pie plot which in some
1313 circumstances might have caused a flood fill to escape. Also added check
1314 to better handle very small slices so we don't try to do a fill
1317 * [me] Slightly changed the internal design for band patterns.
1318 They are now created by a factory class instead. This makes it much easier
1319 to re-use and have maximum code reuse.
1321 * [me] Factored out some functionlity from Graph::Stroke() to make it possible
1322 to re-use some code in GanttGraph::Stroke()
1324 * [me] One more instance when PHP surprised me by thinking 0 == "-" aarrghhh
1325 Now I think (knock on wood) all problems with data points=0 should be solved
1327 * [me] Added '&' to the assignment in Graph::Add() This now lets you specify changes
1328 for lines, plots even after they been added to a Graph. But I'm not sure if this
1329 is really such a good ide because you will have problem if you write code
1333 $myplot = new LinePlot(.....);
1334 $graph->Add($myplot);
1337 Since this will not work the way you think (why?) Because the same
1338 reference to the variable $myplot will be used for all additions and
1339 hence the graph will only have multiple instances of the last added
1340 LinePlot(). Have to think of this and what is the best way. (I will
1341 probably never get used to PHP references....)
1344 [11-Nov-2001] JpGraph 1.4
1345 ==========================
1347 -------------------------------------------------------------------------------------
1348 * [me] Enabled E_NOTICE warnings in my PHP installation and found a couple of
1349 glitches (harmeless out-of-bound in two loops) which is now corrected.
1350 * [me] Fixed problem in line plots where y-value==0 wasn't drawn. (Once again
1351 bitten by the fact that in PHP the following is true: ""==0)
1352 * [me] Fixed color specification for bars when initialized as an array of colors
1353 * [me] Fixed color of bars using shadow which was advertedly set to shadow color
1354 * [me] Fixing incorrect color specification for legends using bars with color arrays
1355 * [me] Add check for sum=0 in pie plots to avoid divide by 0 problem
1356 * [me] Changed the stroke orderd for FilledRectangle() so that the shadow doesn't
1357 overwrite a line with weight > 1
1358 * [me] Fixed incorrect calculation of font height for titles which cause the
1359 subtitle to be to close to the title.
1362 -------------------------------------------------------------------------------------
1363 * [me] Added depth parameter (DEPTH_FRONT, DEPTH_BACK) for gridlines
1364 Graph::SetGridDepth()
1366 * [me] Added possibility to add static horizontal and vertical band with a
1367 pattern in the plot area. Graph::AddBand() Supports solid, diagonal,
1368 stright line, 3D-plane crosses (both diagonal/vertical) patterns.
1371 * [me] Added possibility to have static lines in the plot. This is now implemented
1372 with new class PlotLine and two new functions Graph::AddLine(),
1374 * [me] Added symbolic constants to specify background image types
1375 BGIMG_COPY, BGIMG_FILLPLOT, BGIMG_FILLFRAME
1377 * [me] Added extended label formatting through either
1378 Axis::SetLabelFormatString() C-style formatting string
1380 Axis::SetLabelFormatCallback() A callback function that are given the value to be displayed
1381 and should manipulate the value as it likes
1383 The use of the old style digit precision variable will be deprecated from next version.
1385 * [me] Added error check if supplied Y-data has unspecified value at index 0 to avoid
1386 out of bounds error when corrupted data is sent in to JpGraph.
1388 * [me] Added possibility to specify image depth for gridlines. You can now specify
1389 Graph::SetGridDepth() as DEPTH_FRONT or DEPTH_BACK. Depending on if you want
1390 the gridlines at the back of in front of your plots.
1392 * [me] Added possibility to specify Cache file name as "auto". In this case the
1393 image file name will have the same name as the scriupt that generates the
1394 image with the extension of the automtically generated graphic format.
1395 NOTE: You will get the wrong extension using this feature at the same
1396 time as specifying a different graphic format thne the automatically choosen
1399 * [me] Added some more advanced examples for impuls drawings impulsex3.php and
1402 * [me] The values on top of bars can now be at an angle and the horisontal
1403 position now account for if a shadow is present.
1405 * [me] Added filename to Graph::Stroke() which makes it easy to output an image
1406 directly to a file _without_ streaming it back to the browser. Usefull for
1409 * [me] Added new tutorial for bar graphs
1411 * [me] New scale type "int". This gives a normal linear scale but restricts
1412 ticks (and labels) to integer values. Can be used for both X and Y scales.
1414 * [me] Added subtitle to graph
1416 * [me] Added possibility to specify an array of X-coordinates with bar plots to
1417 position individual bars on the X-scale. Makes it much easier to combine
1418 bar plots with other types of plots, (line, scatter etc)
1420 * [me] Extended utility adjimage.php to allow it to manipulate color saturation.
1422 * [me] Added Image::AdjSat() to allow manipulation of the color
1423 saturation in the image. This also makes it very easy to change the image
1424 to greyscale (just set saturation=-1).
1425 Extended Graph::AdjImage() and Graph::AdjBackgroundImage()
1426 to include new parameter for saturation value.
1428 * [me] Added BarPlot::SetAlign() which makes it possible to align
1429 bars relative the tickmark for linear and int scale
1431 * [me] Added possibility to absolutely set the width of bars. This will
1432 override the automatically decided with based on the scale and tick distance
1435 -------------------------------------------------------------------------------------
1436 * [me] Legend color for scatter plots now becomes the fill color of the mark
1438 * [me] Impulsplots now anchors at Y-value = 0 if the y-axis contains both negative
1439 and positive values. Otherwise it will go to the lowest value on the Y-axis.
1441 * [me] Bar shadows is now connected to bars to make for a stronger 3D effect.
1443 * [me] Removed all deprecated references and usage of FONT0, FONT1, FONT2. Note
1444 You can no longer use these. Instead use FF_FONT0, FF_FONT1, FF_FONT2 etc
1446 * [me] Text scale now starts default labelling at 0
1448 * [me] All plots internally adjusted to start at default X-coordinate 0 to harmonize better
1451 * [me] Graph->Stroke() now just returns instead of exit()
1453 * [me] Removed flag argument for BarPlot::SetShadow()
1455 * [me] Bar plots are know by default filled with lightblue
1456 unless otherwise specified.
1458 * [me] Changed the way bars are positioned for linear and integer
1459 scale for maximum flexibility when mixing barplot with other
1462 * [me] The ALT strings for all image maps now uses printf() syntax to display
1463 the actual value. If you have used this feature you must update your
1464 ALT strings, for example "val=%v" must become "val=%d" or whatever format
1467 * [me] Changed the formatting of bar graphs by changing the framework
1468 so that labels on the x-axis using a text scale is now independent
1470 This makes it possible to have the labels centered under each bar but have
1471 the tickmarks between the bars as most other commercial graph packages
1472 format these typw of graphs. Introduced Axis::SetTextLabelsInterval()
1473 Effects jpgraph.php, jpgraph_log.php and jpgraph_bar.php
1475 * [me] Renamed Axis::SetTextTicks() to Axis::SetTextTicksInterval() to make the name
1476 more descriptive. The old name is deprecated from this version on but will still
1477 work until 2.0 to keep compatibility.
1479 * [me] Cleaned up implementation of pie3d so it now inherits from pie to avoid
1480 a lot of duplicated code and easier maintainance. (A good example of the real
1481 life OO programming where you might not see the similarities between two classes
1482 until you fully implement them.) File size of jpgraph_pie3d.php has shrunk by
1485 [23-Sep-2001] JpGraph 1.3.1
1486 ===========================
1488 * [Michael Anthon] Added client side image maps to 3D pie plots
1489 * [me] Added possibility to better control the labeling of pie graphs with an optional
1490 label formatting string PiePlot::SetLabelFormat(), PiePlot::SetLabelType()
1491 This also makes it possible to have labels with the absolute value and not only the
1492 percentage. (same with pie3d)
1493 * [me] Added formatting capabilities for legends on pie and pie3d graphs. Can have the value
1494 automtically included (Se Examples/pieex6.php)
1495 * [me] Added some more examples, negbarvalueex1.php, scatterlinkex2.php, pie3d_csimex1.php
1499 Known bugs and omissions:
1500 - Client side image maps does not currently handle exploded pie graphs (just
1504 * [me] Fixed problem with positioning the displayed values for negative bars
1505 * [me] Fixed shadow for negative bars
1506 * [me] Fixed problem in Plot::Min(), PlotMax::Max() whereby zeros where not counted
1507 towards minimum since in PHP 0=="". This could sometimes cause strange autoscaling.
1508 * [Vitaly E. Ashmarin] Wrong arguments to imagejpeg() for combination of specified
1509 image quality and filename = ""
1510 * [John Milne] BarPlot::SetFillColor() fixed glitch in loop variable
1513 [13-Sep-2001] JpGraph 1.3
1514 =========================
1515 Note: I have to the best of my memory tried to give credit where
1516 credit is due. Howevever, since ver 1.2.2 I have received over 2000 mail about
1517 JpGraph with Questions/Suggestions/Improvments (and a few bug fixes) etc and
1518 I might have missed some in the process of going through these mails. The
1519 fault is completely my own and if you recognize some idea I have implemented
1520 something which you think you should have credit for please drop me a note and
1521 I will adjust the add you to the change notes.
1523 Known bugs and omissions:
1524 - The automatic value on bar graphs does not work well with
1525 negative bar graphs. (Quite easy to fix though..)
1526 - Client side image maps does not currently handle exploded pie graphs (just
1530 * SC (SOURCE COMPATIBILITY) BREAK !: If you want to rotate the image the parameter
1531 is no longer supplied directly in the call to Graph() but rather as a method
1532 call Graph::SetAngle(). I decided to make this SC break since I judged it more
1533 natural to supply the timeout value just efter the specified cache-file name
1534 in the Graph() call. Hopefully this will not hit to many people since my hunch is
1535 that few people uses the rotate function and it's very easy to fix those script
1539 * [michael@anthon.net] Corrected behviour of accumulated bar graph so it now
1540 diffrentiate between the accumulated positive and negative values.
1542 * [marko@fly.srk.fer.hr] Fixed Max() calculations for accumulated bar graphs
1543 where my original code was a little bit sloppy. (I simply took the max for
1544 each plot and added those and this might be more then the real maximum.)
1546 * [m.purgar@extracom.de] Spotting an incorrect "jpg" in the image where it should
1549 * [adam.blomberg@euroseek.net,patrik.johansson@euroseek.net] 3D-Pie filling
1550 problem for small slices due to the discrapency between GD arc() and the
1551 JpGraphs purely mathematical definition of an ellipse.
1553 * [delorme.maxime@free.fr] 2D-Pie Floodfill might "escape" for very small values of slices.
1555 * [et.al] Improved handling of 0:s vs "" values. This was necessary since PHP treats
1556 0 as "" the same in a number of situations and JpGraph needs to diffrentiate these
1557 two cases. This caused 0 data values to be treated as null values and not be inluded
1558 in (for example) autoscaling consideration.
1561 * [me] Added new global constant USE_CACHE which makes it possible to disable
1562 writing to the cache even if a filename is supplied in th Graph::Graph() method.
1564 * [me] Added LinePlot::SetStyle() to make it possible to make dashed, dotted etc
1565 lineplots. (See example1.2). Also adjusted legend to display the same style in
1568 * [michael@anthon.net, me] Added client side image maps for all types of bars
1569 and 2D pies with possibility to have the actual value shown in an ALT-tag.
1571 * [me] Added drop shadow (or rather "right-up" shadow) to bar graphs BarPlot::SetShadow()
1573 * [me] Added possibility to have the actual value of bar graphs displayed at top of graphs
1574 via BarPlot::ShowValue(), BarPlot::SetValueFont(), SetValueMargin(), SetValueColor()
1575 The format of the value is specified according to standard C printf() string formatting
1576 i.e. "val=%d" will for example print a string "val=13"
1578 * [me] Added possibility to adjust brightness and contrast for background image
1579 via the Graph::AdjBackgroundImage() method.
1581 * [me] Added possibility to adjust brightness and contrast in the finished image
1582 via the Image::AdjBrightContrast() method.
1584 * [me] Added possibility to just generate an image to a file and not stream
1585 it directly back to the browser. Added parameter $aInline to Graph::Graph()
1587 * [me] Added timout for cache, i.e if the image in the cache is older then
1588 the specified number of minutes (=0 never re-generate, -1 always regenerate)
1589 then re-generate the image. Just specify a timeout in minutes with a call:
1590 $mygraph->cache->SetTimeOut(10)
1592 * [me] Added possibility to use logarithmic scale for SpiderPlots. This also resulted
1593 in a little bit of internal cleanup in jpgraph_spider.php.
1595 * [me] Added SetWeight() method to class Ticks() for control of line thickness for ticks
1597 * [me] Added SetMarkColor method to class TIcks() which lets you specify different
1598 colors for major and minor tick marks.
1600 * [me] Added method RelTranslate() to LinearScale() and LogScale() classes which is used
1601 in Spider class. This makes a world to screen relative translation.
1603 * [me] Added possibility to link data points in a scatter plot with lines
1604 by the addition of method ScatterPlot::SetLinkPoints()
1606 * [me,john.milne@one2one.co.uk] Added possibility to have individual colors of
1607 bars in bar graphs by having BarPlot::SetColor() accept an array as argument.
1609 * [sergio@alsernet.es] Make it possibly to have x-tick labels to consist of two lines
1610 by inserting a "\n" separator in the text.
1612 * [CK1@wwwtech.de] Adding JPEG quality setting. This is done by adding
1613 a method SetQuality() to the img class. After creating a graph this can then
1614 be used as $mygraph->img->SetQuality($some_qvalue).
1615 Currently this only affects JPEG images.
1617 * [delorme.maxime@free.fr] Possibility to use different grace value for top and bottom
1618 of graph and not just a single value as in 1.2.2
1621 * [me] Changed group/permission handling for created files to better adjust itself
1622 to the way the local Apache user is setup
1624 * [me] The default for spider graphs is now NOT to be filled
1626 * [me] Allow all datapoints to be 0 which will set the scale to [0,1]
1628 * [me] Removed the need for a DIR_BASE variable
1631 [29-Apr-2001] JpGraph 1.2.2
1632 ===========================
1634 * Removed reference to non-existent property 'bypass' in class RotImg
1635 * Changed to allow the last X-gridline to be drawn (comparison with limit was '<'
1636 where it should have been '<=' )
1639 * Added possibility to use background image
1640 * Added possibility to use approximate color through the "USE_APPROX_COLORS"
1642 * Handling of diffrent form of "null values" for line graphs. An y-value
1643 can now be "" or "-". In the first case (a true null value) this mark
1644 will cause a disruption in the line graph to indicate that the value
1645 is undefined. In the other case specifying the value as "-" will cause
1646 the value to be ignored bu the line will still be drawn between the
1647 previous data point and the following. Neither of these cases will have
1649 * Added a fatal warning when no more colors can be allocated for the chosen
1653 * "Downgraded" anti-aliasing algorithm to use fewer color levels
1654 in the transition to avoid using up to much of the color palette
1655 * Cleaned up some of the code to not rely on PHP default initialization
1656 of variables. This will help those who have got warnings when they
1657 have had all error reporting enabled in php.ini (E_ALL)
1658 * Legends now show the plot mark (if defined) instead of just a square of
1662 * Thanks to kevin@pricetrak.com for suggesting the treatment of
1664 * Thanks to luca_n@hotmail.com for getting my attention to the warnings
1665 caused by relying on PHP default initialization of variables.
1666 (My installation had E_NOTICE disabled, hence I never got those warning myself.)
1669 [29-Mar-2001] JpGraph 1.2.1
1670 ===========================
1672 * When min and max values for autoscaling was equal this resulted in trying to calculate
1673 log10(0) = INF resulting in an infinite loop in LinearTicks::Stroke()
1674 * When autoscaling was used with only one data point it tried to calculate log10(0) = INF
1675 resulting in an infinite loop
1676 * fopen("xxx","r") should be fopen("xxx","rb") causes problems on windows system with IIS5
1677 * JPG streaming function was incorrectly called "imagejpg" should be "imagejpeg" (see the difference?)
1678 * Non existent color name in jpgraph_pie.php
1679 * Removed all deprecated forced references in function calls
1680 * The width of the surrunding box was not calculated correctly for internal bold font
1683 * Color themes for pie graphs
1684 * Beta release of 3D pie graphs
1685 * Added DIR_BASE as constant to make it possible to use one system wide copy
1686 of JpGraph. NOTE: This must be set to the directory where JpGraph is installed.
1689 * (ck1@wwwtech.de) (and a russian guy which I unfortunately lost the name of)
1690 for reporting the imagejpg spelling mistake
1691 * (ales.gregor@zps.skoda-auto.cz) for finding the binary file problem with IIS
1692 * Several people have reported the problem with autoscaling when all Y-values
1693 were equal. Thanks to you all for acting as my privet QA team!
1696 [18-Mar-2001] JpGraph 1.2
1697 =========================
1700 * Added "BRAND_TIMING" which give possibility to brand each image generated with
1701 the time (in ms) it took to generate the image.
1702 * Added Gradient Fill for bar graphs, The gradient fill allows 6 different styles.
1703 * Added Anti-aliasing for lines. Note drawing anti-aliased lines is 7-10 times
1704 slower then "normal" lines!
1705 * Added full TTF support. this means an internal SC break (Source Code Break). Normal JpGraph
1706 script should not be affected if you have used only publized "public" frunctions. The SC break is
1707 to allow uniform treatment of both internal fonts and TTF. This has been achieved by changing
1708 the parameter list for SetFont(). However, backward compatibility with the old naming conventions
1709 for internal fonts are kepot, e.g. SetFont(FONT1_BOLD) still works but is deprecated and will not
1711 * Added possibility to control font for title of Spider Axis through the added
1712 property 'title' to the axis in the spider graph.
1713 * Added 'SetColor()' in pie graphs as a shortcut to SetMarginColor() to set the background color
1714 * Added possibility to draw X-axis labels at arbitrary angle. Internal fonts only supports
1715 horizontal and verical.
1716 * Added possibility to draw boxed text at an angle
1717 * Added possibility to have different colors for axis and the labels on the axis by the addition
1718 of extra parameter to SetColor()
1719 * Added 350 more named colors.
1720 * Added canvas "fake" graph to make it easy to draw arbitrary graphics
1721 * Added SetCenter() method for line graphs.
1722 * Added SetGrace() for autoscaling purposes.
1726 * If you use a text-scale for X-axis the default labels now start at 1 instead of 0 since this is
1727 actually a counting scale and it makes more sense to start at 1.
1728 * Improved handling of bar-graphs with negative values.
1729 * Updated existing examples to use new format for SetFont()
1730 * Made it a critical error to specify a non existant font
1731 * Changed so that orientation for Text() is now given as an angle, i.e. SetOrientation(45). Old
1732 style of using SetOrientation("v") (for vertical) is deprecated. But will work until V2
1736 * Improved handling of computational effects on small values in scaling where a rounding error might cause the
1737 last label not to be drawn.
1738 * The position for the title of X-axis could in some cases be slightly different in first
1739 and second pass due to incorrectly determination of the X-axis labels font height.
1740 * Specifying an minimum Y-value for Y-axis on bar graphs could on rare occasions (combination
1741 of scale values and specified density of autoscaling ticks) cause a gap between the bottom of
1742 each bar and the X-axis.
1745 [18-Feb-2001] JpGraph 1.1
1746 =========================
1749 * Added Spider graphs
1751 * Added Scatter (and impuls) graphs
1752 * Added possibility to rotate plots an arbitrary angle
1753 * Added step style rendering to lineplot
1754 * Added Breseham circle drawing which gives better visual apperance
1755 then the built in Arc() in GD (on the expense of CPU and performance)
1756 * Improved Polygon and Rectangle drawing so that it will use line weight settings
1757 * Improved the visual appearance of lines with weight>1 by correctly calculating
1758 (angle wise) the endpoints and using a filled polygon to draw the line.
1759 Unfortunately it would require some real improvements in the GD library to really improve
1760 the visual appeance of lines with weight>1. This is as good as it gets without writing
1761 a low level pixe-by-pixel correct plotting. With my method you get it to look visually
1762 aestethic right in 90% of the cases with just 10% work.
1763 * Added MARK_FILLEDCIRCLE as new mark type. Note that due too the poor performance of the
1764 basic Arc() image primitive in PHP4 the circles isn't perfect circles, they tend to be a
1765 a little bit flat at multiples on PI/2.
1766 * Added the possibility to have a separate fill- and line- color for marks
1767 * Moved Class PlotMark from jpgraph_line.php to base in jpgraph.php since this class is also used
1769 * Made it a critical error to try to use Text X-scale with specified X-data points.
1770 Previously no warning was given for this non-defined state. (Using text scale with specified
1771 points really doesn't make sense.)
1772 * Made it a critical error to use unknown color rather than silently replacing it with black.
1773 * Updated documentation to reflect added capability
1778 * Fixed minor bug in Line() in which it didn't update the last point for use with
1779 subsequent LineTo() calls (forgotten $this->)
1780 * Eliminated assumptions in DashedLine() that x1<=x2 and y1<=y2 eliminates the
1781 potential pixel overshoot.
1782 * Fixed a serious bug in Line plot when used with a specified X-scale (not the normal default)
1783 since the X-coordinate wasn't read from the correct vector!
1784 * Fixed a serious bug whe using as specified X-scale since the maximum value for a plot
1785 wasn't correctly passed to the autoscaling.
1786 Note: The reason that these two bugs haven't been discovered previously is the fact
1787 that my test specs didn't include test cases to do with specified X-axis (I almost never ever use that).
1788 This has now been corrected and added to the test suit.
1789 * Fixed so the possible box around the plot area correctly honours the weight specified for it.
1792 [05-Feb-2001] JpGraph 1.0
1793 =========================