Version: $Id: changes.txt,v 1.8 2001/09/23 20:43:45 ljp Exp $ Changelog for JpGraph ===================== [23-Sep-2001] JpGraph 1.3.1 =========================== Additions: * [Michael Anthon] Added client side image maps to 3D pie plots * [me] Added possibility to better control the labeling of pie graphs with an optional label formatting string PiePlot::SetLabelFormat(), PiePlot::SetLabelType() This also makes it possible to have labels with the absolute value and not only the percentage. (same with pie3d) * [me] Added formatting capabilities for legends on pie and pie3d graphs. Can have the value automtically included (Se Examples/pieex6.php) * [me] Added some more examples, negbarvalueex1.php, scatterlinkex2.php, pie3d_csimex1.php pieex6.php Known bugs and omissions: - Client side image maps does not currently handle exploded pie graphs (just normal pie graphs. Bug fixes: * [me] Fixed problem with positioning the displayed values for negative bars * [me] Fixed shadow for negative bars * [me] Fixed problem in Plot::Min(), PlotMax::Max() whereby zeros where not counted towards minimum since in PHP 0=="". This could sometimes cause strange autoscaling. * [Vitaly E. Ashmarin] Wrong arguments to imagejpeg() for combination of specified image quality and filename = "" * [John Milne] BarPlot::SetFillColor() fixed glitch in loop variable [13-Sep-2001] JpGraph 1.3 ========================= Note: I have to the best of my memory tried to give credit where credit is due. Howevever, since ver 1.2.2 I have received over 2000 mail about JpGraph with Questions/Suggestions/Improvments (and a few bug fixes) etc and I might have missed some in the process of going through these mails. The fault is completely my own and if you recognize some idea I have implemented something which you think you should have credit for please drop me a note and I will adjust the add you to the change notes. Known bugs and omissions: - The automatic value on bar graphs does not work well with negative bar graphs. (Quite easy to fix though..) - Client side image maps does not currently handle exploded pie graphs (just normal pie graphs. IMPORTANT NOTICE: * SC (SOURCE COMPATIBILITY) BREAK !: If you want to rotate the image the parameter is no longer supplied directly in the call to Graph() but rather as a method call Graph::SetAngle(). I decided to make this SC break since I judged it more natural to supply the timeout value just efter the specified cache-file name in the Graph() call. Hopefully this will not hit to many people since my hunch is that few people uses the rotate function and it's very easy to fix those script that does so. Bug Fixes: * [michael@anthon.net] Corrected behviour of accumulated bar graph so it now diffrentiate between the accumulated positive and negative values. * [marko@fly.srk.fer.hr] Fixed Max() calculations for accumulated bar graphs where my original code was a little bit sloppy. (I simply took the max for each plot and added those and this might be more then the real maximum.) * [m.purgar@extracom.de] Spotting an incorrect "jpg" in the image where it should have been "jpeg" * [adam.blomberg@euroseek.net,patrik.johansson@euroseek.net] 3D-Pie filling problem for small slices due to the discrapency between GD arc() and the JpGraphs purely mathematical definition of an ellipse. * [delorme.maxime@free.fr] 2D-Pie Floodfill might "escape" for very small values of slices. * [et.al] Improved handling of 0:s vs "" values. This was necessary since PHP treats 0 as "" the same in a number of situations and JpGraph needs to diffrentiate these two cases. This caused 0 data values to be treated as null values and not be inluded in (for example) autoscaling consideration. Additions: * [me] Added new global constant USE_CACHE which makes it possible to disable writing to the cache even if a filename is supplied in th Graph::Graph() method. * [me] Added LinePlot::SetStyle() to make it possible to make dashed, dotted etc lineplots. (See example1.2). Also adjusted legend to display the same style in the legend. * [michael@anthon.net, me] Added client side image maps for all types of bars and 2D pies with possibility to have the actual value shown in an ALT-tag. * [me] Added drop shadow (or rather "right-up" shadow) to bar graphs BarPlot::SetShadow() * [me] Added possibility to have the actual value of bar graphs displayed at top of graphs via BarPlot::ShowValue(), BarPlot::SetValueFont(), SetValueMargin(), SetValueColor() The format of the value is specified according to standard C printf() string formatting i.e. "val=%d" will for example print a string "val=13" * [me] Added possibility to adjust brightness and contrast for background image via the Graph::AdjBackgroundImage() method. * [me] Added possibility to adjust brightness and contrast in the finished image via the Image::AdjBrightContrast() method. * [me] Added possibility to just generate an image to a file and not stream it directly back to the browser. Added parameter $aInline to Graph::Graph() * [me] Added timout for cache, i.e if the image in the cache is older then the specified number of minutes (=0 never re-generate, -1 always regenerate) then re-generate the image. Just specify a timeout in minutes with a call: $mygraph->cache->SetTimeOut(10) * [me] Added possibility to use logarithmic scale for SpiderPlots. This also resulted in a little bit of internal cleanup in jpgraph_spider.php. * [me] Added SetWeight() method to class Ticks() for control of line thickness for ticks * [me] Added SetMarkColor method to class TIcks() which lets you specify different colors for major and minor tick marks. * [me] Added method RelTranslate() to LinearScale() and LogScale() classes which is used in Spider class. This makes a world to screen relative translation. * [me] Added possibility to link data points in a scatter plot with lines by the addition of method ScatterPlot::SetLinkPoints() * [me,john.milne@one2one.co.uk] Added possibility to have individual colors of bars in bar graphs by having BarPlot::SetColor() accept an array as argument. * [sergio@alsernet.es] Make it possibly to have x-tick labels to consist of two lines by inserting a "\n" separator in the text. * [CK1@wwwtech.de] Adding JPEG quality setting. This is done by adding a method SetQuality() to the img class. After creating a graph this can then be used as $mygraph->img->SetQuality($some_qvalue). Currently this only affects JPEG images. * [delorme.maxime@free.fr] Possibility to use different grace value for top and bottom of graph and not just a single value as in 1.2.2 Changes: * [me] Changed group/permission handling for created files to better adjust itself to the way the local Apache user is setup * [me] The default for spider graphs is now NOT to be filled * [me] Allow all datapoints to be 0 which will set the scale to [0,1] * [me] Removed the need for a DIR_BASE variable [29-Apr-2001] JpGraph 1.2.2 =========================== Bug fixes: * Removed reference to non-existent property 'bypass' in class RotImg * Changed to allow the last X-gridline to be drawn (comparison with limit was '<' where it should have been '<=' ) Additions: * Added possibility to use background image * Added possibility to use approximate color through the "USE_APPROX_COLORS" constant * Handling of diffrent form of "null values" for line graphs. An y-value can now be "" or "-". In the first case (a true null value) this mark will cause a disruption in the line graph to indicate that the value is undefined. In the other case specifying the value as "-" will cause the value to be ignored bu the line will still be drawn between the previous data point and the following. Neither of these cases will have any mark drawn. * Added a fatal warning when no more colors can be allocated for the chosen graphic format. Changes: * "Downgraded" anti-aliasing algorithm to use fewer color levels in the transition to avoid using up to much of the color palette * Cleaned up some of the code to not rely on PHP default initialization of variables. This will help those who have got warnings when they have had all error reporting enabled in php.ini (E_ALL) * Legends now show the plot mark (if defined) instead of just a square of the right color. Acknowledgements: * Thanks to kevin@pricetrak.com for suggesting the treatment of pure NULL values. * Thanks to luca_n@hotmail.com for getting my attention to the warnings caused by relying on PHP default initialization of variables. (My installation had E_NOTICE disabled, hence I never got those warning myself.) [29-Mar-2001] JpGraph 1.2.1 =========================== Bug fixes: * When min and max values for autoscaling was equal this resulted in trying to calculate log10(0) = INF resulting in an infinite loop in LinearTicks::Stroke() * When autoscaling was used with only one data point it tried to calculate log10(0) = INF resulting in an infinite loop * fopen("xxx","r") should be fopen("xxx","rb") causes problems on windows system with IIS5 * JPG streaming function was incorrectly called "imagejpg" should be "imagejpeg" (see the difference?) * Non existent color name in jpgraph_pie.php * Removed all deprecated forced references in function calls * The width of the surrunding box was not calculated correctly for internal bold font Additions: * Color themes for pie graphs * Beta release of 3D pie graphs * Added DIR_BASE as constant to make it possible to use one system wide copy of JpGraph. NOTE: This must be set to the directory where JpGraph is installed. Acknowledgements: * (ck1@wwwtech.de) (and a russian guy which I unfortunately lost the name of) for reporting the imagejpg spelling mistake * (ales.gregor@zps.skoda-auto.cz) for finding the binary file problem with IIS * Several people have reported the problem with autoscaling when all Y-values were equal. Thanks to you all for acting as my privet QA team! [18-Mar-2001] JpGraph 1.2 ========================= Additions: ---------- * Added "BRAND_TIMING" which give possibility to brand each image generated with the time (in ms) it took to generate the image. * Added Gradient Fill for bar graphs, The gradient fill allows 6 different styles. * Added Anti-aliasing for lines. Note drawing anti-aliased lines is 7-10 times slower then "normal" lines! * Added full TTF support. this means an internal SC break (Source Code Break). Normal JpGraph script should not be affected if you have used only publized "public" frunctions. The SC break is to allow uniform treatment of both internal fonts and TTF. This has been achieved by changing the parameter list for SetFont(). However, backward compatibility with the old naming conventions for internal fonts are kepot, e.g. SetFont(FONT1_BOLD) still works but is deprecated and will not be valid from 2.0 * Added possibility to control font for title of Spider Axis through the added property 'title' to the axis in the spider graph. * Added 'SetColor()' in pie graphs as a shortcut to SetMarginColor() to set the background color * Added possibility to draw X-axis labels at arbitrary angle. Internal fonts only supports horizontal and verical. * Added possibility to draw boxed text at an angle * Added possibility to have different colors for axis and the labels on the axis by the addition of extra parameter to SetColor() * Added 350 more named colors. * Added canvas "fake" graph to make it easy to draw arbitrary graphics * Added SetCenter() method for line graphs. * Added SetGrace() for autoscaling purposes. Changes: -------- * If you use a text-scale for X-axis the default labels now start at 1 instead of 0 since this is actually a counting scale and it makes more sense to start at 1. * Improved handling of bar-graphs with negative values. * Updated existing examples to use new format for SetFont() * Made it a critical error to specify a non existant font * Changed so that orientation for Text() is now given as an angle, i.e. SetOrientation(45). Old style of using SetOrientation("v") (for vertical) is deprecated. But will work until V2 Bug fixes: ---------- * Improved handling of computational effects on small values in scaling where a rounding error might cause the last label not to be drawn. * The position for the title of X-axis could in some cases be slightly different in first and second pass due to incorrectly determination of the X-axis labels font height. * Specifying an minimum Y-value for Y-axis on bar graphs could on rare occasions (combination of scale values and specified density of autoscaling ticks) cause a gap between the bottom of each bar and the X-axis. [18-Feb-2001] JpGraph 1.1 ========================= Additions/Changes: ------------------ * Added Spider graphs * Added Pie graph * Added Scatter (and impuls) graphs * Added possibility to rotate plots an arbitrary angle * Added step style rendering to lineplot * Added Breseham circle drawing which gives better visual apperance then the built in Arc() in GD (on the expense of CPU and performance) * Improved Polygon and Rectangle drawing so that it will use line weight settings * Improved the visual appearance of lines with weight>1 by correctly calculating (angle wise) the endpoints and using a filled polygon to draw the line. Unfortunately it would require some real improvements in the GD library to really improve the visual appeance of lines with weight>1. This is as good as it gets without writing a low level pixe-by-pixel correct plotting. With my method you get it to look visually aestethic right in 90% of the cases with just 10% work. * Added MARK_FILLEDCIRCLE as new mark type. Note that due too the poor performance of the basic Arc() image primitive in PHP4 the circles isn't perfect circles, they tend to be a a little bit flat at multiples on PI/2. * Added the possibility to have a separate fill- and line- color for marks * Moved Class PlotMark from jpgraph_line.php to base in jpgraph.php since this class is also used with scatter plots. * Made it a critical error to try to use Text X-scale with specified X-data points. Previously no warning was given for this non-defined state. (Using text scale with specified points really doesn't make sense.) * Made it a critical error to use unknown color rather than silently replacing it with black. * Updated documentation to reflect added capability Bug fixes: ---------- * Fixed minor bug in Line() in which it didn't update the last point for use with subsequent LineTo() calls (forgotten $this->) * Eliminated assumptions in DashedLine() that x1<=x2 and y1<=y2 eliminates the potential pixel overshoot. * Fixed a serious bug in Line plot when used with a specified X-scale (not the normal default) since the X-coordinate wasn't read from the correct vector! * Fixed a serious bug whe using as specified X-scale since the maximum value for a plot wasn't correctly passed to the autoscaling. Note: The reason that these two bugs haven't been discovered previously is the fact that my test specs didn't include test cases to do with specified X-axis (I almost never ever use that). This has now been corrected and added to the test suit. * Fixed so the possible box around the plot area correctly honours the weight specified for it. [05-Feb-2001] JpGraph 1.0 ========================= * Initial release. [EOF]