From: Eric Bollengier Date: Thu, 10 Mar 2011 15:57:44 +0000 (+0100) Subject: bacula-web: Sync with Davide repos X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f0824473ef103dc2dfd623d0c8a2877598cd92b8;p=bacula%2Fbacula bacula-web: Sync with Davide repos --- diff --git a/gui/bacula-web/backupjob-report.php b/gui/bacula-web/backupjob-report.php index e868014344..51b7724042 100644 --- a/gui/bacula-web/backupjob-report.php +++ b/gui/bacula-web/backupjob-report.php @@ -1,109 +1,109 @@ -compile_check = true; - $smarty->debugging = false; - $smarty->force_compile = true; - - $smarty->template_dir = "./templates"; - $smarty->compile_dir = "./templates_c"; - $smarty->config_dir = "./configs"; - - $backupjob_name = ""; - $days = array(); - - // Get Backup Job name from GET or POST - if( isset( $_POST["backupjob_name"] ) ) - $backupjob_name = $_POST["backupjob_name"]; - elseif( isset( $_GET["backupjob_name"] ) ) - $backupjob_name = $_GET["backupjob_name"]; - else - die( "Please specify a backup job name " ); - - // Get the last 7 days interval (start and end) - for( $c = 6 ; $c >= 0 ; $c-- ) { - $today = ( mktime() - ($c * LAST_DAY) ); - array_push( $days, array( 'start' => date( "Y-m-d 00:00:00", $today ), 'end' => date( "Y-m-d 23:59:00", $today ) ) ); - } - // Generate Backup Job report period string - $backupjob_period = "From " . date( "Y-m-d", mktime()-LAST_WEEK ) . " to " . date( "Y-m-d", mktime() ); - // Last 7 days stored Bytes graph - $graph = new BGraph( "graph2.png" ); - - $days_stored_bytes = array(); - $backupjob_bytes = 0; - - foreach( $days as $day ) - array_push( $days_stored_bytes, $dbSql->GetStoredBytesByJob( $backupjob_name, $day['start'], $day['end'] ) ); - - // Calculate total bytes for this period - foreach( $days_stored_bytes as $day ) - $backupjob_bytes += $day[1]; - - $graph->SetData( $days_stored_bytes, 'bars', 'text-data' ); - $graph->SetGraphSize( 400, 230 ); - - $graph->Render(); - $smarty->assign('graph_stored_bytes', $graph->Get_Image_file() ); - - // Getting last 7 days stored files graph - $graph = new BGraph("graph3.png" ); - - $days_stored_files = array(); - $backupjob_files = 0; - - foreach( $days as $day ) - array_push( $days_stored_files, $dbSql->GetStoredFilesByJob( $backupjob_name, $day['start'], $day['end'] ) ); - - // Calculate total files for this period - foreach( $days_stored_files as $day ) - $backupjob_files += $day[1]; - - $graph->SetData( $days_stored_files, 'bars', 'text-data' ); - $graph->SetGraphSize( 400, 230 ); - - $graph->Render(); - $smarty->assign('graph_stored_files', $graph->Get_Image_file() ); - - // Last 10 jobs - $query = "SELECT JobId, Level, JobFiles, JobBytes, JobStatus, EndTime, Name "; - $query .= "FROM Job "; - $query .= "WHERE Name = '$backupjob_name' "; - $query .= "ORDER BY EndTime DESC "; - $query .= "LIMIT 10 "; - - $jobs = array(); - $joblevel = array( 'I' => 'Incr', 'D' => 'Diff', 'F' => 'Full' ); - $result = $dbSql->db_link->query( $query ); - - if( ! PEAR::isError( $result ) ) - { - while( $job = $result->fetchRow( DB_FETCHMODE_ASSOC ) ) { - $job['Level'] = $joblevel[ $job['Level'] ]; - array_push( $jobs, $job); - } - - }else - die( "Unable to get last jobs from catalog " . $result->getMessage() ); - - $smarty->assign('jobs', $jobs ); - - $smarty->assign('backupjob_name', $backupjob_name ); - $smarty->assign('backupjob_period', $backupjob_period ); - $smarty->assign('backupjob_bytes', $backupjob_bytes ); - $smarty->assign('backupjob_files', $backupjob_files ); - - // Process and display the template - $smarty->display('backupjob-report.tpl'); - -?> +compile_check = true; + $smarty->debugging = false; + $smarty->force_compile = true; + + $smarty->template_dir = "./templates"; + $smarty->compile_dir = "./templates_c"; + $smarty->config_dir = "./configs"; + + $backupjob_name = ""; + $days = array(); + + // Get Backup Job name from GET or POST + if( isset( $_POST["backupjob_name"] ) ) + $backupjob_name = $_POST["backupjob_name"]; + elseif( isset( $_GET["backupjob_name"] ) ) + $backupjob_name = $_GET["backupjob_name"]; + else + die( "Please specify a backup job name " ); + + // Get the last 7 days interval (start and end) + for( $c = 6 ; $c >= 0 ; $c-- ) { + $today = ( mktime() - ($c * LAST_DAY) ); + array_push( $days, array( 'start' => date( "Y-m-d 00:00:00", $today ), 'end' => date( "Y-m-d 23:59:00", $today ) ) ); + } + // Generate Backup Job report period string + $backupjob_period = "From " . date( "Y-m-d", mktime()-LAST_WEEK ) . " to " . date( "Y-m-d", mktime() ); + // Last 7 days stored Bytes graph + $graph = new BGraph( "graph2.png" ); + + $days_stored_bytes = array(); + $backupjob_bytes = 0; + + foreach( $days as $day ) + array_push( $days_stored_bytes, $dbSql->GetStoredBytesByJob( $backupjob_name, $day['start'], $day['end'] ) ); + + // Calculate total bytes for this period + foreach( $days_stored_bytes as $day ) + $backupjob_bytes += $day[1]; + + $graph->SetData( $days_stored_bytes, 'bars', 'text-data' ); + $graph->SetGraphSize( 400, 230 ); + + $graph->Render(); + $smarty->assign('graph_stored_bytes', $graph->Get_Image_file() ); + + // Getting last 7 days stored files graph + $graph = new BGraph("graph3.png" ); + + $days_stored_files = array(); + $backupjob_files = 0; + + foreach( $days as $day ) + array_push( $days_stored_files, $dbSql->GetStoredFilesByJob( $backupjob_name, $day['start'], $day['end'] ) ); + + // Calculate total files for this period + foreach( $days_stored_files as $day ) + $backupjob_files += $day[1]; + + $graph->SetData( $days_stored_files, 'bars', 'text-data' ); + $graph->SetGraphSize( 400, 230 ); + + $graph->Render(); + $smarty->assign('graph_stored_files', $graph->Get_Image_file() ); + + // Last 10 jobs + $query = "SELECT JobId, Level, JobFiles, JobBytes, JobStatus, EndTime, Name "; + $query .= "FROM Job "; + $query .= "WHERE Name = '$backupjob_name' "; + $query .= "ORDER BY EndTime DESC "; + $query .= "LIMIT 10 "; + + $jobs = array(); + $joblevel = array( 'I' => 'Incr', 'D' => 'Diff', 'F' => 'Full' ); + $result = $dbSql->db_link->query( $query ); + + if( ! PEAR::isError( $result ) ) + { + while( $job = $result->fetchRow( DB_FETCHMODE_ASSOC ) ) { + $job['Level'] = $joblevel[ $job['Level'] ]; + array_push( $jobs, $job); + } + + }else + die( "Unable to get last jobs from catalog " . $result->getMessage() ); + + $smarty->assign('jobs', $jobs ); + + $smarty->assign('backupjob_name', $backupjob_name ); + $smarty->assign('backupjob_period', $backupjob_period ); + $smarty->assign('backupjob_bytes', $backupjob_bytes ); + $smarty->assign('backupjob_files', $backupjob_files ); + + // Process and display the template + $smarty->display('backupjob-report.tpl'); + +?> diff --git a/gui/bacula-web/bweb.inc.php b/gui/bacula-web/bweb.inc.php index 79d7cfc8de..3d756a246f 100644 --- a/gui/bacula-web/bweb.inc.php +++ b/gui/bacula-web/bweb.inc.php @@ -543,11 +543,13 @@ class Bweb extends DB { $start_date = date( "Y-m-d H:i:s", $start_date ); $end_date = date( "Y-m-d H:i:s", $end_date ); + $interval_where = "(EndTime BETWEEN '$start_date' AND '$end_date') AND "; + // Job status switch( $type ) { case 'completed': - $where = "AND JobStatus = 'T' "; + $where = $interval_where . "JobStatus = 'T' "; $label = "Completed"; break; case 'terminated_errors': @@ -555,32 +557,33 @@ class Bweb extends DB { $label = "Terminated with errors"; break; case 'failed': - $where = "AND JobStatus = 'f' "; + $where = $interval_where . "JobStatus = 'f' "; $label = "Failed"; break; case 'waiting': - $where = "AND JobStatus IN ('F','S','M','m','s','j','c','d','t') "; + $where = "JobStatus IN ('F','S','M','m','s','j','c','d','t') "; $label = "Waiting"; break; case 'created': - $where = "AND JobStatus = 'C' "; + $where = "JobStatus = 'C' "; $label = "Created but not running"; break; case 'running': - $where = "AND JobStatus = 'R' "; + $where = "JobStatus = 'R' "; $label = "Running"; break; case 'error': - $where = "AND JobStatus IN ('e','f') "; + $where = $interval_where . "JobStatus IN ('e','f') "; $label = "Errors"; break; } $query = 'SELECT COUNT(JobId) AS ' . $type . ' '; $query .= 'FROM Job '; - $query .= "WHERE EndTime BETWEEN '$start_date' AND '$end_date' "; - $query .= $where; + $query .= "WHERE $where "; + //echo 'query = ' . $query . '
'; + $jobs = $this->db_link->query( $query ); if (PEAR::isError( $jobs ) ) { diff --git a/gui/bacula-web/external_packages/phplot/COPYING b/gui/bacula-web/external_packages/phplot/COPYING index 602bfc9463..53afb04e5a 100644 --- a/gui/bacula-web/external_packages/phplot/COPYING +++ b/gui/bacula-web/external_packages/phplot/COPYING @@ -1,504 +1,504 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/gui/bacula-web/external_packages/phplot/ChangeLog b/gui/bacula-web/external_packages/phplot/ChangeLog index af66bd1cf8..c031ac51ca 100644 --- a/gui/bacula-web/external_packages/phplot/ChangeLog +++ b/gui/bacula-web/external_packages/phplot/ChangeLog @@ -1,1364 +1,1364 @@ -This is the Change Log for PHPlot. -The project home page is http://sourceforge.net/projects/phplot/ ------------------------------------------------------------------------------ - -2011-01-15 (lbayuk) ===== Released as 5.3.1 ===== - * phplot.php: Updated version - * README.txt: Updated for new release - * NEWS.txt: Add text for new release - -2011-01-09 - * Fixed some style / indent errors, and 1 redundant test. - -2011-01-03 - * For bug 3143586 "Multiple plots per image - fixes & docs": - Make sure there is a documented way to reset PHPlot feature - settings, especially those for which the default settings result - in automatic calculated values. Where possible, calling a Set*() - function with no arguments should reset the feature to defaults. - - + Changed SetLegendPixels() arguments to be optional with default - NULL meaning reset to automatic positioning. - - + Fixed SetXAxisPosition() and SetYAxisPosition() to accept empty - string '' to mean reset to default automatic positioning. - Make arguments optional, defaulting to empty string. - - + Changed SetNumXTicks() and SetNumYTicks() arguments to be - optional with default empty string '' meaning reset to - of automatic calculation. - - * Changed SetPointShapes() to use CheckOptionArray(). This - simplifies the function with no change in operation. - - * Extend copyright years to 2011. - -2010-12-30 - * Fix for bug 3147397 "Data colors missing with multiple plots": - + Do not truncate the data_colors and related arrays, so the full - set of colors will be available for subsequent plots on the image. - (Color indexes are still allocated in the image only as needed.) - + New internal functions GetColorIndexArray() and - GetDarkColorIndexArray(), replacing previous use of array_map(). - + Removed internal function truncate_array() - no longer used. - + Changed SetColorIndexes(), NeedDataDarkColors(), and - NeedErrorBarColors() to only allocate the color indexes that will - be needed (instead of allocating all colors in the truncated color - descriptor arrays). - -2010-12-28 - * Instead of throwing an error, SetLegend(NULL) now clears the legend - array. This can be useful with multiple plots on an image. Before - this change, only SetLegend(array()) did that (possibly by accident). - -2010-12-27 - * Do not have SetDefaultStyles() call deprecated SetLabelColor(). - - * Fixes for bug 3143586 "Multiple plots per image - fixes & docs": - + Fix DrawLegend so it doesn't forget that the legend position - was specified in world coordinates. This fixes the legend - position for plots after the first. - + Don't draw the image border more than once (although this would - probably have no impact on the resulting image). This parallels - the behavior for the main plot title and the image background. - Replaced member variables background_done and title_done with a new - member array done[] which will track when these elements were done. - -2010-12-06 - * Fix comments above CalcPlotAreaWorld(). Deleted incorrect information - from before data-data-yx existed, and before DecodeDataType rewrite. - -2010-12-04 (lbayuk) ===== Released as 5.3.0 ===== - * phplot.php: Updated version - * README.txt: Updated for new release - * NEWS.txt: Add text for new release - -2010-12-03 - * Feature request 3127005 "Ability to suppress X/Y axis lines": - Added SetDrawXAxis() and SetDrawYAxis() to control flags which - will suppress drawing the X or Y axis lines. (These lines were - probably the only PHPlot elements that could not be turned off.) - Changed DrawXAxis() and DrawYAxis() to conditionally draw the - axis lines. - -2010-11-28 - * Feature request 3117873 "Data value labels in more plot types": - Implemented Data Value Labels for plot types points, lines, - linepoints, and squared. Added 2 class variables which can be - set to control the distance and angle of the labels from points. - New internal function CheckDataValueLabels() calculates position - and text alignment for these labels. - - * Updated comments for Set[XY]DataLabelPos to match the text in - the manual, which was rewritten to clarify label types. - -2010-11-23 - * Code cleanup. Moved some functions around to group "plot drawing - helpers" separately from "plot drawing". No changes to operation. - -2010-11-21 - * Feature request 3111166 "Control legend colorbox width": - Added a class variable legend_colorbox_width which can be changed - to make the colorboxes wider or narrower. - -2010-11-16 - * Feature request 3093483 "Investing support chart types": - Added 3 new plot types: Basic OHLC (Open/High/Low/Close), Candlesticks, - and Filled Candlesticks. Implemented with one new function to handle the - 3 new plot types: ohlc, candlesticks, and candlesticks2. - -2010-11-11 - * Moved information about plot types into a new static member array - plots[]. (This is an internal change with no impact on usage, but will - make it easier to add new plot types.) SetPlotType() no longer needs a - list of plot types to check, FindDataLimits() does not need to check for - specific plot types to to process the data array, and DrawGraph() uses - data from the array rather than knowing about all the plot types. - -2010-10-31 - * Changed internal CalcBarWidths() to take two arguments which indicate - how it should calculate bar widths, rather than having it check the - plot_type directly. (Taken from another, experimental change. This - minimizes places where plot_type is directly used.) - -2010-10-03 (lbayuk) ===== Released as 5.2.0 ===== - * phplot.php: Updated version - * README.txt: Updated for new release - * NEWS.txt: Add text for new release - * Makefile: Removed HorizontalBars.txt from release. This is now all - documented in the reference manual. - -2010-10-01 - * Rewrite color handling. Default and specified colors are now validated, - converted to RGBA arrays, and saved. The colors indexes are not - allocated until graph drawing time. Unneeded colors are not allocated. - - Fix bug 3045131 "SetTransparentColor problems": Transparency setup is - deferred to graph drawing time, after most other colors are allocated. - Fixes SetTransparentColor order dependency, and works with data colors. - - Fix bug 3049726 "Optimize color allocation": Colors allocation is - deferred to graph drawing time, and colors for most elements are only - allocated if needed. In particular, the data colors and dark colors, - which used 32 slots, now only get defined as needed. - - Feature request (partial) 3077554 "Finer control over plot element - colors": The colors of the main, X, and Y titles can now be controlled - separately. - - Change details: - New internal functions: - GetColorIndex(), GetDarkColorIndex() - Allocate pre-parsed colors for elements. - SetColorIndexes() - Does the deferred color allocation and defaults. - NeedDataDarkColors(), NeedErrorBarColors() - Called by graph drawing functions if those colors are needed. - GetDataColor(), GetDataErrorColors(), GetBarColors() - Custom or standard data color assignment for most plot types. - truncate_array() - Shorten an array. Used to limit data color allocation. - - Removed internal functions: - SetIndexColor(), SetIndexDarkColor() - Unneeded. Color handling is now in two separate phases. - - Removed internal member variable: - data_colors_alpha - PHPlot no longer calls SetDataColors before plotting, so this - variable is not needed to preserve the default alpha. - - New internal member variables: - transparent_color - Saves color value from SetTransparentColor. For bug 3045131. - x_title_color, y_title_color, ndx_x_title_color, ndx_y_title_color - For title colors. DrawXTitle and DrawYTitle use them now. - - Changed internal member variables: - i_border, plot_bg_color, bg_color, label_color, text_color, etc. - All variables for colors now always hold a parsed 4-component - (RGBA) color specification as an array, and are no longer - statically initialized to a color name. - - New public functions: - SetXTitleColor(), SetYTitleColor() - These can be used to make the 3 titles have different colors. - -2010-09-26 - * Don't let SetXDataLabelPos() accept 'xaxis' or 'all' as valid. - Don't let SetXTickLabelPos(), SetYTickLabelPos() accept 'all' as valid. - These were never implemented and never documented. - - - * Feature request #3073679 "Stacked bar plots with negative values": - Allow stacked bar plots (vertical and horizontal) to work with negative - values. Changed FindDataLimits() to not take abs() values for - stackedbar when calculating the data range. Changed DrawStackedBars() - and DrawHorizStackedBars() to handle negative values, including proper - label positions. The first non-zero value in a row sets the direction - of the bar. Mixing positive and negative values within a row works but - the results are not useful. - - * New internal DrawBar() moves common code from 4 bars and stackedbars - drawing functions and makes it easier to deal with shading vs bar - direction. - -2010-09-24 - * Fix bug 3074402 "Fix Y axis default for horizontal plots": - Make the default axis positions symmetrical for vertical plots - (X and Y) and horizontal plots (Y and X). This fixes the problem - with horizontal bar/thinbarline plots that have negative data, - where the Y axis stayed on the left and the bars went rightward. - -2010-09-01 - * Fix bug 3056991 "Internal methods should be 'protected'": - Changed CheckDataArray(), number_format(), FindDataLimits(), and - DrawBackground() to be 'protected'. The test suite no longer calls - these directly. For SetIndexColor(), SetRGBColor(), DrawText(), - SizeText(), xtr(), and ytr(), left these as public with a comment - indicating they should be treated as protected. - - * Fix bug 3057000 "Review 'deprecated' methods": - + Changed deprecated method SetNewPlotAreaPixels() to just call - SetPlotAreaPixels(). It was suspicious as coded, and was found - to be equivalent to SetPlotAreaPixels(). - + Removed SetColor(), which didn't do anything. It was calling - SetRGBColor and discarding the result. After reviewing the - history of this in all CVS versions, it does not seem to have - ever been coded correctly, so there is no harm in removing it. - + All other deprecated methods seem OK and are left as is. - -2010-08-30 (lbayuk) ===== Released as 5.1.3 ===== - * phplot.php: Updated version - * README.txt: Updated for new release - * NEWS.txt: Add text for new release - -2010-08-27 - * Fix bug 3051832 "Let PHP/GD find the font file": - Instead of checking for file existence, PHPlot now uses a non-drawing GD - operation to validate a TrueType font in SetFontTTF(). This allows GD to - use its internal search path, making it likely that fonts can be found - without needing a platform-dependent path in your script. Full paths - will still work, so there is no compatibility issue. - - * Fix bug 3051906 "Better choice for default TT font": - Removed "benjamingothic.ttf" as the default TT font setting. This has - not been included in PHPlot since 2004. Changed SetFontTTF() to call - new GetDefaultFontTTF(), which will try a number of sans-serif font - names the first time it needs a default TT font. Considering the above - fix to finding fonts, this has a good chance of finding a working - font. It is known to work on Windows and some Linux distributions. - -2010-08-19 - * Makefile: Removed phplot_data.php from list of files to release. - Reference bug report 3048267. This file has not been maintained or - tested, and has bugs. It will remain in CVS, but not be included - in PHPlot releases. - -2010-08-17 - * Change new DrawLinePoints(). It does not have to check and - handle error bar plots, as DrawDots and DrawLines will do that. - -2010-08-16 - * Rewrote DecodeDataType(). Previous implementation was hard to - extend and inefficient. Now it uses new class variables (not a - returned array) and is only called once, by DrawGraph. Changed all - users of data_type to use the new variables. - - In CheckDataArray(), calculate data_columns properly for - text-data-single data type (pie chart) too. Simplify DrawPie - to use this, and merge 2 of the 3 cases. - - Have a single function handle each plot type, so it can properly - check the data type and report a correct error message showing - all supported types. For example, DrawBars is now the entry point - for both bars and horizontal bars; DrawGraph does not directly - call DrawHorizBars. Similar for DrawStackedBars and - DrawHorizStackedBars. Lines, Points, and Linepoints also now - have a single function each, dispatching to others as needed. - (These changes were split off from an upcoming, larger change.) - -2010-08-14 - * Fixes to SetDataValues: need to clear out the 2 arrays before - setting values in a loop, else if the function is used more than - once then old values will remain. - Move records_per_group calculation outside the loop. - (These were split off from upcoming, larger changes.) - - * Part 4 of horizontal plots: implement horizontal thinbarline plots. - Added new data type 'data-data-yx' (label, Y, X1, X2, ...). - DrawThinBarLines() now draws either vertical or horizontal plots, and - supports data types text-data, data-data, text-data-yx, data-data-yx. - - Fixed DecodeDataType() to handle text-data-single too, for completeness. - - * Fix for over-padding style and color arrays. These were padded to - records_per_group, but that is the maximum data array row size. - The number of actual data sets is less, and depends on the data type. - Calculate the correct number as data_columns at the top of DrawGraph, - and use that to pad the arrays. Also moved early error checking in - DrawGraph() into new CheckDataArray(). - -2010-08-09 - * Code cleanup. This is a large change to unify the comment and - coding stye used in PHPlot. The PEAR style guide is being used - as a reference, but PHPlot will never be 100% compliant. - This patch introduces no functional changes at all. - - Limit line length to 110. - - Remove obsolete, partially implemented Doxygen comments. - - Add descriptive comment above functions where missing. - - Use consistent comment markers and control structure spacing. - - Remove ctags-confusing end of function comments. - - Rewrote a few if/else blocks for cleaner logic. - - Re-order some functions for consistency (X, then Y). - -2010-08-04 - * Implemented horizontal stacked bar plots: - Use the same data type introduced for horizontal bars, 'text-data-yx', - and the same plot type 'stackedbars', to make a horizontal stacked bar - plot. Data value labels, both at the ends of the bars and within the - bars ('plotstack' labels) are available with horizontal stacked bars. - - * Internal function DrawDataLabel() is replaced by DrawDataValueLabel(), - with different usage. The new function can also check to see if a label - fits in the allocated space. - - * Fixed the text size check in stacked bar plots for data value labels - within the bars. The check only worked correctly for 0 degree labels. It - now works with any text angle. It suppresses the label if it is too high - (for vertical stacked bar plots) or too wide (for horizontal stacked bar - plots) to fit in the bar segment to which it belongs. Note that it only - checks in the bar direction. If the text is too wide (for vertical bars), - or too high (for horizontal bars), it will still be plotted, but will - cross the sides of the bar. - -2010-07-28 - * Allow callbacks to return a value (to support new data_color callback). - * Feature request 3034164 "Extended control of data colors": - Define new callback 'data_color' for picking the data color. - Changed internal plot drawing functions DrawDots, DrawLines, DrawSquared, - DrawBars, DrawStackedBars, DrawDotsError, DrawThinBarLines, - DrawLinesError, and DrawHorizBars to use the data_color callback - (if defined) to select the data colors. - * SetRGBArray code cleanup (no functional changes). - -2010-07-27 - * Fixes for error bars: - Code cleanup in DrawYErrorBar(), with no functional change. - Suppress duplicate drawing of error bars with 'linepoints' error plots. - This was already fixed for data labels. Now error bars will only be - drawn by the 'points' part, not the 'lines' part. There should be no - visible changes to plots. (This is needed for a future change). - -2010-07-26 - * Horizontal bar charts (still an experimental feature) can now have data - value labels. - * HorizontalBars.txt: Fix incorrect description of bar direction. Add - text explaining the new data value labels. - -2010-06-29 (lbayuk) ===== Released as 5.1.2 ===== - * phplot.php: Updated version - * README.txt: Updated for new release - * NEWS.txt: Add text for new release - -2010-06-26 - * Feature request 2885930 "Horizontal Bars": - Horizontal bar charts are implemented, as an experimental feature. - A new data type 'text-data-yx' was added, which works with - 'bars' plot type to produce a horizontal bar chart from a data - array with X values for each Y value. Changes were made to - FindDataLimits, CalcMargins, CalcPlotAreaWorld, CalcBarWidths, - and CalcMaxDataLabelSize to handle the new data type. Other - changes were made to handle label position defaults and grid - defaults. New drawing functions were added for horizontal bars. - - * HorizontalBars.txt: new documentation file for experimental feature. - * Makefile: List new documentation file. - -2010-06-25 - * Each plot-type drawing function now checks that it is getting a data - type that it knows how to handle. A new internal function unifies the - checking and error message. (This is associated with an upcoming, - bigger change.) - - Compatibility: If you were using an invalid data type for a plot type - whose function did not check, will now get an error. - - * Removed some dubious code from DrawLines() and DrawSquared() and - rewrote comments there. The code initialized lastx[0] and lasty[0], - but lasty was mapped using the X (rather than Y) function. This was - obviously wrong, but closer inspection showed that the values were - never, used so the code was removed. - -2010-06-13 - * Truecolor.txt: removed - * Makefile, README.txt: Removed reference to Truecolor.txt. Full - documentation for truecolor images is now in the Reference Manual. - -2010-06-02 - * Fix bug 3010116 "Bad rendering of title in multi-plot image - when using TTF": - Make sure the main title is drawn only once. (If drawn multiple - times with TrueType font text, the anti-aliasing effects result - in poor quality text.) - -2010-05-31 - * Improvements to truecolor support (from feature request 2947679): - Truecolor support is now better integrated. The derived class only - has the constructor now, and the base class itself provides the alpha - color component support through the internal functions SetIndexColor(), - SetIndexDarkColor(), and SetRGBColor(). This means alpha channel - works with palette images too (in so far as GD supports this). - - * Truecolor.txt: Updated per changes to truecolor support. - - * Image tiling with mode 'scale' in tile_img(), used with image and - plot area backgrounds, now uses imagecopyresampled() rather than - imagecopyresized(). They are the same with palette images, but the - resampled copy gets better results with truecolor images. - -2010-05-29 - * Feature request 3002606 "Add to plot and image border options": - Added options 'right', 'top', and 'bottom' to SetPlotBorderType() - (existing options are 'left', 'sides', 'none', and 'full'). This - now also accepts an array of the above options, giving complete - control over which sides to draw. - Added option 'solid' to SetImageBorderType() to use the actual - color set with SetImageBorderColor(), rather than the darker - shade as type 'plain' does (for some reason). - New function SetImageBorderWidth() sets the width of the image - border. The image border width is now accounted for in margin - calculations, although existing plots will not change. - -2010-04-04 (lbayuk) ===== Released as 5.1.1 ===== - * phplot.php: Updated version - * README.txt: Updated for new release - * NEWS.txt: Add text for new release - -2010-04-01 - * Remove & from argument in SetDataValues(). The data array is not - modified and does not need to be passed by reference. (There is - no performance advantage, either.) - -2010-03-29 - * Feature request 2947679 "Support for alpha blending/Truecolor": - Implemented truecolor image support with a new class - PHPlot_truecolor, extended color specifications to allow - specification of an alpha value, and added a new optional parameter - to SetDataColors for a default alpha value for all data colors. - This feature is *EXPERIMENTAL* (see next item). - - * Truecolor.txt: New file, documentation for the new truecolor capability. - (The Truecolor feature is experimental, which means it is subject to - change in incompatible ways and the documentation has not yet been - incorporated into the PHPlot Reference Manual.) - - * Makefile: Include new documentation file in release. - -2010-03-26 - Fixed bug 2976735 "Improvements and fixes for 'area' plots": - Rewrote DrawArea() function which handles 'area' plot. - Part 1: This is related to feature request 2947679, Truecolor support - with transparency. The area plot function was filling each area from the X - axis up to the Y value, resulting in area overlaps. This wasn't a problem - with opaque colors, but with transparency, the overlapping areas resulted - in changed colors. The rewritten function fills the area between each line - instead of from each line down to the X axis. Plots with opaque colors - will not change. - Part 2: Area plots now work when the X axis is moved up with - SetXAxisPosition(). - Part 3: Fixed FindDataLimits() for area (and stackedbars too) to - take absolute values of Y values. The drawing function was doing this, - but not FindDataLimits, resulting in incorrect limits if any Y<0. - Part 4: The rewritten DrawArea() also handles a new plot type - 'stackedarea'. This is an area plot where the Y values are stacked, - similar to 'stackedbars'. - Note: As part of the changes, it is now an error to try an area plot - with an unequal number of Y points for each X. - -2010-03-23 - * Feature request 2973995 "Add y-Data to Stackedbars": - Implemented Y Data Labels for Stacked Bar charts (stackedbars). - The labels are enabled with SetYDataLabelPos, same as with bar charts. - There are two types of labels: above the stack with the total, and - within the bars at each segment. 'plotin' turns on the upper ones, and - 'plotstack' turns both on. - - * Other changes: - + Removed unimplemented second argument to SetYDataLabelPos. - + Fixed questionable logic in SetYDataLabelPos when given an argument - that belongs with SetYTickLabelPos. - + Fix comments at top of plot-type Draw functions. - - * Fix for bug 2974639 "Stacked bars plot breaks with X axis != 0": - Stacked bar plots with non-zero X axis position no longer break apart - into segments with gaps. The bars are drawn up from the X axis, and - any segments or partial segments below the X axis are not drawn. - -2010-03-22 - * Change related to feature request 2947679 - Fix 'dot' point shape: - Use imagefilledellipse(), not imagefilledarc(), when drawing the 'dot' - point shape. The fix was needed for future support of truecolor images - with transparency, but filled dots from imagefilledellipse() look - better (rounder) with regular images and opaque colors. - Credit to mvaldez for identifying the problem and providing the fix. - -2010-03-04 - * Fix for bug 2963757 "point_counts undefined error in 5.1.0": - Fixed CheckPointParams so it sets point_counts even when the point shape - and point size arrays are already the same size and do not need padding. - -2010-01-26 - * Fix for bug 2938219 "Bars go in wrong direction": - Fixed CalcAxisPositions() to be consistent in positioning the X axis. - When all Y values are <0 and the Y=0 line is not part of the plot range, - PHPlot will now default the X axis to the top of the plot, not the - bottom. This fixes the problem with bars to negative Y values being - drawn downward if Y=0 is visible, but upward if Y=0 is not visible. - This also affects thinbarline plots. - Credit to lauryn1298 for finding the bug. - -2009-12-24 (lbayuk) ===== Released as 5.1.0 ===== - -2009-12-18 - * Change for bug 1795971 "Fix default data colors": - The default Data Color and Error Bar Color arrays now have 16 - different colors, no duplicates, and nothing so light that it - is invisible. - Using '' or False as the argument to SetDataColors, SetErrorBarColors, - and SetDataBorderColors now re-initializes the map to the defaults. - This was previously undocumented, and in some cases set the map to - something different from the default. - -2009-12-15 - * Cleanup: Remove DrawAxisLegend() - empty function marked TODO, - not really clear what it was meant to do. - -2009-12-14 - * Fix for bug 2914403 "Pie + X/Y titles: Undefined property error": - In DrawGraph(), don't try to draw X or Y titles for pie charts. - - * Feature request 2899921: "allow different format for data and tick - labels"; Bug 2906436: "Fixes for X Tick Labels vs X Data Labels", - and partial implementation of changes from user 'adoll' regarding - tick vs data labels: - - New public functions: - + SetXDataLabelType() : Sets formatting for X Data Labels - + SetYDataLabelType() : Sets formatting for Y Data Labels (bar charts) - + SetXDataLabelAngle() : Sets text angle for X Data Labels - + SetYDataLabelAngle() : Sets text angle for Y Data Label (bar charts) - The defaults for these are set up to be fully backward compatible - with previous releases of PHPlot (except see the next item). - - Re-used function name SetXDataLabelAngle(): - + This has been deprecated and undocumented since 2003-12-07, and - used to just call SetXLabelAngle(). For new behavior, see above. - - Changes to public functions: - + SetXDataLabelPos() and SetXTickLabelPos() no longer cancel each - other out (set the other control variable to 'none'). Instead, - they are both considered before plot drawing. - - Changes to internal functions: - + DrawDataLabel() now uses the font, angle, and color arguments as - provided, and does not substitute values if they are empty. - + SetLabelType() now takes mode='xd' and 'yd' for X Data and Y Data - label formatting; 'x' and 'y' are for tick labels only now. - + Functions that work on Data labels now call FormatLabel() with the - new mode parameter value 'xd' or 'yd, and use the new - data_label_angle variables. - + New CheckLabels(), used by DrawGraph to process label parameters. - + CalcMargins() - Rewritten to handle changes to Tick and Data labels. - - Changes to internal class variables: - + New: x_data_label_angle, y_data_label_angle - + Do not initialize x_tick_label_pos or x_data_label_pos, so that - CheckLabels() can tell if they were set or not and apply defaults. - + Initialize y_data_label_pos to 'none', not 'plotleft'. - + Add 2 more indexes to label_format[] array: 'xd' and 'yd'. - - * Cleanup: - + Delete unused internal class variable: draw_y_data_label_lines - + Delete unused function SetDrawYDataLabelLines() - -2009-12-07 - * Fix bug 1795972 "Fix default point shapes": - + Added 10 new point shapes to the existing 10 shapes. - + Changed the default point shape from all 'diamond' to a - selection of up to 10 different shapes. - + Fixed bug in the code that tried to set the point shapes - and sizes arrays to be the same size. This was not working, - resulting in unexpected point sizes. - + Changed default point size to 6 for all shapes. It was trying - to be "5, 5, 3" but due to several bugs this was not working. - + Do not adjust shape sizes to even numbers (was done for only two - shapes). Instead, consistently truncate size/2 when needed. - NOTE: These may change the look of 'points' and 'linepoints' plots. - - * Changed startup initialization code: - + SetDefaultStyles() was doing some odd things using a variable - called "session_set", with comments referring to non-existent - session support code. This has been removed. There should be - no visible changes from this. PHPlot does not use PHP sessions. - -2009-12-04 - * Fix for bug 2908256, errors in pie charts with bad data array: - (From a Drupal contrib module report by thekevinday.) - With pie charts only, a data array with no valid Y values resulted - in PHP error messages. All other plot types handle this by producing - an image without a graph. - Fixed DrawPieChart to behave this way too. If there are no valid Y - values, or if the sum of all Y values is 0, do not error out, but - don't draw a pie chart either. - Also, pie charts now ignore non-numeric Y values, like other plot types. - -2009-11-20 (lbayuk) - * Fix for bug 2900914 "Problem with display of 0 on Y axis": - Changed how X and Y values are stepped by tick intervals, to avoid - cumulative round-off error. This fixes the problem when Y crosses 0 with - a tick step such as 0.1 resulting in a long label for a very small but - non-zero number. Fixed DrawXTicks, DrawYTicks, and CalcMaxTickLabelSize. - (Originally reported by cncnet) - -2009-11-19 (lbayuk) - * Improve support for using callbacks to annotate plots: - Added new callback 'draw_all', called after all drawing. - Supply plot_area[] as argument to some drawing callbacks. - Added new method GetDeviceXY() to translate from world coordinates. - Allow NULL or '' for $font in DrawText() internal method, meaning to - use the generic font. If callbacks want to use DrawText, this - avoids them having to reference the internal fonts[] array. - -2009-11-01 (lbayuk) - * Address bug report 2886365 "Declare all functions and variables in - PHP5 style" - PHP5 deprecates the use of 'var' to declare a class member variable. - All initialized class member variables are now declared 'public'. - (It was tempting to make most or all 'protected' or 'private', but - that would likely break too much, including the PHPlot Test Suite.) - - Most class member functions which are meant for internal use only are - now declared 'protected', so they cannot be called from scripts - (except in child classes). (Note PHP5 does not deprecate the use of - just 'function' to mean public, so public functions were not changed.) - Internal functions are those documented in the manual under Developer's - Guide, Internal Functions. If your code breaks because you are using - a method which is now protected, please post the details on the help - forum. - - Some member variables which were set in the constructor are now - initialized with the class instead. (No impact.) - - Removed commented-out, FIXME-noted code for interim labels. - -2009-10-12 (lbayuk) - * Bug report 2839547, allow SetImageBorderType('none') to reset the image - border type. Also checked for other cases where there is no reset; - found one that exists (Set[XY]LabelType) but needs to be documented. - -2009-07-09 (lbayuk) - * Added a hook $plot->locale_override which can be set to True to prevent - PHPlot from loading locale settings from the environment with - setlocale(LC_ALL, ''). This is necessary for testing PHPlot on Windows, - where you cannot force a locale with an environment variable. It might - also be needed for people who want PHPlot's locale to differ from the - web server's locale. - -2009-06-12 (lbayuk) ===== Released as 5.0.7 ===== - -2009-06-11 (lbayuk) - * Change PHPlot license to LGPL, per Afan. - phplot.php, phplot_data.php - Change license notice. - rgb.inc.php - Change top comments and remove bottom marker. - COPYING - new file, text of LGPL. - LICENSE.* - removed files - old licenses. - Makefile - change list of distributed files. - - * Fix for bug 2803900: SetRGBArray('large') does not work. The include - file defined a different array name than the main script expected. - (This bug seems to have happened over 8 years ago.) Fixed the array - names to match. Also removed the ./ prefix from the included filename - so it will be found if on the include path but not in the script - directory. Also added error check if the rgb.inc.php include file - is needed and not found. - -2009-05-25 (lbayuk) - * Added new feature to allow partial margin or plot area specification. - You can omit, or specify as NULL, any of the 4 arguments to - SetMarginsPixels() or SetPlotAreaPixels(), and this means PHPlot - should use the automatically calculated margin on that side. - Credit to adoll for this feature. - -2009-05-17 (lbayuk) - * Fix for bug 2791502 "Error plots treat missing Y values as 0": - Plots with data type data-data-error now support missing Y values, - instead of treating them as 0. This works with lines, points, - and linepoints plot types, and also honors SetDrawBrokenLines. - - - * Fix for bug 2792860 "Wrong DataLabelLines with missing Y": - Do not draw X Data Label Lines at points with missing Y values. - - - * Fix for bug 2786350 "Missing Y data results in bad auto-range": - Rewrote FindDataLimits to ignore missing Y values, rather than - treating them as if 0, for calculating range. - Bug report and analysis by mrten. - - * Fix for bug 2786354 "Incorrect auto-range for data-data-error": - For data-data-error data type, apply the positive and negative error - amounts for each Y point to that point only, rather than applying the - largest errors to the overall minimum and maximum Y value for the row. - - Note: The two fixes above can change existing plots which rely on - automatic Y range calculation. The first fix affects plots with - missing Y values and min(Y)>0. The second fix can affect plots using - data-data-error data type and different error values for different - points. In both cases the new Y range can be smaller than before. - -2009-01-20 (lbayuk) ===== Released as 5.0.6 ===== - -2009-01-18 (lbayuk) - * Fix for bug 1891636 "Misaligned TTF X Labels": - PHPlot was using the actual bounding box of each line of text - to allocate space and set the text positioning, but was ignoring the - fact that the text baseline is not the same as the bottom of the - bounding box. This resulted in uneven alignment of the X labels if - they had different heights (for example, month names Jul and Aug). - - PHPlot now calculates the size of text for allocation (SizeText) using - the descenders on the last line, and calculates the size for drawing - (DrawText) only to the baseline. PHPlot also now uses a fixed line - spacing for each line of text in a font, rather than the actual text - height. This allows separately drawn multi-line labels to align. - - * Changes to line spacing when using multi-line labels: - PHPlot was using the class variable line_spacing to mean the - number of pixels between lines of multi-line labels. This made the - spacing too small for larger fonts, and it was not possible to adjust - line spacing for different types of text. - - PHPlot now interprets line_spacing as the number of pixels only - for GD text, and as a scale factor for the font's built-in line - spacing for TrueType text. In addition, a new optional argument is - added to SetFont, SetFontGD, and SetFontTTF to set a line spacing - specific to that type of text. - - * Changes had to be made to the legend drawing code to accommodate the - changes to font handling. - - Note: The line spacing change results in slightly looser spacing on - multi-line TrueType text labels, and slightly taller legends, compared - to version 5.0.5. - -2008-09-21 (lbayuk) - * Interim fix for bug 1932571 "Data-Data Plot fails with same X values". - PHPlot will no longer hang when the range of X values is 0 (that is, when - x_min == x_max). It will arbitrarily set an X range of 1, so the - calculated tick step is not 0. This is a temporary fix. Work on a smarter - X and Y range calculation is in progress, which will handle edge cases - like this better, but it isn't ready and this bug has been open too long. - Credit to andyl for finding the bug. - - * Fix font path: Use DIRECTORY_SEPARATOR constant not '/'. - - Extended the label formatting capabilities, adding 'printf' and 'custom' - types, added a prefix and suffix for 'data' type, and allow format controls - to be included in SetXLabelType and SetYLabelType. - - External changes: - * Added 'printf' label type. The caller specifies the print format as the - 2nd argument to SetXLabelType or SetYLabelType (default '%e'). - $plot->SetXLabelType('printf', '%5.2f'); - - * Added 'custom' label type. The caller supplies a callback (typically a - function name) and optional pass-through argument as the 2nd and 3rd - arguments to Set[XY]LabelType. The function is called as $f($value, $arg) - to return the formatted $value. - $plot->SetXLabelType('custom', 'myfunction', $arg_value); - - * In addition to Set[XY]TimeFormat, the format string for type 'time' can - now be set as the 2nd argument to Set[XY]LabelType. - $plot->SetXLabelType('time', '%H:%M'); - - * In addition to SetPrecision[XY], the precision for type 'data' can now be - set as the 2nd argument to Set[XY]LabelType. A 3rd and 4th argument - can supply a prefix and suffix for 'data' formatting. (All optional) - $plot->SetXLabelType('data', 2, '$', 'US'); - - Internal changes: - * Class variables x_precision, y_precision, x_label_type, y_label_type, - x_time_format, and y_time_format have been removed. - - * New class array variable label_format[], with elements 'x' and 'y' which - are arrays for label formatting. Elements in the sub-arrays are not - initialized until needed. - - * New function SetLabelType, which implements Set[XY]LabelType now. - - * FormatLabel() was rewritten to support the new label formatting. - - Compatibility: - * Any code that directly references class variables related to label - formatting will break, except for data_units_text. Use the documented - function methods instead. Setting data_units_text as a suffix is - deprecated but still works. - - * The 'data' type precision for 'Y' is still used for pie chart labels. - -2008-07-12 (lbayuk) - Multiple comment spelling error fixes. No functional changes. - -2008-07-06 (lbayuk) - Changes to allow mixing GD fixed-font text and TrueType Font (TTF) text - on the same plot. - (This change came from work done trying to fix TTF text positioning, - where it looks like additional information needs to be stored for TrueType - fonts. The old font data structure was awkward to extend, and allowing - mixed GD/TTF text was on the to-do list anyway.) - - External changes: - * SetFontGD(), SetFontTTF(): New functions to set a font, with type. - * SetFont(): Now calls SetFontGD or SetFontTTF depending on $use_ttf. - These changes should be fully compatible with existing programs. - - Internal changes: - * Updated comments explaining SetUseTTF() now sets the default type - (not the only type) of text used. - * Put all the font data into a class array. (Replaces $this->generic_font - with $this->fonts['generic'], etc.) - * ProcessTextGD() and ProcessTextTTF() now take the font array as one - argument, rather than separate arguments for font path and size. - -2008-01-13 (lbayuk) ===== Released as 5.0.5 ===== - * phplot.php: Updated version - * README.txt: Updated for new release - * NEWS.txt: Add text for new release - * Makefile: Remove 'Callbacks' from release target, as this material is - now in the reference manual. - -2008-01-07 (lbayuk) - Copyright updated to 2008 and PHP4 no longer listed as supported. - - Major rewrite of the margin calculation functions to address multiple - problems. Fixes for bugs 1856207 "Margin error with 'xaxis'/'yaxis' - position, 1843012 "Make margins, drawing consistent", and 945439 - "x_tick_label_height not set correctly". - - Note: These changes are inter-dependent and cannot be split up. - - * Defer all calculations to DrawGraph time, to eliminate order dependencies. - These functions now just store their arguments in the object, and all - calculations happen later: - + SetXAxisPosition, SetYAxisPosition - + SetMarginsPixels - + SetPlotAreaPixels (Stores margins, not area, now.) - + SetPlotAreaWorld - + SetXTickIncrement, SetYTickIncrement - - * A new callback 'debug_scale' was added to trace the margin and scale - calculations. - - * CalcMargins was rewritten. Actual sizes of tick and data labels are now - used, rather than guesses like "use size of biggest Y value". A minimum - value (3 x safe_margin, or 15 pixels) applies to each margin. - - * FindDataLimits no longer needs to find the longest data label, since - CalcMargins now does that more precisely. - - * DrawXTitle and DrawYTitle now use position offsets calculated by - CalcMargins. Note: These titles are now offset from the plot area, - not the image area. The titles will move if you had set the plot area - or margins. - - * DrawYTick, DrawXTick rewritten to use pre-calculated offsets, and common - code moved to new CalcTicks(). - - * DrawXDataLabel: Use pre-calculated offsets for text. - - * DrawGraph: Rewrote top section (before drawing anything) to do the - calculations in the proper order, unconditionally. - - * Class variables removed: - x_label_inc, y_label_inc, _x_label_cnt : These were never used. - title_height, x_title_height, y_title_width : Now internal to CalcMargins. - data_limits_done : No more need to remember if FindDataLimits called. - - * New class variables added: - plot_margins_set : Keeps track of user-set plot area or automatic. - x_label_top_offset, x_label_bot_offset, x_offset_axis_offset, - y_label_left_offset, y_label_right_offset, y_label_axis_offset, - x_title_top_offset, x_title_bot_offset, - y_title_left_offset, y_title_left_offset : Label offsets - - * New internal functions: - CalcPlotAreaPixels : Deferred calculations taken out of SetPlotAreaPixels - and SetMarginsPixels. - CalcPlotAreaWorld : Deferred calculations taken out of SetPlotAreaWorld. - CalcAxisPositions : Calculate axis positions, moved from CalcTranslation. - CalcTicks : Calculate X and Y tick interval. This still uses the - same simple method (basically range/10), but now we could drop in a new - algorithm much more easily. This is now also used by CalcMargins. - Code taken out of DrawXTicks and DrawYTicks. - CalcMaxTickLabelSize : So CalcMargins can use the exact tick label sizes. - CalcMaxDataLabelSize : So CalcMargins can use the exact data label sizes. - DrawXTick : Code split out from DrawXTicks for symmetry with DrawYTick. - - -2007-12-13 (lbayuk) - * Changed ProcessTextTTF() so SizeText() will return integers. It rounds - the calculated values up, so the bounding box really contains the text. - This also prevents unneeded float calculations in derived values. - -2007-12-09 (lbayuk) - Major rewrite of the text drawing functions to address multiple problems. - Note: These changes are inter-dependent and cannot be split up. - - * Fixed bug 1813070 "Bad position for multi-line TrueType text": - TTF text is now drawn line-by-line, not as a block, for proper - alignment and positioning. - - * Fixed bug 1813071 "Wrong title height for multi-line TTF text": - Corrected miscalculation of overall height of multi-line TTF titles. - This bug resulted in over-sized margins. - The height is now computed line-by-line, including the inter-line spacing. - - * Fixed bug 1813474 "DrawText alignment arguments wrong": - Corrected meaning of 'top' vs 'bottom' alignment. PHPlot now follows - the usual conventions: 'top' alignment means top of text to reference. - DrawText default for vertical alignment is still 'bottom', but the - meaning was corrected. All callers of DrawText were fixed. - - * Fixed bug 1816844 "Fix order dependency for setting titles": - Defer processing titles strings until DrawGraph(), so there is no - more order dependency (no need to set font before setting title strings). - - * Fixed bug 1819668 "Horiz. align multi-line text: GD vs TTF": - The new text routines draw TTF text line-by-line and correctly do - right-, center-, and left- alignment of each line within a text block. - - * Fixed bug 1826513 "FIXME in DrawLegend: Max label length": - Use actual width of widest legend line to calculate legend box size. - - * Partial fix for bug 945439 "x_tick_label_height not set correctly": - In FindDataLimits(), save the longest data label, not just its length, - and use the actual rendered size of that string in CalcMargins() for - the margin calculations. - Also take into account which of the tick or data labels are visible. - This is not a complete fix, but is a significant improvement. - - The following changes were made related to the above fixes: - - + Replaced internal function TTFBBoxSize(), which didn't work right, with - SizeText(). It returns the orthogonal bounding box of a block of text, - and works with both GD and TTF text. - - + DrawText() and SizeText() call a single function ProcessText(), which is - the only place GD text and TTF text are distinguished. (So eventually - we will be able to mix GD and TTF text on a plot.) - - + New internal functions ProcessTextGD() and ProcessTextTTF() draw (or size) - GD and TTF text respectively. These are only called by ProcessText(). - These are re-implementations which properly position and align text. - - + Removed class variables title_angle, x_title_angle, and y_title_angle. The - titles only work at their fixed angles anyway (0, 0, and 90 respectively). - - + Line spacing set with SetLineSpacing() now affects TTF text as well as - GD text. Previously, it only affected GD text. The default line spacing - happens to be usable for TTF text. - - + Added new callback hook 'debug_textbox' for developing, testing, and - documenting. It provides access to the text area bounding box. - - + Removed unneeded class variables x_tick_label_height, y_tick_label_width, - x_tot_margin, y_tot_margin. - -2007-11-25 - * Improve error handling: - Internal functions PrintError() and DrawError() are now the same. Both - will draw the error message into the image and output it, and then - trigger a user-level error. If no error handler has been set, it will - exit, as before. But now the error message should also get logged, or - written to the standard error stream, depending on the SAPI in use. - You can now establish an error handler to catch most PHPlot errors and - do some cleanup before exit. - - This fix also covers bug #1823774 "Default Font Path and Error Message - Output". - - Fixed the return value of most PHPlot functions, to return False on - error, else True. Since uncaught errors are fatal anyway, this only - affects code with an error handler that returns, which is not - recommended and unsupported at this time. These changes are for - possible future error handling options. - -2007-11-22 - * Fix bug 1836528 "Insufficient checking of parameter values": - Rewrote CheckOption to correctly validate option choices. - (It previously accepted substrings and other incorrect values.) - PHPlot methods that use CheckOption now must be called with valid option - values. Empty strings are also no longer accepted. - -2007-11-17 (lbayuk) - * Change to callbacks to support extra arguments. - The PHPlot class can now pass extra arguments to a callback function. - Callback functions now take the following form: - my_callback($img, $passthru_arg, ...) - Where '...' is zero or more additional arguments supplied by PHPlot to - the callback. Each implemented callback reason will define any - additional arguments it uses. The existing defined callbacks have not - changed and do not currently pass any extra arguments. - -2007-11-10 (lbayuk) - * Fix bug 1827263 "Spoiled up pie-chart if $val is close to zero": - Skip pie slices which would result in an integer angle of zero - degrees, because the GD arc filling function will draw a complete - circle for that case. - Credit to Viacheslav for finding this. - - * Removed 8 of the functions (class methods) marked 'deprecated'. Only - deprecated functions which seem to have been for internal use have - been removed. Even old scripts shouldn't be using them, and they are - becoming a problem to maintain. - Removed: SetImageArea() DrawDotSeries() DrawLineSeries() CalcXHeights() - CalcYWidths() DrawLabels() InitImage() DrawDashedLine(). - -2007-10-20 (lbayuk) ===== Released as 5.0.4 ===== - * phplot.php: Updated copyright, version, and authors comments at top. - * README.txt: Updated for new release - * NEWS.txt: Add text for new release - -2007-10-18 (lbayuk) - * Add callbacks - experimental feature: - New functions SetCallback, GetCallback, RemoveCallback. - New internal function DoCallback. - Added callback hooks to DrawGraph. - - Re-arranged code in DrawGraph to bring pie chart drawing into the main - switch on plot type, rather than a special case in its own block. This - makes it easier to follow and easier to add callback hooks. - - * Callbacks: New file, documentation for the new callbacks feature. - (This won't be in the manual while it is an experimental feature.) - -2007-10-15 (lbayuk) - * Fix for bug 1813021: Miss-positioned right-justified vertical GD text. - Fixed DrawText() to correctly position 90 degree right-justified text - drawn in a fixed GD font. This could be seen with 90 degree Y tick - labels. (Found by accident while working on TrueType text problems.) - Also some code cleanup in DrawText: use elseif where appropriate. - -2007-10-09 (lbayuk) - * Code cleanup: Simplify SetIndexColor() and SetIndexDarkColor(). - There is no need to first try ImageColorExact, then ImageColorResolve - if that fails. ImageColorResolve does all that for us. - - Code cleanup: Rewrite SetRGBColor(). It now detects if an unrecognized - color name or color value form is used, and draws an error message. - Before this it would get a PHP index error and "headers already sent" - condition. - - * Code cleanup: Remove duplicated code for loading image files. - Added new class-private function GetImage() which loads an image based - on the image type, and also returns the image size. This replaces - duplicated code in tile_img() and SetInputFile(). - Also fixed comment at top of SetImageFile which said it was deprecated. - It isn't - it is used by the constructor. Moved the function out of the - 'deprecated' area up to below where it is used. - - * Code cleanup: PHPlot should not define or affect anything outside its - own class. - - Removed the check for __FUNCTION__ (PHP 4.3 and up). This is obsolete. - - Do not set error_reporting to E_ALL. Although it is recommended that - scripts do this, it is not the place of loaded classes to do it. - - Remove unused global constant TOTY. - - Removed constants MAXY and MINY. Global constants like this are bad. - These were used as magic index values into data[] to hold min and max Y - values for the row. Instead, put them in separate arrays which are - named data_miny[] and data_maxy[]. (This seems to be only used by the - data line drawing function.) - - Comment cleanup: Remove one commented-out partial function DrawPlotLabel, - and fix another commented-out code fragment in DrawYErrorBar. Both of - these had unmatched braces in them which caused a balance-braces check - to fail. - - * Code cleanup, array padding: Get rid of functions outside the class - and remove the interim fix for PHP 5 (which changed the behavior of - array_merge). Rewrote external function array_pad_array() as a new - class function pad_array(). It does not need access to the class, - but I don't think PHPlot should add to the global namespace more - than necessary. The third argument (array to use for padding) was - never used, so it was removed. It always pads the array with itself. - It now only works on 'usual integer indexed' arrays (0-based - sequential integer index). The was previously required but - undocumented for some of the arrays (like line_widths); now it is - required for all style arrays and will be documented. Now we can pad - the array to the required length, not just N times its previous - length, and we don't need array_merge. Deleted external function - array_merge_php4() as it is no longer used. - - Deleted PHP end marker ?>. You don't need this and it can cause - problems with extra whitespace in your output. - -2007-09-24 (lbayuk) - * Code cleanup: Fix ternary operator misuse. This doesn't change - behavior, but it was annoying me so I fixed it. - Replaced all cases of code like this: $a = ($a > $b) ? $b : $a - With just: if ($a > $b) $a = $b - - * Fix Makefile 'release' target to set owner/group when creating - the tar file. This avoids having to run it as root, but it needs - GNU tar to work. - -2007-09-08 (lbayuk) - * Fix for bug 1790441: Removed the PHPlot quasi-destructor function and - the register_shutdown_function() call which arranged for it to be used. - This was preventing release of memory when a PHPlot object was unset, - because the registered shutdown function held a reference to it. - So rather than improving memory use, it had the opposite effect. - Note: It is no longer necessary or recommended to use reference - assignment ($plot =& new PHPlot) for PHPlot object creation. - Thanks to annajilly for the thorough analysis, bug report, and fix. - -2007-09-05 (lbayuk) - * Rewrote FormatLabel() to ignore blank label values. Adapted from a - patch and feature request submitted by Gerhard Reithofer (exgerhardr). - Blank labels used to produce an error if the LabelType was set to - 'time', and zero if set to 'data'. Now they are just ignored. This - provides a simple way to have labels only at selected intervals when - using time or data formats. For example, you can have a date/time - label at every 10th data point by setting the labels for the other 9 - to be empty strings. Also: Removed $which_pos values 'plotx' and - 'ploty'. These were unused by PHPlot and this is an internal-only - function so there is no compatibility issue. Removed error checking on - $which_pos for the same reason; the error message used an undefined - variable anyway so it wouldn't have worked. - -2007-08-26 (lbayuk) - * Allow SetLegendStyle colorbox_align argument to be 'none', to suppress - the colorboxes in the legend. - - Fix comment on $legend_text_align: empty means right, not left. - - Rewrote DrawLegend layout code to make it easier to understand. The - result should be within 1 or 2 pixels of the previous size and position. - - * Fixes for bug 1779115: SetLegendWorld() fails on undefined vars - Store the given coordinates and remember that they need to be converted - from world to pixel coordinates, but defer trying to actually convert - them until it is time to draw the legend. This way, there are no - problems with the scale having to being set up first (which is nearly - impossible to do). Made the following changes: - - Changed legend class variables to be uninitialized, and unset (rather - than empty string) means use the defaults. Added a new variable: - $legend_xy_world. If it is set, (legend_x_pos, legend_y_pos) need to - be converted to pixel coords. If it is unset, they are already pixel - coords (or undefined, meaning defaults). - - Changed usage of internal function DrawLegend(): removed all arguments. - X and Y were always the class variables anyway, and now it needs to - also use the new flag to tell it if X and Y are world or pixel coords. - The third argument was unused. - - Removed third, unused, default NULL argument from SetLegendPixels and - SetLegendWorld. - - Changes to DrawLegend to convert x, y coords to pixel coordinates - if they came from SetLegendWorld. Also account for new usage of - the class variables: Test for unset to mean use default. - -2007-08-04 (lbayuk) - * New feature: control legend text and color box alignment. - Adds a new function SetLegendStyle to adjust the alignment of the - text and the color boxes inside the legend. - Based on part of bug 1208054, contributed by David Hernández Sanz. - -2006-12-02 (lbayuk) - * Fixes for bug 1605555: Y Data Labels use wrong font and not formatted. - Use y_label_font (not x_label_font) for Y Data Labels. - Use the formatted value for the label, not the original text. - (This applies to bar charts only, with the new Y data labels.) - - * One fix for bug 1208054: Localization of number format. - If number formatting is enabled with 'data' format type, PHPlot previously - used dot for decimal point and comma for thousands separator, and there - was no way to change it. - - This fix adds a new function: - SetNumberFormat($decimal_point, $thousands_separator) - to set the separators. In addition, if that function is not used, - PHPlot will now try to use locale-dependent separators. If locale - information is not available, it will fall back to the old defaults - of dot and comma. - - Note: This change may have some negative effects. 1) If your locale is - "C" or "Posix", you might not get a thousands separator now by default. - You should be using a more specific locale. 2) If your PHP script is - forcing a specific locale with setlocale(), PHPlot will probably undo - that because it uses setlocale(LC_ALL, '') to import locale information - from the environment. We have to do that, or a locale set through - the environment is ignored. But it will override a manually set locale. - - * Fix for bug 937944: X/Y Tick Counts - PHPlot could draw one too few Y tick marks, and one too many X tick marks. - - Changed the code to stop drawing X (Y) tick marks when the current X (Y) - value exceeds the maximum X (Y) value plus a small fudge factor. The fudge - factor accounts for cumulative error when repeatedly adding a delta to - the X (Y) value. - - Notes: The bug report was writing about Y tick counts only, but X tick - counts can also be wrong. The proposed fix in the bug report does not - work in all cases. - - This fix changes the appearance of many plots which were missing the - top-most Y tick mark. The extra X-tick mark problem is less common. - -===== Released as 5.0rc3 ===== - -2006-11-13 (lbayuk) - * Fix for bug 1437912: x-axis label misalignment [bar charts] - The calculations were redone from scratch. - New control variable 'bar_extra_space', which works in addition to - 'group_frac_width' to control how much extra space is around the bars. - Made bar widths match for 'stackedbars' and 1-bar-per-group 'bars'. - - NOTE: This changes the appearance of charts. bars in 'stackedbars' - will now be thinner, and bars in 'bars' graphs will be thicker. I - saw no reason for them being different before. - - This fix required fixing the positioning on the new bar data labels, - which was off before. The bar data labels will now be centered. - Additional fixes to bar chart data labels: - For negative values, the label will center under the bar. - Fixed X-adjustment to account for shading. - Fixed to not suppress the data label if the value is 0. - - -2006-11-10 (lbayuk) - * Fix for bug 1594457: DrawError text wrap and background fix - Do error image white background correctly, and word-wrap the text. - - * Fix for bug 1594458: Suppress lines or points in 'linepoints' - Don't draw X data labels twice for 'linepoints'. - Allow SetPointShapes value 'none' to suppress points, and allow - SetLineStyles value 'none' to suppress lines. This allows a 'linepoints' - graph to mix lines only, points only, and both on the same graph. - - -2006-11-09 (lbayuk) - * Fixes for bug 1446523: - + Wrong variable name in deprecated SetAxisFontSize() - + Fails to properly handle error if SetDataValues() was never - called, or not called with a data array. - - * Fix for bug 1117122: Pie Chart ignores SetPlotAreaPixels - Don't let DrawGraph recalculate the plot area for pie charts if the - user already set it with SetPlotAreaPixels. - - NOTE: This fix may slightly change the appearance of some pie charts, - whether or not they use SetPlotAreaPixels. - - * Fix for bug 1103992: Wrong max Y calculated for stackedbars - Changes FindDataLimits to calculate max Y correctly. It was counting - the first Y value in each record twice, which is always wrong but - only affected stackedbars because the Y values are summed. - - * Fix for bug 1096199: Wrong error bar colors in DrawDotsError. - Rewrites DrawDotsError to make it work like DrawLinesError to - correctly increment the record and color indexes. - Also fixes uninitialized x_now_pixels. - - * Fix for bug 1096197: No borders on unshaded Draw[Stacked]Bars - Unshaded Bars and StackedBars covered the border with the rectangle. - The fix is to draw the rectangle, then the border. - - NOTE: This fix changes chart appearance. Bars and Stacked Bars - will now get a black border around each bar by default, if you - turn off the 3D-shading. If you want borderless, unshaded bars - you need to use SetDataBorderColors to set the data border colors - to be the same as the data colors. - - * Fix for bug 1333164: Negative data values, if string variables, result - in unfilled bars. The problem was a string-to-string compare of a - negative number with the empty string x_axis_position. Fixed by - initializing x_axis_y_pixels to 0 if SetXAxisPosition was not used. - - -2005-04-17 (afan) - * Fix for bug [ 1161072 ] SetInputFile warning, background overwrite - - * Bug 1182672 fixed - -2005-04-15 (afan) - * fix for bug: [ 1182666 ] Y Auto-scale rounds in wrong direction - - * Fix for bugs 1144644 TrueType font path problems and 1106328 TTF - path/filename inconsistency - - * Fix Bug: [ 1117120 ] X Title sizing uses Y Title font height - -2005-04-13 (afan) - * Error in SetLineStyles() - does not accept an array argument - - -2005-03-29 (afan) - * Small typo fixed in SetYDataLabelPos - - * Update SetDataLabelPos: For past compatibility we accept plotleft, - ...but pass it to SetTickLabelPos - -2005-03-26 (afan) - * Change to line 3802: data lables now work with multiple bars with *$idx - -2005-03-25 (afan) - * Added Function DrawDataLabels to put data labels in world coords, - added call from DrawBars and modified SetYDataLabelPos to flag - whether or not to call DrawDataLabels. - -2005-01-20 (migueldb) - * Many bugfixes reported and solved by L. J. Bayuk. Thanks! - + fixed bug #1096190 - + FindDataLimits(): fixed bug #1096192 - + CalcTranslation(): fixed bug #1101317 - + DrawImageBorder(): fixed bug 1096200 - + DrawXDataLabel(): fixed bug 1099879 - + DrawDots(): fixed bug #1096194 - -===== Released as 5.0rc2 ===== - -2004-10-24 (migueldb) - * array_merge_php4(): added to cope with the bug introduced by - the change in array_merge() from PHP4 to PHP5 (I haven't verified this) - * Fixed some divisions by zero, thanks to an old bug report. - -2004-09-09 (migueldb) - * SetPointSize(): deprecated - * SetPointSizes(): added as replacement for SetPointSize(). - Now able to set point sizes on a per line basis. - * SetPointShape(): deprecated. - * SetPointShapes(): added as replacement for SetPointShape(). - Now able to set point shape on a per line basis. - * DrawDot(): now needs record number to decide which dot shape and - size to draw. - * CalcMargins(): dirty fix for x data label placing. - * tile_img(): fixed tile placement. - -2004-06-14 (migueldb) - * SetXTickLabelPos() and others: more on the bug reported by Jo Demol. - * Fixed bug reported by Jo Demol. - -2004-05-11 (migueldb) - * SetBgImage(): added. - * SetPlotAreaBgImage(): added. - * SetInputFile(): deprecated. - * DrawBackground(): now accepts images as backgrounds. - * DrawPlotAreaBackground(): now accepts images as backgrounds. - * tile_img(): internal method added. - -.......... -Editor's Note: For older changes to PHPlot, please see the CVS logs. +This is the Change Log for PHPlot. +The project home page is http://sourceforge.net/projects/phplot/ +----------------------------------------------------------------------------- + +2011-01-15 (lbayuk) ===== Released as 5.3.1 ===== + * phplot.php: Updated version + * README.txt: Updated for new release + * NEWS.txt: Add text for new release + +2011-01-09 + * Fixed some style / indent errors, and 1 redundant test. + +2011-01-03 + * For bug 3143586 "Multiple plots per image - fixes & docs": + Make sure there is a documented way to reset PHPlot feature + settings, especially those for which the default settings result + in automatic calculated values. Where possible, calling a Set*() + function with no arguments should reset the feature to defaults. + + + Changed SetLegendPixels() arguments to be optional with default + NULL meaning reset to automatic positioning. + + + Fixed SetXAxisPosition() and SetYAxisPosition() to accept empty + string '' to mean reset to default automatic positioning. + Make arguments optional, defaulting to empty string. + + + Changed SetNumXTicks() and SetNumYTicks() arguments to be + optional with default empty string '' meaning reset to + of automatic calculation. + + * Changed SetPointShapes() to use CheckOptionArray(). This + simplifies the function with no change in operation. + + * Extend copyright years to 2011. + +2010-12-30 + * Fix for bug 3147397 "Data colors missing with multiple plots": + + Do not truncate the data_colors and related arrays, so the full + set of colors will be available for subsequent plots on the image. + (Color indexes are still allocated in the image only as needed.) + + New internal functions GetColorIndexArray() and + GetDarkColorIndexArray(), replacing previous use of array_map(). + + Removed internal function truncate_array() - no longer used. + + Changed SetColorIndexes(), NeedDataDarkColors(), and + NeedErrorBarColors() to only allocate the color indexes that will + be needed (instead of allocating all colors in the truncated color + descriptor arrays). + +2010-12-28 + * Instead of throwing an error, SetLegend(NULL) now clears the legend + array. This can be useful with multiple plots on an image. Before + this change, only SetLegend(array()) did that (possibly by accident). + +2010-12-27 + * Do not have SetDefaultStyles() call deprecated SetLabelColor(). + + * Fixes for bug 3143586 "Multiple plots per image - fixes & docs": + + Fix DrawLegend so it doesn't forget that the legend position + was specified in world coordinates. This fixes the legend + position for plots after the first. + + Don't draw the image border more than once (although this would + probably have no impact on the resulting image). This parallels + the behavior for the main plot title and the image background. + Replaced member variables background_done and title_done with a new + member array done[] which will track when these elements were done. + +2010-12-06 + * Fix comments above CalcPlotAreaWorld(). Deleted incorrect information + from before data-data-yx existed, and before DecodeDataType rewrite. + +2010-12-04 (lbayuk) ===== Released as 5.3.0 ===== + * phplot.php: Updated version + * README.txt: Updated for new release + * NEWS.txt: Add text for new release + +2010-12-03 + * Feature request 3127005 "Ability to suppress X/Y axis lines": + Added SetDrawXAxis() and SetDrawYAxis() to control flags which + will suppress drawing the X or Y axis lines. (These lines were + probably the only PHPlot elements that could not be turned off.) + Changed DrawXAxis() and DrawYAxis() to conditionally draw the + axis lines. + +2010-11-28 + * Feature request 3117873 "Data value labels in more plot types": + Implemented Data Value Labels for plot types points, lines, + linepoints, and squared. Added 2 class variables which can be + set to control the distance and angle of the labels from points. + New internal function CheckDataValueLabels() calculates position + and text alignment for these labels. + + * Updated comments for Set[XY]DataLabelPos to match the text in + the manual, which was rewritten to clarify label types. + +2010-11-23 + * Code cleanup. Moved some functions around to group "plot drawing + helpers" separately from "plot drawing". No changes to operation. + +2010-11-21 + * Feature request 3111166 "Control legend colorbox width": + Added a class variable legend_colorbox_width which can be changed + to make the colorboxes wider or narrower. + +2010-11-16 + * Feature request 3093483 "Investing support chart types": + Added 3 new plot types: Basic OHLC (Open/High/Low/Close), Candlesticks, + and Filled Candlesticks. Implemented with one new function to handle the + 3 new plot types: ohlc, candlesticks, and candlesticks2. + +2010-11-11 + * Moved information about plot types into a new static member array + plots[]. (This is an internal change with no impact on usage, but will + make it easier to add new plot types.) SetPlotType() no longer needs a + list of plot types to check, FindDataLimits() does not need to check for + specific plot types to to process the data array, and DrawGraph() uses + data from the array rather than knowing about all the plot types. + +2010-10-31 + * Changed internal CalcBarWidths() to take two arguments which indicate + how it should calculate bar widths, rather than having it check the + plot_type directly. (Taken from another, experimental change. This + minimizes places where plot_type is directly used.) + +2010-10-03 (lbayuk) ===== Released as 5.2.0 ===== + * phplot.php: Updated version + * README.txt: Updated for new release + * NEWS.txt: Add text for new release + * Makefile: Removed HorizontalBars.txt from release. This is now all + documented in the reference manual. + +2010-10-01 + * Rewrite color handling. Default and specified colors are now validated, + converted to RGBA arrays, and saved. The colors indexes are not + allocated until graph drawing time. Unneeded colors are not allocated. + + Fix bug 3045131 "SetTransparentColor problems": Transparency setup is + deferred to graph drawing time, after most other colors are allocated. + Fixes SetTransparentColor order dependency, and works with data colors. + + Fix bug 3049726 "Optimize color allocation": Colors allocation is + deferred to graph drawing time, and colors for most elements are only + allocated if needed. In particular, the data colors and dark colors, + which used 32 slots, now only get defined as needed. + + Feature request (partial) 3077554 "Finer control over plot element + colors": The colors of the main, X, and Y titles can now be controlled + separately. + + Change details: + New internal functions: + GetColorIndex(), GetDarkColorIndex() + Allocate pre-parsed colors for elements. + SetColorIndexes() + Does the deferred color allocation and defaults. + NeedDataDarkColors(), NeedErrorBarColors() + Called by graph drawing functions if those colors are needed. + GetDataColor(), GetDataErrorColors(), GetBarColors() + Custom or standard data color assignment for most plot types. + truncate_array() + Shorten an array. Used to limit data color allocation. + + Removed internal functions: + SetIndexColor(), SetIndexDarkColor() + Unneeded. Color handling is now in two separate phases. + + Removed internal member variable: + data_colors_alpha + PHPlot no longer calls SetDataColors before plotting, so this + variable is not needed to preserve the default alpha. + + New internal member variables: + transparent_color + Saves color value from SetTransparentColor. For bug 3045131. + x_title_color, y_title_color, ndx_x_title_color, ndx_y_title_color + For title colors. DrawXTitle and DrawYTitle use them now. + + Changed internal member variables: + i_border, plot_bg_color, bg_color, label_color, text_color, etc. + All variables for colors now always hold a parsed 4-component + (RGBA) color specification as an array, and are no longer + statically initialized to a color name. + + New public functions: + SetXTitleColor(), SetYTitleColor() + These can be used to make the 3 titles have different colors. + +2010-09-26 + * Don't let SetXDataLabelPos() accept 'xaxis' or 'all' as valid. + Don't let SetXTickLabelPos(), SetYTickLabelPos() accept 'all' as valid. + These were never implemented and never documented. + + + * Feature request #3073679 "Stacked bar plots with negative values": + Allow stacked bar plots (vertical and horizontal) to work with negative + values. Changed FindDataLimits() to not take abs() values for + stackedbar when calculating the data range. Changed DrawStackedBars() + and DrawHorizStackedBars() to handle negative values, including proper + label positions. The first non-zero value in a row sets the direction + of the bar. Mixing positive and negative values within a row works but + the results are not useful. + + * New internal DrawBar() moves common code from 4 bars and stackedbars + drawing functions and makes it easier to deal with shading vs bar + direction. + +2010-09-24 + * Fix bug 3074402 "Fix Y axis default for horizontal plots": + Make the default axis positions symmetrical for vertical plots + (X and Y) and horizontal plots (Y and X). This fixes the problem + with horizontal bar/thinbarline plots that have negative data, + where the Y axis stayed on the left and the bars went rightward. + +2010-09-01 + * Fix bug 3056991 "Internal methods should be 'protected'": + Changed CheckDataArray(), number_format(), FindDataLimits(), and + DrawBackground() to be 'protected'. The test suite no longer calls + these directly. For SetIndexColor(), SetRGBColor(), DrawText(), + SizeText(), xtr(), and ytr(), left these as public with a comment + indicating they should be treated as protected. + + * Fix bug 3057000 "Review 'deprecated' methods": + + Changed deprecated method SetNewPlotAreaPixels() to just call + SetPlotAreaPixels(). It was suspicious as coded, and was found + to be equivalent to SetPlotAreaPixels(). + + Removed SetColor(), which didn't do anything. It was calling + SetRGBColor and discarding the result. After reviewing the + history of this in all CVS versions, it does not seem to have + ever been coded correctly, so there is no harm in removing it. + + All other deprecated methods seem OK and are left as is. + +2010-08-30 (lbayuk) ===== Released as 5.1.3 ===== + * phplot.php: Updated version + * README.txt: Updated for new release + * NEWS.txt: Add text for new release + +2010-08-27 + * Fix bug 3051832 "Let PHP/GD find the font file": + Instead of checking for file existence, PHPlot now uses a non-drawing GD + operation to validate a TrueType font in SetFontTTF(). This allows GD to + use its internal search path, making it likely that fonts can be found + without needing a platform-dependent path in your script. Full paths + will still work, so there is no compatibility issue. + + * Fix bug 3051906 "Better choice for default TT font": + Removed "benjamingothic.ttf" as the default TT font setting. This has + not been included in PHPlot since 2004. Changed SetFontTTF() to call + new GetDefaultFontTTF(), which will try a number of sans-serif font + names the first time it needs a default TT font. Considering the above + fix to finding fonts, this has a good chance of finding a working + font. It is known to work on Windows and some Linux distributions. + +2010-08-19 + * Makefile: Removed phplot_data.php from list of files to release. + Reference bug report 3048267. This file has not been maintained or + tested, and has bugs. It will remain in CVS, but not be included + in PHPlot releases. + +2010-08-17 + * Change new DrawLinePoints(). It does not have to check and + handle error bar plots, as DrawDots and DrawLines will do that. + +2010-08-16 + * Rewrote DecodeDataType(). Previous implementation was hard to + extend and inefficient. Now it uses new class variables (not a + returned array) and is only called once, by DrawGraph. Changed all + users of data_type to use the new variables. + + In CheckDataArray(), calculate data_columns properly for + text-data-single data type (pie chart) too. Simplify DrawPie + to use this, and merge 2 of the 3 cases. + + Have a single function handle each plot type, so it can properly + check the data type and report a correct error message showing + all supported types. For example, DrawBars is now the entry point + for both bars and horizontal bars; DrawGraph does not directly + call DrawHorizBars. Similar for DrawStackedBars and + DrawHorizStackedBars. Lines, Points, and Linepoints also now + have a single function each, dispatching to others as needed. + (These changes were split off from an upcoming, larger change.) + +2010-08-14 + * Fixes to SetDataValues: need to clear out the 2 arrays before + setting values in a loop, else if the function is used more than + once then old values will remain. + Move records_per_group calculation outside the loop. + (These were split off from upcoming, larger changes.) + + * Part 4 of horizontal plots: implement horizontal thinbarline plots. + Added new data type 'data-data-yx' (label, Y, X1, X2, ...). + DrawThinBarLines() now draws either vertical or horizontal plots, and + supports data types text-data, data-data, text-data-yx, data-data-yx. + + Fixed DecodeDataType() to handle text-data-single too, for completeness. + + * Fix for over-padding style and color arrays. These were padded to + records_per_group, but that is the maximum data array row size. + The number of actual data sets is less, and depends on the data type. + Calculate the correct number as data_columns at the top of DrawGraph, + and use that to pad the arrays. Also moved early error checking in + DrawGraph() into new CheckDataArray(). + +2010-08-09 + * Code cleanup. This is a large change to unify the comment and + coding stye used in PHPlot. The PEAR style guide is being used + as a reference, but PHPlot will never be 100% compliant. + This patch introduces no functional changes at all. + - Limit line length to 110. + - Remove obsolete, partially implemented Doxygen comments. + - Add descriptive comment above functions where missing. + - Use consistent comment markers and control structure spacing. + - Remove ctags-confusing end of function comments. + - Rewrote a few if/else blocks for cleaner logic. + - Re-order some functions for consistency (X, then Y). + +2010-08-04 + * Implemented horizontal stacked bar plots: + Use the same data type introduced for horizontal bars, 'text-data-yx', + and the same plot type 'stackedbars', to make a horizontal stacked bar + plot. Data value labels, both at the ends of the bars and within the + bars ('plotstack' labels) are available with horizontal stacked bars. + + * Internal function DrawDataLabel() is replaced by DrawDataValueLabel(), + with different usage. The new function can also check to see if a label + fits in the allocated space. + + * Fixed the text size check in stacked bar plots for data value labels + within the bars. The check only worked correctly for 0 degree labels. It + now works with any text angle. It suppresses the label if it is too high + (for vertical stacked bar plots) or too wide (for horizontal stacked bar + plots) to fit in the bar segment to which it belongs. Note that it only + checks in the bar direction. If the text is too wide (for vertical bars), + or too high (for horizontal bars), it will still be plotted, but will + cross the sides of the bar. + +2010-07-28 + * Allow callbacks to return a value (to support new data_color callback). + * Feature request 3034164 "Extended control of data colors": + Define new callback 'data_color' for picking the data color. + Changed internal plot drawing functions DrawDots, DrawLines, DrawSquared, + DrawBars, DrawStackedBars, DrawDotsError, DrawThinBarLines, + DrawLinesError, and DrawHorizBars to use the data_color callback + (if defined) to select the data colors. + * SetRGBArray code cleanup (no functional changes). + +2010-07-27 + * Fixes for error bars: + Code cleanup in DrawYErrorBar(), with no functional change. + Suppress duplicate drawing of error bars with 'linepoints' error plots. + This was already fixed for data labels. Now error bars will only be + drawn by the 'points' part, not the 'lines' part. There should be no + visible changes to plots. (This is needed for a future change). + +2010-07-26 + * Horizontal bar charts (still an experimental feature) can now have data + value labels. + * HorizontalBars.txt: Fix incorrect description of bar direction. Add + text explaining the new data value labels. + +2010-06-29 (lbayuk) ===== Released as 5.1.2 ===== + * phplot.php: Updated version + * README.txt: Updated for new release + * NEWS.txt: Add text for new release + +2010-06-26 + * Feature request 2885930 "Horizontal Bars": + Horizontal bar charts are implemented, as an experimental feature. + A new data type 'text-data-yx' was added, which works with + 'bars' plot type to produce a horizontal bar chart from a data + array with X values for each Y value. Changes were made to + FindDataLimits, CalcMargins, CalcPlotAreaWorld, CalcBarWidths, + and CalcMaxDataLabelSize to handle the new data type. Other + changes were made to handle label position defaults and grid + defaults. New drawing functions were added for horizontal bars. + + * HorizontalBars.txt: new documentation file for experimental feature. + * Makefile: List new documentation file. + +2010-06-25 + * Each plot-type drawing function now checks that it is getting a data + type that it knows how to handle. A new internal function unifies the + checking and error message. (This is associated with an upcoming, + bigger change.) + + Compatibility: If you were using an invalid data type for a plot type + whose function did not check, will now get an error. + + * Removed some dubious code from DrawLines() and DrawSquared() and + rewrote comments there. The code initialized lastx[0] and lasty[0], + but lasty was mapped using the X (rather than Y) function. This was + obviously wrong, but closer inspection showed that the values were + never, used so the code was removed. + +2010-06-13 + * Truecolor.txt: removed + * Makefile, README.txt: Removed reference to Truecolor.txt. Full + documentation for truecolor images is now in the Reference Manual. + +2010-06-02 + * Fix bug 3010116 "Bad rendering of title in multi-plot image + when using TTF": + Make sure the main title is drawn only once. (If drawn multiple + times with TrueType font text, the anti-aliasing effects result + in poor quality text.) + +2010-05-31 + * Improvements to truecolor support (from feature request 2947679): + Truecolor support is now better integrated. The derived class only + has the constructor now, and the base class itself provides the alpha + color component support through the internal functions SetIndexColor(), + SetIndexDarkColor(), and SetRGBColor(). This means alpha channel + works with palette images too (in so far as GD supports this). + + * Truecolor.txt: Updated per changes to truecolor support. + + * Image tiling with mode 'scale' in tile_img(), used with image and + plot area backgrounds, now uses imagecopyresampled() rather than + imagecopyresized(). They are the same with palette images, but the + resampled copy gets better results with truecolor images. + +2010-05-29 + * Feature request 3002606 "Add to plot and image border options": + Added options 'right', 'top', and 'bottom' to SetPlotBorderType() + (existing options are 'left', 'sides', 'none', and 'full'). This + now also accepts an array of the above options, giving complete + control over which sides to draw. + Added option 'solid' to SetImageBorderType() to use the actual + color set with SetImageBorderColor(), rather than the darker + shade as type 'plain' does (for some reason). + New function SetImageBorderWidth() sets the width of the image + border. The image border width is now accounted for in margin + calculations, although existing plots will not change. + +2010-04-04 (lbayuk) ===== Released as 5.1.1 ===== + * phplot.php: Updated version + * README.txt: Updated for new release + * NEWS.txt: Add text for new release + +2010-04-01 + * Remove & from argument in SetDataValues(). The data array is not + modified and does not need to be passed by reference. (There is + no performance advantage, either.) + +2010-03-29 + * Feature request 2947679 "Support for alpha blending/Truecolor": + Implemented truecolor image support with a new class + PHPlot_truecolor, extended color specifications to allow + specification of an alpha value, and added a new optional parameter + to SetDataColors for a default alpha value for all data colors. + This feature is *EXPERIMENTAL* (see next item). + + * Truecolor.txt: New file, documentation for the new truecolor capability. + (The Truecolor feature is experimental, which means it is subject to + change in incompatible ways and the documentation has not yet been + incorporated into the PHPlot Reference Manual.) + + * Makefile: Include new documentation file in release. + +2010-03-26 + Fixed bug 2976735 "Improvements and fixes for 'area' plots": + Rewrote DrawArea() function which handles 'area' plot. + Part 1: This is related to feature request 2947679, Truecolor support + with transparency. The area plot function was filling each area from the X + axis up to the Y value, resulting in area overlaps. This wasn't a problem + with opaque colors, but with transparency, the overlapping areas resulted + in changed colors. The rewritten function fills the area between each line + instead of from each line down to the X axis. Plots with opaque colors + will not change. + Part 2: Area plots now work when the X axis is moved up with + SetXAxisPosition(). + Part 3: Fixed FindDataLimits() for area (and stackedbars too) to + take absolute values of Y values. The drawing function was doing this, + but not FindDataLimits, resulting in incorrect limits if any Y<0. + Part 4: The rewritten DrawArea() also handles a new plot type + 'stackedarea'. This is an area plot where the Y values are stacked, + similar to 'stackedbars'. + Note: As part of the changes, it is now an error to try an area plot + with an unequal number of Y points for each X. + +2010-03-23 + * Feature request 2973995 "Add y-Data to Stackedbars": + Implemented Y Data Labels for Stacked Bar charts (stackedbars). + The labels are enabled with SetYDataLabelPos, same as with bar charts. + There are two types of labels: above the stack with the total, and + within the bars at each segment. 'plotin' turns on the upper ones, and + 'plotstack' turns both on. + + * Other changes: + + Removed unimplemented second argument to SetYDataLabelPos. + + Fixed questionable logic in SetYDataLabelPos when given an argument + that belongs with SetYTickLabelPos. + + Fix comments at top of plot-type Draw functions. + + * Fix for bug 2974639 "Stacked bars plot breaks with X axis != 0": + Stacked bar plots with non-zero X axis position no longer break apart + into segments with gaps. The bars are drawn up from the X axis, and + any segments or partial segments below the X axis are not drawn. + +2010-03-22 + * Change related to feature request 2947679 - Fix 'dot' point shape: + Use imagefilledellipse(), not imagefilledarc(), when drawing the 'dot' + point shape. The fix was needed for future support of truecolor images + with transparency, but filled dots from imagefilledellipse() look + better (rounder) with regular images and opaque colors. + Credit to mvaldez for identifying the problem and providing the fix. + +2010-03-04 + * Fix for bug 2963757 "point_counts undefined error in 5.1.0": + Fixed CheckPointParams so it sets point_counts even when the point shape + and point size arrays are already the same size and do not need padding. + +2010-01-26 + * Fix for bug 2938219 "Bars go in wrong direction": + Fixed CalcAxisPositions() to be consistent in positioning the X axis. + When all Y values are <0 and the Y=0 line is not part of the plot range, + PHPlot will now default the X axis to the top of the plot, not the + bottom. This fixes the problem with bars to negative Y values being + drawn downward if Y=0 is visible, but upward if Y=0 is not visible. + This also affects thinbarline plots. + Credit to lauryn1298 for finding the bug. + +2009-12-24 (lbayuk) ===== Released as 5.1.0 ===== + +2009-12-18 + * Change for bug 1795971 "Fix default data colors": + The default Data Color and Error Bar Color arrays now have 16 + different colors, no duplicates, and nothing so light that it + is invisible. + Using '' or False as the argument to SetDataColors, SetErrorBarColors, + and SetDataBorderColors now re-initializes the map to the defaults. + This was previously undocumented, and in some cases set the map to + something different from the default. + +2009-12-15 + * Cleanup: Remove DrawAxisLegend() - empty function marked TODO, + not really clear what it was meant to do. + +2009-12-14 + * Fix for bug 2914403 "Pie + X/Y titles: Undefined property error": + In DrawGraph(), don't try to draw X or Y titles for pie charts. + + * Feature request 2899921: "allow different format for data and tick + labels"; Bug 2906436: "Fixes for X Tick Labels vs X Data Labels", + and partial implementation of changes from user 'adoll' regarding + tick vs data labels: + + New public functions: + + SetXDataLabelType() : Sets formatting for X Data Labels + + SetYDataLabelType() : Sets formatting for Y Data Labels (bar charts) + + SetXDataLabelAngle() : Sets text angle for X Data Labels + + SetYDataLabelAngle() : Sets text angle for Y Data Label (bar charts) + The defaults for these are set up to be fully backward compatible + with previous releases of PHPlot (except see the next item). + + Re-used function name SetXDataLabelAngle(): + + This has been deprecated and undocumented since 2003-12-07, and + used to just call SetXLabelAngle(). For new behavior, see above. + + Changes to public functions: + + SetXDataLabelPos() and SetXTickLabelPos() no longer cancel each + other out (set the other control variable to 'none'). Instead, + they are both considered before plot drawing. + + Changes to internal functions: + + DrawDataLabel() now uses the font, angle, and color arguments as + provided, and does not substitute values if they are empty. + + SetLabelType() now takes mode='xd' and 'yd' for X Data and Y Data + label formatting; 'x' and 'y' are for tick labels only now. + + Functions that work on Data labels now call FormatLabel() with the + new mode parameter value 'xd' or 'yd, and use the new + data_label_angle variables. + + New CheckLabels(), used by DrawGraph to process label parameters. + + CalcMargins() - Rewritten to handle changes to Tick and Data labels. + + Changes to internal class variables: + + New: x_data_label_angle, y_data_label_angle + + Do not initialize x_tick_label_pos or x_data_label_pos, so that + CheckLabels() can tell if they were set or not and apply defaults. + + Initialize y_data_label_pos to 'none', not 'plotleft'. + + Add 2 more indexes to label_format[] array: 'xd' and 'yd'. + + * Cleanup: + + Delete unused internal class variable: draw_y_data_label_lines + + Delete unused function SetDrawYDataLabelLines() + +2009-12-07 + * Fix bug 1795972 "Fix default point shapes": + + Added 10 new point shapes to the existing 10 shapes. + + Changed the default point shape from all 'diamond' to a + selection of up to 10 different shapes. + + Fixed bug in the code that tried to set the point shapes + and sizes arrays to be the same size. This was not working, + resulting in unexpected point sizes. + + Changed default point size to 6 for all shapes. It was trying + to be "5, 5, 3" but due to several bugs this was not working. + + Do not adjust shape sizes to even numbers (was done for only two + shapes). Instead, consistently truncate size/2 when needed. + NOTE: These may change the look of 'points' and 'linepoints' plots. + + * Changed startup initialization code: + + SetDefaultStyles() was doing some odd things using a variable + called "session_set", with comments referring to non-existent + session support code. This has been removed. There should be + no visible changes from this. PHPlot does not use PHP sessions. + +2009-12-04 + * Fix for bug 2908256, errors in pie charts with bad data array: + (From a Drupal contrib module report by thekevinday.) + With pie charts only, a data array with no valid Y values resulted + in PHP error messages. All other plot types handle this by producing + an image without a graph. + Fixed DrawPieChart to behave this way too. If there are no valid Y + values, or if the sum of all Y values is 0, do not error out, but + don't draw a pie chart either. + Also, pie charts now ignore non-numeric Y values, like other plot types. + +2009-11-20 (lbayuk) + * Fix for bug 2900914 "Problem with display of 0 on Y axis": + Changed how X and Y values are stepped by tick intervals, to avoid + cumulative round-off error. This fixes the problem when Y crosses 0 with + a tick step such as 0.1 resulting in a long label for a very small but + non-zero number. Fixed DrawXTicks, DrawYTicks, and CalcMaxTickLabelSize. + (Originally reported by cncnet) + +2009-11-19 (lbayuk) + * Improve support for using callbacks to annotate plots: + Added new callback 'draw_all', called after all drawing. + Supply plot_area[] as argument to some drawing callbacks. + Added new method GetDeviceXY() to translate from world coordinates. + Allow NULL or '' for $font in DrawText() internal method, meaning to + use the generic font. If callbacks want to use DrawText, this + avoids them having to reference the internal fonts[] array. + +2009-11-01 (lbayuk) + * Address bug report 2886365 "Declare all functions and variables in + PHP5 style" + PHP5 deprecates the use of 'var' to declare a class member variable. + All initialized class member variables are now declared 'public'. + (It was tempting to make most or all 'protected' or 'private', but + that would likely break too much, including the PHPlot Test Suite.) + + Most class member functions which are meant for internal use only are + now declared 'protected', so they cannot be called from scripts + (except in child classes). (Note PHP5 does not deprecate the use of + just 'function' to mean public, so public functions were not changed.) + Internal functions are those documented in the manual under Developer's + Guide, Internal Functions. If your code breaks because you are using + a method which is now protected, please post the details on the help + forum. + + Some member variables which were set in the constructor are now + initialized with the class instead. (No impact.) + + Removed commented-out, FIXME-noted code for interim labels. + +2009-10-12 (lbayuk) + * Bug report 2839547, allow SetImageBorderType('none') to reset the image + border type. Also checked for other cases where there is no reset; + found one that exists (Set[XY]LabelType) but needs to be documented. + +2009-07-09 (lbayuk) + * Added a hook $plot->locale_override which can be set to True to prevent + PHPlot from loading locale settings from the environment with + setlocale(LC_ALL, ''). This is necessary for testing PHPlot on Windows, + where you cannot force a locale with an environment variable. It might + also be needed for people who want PHPlot's locale to differ from the + web server's locale. + +2009-06-12 (lbayuk) ===== Released as 5.0.7 ===== + +2009-06-11 (lbayuk) + * Change PHPlot license to LGPL, per Afan. + phplot.php, phplot_data.php - Change license notice. + rgb.inc.php - Change top comments and remove bottom marker. + COPYING - new file, text of LGPL. + LICENSE.* - removed files - old licenses. + Makefile - change list of distributed files. + + * Fix for bug 2803900: SetRGBArray('large') does not work. The include + file defined a different array name than the main script expected. + (This bug seems to have happened over 8 years ago.) Fixed the array + names to match. Also removed the ./ prefix from the included filename + so it will be found if on the include path but not in the script + directory. Also added error check if the rgb.inc.php include file + is needed and not found. + +2009-05-25 (lbayuk) + * Added new feature to allow partial margin or plot area specification. + You can omit, or specify as NULL, any of the 4 arguments to + SetMarginsPixels() or SetPlotAreaPixels(), and this means PHPlot + should use the automatically calculated margin on that side. + Credit to adoll for this feature. + +2009-05-17 (lbayuk) + * Fix for bug 2791502 "Error plots treat missing Y values as 0": + Plots with data type data-data-error now support missing Y values, + instead of treating them as 0. This works with lines, points, + and linepoints plot types, and also honors SetDrawBrokenLines. + + + * Fix for bug 2792860 "Wrong DataLabelLines with missing Y": + Do not draw X Data Label Lines at points with missing Y values. + + + * Fix for bug 2786350 "Missing Y data results in bad auto-range": + Rewrote FindDataLimits to ignore missing Y values, rather than + treating them as if 0, for calculating range. + Bug report and analysis by mrten. + + * Fix for bug 2786354 "Incorrect auto-range for data-data-error": + For data-data-error data type, apply the positive and negative error + amounts for each Y point to that point only, rather than applying the + largest errors to the overall minimum and maximum Y value for the row. + + Note: The two fixes above can change existing plots which rely on + automatic Y range calculation. The first fix affects plots with + missing Y values and min(Y)>0. The second fix can affect plots using + data-data-error data type and different error values for different + points. In both cases the new Y range can be smaller than before. + +2009-01-20 (lbayuk) ===== Released as 5.0.6 ===== + +2009-01-18 (lbayuk) + * Fix for bug 1891636 "Misaligned TTF X Labels": + PHPlot was using the actual bounding box of each line of text + to allocate space and set the text positioning, but was ignoring the + fact that the text baseline is not the same as the bottom of the + bounding box. This resulted in uneven alignment of the X labels if + they had different heights (for example, month names Jul and Aug). + + PHPlot now calculates the size of text for allocation (SizeText) using + the descenders on the last line, and calculates the size for drawing + (DrawText) only to the baseline. PHPlot also now uses a fixed line + spacing for each line of text in a font, rather than the actual text + height. This allows separately drawn multi-line labels to align. + + * Changes to line spacing when using multi-line labels: + PHPlot was using the class variable line_spacing to mean the + number of pixels between lines of multi-line labels. This made the + spacing too small for larger fonts, and it was not possible to adjust + line spacing for different types of text. + + PHPlot now interprets line_spacing as the number of pixels only + for GD text, and as a scale factor for the font's built-in line + spacing for TrueType text. In addition, a new optional argument is + added to SetFont, SetFontGD, and SetFontTTF to set a line spacing + specific to that type of text. + + * Changes had to be made to the legend drawing code to accommodate the + changes to font handling. + + Note: The line spacing change results in slightly looser spacing on + multi-line TrueType text labels, and slightly taller legends, compared + to version 5.0.5. + +2008-09-21 (lbayuk) + * Interim fix for bug 1932571 "Data-Data Plot fails with same X values". + PHPlot will no longer hang when the range of X values is 0 (that is, when + x_min == x_max). It will arbitrarily set an X range of 1, so the + calculated tick step is not 0. This is a temporary fix. Work on a smarter + X and Y range calculation is in progress, which will handle edge cases + like this better, but it isn't ready and this bug has been open too long. + Credit to andyl for finding the bug. + + * Fix font path: Use DIRECTORY_SEPARATOR constant not '/'. + + Extended the label formatting capabilities, adding 'printf' and 'custom' + types, added a prefix and suffix for 'data' type, and allow format controls + to be included in SetXLabelType and SetYLabelType. + + External changes: + * Added 'printf' label type. The caller specifies the print format as the + 2nd argument to SetXLabelType or SetYLabelType (default '%e'). + $plot->SetXLabelType('printf', '%5.2f'); + + * Added 'custom' label type. The caller supplies a callback (typically a + function name) and optional pass-through argument as the 2nd and 3rd + arguments to Set[XY]LabelType. The function is called as $f($value, $arg) + to return the formatted $value. + $plot->SetXLabelType('custom', 'myfunction', $arg_value); + + * In addition to Set[XY]TimeFormat, the format string for type 'time' can + now be set as the 2nd argument to Set[XY]LabelType. + $plot->SetXLabelType('time', '%H:%M'); + + * In addition to SetPrecision[XY], the precision for type 'data' can now be + set as the 2nd argument to Set[XY]LabelType. A 3rd and 4th argument + can supply a prefix and suffix for 'data' formatting. (All optional) + $plot->SetXLabelType('data', 2, '$', 'US'); + + Internal changes: + * Class variables x_precision, y_precision, x_label_type, y_label_type, + x_time_format, and y_time_format have been removed. + + * New class array variable label_format[], with elements 'x' and 'y' which + are arrays for label formatting. Elements in the sub-arrays are not + initialized until needed. + + * New function SetLabelType, which implements Set[XY]LabelType now. + + * FormatLabel() was rewritten to support the new label formatting. + + Compatibility: + * Any code that directly references class variables related to label + formatting will break, except for data_units_text. Use the documented + function methods instead. Setting data_units_text as a suffix is + deprecated but still works. + + * The 'data' type precision for 'Y' is still used for pie chart labels. + +2008-07-12 (lbayuk) + Multiple comment spelling error fixes. No functional changes. + +2008-07-06 (lbayuk) + Changes to allow mixing GD fixed-font text and TrueType Font (TTF) text + on the same plot. + (This change came from work done trying to fix TTF text positioning, + where it looks like additional information needs to be stored for TrueType + fonts. The old font data structure was awkward to extend, and allowing + mixed GD/TTF text was on the to-do list anyway.) + + External changes: + * SetFontGD(), SetFontTTF(): New functions to set a font, with type. + * SetFont(): Now calls SetFontGD or SetFontTTF depending on $use_ttf. + These changes should be fully compatible with existing programs. + + Internal changes: + * Updated comments explaining SetUseTTF() now sets the default type + (not the only type) of text used. + * Put all the font data into a class array. (Replaces $this->generic_font + with $this->fonts['generic'], etc.) + * ProcessTextGD() and ProcessTextTTF() now take the font array as one + argument, rather than separate arguments for font path and size. + +2008-01-13 (lbayuk) ===== Released as 5.0.5 ===== + * phplot.php: Updated version + * README.txt: Updated for new release + * NEWS.txt: Add text for new release + * Makefile: Remove 'Callbacks' from release target, as this material is + now in the reference manual. + +2008-01-07 (lbayuk) + Copyright updated to 2008 and PHP4 no longer listed as supported. + + Major rewrite of the margin calculation functions to address multiple + problems. Fixes for bugs 1856207 "Margin error with 'xaxis'/'yaxis' + position, 1843012 "Make margins, drawing consistent", and 945439 + "x_tick_label_height not set correctly". + + Note: These changes are inter-dependent and cannot be split up. + + * Defer all calculations to DrawGraph time, to eliminate order dependencies. + These functions now just store their arguments in the object, and all + calculations happen later: + + SetXAxisPosition, SetYAxisPosition + + SetMarginsPixels + + SetPlotAreaPixels (Stores margins, not area, now.) + + SetPlotAreaWorld + + SetXTickIncrement, SetYTickIncrement + + * A new callback 'debug_scale' was added to trace the margin and scale + calculations. + + * CalcMargins was rewritten. Actual sizes of tick and data labels are now + used, rather than guesses like "use size of biggest Y value". A minimum + value (3 x safe_margin, or 15 pixels) applies to each margin. + + * FindDataLimits no longer needs to find the longest data label, since + CalcMargins now does that more precisely. + + * DrawXTitle and DrawYTitle now use position offsets calculated by + CalcMargins. Note: These titles are now offset from the plot area, + not the image area. The titles will move if you had set the plot area + or margins. + + * DrawYTick, DrawXTick rewritten to use pre-calculated offsets, and common + code moved to new CalcTicks(). + + * DrawXDataLabel: Use pre-calculated offsets for text. + + * DrawGraph: Rewrote top section (before drawing anything) to do the + calculations in the proper order, unconditionally. + + * Class variables removed: + x_label_inc, y_label_inc, _x_label_cnt : These were never used. + title_height, x_title_height, y_title_width : Now internal to CalcMargins. + data_limits_done : No more need to remember if FindDataLimits called. + + * New class variables added: + plot_margins_set : Keeps track of user-set plot area or automatic. + x_label_top_offset, x_label_bot_offset, x_offset_axis_offset, + y_label_left_offset, y_label_right_offset, y_label_axis_offset, + x_title_top_offset, x_title_bot_offset, + y_title_left_offset, y_title_left_offset : Label offsets + + * New internal functions: + CalcPlotAreaPixels : Deferred calculations taken out of SetPlotAreaPixels + and SetMarginsPixels. + CalcPlotAreaWorld : Deferred calculations taken out of SetPlotAreaWorld. + CalcAxisPositions : Calculate axis positions, moved from CalcTranslation. + CalcTicks : Calculate X and Y tick interval. This still uses the + same simple method (basically range/10), but now we could drop in a new + algorithm much more easily. This is now also used by CalcMargins. + Code taken out of DrawXTicks and DrawYTicks. + CalcMaxTickLabelSize : So CalcMargins can use the exact tick label sizes. + CalcMaxDataLabelSize : So CalcMargins can use the exact data label sizes. + DrawXTick : Code split out from DrawXTicks for symmetry with DrawYTick. + + +2007-12-13 (lbayuk) + * Changed ProcessTextTTF() so SizeText() will return integers. It rounds + the calculated values up, so the bounding box really contains the text. + This also prevents unneeded float calculations in derived values. + +2007-12-09 (lbayuk) + Major rewrite of the text drawing functions to address multiple problems. + Note: These changes are inter-dependent and cannot be split up. + + * Fixed bug 1813070 "Bad position for multi-line TrueType text": + TTF text is now drawn line-by-line, not as a block, for proper + alignment and positioning. + + * Fixed bug 1813071 "Wrong title height for multi-line TTF text": + Corrected miscalculation of overall height of multi-line TTF titles. + This bug resulted in over-sized margins. + The height is now computed line-by-line, including the inter-line spacing. + + * Fixed bug 1813474 "DrawText alignment arguments wrong": + Corrected meaning of 'top' vs 'bottom' alignment. PHPlot now follows + the usual conventions: 'top' alignment means top of text to reference. + DrawText default for vertical alignment is still 'bottom', but the + meaning was corrected. All callers of DrawText were fixed. + + * Fixed bug 1816844 "Fix order dependency for setting titles": + Defer processing titles strings until DrawGraph(), so there is no + more order dependency (no need to set font before setting title strings). + + * Fixed bug 1819668 "Horiz. align multi-line text: GD vs TTF": + The new text routines draw TTF text line-by-line and correctly do + right-, center-, and left- alignment of each line within a text block. + + * Fixed bug 1826513 "FIXME in DrawLegend: Max label length": + Use actual width of widest legend line to calculate legend box size. + + * Partial fix for bug 945439 "x_tick_label_height not set correctly": + In FindDataLimits(), save the longest data label, not just its length, + and use the actual rendered size of that string in CalcMargins() for + the margin calculations. + Also take into account which of the tick or data labels are visible. + This is not a complete fix, but is a significant improvement. + + The following changes were made related to the above fixes: + + + Replaced internal function TTFBBoxSize(), which didn't work right, with + SizeText(). It returns the orthogonal bounding box of a block of text, + and works with both GD and TTF text. + + + DrawText() and SizeText() call a single function ProcessText(), which is + the only place GD text and TTF text are distinguished. (So eventually + we will be able to mix GD and TTF text on a plot.) + + + New internal functions ProcessTextGD() and ProcessTextTTF() draw (or size) + GD and TTF text respectively. These are only called by ProcessText(). + These are re-implementations which properly position and align text. + + + Removed class variables title_angle, x_title_angle, and y_title_angle. The + titles only work at their fixed angles anyway (0, 0, and 90 respectively). + + + Line spacing set with SetLineSpacing() now affects TTF text as well as + GD text. Previously, it only affected GD text. The default line spacing + happens to be usable for TTF text. + + + Added new callback hook 'debug_textbox' for developing, testing, and + documenting. It provides access to the text area bounding box. + + + Removed unneeded class variables x_tick_label_height, y_tick_label_width, + x_tot_margin, y_tot_margin. + +2007-11-25 + * Improve error handling: + Internal functions PrintError() and DrawError() are now the same. Both + will draw the error message into the image and output it, and then + trigger a user-level error. If no error handler has been set, it will + exit, as before. But now the error message should also get logged, or + written to the standard error stream, depending on the SAPI in use. + You can now establish an error handler to catch most PHPlot errors and + do some cleanup before exit. + + This fix also covers bug #1823774 "Default Font Path and Error Message + Output". + + Fixed the return value of most PHPlot functions, to return False on + error, else True. Since uncaught errors are fatal anyway, this only + affects code with an error handler that returns, which is not + recommended and unsupported at this time. These changes are for + possible future error handling options. + +2007-11-22 + * Fix bug 1836528 "Insufficient checking of parameter values": + Rewrote CheckOption to correctly validate option choices. + (It previously accepted substrings and other incorrect values.) + PHPlot methods that use CheckOption now must be called with valid option + values. Empty strings are also no longer accepted. + +2007-11-17 (lbayuk) + * Change to callbacks to support extra arguments. + The PHPlot class can now pass extra arguments to a callback function. + Callback functions now take the following form: + my_callback($img, $passthru_arg, ...) + Where '...' is zero or more additional arguments supplied by PHPlot to + the callback. Each implemented callback reason will define any + additional arguments it uses. The existing defined callbacks have not + changed and do not currently pass any extra arguments. + +2007-11-10 (lbayuk) + * Fix bug 1827263 "Spoiled up pie-chart if $val is close to zero": + Skip pie slices which would result in an integer angle of zero + degrees, because the GD arc filling function will draw a complete + circle for that case. + Credit to Viacheslav for finding this. + + * Removed 8 of the functions (class methods) marked 'deprecated'. Only + deprecated functions which seem to have been for internal use have + been removed. Even old scripts shouldn't be using them, and they are + becoming a problem to maintain. + Removed: SetImageArea() DrawDotSeries() DrawLineSeries() CalcXHeights() + CalcYWidths() DrawLabels() InitImage() DrawDashedLine(). + +2007-10-20 (lbayuk) ===== Released as 5.0.4 ===== + * phplot.php: Updated copyright, version, and authors comments at top. + * README.txt: Updated for new release + * NEWS.txt: Add text for new release + +2007-10-18 (lbayuk) + * Add callbacks - experimental feature: + New functions SetCallback, GetCallback, RemoveCallback. + New internal function DoCallback. + Added callback hooks to DrawGraph. + + Re-arranged code in DrawGraph to bring pie chart drawing into the main + switch on plot type, rather than a special case in its own block. This + makes it easier to follow and easier to add callback hooks. + + * Callbacks: New file, documentation for the new callbacks feature. + (This won't be in the manual while it is an experimental feature.) + +2007-10-15 (lbayuk) + * Fix for bug 1813021: Miss-positioned right-justified vertical GD text. + Fixed DrawText() to correctly position 90 degree right-justified text + drawn in a fixed GD font. This could be seen with 90 degree Y tick + labels. (Found by accident while working on TrueType text problems.) + Also some code cleanup in DrawText: use elseif where appropriate. + +2007-10-09 (lbayuk) + * Code cleanup: Simplify SetIndexColor() and SetIndexDarkColor(). + There is no need to first try ImageColorExact, then ImageColorResolve + if that fails. ImageColorResolve does all that for us. + + Code cleanup: Rewrite SetRGBColor(). It now detects if an unrecognized + color name or color value form is used, and draws an error message. + Before this it would get a PHP index error and "headers already sent" + condition. + + * Code cleanup: Remove duplicated code for loading image files. + Added new class-private function GetImage() which loads an image based + on the image type, and also returns the image size. This replaces + duplicated code in tile_img() and SetInputFile(). + Also fixed comment at top of SetImageFile which said it was deprecated. + It isn't - it is used by the constructor. Moved the function out of the + 'deprecated' area up to below where it is used. + + * Code cleanup: PHPlot should not define or affect anything outside its + own class. + - Removed the check for __FUNCTION__ (PHP 4.3 and up). This is obsolete. + - Do not set error_reporting to E_ALL. Although it is recommended that + scripts do this, it is not the place of loaded classes to do it. + - Remove unused global constant TOTY. + - Removed constants MAXY and MINY. Global constants like this are bad. + These were used as magic index values into data[] to hold min and max Y + values for the row. Instead, put them in separate arrays which are + named data_miny[] and data_maxy[]. (This seems to be only used by the + data line drawing function.) + + Comment cleanup: Remove one commented-out partial function DrawPlotLabel, + and fix another commented-out code fragment in DrawYErrorBar. Both of + these had unmatched braces in them which caused a balance-braces check + to fail. + + * Code cleanup, array padding: Get rid of functions outside the class + and remove the interim fix for PHP 5 (which changed the behavior of + array_merge). Rewrote external function array_pad_array() as a new + class function pad_array(). It does not need access to the class, + but I don't think PHPlot should add to the global namespace more + than necessary. The third argument (array to use for padding) was + never used, so it was removed. It always pads the array with itself. + It now only works on 'usual integer indexed' arrays (0-based + sequential integer index). The was previously required but + undocumented for some of the arrays (like line_widths); now it is + required for all style arrays and will be documented. Now we can pad + the array to the required length, not just N times its previous + length, and we don't need array_merge. Deleted external function + array_merge_php4() as it is no longer used. + + Deleted PHP end marker ?>. You don't need this and it can cause + problems with extra whitespace in your output. + +2007-09-24 (lbayuk) + * Code cleanup: Fix ternary operator misuse. This doesn't change + behavior, but it was annoying me so I fixed it. + Replaced all cases of code like this: $a = ($a > $b) ? $b : $a + With just: if ($a > $b) $a = $b + + * Fix Makefile 'release' target to set owner/group when creating + the tar file. This avoids having to run it as root, but it needs + GNU tar to work. + +2007-09-08 (lbayuk) + * Fix for bug 1790441: Removed the PHPlot quasi-destructor function and + the register_shutdown_function() call which arranged for it to be used. + This was preventing release of memory when a PHPlot object was unset, + because the registered shutdown function held a reference to it. + So rather than improving memory use, it had the opposite effect. + Note: It is no longer necessary or recommended to use reference + assignment ($plot =& new PHPlot) for PHPlot object creation. + Thanks to annajilly for the thorough analysis, bug report, and fix. + +2007-09-05 (lbayuk) + * Rewrote FormatLabel() to ignore blank label values. Adapted from a + patch and feature request submitted by Gerhard Reithofer (exgerhardr). + Blank labels used to produce an error if the LabelType was set to + 'time', and zero if set to 'data'. Now they are just ignored. This + provides a simple way to have labels only at selected intervals when + using time or data formats. For example, you can have a date/time + label at every 10th data point by setting the labels for the other 9 + to be empty strings. Also: Removed $which_pos values 'plotx' and + 'ploty'. These were unused by PHPlot and this is an internal-only + function so there is no compatibility issue. Removed error checking on + $which_pos for the same reason; the error message used an undefined + variable anyway so it wouldn't have worked. + +2007-08-26 (lbayuk) + * Allow SetLegendStyle colorbox_align argument to be 'none', to suppress + the colorboxes in the legend. + + Fix comment on $legend_text_align: empty means right, not left. + + Rewrote DrawLegend layout code to make it easier to understand. The + result should be within 1 or 2 pixels of the previous size and position. + + * Fixes for bug 1779115: SetLegendWorld() fails on undefined vars + Store the given coordinates and remember that they need to be converted + from world to pixel coordinates, but defer trying to actually convert + them until it is time to draw the legend. This way, there are no + problems with the scale having to being set up first (which is nearly + impossible to do). Made the following changes: + + Changed legend class variables to be uninitialized, and unset (rather + than empty string) means use the defaults. Added a new variable: + $legend_xy_world. If it is set, (legend_x_pos, legend_y_pos) need to + be converted to pixel coords. If it is unset, they are already pixel + coords (or undefined, meaning defaults). + + Changed usage of internal function DrawLegend(): removed all arguments. + X and Y were always the class variables anyway, and now it needs to + also use the new flag to tell it if X and Y are world or pixel coords. + The third argument was unused. + + Removed third, unused, default NULL argument from SetLegendPixels and + SetLegendWorld. + + Changes to DrawLegend to convert x, y coords to pixel coordinates + if they came from SetLegendWorld. Also account for new usage of + the class variables: Test for unset to mean use default. + +2007-08-04 (lbayuk) + * New feature: control legend text and color box alignment. + Adds a new function SetLegendStyle to adjust the alignment of the + text and the color boxes inside the legend. + Based on part of bug 1208054, contributed by David Hernández Sanz. + +2006-12-02 (lbayuk) + * Fixes for bug 1605555: Y Data Labels use wrong font and not formatted. + Use y_label_font (not x_label_font) for Y Data Labels. + Use the formatted value for the label, not the original text. + (This applies to bar charts only, with the new Y data labels.) + + * One fix for bug 1208054: Localization of number format. + If number formatting is enabled with 'data' format type, PHPlot previously + used dot for decimal point and comma for thousands separator, and there + was no way to change it. + + This fix adds a new function: + SetNumberFormat($decimal_point, $thousands_separator) + to set the separators. In addition, if that function is not used, + PHPlot will now try to use locale-dependent separators. If locale + information is not available, it will fall back to the old defaults + of dot and comma. + + Note: This change may have some negative effects. 1) If your locale is + "C" or "Posix", you might not get a thousands separator now by default. + You should be using a more specific locale. 2) If your PHP script is + forcing a specific locale with setlocale(), PHPlot will probably undo + that because it uses setlocale(LC_ALL, '') to import locale information + from the environment. We have to do that, or a locale set through + the environment is ignored. But it will override a manually set locale. + + * Fix for bug 937944: X/Y Tick Counts + PHPlot could draw one too few Y tick marks, and one too many X tick marks. + + Changed the code to stop drawing X (Y) tick marks when the current X (Y) + value exceeds the maximum X (Y) value plus a small fudge factor. The fudge + factor accounts for cumulative error when repeatedly adding a delta to + the X (Y) value. + + Notes: The bug report was writing about Y tick counts only, but X tick + counts can also be wrong. The proposed fix in the bug report does not + work in all cases. + + This fix changes the appearance of many plots which were missing the + top-most Y tick mark. The extra X-tick mark problem is less common. + +===== Released as 5.0rc3 ===== + +2006-11-13 (lbayuk) + * Fix for bug 1437912: x-axis label misalignment [bar charts] + The calculations were redone from scratch. + New control variable 'bar_extra_space', which works in addition to + 'group_frac_width' to control how much extra space is around the bars. + Made bar widths match for 'stackedbars' and 1-bar-per-group 'bars'. + + NOTE: This changes the appearance of charts. bars in 'stackedbars' + will now be thinner, and bars in 'bars' graphs will be thicker. I + saw no reason for them being different before. + + This fix required fixing the positioning on the new bar data labels, + which was off before. The bar data labels will now be centered. + Additional fixes to bar chart data labels: + For negative values, the label will center under the bar. + Fixed X-adjustment to account for shading. + Fixed to not suppress the data label if the value is 0. + + +2006-11-10 (lbayuk) + * Fix for bug 1594457: DrawError text wrap and background fix + Do error image white background correctly, and word-wrap the text. + + * Fix for bug 1594458: Suppress lines or points in 'linepoints' + Don't draw X data labels twice for 'linepoints'. + Allow SetPointShapes value 'none' to suppress points, and allow + SetLineStyles value 'none' to suppress lines. This allows a 'linepoints' + graph to mix lines only, points only, and both on the same graph. + + +2006-11-09 (lbayuk) + * Fixes for bug 1446523: + + Wrong variable name in deprecated SetAxisFontSize() + + Fails to properly handle error if SetDataValues() was never + called, or not called with a data array. + + * Fix for bug 1117122: Pie Chart ignores SetPlotAreaPixels + Don't let DrawGraph recalculate the plot area for pie charts if the + user already set it with SetPlotAreaPixels. + + NOTE: This fix may slightly change the appearance of some pie charts, + whether or not they use SetPlotAreaPixels. + + * Fix for bug 1103992: Wrong max Y calculated for stackedbars + Changes FindDataLimits to calculate max Y correctly. It was counting + the first Y value in each record twice, which is always wrong but + only affected stackedbars because the Y values are summed. + + * Fix for bug 1096199: Wrong error bar colors in DrawDotsError. + Rewrites DrawDotsError to make it work like DrawLinesError to + correctly increment the record and color indexes. + Also fixes uninitialized x_now_pixels. + + * Fix for bug 1096197: No borders on unshaded Draw[Stacked]Bars + Unshaded Bars and StackedBars covered the border with the rectangle. + The fix is to draw the rectangle, then the border. + + NOTE: This fix changes chart appearance. Bars and Stacked Bars + will now get a black border around each bar by default, if you + turn off the 3D-shading. If you want borderless, unshaded bars + you need to use SetDataBorderColors to set the data border colors + to be the same as the data colors. + + * Fix for bug 1333164: Negative data values, if string variables, result + in unfilled bars. The problem was a string-to-string compare of a + negative number with the empty string x_axis_position. Fixed by + initializing x_axis_y_pixels to 0 if SetXAxisPosition was not used. + + +2005-04-17 (afan) + * Fix for bug [ 1161072 ] SetInputFile warning, background overwrite + + * Bug 1182672 fixed + +2005-04-15 (afan) + * fix for bug: [ 1182666 ] Y Auto-scale rounds in wrong direction + + * Fix for bugs 1144644 TrueType font path problems and 1106328 TTF + path/filename inconsistency + + * Fix Bug: [ 1117120 ] X Title sizing uses Y Title font height + +2005-04-13 (afan) + * Error in SetLineStyles() - does not accept an array argument + + +2005-03-29 (afan) + * Small typo fixed in SetYDataLabelPos + + * Update SetDataLabelPos: For past compatibility we accept plotleft, + ...but pass it to SetTickLabelPos + +2005-03-26 (afan) + * Change to line 3802: data lables now work with multiple bars with *$idx + +2005-03-25 (afan) + * Added Function DrawDataLabels to put data labels in world coords, + added call from DrawBars and modified SetYDataLabelPos to flag + whether or not to call DrawDataLabels. + +2005-01-20 (migueldb) + * Many bugfixes reported and solved by L. J. Bayuk. Thanks! + + fixed bug #1096190 + + FindDataLimits(): fixed bug #1096192 + + CalcTranslation(): fixed bug #1101317 + + DrawImageBorder(): fixed bug 1096200 + + DrawXDataLabel(): fixed bug 1099879 + + DrawDots(): fixed bug #1096194 + +===== Released as 5.0rc2 ===== + +2004-10-24 (migueldb) + * array_merge_php4(): added to cope with the bug introduced by + the change in array_merge() from PHP4 to PHP5 (I haven't verified this) + * Fixed some divisions by zero, thanks to an old bug report. + +2004-09-09 (migueldb) + * SetPointSize(): deprecated + * SetPointSizes(): added as replacement for SetPointSize(). + Now able to set point sizes on a per line basis. + * SetPointShape(): deprecated. + * SetPointShapes(): added as replacement for SetPointShape(). + Now able to set point shape on a per line basis. + * DrawDot(): now needs record number to decide which dot shape and + size to draw. + * CalcMargins(): dirty fix for x data label placing. + * tile_img(): fixed tile placement. + +2004-06-14 (migueldb) + * SetXTickLabelPos() and others: more on the bug reported by Jo Demol. + * Fixed bug reported by Jo Demol. + +2004-05-11 (migueldb) + * SetBgImage(): added. + * SetPlotAreaBgImage(): added. + * SetInputFile(): deprecated. + * DrawBackground(): now accepts images as backgrounds. + * DrawPlotAreaBackground(): now accepts images as backgrounds. + * tile_img(): internal method added. + +.......... +Editor's Note: For older changes to PHPlot, please see the CVS logs. diff --git a/gui/bacula-web/external_packages/phplot/NEWS.txt b/gui/bacula-web/external_packages/phplot/NEWS.txt index fdd99fe18a..4d9982019f 100644 --- a/gui/bacula-web/external_packages/phplot/NEWS.txt +++ b/gui/bacula-web/external_packages/phplot/NEWS.txt @@ -1,1047 +1,1047 @@ -This is the NEWS file for PHPlot, with release documentation. -The project web site is http://sourceforge.net/projects/phplot/ -The project home page is http://phplot.sourceforge.net/ -Refer the the ChangeLog file for detailed source changes. ------------------------------------------------------------------------------ - -2011-01-15 Release 5.3.1 - -Overview: - -This is the current stable release of PHPlot. This release focuses on -providing better support and documentation for creating multiple plots on a -single image. - -The PHPlot reference manual has been updated to match this release. Some -new material has been added, including a new section on multiple plots per -image, and a new example of overlay plots. - - -Bugs Fixed in 5.3.1: - -#3143586 "Multiple plots per image - fixes & docs": - The reference manual now contains a section on multiple plots, and a - new example. A bug was fixed with SetLegendWorld and multiple plots. - Image border will now be drawn at most once. It is now possible to - restore the default 'automatic' behavior for axis positioning. Other - functions were changed to make arguments optional, so when called with - no arguments they reset to the default. The reference manual has been - updated with these changes too. - -#3147397 "Data colors missing with multiple plots": - The fix for bug #3049726 "Optimize color allocation" caused a problem - with multiple plots. This has been fixed. PHPlot will no longer truncate - the data color table at each plot. It will still only allocate data colors - as needed, but all of the pre-set or configured data colors will be - available for each plot. - - ------------------------------------------------------------------------------ - -2010-12-04 Release 5.3.0 - -Overview: - -This is the current stable release of PHPlot. This release includes new -plot types and some new features. - -The PHPlot reference manual has been updated to match this release. Some of -the sections have been moved, there are new examples for the new plot types, -and a new section on tunable parameters has been added. - - -New features in 5.3.0: - -#3093483 "Investing support chart types": - Added 3 new plot types: Basic OHLC (Open/High/Low/Close), Candlesticks, - and Filled Candlesticks. These are variations of plots that show the - performance of a stock or other financial security. - -#3111166 "Control legend colorbox width": - It is now possible to control the width of the color boxes in the - legend, using a class variable which is documented in the manual. - -#3117873 "Data value labels in more plot types": - Data value labels, which show the dependent variable values near the - data points, are now available for more plot types: lines, linepoints, - points, and squared. (These were previously available only for bars and - stackedbars plots.) - -#3127005 "Ability to suppress X/Y axis lines": - New functions SetDrawXAxis() and SetDrawYAxis() were added to control - display of the X and Y axis lines. (These lines were probably the only - PHPlot elements that could not be turned off.) In special cases, these - can be used to produce a "bare" plot image. - - ------------------------------------------------------------------------------ - -2010-10-03 Release 5.2.0 - -Overview: - -This is the current stable release of PHPlot. This release includes some -bug fixes and new features, described below, and a reimplementation of -internal processing of colors. - -The PHPlot reference manual has been updated to match this release. -Horizontal plots are now documented in the manual, and the interim -documentation in the source release (HorizontalBars.txt) has been removed. -The manual is available in HTML format as a separate download from -Sourceforge. The manual is also available for on-line viewing from the -project home page. Starting with this release, the manual is also -available in PDF format from the project home page. - - -Cautions, Important Notes, and Compatibility Issues: - -Due to changes in color allocation (see bug #3049726 below), image files -produced with PHPlot-5.2.0 will differ when compared byte-for-byte with -those created by earlier releases, even when the images are identical (as -they nearly always are). - -If you are creating a horizontal plot with any negative X values, and not -setting the Y axis position, your plot will change (see bug #3074402 below) -because PHPlot no longer leaves the Y axis on the left for horizontal plots. - -Some internal methods that used to have 'public' visibility are now protected. -This will generally prevent you from using them. The list of changed functions -can be found in the release ChangeLog. Avoid using any internal methods. - -If you are making a stackedbar plot with any negative values, PHPlot-5.1.3 -and earlier took the absolute value of each data value (which was not -documented), but PHPlot-5.2.0 does not. See Feature Request #3073679 below. - -If your plot fills the 256 available color map slots in a palette image, -your image may look different with PHPlot-5.2.0 due to changes in color -allocation order. This was seen on two of the tests in the PHPlot test -suite. These tests tiled a JPEG image into the plot area or image -background. Being a truecolor image, the JPEG had a huge number of colors, -which filled all available slots in the color map. Additional colors for -plot elements had to be approximated, and different colors resulted with -PHPlot-5.2.0 versus previous releases. To avoid this problem, either use a -truecolor PHPlot object (PHPlot_truecolor constructor), or reduce the -number of colors in the background image and convert it to PNG or GIF. - -This release contains significant changes to PHPlot internals. In particular, -variables and functions related to element colors and color handling have -changed. Refer to the PHPlot release ChangeLog for more details. Remember, -if you rely on accessing any member variable, or on using any non-public -function or any function not documented in the reference section of the manual, -your code is at risk of breaking with each new release. - - -New features in 5.2.0: - -#3077554 "Finer control over plot element colors" (partial): - The X, Y, and main titles can now have different colors. See the PHPlot - Reference Manual entries for SetXTitleColor and SetYTitleColor. - -#3073679 "Stacked bar plots with negative values": - A stacked bar plot can now include negative values, and stacks of negative - values will be drawn downwards (or leftwards). See the PHPlot Reference - Manual under "Plot Type: stackedbars" for details. - - -Bugs Fixed in 5.2.0: - -#3045131 "SetTransparentColor problems": - Setting a transparent color now works whether before or after setting - the background color (for example), and also now works with a data color. - -#3049726 "Optimize color allocation" - PHPlot now defers allocating colors until drawing time, and tries to allocate - only the colors which are actually needed. For palette images, this results - in use of fewer color slots and slightly smaller image files. - -#3074402 "Fix Y axis default for horizontal plots": - When horizontal plots were introduced, an asymmetry with the X and Y axis - position defaults was known but left. This behavior was later determined - to be unhelpful. So now the Y axis on horizontal plots will default to X=0, - or the X value closest to zero within the plot area range. This is the same - behavior as for the X axis in vertical plots. - -#3056991 "Internal methods should be 'protected'": - More of the internal PHPlot functions were changed to 'protected' visibility, - as the test suite was fixed to not call them directly. - -#3057000 "Review 'deprecated' methods": - One broken deprecated method (SetColor) was removed and one changed. - Note that deprecated methods are not documented and not tested. - ------------------------------------------------------------------------------ - -2010-08-30 Release 5.1.3 - -Overview: - -This is the current stable release of PHPlot. Additional horizontal plot -types and features have been added, however horizontal plots are still -considered 'experimental'. A new callback has been added which allows -greater control over the data colors. An improved method for accessing -TrueType Font (TTF) files means that on many systems TTF text can be used -without specifying font paths. - - -Cautions and Important Notes: - -Since the previous PHPlot release, PHP-5.3.3 and PHP-5.2.14 have been -released, and these include a fix for the TrueType Font (TTF) rendering -problem. Use of these releases is now recommended. - -There has been extensive cleanup of the PHPlot code. If you have a -customized version of PHPlot, you may find it difficult to update. - -The "additional data support" script phplot_data.php has been removed from -this release. The script has not been developed or tested in a long time, -and was found to have numerous problems. The script can still be found in -the CVS repository. - -The changes in this release (horizontal plots, custom data color callback, -and TrueType Font handling) should not result in any compatibility issues. - - -New features in 5.1.3: - -#3049703 "Additional horizontal plots and features": - + Implemented data values labels in horizontal bar charts. - Use: SetXDataLabelPos('plotin'). - + Add horizontal stacked bar charts, with data value labels. - + Add horizontal thinbarline plots. - Horizontal plots are still considered 'experimental', and documentation is - in the HorizontalBars.txt text file rather than the PHPlot Reference Manual. - -#3034164 "Extended control of data colors": - New callback 'data_color' can be used to customize selection of the color - of each bar, line segment, point marker, etc. This is documented in the - PHPlot Reference Manual section "Custom Data Color Selection", with new - examples in the Examples chapter. - - -Bugs Fixed in 5.1.3: - -#3051906 "Better choice for default TT font": - Rather than always using the unlikely 'benjamingothic.ttf' as its default - TrueType font name, PHPlot now has a short list of sans-serif fonts, and - tries to find one that works if a default TT font is needed. On many - systems, this will provide a high-quality default font without help. - -#3051832 "Let PHP/GD find the font file": - Instead of using file existence to validate a TT font file, PHPlot now - just tries to use the font. This allows PHP/GD to use its own rules to - try to find the font, without needing a pathname. This works on Windows - and at least some Linux systems. - -#3048267 "phplot_data add-on is still broken" - Not fixed. phplot_data.php has been removed from the release. - ------------------------------------------------------------------------------ - -2010-06-29 Release 5.1.2 - -Overview: - -This is the current stable release of PHPlot. Truecolor image support is no -longer considered 'experimental', and is now documented in the reference -manual. There is a new experimental feature for horizontal bar charts. This -release also contains a bug fix and new feature. - - -Cautions and Important Notes: - -The advisory against using PHP-5.3.2 or PHP-5.2.13 with PHPlot if you use -TrueType fonts (TTF) continues. See the item below for PHPlot-5.1.1. The -good news is that this has been fixed by the PHP Team and will be in the -next releases. - -Compatibility of data type and plot type are now checked completely. If -you used an incorrect data type with certain plot types, your script may no -longer work until you fix the data type. Specifically, the area, squared, -and thinbarline plot types failed to check the data type they received, and -treated anything other than 'data-data' as 'text-data'. If you have a -squared plot with data type 'data-data-error', for example (which is not -supposed to work), it did produce a plot, but will now result in an error. - -The addition of horizontal bar charts should not impact any existing plot, -with one small exception. The function SetYDataLabelPos() used to accept -some additional, undocumented options (plotleft, plotright, both, yaxis) -and pass these through to SetYTickLabelPos() "for compatibility". It no -longer does so, as some of those are now used for horizontal bar chart -labels. To position Y tick labels, use only SetYTickLabelPos(). - - -New features in 5.1.2: - -#3002606 "Add to plot and image border options": - SetPlotBorderType() now accepts 'right', 'top', and 'bottom', as well - as an array of options. So you can now control exactly which of the 4 - border sides will be drawn. - SetImageBorderType() now accepts 'solid' as a choice. This will use the - actual color set with SetImageBorderColor(), rather than the darker - shade as type 'plain' does (which may have been a bug). - SetImageBorderWidth() is a new function that sets the width of the image - border. The defaults are the same as the fixed values used before: 1 - pixel for plain, 2 pixels for raised. The image border width is now - accounted for in margin calculations, if it is greater than 2 (to make - sure existing plots will not change). - -#2885930 "Horizontal Bars": - Horizontal bar charts are implemented, as an experimental feature. - 'Experimental' means they are not yet documented in the reference manual, - and subject to change or removal. - Refer to the text file HorizontalBars.txt for details. - -#2947679 (follow-up) "Support for alpha blending/Truecolor": - Truecolor support is now documented in the Reference Manual. The interim - documentation file Truecolor.txt has been removed. Alpha channel - specification now works with both constructors and both image types. This - fixes an issue if the base constructor was used with a truecolor background - image. (In PHPlot-5.1.1, the result would be a truecolor image, but the - alpha channel features were not available.) - - -Bug Fixed in 5.1.2: - -#3010116 "Bad rendering of title in multi-plot image when using TTF": - Make sure the main title is drawn only once, to avoid bad rendering of - TTF titles with multiple plots due to anti-aliasing. - ------------------------------------------------------------------------------ - -2010-04-04 Release 5.1.1 - -Overview: - -This is the current stable release of PHPlot. This release adds truecolor -image support as an experimental feature, fixes a number of bugs and adds -a few new features. - -The PHPlot reference manual has been updated to match this release. The -manual is available as a separate download from Sourceforge. The manual is -also available for on-line viewing from the project home page. - -See the ChangeLog file in the release for more about changes and bug fixes. - - -Cautions and Important Notes: - -Avoid using PHP-5.3.2 or PHP-5.2.13 with PHPlot if you use TrueType fonts -(TTF). Some new bugs were introduced in those releases that adversely -affects accurate positioning and rendering of TrueType font text. - - -New features in 5.1.1: - -#2947679 "Support for alpha blending/Truecolor": - PHPlot can now produce truecolor images, with alpha blending of colors and - other effects. This is considered an experimental feature, meaning it is - not yet documented in the PHPlot Reference Manual, and subject to change. - Refer to the text file Truecolor.txt included in the PHPlot release for - information on using truecolor. - Two drawing changes were made to improve plot appearance with Truecolor: - + Filled dots (in points & linepoints plots) are now drawn better. This - also makes them look rounder with regular (non-Truecolor) plots. - + Area plots have the areas filled without overlapping each area down to - the Y axis. This was needed to fix problems with alpha blending, and - should have no effect on non-Truecolor plots. - -#2973995 "Add y-Data to Stackedbars": - You can now have Y Data Labels with 'stackedbars' plots. These label the Y - values (incremental and total) for each bar. Refer to the reference manual - page for SetYDataLabelPos(). - - -Bug Fixes in 5.1.1: - -#2976735 "Improvements and fixes for 'area' plots": - Moving X axis works; handle Y<0 better; new 'stackedarea' plot type is a - variation on 'area' with the data represented differently. - -#2974639 "Stacked bars plot breaks with X axis != 0": - Moving X axis works. - -#2963757 "point_counts undefined error in 5.1.0": - Fixed an error introduced in PHPlot-5.1.0 when point size and shape arrays - were set to the same size. - -#2938219 "Bars go in wrong direction": - For bar charts with all Y<0, bars will still be drawn down even if Y=0 is - not in range. - ------------------------------------------------------------------------------ - -2009-12-24 Release 5.1.0 - -Overview: - -This is the current stable release of PHPlot. This release fixes a number of -bugs and adds some new features. Some of the changes in this release can -alter the appearance of plots, so be sure to review the information in this -NEWS file and test this release with your application. - -The PHPlot reference manual has been updated to match this release. The -manual is available as a separate download from Sourceforge. The manual is -also available for on-line viewing from the project home page. - -See the ChangeLog file in the release for more about changes and bug fixes. - - -New features in 5.1.0: - -+ A new "contrib" directory has been added for useful add-ons. - This currently contains: - * prune_labels : Control data label density on X axis. - * color_range : Define a gradient map for data colors. - -+ Feature Request 2899921 "Allow different format for data and tick labels" - Text angle and format can now be controlled separately for data labels. - -+ Locale loading override - New variable locale_override stops PHPlot from getting locale from system. - -+ Translating Coordinates - New function GetDeviceXY() to translate world to device coordinates. - -+ New drawing callback - New callback 'draw_all', called after all drawing is done. - The manual now contains an example of using this new callback and - the new GetDeviceXY() function to annotate a plot. - - -Bug Fixes in 5.1.0: - -#2914403 "Pie + X/Y titles: Undefined property error" - X/Y titles are now properly ignored for pie charts. - -#2908256 "Error: array_sum() should be an array" (drupal) -#2916864 "Should at least print legend on pie charts with empty data" - Pie charts with invalid data (no Y values > 0) now make an empty plot. - -#2906436 "Fixes for X Tick Labels vs X Data Labels" - Smarter determination of whether to do Tick labels, Data labels, or both. - -#2900914 "Problem with display of 0 on Y axis" - Fixed rounding error that could produce something like Y=8.12345E-16. - -#2886365 "PHP 5 patch" (Declare all functions and variables in PHP5 style) - Most internal PHPlot member functions now have "protected" visibility. - -#2839547 "SetImageBorderType('none') - You can use SetImageBorderType('none') to turn the image border back off. - -#1795972 "Fix default point shapes" - We now have 20 (vs 10) point shapes, with 10 (vs 1) used by default. - -#1795971 "Fix default data colors" - We now have 16 (vs 8) default data colors, no duplicates, all visible. - - -Visible Changes and Possible Incompatibilities: - -+ PHP5 visibility changes (Bug #2886365) -Details: Most internal PHPlot member functions now have visibility - 'protected', rather than all being public. All member variables are - still 'public'. - -Reason for the change: Use the recommended PHP5 syntax, better OO style. - -Compatibility: If you were calling a PHPlot internal function that got - changed to 'protected', this will break. Please report this. - - -+ Fix default point shapes (Bug 1795972) -Details: We now have 20 (vs 10) point shapes available, and by default we - have 10 (vs 1) different shapes in use. The default size is now 6 pixels - for all point shapes. - -Reason for the changes: Using different shapes helps distinguish the data - sets. The existing 10 defined shapes were not enough, since some of them - are not centered over the points, too small, or otherwise hard to see. - The code to synchronize the point shape and size arrays was broken, and - some dubious code to adjust sizes to even numbers needed to be fixed. - -Compatibility (1): If you have a points or linepoints plot with more than - one dataset, and you did not use SetPointShapes() to configure the - shapes, them your plot will change from using a diamond for all data - sets to using different shapes for up to 10 data sets. - -Compatibility (2): Fixing the point size/point shape array size bug may - slightly change the size of some shapes, but it now works the way it - was documented and supposed to work. - -+ Fix default data colors (Bug 1795971) -Details: Defined a new set of 16 default data colors. The colors are - different and contrast well against the default white background. - The first 4 colors were not changed. - -Reason for the change: The default 8 data colors included two instances - of orange, and one color which was invisible on a white background. - -Compatibility: Colors will change on any plot with more than 4 data sets - where you did not use SetDataColors() to set your own data colors. - -+ Re-used old function SetXDataLabelAngle() -Details: SetXDataLabelAngle() now does something different. - -Reason for the change: This name was needed for a new function, to set the - angle for the X Data Labels. The old use of this function was not - documented, and marked "deprecated" in the code since around 2003-12-07. - -Compatibility: If you are still using SetXDataLabelAngle() to set both Tick - and Data label angles, you need to use SetXLabelAngle() instead. - -+ Separate controls for tick and data labels (Feature Request 2899921) -Details: New functions SetXDataLabelAngle(), SetYDataLabelAngle(), - SetXDataLabelType(), and SetYDataLabelType() to allow separate control - over the angle and format of data labels, versus tick labels. - -Reason for the change: Allow Data Labels to use different formatting and - angle compared to Tick Labels. - -Compatibility: The default behavior has been set up such that there should - be no compatibility issues. For example: - Old behavior: SetXLabelType() sets the type for both tick and data labels. - New behavior: SetXLabelType() sets the type for tick labels and the - default type for data labels. SetXDataLabelType() sets the type for - data labels (overrides SetXLabelType). - -+ X Tick Labels vs X Data Labels (Bug 2906436) -Details: Regarding SetXTickLabelPos() and SetXDataLabelPos(): If only one - of them is called, the behavior is unchanged (only that label type will - be displayed). If both are called: Do exactly what was requested. If - neither was called: display only data labels if any data labels are - non-empty, else display only tick labels. - -Reason for the change: 1) Fix the long-standing problem behavior that by - default PHPlot overlays tick and data labels below the X axis. 2) Fix - order dependency between setting the position of tick and data labels. - 3) Prepare for future extension of data labels, and allow both tick - and data labels to be on if the programmer enables both. - -Compatibility: There are some cases where your plot will change. - (a) Calls neither SetXDataLabelPos() nor SetXTickLabelPos(): - Old behavior: Both tick and data labels displayed, possibly overlaid. - New behavior: If there are any non-blank data labels, then show only - the data labels, not the tick labels. Otherwise, show tick labels. - - (b) Calls both SetXDataLabelPos() and SetXTickLabelPos(), with other than - 'none' for each position: - Old behavior: The latter call was effective; earlier one ignored. - New behavior: Independent of order, both calls are effective. - ------------------------------------------------------------------------------ - -2009-06-14 Release 5.0.7 - -Overview: - -This is the current stable release of PHPlot. The release adds one new -feature, fixes a few bugs, and changes the license under which PHPlot -is released. - -The PHPlot reference manual has been updated to match this release. The -manual is available as a separate download from Sourceforge. The manual is -also now available for on-line viewing at http://phplot.sourceforge.net - -See the ChangeLog file for more about changes and bug fixes. - - -Licensing: - -PHPlot is now released on the terms of the GNU Lesser General Public -License, version 2.1. (Previous versions of PHPlot were released under -a dual "PHP/GPL" license.) The licensing change was authorized by the -original author and copyright holder of PHPlot. - - -New feature in 5.0.7: - -+ Plot area margins can now be partially specified, using either - SetMarginsPixels or SetPlotAreaPixels. In previous releases of - PHPlot you had to either specify all 4 margins or none. - Credit to adoll for this feature. - - -Visible Changes and Possible Incompatibilities: - -+ Y data range can change: - As a result of the bug fixes in this release, automatically-calculated - Y data ranges can change. If you have missing Y values in your data, - and you let PHPlot calculate the Y data range (that is, you do not - call SetPlotAreaWorld with a Ymin value), then the lower limit for Y - can change. If you have a plot with data-data-error data type, different - error values for different points, and let PHPlot calculate the Y data - range, then either Y limit can change. - - -Bug Fixes in 5.0.7: - - -+ Fix for bug 2803900: SetRGBArray('large') does not work: - Corrected an array name usage problem. You can now select the large - color map. Also PHPlot no longer overrides use of the PHP include - path when loading the large color map, and now reports an error if the - file is needed and not found. - -+ Fix for bug 2791502 "Error plots treat missing Y values as 0": - Missing Y values now with with data-data-error plots. - -+ Fix for bug 2792860 "Wrong DataLabelLines with missing Y": - Data label lines are now suppressed at missing Y values. - -+ Fix for bug 2786350 "Missing Y data results in bad auto-range": - Missing Y values are now ignored when calculating the Y data range. - Bug report and analysis by mrten. - -+ Fix for bug 2786354 "Incorrect auto-range for data-data-error": - The Y data range is now correctly calculated for data-data-error plots - when the error values differ from point to point. - - ------------------------------------------------------------------------------ - -2009-01-20 Release 5.0.6 - -Overview: - -This is the current stable release of PHPlot. The purpose of this release -is to fix additional problems with text spacing and positioning, and -introduce some minor new features. - -The PHPlot reference manual has been updated to match this release. The -manual is available as a separate download from Sourceforge. The manual is -also now available for on-line viewing at http://phplot.sourceforge.net - - -New features in 5.0.6: - -+ Allow mixing GD and TrueType font text on the same plot - You can use the new method functions SetFontGD() and SetFontTTF() to - select a font and font type for text element (labels, titles, etc.) For - example, you can have TrueType plot titles, and GD-fixed font labels. - SetUseTTF() now sets the default text type, TTF or GD. This is fully - backward compatible. - -+ Extended label formatting - See the reference manual for more information on these. - - New label formatting types are added: 'printf' (using a user-defined - format), and 'custom' (using a callback function). - - For 'data' type formatting, a prefix and suffix can be added. (PHPlot - previously had an undocumented suffix for 'data' type, which still - works.) - - For 'time' formatting, the format can now be specified in the same function - call rather than using SetXTimeFormat and SetYTimeFormat. - - For 'data' formatting, the precision can now be specified in the same - function call, rather than using SetPrecisionX and SetPrecisionY. - -+ Better control over line spacing in multi-line labels - - Line spacing can now be set separately for each text element using an - additional argument to SetFont, SetFontGD, and SetFontTTF. The overall - SetLineSpacing() value is the default for each text element that does not - have a specific line spacing set. - - PHPlot now interprets the value set for line spacing as the number of - pixels only for GD text. For TrueType text, it is a scale factor for the - font's built-in line spacing for TrueType text. The equation used is: - interline_spacing = line_spacing * font_natural_spacing / 6 - where line_spacing is either the global value set with SetLineSpacing - or a more specific value set with SetFont(), and font_natural_spacing - is the amount of space between lines built-in to the TrueType font. The - factor 6 should really be 4 (since PHPlot always used 4 as the default - line_spacing, this would give the natural font spacing by default). But - the text is too widely spaced with this value, and 6 was chosen to be - more compatible for typical font sizes. - -Visible Changes and Possible Incompatibilities: - -+ Line spacing - Multi-line TrueType titles and labels will have different inter-line - spacing. Since the text size affects the margin and plot area sizes, - this results in slightly different sized features on any plot with - multi-line TrueType text. - Previous versions of PHPlot used a default 4 pixels for inter-line - spacing of multi-line TrueType text, regardless of the font size. - PHPlot now uses the 'natural' font inter-line spacing, adjusted by a line - spacing parameter (per text type, with a global default). - - The same change can also increase the size of the legend box slightly. - -+ Internal changes were made to the way font information is stored. Anything - that directly references PHPlot internals regarding fonts will break. Usage - also changed for the internal functions to size and draw text (ProcessText*, - SizeText*) due to font data storage changes. - -+ Changes were made to internal class variables used to store label - formatting information. Anything relying on these internals may break. - - -Bug Fixes in 5.0.6: - -#1932571: Data-Data Plot fails with same X values - PHPlot will no longer hang if all X values are the same. But this is - interim fix to force the X range to 1 to prevent the hang. Eventually, - smarter automatic range code will handle this better. - Credit to andyl for finding this. - -#1891636: Misaligned TTF X Labels - PHPlot will now correctly line-up TrueType labels along the X axis. There - were small but very noticeable errors before, when the text had descenders - or lines with all short letters. - - ------------------------------------------------------------------------------ - -2008-01-13 Released 5.0.5 - -Overview: - -This is the current stable release of PHPlot. The emphasis of this release -is to improve text positioning, margin calculation, and error handling. - -Although this is considered a stable release, it has a large amount -of changed code compared to the previous release 5.0.4. Two of the more -complex components of PHPlot - text and margin calculations - were mostly -re-written in this release. You are advised to carefully test your own -applications with PHPlot-5.0.5 to see how your plots look. Refer to the -README.txt file included in the release for information on reporting problems. - -Starting with this release, PHPlot no longer supports PHP4, since the PHP -group officially declared end-of-life for PHP4 as of 31 December 2007. -PHPlot-5.0.5 was tested only with PHP-5.2.5 and we are unlikely to address -any issues using PHPlot with older versions of PHP. - -The PHPlot reference manual has been updated to match this release. The -manual is available as a separate download from Sourceforge. The manual is -now also now available for on-line viewing at http://phplot.sourceforge.net - -The callback feature added in 5.0.4 is now documented in the reference -manual. It is still considered experimental and subject to change, however. - - - -Visible Changes and Possible Incompatibilities: - -+ Dropped support for PHP4. - -+ Eliminated remaining order-dependent behavior related to margins and -text. PHPlot should now do nothing at all, except record parameters, until -you draw the graph with DrawGraph. I believe this was always the intended -behavior of PHPlot, but over time perhaps various pre-calculations and -dependencies crept in. Fixing this simplifies processing and should lead to -more consistent behavior. - -+ The rewritten margin calculation code now uses actual sizes of all tick -and data labels and tick marks, rather than guesses. Margins collapse to -remove unused elements, but a minimum margin (currently fixed at 15 pixels) -is applied so the plot edges don't get to close to the image edges. The -result is that most graphs with auto-calculated margins will change in -appearance. It most cases, the margins get slightly smaller. In other -cases, earlier releases mis-calculated the margins, so this release will -produce much neater margins. - -+ The X and Y titles are now offset out from the plot area, not in from the -image area. For auto-calculated margins this should not make any -difference, but if you use SetMarginsPixels or SetPlotAreaPixels to set -larger margins, the axis titles will move in closer to the plot with this -release. - -+ Changes were made to PHPlot internals, including removal of some class -variables and functions, and addition of new variables and functions. -These are documented in the ChangeLog. Relying on any internal variables -or functions in an application using PHPlot is unwise. The following -internal functions were removed: - SetImageArea() DrawDotSeries() DrawLineSeries() CalcXHeights() - CalcYWidths() DrawLabels() InitImage() DrawDashedLine() - These were marked 'deprecated', were undocumented and unmaintained. - TTFBBoxSize() - This was replaced with SizeText(). - -+ Line spacing set with SetLineSpacing() now affects TTF text as well as -GD text. Previously, it only affected GD text. The default line spacing -happens to be usable for TTF text. - -+ Changes were made to error handling. PHPlot will now trigger a user-level -error after producing an error image, instead of exiting. If no error -handler has been set, it will exit, as before. But now the error message -should also get logged, or written to the standard error stream, depending -on the SAPI in use. You can now establish an error handler to catch most -PHPlot errors and do some cleanup before exit. - -+ PHPlot no longer accepts some invalid option values (such as a substring -of a valid value, or empty strings) passed to functions. If your -application aborts in CheckOption with PHPlot-5.0.5 but 'worked' with -previous releases, them you were probably using an invalid option value. - - - -Bug Fixes in 5.0.5: - -#945439: x_tick_label_height not set correctly - Exact sizes of labels are now used to calculate margins. - -#1813070: Bad position for multi-line TrueType text - Fixed as part of text functions rewrite. Use correct basepoint - (lower left of each line) when positioning text lines. - -#1813071: Wrong title height for multi-line TTF text - Fixed as part of text functions rewrite: calculate height of - multi-line text correctly. Also now uses the line-spacing setting. - -#1813474: DrawText alignment arguments wrong - Fixed so 'top' and 'bottom' now have the usual meaning: top means - align top of text with reference, bottom means align bottom of text. - This was switched before. Changed every internal caller to compensate. - -#1816844: Fix order dependency for setting titles - Defer processing of title strings until DrawGraph(), - so it doesn't matter if fonts, etc. are set before or after. - -#1819668: Horiz. align multi-line text: GD vs TTF - The text functions were rewritten to draw TTF text line-by-line, - like GD text, and correctly align each line. - -#1823774: Default Font Path and Error Message - Error handling has been improved to make sure a message is logged, in - addition to the error image, and use error_trigger rather than exit. - -#1826513: FIXME in DrawLegend: Max label length - The actual size needed for legend text is now used. - -#1827263: Spoiled up pie-chart if $val is close to zero - Fixed by skipping over any segment that rounds to 0 degrees of - arc. (The GD function uses integer angles only, and 0 degrees - means draw a complete circle.) - -#1836528: Insufficient checking of parameter values - Rewrote validator function to reject improper parameter values. - -#1843012: Make margins, drawing consistent - Margin code logic was rewritten and checked for consistency. - -#1856207: Margin error with 'xaxis'/'yaxis' position - Margin space is now allocated for ticks and labels if their position - is 'xaxis' or 'yaxis' and the axis is at the plot edge. This is not - a perfect fix (the axis could be close but not at the edge). - - ------------------------------------------------------------------------------ - -2007-10-20 Released 5.0.4 - -Overview: - -This is the latest stable release of PHPlot. We are abandoning the 'rc' -version naming style, because we don't consider these last releases -'release candidate' versions. As we continue to make changes to PHPlot, -we are not converging toward a final "5.0" release, however we do consider -these releases stable and complete enough for production use. - -This release fixes a number of problems and introduces a few new features. - -The PHPlot reference manual has also been updated to match this release. -New material has been added documenting some of the PHPlot internals. -The manual is available as a separate download from Sourceforge. - - -Code Cleanup: - -Some code cleanup is going in to this release. It is hoped that these -changes will not impact any existing scripts using PHPlot, but will make -the PHPlot code itself easier to understand and maintain. - -PHPlot now avoids making changes outside its own class definition. There -are no longer any functions defined outside the class, nor any constants. -Three constants (MINY MAXY TOTY) were removed, and 2 functions were removed -(see Visible Changes below). Also PHPlot no longer sets the PHP error -reporting level to E_ALL. Although we highly recommend setting error -reporting to E_ALL in your php.ini file or scripts, it is not right for -PHPlot to assume that you want it. - - -Visible Changes and Possible Incompatibilities: - -Arrays containing color and style information are used with several PHPlot -functions to control the plot style array. These functions are: - SetPointShapes, SetPointSizes, SetLineWidths, SetLineStyles, - SetDataColors, SetDataBorderColors, and SetErrorBarColors. -The arrays passed to these functions MUST used sequential integer 0-based -indexes. This is what the PHP manual calls "Usual integer indices (starting -from zero, increasing by one)". This is the type of array you get in PHP by -default if you use array() without specifying key values, or use the -empty-bracket assignment operator to add values onto an array. In previous -versions of PHPlot, some of these functions would also work with -string-indexed or non-sequentially-indexed arrays, but this was not clearly -defined. Starting with PHPlot-5.0.4, only arrays with "usual integer -indices" work, and other array indexes will cause errors. - -Some internal-use-only functions have had their usage changed or been removed. -If you are using functions that are not documented in the PHPlot Function -Reference in the manual, your code may have to be changed. - -As part of the code cleanup, two functions which were defined outside the -PHPlot class were removed: array_pad_array(), and array_merge_php4(). -If your code used these, you need to fix your code. - -The routines which accept a color name, value, or array now check for a valid -color name. If you specify a color name which is not in your current color -table, PHPlot will draw an error and exit. Previously, PHP would report an -index error, continue, and get a 'headers already sent' message. - - -Bug Fixes in 5.0.4: - -#1813021: Miss-positioned right-justified vertical GD text. - Fixed DrawText() to correctly position 90 degree right-justified text - drawn in a fixed GD font. This could be seen with 90 degree Y tick labels. - -#1790441 Removed destructor/shutdown function, and no longer recommend - using reference assignment when creating a PHPlot object. This was - interfering with memory usage. - Credit to annajilly for analysis. - -#1779115 SetLegendWorld() failed because of undefined variables. The - required order dependency was too hard to meet. This is now fixed. - You can now use SetLegendWorld anywhere before DrawGraph. - -#1726810 (feature request, but actually a bug fix) Ignore empty strings - as data labels when doing time or data label formatting. These would - previously produce errors or bad formatting. Now you can omit labels - as needed even with time and data formatting. - Credit to exgerhardr for finding this. - -#1605555 Y data labels used wrong font and not formatted (bar charts only). - -#1208054 Localization of number formatting in 'data' format type. PHPlot - will attempt to format the numbers in a way appropriate to your locale. - You can also force the formatting with the new function SetNumberFormat. - Credit to David Hernández Sanz. - -#937944 X/Y Tick counts: PHPlot could draw one two few Y tick counts, and - one too many X tick counts. This is not a perfect fix, and more work is - needed here, but this fixes an error case in both X and Y values. - - -New Features in 5.0.4: - -New function SetLegendStyle allows control of the alignment of text and - color boxes within the legend. Also allows removing the color boxes. - Based on bug #1208054. - Credit to David Hernández Sanz. - -New function SetNumberFormat. See bug report #1208054 above. - -Callbacks are added. PHPlot can call back your functions while generating the - plot. This is experimental, and documented only in the file "Callbacks". - Credit to annajilly for the idea and design. - ------------------------------------------------------------------------------ - -2006-11-13 Released 5.0rc3 - -Overview: - -This is an interim release. It has been a long time since the previous -release 5.0rc2, and there have been a lot of changes. There are still more -changes likely to go in before we have "5.0", but there are enough for now. - -The PHPlot Reference Manual has also been released, and is available as a -separate download from Sourceforge. PHPlot users and developers are -strongly encouraged to read the manual. - -This release does not include the "doc/" and "examples/" directories of -previous releases. The Reference Manual contains more complete and -up-to-date information and examples, and I am unable to maintain the doc/ -and examples/ files while also maintaining the Reference Manual. If you -need those files, they can be accessed with the Sourceforge web CVS -browser. - - -New Features: - -The emphasis for this release is bug fixing, so there are few new features. - -+ You can now suppress lines or points on individual plots in a linepoints - graph. This feature was added because I needed a graph with several - linepoints lines, but also with a solid line showing an "80% goal". - Use SetPointShapes with the value 'none' in the array to suppress the - point markers for that plot (and only draw the line). - Use SetLineStyles with the value 'none' in the array to suppress the - line for that plot (and only draw the point markers). - [Bug # 1594458] - -+ Bar charts can have data labels above the bar with the value. Turn - these on with SetYDataLabelPos('plotin'). This is somewhat experimental, - since there isn't a lot of room for labels on top of the bars and you - may find the results are not useful. - - -Visible Changes: - -Here are the more significant changes in this release. These are changes -which may affect existing scripts and output from PHPlot. See the -ChangeLog file for information about all changes and bug fixes. - -+ A bug fix on bar chart bar borders results in black borders around the - bars if shading is turned off. The border was previously covered up, - but was supposed to be there. If you need borderless, unshaded bars, - you need to use SetDataBorderColors to make the borders the same colors - as the bars. [Bug # 1096197] - -+ TrueType font pathname handling was fixed. You no longer need to use - SetUseTTF(True). You can either use full paths to the font files with - SetDefaultTTFont() and SetFont(), or you can call SetTTFPath() to point - to a directory of font files, and then use simple font filenames without - paths in SetDefaultTTFont() and SetFont(). - [Bug # 1144644 plus several others] - -+ There have been several fixes regarding automatically calculated ranges - and scales. The result is that you may see less extra space and fewer - tick marks in some cases. - -+ A fix was made to bar and stackedbar graph bar widths in order to get - the X axis labels to properly center. As part of the fix, the bar widths - now match between the two graph types. (Before this fix, the bars were - narrower in bar graphs compared to the same data plotted as a stacked - bar.) As a result, bar graph bars will now be drawn with wider bars, and - stackedbar graph bars will be narrower. You can adjust this with the new - class variable bar_extra_space. [Bug # 1437912] - -+ Dot shapes and sizes were off by 1 or 2 slots in the array of shapes or - sizes. After the fix, you may get different dot shapes or sizes per - plot line. [Bug # 1096194] - - -Testing: - -Since its output is visual (graphics), and it has so many interconnected -modes and options, PHPlot is difficult to test. But at least we are now -trying. I have a collection of PHPlot scripts (currently about 60) and a -script to run through them. The script automatically checks that: - 1) Nothing was written to the standard error stream; - 2) An image file of size greater than 0 was written; - 3) Neither the test script nor PHPlot did exit(). This catches cases - where PHPlot aborts with DrawError(). - -The automated test is an easy way to check for serious regression, but you -really need to inspect the output files to validate PHPlot. This takes a -little time, and it is easy to overlook problems. - -The real issue is test coverage. Just as we can be sure that future -PHPlot releases will pass the test collection, we can also be sure that -future bug reports will be written against untested cases. - --------------------- - -2006-11-08 PHPlot on Sourceforge has a new maintainer: lbayuk - --------------------- - -2004-10-24 Released 5.0rc2 - --------------------- - +This is the NEWS file for PHPlot, with release documentation. +The project web site is http://sourceforge.net/projects/phplot/ +The project home page is http://phplot.sourceforge.net/ +Refer the the ChangeLog file for detailed source changes. +----------------------------------------------------------------------------- + +2011-01-15 Release 5.3.1 + +Overview: + +This is the current stable release of PHPlot. This release focuses on +providing better support and documentation for creating multiple plots on a +single image. + +The PHPlot reference manual has been updated to match this release. Some +new material has been added, including a new section on multiple plots per +image, and a new example of overlay plots. + + +Bugs Fixed in 5.3.1: + +#3143586 "Multiple plots per image - fixes & docs": + The reference manual now contains a section on multiple plots, and a + new example. A bug was fixed with SetLegendWorld and multiple plots. + Image border will now be drawn at most once. It is now possible to + restore the default 'automatic' behavior for axis positioning. Other + functions were changed to make arguments optional, so when called with + no arguments they reset to the default. The reference manual has been + updated with these changes too. + +#3147397 "Data colors missing with multiple plots": + The fix for bug #3049726 "Optimize color allocation" caused a problem + with multiple plots. This has been fixed. PHPlot will no longer truncate + the data color table at each plot. It will still only allocate data colors + as needed, but all of the pre-set or configured data colors will be + available for each plot. + + +----------------------------------------------------------------------------- + +2010-12-04 Release 5.3.0 + +Overview: + +This is the current stable release of PHPlot. This release includes new +plot types and some new features. + +The PHPlot reference manual has been updated to match this release. Some of +the sections have been moved, there are new examples for the new plot types, +and a new section on tunable parameters has been added. + + +New features in 5.3.0: + +#3093483 "Investing support chart types": + Added 3 new plot types: Basic OHLC (Open/High/Low/Close), Candlesticks, + and Filled Candlesticks. These are variations of plots that show the + performance of a stock or other financial security. + +#3111166 "Control legend colorbox width": + It is now possible to control the width of the color boxes in the + legend, using a class variable which is documented in the manual. + +#3117873 "Data value labels in more plot types": + Data value labels, which show the dependent variable values near the + data points, are now available for more plot types: lines, linepoints, + points, and squared. (These were previously available only for bars and + stackedbars plots.) + +#3127005 "Ability to suppress X/Y axis lines": + New functions SetDrawXAxis() and SetDrawYAxis() were added to control + display of the X and Y axis lines. (These lines were probably the only + PHPlot elements that could not be turned off.) In special cases, these + can be used to produce a "bare" plot image. + + +----------------------------------------------------------------------------- + +2010-10-03 Release 5.2.0 + +Overview: + +This is the current stable release of PHPlot. This release includes some +bug fixes and new features, described below, and a reimplementation of +internal processing of colors. + +The PHPlot reference manual has been updated to match this release. +Horizontal plots are now documented in the manual, and the interim +documentation in the source release (HorizontalBars.txt) has been removed. +The manual is available in HTML format as a separate download from +Sourceforge. The manual is also available for on-line viewing from the +project home page. Starting with this release, the manual is also +available in PDF format from the project home page. + + +Cautions, Important Notes, and Compatibility Issues: + +Due to changes in color allocation (see bug #3049726 below), image files +produced with PHPlot-5.2.0 will differ when compared byte-for-byte with +those created by earlier releases, even when the images are identical (as +they nearly always are). + +If you are creating a horizontal plot with any negative X values, and not +setting the Y axis position, your plot will change (see bug #3074402 below) +because PHPlot no longer leaves the Y axis on the left for horizontal plots. + +Some internal methods that used to have 'public' visibility are now protected. +This will generally prevent you from using them. The list of changed functions +can be found in the release ChangeLog. Avoid using any internal methods. + +If you are making a stackedbar plot with any negative values, PHPlot-5.1.3 +and earlier took the absolute value of each data value (which was not +documented), but PHPlot-5.2.0 does not. See Feature Request #3073679 below. + +If your plot fills the 256 available color map slots in a palette image, +your image may look different with PHPlot-5.2.0 due to changes in color +allocation order. This was seen on two of the tests in the PHPlot test +suite. These tests tiled a JPEG image into the plot area or image +background. Being a truecolor image, the JPEG had a huge number of colors, +which filled all available slots in the color map. Additional colors for +plot elements had to be approximated, and different colors resulted with +PHPlot-5.2.0 versus previous releases. To avoid this problem, either use a +truecolor PHPlot object (PHPlot_truecolor constructor), or reduce the +number of colors in the background image and convert it to PNG or GIF. + +This release contains significant changes to PHPlot internals. In particular, +variables and functions related to element colors and color handling have +changed. Refer to the PHPlot release ChangeLog for more details. Remember, +if you rely on accessing any member variable, or on using any non-public +function or any function not documented in the reference section of the manual, +your code is at risk of breaking with each new release. + + +New features in 5.2.0: + +#3077554 "Finer control over plot element colors" (partial): + The X, Y, and main titles can now have different colors. See the PHPlot + Reference Manual entries for SetXTitleColor and SetYTitleColor. + +#3073679 "Stacked bar plots with negative values": + A stacked bar plot can now include negative values, and stacks of negative + values will be drawn downwards (or leftwards). See the PHPlot Reference + Manual under "Plot Type: stackedbars" for details. + + +Bugs Fixed in 5.2.0: + +#3045131 "SetTransparentColor problems": + Setting a transparent color now works whether before or after setting + the background color (for example), and also now works with a data color. + +#3049726 "Optimize color allocation" + PHPlot now defers allocating colors until drawing time, and tries to allocate + only the colors which are actually needed. For palette images, this results + in use of fewer color slots and slightly smaller image files. + +#3074402 "Fix Y axis default for horizontal plots": + When horizontal plots were introduced, an asymmetry with the X and Y axis + position defaults was known but left. This behavior was later determined + to be unhelpful. So now the Y axis on horizontal plots will default to X=0, + or the X value closest to zero within the plot area range. This is the same + behavior as for the X axis in vertical plots. + +#3056991 "Internal methods should be 'protected'": + More of the internal PHPlot functions were changed to 'protected' visibility, + as the test suite was fixed to not call them directly. + +#3057000 "Review 'deprecated' methods": + One broken deprecated method (SetColor) was removed and one changed. + Note that deprecated methods are not documented and not tested. + +----------------------------------------------------------------------------- + +2010-08-30 Release 5.1.3 + +Overview: + +This is the current stable release of PHPlot. Additional horizontal plot +types and features have been added, however horizontal plots are still +considered 'experimental'. A new callback has been added which allows +greater control over the data colors. An improved method for accessing +TrueType Font (TTF) files means that on many systems TTF text can be used +without specifying font paths. + + +Cautions and Important Notes: + +Since the previous PHPlot release, PHP-5.3.3 and PHP-5.2.14 have been +released, and these include a fix for the TrueType Font (TTF) rendering +problem. Use of these releases is now recommended. + +There has been extensive cleanup of the PHPlot code. If you have a +customized version of PHPlot, you may find it difficult to update. + +The "additional data support" script phplot_data.php has been removed from +this release. The script has not been developed or tested in a long time, +and was found to have numerous problems. The script can still be found in +the CVS repository. + +The changes in this release (horizontal plots, custom data color callback, +and TrueType Font handling) should not result in any compatibility issues. + + +New features in 5.1.3: + +#3049703 "Additional horizontal plots and features": + + Implemented data values labels in horizontal bar charts. + Use: SetXDataLabelPos('plotin'). + + Add horizontal stacked bar charts, with data value labels. + + Add horizontal thinbarline plots. + Horizontal plots are still considered 'experimental', and documentation is + in the HorizontalBars.txt text file rather than the PHPlot Reference Manual. + +#3034164 "Extended control of data colors": + New callback 'data_color' can be used to customize selection of the color + of each bar, line segment, point marker, etc. This is documented in the + PHPlot Reference Manual section "Custom Data Color Selection", with new + examples in the Examples chapter. + + +Bugs Fixed in 5.1.3: + +#3051906 "Better choice for default TT font": + Rather than always using the unlikely 'benjamingothic.ttf' as its default + TrueType font name, PHPlot now has a short list of sans-serif fonts, and + tries to find one that works if a default TT font is needed. On many + systems, this will provide a high-quality default font without help. + +#3051832 "Let PHP/GD find the font file": + Instead of using file existence to validate a TT font file, PHPlot now + just tries to use the font. This allows PHP/GD to use its own rules to + try to find the font, without needing a pathname. This works on Windows + and at least some Linux systems. + +#3048267 "phplot_data add-on is still broken" + Not fixed. phplot_data.php has been removed from the release. + +----------------------------------------------------------------------------- + +2010-06-29 Release 5.1.2 + +Overview: + +This is the current stable release of PHPlot. Truecolor image support is no +longer considered 'experimental', and is now documented in the reference +manual. There is a new experimental feature for horizontal bar charts. This +release also contains a bug fix and new feature. + + +Cautions and Important Notes: + +The advisory against using PHP-5.3.2 or PHP-5.2.13 with PHPlot if you use +TrueType fonts (TTF) continues. See the item below for PHPlot-5.1.1. The +good news is that this has been fixed by the PHP Team and will be in the +next releases. + +Compatibility of data type and plot type are now checked completely. If +you used an incorrect data type with certain plot types, your script may no +longer work until you fix the data type. Specifically, the area, squared, +and thinbarline plot types failed to check the data type they received, and +treated anything other than 'data-data' as 'text-data'. If you have a +squared plot with data type 'data-data-error', for example (which is not +supposed to work), it did produce a plot, but will now result in an error. + +The addition of horizontal bar charts should not impact any existing plot, +with one small exception. The function SetYDataLabelPos() used to accept +some additional, undocumented options (plotleft, plotright, both, yaxis) +and pass these through to SetYTickLabelPos() "for compatibility". It no +longer does so, as some of those are now used for horizontal bar chart +labels. To position Y tick labels, use only SetYTickLabelPos(). + + +New features in 5.1.2: + +#3002606 "Add to plot and image border options": + SetPlotBorderType() now accepts 'right', 'top', and 'bottom', as well + as an array of options. So you can now control exactly which of the 4 + border sides will be drawn. + SetImageBorderType() now accepts 'solid' as a choice. This will use the + actual color set with SetImageBorderColor(), rather than the darker + shade as type 'plain' does (which may have been a bug). + SetImageBorderWidth() is a new function that sets the width of the image + border. The defaults are the same as the fixed values used before: 1 + pixel for plain, 2 pixels for raised. The image border width is now + accounted for in margin calculations, if it is greater than 2 (to make + sure existing plots will not change). + +#2885930 "Horizontal Bars": + Horizontal bar charts are implemented, as an experimental feature. + 'Experimental' means they are not yet documented in the reference manual, + and subject to change or removal. + Refer to the text file HorizontalBars.txt for details. + +#2947679 (follow-up) "Support for alpha blending/Truecolor": + Truecolor support is now documented in the Reference Manual. The interim + documentation file Truecolor.txt has been removed. Alpha channel + specification now works with both constructors and both image types. This + fixes an issue if the base constructor was used with a truecolor background + image. (In PHPlot-5.1.1, the result would be a truecolor image, but the + alpha channel features were not available.) + + +Bug Fixed in 5.1.2: + +#3010116 "Bad rendering of title in multi-plot image when using TTF": + Make sure the main title is drawn only once, to avoid bad rendering of + TTF titles with multiple plots due to anti-aliasing. + +----------------------------------------------------------------------------- + +2010-04-04 Release 5.1.1 + +Overview: + +This is the current stable release of PHPlot. This release adds truecolor +image support as an experimental feature, fixes a number of bugs and adds +a few new features. + +The PHPlot reference manual has been updated to match this release. The +manual is available as a separate download from Sourceforge. The manual is +also available for on-line viewing from the project home page. + +See the ChangeLog file in the release for more about changes and bug fixes. + + +Cautions and Important Notes: + +Avoid using PHP-5.3.2 or PHP-5.2.13 with PHPlot if you use TrueType fonts +(TTF). Some new bugs were introduced in those releases that adversely +affects accurate positioning and rendering of TrueType font text. + + +New features in 5.1.1: + +#2947679 "Support for alpha blending/Truecolor": + PHPlot can now produce truecolor images, with alpha blending of colors and + other effects. This is considered an experimental feature, meaning it is + not yet documented in the PHPlot Reference Manual, and subject to change. + Refer to the text file Truecolor.txt included in the PHPlot release for + information on using truecolor. + Two drawing changes were made to improve plot appearance with Truecolor: + + Filled dots (in points & linepoints plots) are now drawn better. This + also makes them look rounder with regular (non-Truecolor) plots. + + Area plots have the areas filled without overlapping each area down to + the Y axis. This was needed to fix problems with alpha blending, and + should have no effect on non-Truecolor plots. + +#2973995 "Add y-Data to Stackedbars": + You can now have Y Data Labels with 'stackedbars' plots. These label the Y + values (incremental and total) for each bar. Refer to the reference manual + page for SetYDataLabelPos(). + + +Bug Fixes in 5.1.1: + +#2976735 "Improvements and fixes for 'area' plots": + Moving X axis works; handle Y<0 better; new 'stackedarea' plot type is a + variation on 'area' with the data represented differently. + +#2974639 "Stacked bars plot breaks with X axis != 0": + Moving X axis works. + +#2963757 "point_counts undefined error in 5.1.0": + Fixed an error introduced in PHPlot-5.1.0 when point size and shape arrays + were set to the same size. + +#2938219 "Bars go in wrong direction": + For bar charts with all Y<0, bars will still be drawn down even if Y=0 is + not in range. + +----------------------------------------------------------------------------- + +2009-12-24 Release 5.1.0 + +Overview: + +This is the current stable release of PHPlot. This release fixes a number of +bugs and adds some new features. Some of the changes in this release can +alter the appearance of plots, so be sure to review the information in this +NEWS file and test this release with your application. + +The PHPlot reference manual has been updated to match this release. The +manual is available as a separate download from Sourceforge. The manual is +also available for on-line viewing from the project home page. + +See the ChangeLog file in the release for more about changes and bug fixes. + + +New features in 5.1.0: + ++ A new "contrib" directory has been added for useful add-ons. + This currently contains: + * prune_labels : Control data label density on X axis. + * color_range : Define a gradient map for data colors. + ++ Feature Request 2899921 "Allow different format for data and tick labels" + Text angle and format can now be controlled separately for data labels. + ++ Locale loading override + New variable locale_override stops PHPlot from getting locale from system. + ++ Translating Coordinates + New function GetDeviceXY() to translate world to device coordinates. + ++ New drawing callback + New callback 'draw_all', called after all drawing is done. + The manual now contains an example of using this new callback and + the new GetDeviceXY() function to annotate a plot. + + +Bug Fixes in 5.1.0: + +#2914403 "Pie + X/Y titles: Undefined property error" + X/Y titles are now properly ignored for pie charts. + +#2908256 "Error: array_sum() should be an array" (drupal) +#2916864 "Should at least print legend on pie charts with empty data" + Pie charts with invalid data (no Y values > 0) now make an empty plot. + +#2906436 "Fixes for X Tick Labels vs X Data Labels" + Smarter determination of whether to do Tick labels, Data labels, or both. + +#2900914 "Problem with display of 0 on Y axis" + Fixed rounding error that could produce something like Y=8.12345E-16. + +#2886365 "PHP 5 patch" (Declare all functions and variables in PHP5 style) + Most internal PHPlot member functions now have "protected" visibility. + +#2839547 "SetImageBorderType('none') + You can use SetImageBorderType('none') to turn the image border back off. + +#1795972 "Fix default point shapes" + We now have 20 (vs 10) point shapes, with 10 (vs 1) used by default. + +#1795971 "Fix default data colors" + We now have 16 (vs 8) default data colors, no duplicates, all visible. + + +Visible Changes and Possible Incompatibilities: + ++ PHP5 visibility changes (Bug #2886365) +Details: Most internal PHPlot member functions now have visibility + 'protected', rather than all being public. All member variables are + still 'public'. + +Reason for the change: Use the recommended PHP5 syntax, better OO style. + +Compatibility: If you were calling a PHPlot internal function that got + changed to 'protected', this will break. Please report this. + + ++ Fix default point shapes (Bug 1795972) +Details: We now have 20 (vs 10) point shapes available, and by default we + have 10 (vs 1) different shapes in use. The default size is now 6 pixels + for all point shapes. + +Reason for the changes: Using different shapes helps distinguish the data + sets. The existing 10 defined shapes were not enough, since some of them + are not centered over the points, too small, or otherwise hard to see. + The code to synchronize the point shape and size arrays was broken, and + some dubious code to adjust sizes to even numbers needed to be fixed. + +Compatibility (1): If you have a points or linepoints plot with more than + one dataset, and you did not use SetPointShapes() to configure the + shapes, them your plot will change from using a diamond for all data + sets to using different shapes for up to 10 data sets. + +Compatibility (2): Fixing the point size/point shape array size bug may + slightly change the size of some shapes, but it now works the way it + was documented and supposed to work. + ++ Fix default data colors (Bug 1795971) +Details: Defined a new set of 16 default data colors. The colors are + different and contrast well against the default white background. + The first 4 colors were not changed. + +Reason for the change: The default 8 data colors included two instances + of orange, and one color which was invisible on a white background. + +Compatibility: Colors will change on any plot with more than 4 data sets + where you did not use SetDataColors() to set your own data colors. + ++ Re-used old function SetXDataLabelAngle() +Details: SetXDataLabelAngle() now does something different. + +Reason for the change: This name was needed for a new function, to set the + angle for the X Data Labels. The old use of this function was not + documented, and marked "deprecated" in the code since around 2003-12-07. + +Compatibility: If you are still using SetXDataLabelAngle() to set both Tick + and Data label angles, you need to use SetXLabelAngle() instead. + ++ Separate controls for tick and data labels (Feature Request 2899921) +Details: New functions SetXDataLabelAngle(), SetYDataLabelAngle(), + SetXDataLabelType(), and SetYDataLabelType() to allow separate control + over the angle and format of data labels, versus tick labels. + +Reason for the change: Allow Data Labels to use different formatting and + angle compared to Tick Labels. + +Compatibility: The default behavior has been set up such that there should + be no compatibility issues. For example: + Old behavior: SetXLabelType() sets the type for both tick and data labels. + New behavior: SetXLabelType() sets the type for tick labels and the + default type for data labels. SetXDataLabelType() sets the type for + data labels (overrides SetXLabelType). + ++ X Tick Labels vs X Data Labels (Bug 2906436) +Details: Regarding SetXTickLabelPos() and SetXDataLabelPos(): If only one + of them is called, the behavior is unchanged (only that label type will + be displayed). If both are called: Do exactly what was requested. If + neither was called: display only data labels if any data labels are + non-empty, else display only tick labels. + +Reason for the change: 1) Fix the long-standing problem behavior that by + default PHPlot overlays tick and data labels below the X axis. 2) Fix + order dependency between setting the position of tick and data labels. + 3) Prepare for future extension of data labels, and allow both tick + and data labels to be on if the programmer enables both. + +Compatibility: There are some cases where your plot will change. + (a) Calls neither SetXDataLabelPos() nor SetXTickLabelPos(): + Old behavior: Both tick and data labels displayed, possibly overlaid. + New behavior: If there are any non-blank data labels, then show only + the data labels, not the tick labels. Otherwise, show tick labels. + + (b) Calls both SetXDataLabelPos() and SetXTickLabelPos(), with other than + 'none' for each position: + Old behavior: The latter call was effective; earlier one ignored. + New behavior: Independent of order, both calls are effective. + +----------------------------------------------------------------------------- + +2009-06-14 Release 5.0.7 + +Overview: + +This is the current stable release of PHPlot. The release adds one new +feature, fixes a few bugs, and changes the license under which PHPlot +is released. + +The PHPlot reference manual has been updated to match this release. The +manual is available as a separate download from Sourceforge. The manual is +also now available for on-line viewing at http://phplot.sourceforge.net + +See the ChangeLog file for more about changes and bug fixes. + + +Licensing: + +PHPlot is now released on the terms of the GNU Lesser General Public +License, version 2.1. (Previous versions of PHPlot were released under +a dual "PHP/GPL" license.) The licensing change was authorized by the +original author and copyright holder of PHPlot. + + +New feature in 5.0.7: + ++ Plot area margins can now be partially specified, using either + SetMarginsPixels or SetPlotAreaPixels. In previous releases of + PHPlot you had to either specify all 4 margins or none. + Credit to adoll for this feature. + + +Visible Changes and Possible Incompatibilities: + ++ Y data range can change: + As a result of the bug fixes in this release, automatically-calculated + Y data ranges can change. If you have missing Y values in your data, + and you let PHPlot calculate the Y data range (that is, you do not + call SetPlotAreaWorld with a Ymin value), then the lower limit for Y + can change. If you have a plot with data-data-error data type, different + error values for different points, and let PHPlot calculate the Y data + range, then either Y limit can change. + + +Bug Fixes in 5.0.7: + + ++ Fix for bug 2803900: SetRGBArray('large') does not work: + Corrected an array name usage problem. You can now select the large + color map. Also PHPlot no longer overrides use of the PHP include + path when loading the large color map, and now reports an error if the + file is needed and not found. + ++ Fix for bug 2791502 "Error plots treat missing Y values as 0": + Missing Y values now with with data-data-error plots. + ++ Fix for bug 2792860 "Wrong DataLabelLines with missing Y": + Data label lines are now suppressed at missing Y values. + ++ Fix for bug 2786350 "Missing Y data results in bad auto-range": + Missing Y values are now ignored when calculating the Y data range. + Bug report and analysis by mrten. + ++ Fix for bug 2786354 "Incorrect auto-range for data-data-error": + The Y data range is now correctly calculated for data-data-error plots + when the error values differ from point to point. + + +----------------------------------------------------------------------------- + +2009-01-20 Release 5.0.6 + +Overview: + +This is the current stable release of PHPlot. The purpose of this release +is to fix additional problems with text spacing and positioning, and +introduce some minor new features. + +The PHPlot reference manual has been updated to match this release. The +manual is available as a separate download from Sourceforge. The manual is +also now available for on-line viewing at http://phplot.sourceforge.net + + +New features in 5.0.6: + ++ Allow mixing GD and TrueType font text on the same plot + You can use the new method functions SetFontGD() and SetFontTTF() to + select a font and font type for text element (labels, titles, etc.) For + example, you can have TrueType plot titles, and GD-fixed font labels. + SetUseTTF() now sets the default text type, TTF or GD. This is fully + backward compatible. + ++ Extended label formatting + See the reference manual for more information on these. + + New label formatting types are added: 'printf' (using a user-defined + format), and 'custom' (using a callback function). + + For 'data' type formatting, a prefix and suffix can be added. (PHPlot + previously had an undocumented suffix for 'data' type, which still + works.) + + For 'time' formatting, the format can now be specified in the same function + call rather than using SetXTimeFormat and SetYTimeFormat. + + For 'data' formatting, the precision can now be specified in the same + function call, rather than using SetPrecisionX and SetPrecisionY. + ++ Better control over line spacing in multi-line labels + + Line spacing can now be set separately for each text element using an + additional argument to SetFont, SetFontGD, and SetFontTTF. The overall + SetLineSpacing() value is the default for each text element that does not + have a specific line spacing set. + + PHPlot now interprets the value set for line spacing as the number of + pixels only for GD text. For TrueType text, it is a scale factor for the + font's built-in line spacing for TrueType text. The equation used is: + interline_spacing = line_spacing * font_natural_spacing / 6 + where line_spacing is either the global value set with SetLineSpacing + or a more specific value set with SetFont(), and font_natural_spacing + is the amount of space between lines built-in to the TrueType font. The + factor 6 should really be 4 (since PHPlot always used 4 as the default + line_spacing, this would give the natural font spacing by default). But + the text is too widely spaced with this value, and 6 was chosen to be + more compatible for typical font sizes. + +Visible Changes and Possible Incompatibilities: + ++ Line spacing + Multi-line TrueType titles and labels will have different inter-line + spacing. Since the text size affects the margin and plot area sizes, + this results in slightly different sized features on any plot with + multi-line TrueType text. + Previous versions of PHPlot used a default 4 pixels for inter-line + spacing of multi-line TrueType text, regardless of the font size. + PHPlot now uses the 'natural' font inter-line spacing, adjusted by a line + spacing parameter (per text type, with a global default). + + The same change can also increase the size of the legend box slightly. + ++ Internal changes were made to the way font information is stored. Anything + that directly references PHPlot internals regarding fonts will break. Usage + also changed for the internal functions to size and draw text (ProcessText*, + SizeText*) due to font data storage changes. + ++ Changes were made to internal class variables used to store label + formatting information. Anything relying on these internals may break. + + +Bug Fixes in 5.0.6: + +#1932571: Data-Data Plot fails with same X values + PHPlot will no longer hang if all X values are the same. But this is + interim fix to force the X range to 1 to prevent the hang. Eventually, + smarter automatic range code will handle this better. + Credit to andyl for finding this. + +#1891636: Misaligned TTF X Labels + PHPlot will now correctly line-up TrueType labels along the X axis. There + were small but very noticeable errors before, when the text had descenders + or lines with all short letters. + + +----------------------------------------------------------------------------- + +2008-01-13 Released 5.0.5 + +Overview: + +This is the current stable release of PHPlot. The emphasis of this release +is to improve text positioning, margin calculation, and error handling. + +Although this is considered a stable release, it has a large amount +of changed code compared to the previous release 5.0.4. Two of the more +complex components of PHPlot - text and margin calculations - were mostly +re-written in this release. You are advised to carefully test your own +applications with PHPlot-5.0.5 to see how your plots look. Refer to the +README.txt file included in the release for information on reporting problems. + +Starting with this release, PHPlot no longer supports PHP4, since the PHP +group officially declared end-of-life for PHP4 as of 31 December 2007. +PHPlot-5.0.5 was tested only with PHP-5.2.5 and we are unlikely to address +any issues using PHPlot with older versions of PHP. + +The PHPlot reference manual has been updated to match this release. The +manual is available as a separate download from Sourceforge. The manual is +now also now available for on-line viewing at http://phplot.sourceforge.net + +The callback feature added in 5.0.4 is now documented in the reference +manual. It is still considered experimental and subject to change, however. + + + +Visible Changes and Possible Incompatibilities: + ++ Dropped support for PHP4. + ++ Eliminated remaining order-dependent behavior related to margins and +text. PHPlot should now do nothing at all, except record parameters, until +you draw the graph with DrawGraph. I believe this was always the intended +behavior of PHPlot, but over time perhaps various pre-calculations and +dependencies crept in. Fixing this simplifies processing and should lead to +more consistent behavior. + ++ The rewritten margin calculation code now uses actual sizes of all tick +and data labels and tick marks, rather than guesses. Margins collapse to +remove unused elements, but a minimum margin (currently fixed at 15 pixels) +is applied so the plot edges don't get to close to the image edges. The +result is that most graphs with auto-calculated margins will change in +appearance. It most cases, the margins get slightly smaller. In other +cases, earlier releases mis-calculated the margins, so this release will +produce much neater margins. + ++ The X and Y titles are now offset out from the plot area, not in from the +image area. For auto-calculated margins this should not make any +difference, but if you use SetMarginsPixels or SetPlotAreaPixels to set +larger margins, the axis titles will move in closer to the plot with this +release. + ++ Changes were made to PHPlot internals, including removal of some class +variables and functions, and addition of new variables and functions. +These are documented in the ChangeLog. Relying on any internal variables +or functions in an application using PHPlot is unwise. The following +internal functions were removed: + SetImageArea() DrawDotSeries() DrawLineSeries() CalcXHeights() + CalcYWidths() DrawLabels() InitImage() DrawDashedLine() + These were marked 'deprecated', were undocumented and unmaintained. + TTFBBoxSize() + This was replaced with SizeText(). + ++ Line spacing set with SetLineSpacing() now affects TTF text as well as +GD text. Previously, it only affected GD text. The default line spacing +happens to be usable for TTF text. + ++ Changes were made to error handling. PHPlot will now trigger a user-level +error after producing an error image, instead of exiting. If no error +handler has been set, it will exit, as before. But now the error message +should also get logged, or written to the standard error stream, depending +on the SAPI in use. You can now establish an error handler to catch most +PHPlot errors and do some cleanup before exit. + ++ PHPlot no longer accepts some invalid option values (such as a substring +of a valid value, or empty strings) passed to functions. If your +application aborts in CheckOption with PHPlot-5.0.5 but 'worked' with +previous releases, them you were probably using an invalid option value. + + + +Bug Fixes in 5.0.5: + +#945439: x_tick_label_height not set correctly + Exact sizes of labels are now used to calculate margins. + +#1813070: Bad position for multi-line TrueType text + Fixed as part of text functions rewrite. Use correct basepoint + (lower left of each line) when positioning text lines. + +#1813071: Wrong title height for multi-line TTF text + Fixed as part of text functions rewrite: calculate height of + multi-line text correctly. Also now uses the line-spacing setting. + +#1813474: DrawText alignment arguments wrong + Fixed so 'top' and 'bottom' now have the usual meaning: top means + align top of text with reference, bottom means align bottom of text. + This was switched before. Changed every internal caller to compensate. + +#1816844: Fix order dependency for setting titles + Defer processing of title strings until DrawGraph(), + so it doesn't matter if fonts, etc. are set before or after. + +#1819668: Horiz. align multi-line text: GD vs TTF + The text functions were rewritten to draw TTF text line-by-line, + like GD text, and correctly align each line. + +#1823774: Default Font Path and Error Message + Error handling has been improved to make sure a message is logged, in + addition to the error image, and use error_trigger rather than exit. + +#1826513: FIXME in DrawLegend: Max label length + The actual size needed for legend text is now used. + +#1827263: Spoiled up pie-chart if $val is close to zero + Fixed by skipping over any segment that rounds to 0 degrees of + arc. (The GD function uses integer angles only, and 0 degrees + means draw a complete circle.) + +#1836528: Insufficient checking of parameter values + Rewrote validator function to reject improper parameter values. + +#1843012: Make margins, drawing consistent + Margin code logic was rewritten and checked for consistency. + +#1856207: Margin error with 'xaxis'/'yaxis' position + Margin space is now allocated for ticks and labels if their position + is 'xaxis' or 'yaxis' and the axis is at the plot edge. This is not + a perfect fix (the axis could be close but not at the edge). + + +----------------------------------------------------------------------------- + +2007-10-20 Released 5.0.4 + +Overview: + +This is the latest stable release of PHPlot. We are abandoning the 'rc' +version naming style, because we don't consider these last releases +'release candidate' versions. As we continue to make changes to PHPlot, +we are not converging toward a final "5.0" release, however we do consider +these releases stable and complete enough for production use. + +This release fixes a number of problems and introduces a few new features. + +The PHPlot reference manual has also been updated to match this release. +New material has been added documenting some of the PHPlot internals. +The manual is available as a separate download from Sourceforge. + + +Code Cleanup: + +Some code cleanup is going in to this release. It is hoped that these +changes will not impact any existing scripts using PHPlot, but will make +the PHPlot code itself easier to understand and maintain. + +PHPlot now avoids making changes outside its own class definition. There +are no longer any functions defined outside the class, nor any constants. +Three constants (MINY MAXY TOTY) were removed, and 2 functions were removed +(see Visible Changes below). Also PHPlot no longer sets the PHP error +reporting level to E_ALL. Although we highly recommend setting error +reporting to E_ALL in your php.ini file or scripts, it is not right for +PHPlot to assume that you want it. + + +Visible Changes and Possible Incompatibilities: + +Arrays containing color and style information are used with several PHPlot +functions to control the plot style array. These functions are: + SetPointShapes, SetPointSizes, SetLineWidths, SetLineStyles, + SetDataColors, SetDataBorderColors, and SetErrorBarColors. +The arrays passed to these functions MUST used sequential integer 0-based +indexes. This is what the PHP manual calls "Usual integer indices (starting +from zero, increasing by one)". This is the type of array you get in PHP by +default if you use array() without specifying key values, or use the +empty-bracket assignment operator to add values onto an array. In previous +versions of PHPlot, some of these functions would also work with +string-indexed or non-sequentially-indexed arrays, but this was not clearly +defined. Starting with PHPlot-5.0.4, only arrays with "usual integer +indices" work, and other array indexes will cause errors. + +Some internal-use-only functions have had their usage changed or been removed. +If you are using functions that are not documented in the PHPlot Function +Reference in the manual, your code may have to be changed. + +As part of the code cleanup, two functions which were defined outside the +PHPlot class were removed: array_pad_array(), and array_merge_php4(). +If your code used these, you need to fix your code. + +The routines which accept a color name, value, or array now check for a valid +color name. If you specify a color name which is not in your current color +table, PHPlot will draw an error and exit. Previously, PHP would report an +index error, continue, and get a 'headers already sent' message. + + +Bug Fixes in 5.0.4: + +#1813021: Miss-positioned right-justified vertical GD text. + Fixed DrawText() to correctly position 90 degree right-justified text + drawn in a fixed GD font. This could be seen with 90 degree Y tick labels. + +#1790441 Removed destructor/shutdown function, and no longer recommend + using reference assignment when creating a PHPlot object. This was + interfering with memory usage. + Credit to annajilly for analysis. + +#1779115 SetLegendWorld() failed because of undefined variables. The + required order dependency was too hard to meet. This is now fixed. + You can now use SetLegendWorld anywhere before DrawGraph. + +#1726810 (feature request, but actually a bug fix) Ignore empty strings + as data labels when doing time or data label formatting. These would + previously produce errors or bad formatting. Now you can omit labels + as needed even with time and data formatting. + Credit to exgerhardr for finding this. + +#1605555 Y data labels used wrong font and not formatted (bar charts only). + +#1208054 Localization of number formatting in 'data' format type. PHPlot + will attempt to format the numbers in a way appropriate to your locale. + You can also force the formatting with the new function SetNumberFormat. + Credit to David Hernández Sanz. + +#937944 X/Y Tick counts: PHPlot could draw one two few Y tick counts, and + one too many X tick counts. This is not a perfect fix, and more work is + needed here, but this fixes an error case in both X and Y values. + + +New Features in 5.0.4: + +New function SetLegendStyle allows control of the alignment of text and + color boxes within the legend. Also allows removing the color boxes. + Based on bug #1208054. + Credit to David Hernández Sanz. + +New function SetNumberFormat. See bug report #1208054 above. + +Callbacks are added. PHPlot can call back your functions while generating the + plot. This is experimental, and documented only in the file "Callbacks". + Credit to annajilly for the idea and design. + +----------------------------------------------------------------------------- + +2006-11-13 Released 5.0rc3 + +Overview: + +This is an interim release. It has been a long time since the previous +release 5.0rc2, and there have been a lot of changes. There are still more +changes likely to go in before we have "5.0", but there are enough for now. + +The PHPlot Reference Manual has also been released, and is available as a +separate download from Sourceforge. PHPlot users and developers are +strongly encouraged to read the manual. + +This release does not include the "doc/" and "examples/" directories of +previous releases. The Reference Manual contains more complete and +up-to-date information and examples, and I am unable to maintain the doc/ +and examples/ files while also maintaining the Reference Manual. If you +need those files, they can be accessed with the Sourceforge web CVS +browser. + + +New Features: + +The emphasis for this release is bug fixing, so there are few new features. + ++ You can now suppress lines or points on individual plots in a linepoints + graph. This feature was added because I needed a graph with several + linepoints lines, but also with a solid line showing an "80% goal". + Use SetPointShapes with the value 'none' in the array to suppress the + point markers for that plot (and only draw the line). + Use SetLineStyles with the value 'none' in the array to suppress the + line for that plot (and only draw the point markers). + [Bug # 1594458] + ++ Bar charts can have data labels above the bar with the value. Turn + these on with SetYDataLabelPos('plotin'). This is somewhat experimental, + since there isn't a lot of room for labels on top of the bars and you + may find the results are not useful. + + +Visible Changes: + +Here are the more significant changes in this release. These are changes +which may affect existing scripts and output from PHPlot. See the +ChangeLog file for information about all changes and bug fixes. + ++ A bug fix on bar chart bar borders results in black borders around the + bars if shading is turned off. The border was previously covered up, + but was supposed to be there. If you need borderless, unshaded bars, + you need to use SetDataBorderColors to make the borders the same colors + as the bars. [Bug # 1096197] + ++ TrueType font pathname handling was fixed. You no longer need to use + SetUseTTF(True). You can either use full paths to the font files with + SetDefaultTTFont() and SetFont(), or you can call SetTTFPath() to point + to a directory of font files, and then use simple font filenames without + paths in SetDefaultTTFont() and SetFont(). + [Bug # 1144644 plus several others] + ++ There have been several fixes regarding automatically calculated ranges + and scales. The result is that you may see less extra space and fewer + tick marks in some cases. + ++ A fix was made to bar and stackedbar graph bar widths in order to get + the X axis labels to properly center. As part of the fix, the bar widths + now match between the two graph types. (Before this fix, the bars were + narrower in bar graphs compared to the same data plotted as a stacked + bar.) As a result, bar graph bars will now be drawn with wider bars, and + stackedbar graph bars will be narrower. You can adjust this with the new + class variable bar_extra_space. [Bug # 1437912] + ++ Dot shapes and sizes were off by 1 or 2 slots in the array of shapes or + sizes. After the fix, you may get different dot shapes or sizes per + plot line. [Bug # 1096194] + + +Testing: + +Since its output is visual (graphics), and it has so many interconnected +modes and options, PHPlot is difficult to test. But at least we are now +trying. I have a collection of PHPlot scripts (currently about 60) and a +script to run through them. The script automatically checks that: + 1) Nothing was written to the standard error stream; + 2) An image file of size greater than 0 was written; + 3) Neither the test script nor PHPlot did exit(). This catches cases + where PHPlot aborts with DrawError(). + +The automated test is an easy way to check for serious regression, but you +really need to inspect the output files to validate PHPlot. This takes a +little time, and it is easy to overlook problems. + +The real issue is test coverage. Just as we can be sure that future +PHPlot releases will pass the test collection, we can also be sure that +future bug reports will be written against untested cases. + +-------------------- + +2006-11-08 PHPlot on Sourceforge has a new maintainer: lbayuk + +-------------------- + +2004-10-24 Released 5.0rc2 + +-------------------- + diff --git a/gui/bacula-web/external_packages/phplot/README.txt b/gui/bacula-web/external_packages/phplot/README.txt index fa81bcf42e..7219f0b1c8 100644 --- a/gui/bacula-web/external_packages/phplot/README.txt +++ b/gui/bacula-web/external_packages/phplot/README.txt @@ -1,168 +1,168 @@ -This is the README file for PHPlot -Last updated for PHPlot-5.3.1 on 2011-01-15 -The project web site is http://sourceforge.net/projects/phplot/ -The project home page is http://phplot.sourceforge.net/ ------------------------------------------------------------------------------ - -OVERVIEW: - -PHPlot is a PHP class for creating scientific and business charts. - -The release documentation contains only summary information. For more -complete information, download the PHPlot Reference Manual from the -Sourceforge project web site. You can also view the manual online at -http://phplot.sourceforge.net - -For information about changes in this release, including any possible -incompatibilities, see the NEWS.txt file. - - -CONTENTS: - - COPYING . . . . . . . . . . . . LGPL 2.1 License file - ChangeLog . . . . . . . . . . . Lists changes to the sources - NEWS.txt . . . . . . . . . . . . Highlights changes in releases - README.txt . . . . . . . . . . This file - contrib . . . . . . . . . . . . "Contributed" directory, add-ons - phplot.php . . . . . . . . . . The main PHPlot source file - rgb.inc.php . . . . . . . . . . Optional extended color table - - -REQUIREMENTS: - -You need a recent version of PHP5, and you are advised to use the latest -stable release. This version of PHPlot has been tested with PHP-5.3.5 and -PHP-5.2.17 on Linux, and with PHP-5.3.5 on Windows XP. - -Use of PHP-5.3.2 or PHP-5.2.13 is not recommended, if you are using -TrueType Font (TTF) text. A bug with TTF rendering in those versions -affects PHPlot images. This was fixed in PHP-5.3.3 and PHP-5.2.14. - -You need the GD extension to PHP either built in to PHP or loaded as a -module. Refer to the PHP documentation for more information - see the -Image Functions chapter in the PHP Manual. We test PHPlot only with the -PHP-supported, bundled GD library. - -If you want to display PHPlot charts on a web site, you need a PHP-enabled -web server. You can also use the PHP CLI interface without a web server. - -PHPlot supports TrueType fonts, but does not include any TrueType font -files. If you want to use TrueType fonts on your charts, you need to have -TrueType support in GD, and some TrueType font files. By default, PHPlot -uses a simple font which is built in to the GD library. - - -INSTALLATION: - -Unpack the distribution. (If you are reading this file, you have probably -already done that.) - -Installation of PHPlot simply involves copying two script files somewhere -your PHP application scripts will be able to find them. The scripts are: - phplot.php - The main script file - rgb.inc.php - Optional large color table -Make sure the permissions on these files allow the web server to read them. - -The ideal place is a directory outside your web server document area, -and on your PHP include path. You can add to the include path in the PHP -configuration file; consult the PHP manual for details. - - -KNOWN ISSUES: - -Here are some of the problems we know about in PHPlot. See the bug tracker -on the PHPlot project web site for more information. - -#3142124 Clip plot elements to plot area - Plot elements are not currently clipped to the plot area, and may extend - beyond. PHP does not currently support the GD clipping control. - -#1795969 The automatic range calculation for Y values needs to be rewritten. - This is especially a problem with small offset ranges (e.g. Y=[999:1001]). - You can use SetPlotAreaWorld to set a specific range instead. - -#1605558 Wide/Custom dashed lines don't work well - This is partially a GD issue, partially PHPlot's fault. - -#2919086 Improve tick interval calculations - Tick interval calculations should try for intervals of 1, 2, or 5 times - a power of 10. - -PHP Issues: - - PHP has many build-time and configuration options, and these can affect -the operation of PHPlot (as well as any other application or library). Here -are some known issues: - + Slackware Linux includes a version of PHP built with --enable-gd-jis-conv -(JIS-mapped Japanese font support). This prevents the usual UTF-8 encoding -of characters from working in TrueType Font (TTF) text strings. - + The Ubuntu Linux PHP GD package (php5-gd) was built to use the external -shared GD library, not the one bundled with PHP. This can result in small -differences in images, and some unsupported features (such as advanced -truecolor image operations). Also, although this Ubuntu GD library was -built with fontconfig support, PHP does not use it, so you still need to -specify TrueType fonts with their actual file names. - + Some PHP installations may have a memory limit set too low to support -large images, especially truecolor images. - - -If you think you found a problem with PHPlot, or want to ask questions or -provide feedback, please use the Help and Discussion forum at - http://sourceforge.net/projects/phplot/ -If you are sure you have found a bug, you can report it on the Bug tracker -at the same web site. There is also a Features Request tracker. - - -TESTING: - -You can test your installation by creating the following two files somewhere -in your web document area. First, the HTML file: - ------------- simpleplot.html ---------------------------- - - -Hello, PHPlot! - - -

PHPlot Test

- - - ---------------------------------------------------------- - -Second, in the same directory, the image file producing PHP script file. -Depending on where you installed phplot.php, you may need to specify a path -in the 'require' line below. - ------------- simpleplot.php ----------------------------- -SetDataValues($data); -$plot->SetDataType('data-data'); -$plot->DrawGraph(); ---------------------------------------------------------- - -Access the URL to 'simpleplot.html' in your web browser. If you see a -simple graph, you have successfully installed PHPlot. If you see no -graph, check your web server error log for more information. - - -COPYRIGHT and LICENSE: - -PHPlot is Copyright (C) 1998-2011 Afan Ottenheimer - -This is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; -version 2.1 of the License. - -This software is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this software; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +This is the README file for PHPlot +Last updated for PHPlot-5.3.1 on 2011-01-15 +The project web site is http://sourceforge.net/projects/phplot/ +The project home page is http://phplot.sourceforge.net/ +----------------------------------------------------------------------------- + +OVERVIEW: + +PHPlot is a PHP class for creating scientific and business charts. + +The release documentation contains only summary information. For more +complete information, download the PHPlot Reference Manual from the +Sourceforge project web site. You can also view the manual online at +http://phplot.sourceforge.net + +For information about changes in this release, including any possible +incompatibilities, see the NEWS.txt file. + + +CONTENTS: + + COPYING . . . . . . . . . . . . LGPL 2.1 License file + ChangeLog . . . . . . . . . . . Lists changes to the sources + NEWS.txt . . . . . . . . . . . . Highlights changes in releases + README.txt . . . . . . . . . . This file + contrib . . . . . . . . . . . . "Contributed" directory, add-ons + phplot.php . . . . . . . . . . The main PHPlot source file + rgb.inc.php . . . . . . . . . . Optional extended color table + + +REQUIREMENTS: + +You need a recent version of PHP5, and you are advised to use the latest +stable release. This version of PHPlot has been tested with PHP-5.3.5 and +PHP-5.2.17 on Linux, and with PHP-5.3.5 on Windows XP. + +Use of PHP-5.3.2 or PHP-5.2.13 is not recommended, if you are using +TrueType Font (TTF) text. A bug with TTF rendering in those versions +affects PHPlot images. This was fixed in PHP-5.3.3 and PHP-5.2.14. + +You need the GD extension to PHP either built in to PHP or loaded as a +module. Refer to the PHP documentation for more information - see the +Image Functions chapter in the PHP Manual. We test PHPlot only with the +PHP-supported, bundled GD library. + +If you want to display PHPlot charts on a web site, you need a PHP-enabled +web server. You can also use the PHP CLI interface without a web server. + +PHPlot supports TrueType fonts, but does not include any TrueType font +files. If you want to use TrueType fonts on your charts, you need to have +TrueType support in GD, and some TrueType font files. By default, PHPlot +uses a simple font which is built in to the GD library. + + +INSTALLATION: + +Unpack the distribution. (If you are reading this file, you have probably +already done that.) + +Installation of PHPlot simply involves copying two script files somewhere +your PHP application scripts will be able to find them. The scripts are: + phplot.php - The main script file + rgb.inc.php - Optional large color table +Make sure the permissions on these files allow the web server to read them. + +The ideal place is a directory outside your web server document area, +and on your PHP include path. You can add to the include path in the PHP +configuration file; consult the PHP manual for details. + + +KNOWN ISSUES: + +Here are some of the problems we know about in PHPlot. See the bug tracker +on the PHPlot project web site for more information. + +#3142124 Clip plot elements to plot area + Plot elements are not currently clipped to the plot area, and may extend + beyond. PHP does not currently support the GD clipping control. + +#1795969 The automatic range calculation for Y values needs to be rewritten. + This is especially a problem with small offset ranges (e.g. Y=[999:1001]). + You can use SetPlotAreaWorld to set a specific range instead. + +#1605558 Wide/Custom dashed lines don't work well + This is partially a GD issue, partially PHPlot's fault. + +#2919086 Improve tick interval calculations + Tick interval calculations should try for intervals of 1, 2, or 5 times + a power of 10. + +PHP Issues: + + PHP has many build-time and configuration options, and these can affect +the operation of PHPlot (as well as any other application or library). Here +are some known issues: + + Slackware Linux includes a version of PHP built with --enable-gd-jis-conv +(JIS-mapped Japanese font support). This prevents the usual UTF-8 encoding +of characters from working in TrueType Font (TTF) text strings. + + The Ubuntu Linux PHP GD package (php5-gd) was built to use the external +shared GD library, not the one bundled with PHP. This can result in small +differences in images, and some unsupported features (such as advanced +truecolor image operations). Also, although this Ubuntu GD library was +built with fontconfig support, PHP does not use it, so you still need to +specify TrueType fonts with their actual file names. + + Some PHP installations may have a memory limit set too low to support +large images, especially truecolor images. + + +If you think you found a problem with PHPlot, or want to ask questions or +provide feedback, please use the Help and Discussion forum at + http://sourceforge.net/projects/phplot/ +If you are sure you have found a bug, you can report it on the Bug tracker +at the same web site. There is also a Features Request tracker. + + +TESTING: + +You can test your installation by creating the following two files somewhere +in your web document area. First, the HTML file: + +------------ simpleplot.html ---------------------------- + + +Hello, PHPlot! + + +

PHPlot Test

+ + + +--------------------------------------------------------- + +Second, in the same directory, the image file producing PHP script file. +Depending on where you installed phplot.php, you may need to specify a path +in the 'require' line below. + +------------ simpleplot.php ----------------------------- +SetDataValues($data); +$plot->SetDataType('data-data'); +$plot->DrawGraph(); +--------------------------------------------------------- + +Access the URL to 'simpleplot.html' in your web browser. If you see a +simple graph, you have successfully installed PHPlot. If you see no +graph, check your web server error log for more information. + + +COPYRIGHT and LICENSE: + +PHPlot is Copyright (C) 1998-2011 Afan Ottenheimer + +This is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License. + +This software is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this software; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/gui/bacula-web/external_packages/phplot/contrib/README.txt b/gui/bacula-web/external_packages/phplot/contrib/README.txt index 3c63225200..53a1023342 100644 --- a/gui/bacula-web/external_packages/phplot/contrib/README.txt +++ b/gui/bacula-web/external_packages/phplot/contrib/README.txt @@ -1,31 +1,31 @@ -This is the README for PHPlot Contributed Code -The project web site is http://sourceforge.net/projects/phplot/ -Last updated on 2009-12-08 ------------------------------------------------------------------------------ - -The PHPlot Contributed Code directory contains code you might find useful -with PHPlot, but that doesn't quite belong as part of PHPlot itself. - -You will have to read the comments in the code files, and see the example -files, to determine what these do and if they are useful to you. None of -these functions is documented in the PHPlot Reference Manual. - -You may include or paste these functions into your own scripts. Check the -files for details, but some of these are considered "public domain" with no -usage or license restrictions. - ------------------------------------------------------------------------------ -Contents: - -prune_labels: Reduce the number of labels along the X axis - prune_labels.php . . . . . . . . . . . . Code - prune_labels.example.php . . . . . . . . Example - prune_labels.test.php . . . . . . . . . Test - -color_range: Create a gradient color map for data colors - color_range.php . . . . . . . . . . . . Code - color_range.example.php . . . . . . . . Example - color_range.test1.php . . . . . . . . . Image creation test - color_range.test2.php . . . . . . . . . Unit test - ------------------------------------------------------------------------------ +This is the README for PHPlot Contributed Code +The project web site is http://sourceforge.net/projects/phplot/ +Last updated on 2009-12-08 +----------------------------------------------------------------------------- + +The PHPlot Contributed Code directory contains code you might find useful +with PHPlot, but that doesn't quite belong as part of PHPlot itself. + +You will have to read the comments in the code files, and see the example +files, to determine what these do and if they are useful to you. None of +these functions is documented in the PHPlot Reference Manual. + +You may include or paste these functions into your own scripts. Check the +files for details, but some of these are considered "public domain" with no +usage or license restrictions. + +----------------------------------------------------------------------------- +Contents: + +prune_labels: Reduce the number of labels along the X axis + prune_labels.php . . . . . . . . . . . . Code + prune_labels.example.php . . . . . . . . Example + prune_labels.test.php . . . . . . . . . Test + +color_range: Create a gradient color map for data colors + color_range.php . . . . . . . . . . . . Code + color_range.example.php . . . . . . . . Example + color_range.test1.php . . . . . . . . . Image creation test + color_range.test2.php . . . . . . . . . Unit test + +----------------------------------------------------------------------------- diff --git a/gui/bacula-web/templates/backupjob-report.tpl b/gui/bacula-web/templates/backupjob-report.tpl index 8ae1b0c616..b02a13d9bf 100644 --- a/gui/bacula-web/templates/backupjob-report.tpl +++ b/gui/bacula-web/templates/backupjob-report.tpl @@ -1,88 +1,88 @@ - - - -bacula-web - -{literal} - -{/literal} - - - -{popup_init src='./external_packages/js/overlib.js'} -{include file=header.tpl} - - - -
- -
-

Backup Job Report

- - - - - - - - - - - - - - - - - - - -
Backup Job name:{$backupjob_name}
Period:{$backupjob_period}
Transfered Bytes{$backupjob_bytes} GB
Transfered Files{$backupjob_files}
-
- - -
-

Last jobs

- - - - - - - - - - {foreach from=$jobs item=job} - - - - - - - - {/foreach} -
Job IdLevelFilesBytesEnd time
{$job.JobId}{$job.Level}{$job.JobFiles}{$job.JobBytes}{$job.EndTime}
-
- - -
-

Transfered Bytes (last week in GB)

- -
- - -
-

Transfered Files (last week)

- -
- -
- -{include file="footer.tpl"} + + + +bacula-web + +{literal} + +{/literal} + + + +{popup_init src='./external_packages/js/overlib.js'} +{include file=header.tpl} + + + +
+ +
+

Backup Job Report

+ + + + + + + + + + + + + + + + + + + +
Backup Job name:{$backupjob_name}
Period:{$backupjob_period}
Transfered Bytes{$backupjob_bytes} GB
Transfered Files{$backupjob_files}
+
+ + +
+

Last jobs

+ + + + + + + + + + {foreach from=$jobs item=job} + + + + + + + + {/foreach} +
Job IdLevelFilesBytesEnd time
{$job.JobId}{$job.Level}{$job.JobFiles}{$job.JobBytes}{$job.EndTime}
+
+ + +
+

Transfered Bytes (last week in GB)

+ +
+ + +
+

Transfered Files (last week)

+ +
+ +
+ +{include file="footer.tpl"}