diff --git a/html/billing-graph.php b/html/billing-graph.php index 8bf2e45786..a1d10584b3 100644 --- a/html/billing-graph.php +++ b/html/billing-graph.php @@ -9,9 +9,9 @@ include("../config.php"); include("../includes/functions.php"); include("includes/authenticate.inc"); if(!$_SESSION['authenticated']) { echo("unauthenticated"); exit; } -require("includes/jpgraph/jpgraph.php"); -include("includes/jpgraph/jpgraph_line.php"); -include("includes/jpgraph/jpgraph_utils.inc.php"); +require("includes/jpgraph/src/jpgraph.php"); +include("includes/jpgraph/src/jpgraph_line.php"); +include("includes/jpgraph/src/jpgraph_utils.inc.php"); if($_GET['bill_id']){ if(testPassword($_GET['bill_id'],$_GET['bill_code']) == "1") { diff --git a/html/includes/billing.php b/html/includes/billing.php index 47ee7e5314..accceee6c6 100644 --- a/html/includes/billing.php +++ b/html/includes/billing.php @@ -120,11 +120,11 @@ $lastmonth = mysql_result(mysql_query("SELECT UNIX_TIMESTAMP(DATE_SUB(NOW(), INT $yesterday = mysql_result(mysql_query("SELECT UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 DAY))"), 0); $now = date(U); -$di = ""; -$mi = ""; diff --git a/html/includes/jpgraph/QPL.txt b/html/includes/jpgraph/QPL.txt new file mode 100644 index 0000000000..66986cb17c --- /dev/null +++ b/html/includes/jpgraph/QPL.txt @@ -0,0 +1,119 @@ +THE Q PUBLIC LICENSE version 1.0 + +Copyright (C) 1999 Trolltech AS, Norway. + Everyone is permitted to copy and + distribute this license document. + +The intent of this license is to establish freedom to share and change +the software regulated by this license under the open source model. + +This license applies to any software containing a notice placed by the +copyright holder saying that it may be distributed under the terms of +the Q Public License version 1.0. Such software is herein referred to +as the Software. This license covers modification and distribution of +the Software, use of third-party application programs based on the +Software, and development of free software which uses the Software. + + +Granted Rights + +1. You are granted the non-exclusive rights set forth in this license + provided you agree to and comply with any and all conditions in + this license. Whole or partial distribution of the Software, or + software items that link with the Software, in any form signifies + acceptance of this license. + + +2. You may copy and distribute the Software in unmodified form + provided that the entire package, including - but not restricted to + - copyright, trademark notices and disclaimers, as released by the + initial developer of the Software, is distributed. + + +3. You may make modifications to the Software and distribute your + modifications, in a form that is separate from the Software, such + as patches. The following restrictions apply to modifications: + + a. Modifications must not alter or remove any copyright notices in the + Software. + + b. When modifications to the Software are released under this license, + a non-exclusive royalty-free right is granted to the initial developer + of the Software to distribute your modification in future versions of + the Software provided such versions remain available under these terms + in addition to any other license(s) of the initial developer. + + +4. You may distribute machine-executable forms of the Software or + machine-executable forms of modified versions of the Software, + provided that you meet these restrictions: + + a. You must include this license document in the distribution. + + b. You must ensure that all recipients of the machine-executable forms + are also able to receive the complete machine-readable source code to + the distributed Software, including all modifications, without any + charge beyond the costs of data transfer, and place prominent notices + in the distribution explaining this. + + c. You must ensure that all modifications included in the + machine-executable forms are available under the terms of this + license. + + +5. You may use the original or modified versions of the Software to + compile, link and run application programs legally developed by you + or by others. + + +6. You may develop application programs, reusable components and other + software items that link with the original or modified versions of + the Software. These items, when distributed, are subject to the + following requirements: + + + + a. You must ensure that all recipients of machine-executable forms of + these items are also able to receive and use the complete + machine-readable source code to the items without any charge beyond + the costs of data transfer. + + + b. You must explicitly license all recipients of your items to use and + re-distribute original and modified versions of the items in both + machine-executable and source code forms. The recipients must be able + to do so without any charges whatsoever, and they must be able to + re-distribute to anyone they choose. + + + c. If the items are not available to the general public, and the + initial developer of the Software requests a copy of the items, then + you must supply one. + + +Limitations of Liability + +In no event shall the initial developers or copyright holders be +liable for any damages whatsoever, including - but not restricted to - +lost revenue or profits or other direct, indirect, special, incidental +or consequential damages, even if they have been advised of the +possibility of such damages, except to the extent invariable law, if +any, provides otherwise. + + +No Warranty + +The Software and this license document are provided AS IS with NO +WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +Choice of Law + +This license is governed by the Laws of Norway. Disputes shall be +settled by Oslo City Court. + + + + + diff --git a/html/includes/jpgraph/README b/html/includes/jpgraph/README new file mode 100644 index 0000000000..c17ed7c8bb --- /dev/null +++ b/html/includes/jpgraph/README @@ -0,0 +1,162 @@ +README FOR JPGRAPH +================== + +This package contains JpGraph, an Object Oriented PHP4 Graph Plotting library. + +The library is Copyright (C) 1999-2009 Aditus Consulting and +released under dual license QPL 1.0 for open source and educational +use and JpGraph Professional License for commercial use. + +Please see full license details at http://www.aditus.nu/jpgraph/ + +* -------------------------------------------------------------------- +* PHP5 IS NOT SUPPORTED IN THE 1.x SERIES +* Please use the 2.x serie if PHP5 support is required +* -------------------------------------------------------------------- + + +Included files +-------------- +README This file +QPL.txt QPL 1.0 Licensee + +/src + jpg-config.inc.php Configuration setup for JpGraph + jpgraph.php Base library + jpgraph_errhandler.inc.php Base library. Error handler module. + gd_image.inc.php Base library. GD interface class + jpgraph_ttf.inc.php Base library. TTF font handling + + jpgraph_led.php Extension: LED digits module + jpgraph_log.php Extension: logarithmic scales + jpgraph_date.php Extension: date/time scales + jpgraph_line.php Extension: line plots + jpgraph_bar.php Extension: bar plots + jpgraph_error.php Extension: error plots + jpgraph_scatter.php Extension: scatter/impulse plots + jpgraph_radar.php Extension: radar plots + jpgraph_pie.php Extension: pie plots + jpgraph_pie3d.php Extension: 3D pie plots + jpgraph_canvas.php Extension: drawing canvas + jpgraph_canvtools.php Extension: utility classes for working with canvas + jpgraph_gantt.php Extension: Gantt chart + jpgraph_regstat.php Extension: Statistics and cubic splines. + jpgraph_stock.php Extension: Stock and box plots. + jpgraph_gradient.php Extension: Color gradient class + jpgraph_gb2312.php Extension: Chinese GB2312 to Unicode translation + jpgraph_plotmark.php Extension: Handle plotmarks in plots + jpgraph_imgtrans.php Extension: Basic image transformation + jpgraph_flags.php Extension: Country flags + jpgraph_iconplot.php Extension: Use image icons in plots + jpgraph_plotband.php Extension: Plotbands in graphs + jpgraph_plotmark.inc.php Extension: Using plotmarks in graphs + jpgraph_antispam.php Extension: Antispam module + jpgraph_antispam-digits.php Extension: Antispam module + jpgraph_utils.inc.php Extension: Non mandatory Utility classes + jpgraph_mgraph.php Extension: Multi graph + imgdata_*.inc Extension: Encoded images for plot marks + flags*.dat Raw Image data: Pre-compiled data for country flags. + +/src/Examples A directory with example sripts. + Run testsuit.php to get a list of all + files and you can easily click on a file to + see the code and the resulting image. + +/docs Directory with all documentation +/docs/index.html Documentation portal + +/lang + de.inc.php German translation of error messages + en.inc.php English version of error messages + prod.inc.php Production version of error messages (does not + give specific details in error message.) +Requirements: +------------- +Miminum: +* PHP 4.4.1 or higher + (earlier versions might work but is unsupported) +* GD 2.0.30 or higher + (earlier versions might work but is unsupported) + +Recommended: +* PHP 4.4.9 +* PHP Builtin GD 2.0.34 library + +Installation +------------ +0. Make sure that the PHP version is compatible with the stated requirements + and that the PHP installation has support for the GD library. + Please run phpinfo() to check if GD library + is supported in the installation. + If the GD library doesn't seem to be installed + please consult the PHP manual under section "Image" for + instructions on where to find this library. Please refer to + the manual section "Verifying your PHP installation" + +1. Unzip and copy the files to a directory of your choice where Your + httpd sever can access them. + For a global site installation you should copy the files to + somewhere in the PHP search path. + +2. Check that the default directory paths in jpg-config.inc + for cache directory and TTF directory suits your installation. + Note1: The default directories are different depending on if + the library is running on Windows or UNIX. + Note2: Apache/PHP must have write permission to your cache + directory if you enable the cache feature. By default the cache + is disabled. + +3. Check that all rest of the DEFINE in jpg-config.inc + is setup to your preference. The default should be fine + for most users. (See also Note 3. below) + +4. If any problems are encounted please start by reading the FAQ on + http://www.aditus.nu/jpgraph/jpgraphfaq.php. + + +Documentation +------------- +The installation includes HTML documentation and reference guide for the +library. The portal page for all the documentation is +/docs/index.html + + +Troubleshooting +--------------- +0. Make sure your PHP installation has the minimum requirements and has + the GD library enabled (most modern installations fulfills the minimmum + requirements). See chapter 3.1 in the manual. + +1. If an empty page is returned back when running an example check + the following + + i) Increase the maximum memory allowed by PHP (in php.ini) to at least 32MB + ii) Enable all error messages and notices in php.ini (error_reporting = E_ALL) + III) Make sure output buffering is disabled in php.ini (output_buffering = Off) + this will make it possible to see the errors more easily + IV) Disable any PHP accelerometer you may have installed (e.g. Zend Cache) + + Then try running the example again. Most likely an error message will + now be shown that will give further information on what is wrong. + For further clarifiction on the casues for the error messages see + the FAQ section on the WEB site. + +2. If you are running IIS and Win2k and get the error "Can't find + font' when trying to use TTF fonts then try to change you paths + to UNIX style, i.e. "/usr/local/fonts/ttf/". Remember that the + path is absolute and not relative to the htdocs catalogue. Some + versions of GD for Windows also need you to set the environment + variable GDFONTPATH for GD to find the fonts. + +3. If you are using the cache please make sure that you have + set the permissions correctly for the cache directory so that + Apache/PHP can write to that directory. + + +Bug reports and suggestions +--------------------------- +Should be reported in the issue tracker at + +http://www.aditus.nu/bugtraq + + diff --git a/html/includes/jpgraph/VERSION b/html/includes/jpgraph/VERSION new file mode 100644 index 0000000000..8a099aa60b --- /dev/null +++ b/html/includes/jpgraph/VERSION @@ -0,0 +1 @@ +Revision: r1089, Exported: 2009-01-31 15:55 diff --git a/html/includes/jpgraph/docs/JpGraph_Logo.png b/html/includes/jpgraph/docs/JpGraph_Logo.png new file mode 100644 index 0000000000..9bd25d8a61 Binary files /dev/null and b/html/includes/jpgraph/docs/JpGraph_Logo.png differ diff --git a/html/includes/jpgraph/docs/html/1010Groupingactivities.html b/html/includes/jpgraph/docs/html/1010Groupingactivities.html new file mode 100644 index 0000000000..03bf976ceb --- /dev/null +++ b/html/includes/jpgraph/docs/html/1010Groupingactivities.html @@ -0,0 +1,60 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.10 Grouping activities

+

It is common to group activities. We have used this feature in the + examples of constrains. There is no special type for activity bars that + are used to illustrate grouping. The common way of illustrating this + (as have been used above) is to add "half" a triangle marker at both + ends of the bar. The special provision that JpGraph does is that if you + add a left or right marker of type MARK_LEFTTRIANGLE or + MARK_RIGHTTRIANGLE those triangles will be drawn under the bars to give + the effect as show in the examples above. In the example above we also + have made the grouping bars have slightly less heigh since the end + triangles will visually "grow" the bar.

+

So to get the effect we want for a group bar we have to use the two + lines:

+ $groupbar-> +leftMark-> +SetType( +"MARK_LEFTTRIANGLE"); +
$groupbar +->rightMark->SetType( +"MARK_RIGHTTRIANGLE") +

+

+

As of the current version There is not yet any formatting support to + accomplish the effect of indentation for the titles so this is + accomplished by using a fixed width font and adding spaces in front of + the title.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10111Addingatitleforthecolumns.html b/html/includes/jpgraph/docs/html/10111Addingatitleforthecolumns.html new file mode 100644 index 0000000000..e1fa224fd0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/10111Addingatitleforthecolumns.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.11.1 Adding a title for the columns

+

Precisely as before you can also have a title spanning all the + columns. This title is specified with the property tableTitle of + the scale. Specifying a table title will automatically adjust the + height of the column titles to fit the table title. The small code + snippet below shows how to add a title.

 $graph +->scale->tableTitle-> +Set('Phase 1'); +
$graph->scale-> +tableTitle-> +SetFont( +FF_ARIAL, +FS_NORMAL,12); +
$graph->scale-> +SetTableTitleBackground( +'darkgreen@0.6'); +
$graph->scale-> +tableTitle-> +Show(true);
+

+

A full example of this is shown below

+
+
Figure 161: Adding a column titles stratching all title + columns. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10112SpecifyingCSIMentriesforcolumntitles.html b/html/includes/jpgraph/docs/html/10112SpecifyingCSIMentriesforcolumntitles.html new file mode 100644 index 0000000000..daa216c64f --- /dev/null +++ b/html/includes/jpgraph/docs/html/10112SpecifyingCSIMentriesforcolumntitles.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.11.2 Specifying CSIM entries for column titles +

+

In exactly the same way as for a single title it is possible to + specify individual CSIM targets for each of the title columns. This is + accomplished by specifying an array for both the target and the alt + text instead of a single string as arguments for SetCSIMTarget() + The following code snippet shows how to specify that.

+  $bar +->title->SetCSIMTarget(array('sometarget1.html','sometarget1.html'), +
array(
'alttext1' +,'alttext2'));

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1011Usingmultiplecolumnsastitles.html b/html/includes/jpgraph/docs/html/1011Usingmultiplecolumnsastitles.html new file mode 100644 index 0000000000..7b480320db --- /dev/null +++ b/html/includes/jpgraph/docs/html/1011Usingmultiplecolumnsastitles.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.11 Using multiple columns as titles

+

It is often of interest not only to show one title for a gantt bar + but often one wants to show, title, start date, end date, duration or + effort and so on. Up until now we have, to keep things simple only + shown a single title for each activity. We will now show you how you + can specify an arbitrary number of columns as titles for a Gantt chart + as well as adding icons in the graph columns.

+

First out is an example to help visualize what we will achieve

+
+
Figure 160: A Gantt chart with multiple columns [src]  +

+

+

To use multiple columns there is two steps. First you need to set + the titles (name, color, fonts etc). Thereafter you need to add the + title columns for each individual bar.

+

To set the columns you will have to work with the Activity + information property of the scale. The following code excerpt show + this

+ $graph->scale->actinfo +->SetColTitles +( +
    array(
'Note' +,'Task','Duration', +'Start', +'Finish'),array( +30,100));
+

+

You will notice two things. We fist specify the titles using an + array. We have also specified a second array with the numbers 30 and + 100. This is an optional array that specifies the minimum width of, in + this case, the first two columns. By default the columns will be wide + enough to hold the widest text string in the column. However for + esthetic reasons you might sometimes want to increase the minium width. + This is what we have done here for the first two columns.

+

Furthermore you can also adjust the background colors and the style + and colors of the vertical dividing grid lines. In the previous image + we used the lines

 $graph-> +scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +
$graph->scale-> +actinfo-> +SetFont( +FF_ARIAL, +FS_NORMAL,10); +
$graph->scale-> +actinfo->vgrid->SetStyle +('solid'); +
$graph->scale-> +actinfo->vgrid->SetColor +('gray');

+

The style for the grid lines can also be "dashed", "dotted" or + "longdashed" as in other line formatting contexts within the library. + You can also adjust if you would like the small "3D" effect in the + titles. By default this is enabled. You can easily turn this of with a + call to

+ $graph->scale->actinfo +->SetStyle(ACTINFO_2D); +

+

To adjust the colors of the vertical dividing lines in the title the + method SetColor() is used as in + "$graph->scale->actinfo->SetColor('navy');".

+

The second thins is to actually populate the columns. This is done + (of course) as you add the activity bars to the graph. Previous we just + used a string as the title when we wasn't using columns. By simply + replacing this string with an array we specify the content of the + columns.

+

For example to specify two column titles we just create a + hypothetical Gantt bar as In the full example above we put all this in + arrays to make for better coding practice since we create several bars.

+

In addition to ordinary text you can also add an image or any of the + predefined icons available. In order to add that in a column you first + create an instance of IconImage() and then specify that instance + instead of the text. So in the previous code snippet if we wanted a + "open folder" image in the first column we would change the lines to

+ $iconopen = new  +IconImage( +GICON_FOLDEROPEN, +0.6); +
$title2=""; +
$bar  += new GanttBar +(0,array($iconopen, +$title2), +"2003-11-23", +"2003-12-05"); +

+

The available builtin icons are

+ +

In addition you can also use any of you own images if you specify + the argument as a string, for example

+  $myicon IconImage( +'myicon.png'); +

+

If you wonder, the second argument in the IconImage() call is + an optional scaling factor which you can use to adjust the size of the + image.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10121Addingatabletitle.html b/html/includes/jpgraph/docs/html/10121Addingatabletitle.html new file mode 100644 index 0000000000..7217f9bac6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/10121Addingatabletitle.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.12.1 Adding a table title

+

The (default) white area in the top left of the gantt table may have + a title. This is accessed by the 'tableTitle' property of the gantt + scale. Using this is straightforward as the following lines show.

+  $graph +->scale->tableTitle-> +Set( +"(Rev: 1.22)"); +
$graph->scale-> +tableTitle-> +SetFont( +FF_FONT1, +FS_BOLD); +
$graph->scale-> +SetTableTitleBackground( +"silver"); +
$graph->scale-> +tableTitle-> +Show();
+

+

The example lines above also changes the default white background to + silver. Adding these lines to the previous example gives the following + result:

+
+
Figure 162: Adding a table title. [src]  +

+

+

From the above example you might notice that the width of the left + column (which holds all the titles) have automatically adjusted itself + to make the table title fit.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10122Modifyingthedividerlines.html b/html/includes/jpgraph/docs/html/10122Modifyingthedividerlines.html new file mode 100644 index 0000000000..02f62b1cf1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/10122Modifyingthedividerlines.html @@ -0,0 +1,66 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.12.2 Modifying the divider lines

+

The vertical and horizontal lines between the titles and the bars + can be modified by accessing the 'divider' and 'dividerh' properties of + the scale. Again, this is straightforward as the following example + shows:

+ $graph->scale->divider +->SetWeight(3); +
$graph->scale-> +divider-> +SetColor( +"navy"); +
$graph->scale-> +dividerh-> +SetWeight(3); +
$graph->scale-> +dividerh-> +SetColor( +"navy"); +

+

The effect of this is shown in Figure 163 below

+
+
Figure 163: Modifying the dividing line [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10123Modifyingtheboxaroundtheplot.html b/html/includes/jpgraph/docs/html/10123Modifyingtheboxaroundtheplot.html new file mode 100644 index 0000000000..8ecfb170fa --- /dev/null +++ b/html/includes/jpgraph/docs/html/10123Modifyingtheboxaroundtheplot.html @@ -0,0 +1,55 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.12.3 Modifying the box around the plot

+

In a similar manner to the other plots in JpGraph you modify the Box + round the plot with the standard graph method 'SetBox()' as in

+  $graph +->SetBox(true, +"navy",3)
+

+

which will result in a thicker plot box around the area as shown + below

+
+
Figure 164: Modifying the box around the plotarea [src]  +

+

+

Note: You might notice the slight + discrepancy in design that here you use a method and in the previous + cases accessed a property which you modified. This is the unfortunate + affect of the evolving design and development of this library once it + was realised that the original design could be improved upon.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10124Horizontalgridsandalternatinglinecolors.html b/html/includes/jpgraph/docs/html/10124Horizontalgridsandalternatinglinecolors.html new file mode 100644 index 0000000000..60e2119de1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/10124Horizontalgridsandalternatinglinecolors.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.12.4 Horizontal grids and alternating line + colors

+

In order to make large charts easier to read it is possible to + specify alternating an horizontal grid and optional alternating line + colors in the background for Gantt charts. The horizontal grid is + accessed through the Graph::hgrid property and the line (used in + the grid) is accessed through the Graph::hgrid::line + sub-property

+

In order to specify the alternating line colors the + SetRowFillColor() method is used. For example, to use alternating + blue background with blue grid line the following lines would have to + be added to the graph script

+   +// Setup a horizontal grid +
$graph->hgrid-> +Show(); +
$graph->hgrid-> +line->SetColor('lightblue' +); +
$graph->hgrid-> +SetRowFillColor( +'darkblue@0.9'); +

+

Below is an example of a Gantt graph using this formatting

+
+
Figure 165: Adding a horizontal grid to the graph [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10125AddingiconstoGanttgraphs.html b/html/includes/jpgraph/docs/html/10125AddingiconstoGanttgraphs.html new file mode 100644 index 0000000000..041ee067b8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/10125AddingiconstoGanttgraphs.html @@ -0,0 +1,54 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.12.5 Adding icons to Gantt graphs

+ As is illustrated in the image above it is also possible (just like for + normal Graph) to add small images (or icons) to a Gantt graph by + creating an IconPlot() instance and then adding it to the graph. In the + image above the following lines were used to add the small image of + "tux" in the left lower corner
+  $icon = new IconPlot( +'penguin.png', +0.01,0.95,1 +,15); +
$icon->SetAnchor( +'left', +'bottom'); +
$graph->Add( +$icon);
+
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10126Adjustingthemarginswithautosizing.html b/html/includes/jpgraph/docs/html/10126Adjustingthemarginswithautosizing.html new file mode 100644 index 0000000000..2cbff7266c --- /dev/null +++ b/html/includes/jpgraph/docs/html/10126Adjustingthemarginswithautosizing.html @@ -0,0 +1,48 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.12.6 Adjusting the margins with auto-sizing

+ As of version 1.17 it is possible to use Graph::SetMargin() to specify + the margin for a Gantt graph even when the vertical height is + determined automatically. For example to generate a graph with no left, + right or bottom margin the following lines would be needed
+  $graph  += new GanttGraph +(500); +
$graph->SetMargin( +0,0,30 +,0);
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1012MoregeneralGanttformatting.html b/html/includes/jpgraph/docs/html/1012MoregeneralGanttformatting.html new file mode 100644 index 0000000000..b3b111f83a --- /dev/null +++ b/html/includes/jpgraph/docs/html/1012MoregeneralGanttformatting.html @@ -0,0 +1,41 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.12 More general Gantt formatting

+

In this section we will show a few more way by which you may + customize the gantt chart itself. This includes

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1013SimplifyingthedrawingofGanttgraphs.html b/html/includes/jpgraph/docs/html/1013SimplifyingthedrawingofGanttgraphs.html new file mode 100644 index 0000000000..2c98f82be9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1013SimplifyingthedrawingofGanttgraphs.html @@ -0,0 +1,140 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.13 Simplifying the drawing of Gantt graphs

+

As we have shown in the previous examples constructing a Gantt chart + consists of a number of repetitive tasks; Create the individual + activity bars and add them to the graph.

+

Now when you have a basic understanding of how this works you are + ready to appreciate a small helper method. +GanttGraph::CreateSimple(). This method takes a few arrays of data + which specifies you Gantt chart and then constructs this chart. By + using this method you sacrifices a few adjustment possibilities for + simplicity. This method is nothing magical it just takes the data for + the activities,(start and end date, titles, progress, any constrains + and so on) and constructs the activities and adds them to the graph.

+

The activities are specified in data array which for each activity + have the following fields

+ +

+

So for example to create a Gantt chart consisting of two activities + which are grouped and a milestone one would have to use something + similar to the following code

+

+ $data = array( +
  array(
0,ACTYPE_GROUP,    "Phase 1",        "2001-10-26", +"2001-11-23", +""), +
  array(
1,ACTYPE_NORMAL,   "  Label 2",      "2001-10-26", +"2001-11-13", +"[KJ]"), +
  array(
2,ACTYPE_NORMAL,   "  Label 3",      "2001-11-20", +"2001-11-22", +"[EP]"), +
  array(
3,ACTYPE_MILESTONE,"  Phase 1 Done""2001-11-23", +"M2") ); +
+
// Create the basic graph +
$graph  += new GanttGraph +(); +
$graph->title-> +Set( +"Gantt Graph using CreateSimple()"); +
+
// Setup scale +
$graph->ShowHeaders( +GANTT_HYEAR  +GANTT_HMONTH  +GANTT_HDAY  +GANTT_HWEEK); +
$graph->scale-> +week->SetStyle(WEEKSTYLE_FIRSTDAY); +
+
// Add the specified activities +
$graph->CreateSimple( +$data); +
+
// .. and stroke the graph +
$graph->Stroke(); +

+

This will then show up as

+
+
Figure 166: Using the simplified way via CreateSimple() + method +[src]  +

+

+

You may (slightly) modify the appearance of the simple Gantt charts + by means of the methods GanttGraph::SetSimpleFont() and GanttGraph::SetSimpleStyle() But not anything else, remember + that the purpose with this way of constructing graphs is to be simple. + If you need full advanced control you have to construct all the + activities in the "normal" way.

+

You can also specify constrains and progress for each bar by + supplying additional data arrays to GanttGraph::CreateSimple().

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1014AddingCSIMClientsideImageMapstoGanttcharts.html b/html/includes/jpgraph/docs/html/1014AddingCSIMClientsideImageMapstoGanttcharts.html new file mode 100644 index 0000000000..4a8d07eab0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1014AddingCSIMClientsideImageMapstoGanttcharts.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.14 Adding CSIM (Client side Image Maps) to Gantt + charts

+

Gantt charts can have independent (different targets) hot spots in + both the activities and in the associated labels for each activity.

+

You specify the target and the associated "Alt" text for an activity + bar by calling the + GanttBar::SetCSIMTarget() and + GanttBar::SetCSIMAlt()

+

In a similar way you set the target and Alt texts for the activity + title as the following code extract shows.

 $bar +->SetCSIMTarget +("http://localhost/abc/" +); +
$bar->SetCSIMAlt( +"Alt Text for the bar"); +
$bar->title-> +SetCSIMTarget( +"http://localhost/abc"); +
$bar->title-> +SetCSIMAlt( +"Alt Text for the title"); +

+

The above code assumes that your activity is available in the + variable 'bar'. In the example directory there is a complete example of + how to use CSIM together with Gantt charts in the "ganttcsimex1.php" + file. (Please note that this example makes use of the simplified Gantt + chart specification using the CreateSimple() method.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1015Addingconstrainsbetweenyouractivities.html b/html/includes/jpgraph/docs/html/1015Addingconstrainsbetweenyouractivities.html new file mode 100644 index 0000000000..3724d4826b --- /dev/null +++ b/html/includes/jpgraph/docs/html/1015Addingconstrainsbetweenyouractivities.html @@ -0,0 +1,92 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.15 Adding constrains between your activities

+

With Gantt charts there is often the need to illustrate constrains + between one or several activities. One of the most common constrain is + that on activity can't start before an other activity finish.

+

JpGraph support visualizing the following types of constrains

+ +

An example will clarify how to specify a constrain between two + activities.

+

Assume that we start with the Gantt schema as illustrated below

+
+
Figure 167: The original Gantt schema we wich to add + constrains to +[src]  +

+

+

We would now like to add the constrains that the activity "Label 3" + cant start before activity "Label 2" has finished and that the + milestone "Phase 1 done" is depending on when activity "Label 3" is + done.

+

The principle of adding constrains is that you for each activity you + want to have a constrain you have to tell to what other activity this + constrain should be to. That other activity is specified by telling on + what row that activity lies. Depending on what type of constrain, e.g. + Start-to-End, an arrow will now connect the two activities in correct + way.

+

The way to do this is to call the + SetConstrain() method on the activity. In this method you specify + the type of constrain as well as to what other activity this constrain + should be to. If you read the class reference you can also see that you + can specify the type and size of arrow used. For now we will just use + the default sizes and type.

+

So for example to add an End-To-Start constrain between "Label 2" + and "Label 3" you could write

+  $bar2-> +SetConstrain(2,CONSTRAIN_ENDSTART)
+

+

The first parameter in the call above "2" is the row of the target + activity (i.e. the row where "Label 3") activity is. In the example + below we have added the constrains we wanted.

+
+
Figure 168: Adding constrains to a gantt chart [src]  +

+

+

A note: The actual path followed by the arrow is controlled by some + heuristics to make it clear what the constrain is. It has been a design + decision that in order to keep the API simple the user has no further + detailed controlled on the actual path followed. However, in future + version the heuristics may be extended and provide some + user-controllable parameters.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10161Showingonlypartofthegraph.html b/html/includes/jpgraph/docs/html/10161Showingonlypartofthegraph.html new file mode 100644 index 0000000000..a0686c0364 --- /dev/null +++ b/html/includes/jpgraph/docs/html/10161Showingonlypartofthegraph.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.16.1 Showing only part of the graph

+

You can choose to only display a vertical slice of the overall Gantt + chart by explicitly specifying a date range with the method + GanttGraph::SetDateRange(). This will cap any bars to only be displayed + in between the start and end date given as parameters. For example + specifying

+ $graph-> +SetDateRange( +"2001-12-20", +"2002-01-20"); +

+

will show the part of the Gantt chart between the 20 Dec 2001 and 20 + of January 2002. Please note that the format depends on the locale + setting.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10162Specifyingstartdayofweek.html b/html/includes/jpgraph/docs/html/10162Specifyingstartdayofweek.html new file mode 100644 index 0000000000..d36626468b --- /dev/null +++ b/html/includes/jpgraph/docs/html/10162Specifyingstartdayofweek.html @@ -0,0 +1,38 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.16.2 Specifying start day of week

+

You can set the week start day with a call to + GanttScale::SetWeekStart(). This method takes an integer [0,6] as input + which represents the start day of the week, 0 means Sunday, 1 Monday, 2 + Tuesday and so on. The default is to start the week on Monday.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1016Advancedformatting.html b/html/includes/jpgraph/docs/html/1016Advancedformatting.html new file mode 100644 index 0000000000..ea306e8e4e --- /dev/null +++ b/html/includes/jpgraph/docs/html/1016Advancedformatting.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.16 Advanced formatting

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1017Localizing.html b/html/includes/jpgraph/docs/html/1017Localizing.html new file mode 100644 index 0000000000..e51017a53f --- /dev/null +++ b/html/includes/jpgraph/docs/html/1017Localizing.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.17 Localizing

+

Depending on your installation of PHP you might have support for + several locales. By default the locale is set up to use the default + locale on the server.

+

To specifically set a locale you specify the wanted locale with a + locale string (ala standard PHP), for example American English is + specified with the string 'EN_US', British English with 'EN_UK' 'nl_NL' + for Dutch and so on. If your current installation does not support the + specified locale an error message will be given.

+  $graph +->scale->SetDateLocale( +"se_SE"); +

+

The result is displayed below.

+
+
Figure 169: Using swedish locale. (Can you spot the + difference from English?) +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10181Enablingantialiasedlines.html b/html/includes/jpgraph/docs/html/10181Enablingantialiasedlines.html new file mode 100644 index 0000000000..164e904ecc --- /dev/null +++ b/html/includes/jpgraph/docs/html/10181Enablingantialiasedlines.html @@ -0,0 +1,89 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.18.1 Enabling anti-aliased lines

+

Anti-aliased lines are enabled by calling the method + SetAntiAliasing() in the + Image class in the script where you want to use anti-aliasing.

+

The anti-aliasing for lines works by "smoothing" out the edges on + the line by using a progressive scale of colors interpolated between + the background color and the line color.

+

Note: The algorithm used for anti-aliasing + of lines is quite simple. It would be possible to achieve even better + result by doing some real 2D signal processing. However, doing real + time 2D signal processing on a HTTP server would be foolish so the + design is deliberately kept simple. To achieve best visual result + always use a dark line color on a light background.

+

An example will show that this, quite simple algorithm, gives a + reasonable good result. The figures below shows a radar plot with and + without anti-aliasing.

+

+
+
Figure 170: Spiderplot without anti-aliasing [src]  +

+

+

+

+
+
Figure 171: Spiderplot with anti-aliasing [src]  +

+

+

+

One thing you need to keep in mind when deciding to use + anti-aliasing is that it could have potentially a dramatic effect on + the time it takes to generate the image. Line drawing with + anti-aliasing turned on is roughly 8 times slower than the normal line + drawing so treat this feature wisely.

+

Furthermore there are a couple of "gotchas" you should be aware of + when using anti-aliasing.

+
    +
  1. Anti-aliased lines uses up more of the available color-palette. The + exact number of colors used is dependent on the line-angle, a near + horizontal or near vertical line uses more colors (number of lines with + different angles uses more colors). Hence it might not be possible to + use anti-aliasing with color-gradient fill since the number of + available colors in the palette might not be enough. A normal palette + can keep around 256 colors. This means that you are advised to use a + true-color image when using anti-aliasing.
  2. +
  3. Anti-aliasing does not work very well together with background + images since it assumes a the same solid color on each side of the + line. Doing a more advanced anti-aliasing algorithm would simple take + to much processing power.
  4. +
  5. Anti-aliased lines will ignore the line width specified. They will + always have a width of roughly 1.
  6. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1018AntialiasinginJpGraph.html b/html/includes/jpgraph/docs/html/1018AntialiasinginJpGraph.html new file mode 100644 index 0000000000..8acceb16ac --- /dev/null +++ b/html/includes/jpgraph/docs/html/1018AntialiasinginJpGraph.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.18 Anti-aliasing in JpGraph

+

From version 1.2 JpGraph supports drawing of anti-aliased lines. + There are a few caveats in order to use this which is discussed in this + section.

+

Note: Note that anti-aliasing will not be + used for either horizontal, vertical or 45 degree lines since they are + by their nature are sampled at adequate rate.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1019Rotatingthegraphs.html b/html/includes/jpgraph/docs/html/1019Rotatingthegraphs.html new file mode 100644 index 0000000000..51aca47cbd --- /dev/null +++ b/html/includes/jpgraph/docs/html/1019Rotatingthegraphs.html @@ -0,0 +1,140 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.19 Rotating the graphs

+

JpGraph provide the possibility for you to rotate the generated + graph an arbitrary angle. This will only affect the actual graph (axis, + axis titles, labels and so on) and not fixed elements on the graph like + title or footer.

+

Rotation is probably most used to rotate a graph 90 degrees, for + example a bar graph to get the effect of horizontal bars.

+

+
+

Performance note: Adding a rotation transformation + will make the graph generation slightly slower since each point of the + graph as to go through a transformation step before being stroked on to + the image. JpGraph optimizes this by using a pre-calculated + transformation matric and also optimizes the special case 90 degrees.

+
+
+

By default the center of the rotation will be the center of the plot + area, which may or may not coincide with the center of the entire + image.

+

To control the rotation you use the two methods

+ +

For example

+ $graph->image->SetAngle +(45);

+

+

There is actually a third method that you could use, adding a + translation to the graph after the rotation. Since + this probably a very little used method we don't discuss it further but + refer the reader to the class reference instead + Graph:image::SetTranslation()

+

When you rotate an image you should be aware of that the individual + labels on the axis are not rotated. The design decision behind this is +
a) Bit mapped font can't be rotated +
b) Maintain readability

+

Please remember that you may still rotate the labels by calling the Axis::SetLabelAngle() + method.

+

Since the anchor point for labels is by default the optimum for + graph at 0 degree you might want to adjust the anchor point and + alignment for the labels on the axis to get a better visual appearance + on you rotated graph. This is accomplished by the method + Axis::SetLabelAlign() For a detailed discussion on how to do this + please see the section on horizontal bar graphs, ( +Working with bar plots )

+

The table below shows some examples on different kinds of rotation + to give you an idea of how changing the angle and rotation center may + be used to generate different effects. The top left graph is the + original image. The point of rotation has been marked with a red-cross + in each of the images.

+

+
+
Figure 172: Original image [src]  +

+

+

+
+
Figure 173: Rotated 45 degrees around center of plot area [src]  +

+

+

+
+
Figure 174: Rotated 90 degrees around center of plot area [src]  +

+

+

+
+
Figure 175: Rotated 45 degrees around center of the image [src]  +

+

+

+
+
Figure 176: Rotated 90 degrees around center of the image [src]  +

+

+

+
+
Figure 177: Rotated -30 degrees around the lower left point + of the plot area +[src]  +

+

+

+

As you can see from the images above if you rotate about any other + point than the center of the plot area the plot can be placed outside + the image after rotation.

+

Since the rotation, by design, only affects the plot area it is + often most effective to use when the color of the margin is the same as + the background color.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/101Introduction.html b/html/includes/jpgraph/docs/html/101Introduction.html new file mode 100644 index 0000000000..cfebf1c177 --- /dev/null +++ b/html/includes/jpgraph/docs/html/101Introduction.html @@ -0,0 +1,61 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.1 Introduction

+

Canvas graph is really not a graph. It a blank sheet of paper which + you can use to draw arbitrary shapes and still have access to some of + the convenient features of JpGraph.

+

You can work with a canvas in different levels of complexity. You + can for example work directly with the Image class which provides a + large number of primitives for drawing but requires that you use + absolute pixel coordinates.

+

You can also make life a little bit easier by using a canvas scale. + This lets you define your own scale on the canvas which often makes it + easier by letting you work on a grid you have specified yourself. It + also makes it very easy to re-scale you image automatically by just + changing your scale. For example to half the size of you drawing you + just make the scale twice as large.

+

To give you some help in working with different canvas you should + include the "jpgraph_canvtools.php" file when working on canvases. This + is not strictly necessary but it will give you some nice abstraction to + help you create your masterpieces.

+

As another (concrete) example on the use of a canvas the figure + below is a listing of font styles available with JpGraph.

+
+
Figure 187: Another example of using a canvas to draw a + number of text boxes +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/101WhyuseGanttcharts.html b/html/includes/jpgraph/docs/html/101WhyuseGanttcharts.html new file mode 100644 index 0000000000..d3ae45fa0d --- /dev/null +++ b/html/includes/jpgraph/docs/html/101WhyuseGanttcharts.html @@ -0,0 +1,42 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.1 Why use Gantt charts?

+

The cynical view: To explain why your project is over-due and + over-budget.

+

The pragmatic view: To keep management of our back and know what we + have forgotten

+

The common view: As a tool to help identify project issues and + highlight problem areas.

+

Basically, Gantt charts are used to show the state of a number of + activities (possible grouped) against time.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1020Adjustingbrightnessandcontrastforimagesandbackgrounds.html b/html/includes/jpgraph/docs/html/1020Adjustingbrightnessandcontrastforimagesandbackgrounds.html new file mode 100644 index 0000000000..e2ce4cd049 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1020Adjustingbrightnessandcontrastforimagesandbackgrounds.html @@ -0,0 +1,67 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.20 Adjusting brightness and contrast for images + and backgrounds

+

The following section only applies to palette images. This + means it wont work on true-color images.

+

It is often desirable to have a background image look a little bit + "washed" out so it doesn't take the concentration away from the actual + graph. There are basically two ways of accomplish this

+
    +
  1. Prepare the image with an external images editor to adjust the + level of brightness and contrasty to a desirable level
  2. +
  3. Use JpGraph:s built in adjustment for contrast, brightness and + color saturation.
  4. +
+

To adjust the background image call The levels for both brightness + and contrast are real numbers in the range [-1, 1] You can choose to + adjust for example just the background image or you might also choose + to adjust the whole image. To change the background image just use the + method + Graph::AdjBackgroundImage() to specify a suitable value. Let's show + some example on what we can do with this. The following example have + been generated by using the small utility "adjimg.php" which you can + find in the "utils/" directory.

+

+
Brightness=0, contrast=0, saturation = -1 (Original image)

+

+
Brightness=0, contrast=0, saturation = -1 (Black & White image)

+

+
Brightness=0.3, contrast=-0.3, saturation=0

+

+
Brightness=0.4, contrast=-0.7, saturation=0

+

+
Brightness=0.4, contrast=-0.7, saturation=-1

+

+
Brightness=0, contrast=0, saturation=1

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1021Timingthegenerationofgraphs.html b/html/includes/jpgraph/docs/html/1021Timingthegenerationofgraphs.html new file mode 100644 index 0000000000..1d489f9bab --- /dev/null +++ b/html/includes/jpgraph/docs/html/1021Timingthegenerationofgraphs.html @@ -0,0 +1,65 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.21 Timing the generation of graphs

+

During development and optimization it can be very handy to have the + actual time it took to generate the image as a footnote. The following + example shows the usage of this feature

+
+
Figure 178: Timing of a graph [src]  +

+

+

To enable this feature you can proceed in two ways.

+
    +
  1. You can either set the global define BRAND_TIMING (in jpgraph.php) + to true. This will add the timing string to all graphs generated.
  2. +
  3. .. or you can enable it for a specific graph by setting the global + variable $gJpgBrandTiming as in
    +  $gJpgBrandTiming=true; +
    +

    in the beginning of the script.

    +
  4. +
+

If you like you might also change the way the timing is formatted by + setting the string defined by BRAND_TIMING_FORMAT (in jpgraph.php). + This string represents a standard printf() format string.

+Note: JpGraph contains a utility class called JpgTimer which you + can use yourself should you need ms timing of part of your own code. + The API is really simple. The class supports multiple running timers + and you start a timer simply by calling the Push() method. This will + start a new timer and put it on the top of the timer stack. To stop the + timer, pop it from the stack and return the timing value simply call + Pop().

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1022Usingcountryflagsinvariouscontext.html b/html/includes/jpgraph/docs/html/1022Usingcountryflagsinvariouscontext.html new file mode 100644 index 0000000000..3a50453966 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1022Usingcountryflagsinvariouscontext.html @@ -0,0 +1,75 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.22 Using country flags in various context

+

JpGraph has built-in support for over 200 country flags, i.e. they + are available to be used in graphs without any external image + definitions.

+

Country flags can be used in primarily two settings

+
    +
  1. As image markers in line and scatter graphs
  2. +
  3. As background images for graphs
  4. +
  5. As a special type of icons (using the IconPlot()) which can be + added to the graph in any arbitrary position. See next section
  6. +
+

In order to make it easy to find the appropriate country flags they + can be specified with either full or partial name or as an numeric + index. The routines in JpGraph are "smart" enough to figure out which + way you are trying to specify a particular flag.

+

To specify a country flag as a marker you have to specify the + special mark type as one of MARK_FLAG1,MARK_FLAG2,MARK_FLAG3 or + MARK_FLAG4

+

Flags are internally stored in 4 different sizes which is indicated + by the number in the mark types. Flags may also be arbitrary scaled + when displayed. Since this is partially overlapping functionality you + might very well ask why the flags are stored in four different basic + sizes. The reason is of course performance. It you only want a very + small flag it takes processing time to scale down a large image to, + say, a small icon size. At the same time for large flags to be used as + background a small original flag might not have enough details to be + scaled up to a large size. Hence the reason for storing the flags in 4 + different sizes.

+

The example below shows how to use country flags as markers

+
+
Figure 179: Using country flags as line plot markers [src]  +

+

+

To use country flags as background one has to use the method + Graph::SetBackgroundCountryFlag(). With this method you can specify + both how much of the image should be filled as well as how much of the + flag should be mixed into the background.

+

To see a list of all supported country flags you can run the script + "listallcountryflags.php" in the Example directory. This will show you + a table with all flags.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1023Addingiconsontothegraph.html b/html/includes/jpgraph/docs/html/1023Addingiconsontothegraph.html new file mode 100644 index 0000000000..9b3c8c7af6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1023Addingiconsontothegraph.html @@ -0,0 +1,65 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.23 Adding icons onto the graph

+

In addition to the standard background image you can also add an + arbitrary number of icons onto the background of the graph. These icons + are created with a call to the special Plot class IconPlot.

+

The image from icons are taken from a file or as one of the builtin + country flags.

+

You may control how much of the icon should be blended into the + background by specifying a percentage (1-100). The example below shows + how to mix in the picture of "Tux" into the background of a filled line + graph. Note: This example uses alpha blending and will therefore + require GD2.

+
+
Figure 180: Adding an icon into the background [src]  +

+

+

To specify any of the roughly 200 country flags as an icon you first + create an empty Icon and then call the IconPlot::SetCountryFlag() with + the appropriate parameters. (See the class reference). This is + illustrated below by adding the Icelandic flag into the background as + an icon

+
+
Figure 181: Adding an icon flag into the background [src]  +

+

+

Note: Some older versions of PHP pre-4.3.3 + using the builtin GD have problems rendering blended images. If you + have this problem then you need to upgrade to a more recent version of + PHP.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/102CapabilitiesinJpGraphGanttmodule.html b/html/includes/jpgraph/docs/html/102CapabilitiesinJpGraphGanttmodule.html new file mode 100644 index 0000000000..cdc7fa60d0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/102CapabilitiesinJpGraphGanttmodule.html @@ -0,0 +1,74 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.2 Capabilities in JpGraph Gantt module

+

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/102Creatingasimplecanvas.html b/html/includes/jpgraph/docs/html/102Creatingasimplecanvas.html new file mode 100644 index 0000000000..cbb9814a40 --- /dev/null +++ b/html/includes/jpgraph/docs/html/102Creatingasimplecanvas.html @@ -0,0 +1,169 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.2 Creating a simple canvas

+

In order to create a canvas graph you need to include the file + "jpgraph_canvas.php" in addition to the standard "jpgraph.php" file. + You might also want to include the "jpgraph_canvtools.php" to get + access to some supporting classes that may (or not) come in handy.

+

Creating a canvas gives you the opportunity draw arbitrary shapes on + a "white" piece of paper. Let's first show a simple example were we + just draw a text box. We first show you the code which we will walk + through

(File: canvasex01.php) +
<?php +
+// $Id: canvasex01.php,v 1.3 2002/10/23 08:17:23 aditus Exp $ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
+
// Setup a basic canvas we can work  +
$g = new CanvasGraph( +400,300,'auto' +); +
$g->SetMargin( +5,11,6 +,11); +
$g->SetShadow(); +
$g->SetMarginColor( +"teal"); +
+
+// We need to stroke the plotarea and margin before we add the +
// text since we otherwise would overwrite the text. +
$g->InitFrame(); +
+
// Draw a text box in the middle +
$txt="This\nis\na TEXT!!!"; +
$t = new Text( +$txt,200,10 +); +
$t->SetFont( +FF_ARIAL, +FS_BOLD,40); +
+
+// How should the text box interpret the coordinates? +
$t->Align( +'center','top'); +
+
// How should the paragraph be aligned? +
$t->ParagraphAlign( +'center'); +
+
+// Add a box around the text, white fill, black border and gray shadow +
$t->SetBox( +"white", +"black","gray"); +
+
// Stroke the text +
$t->Stroke( +$g->img); +
+
// Stroke the graph +
$g->Stroke(); +
+
?> +
+

+

The example above starts by creating a (400x200) sized image. We set + the margins to get a nice frame around the image. For canvases the + margins has no effect in the way you enter coordinates. Top left is + (0,0) and bottom right (including any potential margin and shadow) is + the maximum. In this case the coordinates are X:0-399, and Y:0-199

+

We then call the + InitFrame() method which actually strokes the margin and plotarea + to the graph. Since everything is stroked in the order you issue the + commands you must make sure that the graphical objects you want on top + is stroked last. This is different from the way you normally work with + JpGraph since it queues up all you addition and then makes sure they + are stroked in the correct order.

+

We then create a Text object, + setup it's properties, including the absolute screen position where we + want the text, and then stroke it. Her it might be a need for a closer + explanation of the, perhaps misnamed, method +Text::Align() This method states how the text coordinates + should be interpreted , i.e when we specify (200,10) as the + coordinates for the text paragraph should that be interpreted as the + top left corner, bottom-left corner or something else (of the bounding + box)? In the code above we have chosen to interpret the X-coordinate as + being the center of the bounding box and the Y-coordinate as the top. + Hence the text will be aligned so that the (200,100) point in the graph + is aligned with the middle of the top line of the paragraphs bounding + box.

+

We also specify that the lines within the paragraph should be + centered with a call to + Text::ParagraphAlign() Since we also choose to have a box around + the text we have to make use of the method + Text::SetBox() which is used to specify the fill color, the border + color and the shadow color (if you leave out shadow color or set it to + '', no shadow will be used).

+

Now we are ready to stroke the text onto the canvas. In order to do + so we must specify the basic Image drawing class we want to use. + Without discussing this further we just state that a suitable image + class can always be found as the img property of the + Graph class.

+

Finally we are ready to stroke the entire graph, which in effect + sends the canvas back to the browser. Below you can see the effect of + all this code

+

+
+
Figure 188: A simple canvas drawing with a text box in the + middle [src] +  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/103Addinglinesandrectanglestoacanvas.html b/html/includes/jpgraph/docs/html/103Addinglinesandrectanglestoacanvas.html new file mode 100644 index 0000000000..c5669f772b --- /dev/null +++ b/html/includes/jpgraph/docs/html/103Addinglinesandrectanglestoacanvas.html @@ -0,0 +1,187 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.3 Adding lines and rectangles to a canvas

+

A canvas also makes a good background for using standard graphic + primitives, for example circles and lines. What you first have to + remember is that you are (so far) working with absolute screen + coordinates and secondly all drawing primitives are found in the + Image Class accessible as a property of the Graph class. So for + example to draw a line between coordinate (0,0) and (100,100) you would + have to add the line

+  $graph->img-> +Line(0,0 +,100,100); +

+

+

To your code. The following example shows some of the graphic + primitives you have access to in the Image class

+(File: canvasex02.php) +
<?php +
+// $Id: canvasex02.php,v 1.1 2002/08/27 20:08:57 aditus Exp $ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
+
// Setup a basic canvas we can work  +
$g = new CanvasGraph( +400,200,'auto' +); +
$g->SetMargin( +5,11,6 +,11); +
$g->SetShadow(); +
$g->SetMarginColor( +"teal"); +
+
+// We need to stroke the plotarea and margin before we add the +
// text since we otherwise would overwrite the text. +
$g->InitFrame(); +
+
// Add a black line +
$g->img-> +SetColor( +'black'); +
$g->img-> +Line(0,0 +,100,100); +
+
// .. and a circle (x,y,diameter) +
$g->img-> +Circle(100,100 +,50); +
+
+// .. and a filled circle (x,y,diameter) +
$g->img-> +SetColor('red'); +
$g->img-> +FilledCircle( +200,100,50 +); +
+
// .. add a rectangle +
$g->img-> +SetColor( +'green'); +
$g->img-> +FilledRectangle( +10,10,50 +,50); +
+
// .. add a filled rounded rectangle +
$g->img-> +SetColor( +'green'); +
$g->img-> +FilledRoundedRectangle( +300,30,350 +,80,10); +
// .. with a darker border +
$g->img-> +SetColor( +'darkgreen'); +
$g->img-> +RoundedRectangle( +300,30,350 +,80,10); +
+
// Stroke the graph +
$g->Stroke(); +
+
?> +
+

+

Pleas note the way to access these routines through the img property + of the Graph class. Please also keep in mind that the coordinates are + absolute.

+

+
+
Figure 189: Example of graphic primitives [src]  +

+

+

+

+
+

A note on GD For those of you using GD 1.xx you + might notice that the large "filled circle" isn't completely filled. + This is because in GD 1.xx there are no low level primitives to fill an + ellipse or circle so JpGraph tries to make the best out of a bad + situation and manually fake a filled circle. For interest of speed + JpGraph does not contain a complete (for example) Bresenham-circle fill + but cheats by using some existing GD routines. This is not a perfect + solution and for large filled circles like this you get some + moire-patterns in the circle. If you upgrade to GD 2.x JpGraph will be + able to make full use of those new existing methods and the fill will + be perfect.

+
+
+

We refer you to the class reference to find out what other graphic + primitives are available for use.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/103AsimpleGanttchart.html b/html/includes/jpgraph/docs/html/103AsimpleGanttchart.html new file mode 100644 index 0000000000..19c113e720 --- /dev/null +++ b/html/includes/jpgraph/docs/html/103AsimpleGanttchart.html @@ -0,0 +1,243 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.3 A simple Gantt chart

+

Time to show you an example of a Gantt chart and how easy it is to + make one. Lets make it the simplest possible Gantt chart. One activity, + named "Project", which lasts from "2001-11-01" to "2002-02-20".

+

All it takes to do this (using default values for everything) is the + following code.

(File: ganttex00.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_gantt.php"); +
+
// A new graph with automatic size +
$graph  += new GanttGraph +(0,0, +"auto"); +
+
//  A new activity on row '0' +
$activity  += new GanttBar +(0,"Project", +"2001-12-21", +"2002-01-20"); +
$graph->Add( +$activity); +
+
// Display the Gantt chart +
$graph->Stroke(); +
?> +

+

The resulting image is shown in Figure + + below.

+
+
Figure 143: Your first simple Gantt chart. [src]  +

+
+

+

+

Let's note a few things with the above image and code:

+ +

So, lets start making this graph a little bit more interesting. + First we are going to add a title, then we will add a month scale and + finally we will change the color of the bar.

+

All that is taken care of in the code below.

+(File: ganttex01.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_gantt.php"); +
+
$graph  += new GanttGraph +(0,0, +"auto"); +
$graph->SetShadow(); +
+
// Add title and subtitle +
$graph->title-> +Set( +"A nice main title"); +
$graph->title-> +SetFont( +FF_ARIAL, +FS_BOLD,12); +
$graph->subtitle-> +Set( +"(Draft version)"); +
+
// Show day, week and month scale +
$graph->ShowHeaders( +GANTT_HDAY  +GANTT_HWEEK  +GANTT_HMONTH); +
+
+// Instead of week number show the date for the first day in the week +
// on the week scale +
$graph->scale-> +week->SetStyle(WEEKSTYLE_FIRSTDAY); +
+
+// Make the week scale font smaller than the default +
$graph->scale-> +week->SetFont(FF_FONT0 +); +
+
+// Use the short name of the month together with a 2 digit year +
// on the month scale +
$graph->scale-> +month-> +SetStyle( +MONTHSTYLE_SHORTNAMEYEAR2); +
+
+// Format the bar for the first activity +
// ($row,$title,$startdate,$enddate) +
$activity  += new GanttBar +(0,"Project", +"2001-12-21", +"2002-01-20"); +
+
+// Yellow diagonal line pattern on a red background +
$activity +->SetPattern(BAND_RDIAG, +"yellow"); +
$activity +->SetFillColor +("red"); +
+
// Finally add the bar to the graph +
$graph->Add( +$activity); +
+
// ... and display it +
$graph->Stroke(); +
?> +
The resulting image is shown in Figure + 144 below.
+
+
Figure 144: Making the Gantt chart a little bit more + interesting with title and more colors. [src]  +

+

+

From the above example you might note a few things

+ +

To show that this is really simple let's show the full year in the + month, and set the header style to be white text on a dark blue + background by adding the lines

+   +// Use the short name of the month together with a 4 digit year +
// on the month scale +
$graph->scale-> +month-> +SetStyle( +MONTHSTYLE_SHORTNAMEYEAR4); +
$graph->scale-> +month-> +SetTextColor( +"white"); +
$graph->scale-> +month-> +SetBackgroundColor( +"blue"); +

+

to the code above. The resulting image is shown in Figure 145

+
+
Figure 145: Enhancing the scale headers. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/104ThestructureofaGanttchart.html b/html/includes/jpgraph/docs/html/104ThestructureofaGanttchart.html new file mode 100644 index 0000000000..c583e79580 --- /dev/null +++ b/html/includes/jpgraph/docs/html/104ThestructureofaGanttchart.html @@ -0,0 +1,62 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.4 The structure of a Gantt chart

+

A Gantt chart is made up of four distinct areas.

+
    +
  1. On the left side there is the activity title column.
  2. +
  3. On the top there is the scale headers (up to four headers may be + displayed)
  4. +
  5. The actual plot area where all the Gantt bars and markers go
  6. +
  7. The margin area, where for example the titles are shown
  8. +
+

Since a Gantt chart inherits all the usual properties of a JpGraph + Graph() you have the access to the same method to formatting the image + as before. For example to have a shadow around the image you call + Graph::SetShadow() and to set the margin color you can use + Graph::SetMarginColor(). Please refer to the reference documentation + for a full list of supported features.

+

To create a Gantt chart you add objects to it. As + of this writing you may add the following object by the use of the + GanttChart::Add() method

+ +

All these objects may be extensively modified in terms of + formatting. You can specify color (both fill- and frame color), size, + titles, style and patterns and so on. All these objects comes with (in + my mind) sensible default so you don't have to specify a lot of + parameters. But if you need a fine grain control or if you disagree + with my taste you can.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/104Usingacanvasscale.html b/html/includes/jpgraph/docs/html/104Usingacanvasscale.html new file mode 100644 index 0000000000..d9a51a2a64 --- /dev/null +++ b/html/includes/jpgraph/docs/html/104Usingacanvasscale.html @@ -0,0 +1,291 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.4 Using a canvas scale

+

The previous method using absolute coordinates works. But nothing + more. It doesn't give you any chance to easily scale the image (unless + you manually recalculate all used coordinates) , it gets tedious to + work with pixel level resolution. Especially if you just like to draw a + few basic shapes.

+

To help with this you can use a scale for the canvas. This lets you + define a "work-space" of your choice. You can for example set the + coordinates to be between X:0-10, Y:0-10. This makes it easier to + position objects on the canvas. This also has two additional + advantages:

+ +

+

To use this type of scaling you must make sure you include the file + "jpgraph_canvtools.php" . In addition to the scaling class their are + also a couple of other utility classes that may come in handy, + especially the Shape class.

+

Using the scale is quite simple. You first instantiate a scale + object passing the graph as a parameter and then specify the scale you + want to use. This means you need to add the lines

+  $scale  += new CanvasScale +($g); +
$scale->Set( +0,$xmax,0 +,$ymax);

+

+

to your code. You can then use one of the translation methods (for + example +CanvasScale::Translate()) in the canvas scale class to translate + between your world coordinates and the absolute screen coordinates. + This means you could take the code in the example above and just add + the lines, for example,

+  list( +$x1,$y1) = $this +->scale->Translate( +$x1,$y1); +
list(
$x2,$y2) =  +$this->scale->Translate +($x2,$y2); +
$g->img-> +Line($x1,$y1 +,$x2,$y2); +

+

Since this pattern has to be repeated for every object that has to + be drawn it makes good sense to encapsulate this in a separate class. + This is exactly why the canvas tools file also have a utility class + called Shape This class is + mainly a wrapper around the most commonly used methods in the basic + Image class (with one important exception) and does all these the + translation for you. Please see the class reference for a complete list + of the available methods To set up the Shape class you instantiate it + with the graphic context and the scale you want to use as argument as + in

+

+ $shape = new  +Shape($g,$scale +);

+

+

You are then ready to use all the methods in the shape class. Using + a scale and imitating the previous example we would get the source + shown below.

(File: canvasex03.php) +
<?php +
+// $Id: canvasex03.php,v 1.1 2002/08/27 20:08:57 aditus Exp $ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
include 
"../jpgraph_canvtools.php"; +
+
// Define work space +
$xmax=20; +
$ymax=20; +
+
// Setup a basic canvas we can work  +
$g = new CanvasGraph( +400,200,'auto' +); +
$g->SetMargin( +5,11,6 +,11); +
$g->SetShadow(); +
$g->SetMarginColor( +"teal"); +
+
+// We need to stroke the plotarea and margin before we add the +
// text since we otherwise would overwrite the text. +
$g->InitFrame(); +
+
// Create a new scale +
$scale  += new CanvasScale +($g); +
$scale->Set( +0,$xmax,0 +,$ymax); +
+
+// The shape class is wrapper around the Imgae class which translates +
// the coordinates for us +
$shape  += new Shape($g, +$scale); +
$shape->SetColor( +'black'); +
+
+
// Add a black line +
$shape->SetColor( +'black'); +
$shape->Line( +0,0,20 +,20); +
+
// .. and a circle (x,y,diameter) +
$shape->Circle( +5,14,2 +); +
+
+// .. and a filled circle (x,y,diameter) +
$shape->SetColor( +'red'); +
$shape->FilledCircle( +11,8,3 +); +
+
// .. add a rectangle +
$shape->SetColor( +'green'); +
$shape->FilledRectangle(15, +8,19,14 +); +
+
// .. add a filled rounded rectangle +
$shape->SetColor( +'green'); +
$shape->FilledRoundedRectangle(2, +3,8,6 +); +
// .. with a darker border +
$shape->SetColor( +'darkgreen'); +
$shape->RoundedRectangle(2, +3,8,6 +); +
+
+
// Stroke the graph +
$g->Stroke(); +
+
?> +
+
The source above gives the following result
+
+
Figure 190: Drawing shapes on a canvas using a scale. [src]  +

+

+

If we like to make a smaller image we could just change the image + size and everything will be rescaled without any further code changes. + SO for example making the image half the size would give the result

+
+
Figure 191: Shrinking the image to half the size is easy + since the scaling will maintain the relative position of the objects [src]  +

+

+

If we instead wanted to keep the image size but shrink the shapes we + could just make the scale twice as large which would result in

+
+
Figure 192: Shrinking hte graphic object by making the scale + twice as large +[src]  +

+

+

+

We previously mentioned that the Shape class was a wrapper around + the image class with one exception. So what is the exception? Well, + glad you asked. The exception is that it contain an additional method + which draws an "indented rectangle". An indented rectangle is a + rectangle where one of it's four corners have been moved into the + rectangle. You create an indented rectangle by calling either + Shape::IndentedRectangle() or A few examples illustrates what this + shape looks like.

+
+
Figure 193: Examples of filled indented rectangles [src]  +

+

+

+

As a final note we mention the class + CanvasRectangleText Which can be used to add a text with a rounded + rectangle (possibly filled) onto the canvas. The previous example where + all the available fonts were drawn were using this class. We don't + describe it further but refer the interested reader to the class + reference and the 'listfontsex1.php' example file.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/105CreatingaGanttChart.html b/html/includes/jpgraph/docs/html/105CreatingaGanttChart.html new file mode 100644 index 0000000000..16c5401998 --- /dev/null +++ b/html/includes/jpgraph/docs/html/105CreatingaGanttChart.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.5 Creating a GanttChart

+

You create a new Gantt Chart with a call to GanttChart(). The + signature for GanttGraph is the same as for ordinary JpGraph graphs, + i.e

function  +GanttGraph( +$aWidth, +$aHeight, +$aCachedName, +$aTimeOut, +$aInline) +

+

The only real difference is that for GanttCharts you can specify one + or both of the dimension parameters (width and height) as -1 in which + case that dimension will be automatically sized determined by scale and + fonts chosen. The following examples shows some possible ways of + creating a new graph

+ +

Since GanttGraph() inherits all the methods (that make sense for + GanttGraph) from Graph you can specify shadow, color etc of the general + frame.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/105SampleapplicationDrawingDBschema.html b/html/includes/jpgraph/docs/html/105SampleapplicationDrawingDBschema.html new file mode 100644 index 0000000000..cbfc635ae7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/105SampleapplicationDrawingDBschema.html @@ -0,0 +1,433 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.5 Sample application: Drawing DB schema

+

As a final example we shortly discuss how the canvas type of graph + was used to generate the DB schema for the DDDA architecture.

+

The library php file "utils/misc/imgdbschema.php" included in the + distribution contains some utility classes to make the drawing of table + schemes easier. It contains two basic classes, Class ImgDBTable and + Class ImgDBSchema. The first class understand how to draw an image + illustrating a single table. The second class is responsible for + automatically extract all the relevant information from a DB to draw a + complete DB Schema.

+

Before going into this a little bit more we show what an example of + this might look like.

+
+
Figure 194: Example of using the canvas graph style together + with the imgdbschema.php library to semi-automatically generate a DB + schema [src] +  +

+

+

+

Before going on it should be noted that the ImgDBSchema assumes that + the DB can be accessed through a DB abstraction layer modeled after the + abstraction layer available in the 'jpdb.php' file in the DDDA + architecture. This abstraction layer assumes a MySQL database in the + bottom. This specific dependency of this particular abstraction layer + is the reason why these classes is not included in the generic canvas + tools file.

+

The second thing to note is that this library does not contain a + complete automatic-layout engine but rather a very simple automatic + system which, if nothing else is specified, just puts the table in a + rectangular grid. A complete graph layout engine would simple be to + much to write in this context. This is also a very difficult + optimization problem and sofar not even any of the available research + programs that tries this can achieve a satisfactory layout without + manual intervention.

+

The critical lines in the code to generate the above graph is

+  $tblposadj=array($tlo +,0,$tblwidth+ +$tlo+2,0 +,2*$tblwidth+ +$tlo+4,0 +,-1,16,- +1,16); +
$dbschema  += new ImgDBSchema +("jpgraph_doc" +,"FormatTblName" +,"FormatFldName" +); +
$dbschema +->SetMargin($leftm, +$topm); +
$dbschema +->SetTableWidth +($tblwidth); +
$dbschema +->Stroke($this-> +img,$this->iscale +,$tblposadj);

+

+

The rest of the code in the file is just to setup the canvas, add an + indented rectangle to group some tables and generate a footer with the + date and time this image was generated.

+

The first line instantiates a new ImgDBSCheme layout engine asking + it to draw an image for the database 'jpgraph_doc'. The following two + arguments specify two callback functions for formatting the text for + header and each field in a table.

+

The next line specify the top left margin where the drawing of the + tables should be started.

+

The third line specify the width of a single table. The final lines + starts the engine and draws all tables in the database to the canvas. + The final argument requires some further explanation. This is an offset + (x,y) from the top left corner how each individual table should be + positioned. If the value is -1 indicates that the default value should + be used. If this array is not specified then the tables will simple + arranged line by line.

+

The full source code for drawing this DB schema example is shown + below.

+

(File: dbschemaex1.php) +
<?php +
+/*======================================================================= +
// File:     DBSCHEMAEX1.PHP +
// Description:    Draw a DB schema of the DDDA architecture +
// Created:     2002-08-25 +
// Author:    Johan Persson (johanp@aditus.nu) +
+// Ver:        $Id: dbschemaex1.php,v 1.1 2002/08/27 20:08:57 aditus Exp $ +
// +
// License:     This code is released under QPL +
//              Copyright (C) 2001,2002 Johan Persson +
+// Note:        The actual drawing of the tables are semi-automatically +
+//              but you can easily adjust the individual tables position +
//              with the 'tblposadj' array.  +
// +
+//======================================================================== +
*/ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
include 
"../jpgraph_canvtools.php"; +
include 
"../utils/misc/imgdbschema.inc"; +
include 
"../utils/jpdocgen/jpdb.php"; +
+
+
+// Global callback to format the table header names +
function  +FormatTblName( +$aName) { +
    
+// We want to replace any specifi references to the +
    // 'JpGraph' project with the generic '<project>' +
    
return  +str_replace( +'JpGraph', +'<project>' +$aName); +
} +
+
+// Global callback to format each field name in the table +
function  +FormatFldName( +$aName,$aTable) { +
    return 
$aName +; +
} +
+
+
class 
Driver  +{ +
+
    var 
$ig +, $img$iscale +$ishape; +
    var 
$iymax +,$ixmax; +
    var 
$iwidth +,$iheight; +
+
    function 
Driver +() { +
+
    
+// Define Image size and coordinate grid space to work within +
    
$this +->iwidth 600; +
    
$this +->iheight750; +
    
$this +->iymax  50; +
    
$this +->ixmax  55; +
+
    
// Setup a basic canvas +
    
$this +->ig = new CanvasGraph( +$this->iwidth,$this +->iheight,'auto'); +
    
$this +->img $this-> +ig->img; +
+
    
// Define the scale to be used +
    
$this +->iscale  += new CanvasScale +($this->ig); +
    
$this +->iscale->Set( +0,$this->ixmax +,0,$this-> +iymax); +
    
$this +->ishape  += new Shape($this-> +ig,$this->iscale +); +
+
    
// A small frame around the canvas +
    
$this +->ig->SetMargin( +2,3,2 +,3); +
    
$this +->ig->SetMarginColor( +"teal"); +
    
$this +->ig->InitFrame(); +
+
    } +
+
    function 
Run +() { +
+
    
$leftm +=1.5;    // Left margin (for table schemes)  +
    
$topm=5;     +// Top margin (for table schemes)  +
    
$tblwidth +=15;    // Individual table width +
    
$tlo=1;         +// Offset for top line +
+
    // Add the background color for the project specific tables +
    
$this +->ishape->IndentedRectangle($leftm, +$topm-1,3 +*$tblwidth+$tlo+ +6,45, +
                     
$tlo ++2*$tblwidth+ +2,30,CORNER_BOTTOMLEFT, +
                     
'lightblue'); +
+
    
+// Stroke the tables (series of x,y offsets, If =-1 then use the +
    // automtic positioning +
    
$tblposadj +=array($tlo,0, +$tblwidth+$tlo+2 +,0,2* +$tblwidth+$tlo+4 +, +
             
0 +,-1,16,- +1,16); +
    
$dbschema  += new ImgDBSchema +('jpgraph_doc' +,'FormatTblName' +,'FormatFldName' +); +
    
$dbschema +->SetMargin($leftm, +$topm); +
    
$dbschema +->SetTableWidth +($tblwidth); +
    
$dbschema +->Stroke($this-> +img,$this->iscale +,$tblposadj); +
+
    
$tt  += new CanvasRectangleText +(); +
    
$tt->SetFillColor( +''); +
    
$tt->SetColor( +''); +
    
$tt->SetFontColor( +'navy'); +
+
    
// Add explanation +
    
$tt->SetFont( +FF_ARIAL, +FS_NORMAL,12); +
    
$tt->Set( +'Project specific tables', +$tblwidth+ +$leftm+3,16 +,15); +
    
$tt->Stroke( +$this->img,$this +->iscale); +
+
    
// Add title +
    
$tt->SetColor( +''); +
    
$tt->SetFont( +FF_VERDANA, +FS_BOLD,26); +
    
$tt->Set( +'DDDA - DB Schema', +9,0.5,30 +); +
    
$tt->Stroke( +$this->img,$this +->iscale); +
+
    
// Add a version and date +
    
$tt->SetFillColor( +'yellow'); +
    
$tt->SetFont( +FF_FONT1, +FS_NORMAL,10); +
    
$tt->Set( +"Generated: ". +date("ymd H:i",time +()),1,$this-> +iymax*0.96,15 +);  +
    
$tt->Stroke( +$this->img,$this +->iscale); +
+
    
$this +->ig->Stroke(); +
    } +
} +
+
$driver  += new Driver +(); +
$driver->Run(); +
+
?> +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/106PositioningobjectsintheGanttplot.html b/html/includes/jpgraph/docs/html/106PositioningobjectsintheGanttplot.html new file mode 100644 index 0000000000..3377330602 --- /dev/null +++ b/html/includes/jpgraph/docs/html/106PositioningobjectsintheGanttplot.html @@ -0,0 +1,71 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.6 Positioning objects in the Gantt plot

+

Bars and Milestones need both a vertical position and a horizontal + position. The horizontal start position is specified as a date, e.g. + "2001-06-23", and the vertical positions are specified as a number + [0,1,2,3,...]. This vertical number indicates the position from the top + where the object should be placed. To understand this you might imagine + a number of "invisible" horizontal bands with a certain height. If you + specify 0 as the vertical position the bar will be placed in the first + band, specify 3 and the bar will be placed in the fourth band and so + on.

+

It is perfectly legal, and perhaps even desirable to leave "gaps" + when laying out bands to group related activities. So, for example you + could have three activities/bars at positions 1,2,3 and then another 2 + bars at position 6,7 leaving band 0,4,5 empty.

+

All these "invisible bands" have the same height (equ-spaced). The + height of each band is automatically determined and depends on both the + method of layout ( as specified by (GanttChart::SetLayout()) and the + individual heights of the individual bars and titles. The rules are + quite simple:

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1071Specifyingverticalposition.html b/html/includes/jpgraph/docs/html/1071Specifyingverticalposition.html new file mode 100644 index 0000000000..92259ddcef --- /dev/null +++ b/html/includes/jpgraph/docs/html/1071Specifyingverticalposition.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.7.1 Specifying vertical position

+

As described above vertical positions are specified as a numeric + value [0..n] where 'n' is an arbitrary constant. (For practical + purposes n is most likely < 100)

+

Using our previous example we will illustrate this parameter by + changing the position of our 'Project' activity to position 7. Therefor + we change the call to GanttBar() to

+  $activity = new GanttBar( +7,"Project","2001-12-21" +,"2002-02-20" +);

+

and we then get the chart as shown below in Figure 146.

+

+
+
Figure 146: Changing the vertical position to 7 [src]  +

+

+

Note that the height of each position (vertical position) will + depend on the actual height of the bar.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1072Specifyingstartandendpositionforabar.html b/html/includes/jpgraph/docs/html/1072Specifyingstartandendpositionforabar.html new file mode 100644 index 0000000000..138842288a --- /dev/null +++ b/html/includes/jpgraph/docs/html/1072Specifyingstartandendpositionforabar.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.7.2 Specifying start and end position for a bar +

+

Start of bars are given as a date string. The format depends on the + current locale. Examples of valid date strings are

+ +

Even if several format are supported it is recommended to use all + numeric dates, i.e in the form "2001-10-22".

+

Specifying the end position may be done in two different ways, + either by the end date in the same way as for the start date. The other + way is to specify the length of the activity in number of days + (and fractions thereof). Examples of valid end dates are:

+ +

Please note that duration is specified as numerical values and + not strings.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1073Milestones.html b/html/includes/jpgraph/docs/html/1073Milestones.html new file mode 100644 index 0000000000..9a946b4187 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1073Milestones.html @@ -0,0 +1,144 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.7.3 Milestones

+

Milestones are similar to bars but have no end date since milestones + just apply to one single date. Milestones are created much the same way + as activities but using method MileStone() instead.

+

The full signature for milestones are

  +function MileStone +($aVPos,$aTitle, +$aDate, +$aCaption) +

+

+

+ + + + + +
+ +  $aVPos  + The vertical position for the + bar, [0..n]
+ +  $aTitle  + Title for the activity
+ +  $aDate  + Date for the milestone
+ +  $aCaption  + Text to the right of the + milestone
+

Valid milestones are for example

+ +

By default milestones are rendered as a filled "Diamond" shape. This + may be optionally modified. The actual shape is specified by the 'mark' + property of milestone which is an instance of the PlotMark() class + (same class responsible for the marks in line graphs).

+

To change the shape of a milestone to, say a triangle, you use the + SetType() method as in

+  $milestone->mark-> +SetType( +MARK_DTRIANGLE) +

+

Let's put this into practice and add a milestone to our previous + example by adding the following two lines of code which result in + Figure 147 shown below.

+
+
Figure 147: Illustration of how to add a milestone to a gantt + chart [src]  +

+

+

+

You may note that by default the title color is red for milestones. + If you like to change this to be instead, say bold black, you would + invoke the SetColor() and SetFont() methods on the title property of + milestones as in

 $milestone-> +title->SetFont(FF_FONT1 +,FF_BOLD); +
$milestone +->title->SetColor( +"black"); +

+

and thew result would now (not surprisingly be)

+
+
Figure 148: Modifying the milestone title color and font [src]  +

+

+

To modify the caption you do exactly the same but act on property + 'caption' instead of 'title', i.e.

+  $milestone->caption-> +SetFont( +FF_FONT1, +FF_BOLD); +
$milestone +->caption->SetColor( +"black"); +

+

+

It is worth noting that you modify the bar title and caption the + exact same way by acting on the 'title' and 'caption' property for the + bars.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1074Verticalline.html b/html/includes/jpgraph/docs/html/1074Verticalline.html new file mode 100644 index 0000000000..f95df98e0d --- /dev/null +++ b/html/includes/jpgraph/docs/html/1074Verticalline.html @@ -0,0 +1,160 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.7.4 Vertical line

+

The final object you may add to a Gantt chart is simple, but quite + useful, a straight vertical line extending over the whole plot height. + This could for example be used to illustrate different phases in a + project. You create a line object by a call to GanttVLine()

+

The full signature for GanttVLine() is

  +function GanttVLine +($aDate,$aTitle, +$aColor, +$aWeight, +$aStyle) +

+

+

+ + + + + + +
+ +  $aDate  + Date for the milestone
+ +  $aTitle  + Title for the line. The title is + displayed at the bottom of the line
+ +  $aColor  + Color for the line
+ +  $aWeight  + Line width
+ +  $aStyle  + Line style,"dashed", "dotted" and + so on
+

Valid creations of lines are for example

+ +

To add the line to the graph you just have to call GanttGraph::Add() + as with milestones and bars. Let's illustrate the use of vertical lines + by adding a line to the previous example.

 $vline  += new GanttVLine +("2001-12-24","Phase 1"); +
$graph->Add( +$vline); +

+

and the example (See 149) now becomes

+
+
Figure 149: Adding a vertical line with a title to the Gantt + chart [src]  +

+

+

From the above figure you can see that by default the line is drawn + at the beginning of the day of the specified date and in a 'dashed' + style. This can (of course!) be modified so that the line is + drawn/aligned anywhere in the specified day. You modify this by + invoking the method SetDayOffset() with an argument specifying the + fraction of the day where you want the line positioned.

+

If you, for example, want to display the line in the middle of the + day just add the line

+  $vline->SetDayOffset( +0.5); +

+

to the previous code and the result will be

+
+
Figure 150: Modifying the position of the line within the day + [src]  +

+

+

+

As usual you may modify the font, size and color by invoking the + appropriate method (SetFont(), SetColor()) on the 'title' property of + lines.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1075Addingmarkerstoaganttbar.html b/html/includes/jpgraph/docs/html/1075Addingmarkerstoaganttbar.html new file mode 100644 index 0000000000..38aefed225 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1075Addingmarkerstoaganttbar.html @@ -0,0 +1,125 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.7.5 Adding markers to a gantt bar

+

You can easily add a variety of markers both to the start and end of + the gantt bar. They could for example be used as an alternate way to + illustrate important milestones or anticipated deliveries.

+

The left and right markers are accessed through the two properties + 'leftMark' and 'rightMark'. They are both instances of the general + 'PlotMark' class which is also used for the milestones (and in line + graphs). The 'PlotMark' class supports several different styles, for + example, diamond (the default for milestones), filled and unfilled + circles, squares, stares, and so on. Please refer to the reference + section for a complete listing.

+

Let's illustrate this by adding a right marker to the previous + example. We will use a style of a filled (red) circle with a white + title, say, "M5". In order to accomplish this we must augment the + previous example with the following lines:

 $activity +->rightMark->Show();     +
$activity +->rightMark->title-> +Set("M5"); +
$activity +->rightMark->SetType( +MARK_FILLEDCIRCLE); +
$activity +->rightMark->SetWidth( +10); +
$activity +->rightMark->SetColor( +"red"); +
$activity +->rightMark->SetFillColor( +"red"); +
$activity +->rightMark->title-> +SetFont( +FF_ARIAL, +FS_BOLD,12); +
$activity +->rightMark->title-> +SetColor( +"white"); +

+

This might seem like a lot of lines but this is as complicated as it + possible can get. As an illustration in the example belwo more or less + everything that is changeable has been changed, the default font, + font-color, fill-color, frame-color and width of marker. The two lines + only really necessary are the first two, showing the mark and setting a + title. One could still get a good result by using default values for + the rest of the properties.

+

The resulting image can be seen in Figure 151 below.

+
+
Figure 151: Adding a right marker to a bar. [src]  +

+

+

We have deliberately introduced a "strangeness" here. If the + previous two examples are compared it can bee seen that the last + example is larger than the previous one. Why?

+

The explanation is trivial once we recall that the height of bars + are sized relative to the horizontal spacing. The horizontal spacing + are based on the highest single bar including title size and, here come + the explanation, marker size. The horizontal spacing has grown since + the minimum height is now based on 10 points(=the height of the mark). + The bar still occupy the same percentage of the height so it seems to + have grown.

+

If this behavior is unwanted it is always possible to specify an + absolute size for the bar heigh, say 8 pixels, with a call

+  $activity->SetHeight +(8);

+

and achieve the result in Figure 152 below.

+
+
Figure 152: Specifying an absolute size for the height of the + bar. [src]  +

+

+

It is worth noting that the height reserved for each bar is still + the same since we haven't changed the height of the marker and the + reserved space is the maximum height used by any bar.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1076Adjustingtheminimumdistancebetweenbars.html b/html/includes/jpgraph/docs/html/1076Adjustingtheminimumdistancebetweenbars.html new file mode 100644 index 0000000000..d1c5ef0a5b --- /dev/null +++ b/html/includes/jpgraph/docs/html/1076Adjustingtheminimumdistancebetweenbars.html @@ -0,0 +1,97 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.7.6 Adjusting the minimum distance between bars +

+

Let's see what happens if we set the height of each bar to be 100% + of the reserved height by adding another activity/bar below the first + one and set the height of each bar to 100% by adding the lines (We omit + the added lines to add another bar since they are just a copy of the + first bar)

+ $activity-> +SetHeight(1.0); +
$activity2 +->SetHeight(1.0); +

+

to the previous example. (Note that a value in the range [0..1] is + interpretated as the fraction of the reserved height while a value > 1 + is interpretated as the absolute size in pixels.)

+
+
Figure 153: Setting the height for each bar to 100% [src]  +

+

+

Aha.. What we are trying to do doesn't really make sense. Since we + have specified that the bar will always occupy 100% of the available + reserved with there will be no distance between the bars. So what if we + specify the bar as 10 pixel absolute by changing the lines to

+  $activity->SetHeight +(10); +
$activity2 +->SetHeight(10); +

+

we instead get

+
+
Figure 154: Setting both bars height to 10 pixels [src]  +

+

+

So what can we actually do? Well if you remember the reserved height + for each bar is the maximum height of all bars including titles. This + guarantees that no two bars will ever overlap. To guarantee that titles + don't end up too close together there is a Vertical Label Margin + which basically specifies some extra "air" in between the titles. The + amount of air is specified in percent of the title height. To set the + margin you use

+ GanttGraph:: +SetLabelVMarginFactor( +$aMargin) +

+

As an example let's set that margin in the previous example to 0 and + see what happens.

+
+
Figure 155: Setting the vertical label margin to 0% [src]  +

+

+

As you would perhaps expect the two bars just barely touches now + since there are no extra margin added. If the two bars hadn't had the + extra right marker it would have looked very compressed.

+

By default the vertical margin is set to 40%.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/107Ganttbars.html b/html/includes/jpgraph/docs/html/107Ganttbars.html new file mode 100644 index 0000000000..5a1d0ac7e5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/107Ganttbars.html @@ -0,0 +1,82 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.7 Gantt bars

+

The most common of all object in a Gantt chart is of course the + activity bar (GanttBar()). In terms of formatting this object has a + very large flexibility. The full signature for the GanttBar constructor + is

function  +GanttBar( +$aVPos,$aTitle,$aStart +,$aEnd,$aCaption, +$aHeight) +

+

+

+ + + + + + + +
+ +  $aVPos  + The vertical position for the + bar, [0..n]
+ +  $aTitle  + Title for the activity
+ +  $aStart  + Start date for the activity given + as string, e.g "2001-09-22"
+ +  $aEnd  + End date for activity given as either + a date (a string) or as the duration (in days) of the activity, e.g + both "2001-10-15" and 20.5 are valid inputs
+ +  $aCaption  + Text string (caption) to appear + at the end (right side) of the bar
+ +  $aHeight  + Height of bar given as either + a value in range [0,1] in which case this is interpretated as what + fraction of the vertical position should the bar occupy. The height can + also be given in absolute pixels [1..200]
+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1081Minutescale.html b/html/includes/jpgraph/docs/html/1081Minutescale.html new file mode 100644 index 0000000000..cb9566dfd3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1081Minutescale.html @@ -0,0 +1,83 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.8.1 Minute scale

+

Minute scale is the lowest resolution you can use. It is often + convenient to use Minute scale with "GanttScale::SetINtervall()" since + by default the increment will be 1 minute. The style of minute scale + can be further adjusted by the use style parameters which can be + one of

+
    +
  1. "MINUTESTYLE_MM", This will display minutes as a two digit number + with a leading zero if necessary
  2. +
  3. "MINUTESTYLE_CUSTOM", This will let you specify you own custom + minute style by making a call to HeaderProperty:: SetFormatString() +
  4. +
+

Minute scale is enabled by adding the GANTT_HMIN in the + GanttGraph::ShowHeaders() call. For example as in

+  $graph +->ShowHeaders(GANTT_HDAY  +GANTT_HHOUR  +GANTT_HMIN); +

+

The code snippet below shows how to set up a minute scale with 30 + min interval and some custom colors.

+  $graph->scale-> +minute-> +SetIntervall( +30); +
$graph->scale-> +minute-> +SetBackgroundColor( +'lightyellow:1.5'); +
$graph->scale-> +minute-> +SetFont( +FF_FONT0); +
$graph->scale-> +minute-> +SetStyle( +MINUTESTYLE_MM); +
$graph->scale-> +minute->grid->SetColor +('lightgray');

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1082Hourscale.html b/html/includes/jpgraph/docs/html/1082Hourscale.html new file mode 100644 index 0000000000..d8013ec8e6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1082Hourscale.html @@ -0,0 +1,86 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.8.2 Hour scale

+

The hour scale has more builtin formatting possibilities. The + following formatting options are available

+
    +
  1. "HOURSTYLE_HM24", Will display the only the hour in military time + 0-24 , for example 13:00
  2. +
  3. "HOURSTYLE_H24", Will display the hour with both hour and minute in + military time 0-24, for example 13
  4. +
  5. "HOURSTYLE_HMAMPM", Will display the hour and minutes with a + suitable am/pm postfix, for example 1:30pm
  6. +
  7. "HOURSTYLE_HAMPM", Will display only the hour with a suitable am/pm + postfix, for example 1pm
  8. +
  9. "HOURSTYLE_CUSTOM", Custom defined format as specified with a call + to HeaderProperty::SetFormatString()
  10. +
+

For hours it is possible to specify the interval in either of two + ways. With an integer, e.g. 6, or as time interval, e.g. "1:30" which + makes the interval one and a half hour. The only restriction is that + the interval must be even dividable for 24 hours since one day is the + smallest possible interval to show. This means that it is allowed to + use, for example 2,4,6,"1:30" or "0:45" as intervals but not 7, "2:45".

+

The code snippet below shows hot to set up a hour scale to with 45 + minutes interval and some custom colors

 $graph +->scale->hour-> +SetBackgroundColor( +'lightyellow:1.5'); +
$graph->scale-> +hour->SetFont(FF_FONT1 +); +
$graph->scale-> +hour->SetStyle(HOURSTYLE_HMAMPM); +
$graph->scale-> +hour-> +SetIntervall( +"0:45"); +

+

The example below shows a gantt chart with the day and hour scale + enabled

+
+
Figure 156: Using hour scale in the Gantt chart [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1083Dayscale.html b/html/includes/jpgraph/docs/html/1083Dayscale.html new file mode 100644 index 0000000000..f7efa1db32 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1083Dayscale.html @@ -0,0 +1,89 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.8.3 Day scale

+

By default the day scale show the first letter of the week day but + it is also posible to format the day scale in a number of different + ways. Days can have one of the following scale formats.

+ +

The formatting is specified by using the SetStyle() method as in

+  $graph +->scale->day-> +SetStyle( +DAYSTYLE_LONG); +

+

The graphical formatting possibilities for days allow the + possibility to specify a different color for the weekend background and + also for the Sunday.

+ +

In addition to this there is also a possibility to choose whether or + not the weekend background should be extended vertically down over the + plot area. (the default). Since that is a property more of the whole + plot this behavior is modified with a call to the method

+  UseWeekendBackground()
+

+

of the scale, e.g. +
 

+ $graph->scale->UseWeekendBackground(false +);

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1084Weekscale.html b/html/includes/jpgraph/docs/html/1084Weekscale.html new file mode 100644 index 0000000000..46eaba2ffe --- /dev/null +++ b/html/includes/jpgraph/docs/html/1084Weekscale.html @@ -0,0 +1,73 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.8.4 Week scale

+

Week scales, if enabled, by default shows the week number in range 1 + to 53 (as defined by ISO-8601, see the reference section).

+

It might be worth pointing out here that the week number calculation + is carried out within JpGraph and does not rely on the underlying OS + date libraries. This makes the behavior consistent over several OS:s + (at least M$ Windows does not comply to ISO-8601 or supply any + way of doing this through the normal libraries, e.g. strftime())

+

You may modify the week behavior in three ways. You can specify + (with SetStyle()) a different date format using the constants

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1085Monthscale.html b/html/includes/jpgraph/docs/html/1085Monthscale.html new file mode 100644 index 0000000000..0c7d2bba07 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1085Monthscale.html @@ -0,0 +1,73 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.8.5 Month scale

+

For month scale you can use the SetStyle() method to choose between + a variety of formats.

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1086Yearscale.html b/html/includes/jpgraph/docs/html/1086Yearscale.html new file mode 100644 index 0000000000..f9b01162fb --- /dev/null +++ b/html/includes/jpgraph/docs/html/1086Yearscale.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.8.6 Year scale

+

Year scale has no extra formatting possibilities.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/108Formattingthescaleheaders.html b/html/includes/jpgraph/docs/html/108Formattingthescaleheaders.html new file mode 100644 index 0000000000..1e3127aa5e --- /dev/null +++ b/html/includes/jpgraph/docs/html/108Formattingthescaleheaders.html @@ -0,0 +1,129 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.8 Formatting the scale headers

+

The scale headers allow you to view up to four different scales at + the same time. The four basic scales are:

+ +

You can choose what scale to include and exclude by using the + SetScale() method. For example, for a detailed gantt you might choose + to display days and weeks by specifying

 $graph +->ShowHeaders +( GANTT_HWEEK  +| GANTT_DAY );

+

If you instead wanted "the big picture" it might be enough to show + year and months by specifying

+  $graph->ShowHeaders +GANTT_YEAR  +GANTT_MONTH ); +

+

You can choose freely the combination of scales that you want, but a + chart must at least have one scale of course.

+

Once you have decided what level of details you need you can then + fine tune the exact layout/formatting of each of the enabled scales as + described below.

+

These scale header are all accessed through the graph instance + variables 'scale' as in

+  $graph->scale-> +week

+

or

+ $graph->scale->day
+

+

. All these headers share the following properties.

+ +

In addition to these methods each scale also has the property 'grid' + which determines the appearance of grid lines for that specific scale. + You may modify the appearance of grid lines by the "normal" line + methods, i.e. SetColor(),SetWeight() SetStyle() and Show(). So for + example to set the week grid line red you would use

+  $graph +->scale->week-> +grid->SetColor("red" +);

+

Each of the scales also have some specific formatting possibilities + as described below.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1091Addingcaptiontobars.html b/html/includes/jpgraph/docs/html/1091Addingcaptiontobars.html new file mode 100644 index 0000000000..2c93a28d9e --- /dev/null +++ b/html/includes/jpgraph/docs/html/1091Addingcaptiontobars.html @@ -0,0 +1,71 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.9.1 Adding caption to bars

+

Caption for bars are placed at the far right side of the bars. They + can for example be used to indicate the resources assigned to a task, + the duration of the task or the progress of the activity.

+

Caption text for a bar is specified either when creating a bar or + later by accessing the 'caption' property of bars. So the two lines

+  $activity = new GanttBar +(0,"Activity 1", +"2001-11-21", +"2001-12-20", +"[BS,ER]") +

+

and

+ $activity-> +caption->Set("[BS,ER]" +);

+

are both ways of specifying the caption "[BS,ER]" for the activity. + Since activity is a standard JpGraph text object you can easily modify + font, color and size with calls to SetFont() and SetColor(), (e.g.

+  $activity->caption +->SetFont(FF_ARIAL, +FF_BOLD,9);
+

+

+

The figure below illustrates the use of caption

+
+
Figure 157: Illustration of the use of captions [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1092Addingprogressindicatorstobars.html b/html/includes/jpgraph/docs/html/1092Addingprogressindicatorstobars.html new file mode 100644 index 0000000000..8c9fdeeda5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1092Addingprogressindicatorstobars.html @@ -0,0 +1,76 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.9.2 Adding progress indicators to bars

+

To indicate the progress of a specific activity it is also possible + to add a progress indicator to each bar. This progress indicator + consists of a smaller bar within the bar. By default this progress bar + is black and 70% of the height of the bar. These parameter can (of + course) all be changed.

+

The properties for the progress indicator are accessed through the + 'progress' property and it's methods.

+

To set the progress for a specific activity you only specify the + percent as a fraction. As in

+  $activity->progress-> +Set(0.4)
+

+

In Figure 158 the previous example is modified to indicate the + progress of each activity by the default progress indicator. A solid + bar. To make it clearer we have also modified the caption to reflect + the displayed progress. (At the same time we also modified the scale + headers just to illustrate some more formatting options).

+
+
Figure 158: Adding progress indicators. [src]  +

+

+

To specify a different format for the progress you use the + SetPattern() method as in

+  $activity->progress-> +SetPattern( +BAND_RDIAG, +"blue"); +

+

In the reference section you can see the exact parameters and all + available methods.

+
+
Figure 159: Changing the style of the progress indicators. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/109Moreformattingforbars.html b/html/includes/jpgraph/docs/html/109Moreformattingforbars.html new file mode 100644 index 0000000000..6151eef707 --- /dev/null +++ b/html/includes/jpgraph/docs/html/109Moreformattingforbars.html @@ -0,0 +1,36 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10.9 More formatting for bars

+

This section shows some further modification you might do to + activity bars.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10Ganttcharts.html b/html/includes/jpgraph/docs/html/10Ganttcharts.html new file mode 100644 index 0000000000..7c84e186d0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/10Ganttcharts.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10 Gantt charts

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/10Workingwithcanvasgraphs.html b/html/includes/jpgraph/docs/html/10Workingwithcanvasgraphs.html new file mode 100644 index 0000000000..b3b485f56c --- /dev/null +++ b/html/includes/jpgraph/docs/html/10Workingwithcanvasgraphs.html @@ -0,0 +1,46 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

10 Working with canvas graphs

+

Canvas graphing is an advanced feature that comes in handy where you + need to draw some more arbitrary graphics. To give you a flavor of what + you can do the following example shows an architecture overview of + JpGraph which was drawn using a canvas.

+
+
Figure 186: Example of what you can draw on a canvas [src]  +

+

+

Working with canvas requires more understanding of JpGraph as well + as more programming and fine tuning.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/111GeneratingAntiSpamchallenge.html b/html/includes/jpgraph/docs/html/111GeneratingAntiSpamchallenge.html new file mode 100644 index 0000000000..dd95b3adf6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/111GeneratingAntiSpamchallenge.html @@ -0,0 +1,89 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

11.1 Generating Anti-Spam challenge

+

There are two basic alternatives on how to generate the content of + the anti-spam image

+
    +
  1. Submit a string that should be used
  2. +
  3. Automatically generate a random string. If this alternative is + chosen then the user of the library should save the created string and + compare it to what the user enters.
  4. +
+

In order to write a script to generate a new challenge there are + four steps to be completed.

+

First include the library file jpgraph_antispam.php. + Note that there is no need to include the "jpgraph.php" library since + all functionality is included in this library file.

+   +require_once "jpgraph_antispam.php";
+

+

Secondly a new instance of the class AntiSpam must be + created

+ $spam = new  +AntiSpam(); +

+

Thirdly the string to be used in the challenge must be + specified. To automatically generate a suitable string use

+   +// The argument determines the length of the generated string +
$chars $spam-> +Rand(5);
+

+

If instead the string to be used should be specified this string + should be specified in the initial creation of the AntiSpam() or by + calling the Set() method as in

+  $spam-> +Set("aui8k");
+

+

Please note that in order to minimize the risk for confusion the + letters 'O' and the number '0' (zero) is not allowed since they are too + alike and can be mistaken for each other.

+

The final and fourth step is to output the image with a call + the method Stroke() on the created instance of the AntiSpam + class.

if( $spam->Stroke +() === false  +) { +
    die(
"Illegal or no data to plot"); +
}

+

Note that we have put a guard around the output since in the case of + an error this method will result a boolean false value. As with the + other graph types it is possible to write the generated image to a file + by submitting a file name as an argument to Stroke().

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/111Introduction.html b/html/includes/jpgraph/docs/html/111Introduction.html new file mode 100644 index 0000000000..628b32f1a0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/111Introduction.html @@ -0,0 +1,61 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

11.1 Introduction

+

Canvas graph is really not a graph. It a blank sheet of paper which + you can use to draw arbitrary shapes and still have access to some of + the convenient features of JpGraph.

+

You can work with a canvas in different levels of complexity. You + can for example work directly with the Image class which provides a + large number of primitives for drawing but requires that you use + absolute pixel coordinates.

+

You can also make life a little bit easier by using a canvas scale. + This lets you define your own scale on the canvas which often makes it + easier by letting you work on a grid you have specified yourself. It + also makes it very easy to re-scale you image automatically by just + changing your scale. For example to half the size of you drawing you + just make the scale twice as large.

+

To give you some help in working with different canvas you should + include the "jpgraph_canvtools.php" file when working on canvases. This + is not strictly necessary but it will give you some nice abstraction to + help you create your masterpieces.

+

As another (concrete) example on the use of a canvas the figure + below is a listing of font styles available with JpGraph.

+
+
Figure 183: Another example of using a canvas to draw a + number of text boxes +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/112Creatingasimplecanvas.html b/html/includes/jpgraph/docs/html/112Creatingasimplecanvas.html new file mode 100644 index 0000000000..d931c152ac --- /dev/null +++ b/html/includes/jpgraph/docs/html/112Creatingasimplecanvas.html @@ -0,0 +1,169 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

11.2 Creating a simple canvas

+

In order to create a canvas graph you need to include the file + "jpgraph_canvas.php" in addition to the standard "jpgraph.php" file. + You might also want to include the "jpgraph_canvtools.php" to get + access to some supporting classes that may (or not) come in handy.

+

Creating a canvas gives you the opportunity draw arbitrary shapes on + a "white" piece of paper. Let's first show a simple example were we + just draw a text box. We first show you the code which we will walk + through

(File: canvasex01.php) +
<?php +
+// $Id: canvasex01.php,v 1.3 2002/10/23 08:17:23 aditus Exp $ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
+
// Setup a basic canvas we can work  +
$g = new CanvasGraph( +400,300,'auto' +); +
$g->SetMargin( +5,11,6 +,11); +
$g->SetShadow(); +
$g->SetMarginColor( +"teal"); +
+
+// We need to stroke the plotarea and margin before we add the +
// text since we otherwise would overwrite the text. +
$g->InitFrame(); +
+
// Draw a text box in the middle +
$txt="This\nis\na TEXT!!!"; +
$t = new Text( +$txt,200,10 +); +
$t->SetFont( +FF_ARIAL, +FS_BOLD,40); +
+
+// How should the text box interpret the coordinates? +
$t->Align( +'center','top'); +
+
// How should the paragraph be aligned? +
$t->ParagraphAlign( +'center'); +
+
+// Add a box around the text, white fill, black border and gray shadow +
$t->SetBox( +"white", +"black","gray"); +
+
// Stroke the text +
$t->Stroke( +$g->img); +
+
// Stroke the graph +
$g->Stroke(); +
+
?> +
+

+

The example above starts by creating a (400x200) sized image. We set + the margins to get a nice frame around the image. For canvases the + margins has no effect in the way you enter coordinates. Top left is + (0,0) and bottom right (including any potential margin and shadow) is + the maximum. In this case the coordinates are X:0-399, and Y:0-199

+

We then call the + InitFrame() method which actually strokes the margin and plotarea + to the graph. Since everything is stroked in the order you issue the + commands you must make sure that the graphical objects you want on top + is stroked last. This is different from the way you normally work with + JpGraph since it queues up all you addition and then makes sure they + are stroked in the correct order.

+

We then create a Text object, + setup it's properties, including the absolute screen position where we + want the text, and then stroke it. Her it might be a need for a closer + explanation of the, perhaps misnamed, method +Text::Align() This method states how the text coordinates + should be interpreted , i.e when we specify (200,10) as the + coordinates for the text paragraph should that be interpreted as the + top left corner, bottom-left corner or something else (of the bounding + box)? In the code above we have chosen to interpret the X-coordinate as + being the center of the bounding box and the Y-coordinate as the top. + Hence the text will be aligned so that the (200,100) point in the graph + is aligned with the middle of the top line of the paragraphs bounding + box.

+

We also specify that the lines within the paragraph should be + centered with a call to + Text::ParagraphAlign() Since we also choose to have a box around + the text we have to make use of the method + Text::SetBox() which is used to specify the fill color, the border + color and the shadow color (if you leave out shadow color or set it to + '', no shadow will be used).

+

Now we are ready to stroke the text onto the canvas. In order to do + so we must specify the basic Image drawing class we want to use. + Without discussing this further we just state that a suitable image + class can always be found as the img property of the + Graph class.

+

Finally we are ready to stroke the entire graph, which in effect + sends the canvas back to the browser. Below you can see the effect of + all this code

+

+
+
Figure 184: A simple canvas drawing with a text box in the + middle [src] +  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/113Addinglinesandrectanglestoacanvas.html b/html/includes/jpgraph/docs/html/113Addinglinesandrectanglestoacanvas.html new file mode 100644 index 0000000000..ef6788c536 --- /dev/null +++ b/html/includes/jpgraph/docs/html/113Addinglinesandrectanglestoacanvas.html @@ -0,0 +1,187 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

11.3 Adding lines and rectangles to a canvas

+

A canvas also makes a good background for using standard graphic + primitives, for example circles and lines. What you first have to + remember is that you are (so far) working with absolute screen + coordinates and secondly all drawing primitives are found in the + Image Class accessible as a property of the Graph class. So for + example to draw a line between coordinate (0,0) and (100,100) you would + have to add the line

+  $graph->img-> +Line(0,0 +,100,100); +

+

+

To your code. The following example shows some of the graphic + primitives you have access to in the Image class

+(File: canvasex02.php) +
<?php +
+// $Id: canvasex02.php,v 1.1 2002/08/27 20:08:57 aditus Exp $ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
+
// Setup a basic canvas we can work  +
$g = new CanvasGraph( +400,200,'auto' +); +
$g->SetMargin( +5,11,6 +,11); +
$g->SetShadow(); +
$g->SetMarginColor( +"teal"); +
+
+// We need to stroke the plotarea and margin before we add the +
// text since we otherwise would overwrite the text. +
$g->InitFrame(); +
+
// Add a black line +
$g->img-> +SetColor( +'black'); +
$g->img-> +Line(0,0 +,100,100); +
+
// .. and a circle (x,y,diameter) +
$g->img-> +Circle(100,100 +,50); +
+
+// .. and a filled circle (x,y,diameter) +
$g->img-> +SetColor('red'); +
$g->img-> +FilledCircle( +200,100,50 +); +
+
// .. add a rectangle +
$g->img-> +SetColor( +'green'); +
$g->img-> +FilledRectangle( +10,10,50 +,50); +
+
// .. add a filled rounded rectangle +
$g->img-> +SetColor( +'green'); +
$g->img-> +FilledRoundedRectangle( +300,30,350 +,80,10); +
// .. with a darker border +
$g->img-> +SetColor( +'darkgreen'); +
$g->img-> +RoundedRectangle( +300,30,350 +,80,10); +
+
// Stroke the graph +
$g->Stroke(); +
+
?> +
+

+

Pleas note the way to access these routines through the img property + of the Graph class. Please also keep in mind that the coordinates are + absolute.

+

+
+
Figure 185: Example of graphic primitives [src]  +

+

+

+

+
+

A note on GD For those of you using GD 1.xx you + might notice that the large "filled circle" isn't completely filled. + This is because in GD 1.xx there are no low level primitives to fill an + ellipse or circle so JpGraph tries to make the best out of a bad + situation and manually fake a filled circle. For interest of speed + JpGraph does not contain a complete (for example) Bresenham-circle fill + but cheats by using some existing GD routines. This is not a perfect + solution and for large filled circles like this you get some + moire-patterns in the circle. If you upgrade to GD 2.x JpGraph will be + able to make full use of those new existing methods and the fill will + be perfect.

+
+
+

We refer you to the class reference to find out what other graphic + primitives are available for use.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/114Usingacanvasscale.html b/html/includes/jpgraph/docs/html/114Usingacanvasscale.html new file mode 100644 index 0000000000..af67f63b36 --- /dev/null +++ b/html/includes/jpgraph/docs/html/114Usingacanvasscale.html @@ -0,0 +1,291 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

11.4 Using a canvas scale

+

The previous method using absolute coordinates works. But nothing + more. It doesn't give you any chance to easily scale the image (unless + you manually recalculate all used coordinates) , it gets tedious to + work with pixel level resolution. Especially if you just like to draw a + few basic shapes.

+

To help with this you can use a scale for the canvas. This lets you + define a "work-space" of your choice. You can for example set the + coordinates to be between X:0-10, Y:0-10. This makes it easier to + position objects on the canvas. This also has two additional + advantages:

+ +

+

To use this type of scaling you must make sure you include the file + "jpgraph_canvtools.php" . In addition to the scaling class their are + also a couple of other utility classes that may come in handy, + especially the Shape class.

+

Using the scale is quite simple. You first instantiate a scale + object passing the graph as a parameter and then specify the scale you + want to use. This means you need to add the lines

+  $scale  += new CanvasScale +($g); +
$scale->Set( +0,$xmax,0 +,$ymax);

+

+

to your code. You can then use one of the translation methods (for + example +CanvasScale::Translate()) in the canvas scale class to translate + between your world coordinates and the absolute screen coordinates. + This means you could take the code in the example above and just add + the lines, for example,

+  list( +$x1,$y1) = $this +->scale->Translate( +$x1,$y1); +
list(
$x2,$y2) =  +$this->scale->Translate +($x2,$y2); +
$g->img-> +Line($x1,$y1 +,$x2,$y2); +

+

Since this pattern has to be repeated for every object that has to + be drawn it makes good sense to encapsulate this in a separate class. + This is exactly why the canvas tools file also have a utility class + called Shape This class is + mainly a wrapper around the most commonly used methods in the basic + Image class (with one important exception) and does all these the + translation for you. Please see the class reference for a complete list + of the available methods To set up the Shape class you instantiate it + with the graphic context and the scale you want to use as argument as + in

+

+ $shape = new  +Shape($g,$scale +);

+

+

You are then ready to use all the methods in the shape class. Using + a scale and imitating the previous example we would get the source + shown below.

(File: canvasex03.php) +
<?php +
+// $Id: canvasex03.php,v 1.1 2002/08/27 20:08:57 aditus Exp $ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
include 
"../jpgraph_canvtools.php"; +
+
// Define work space +
$xmax=20; +
$ymax=20; +
+
// Setup a basic canvas we can work  +
$g = new CanvasGraph( +400,200,'auto' +); +
$g->SetMargin( +5,11,6 +,11); +
$g->SetShadow(); +
$g->SetMarginColor( +"teal"); +
+
+// We need to stroke the plotarea and margin before we add the +
// text since we otherwise would overwrite the text. +
$g->InitFrame(); +
+
// Create a new scale +
$scale  += new CanvasScale +($g); +
$scale->Set( +0,$xmax,0 +,$ymax); +
+
+// The shape class is wrapper around the Imgae class which translates +
// the coordinates for us +
$shape  += new Shape($g, +$scale); +
$shape->SetColor( +'black'); +
+
+
// Add a black line +
$shape->SetColor( +'black'); +
$shape->Line( +0,0,20 +,20); +
+
// .. and a circle (x,y,diameter) +
$shape->Circle( +5,14,2 +); +
+
+// .. and a filled circle (x,y,diameter) +
$shape->SetColor( +'red'); +
$shape->FilledCircle( +11,8,3 +); +
+
// .. add a rectangle +
$shape->SetColor( +'green'); +
$shape->FilledRectangle(15, +8,19,14 +); +
+
// .. add a filled rounded rectangle +
$shape->SetColor( +'green'); +
$shape->FilledRoundedRectangle(2, +3,8,6 +); +
// .. with a darker border +
$shape->SetColor( +'darkgreen'); +
$shape->RoundedRectangle(2, +3,8,6 +); +
+
+
// Stroke the graph +
$g->Stroke(); +
+
?> +
+
The source above gives the following result
+
+
Figure 186: Drawing shapes on a canvas using a scale. [src]  +

+

+

If we like to make a smaller image we could just change the image + size and everything will be rescaled without any further code changes. + SO for example making the image half the size would give the result

+
+
Figure 187: Shrinking the image to half the size is easy + since the scaling will maintain the relative position of the objects [src]  +

+

+

If we instead wanted to keep the image size but shrink the shapes we + could just make the scale twice as large which would result in

+
+
Figure 188: Shrinking hte graphic object by making the scale + twice as large +[src]  +

+

+

+

We previously mentioned that the Shape class was a wrapper around + the image class with one exception. So what is the exception? Well, + glad you asked. The exception is that it contain an additional method + which draws an "indented rectangle". An indented rectangle is a + rectangle where one of it's four corners have been moved into the + rectangle. You create an indented rectangle by calling either + Shape::IndentedRectangle() or A few examples illustrates what this + shape looks like.

+
+
Figure 189: Examples of filled indented rectangles [src]  +

+

+

+

As a final note we mention the class + CanvasRectangleText Which can be used to add a text with a rounded + rectangle (possibly filled) onto the canvas. The previous example where + all the available fonts were drawn were using this class. We don't + describe it further but refer the interested reader to the class + reference and the 'listfontsex1.php' example file.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/115SampleapplicationDrawingDBschema.html b/html/includes/jpgraph/docs/html/115SampleapplicationDrawingDBschema.html new file mode 100644 index 0000000000..059af12f33 --- /dev/null +++ b/html/includes/jpgraph/docs/html/115SampleapplicationDrawingDBschema.html @@ -0,0 +1,432 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

11.5 Sample application: Drawing DB schema

+

As a final example we shortly discuss how the canvas type of graph + was used to generate the DB schema for the DDDA architecture.

+

The library php file "utils/misc/imgdbschema.php" included in the + distribution contains some utility classes to make the drawing of table + schemes easier. It contains two basic classes, Class ImgDBTable and + Class ImgDBSchema. The first class understand how to draw an image + illustrating a single table. The second class is responsible for + automatically extract all the relevant information from a DB to draw a + complete DB Schema.

+

Before going into this a little bit more we show what an example of + this might look like.

+
+
Figure 190: Example of using the canvas graph style together + with the imgdbschema.php library to semi-automatically generate a DB + schema [src] +  +

+

+

+

Before going on it should be noted that the ImgDBSchema assumes that + the DB can be accessed through a DB abstraction layer modeled after the + abstraction layer available in the 'jpdb.php' file in the DDDA + architecture. This abstraction layer assumes a MySQL database in the + bottom. This specific dependency of this particular abstraction layer + is the reason why these classes is not included in the generic canvas + tools file.

+

The second thing to note is that this library does not contain a + complete automatic-layout engine but rather a very simple automatic + system which, if nothing else is specified, just puts the table in a + rectangular grid. A complete graph layout engine would simple be to + much to write in this context. This is also a very difficult + optimization problem and sofar not even any of the available research + programs that tries this can achieve a satisfactory layout without + manual intervention.

+

The critical lines in the code to generate the above graph is

+  $tblposadj=array($tlo +,0,$tblwidth+ +$tlo+2,0 +,2*$tblwidth+ +$tlo+4,0 +,-1,16,- +1,16); +
$dbschema  += new ImgDBSchema +("jpgraph_doc" +,"FormatTblName" +,"FormatFldName" +); +
$dbschema +->SetMargin($leftm, +$topm); +
$dbschema +->SetTableWidth +($tblwidth); +
$dbschema +->Stroke($this-> +img,$this->iscale +,$tblposadj);

+

+

The rest of the code in the file is just to setup the canvas, add an + indented rectangle to group some tables and generate a footer with the + date and time this image was generated.

+

The first line instantiates a new ImgDBSCheme layout engine asking + it to draw an image for the database 'jpgraph_doc'. The following two + arguments specify two callback functions for formatting the text for + header and each field in a table.

+

The next line specify the top left margin where the drawing of the + tables should be started.

+

The third line specify the width of a single table. The final lines + starts the engine and draws all tables in the database to the canvas. + The final argument requires some further explanation. This is an offset + (x,y) from the top left corner how each individual table should be + positioned. If the value is -1 indicates that the default value should + be used. If this array is not specified then the tables will simple + arranged line by line.

+

The full source code for drawing this DB schema example is shown + below.

+

(File: dbschemaex1.php) +
<?php +
+/*======================================================================= +
// File:     DBSCHEMAEX1.PHP +
// Description:    Draw a DB schema of the DDDA architecture +
// Created:     2002-08-25 +
+// Ver:        $Id: dbschemaex1.php,v 1.1 2002/08/27 20:08:57 aditus Exp $ +
// +
// License:     This code is released under QPL +
//              Copyright (C) 2001,2002 Johan Persson +
+// Note:        The actual drawing of the tables are semi-automatically +
+//              but you can easily adjust the individual tables position +
//              with the 'tblposadj' array.  +
// +
+//======================================================================== +
*/ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
include 
"../jpgraph_canvtools.php"; +
include 
"../imgdbschema.inc"; +
include 
"../jpdb.php" +; +
+
+
+// Global callback to format the table header names +
function  +FormatTblName( +$aName) { +
    
+// We want to replace any specifi references to the +
    // 'JpGraph' project with the generic '<project>' +
    
return  +str_replace( +'JpGraph', +'<project>' +$aName); +
} +
+
+// Global callback to format each field name in the table +
function  +FormatFldName( +$aName,$aTable) { +
    return 
$aName +; +
} +
+
+
class 
Driver  +{ +
+
    var 
$ig +, $img$iscale +$ishape; +
    var 
$iymax +,$ixmax; +
    var 
$iwidth +,$iheight; +
+
    function 
Driver +() { +
+
    
+// Define Image size and coordinate grid space to work within +
    
$this +->iwidth 600; +
    
$this +->iheight750; +
    
$this +->iymax  50; +
    
$this +->ixmax  55; +
+
    
// Setup a basic canvas +
    
$this +->ig = new CanvasGraph( +$this->iwidth,$this +->iheight,'auto'); +
    
$this +->img $this-> +ig->img; +
+
    
// Define the scale to be used +
    
$this +->iscale  += new CanvasScale +($this->ig); +
    
$this +->iscale->Set( +0,$this->ixmax +,0,$this-> +iymax); +
    
$this +->ishape  += new Shape($this-> +ig,$this->iscale +); +
+
    
// A small frame around the canvas +
    
$this +->ig->SetMargin( +2,3,2 +,3); +
    
$this +->ig->SetMarginColor( +"teal"); +
    
$this +->ig->InitFrame(); +
+
    } +
+
    function 
Run +() { +
+
    
$leftm +=1.5;    // Left margin (for table schemes)  +
    
$topm=5;     +// Top margin (for table schemes)  +
    
$tblwidth +=15;    // Individual table width +
    
$tlo=1;         +// Offset for top line +
+
    // Add the background color for the project specific tables +
    
$this +->ishape->IndentedRectangle($leftm, +$topm-1,3 +*$tblwidth+$tlo+ +6,45, +
                     
$tlo ++2*$tblwidth+ +2,30,CORNER_BOTTOMLEFT, +
                     
'lightblue'); +
+
    
+// Stroke the tables (series of x,y offsets, If =-1 then use the +
    // automtic positioning +
    
$tblposadj +=array($tlo,0, +$tblwidth+$tlo+2 +,0,2* +$tblwidth+$tlo+4 +, +
             
0 +,-1,16,- +1,16); +
    
$dbschema  += new ImgDBSchema +('jpgraph_doc' +,'FormatTblName' +,'FormatFldName' +); +
    
$dbschema +->SetMargin($leftm, +$topm); +
    
$dbschema +->SetTableWidth +($tblwidth); +
    
$dbschema +->Stroke($this-> +img,$this->iscale +,$tblposadj); +
+
    
$tt  += new CanvasRectangleText +(); +
    
$tt->SetFillColor( +''); +
    
$tt->SetColor( +''); +
    
$tt->SetFontColor( +'navy'); +
+
    
// Add explanation +
    
$tt->SetFont( +FF_ARIAL, +FS_NORMAL,12); +
    
$tt->Set( +'Project specific tables', +$tblwidth+ +$leftm+3,16 +,15); +
    
$tt->Stroke( +$this->img,$this +->iscale); +
+
    
// Add title +
    
$tt->SetColor( +''); +
    
$tt->SetFont( +FF_VERDANA, +FS_BOLD,26); +
    
$tt->Set( +'DDDA - DB Schema', +9,0.5,30 +); +
    
$tt->Stroke( +$this->img,$this +->iscale); +
+
    
// Add a version and date +
    
$tt->SetFillColor( +'yellow'); +
    
$tt->SetFont( +FF_FONT1, +FS_NORMAL,10); +
    
$tt->Set( +"Generated: ". +date("ymd H:i",time +()),1,$this-> +iymax*0.96,15 +);  +
    
$tt->Stroke( +$this->img,$this +->iscale); +
+
    
$this +->ig->Stroke(); +
    } +
} +
+
$driver  += new Driver +(); +
$driver->Run(); +
+
?> +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/11AntiSpamChallenges.html b/html/includes/jpgraph/docs/html/11AntiSpamChallenges.html new file mode 100644 index 0000000000..98b3b2f70c --- /dev/null +++ b/html/includes/jpgraph/docs/html/11AntiSpamChallenges.html @@ -0,0 +1,54 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

11 Anti-Spam Challenges

+

JpGraph includes a module to easily generate Anti-Spam challenges. + With this we mean an image consisting of numbers and letters which are + very hard to read for an OCR program. This is often used to secure sign + up for bulletin boards, on-line mail system or mailing lists since this + very effectively prevent automatic sign up by robots (spam-bots).

+

The module in JpGraph responsible for this is + jpgraph_antispam.php and behaves as a simplified plot module.

+

The example below illustrates how such an image can look like

+
+
Figure 195: Simple illustration of spam challenge image [src]  +

+

+

Anti spam images have less functionality then the usual images + generated with JpGraph in order to keep this utility reasonable small. + The primary limitation is that there are now additional formatting + options for the images and the image generated will always use the + JPEG image format. Hence it is not possible to change this to use, + for example, PNG.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/11Versionhistory.html b/html/includes/jpgraph/docs/html/11Versionhistory.html new file mode 100644 index 0000000000..2c5b908b89 --- /dev/null +++ b/html/includes/jpgraph/docs/html/11Versionhistory.html @@ -0,0 +1,42 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

1.1 Version history

+

+

+ + + + +
VersionDateStatusWhoComment
R1.92007-03-18ReleasedJohan Persson +Additional info for JpGraph 1.21
+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/11Workingwithcanvasgraphs.html b/html/includes/jpgraph/docs/html/11Workingwithcanvasgraphs.html new file mode 100644 index 0000000000..1ff8246f52 --- /dev/null +++ b/html/includes/jpgraph/docs/html/11Workingwithcanvasgraphs.html @@ -0,0 +1,46 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

11 Working with canvas graphs

+

Canvas graphing is an advanced feature that comes in handy where you + need to draw some more arbitrary graphics. To give you a flavor of what + you can do the following example shows an architecture overview of + JpGraph which was drawn using a canvas.

+
+
Figure 182: Example of what you can draw on a canvas [src]  +

+

+

Working with canvas requires more understanding of JpGraph as well + as more programming and fine tuning.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/121GeneratingAntiSpamchallenge.html b/html/includes/jpgraph/docs/html/121GeneratingAntiSpamchallenge.html new file mode 100644 index 0000000000..3a658d7d93 --- /dev/null +++ b/html/includes/jpgraph/docs/html/121GeneratingAntiSpamchallenge.html @@ -0,0 +1,89 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

12.1 Generating Anti-Spam challenge

+

There are two basic alternatives on how to generate the content of + the anti-spam image

+
    +
  1. Submit a string that should be used
  2. +
  3. Automatically generate a random string. If this alternative is + chosen then the user of the library should save the created string and + compare it to what the user enters.
  4. +
+

In order to write a script to generate a new challenge there are + four steps to be completed.

+

First include the library file jpgraph_antispam.php. + Note that there is no need to include the "jpgraph.php" library since + all functionality is included in this library file.

+   +require_once "jpgraph_antispam.php";
+

+

Secondly a new instance of the class AntiSpam must be + created

+ $spam = new  +AntiSpam(); +

+

Thirdly the string to be used in the challenge must be + specified. To automatically generate a suitable string use

+   +// The argument determines the length of the generated string +
$chars $spam-> +Rand(5);
+

+

If instead the string to be used should be specified this string + should be specified in the initial creation of the AntiSpam() or by + calling the Set() method as in

+  $spam-> +Set("aui8k");
+

+

Please note that in order to minimize the risk for confusion the + letters 'O' and the number '0' (zero) is not allowed since they are too + alike and can be mistaken for each other.

+

The final and fourth step is to output the image with a call + the method Stroke() on the created instance of the AntiSpam + class.

if( $spam->Stroke +() === false  +) { +
    die(
"Illegal or no data to plot"); +
}

+

Note that we have put a guard around the output since in the case of + an error this method will result a boolean false value. As with the + other graph types it is possible to write the generated image to a file + by submitting a file name as an argument to Stroke().

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/1221AdjustingthesizeoftheLEDdigits.html b/html/includes/jpgraph/docs/html/1221AdjustingthesizeoftheLEDdigits.html new file mode 100644 index 0000000000..6720b8d51b --- /dev/null +++ b/html/includes/jpgraph/docs/html/1221AdjustingthesizeoftheLEDdigits.html @@ -0,0 +1,44 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

12.2.1 Adjusting the size of the LED digits

+ There are two parameters that can be used to alter the size of the LED + digits. + + These two parameters are given in the constructor which has the + signature DigitalLED74::DigitalLED74($aRadius=2,$aMargin=0.6) + as can be seen from the above signature the default size is 2 pixels in + size and a fraction of 0.6 as the distance.
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/122GeneratingLEDlikedigitswithJpGraph.html b/html/includes/jpgraph/docs/html/122GeneratingLEDlikedigitswithJpGraph.html new file mode 100644 index 0000000000..30ccf9a34f --- /dev/null +++ b/html/includes/jpgraph/docs/html/122GeneratingLEDlikedigitswithJpGraph.html @@ -0,0 +1,76 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

12.2 Generating LED-like digits with JpGraph

+ Starting with v1.21 it is possible to generate LED like digits with + JpGraph. This is accomplished by the usage of the "jpgraph_led.php" + module. +

The creation of LED digits and letters are extremely simple. The + following complete example demonstrates the creation of a LED display

  +
+
include  +"../jpgraph.php"; +
include 
"../jpgraph_led.php"; +
+
+// By default each "LED" circle has a radius of 3 pixels +
$led  += new DigitalLED74 +(); +
$led->Stroke( +'0123456789. ABCDEFGHIJKL', +LEDC_GREEN);  +

+

The result of running this script can be seen by running the + "Examples/ledex1.php" Example in the example directory. As can be seen + from the above example the color to be used for the LED digits is + specified as the second argument to the DigitalLED74::Stroke() method. + Available color for LED digits is given by the table below

+ + + + + + + +
Symbolic nameColor
LEDC_REDRed
LEDC_GREENGreen
LEDC_BLUEBlue
LEDC_YELLOWYellow
GREYGrey
+ Since the standard LED matrix of 7x4 dots does not lend itself to + accurately represent all normal ASCII characters only the following + numbers and letters can be displayed. + + + +
All digits, 0-9
Capital Letters, A-L
+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/12AntiSpamChallenges.html b/html/includes/jpgraph/docs/html/12AntiSpamChallenges.html new file mode 100644 index 0000000000..9140d8d2b0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/12AntiSpamChallenges.html @@ -0,0 +1,54 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

12 Anti-Spam Challenges

+

JpGraph includes a module to easily generate Anti-Spam challenges. + With this we mean an image consisting of numbers and letters which are + very hard to read for an OCR program. This is often used to secure sign + up for bulletin boards, on-line mail system or mailing lists since this + very effectively prevent automatic sign up by robots (spam-bots).

+

The module in JpGraph responsible for this is + jpgraph_antispam.php and behaves as a simplified plot module.

+

The example below illustrates how such an image can look like

+
+
Figure 191: Simple illustration of spam challenge image [src]  +

+

+

Anti spam images have less functionality then the usual images + generated with JpGraph in order to keep this utility reasonable small. + The primary limitation is that there are now additional formatting + options for the images and the image generated will always use the + JPEG image format. Hence it is not possible to change this to use, + for example, PNG.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/12CodedefinesinJpGraph.html b/html/includes/jpgraph/docs/html/12CodedefinesinJpGraph.html new file mode 100644 index 0000000000..3248c4758d --- /dev/null +++ b/html/includes/jpgraph/docs/html/12CodedefinesinJpGraph.html @@ -0,0 +1,174 @@ + + + + + + + + + + +Contents +Previous +
+

12 Code defines in JpGraph

+

Various settings in JpGraph are controlled by overall DEFINEs in the + configuration file "jpg-config.inc". Most of these defines have default + values that should be valid for most usage.

+

In the rest of this chapter all constants are described with default + value and usage.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Define, default valueComment
"CACHE_DIR", "/tmp/jpgraph_cache/"The full + absolute name of directory to be used as a cache. This directory + must be readable and writable for PHP. Must end with '/'
"TTF_DIR", "/usr/local/fonts/ttf/" +Directory for JpGraph TTF fonts. Must end with '/' The fonts must follow + the naming conventions as used by the supplied TTF fonts in JpGraph.
"CSIMCACHE_DIR", "csimcache/"Directory for + cache directory for CSIM graphs. Must end with '/' Cache directory + specification for use with CSIM graphs that are using the cache. The + directory must be the filesystem name as seen by PHP and the 'http' + version must be the same directory but as seen by the HTTP server + relative to the 'htdocs' directory. If a relative path is specified it + is taken to be relative from where the image script is executed. Note: + The default setting is to create a subdirectory in the directory from + where the image script is executed and store all files there. As usual + this directory must be writable by the PHP process.
"CSIMCACHE_HTTP_DIR", "csimcache"Directory + for JpGraph TTF fonts. Must end with '/' Cache directory specification + for use with CSIM graphs that are using the cache. The directory must + be the filesystem name as seen by PHP and the 'http' version must be + the same directory but as seen by the HTTP server relative to the + 'htdocs' directory. If a relative path is specified it is taken to be + relative from where the image script is executed. Note: The default + setting is to create a subdirectory in the directory from where the + image script is executed and store all files there. As usual this + directory must be writable by the PHP process.
"CHINESE_TTF_FONT", "bkai00mp.ttf" Actual + name of the TTF file used together with FF_CHINESE aka FF_BIG5 This is + the TTF file being used when the font family is specified as either + FF_CHINESE or FF_BIG5
"LANGUAGE_CYRILLIC", false Special unicode + Cyrillic language support.
"CYRILLIC_FROM_WINDOWS", false If you are + setting this config to true the conversion will assume that the input + text is windows 1251, if false it will assume koi8-r
'MINCHO_TTF_FONT', 'ipam.ttf' Japanese + TrueType font used with FF_MINCHO
'PMINCHO_TTF_FONT', 'ipamp.ttf' Japanese + TrueType font used with FF_PMINCHO
'GOTHIC_TTF_FONT', 'ipag.ttf' Japanese + TrueType font used with FF_GOTHIC
'PGOTHIC_TTF_FONT', 'ipagp.ttf' Japanese + TrueType font used with FF_PGOTHIC
"INSTALL_PHP_ERR_HANDLER", false Determine + if the library should also setup the default PHP error handler to + generate a graphic error message. This is useful during development to + be able to see the error message as an image instead as a "red-cross" + in a page where an image is expected.
"CATCH_PHPERRMSG", true Should the library + examine the global php_errmsg string and convert any error in it to a + graphical representation. This is handy for the occasions when, for + example, header files cannot be found and this results in the graph not + being created and just a "red-cross" image would be seen. This should + be turned off for a production site.
"USE_LIBRARY_GD2",falseSpecify if we + should use GD 2.x or GD 1.x If you have GD 2.x installed it is + recommended that you use it since it will give a slightly, slightly + better visual appearance for arcs. If you don't have GD2 installed this + must be set to false!
'USE_TRUECOLOR',trueShould the image be a + truecolor image? Note 1: Can only be used with GD 2.0.2 and above. Note + 2: GD 2.0.1 + PHP 4.0.6 on Win32 crashes when trying to use truecolor. + Truecolor support is to be considered alpha since GD 2.x is still not + considered stable (especially on Win32). Note 3: MUST be enabled to get + background images working with GD2 Note 4: If enabled then truetype + fonts will look very ugly => You can't have both background images and + truetype fonts in the same image until these bugs has been fixed in GD + 2.01
"USE_CACHE",falseShould the cache be used + at all? By setting this to false no files will be generated in the + cache directory. The difference from READ_CACHE being that setting + READ_CACHE to false will still create the image in the cache directory + just not use it. By setting USE_CACHE=false no files will even be + generated in the cache directory.
"READ_CACHE",trueShould we try to find an + image in the cache before generating it? Set this define to false to + bypass the reading of the cache and always regenerate the image. Note + that even if reading the cache is disabled the cached will still be + updated with the newly generated image. Set also "USE_CACHE" below.
"DEFAULT_GFORMAT","auto"Default graphic + format set to "auto" which will automatically choose the best available + format in the order png,gif,jpg (The supported format depends on what + your PHP installation supports)
"USE_IMAGE_ERROR_HANDLER",true Determine + if the error handler should be image based or purely text based. Image + based makes it easier since the script will always return an image even + in case of errors.
"USE_APPROX_COLORS",trueIf the color + palette is full should JpGraph try to allocate the closest match? If + you plan on using background image or gradient fills it might be a good + idea to enable this. If not you will otherwise get an error saying that + the color palette is exhausted. The drawback of using approximations is + that the colors might not be exactly what you specified. Note1: This + does only apply to a palette image, not true color images since they + don't have the limitations of maximum number of colors.
"ERR_DEPRECATED",falseShould usage of + deprecated functions and parameters give a fatal error? (Useful to + check if code is future proof.)
"BRAND_TIMING",falseShould the time taken + to generate each picture be branded to the lower left in corner in each + generated image? Useful for performance measurements generating graphs
"BRAND_TIME_FORMAT","Generated in: %01.3fs" +What format should be used for the timing string?
+

The following defines should very rarely need to be changed

+

+ + + + + + + +
Define, default valueComment
"CACHE_FILE_GROUP","wwwadmin"What group + should the cached file belong to (Set to "" will give the default group + for the "PHP-user") Please note that the Apache user must be a member + of the specified group since otherwise it is impossible for Apache to + set the specified group.
"CACHE_FILE_MOD",0664What permissions + should the cached file have (Set to "" will give the default + permissions for the "PHP-user")
"USE_BRESENHAM",falseDecide if we should + use the Bresenham circle algorithm or the built in Arc(). Bresenham + gives better visual appearance of circles but is more CPU intensive and + slower then the built in Arc() function in GD. Turned off by default + for speed
"_CSIM_SPECIALFILE","_csim_special_" +Special file name to indicate that we only want to calc the image map in + the call to Graph::Stroke() used internally from the GetHTMLCSIM() + method.
"_CSIM_DISPLAY","_jpg_csimd"HTTP GET + argument that is used with image map to indicate to the script to just + generate the image and not the full CSIM HTML page.
+   +

 

+

&nbsp

+
+Contents +Previous + + diff --git a/html/includes/jpgraph/docs/html/12Howwasthismanualproduced.html b/html/includes/jpgraph/docs/html/12Howwasthismanualproduced.html new file mode 100644 index 0000000000..268b6b5663 --- /dev/null +++ b/html/includes/jpgraph/docs/html/12Howwasthismanualproduced.html @@ -0,0 +1,43 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

1.2 How was this manual produced?

+

The bulk of the text was written directly in Emacs on a GNU/Linux + system in a mixture of PHP and HTML. A number of PHP functions were + used to automate the handling of formatting example code and figures.

+

To generate the images automatically in the img directory a custom + awk-script is used to extract all the used image script from the + manual. The script then uses the client version of PHP generate the + images from the scripts and stores them in the 'img' directory.

+

The final set of HTML files was then processes by HTMLDOC to + construct table of contents and chapter links.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/131AdjustingthesizeoftheLEDdigits.html b/html/includes/jpgraph/docs/html/131AdjustingthesizeoftheLEDdigits.html new file mode 100644 index 0000000000..eaa3cac94f --- /dev/null +++ b/html/includes/jpgraph/docs/html/131AdjustingthesizeoftheLEDdigits.html @@ -0,0 +1,44 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

13.1 Adjusting the size of the LED digits

+ There are two parameters that can be used to alter the size of the LED + digits. + + These two parameters are given in the constructor which has the + signature DigitalLED74::DigitalLED74($aRadius=2,$aMargin=0.6) + as can be seen from the above signature the default size is 2 pixels in + size and a fraction of 0.6 as the distance.
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/132ImprovingtheLEDswithsupersampling.html b/html/includes/jpgraph/docs/html/132ImprovingtheLEDswithsupersampling.html new file mode 100644 index 0000000000..938dd29748 --- /dev/null +++ b/html/includes/jpgraph/docs/html/132ImprovingtheLEDswithsupersampling.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +Contents +Previous +Next +
+ +

13.2 Improving the LEDs with supersampling

+ In order to improve the visual appearance the library uses + super-sampling in order to create an anti-aliased image of the LED + digits. The default level of super-sampling is 3 times (oversampling). + In order reduce the CPU load the amount of oversampling can be lowered. + The level of super-sampling is controlled via the method +DigitalLed74::SetSupersampling::($aSuperSampling=3) +

For example setting the oversampling to "1" is the same thing as + disabling super-sampling. This will generate a fast image but a LED + appearance that looks quite "rugged".

+

Increasing the level of oversampling above "4" gives almost no + visual improvement to the resulting image, it will only increase the + CPU time needed to create the final image. Hence it is recommended that + the super-sampling is only specified as an integer in the range one to + four.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/13CodedefinesinJpGraph.html b/html/includes/jpgraph/docs/html/13CodedefinesinJpGraph.html new file mode 100644 index 0000000000..c2210d64a7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/13CodedefinesinJpGraph.html @@ -0,0 +1,175 @@ + + + + + + + + + + +Contents +Previous +
+ +

13 Code defines in JpGraph

+

Various settings in JpGraph are controlled by overall DEFINEs in the + configuration file "jpg-config.inc.php". Most of these defines have + default values that should be valid for most usage.

+

In the rest of this chapter all constants are described with default + value and usage.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Define, default valueComment
"CACHE_DIR", "/tmp/jpgraph_cache/"The full + absolute name of directory to be used as a cache. This directory + must be readable and writable for PHP. Must end with '/'
"TTF_DIR", "/usr/local/fonts/ttf/" +Directory for JpGraph TTF fonts. Must end with '/' The fonts must follow + the naming conventions as used by the supplied TTF fonts in JpGraph.
"CSIMCACHE_DIR", "csimcache/"Directory for + cache directory for CSIM graphs. Must end with '/' Cache directory + specification for use with CSIM graphs that are using the cache. The + directory must be the filesystem name as seen by PHP and the 'http' + version must be the same directory but as seen by the HTTP server + relative to the 'htdocs' directory. If a relative path is specified it + is taken to be relative from where the image script is executed. Note: + The default setting is to create a subdirectory in the directory from + where the image script is executed and store all files there. As usual + this directory must be writable by the PHP process.
"CSIMCACHE_HTTP_DIR", "csimcache"Directory + for JpGraph TTF fonts. Must end with '/' Cache directory specification + for use with CSIM graphs that are using the cache. The directory must + be the filesystem name as seen by PHP and the 'http' version must be + the same directory but as seen by the HTTP server relative to the + 'htdocs' directory. If a relative path is specified it is taken to be + relative from where the image script is executed. Note: The default + setting is to create a subdirectory in the directory from where the + image script is executed and store all files there. As usual this + directory must be writable by the PHP process.
"CHINESE_TTF_FONT", "bkai00mp.ttf" Actual + name of the TTF file used together with FF_CHINESE aka FF_BIG5 This is + the TTF file being used when the font family is specified as either + FF_CHINESE or FF_BIG5
"LANGUAGE_CYRILLIC", false Special unicode + Cyrillic language support.
"CYRILLIC_FROM_WINDOWS", false If you are + setting this config to true the conversion will assume that the input + text is windows 1251, if false it will assume koi8-r
'MINCHO_TTF_FONT', 'ipam.ttf' Japanese + TrueType font used with FF_MINCHO
'PMINCHO_TTF_FONT', 'ipamp.ttf' Japanese + TrueType font used with FF_PMINCHO
'GOTHIC_TTF_FONT', 'ipag.ttf' Japanese + TrueType font used with FF_GOTHIC
'PGOTHIC_TTF_FONT', 'ipagp.ttf' Japanese + TrueType font used with FF_PGOTHIC
"INSTALL_PHP_ERR_HANDLER", false Determine + if the library should also setup the default PHP error handler to + generate a graphic error message. This is useful during development to + be able to see the error message as an image instead as a "red-cross" + in a page where an image is expected.
"CATCH_PHPERRMSG", true Should the library + examine the global php_errmsg string and convert any error in it to a + graphical representation. This is handy for the occasions when, for + example, header files cannot be found and this results in the graph not + being created and just a "red-cross" image would be seen. This should + be turned off for a production site.
"USE_LIBRARY_GD2",falseSpecify if we + should use GD 2.x or GD 1.x If you have GD 2.x installed it is + recommended that you use it since it will give a slightly, slightly + better visual appearance for arcs. If you don't have GD2 installed this + must be set to false!
'USE_TRUECOLOR',trueShould the image be a + truecolor image? Note 1: Can only be used with GD 2.0.2 and above. Note + 2: GD 2.0.1 + PHP 4.0.6 on Win32 crashes when trying to use truecolor. + Truecolor support is to be considered alpha since GD 2.x is still not + considered stable (especially on Win32). Note 3: MUST be enabled to get + background images working with GD2 Note 4: If enabled then truetype + fonts will look very ugly => You can't have both background images and + truetype fonts in the same image until these bugs has been fixed in GD + 2.01
"USE_CACHE",falseShould the cache be used + at all? By setting this to false no files will be generated in the + cache directory. The difference from READ_CACHE being that setting + READ_CACHE to false will still create the image in the cache directory + just not use it. By setting USE_CACHE=false no files will even be + generated in the cache directory.
"READ_CACHE",trueShould we try to find an + image in the cache before generating it? Set this define to false to + bypass the reading of the cache and always regenerate the image. Note + that even if reading the cache is disabled the cached will still be + updated with the newly generated image. Set also "USE_CACHE" below.
"DEFAULT_GFORMAT","auto"Default graphic + format set to "auto" which will automatically choose the best available + format in the order png,gif,jpg (The supported format depends on what + your PHP installation supports)
"USE_IMAGE_ERROR_HANDLER",true Determine + if the error handler should be image based or purely text based. Image + based makes it easier since the script will always return an image even + in case of errors.
"USE_APPROX_COLORS",trueIf the color + palette is full should JpGraph try to allocate the closest match? If + you plan on using background image or gradient fills it might be a good + idea to enable this. If not you will otherwise get an error saying that + the color palette is exhausted. The drawback of using approximations is + that the colors might not be exactly what you specified. Note1: This + does only apply to a palette image, not true color images since they + don't have the limitations of maximum number of colors.
"ERR_DEPRECATED",falseShould usage of + deprecated functions and parameters give a fatal error? (Useful to + check if code is future proof.)
"BRAND_TIMING",falseShould the time taken + to generate each picture be branded to the lower left in corner in each + generated image? Useful for performance measurements generating graphs
"BRAND_TIME_FORMAT","Generated in: %01.3fs" +What format should be used for the timing string?
+

The following defines should very rarely need to be changed

+

+ + + + + + + +
Define, default valueComment
"CACHE_FILE_GROUP","wwwadmin"What group + should the cached file belong to (Set to "" will give the default group + for the "PHP-user") Please note that the Apache user must be a member + of the specified group since otherwise it is impossible for Apache to + set the specified group.
"CACHE_FILE_MOD",0664What permissions + should the cached file have (Set to "" will give the default + permissions for the "PHP-user")
"USE_BRESENHAM",falseDecide if we should + use the Bresenham circle algorithm or the built in Arc(). Bresenham + gives better visual appearance of circles but is more CPU intensive and + slower then the built in Arc() function in GD. Turned off by default + for speed
"_CSIM_SPECIALFILE","_csim_special_" +Special file name to indicate that we only want to calc the image map in + the call to Graph::Stroke() used internally from the GetHTMLCSIM() + method.
"_CSIM_DISPLAY","_jpg_csimd"HTTP GET + argument that is used with image map to indicate to the script to just + generate the image and not the full CSIM HTML page.
+   +

 

+

&nbsp

+
+Contents +Previous + + diff --git a/html/includes/jpgraph/docs/html/13GeneratingLEDlikedigitswithJpGraph.html b/html/includes/jpgraph/docs/html/13GeneratingLEDlikedigitswithJpGraph.html new file mode 100644 index 0000000000..37570d11f2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/13GeneratingLEDlikedigitswithJpGraph.html @@ -0,0 +1,76 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

13 Generating LED-like digits with JpGraph

+ Starting with v1.21 it is possible to generate LED like digits with + JpGraph. This is accomplished by the usage of the "jpgraph_led.php" + module. +

The creation of LED digits and letters are extremely simple. The + following complete example demonstrates the creation of a LED display

  +
+
include  +"../jpgraph.php"; +
include 
"../jpgraph_led.php"; +
+
+// By default each "LED" circle has a radius of 3 pixels +
$led  += new DigitalLED74 +(); +
$led->Stroke( +'0123456789. ABCDEFGHIJKL', +LEDC_GREEN);  +

+

The result of running this script can be seen by running the + "Examples/ledex1.php" Example in the example directory. As can be seen + from the above example the color to be used for the LED digits is + specified as the second argument to the DigitalLED74::Stroke() method. + Available color for LED digits is given by the table below

+ + + + + + + +
Symbolic nameColor
LEDC_REDRed
LEDC_GREENGreen
LEDC_BLUEBlue
LEDC_YELLOWYellow
GREYGrey
+

Since the standard LED matrix of 7x4 dots does not lend itself to + accurately represent all normal ASCII characters only the following + numbers and letters can be displayed.

+ + + +
All digits, 0-9
Capital Letters, A-L
+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/14CodedefinesinJpGraph.html b/html/includes/jpgraph/docs/html/14CodedefinesinJpGraph.html new file mode 100644 index 0000000000..215516cf8d --- /dev/null +++ b/html/includes/jpgraph/docs/html/14CodedefinesinJpGraph.html @@ -0,0 +1,174 @@ + + + + + + + + + + +Contents +Previous +
+

14 Code defines in JpGraph

+

Various settings in JpGraph are controlled by overall DEFINEs in the + configuration file "jpg-config.inc.php". Most of these defines have + default values that should be valid for most usage.

+

In the rest of this chapter all constants are described with default + value and usage.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Define, default valueComment
"CACHE_DIR", "/tmp/jpgraph_cache/"The full + absolute name of directory to be used as a cache. This directory + must be readable and writable for PHP. Must end with '/'
"TTF_DIR", "/usr/local/fonts/ttf/" +Directory for JpGraph TTF fonts. Must end with '/' The fonts must follow + the naming conventions as used by the supplied TTF fonts in JpGraph.
"CSIMCACHE_DIR", "csimcache/"Directory for + cache directory for CSIM graphs. Must end with '/' Cache directory + specification for use with CSIM graphs that are using the cache. The + directory must be the filesystem name as seen by PHP and the 'http' + version must be the same directory but as seen by the HTTP server + relative to the 'htdocs' directory. If a relative path is specified it + is taken to be relative from where the image script is executed. Note: + The default setting is to create a subdirectory in the directory from + where the image script is executed and store all files there. As usual + this directory must be writable by the PHP process.
"CSIMCACHE_HTTP_DIR", "csimcache"Directory + for JpGraph TTF fonts. Must end with '/' Cache directory specification + for use with CSIM graphs that are using the cache. The directory must + be the filesystem name as seen by PHP and the 'http' version must be + the same directory but as seen by the HTTP server relative to the + 'htdocs' directory. If a relative path is specified it is taken to be + relative from where the image script is executed. Note: The default + setting is to create a subdirectory in the directory from where the + image script is executed and store all files there. As usual this + directory must be writable by the PHP process.
"CHINESE_TTF_FONT", "bkai00mp.ttf" Actual + name of the TTF file used together with FF_CHINESE aka FF_BIG5 This is + the TTF file being used when the font family is specified as either + FF_CHINESE or FF_BIG5
"LANGUAGE_CYRILLIC", false Special unicode + Cyrillic language support.
"CYRILLIC_FROM_WINDOWS", false If you are + setting this config to true the conversion will assume that the input + text is windows 1251, if false it will assume koi8-r
'MINCHO_TTF_FONT', 'ipam.ttf' Japanese + TrueType font used with FF_MINCHO
'PMINCHO_TTF_FONT', 'ipamp.ttf' Japanese + TrueType font used with FF_PMINCHO
'GOTHIC_TTF_FONT', 'ipag.ttf' Japanese + TrueType font used with FF_GOTHIC
'PGOTHIC_TTF_FONT', 'ipagp.ttf' Japanese + TrueType font used with FF_PGOTHIC
"INSTALL_PHP_ERR_HANDLER", false Determine + if the library should also setup the default PHP error handler to + generate a graphic error message. This is useful during development to + be able to see the error message as an image instead as a "red-cross" + in a page where an image is expected.
"CATCH_PHPERRMSG", true Should the library + examine the global php_errmsg string and convert any error in it to a + graphical representation. This is handy for the occasions when, for + example, header files cannot be found and this results in the graph not + being created and just a "red-cross" image would be seen. This should + be turned off for a production site.
"USE_LIBRARY_GD2",falseSpecify if we + should use GD 2.x or GD 1.x If you have GD 2.x installed it is + recommended that you use it since it will give a slightly, slightly + better visual appearance for arcs. If you don't have GD2 installed this + must be set to false!
'USE_TRUECOLOR',trueShould the image be a + truecolor image? Note 1: Can only be used with GD 2.0.2 and above. Note + 2: GD 2.0.1 + PHP 4.0.6 on Win32 crashes when trying to use truecolor. + Truecolor support is to be considered alpha since GD 2.x is still not + considered stable (especially on Win32). Note 3: MUST be enabled to get + background images working with GD2 Note 4: If enabled then truetype + fonts will look very ugly => You can't have both background images and + truetype fonts in the same image until these bugs has been fixed in GD + 2.01
"USE_CACHE",falseShould the cache be used + at all? By setting this to false no files will be generated in the + cache directory. The difference from READ_CACHE being that setting + READ_CACHE to false will still create the image in the cache directory + just not use it. By setting USE_CACHE=false no files will even be + generated in the cache directory.
"READ_CACHE",trueShould we try to find an + image in the cache before generating it? Set this define to false to + bypass the reading of the cache and always regenerate the image. Note + that even if reading the cache is disabled the cached will still be + updated with the newly generated image. Set also "USE_CACHE" below.
"DEFAULT_GFORMAT","auto"Default graphic + format set to "auto" which will automatically choose the best available + format in the order png,gif,jpg (The supported format depends on what + your PHP installation supports)
"USE_IMAGE_ERROR_HANDLER",true Determine + if the error handler should be image based or purely text based. Image + based makes it easier since the script will always return an image even + in case of errors.
"USE_APPROX_COLORS",trueIf the color + palette is full should JpGraph try to allocate the closest match? If + you plan on using background image or gradient fills it might be a good + idea to enable this. If not you will otherwise get an error saying that + the color palette is exhausted. The drawback of using approximations is + that the colors might not be exactly what you specified. Note1: This + does only apply to a palette image, not true color images since they + don't have the limitations of maximum number of colors.
"ERR_DEPRECATED",falseShould usage of + deprecated functions and parameters give a fatal error? (Useful to + check if code is future proof.)
"BRAND_TIMING",falseShould the time taken + to generate each picture be branded to the lower left in corner in each + generated image? Useful for performance measurements generating graphs
"BRAND_TIME_FORMAT","Generated in: %01.3fs" +What format should be used for the timing string?
+

The following defines should very rarely need to be changed

+

+ + + + + + + +
Define, default valueComment
"CACHE_FILE_GROUP","wwwadmin"What group + should the cached file belong to (Set to "" will give the default group + for the "PHP-user") Please note that the Apache user must be a member + of the specified group since otherwise it is impossible for Apache to + set the specified group.
"CACHE_FILE_MOD",0664What permissions + should the cached file have (Set to "" will give the default + permissions for the "PHP-user")
"USE_BRESENHAM",falseDecide if we should + use the Bresenham circle algorithm or the built in Arc(). Bresenham + gives better visual appearance of circles but is more CPU intensive and + slower then the built in Arc() function in GD. Turned off by default + for speed
"_CSIM_SPECIALFILE","_csim_special_" +Special file name to indicate that we only want to calc the image map in + the call to Graph::Stroke() used internally from the GetHTMLCSIM() + method.
"_CSIM_DISPLAY","_jpg_csimd"HTTP GET + argument that is used with image map to indicate to the script to just + generate the image and not the full CSIM HTML page.
+   +

 

+

&nbsp

+
+Contents +Previous + + diff --git a/html/includes/jpgraph/docs/html/1Aboutthismanual.html b/html/includes/jpgraph/docs/html/1Aboutthismanual.html new file mode 100644 index 0000000000..5413d49269 --- /dev/null +++ b/html/includes/jpgraph/docs/html/1Aboutthismanual.html @@ -0,0 +1,32 @@ + + + + + + + + + + +Contents +Next +
+

1 About this manual

+

+
+Contents +Next + + diff --git a/html/includes/jpgraph/docs/html/21Version.html b/html/includes/jpgraph/docs/html/21Version.html new file mode 100644 index 0000000000..ebb6c0628a --- /dev/null +++ b/html/includes/jpgraph/docs/html/21Version.html @@ -0,0 +1,45 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

2.1 Version

+

This manual covers versions up to 1.21 of JpGraph. A 2D graph + plotting library for PHP4 and PHP5.

+

The library exists in two main tracks, the 1.x track and the 2.x + track. From a functional perspective both branches are equivalent. The + difference is that 1.x is suitable for PHP4 and 2.x is suitable for + PHP5.

+

Please make sure you use the correct version ! The 1.x version will + not in general wotk on PHP5 installation and vice versa.

+

Even though the library is known to work with version of PHP prior + to 4.3 and 5.1 respectively the library is not tested nor is it + recommended to run with any older versions of PHP.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/22SoftwareLicense.html b/html/includes/jpgraph/docs/html/22SoftwareLicense.html new file mode 100644 index 0000000000..b7b9e2b3d8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/22SoftwareLicense.html @@ -0,0 +1,41 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

2.2 Software License

+

JpGraph is released under a dual license. For non-comercial usage + the library is released uner QPL 1.0 (Qt-License) and under the JpGraph + Professional License for commercial use. Commercial use is defined as + either a) The library is included as an integral part of a product that + is sold with a cost that exceeds the cost of the distribution medium. + b) The library is offered as a WEB service for a fee c) The library is + used on an intranet in a company with more than 5 employees

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/23JpGraphFeatures.html b/html/includes/jpgraph/docs/html/23JpGraphFeatures.html new file mode 100644 index 0000000000..53b0cff27f --- /dev/null +++ b/html/includes/jpgraph/docs/html/23JpGraphFeatures.html @@ -0,0 +1,86 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

2.3 JpGraph Features

+

JpGraph library is an OO graph library which makes it easy to both + draw a "quick and dirty" graph with a minimum of code and quite complex + graphs which requires a very fine grain of control. The library tries + to assign sensible default values for most parameters hence making the + learning curve quite flat since for most of the time very few commands + is required to draw graphs with a pleasing esthetic look.

+

Some highlights of available features are

+ +

In addition to these high level features the library has been + designed to be orthogonal and consistent in its' naming convention. For + example, to specify color each object (i.e. axis, grids, texts, titles + etc) within the graph implements the method SetColor() with the same + signature.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/24Gettingthelatestversion.html b/html/includes/jpgraph/docs/html/24Gettingthelatestversion.html new file mode 100644 index 0000000000..48320d4a5b --- /dev/null +++ b/html/includes/jpgraph/docs/html/24Gettingthelatestversion.html @@ -0,0 +1,46 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

2.4 Getting the latest version

+

The latest version of jpgraph can always be found on +http://www.aditus.nu/jpgraph/

+

Information on version numbering schema

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/25Plannedfutureaddition.html b/html/includes/jpgraph/docs/html/25Plannedfutureaddition.html new file mode 100644 index 0000000000..aa11849306 --- /dev/null +++ b/html/includes/jpgraph/docs/html/25Plannedfutureaddition.html @@ -0,0 +1,36 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

2.5 Planned future addition

+

For the latest update on planned future version see the web-site for + JpGraph at http://www.aditus.nu/jpgraph/

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/26Knownbugsandomissions.html b/html/includes/jpgraph/docs/html/26Knownbugsandomissions.html new file mode 100644 index 0000000000..1bddf30716 --- /dev/null +++ b/html/includes/jpgraph/docs/html/26Knownbugsandomissions.html @@ -0,0 +1,43 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

2.6 Known bugs and omissions

+

+ +

For an overview of current issues that have been reported and are + unders investigation please see our DMS (Defect Management System) + available at +http://wwww.aditus.nu/bugtraq/

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/27Acknowledgments.html b/html/includes/jpgraph/docs/html/27Acknowledgments.html new file mode 100644 index 0000000000..c892a64c4c --- /dev/null +++ b/html/includes/jpgraph/docs/html/27Acknowledgments.html @@ -0,0 +1,55 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

2.7 Acknowledgments

+

The idea for writing this library grew out of our own need for a + high quality graph drawing library for PHP. When evaluating potential + existing libraries we found (at that time around 2000) these three

+
    +
  1. "chart 0.3" http://quimby.gnus.org/circus/chart/chart-0.3.tar.gz, + by Lars Magne Ingebrigtsen
  2. +
  3. "ykcee.php", http://ykcee.sourceforge.net
  4. +
  5. "phplot.php", http://www.phplot.com
  6. +
+

All these libraries implements some fine graphic features but + unfortunately none of those completely fulfilled our needs either for + available functionality (for example none of these supported both two + Y-scales, auto-scaling, and logarithmic scales), or general + flexibility. We especially needed the option of two Y-scales, which + none of the above packages supported. Our own preferences for design + was closest to "chart 0.3" so we started by fixing some bugs in that + package and adding some new features. However It was soon realized that + to add all the features and flexibility we needed to "chart 0.3" it + would require a complete rewrite since the original design wasn't + flexible enough, especially adding a second Y-scale would require a + more flexible OO architecture.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/28Reportingbugsandsuggestingimprovements.html b/html/includes/jpgraph/docs/html/28Reportingbugsandsuggestingimprovements.html new file mode 100644 index 0000000000..1c334eb0fd --- /dev/null +++ b/html/includes/jpgraph/docs/html/28Reportingbugsandsuggestingimprovements.html @@ -0,0 +1,46 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

2.8 Reporting bugs and suggesting improvements

+

Defects or suggestion for new features can be entered using the +JpGraph BugTracker available at +http://www.aditus.nu/bugtraq/

+

Before reporting bugs or feature suggestions may we ask that the + following facts are considered.

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/29Gettingsupport.html b/html/includes/jpgraph/docs/html/29Gettingsupport.html new file mode 100644 index 0000000000..967c6ef8c3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/29Gettingsupport.html @@ -0,0 +1,52 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

2.9 Getting support

+

Customers who have acquired the pro-version of the library are + entitled to prioritized e-mail support for a specific time after the + purchase. Support tickets may be created by first logging in to +http://www.aditus.nu/jpgraph/pro_login.php and then create a support + ticket.

+

For other users a public community forum is available at +http://jpgraph.intellit.nl/ where many common questions are answered + and discussed.

+

A collection of FAQ is available at +http://www.aditus.nu/jpgraph/jpgraphfaq.php

+

In addition there is a growing list of "HowTo" documents available + at +http://www.aditus.nu/jpgraph/jpgraphowto.php

+

Finally, we regret that we are unable to provide general support + regarding PHP/GD/TTF/Apache installation outside the specific scope of + the JpGraph library. Please see the corresponding documentation and + relevant FAQ for those products.

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/2Introduction.html b/html/includes/jpgraph/docs/html/2Introduction.html new file mode 100644 index 0000000000..06c72d9521 --- /dev/null +++ b/html/includes/jpgraph/docs/html/2Introduction.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

2 Introduction

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/311VerifyingthatyouhavetheGDlibraryinstalled.html b/html/includes/jpgraph/docs/html/311VerifyingthatyouhavetheGDlibraryinstalled.html new file mode 100644 index 0000000000..c3f44455c8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/311VerifyingthatyouhavetheGDlibraryinstalled.html @@ -0,0 +1,76 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.1.1 Verifying that you have the GD library + installed

+

In order to make sure that the GD installed the following example + would be run. The example creates a very simple image using just pure + GD calls and outputs an image in PNG format. This could be considered a + smoke-test to see that the GD library is available from PHP. Please + note that this is an absolute pre-requisite in order for the + JpGraph library to work at all.

+

Store the code snippet below somewhere in the document root and make + sure it runs correctly.

+  $im = @ +ImageCreate ( +150100) +
    or die (
+"Cannot create a new GD image."); +
$background_color  += ImageColorAllocate  +($im255 +255255); +
$text_color  += ImageColorAllocate  +($im233 +1491); +
ImageString  +($im1 +55,  "A Simple Text String"$text_color +); +
header ("Content-type: image/png"); +
ImagePng ($im); +

+

If the above script does not work or some error or warnings are + printed on the screen then it is necessary to correct those problems + before proceeding with the installation.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/312VerifyingthatyouhaveGD2installed.html b/html/includes/jpgraph/docs/html/312VerifyingthatyouhaveGD2installed.html new file mode 100644 index 0000000000..16898765a0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/312VerifyingthatyouhaveGD2installed.html @@ -0,0 +1,78 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.1.2 Verifying that you have GD2 installed

+

To access the more advanced features of JpGraph needs the GD 2.x + library. This will allow the use of features such as alpha-blending and + trucolor images.

+

The GD 2.x library is included in all standard PHP versions from + 4.2.x and above. To make sure that the GD 2.x library is installed the + following script must be working.

+  $im  +imagecreatetruecolor ( +300200);  +
$black imagecolorallocate ($im +000 +);  +
$white imagecolorallocate ($im +255255255 +);  +
+
imagefilledrectangle +($im,0, +0,399,99 +,$white);  +
imagerectangle +($im,20, +20,250,190 +,$black);  +
+
header ("Content-type: image/png" +);  +
imagepng ($im); +

+

After running this script you should now see a black rectangle in + your browser.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/313PreparingTrueTypeFontFiles.html b/html/includes/jpgraph/docs/html/313PreparingTrueTypeFontFiles.html new file mode 100644 index 0000000000..ff8f0b640e --- /dev/null +++ b/html/includes/jpgraph/docs/html/313PreparingTrueTypeFontFiles.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.1.3 Preparing True Type Font Files

+

JpGraph contains as default a standard set of bitmap fonts which + only supports the standard ASCII 7-bit character set. In order to use + accented characters, UTF-8, Chinese, Japanese, etc You need to download + TTF fonts. Due to various legal issues no TTF fonts are supplied in the + JpGraph package. To enable TTF fonts there are three alternatives:

+
    +
  1. If you are on a Windows platform you can just point to the TTF + directory in JpGraph to the standard fonts directory (e.g + C:\windows\fonts\)
  2. +
  3. If you are on a Unix platform you can download and install the core + MS WEB-initiative fonts from +http://corefonts.sourceforge.net/
  4. +
  5. It is also possible to use the Vera Bitstream TTF fonts available + from http://www.gnome.org/fonts/ +
  6. +
+

It is also necessary to make sure that the PHP installation supports + TTF fonts (either through FreeType 1 or FreeType 2 libraries). I n + addition some suitable TTF font files must also be available. To make + the font files available for the library the directory path to the + location of the font files must be specified in the configuration file, + jpg-config.inc.php

+

JpGraph uses a standard naming convention for the TTF font files in + order to be able to find the correct font files. This naming convention + follows the standard naming of the available font files.

+

If the installation of the library is made on a computer running MS + Windows then it is recommended to use the already available font files + in Windows (usually located in C:\WINDOWS\FONTS).

+

If the installation is made on a UNIX derivate running X11 then the + font location can differ between versions and UNIX brands. One commonly + used path is "/usr/X11R6/lib/X11/fonts/truetype/".

+

Finally we note that it is possible to install additional fonts not + natively supported by the library. Since this requires augmenting the + library files this is considered advanced use and not further discussed + in this introduction.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/314UsingnonlatinbasedfontswithJpGraph.html b/html/includes/jpgraph/docs/html/314UsingnonlatinbasedfontswithJpGraph.html new file mode 100644 index 0000000000..d03adc238c --- /dev/null +++ b/html/includes/jpgraph/docs/html/314UsingnonlatinbasedfontswithJpGraph.html @@ -0,0 +1,91 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.1.4 Using non-latin based fonts with JpGraph

+

In addition to European font it is also possible to use non-latin + based fonts such as Cyrillic, Japanese and Chinese.

+

In all cases a suitable TTF font that supports the non-latin based + language must be available.

+

For Cyrillic support the define LANGUAGE_CYRILLIC in jpg-config.php + must be set to true. It is then possible to use a suitable Cyrillic + font as replacement for the ordinary fonts.

+

For Chinese character set JpGraph supports both BIG5 and GB2312 + encoding. For BIG5 encoding the PHP installation must have support for + the "iconv()" function. Furthermore the define CHINESE_TTF_FONT must be + set to the name of the Chinese BIG5 font that is to be used. By default + this is set to "bkai00mp.ttf". To use the Chinese BIG5 font in the + scripts one must then specify the font family as FF_CHINESE.

+

To use the alternative font files "simsun.ttc" and "simhei.ttf" + (which uses the GB2312 encoding) the only step needed is to install + those fonts in the normal TTF font directory and then specify the font + family as FF_SIMSUN, the "simhei.ttf" is used when the font style is + specified as FS_BOLD.

+

3.1.4.1 Japanese character support

+ Using Japanese fonts are supported by the pre-defined font families + + Please note that the actual font files is not included in the library. + The exact name of the font files to use for these families are defined + in the the configuration file "jpg-config.inc.php.php". +

Some care must be taken due to the encoding that the library + expects. The library TTF handling expects the fonts to be encoded in + UTF8 encoding. Since the most commonly used Japanese encoding is EUC-JP + some conversion must be done. The best way to do this is by using the + mbstring extension to PHP to handle the encoding. By default this + module is not included and to compile PHP with support for mbstring the + option "--enable-mbstring" must be given when compiling PHP. Your + installation of PHP might also provide mbstring as a PHP module that is + loaded at runtime.

+

To convert from EUC-JP the function mb_convert_encoding() is + used as the following example shows.

+
+$utf8-encoded-text = mb_convert_encoding($eucjp-encoded-txt, 'UTF-8','EUC-JP');
+
+ By enabling the define "ASSUME_EUCJP_ENCODING" (in + jpg-config.inc.php.php) this encoding is done automatically in the + library when one of the Japanese fonts have been enabled. By default + this automatic conversion is disabled. +

If this define is false then it is up to the client to make sure + that the proper utf8 encoded text is passed on to all the methods that + are use to specify text in the library given that one of the Japanese + fonts have been selected.

+

A different method also exists when it comes to Japanese font + support. By compiling PHP with the option "--enable-gd-jis-conv" this + will automatically convert Japanese characters to UTF8 when using the + FreeType libraries. However the method with the mbstring module is + preferred since the automatic conversion might on occasion fail to + detect the proper encoding.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/31Preparation.html b/html/includes/jpgraph/docs/html/31Preparation.html new file mode 100644 index 0000000000..0657ef6f64 --- /dev/null +++ b/html/includes/jpgraph/docs/html/31Preparation.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.1 Preparation

+

In order to make use of the library it is necessary to ensure that + the script files can correctly access the library include files (as + described below) and that the PHP installation supports at least one + graphic format, i.e. it supports the "image" extension in PHP.

+

This is easiest verified by either checking the output of the + phpinfo() standard PHP function or by making sure the PHP + installation make the 'imagecreate()' function available.

+

This means that the installation + + must have a working GD-library together with PHP before the library + JpGraph can be used. Please make sure you have version 4.3.x or above + of PHP since JpGraph is not actively tested with + versions prior to PHP 4.3.x Ideally you should use at least PHP 4.3.8

+

Please note that the 1.x version of the library do not + support PHP 5.x

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/32Customizingtheinstallation.html b/html/includes/jpgraph/docs/html/32Customizingtheinstallation.html new file mode 100644 index 0000000000..427622f8a1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/32Customizingtheinstallation.html @@ -0,0 +1,45 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.2 Customizing the installation

+

In order for JpGraph to work it is necessary to adjust the cache and + TTF directory to suit the specific installation. By default the TTF + directory is "/usr/X11R6/lib/X11/fonts/truetype/" and for the cache + "/tmp/jpgraph_cache/". These are defined as PHP defines at the top of + jpg-config.inc.php

+

Please make sure that PHP has write permissions to the cache + directory if the cache feature should be used. If this is not the case + a "Can't write file xxx.yyy" error will occur when a graph that uses + the cache feature are generate. More information regarding the cache + feature of JpGraph is available in the section Making sense of + caching system in JpGraph

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/331Plotextensionmodules.html b/html/includes/jpgraph/docs/html/331Plotextensionmodules.html new file mode 100644 index 0000000000..ff8400a831 --- /dev/null +++ b/html/includes/jpgraph/docs/html/331Plotextensionmodules.html @@ -0,0 +1,90 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.3.1 Plot extension modules

+

To add plots to the graph you will need one or more of the following + files plot extension files depending on what kind of graph you need to + create.

+ +

In the pro-version the following additional files are available

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/33Requiredfiles.html b/html/includes/jpgraph/docs/html/33Requiredfiles.html new file mode 100644 index 0000000000..cda8b4861a --- /dev/null +++ b/html/includes/jpgraph/docs/html/33Requiredfiles.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.3 Required files

+

This is the base library files, which you must have

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/34Imageformatsandexternalimagelibraries.html b/html/includes/jpgraph/docs/html/34Imageformatsandexternalimagelibraries.html new file mode 100644 index 0000000000..0f140f63f4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/34Imageformatsandexternalimagelibraries.html @@ -0,0 +1,52 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.4 Image formats and external image libraries

+

Per default the standard GD image library supports PNG graphic + formats. You will need to have that installed together with your PHP + module for this library to work at all. Please refer to PHP + documentation on specifics. Note that the newer versions of GD does not + support the GIF format due to copyright problems. Hence by default only + PNG is supported.

+

If you want JPEG support you will also need an additional library + for PHP, again please see PHP documentation for specifics. For most + practical purposes PNG is a better format since it normally achieves + better compression then GIF (typically by a factor of 2 for the types + of images generated by JpGraph). In comparison with JPEG format PNG is + also better for the type of images generated by this library. So, the + bottom line is, you should have a very good reason to choose any other + format then PNG.

+

By default the image format is set to "auto". This means that + JpGraph automatically chooses the best available graphic using the + preferred order "PNG", "GIF", "JPG".

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/35DetailedstepstoinstallJpGraph.html b/html/includes/jpgraph/docs/html/35DetailedstepstoinstallJpGraph.html new file mode 100644 index 0000000000..48109a1f66 --- /dev/null +++ b/html/includes/jpgraph/docs/html/35DetailedstepstoinstallJpGraph.html @@ -0,0 +1,67 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.5 Detailed steps to install JpGraph

+

+
    +
  1. If You are insatlling the 1.x branch then make sure the PHP version + used is at least 4.3.x (preferable 4.3.10 or higher) and that the PHP + version have compiled support for GD library. It is absolutely critical + that GD is fully working. Please see the earlier sections on how to + make sure. JpGraph supports both GD 1.x and GD 2.x However it is + strongly recommended to use GD 2.x since that will improve performance + and support true color images as well as alphablending. +

    If You are insatlling the 2.x branch then make sure the PHP version + used is at least 5.0.1 (preferable 5.0.5 or higher) and that the PHP + version have compiled support for GD 2.x library. Please note that the + 2.x branch will not work with PHP 4.x

    +
  2. +
  3. Unzip and copy the files to a directory of your choice.
  4. +
  5. Set up the directory paths in jpg-config.inc.php where the + cache directory should be and where your TTF directory is. Note that + Apache/PHP must have write permission in your cache directory.
  6. +
  7. Check that all rest of the DEFINE in the top of JpGraph.php is + setup to your preference. The default should be fine for most users. + (See also Note 5. below) Specifically check that the settings of + USE_GD2_LIBRARY reflects your installation, (should be true if you have + GD2 installed, false otherwise).
  8. +
  9. Make sure PHP have write privileges to your cache directory if you + plan on using the cache feature.
  10. +
  11. Some windows installations seems to have a problem with a PHP + script ending in a newline (This newline seems to be sent to the + browser and will cause a Header already sent error). If you have this + problem try remove all trailing newlines in the jpgraph* files
  12. +
  13. Read (really!) +the JpGraph FAQ.
  14. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/36Troubleshootingyourinstallation.html b/html/includes/jpgraph/docs/html/36Troubleshootingyourinstallation.html new file mode 100644 index 0000000000..ece605fa76 --- /dev/null +++ b/html/includes/jpgraph/docs/html/36Troubleshootingyourinstallation.html @@ -0,0 +1,75 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.6 Troubleshooting your installation

+

For 99% of the users this library will work directly with a recent + installation of PHP without any problem.

+

Experience shows that most of the trouble are caused by either an + old buggy version of the free-type TTF library or using an old + antiquated version of the GD library. In order to narrow it down the + problem the following steps is helpful.

+
    +
  1. If no background images are displayed (instead a solid black box + are displayed) chances are that GD 2.x is available but the + jpg-config.inc.php has been changed so that true color images are + disabled. Correct this by enabling the USE_TRUECOLOR define.
  2. +
  3. If background images does not work make sure the settings of + USE_GD2_LIBRARY corresponds to the actual installation, i.e. If the GD2 + library is not available then this define must be false!
  4. +
  5. If you are running IIS and Win2k and get the error "Can't find + font" when trying to use TTF fonts then try to change the paths to UNIX + style, i.e. "/usr/local/fonts/ttf/". Remember that the path is absolute + and not relative to the htdocs catalogue.
  6. +
  7. If no images and no error messages gets sent back to the browser + then there is a big chance that HTTP-Server PHP module (e.g. + Apache-PHP) has crashed. This is often due to a broken PHP installation + and more than often a problem with the True Type libraries. The best + way to track these types of problem down is to investigate the + HTTP-Server logs or the general system logs for evidence of a PHP + crash. The other reasons is that in some rare cases the auto detection + of the GD library could fail. If only the GD1 library is available and + the JpGraph library mistakenly detects the GD2 this could in rare cases + cause PHP to crash. Please try re-run the example by setting the DEFINE + USE_GD2_LIBRARY to "false".
  8. +
  9. If the system is running IIS on Windows and some images which uses + TTF fonts just return an empty page then try to set the TTF_DIR path + manually (in jpg-config.php) to the directory where all the TTF fonts + are stored (normally c:/WINDOWS/fonts)
  10. +
  11. If the cache is enabled please make sure that the permissions are + correctly set for the cache directory so that the process running + Apache/PHP has write access to the cache directory.
  12. +
  13. If the TTF fonts only shows up as yellow then you have a buggy + installation of the freetype font library and the only thing to do is + to re-install and setup PHP+GD again.
  14. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/37CompilingPHP4.html b/html/includes/jpgraph/docs/html/37CompilingPHP4.html new file mode 100644 index 0000000000..3304ecba68 --- /dev/null +++ b/html/includes/jpgraph/docs/html/37CompilingPHP4.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3.7 Compiling PHP 4

+

This is not meant to be a complete discussion about configuring + or compiling PHP. It is meant as an example of a configuration of PHP + that is known to work well with JpGraph.

+

Below is an example of a standard configuration that can be used to + configure and compile PHP for use with the JpGraph Library

+

Please note that depending on the specific installation requirements + other options might have to be specified, specifically the paths to + external libraries might need to be adjusted.

+
+./configure --prefix=/usr/share \
+--datadir=/usr/share/php \
+--with-apxs=/usr/sbin/apxs \
+--libdir=/usr/share \
+--includedir=/usr/include \
+--bindir=/usr/bin \
+--with-config-file-path=/etc \
+--enable-mbstring --enable-mbregex \
+--with-pdflib=/usr \
+--with-mysql  \
+--with-ttf-dir=/usr/lib \
+--with-freetype-dir=/usr/lib \
+--with-gd --enable-gd-imgstrttf --enable-gd-native-ttf \
+--with-zlib-dir=/usr/lib \
+--with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-xpm-dir=/usr/X11R6 \
+--with-tiff-dir=/usr/lib \
+--enable-ftp \
+--enable-memory-limit --enable-safe-mode \
+--bindir=/usr/bin \
+--enable-bcmath -enable-calendar \
+--enable-ctype --with-ftp \
+--enable-magic-quotes \
+--enable-inline-optimization \
+--with-bz2 \
+--with-iconv
+
+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/3Installation.html b/html/includes/jpgraph/docs/html/3Installation.html new file mode 100644 index 0000000000..b2e75ba132 --- /dev/null +++ b/html/includes/jpgraph/docs/html/3Installation.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

3 Installation

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/411Whatyouwilllearninthischapter.html b/html/includes/jpgraph/docs/html/411Whatyouwilllearninthischapter.html new file mode 100644 index 0000000000..8e44c38359 --- /dev/null +++ b/html/includes/jpgraph/docs/html/411Whatyouwilllearninthischapter.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.1.1 What you will learn in this chapter

+

+
    +
  1. The principle of generating dynamic images in PHP
  2. +
  3. How to choose a specific image format (e.g. JPG, PNG, GIF)
  4. +
  5. Various ways of using the generated image, streaming it back to the + browser, sending it to a file or getting hold of the image handle for + further post processing
  6. +
  7. How to specify fonts (both bit-mapped and TTF) in JpGraph
  8. +
  9. How to extend JpGraph with your own fonts
  10. +
  11. How to work with Cyrillic fonts
  12. +
  13. How to specify colors in JpGraph
  14. +
  15. List all available named colors in JpGraph
  16. +
  17. How to effectively use the built in cache schema in JpGraph
  18. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/412WhatyouwillNOTlearninthischapter.html b/html/includes/jpgraph/docs/html/412WhatyouwillNOTlearninthischapter.html new file mode 100644 index 0000000000..7dbce8dbee --- /dev/null +++ b/html/includes/jpgraph/docs/html/412WhatyouwillNOTlearninthischapter.html @@ -0,0 +1,39 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.1.2 What you will NOT learn in this chapter

+

+
    +
  1. Any details on how to generate graphs with the JpGraph library
  2. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/41Scopeofthischapter.html b/html/includes/jpgraph/docs/html/41Scopeofthischapter.html new file mode 100644 index 0000000000..fe9f53a483 --- /dev/null +++ b/html/includes/jpgraph/docs/html/41Scopeofthischapter.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.1 Scope of this chapter

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/421UsingtheJpGraphlibrarytosendbackimages.html b/html/includes/jpgraph/docs/html/421UsingtheJpGraphlibrarytosendbackimages.html new file mode 100644 index 0000000000..da2e4a53e6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/421UsingtheJpGraphlibrarytosendbackimages.html @@ -0,0 +1,55 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.2.1 Using the JpGraph library to send back images +

+

To get access to the JpGraph library you will need to include at + least two files, the base library and one or more of the plot + extensions. So for example to create a basic line plot the top of your + PHP file must have the lines:

+   +
include ( +'jpgraph.php'); +
include (
'jpgraph_line.php' +); +
... +
 
// Code that uses the jpgraph library +
...
+

+

+

Note: You might also use the PHP directive + require. The difference is subtle in that include will only include + the code if the include statement is actually executed. While require() + will always be replaced by the file specified. See PHP documentation + for further explanation. For most practical purposes they are + identical.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/42HowtogenerateimageswithPHP.html b/html/includes/jpgraph/docs/html/42HowtogenerateimageswithPHP.html new file mode 100644 index 0000000000..a57ab7762a --- /dev/null +++ b/html/includes/jpgraph/docs/html/42HowtogenerateimageswithPHP.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.2 How to generate images with PHP

+

As a general rule each PHP script which generates an image must be + specified in a separate file which is then called in an HTML <IMG> tag. + For example, the following HTML excerpt includes the image generated by + the PHP script in "fig1.php".

+

<img src="fig1.php"  +border=0 align=center width +=300 height=200> +

+

+

Strictly speaking the "align", "width" and "height" are not + necessary but helps the browser position the image correctly before the + image has been fully sent back to the browser.

+

The library will automatically generate the necessary headers to be + sent back to the browser so that it correctly recognize the data stream + received as an image of either PNG/GIF/JPEG format. The browser can + then correctly decode the image

+

Observe that you can't return anything else than an + image from the image script. By definition each HTML page (or more + correctly each HTTP stream) can only consist of one mime type which is + determined by the header for that particular stream.

+

A common mistake is to have a space in the beginning of the image + script which the HTTP server will send back to the browser. The browser + now assumes that the data coming back from this script is text since it + hasn't received an explicit header. When then the image headers get + sent back to the browser to forewarn the browser of the forthcoming + image the browser will not like that as it has already assumed the data + stream was a text stream. The browser will then give the infamous + "Headers already sent error".

+

To include several images together with text on a page you need to + have a parent page with several <IMG> tags which each refers to an + image script (or the same image script with GET/POST data).

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/43UsingPHPdirectly.html b/html/includes/jpgraph/docs/html/43UsingPHPdirectly.html new file mode 100644 index 0000000000..69279be063 --- /dev/null +++ b/html/includes/jpgraph/docs/html/43UsingPHPdirectly.html @@ -0,0 +1,62 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.3 Using PHP directly

+

It is also possible to generate images directly using the command + line version of PHP. This works the same way as the normal "through the + browser" generation with the exception that no HTTP headers will be + generated. Only the binary image data.

+

Please make sure that you run the command line version of PHP (cli). + Using the CGI SAPI version will not work since then the HTTP headers + will be generated. Note: If the CGI version is used the generation of + headers may be suppressed by the '-q' option.

+

You can easily check the version installed by running

+
php --version
+

you should then get a response with something like

+
+PHP 4.3.8 (cli) (built: Aug 29 2004 22:48:10)
+Copyright (c) 1997-2004 The PHP Group
+Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
+
+

The important thing here is the

+
(cli)
+

marker. The JpGraph library check from what SAPI API it is invoked + from and adjusts the header generation accordingly.

+

If all the above requirements are met then images can be generated + directly on the command line and stored in a suitable file. For example + by

+
+$> php myimage.php > image.png
+
+

Please note that the file extension on the image file must match the + format in which the image is generated.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/44ThebasicprincipleofJpGraphandthecreationofimages.html b/html/includes/jpgraph/docs/html/44ThebasicprincipleofJpGraphandthecreationofimages.html new file mode 100644 index 0000000000..d7c4b4c100 --- /dev/null +++ b/html/includes/jpgraph/docs/html/44ThebasicprincipleofJpGraphandthecreationofimages.html @@ -0,0 +1,130 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.4 The basic principle of JpGraph and the creation of + images

+

The common pattern for creating graphs is

+
    +
  1. Create a script that constructs the image, type, colors size and so + on.
  2. +
  3. A wrapper script which contains one or more <IMG> tags to position + the graphs on the proper HTML page.
  4. +
+

Of course it is of perfectly possible to call the image script + directly in the browser to just display the generated image in the + browser.

+

You should remember that it is also possible to pass arguments to + the image script via the normal HTTP GET/POST arguments. For example

 <img src +="showgraph.php?a=1&b=2" +>

+

This could for example be used to control the appearance of the + image or perhaps send data to the image which will be displayed. Note + that this is probably not the best way to send large amount of data to + plot. Instead the only practical way, for large data sizes, is to get + all the data in the image script, perhaps from a DB. Another + alternative for large amount of data to be sent to the image script is + by creating a POST request to the image script.

+Note: Forcing the browser to update your image Some browser + may not send back a request to the web browser unless the user presses + "Refresh" (F5 - in most browsers). This can lead to problems that the + user is seeing old data. A simple trick is to add a dummy time argument + which is not used in the script. For example +
+echo '<img src="myimagescript.php?dummy='.now().'">';
+
+ It is also important to be aware of any internal caching the browser + might do. The general problem with dynamically generated images is that + the image generating script (file) remains the same. This makes the + browser believe that the data hasn't changed and if the browser already + has issues a previous GET request and has the data cached it will not + send a new GET if the timestamp on the file is the same since it then + believes it my use the old cached version.

+

When it comes to the structure of your imaging script they will + generally have the structure

+   +// ... Include necessary headers +
+
$graph  += new Graph($width, +$height, ...); +
+
+// ... code to construct the graph details +
+
$graph->Stroke(); +

+

JpGraph is completely Object oriented so all calls will be action on + specific instances of classes. One of the fundamental classes is the + Graph() class which represents the entire graph.

+

After the creation of the Graph() object all the code lines to + construct the details of the graph are added.

+

The final method called in an image script will most likely be the + Graph::Stroke() method. This will send the constructed image back + to the browser. A variation of this is used if the graph are supposed + to have image maps. In that case the final method will be + Graph::StrokeCSIM()

+

In addition to this standard usage pattern you can also choose to

+ +

The cache system, which lessens the burden of the PHP server, works + by avoiding o run all the code that follows the initial Graph() call by + checking if the image has already been created and in that case + directly send back the previously created (and stored in a file) image + to the browser. When using the cache system a filename must be + specified in the initial Graph() call which is used to store the image + in the cache system and possibly also a timeout value to indicate how + long the image in the cache directory should be valid.

+

In many of the examples in this manual the following pattern will be + used

+ $graph = new  +Graph(300,200 +,"auto");

+

The two first parameters specify the width and height of the graph + and the third parameter the name of the image file in the cache + directory. The special name 'auto' indicates that the image file + will be given the same name as the image script but with the extension + changed to indicate the graphic format used, i.e '.jpg', '.png' and so + on.

+

Please note that the cache system by default is disabled and must be + enabled by setting the proper define in the file "jpg-config.inc.php"

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/45ChoosingtheimageformatforJpGraph.html b/html/includes/jpgraph/docs/html/45ChoosingtheimageformatforJpGraph.html new file mode 100644 index 0000000000..f8d532663c --- /dev/null +++ b/html/includes/jpgraph/docs/html/45ChoosingtheimageformatforJpGraph.html @@ -0,0 +1,58 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.5 Choosing the image format for JpGraph

+

By default JpGraph automatically chooses the image format to use in + the order PNG, JPEG and GIF. The exact format depends on what is + available on your system. There are two ways you can influence the way + the graphic format is chosen.

+
    +
  1. Change the default graphic format by changing the DEFINE
    +  DEFINE +("DEFAULT_GFORMAT" +,"auto");
    +

    +
  2. +
  3. Set the graphic format in your script by calling the method + SetImgFormat() For example, to force your script to use JPEG in one + specific image use
     $graph-> +img-> +SetImgFormat( +"jpeg") +
    +

    +
  4. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/46Alternativestostreamingbacktheimage.html b/html/includes/jpgraph/docs/html/46Alternativestostreamingbacktheimage.html new file mode 100644 index 0000000000..bca03a6d67 --- /dev/null +++ b/html/includes/jpgraph/docs/html/46Alternativestostreamingbacktheimage.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.6 Alternatives to streaming back the image

+

If you like to save the image directly to a file instead of + streaming it back to the browser then you just have to specify an + absolute filename in the final call to Graph::Stroke(), i.e.

+

+ $graph-> +Stroke( +"/usr/home/peter/images/result2002.png");

+

+

Please note that the user running as Apache/PHP must have write + access to the specified directory.

+

There are also two predefined filenames which have special meaning.

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/471InstallingTrueTypefonts.html b/html/includes/jpgraph/docs/html/471InstallingTrueTypefonts.html new file mode 100644 index 0000000000..68e50adf19 --- /dev/null +++ b/html/includes/jpgraph/docs/html/471InstallingTrueTypefonts.html @@ -0,0 +1,52 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.7.1 Installing TrueType fonts

+

Since Internally TrueType fonts are rendered by locating a font + specification file you must install the accompanying TrueType fonts in + directory of your choice. You must then tell JpGraph where these fonts + may be found by specifying the font-path in the FONT_PATH define (in + jpg-config.inc.php). Please note that this must be the absolute file + path and not relative to the htdocs directory. By default the path is + set to

+ DEFINE( +"TTF_DIR", +"/usr/local/fonts/ttf/"); +

+

Since JpGraph must be able to tell the difference between the italic + and bold versions of the same font family a standard naming convention + is used to name the files. The available fonts are also defined by + DEFINES and hence you can't just copy your own TTF files to the + directory and expect it to work. At the moment there is no "easy" way + to add new fonts but to make some (small) mods to the code. However + this is expected to change in future version of JpGraph.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/472VerifyingthattheTTFfontswork.html b/html/includes/jpgraph/docs/html/472VerifyingthattheTTFfontswork.html new file mode 100644 index 0000000000..6ca845e4b1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/472VerifyingthattheTTFfontswork.html @@ -0,0 +1,90 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.7.2 Verifying that the TTF fonts work

+

In order to get TTF fonts working with JpGraph you should first + check that the following pure GD scripts work correctly. Please adjust + the font path according to your installation.

+  DEFINE +("TTF_DIR","/usr/X11R6/lib/X11/fonts/truetype/" +);  +
+
$im imagecreatetruecolor (400 +100);  +
$black imagecolorallocate ($im +000 +);  +
$white imagecolorallocate ($im +255255255 +);  +
+
imagerectangle +($im,0, +0,399,99 +,$black);  +
imagefilledrectangle +($im,0, +0,399,99 +,$white);  +
+
imagettftext  +($im30 +01040 +, $blackTTF_DIR. +"arial.ttf" +"Hello World!");  +
+
header ("Content-type: image/png" +);  +
imagepng ($im); +

+

The above script assumes you have the GD2 library and will create an + image with the classical "Hello World!" text printed in black.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/473Specifyingfonts.html b/html/includes/jpgraph/docs/html/473Specifyingfonts.html new file mode 100644 index 0000000000..f0e4679059 --- /dev/null +++ b/html/includes/jpgraph/docs/html/473Specifyingfonts.html @@ -0,0 +1,105 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.7.3 Specifying fonts

+

All graph objects that uses text allows you to specify the font to + be used by calling the SetFont() method and specifying three parameters

+
    +
  1. Font family, Specified with a FF_ define
  2. +
  3. Font style, Specified with a FS_ define
  4. +
  5. Font size, Numeric value (only used for TTF fonts)
  6. +
+

For the builtin fonts the third, size, parameter is ignored since + the size is fixed for the three builtin fonts. The available font + families and the corresponding name (in JpGraph 1.7) are listed in the + table below.

+

+ + + + + + + + + + + + + + + + + + + +
Font familyTypeNote
FF_FONT0Builtin fontA very small font, only + one style
FF_FONT1Builtin fontA medium sized font
FF_FONT2Builtin fontThe largest bit mapped + font
FF_ARIALTTF fontArial font
FF_VERDANATTF fontVerdana font
FF_COURIERTTF fontFix pitched courier
FF_BOOKTTF fontBookman
FF_COMICTTF fontComic sans
FF_TIMESTTF fontTimes New Roman
FF_GEORGIATTF fontGeorgia
FF_TREBUCHETTF fontTrebuche
FF_VERATTF fontGnome Vera font, Available from + http://www.gnome.org/fonts/
FF_VERAMONOTTF fontGnome Vera Mono font, + Available from http://www.gnome.org/fonts/
FF_VERASERIFTTF fontGnome Vera Serif font, + Available from http://www.gnome.org/fonts/
FF_CHINESETTF fontInstalled chinese font
FF_SIMSUNTTF fontInstalled chinese font
FF_BIG5TTF fontInstalled Chinese BIG5 font + (needs iconv())
+

Please note that not all font families support all styles. The + figure below illustrates each of the available font families and what + styles you may use.

+
+
Figure 1: Illustration of some of the available fonts in + JpGraph [src] +  +

+

+

+

We finally show some example of valid font specifications

+  $graph +->title->SetFont( +FF_FONT2); +
$graph->title-> +SetFont( +FF_FONT2, +FS_BOLD); +
$graph->title-> +SetFont( +FF_ARIAL); +
$graph->title-> +SetFont( +FF_ARIAL, +FS_BOLD,24);
+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/474AddingadditionalfontstoJpGraph.html b/html/includes/jpgraph/docs/html/474AddingadditionalfontstoJpGraph.html new file mode 100644 index 0000000000..8faa600728 --- /dev/null +++ b/html/includes/jpgraph/docs/html/474AddingadditionalfontstoJpGraph.html @@ -0,0 +1,50 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.7.4 Adding additional fonts to JpGraph

+

Note: This information is only given here for very + advanced users. No free support will be given in the case you run into + difficulties trying to add new fonts. At the moment adding new fonts + require code modifications as outlined below.

+

In order to add you favorite fonts there are three steps you need to + follow :

+
    +
  1. Define a new "FF_" constant naming your font family with a suitable + high index number
  2. +
  3. Get the TTF file(s) and add it to your font directory. You need + separate files for each of the styles you want to support. You then + need to add the file names of the font as definitions in the class TTF. + Use the previous defined "FF_" name as index in the font specification + array.
  4. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/475UnderstandingtextalignmentinJpGraph.html b/html/includes/jpgraph/docs/html/475UnderstandingtextalignmentinJpGraph.html new file mode 100644 index 0000000000..7a730d5be0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/475UnderstandingtextalignmentinJpGraph.html @@ -0,0 +1,57 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.7.5 Understanding text alignment in JpGraph

+

For everyday use of JpGraph understanding of the alignment of text + strings in not necessary. However, if you like to add arbitrary strings + to the graph (with Graph::AddText()) or when working directly on a + canvas it will help understand this.

+

Text is added to a graph with the creation of a +Text() object. And the alignment is specified with +Text::Align() Text alignment might actually be a misguiding name. + What you specify is rather the anchor point for the text, i.e. when you + specify that a text should be positioned at position (x,y) how + is that coordinate to be interpretated.

+

The image below shows a text string aligned in the 9 possible + combinations. In the image the red crosses indicate what coordinate + that text string was positioned at. The alignment used for each of the + cases is shown below.

+
+
Figure 2: Specifying alignment (anchor-point) for text + strings [src] +  +

+

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/47WorkingwithfontsinJpGraph.html b/html/includes/jpgraph/docs/html/47WorkingwithfontsinJpGraph.html new file mode 100644 index 0000000000..0b09b19662 --- /dev/null +++ b/html/includes/jpgraph/docs/html/47WorkingwithfontsinJpGraph.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.7 Working with fonts in JpGraph

+

JpGraph supports both a set of built in bit-mapped fonts as well as + True Type Fonts. For scale values on axis it is strongly recommended + that you just use the built in bitmap fonts for the simple reason that + they are, for most people, easier to read (they are also quicker to + render). Try to use TTF only for headlines and perhaps the title for a + graph and it's axis. By default the TTF will be drawn with + anti-aliasing turned on.

+

In many of the example you can see examples of both TrueType and + Bitmap fonts.

+

There are a number of subtle differences in the way builtin fonts + and TrueType fonts are rendered to the screen. However, JpGraph, + abstracts away 99.9% of the differences so it will be, for the user, + completely transparent to switch between the different fonts.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/481Adjustingthetransparency.html b/html/includes/jpgraph/docs/html/481Adjustingthetransparency.html new file mode 100644 index 0000000000..8f6c68d632 --- /dev/null +++ b/html/includes/jpgraph/docs/html/481Adjustingthetransparency.html @@ -0,0 +1,54 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.8.1 Adjusting the transparency

+

From version 1.10 JpGraph also supports the use of Alpha Blending + together with GD2.x This lets you specify how much of the underlying + color should be visible. You specify the amount of transparency for a + color by adding an extra parameter to the color specification separated + by an '@' (at) character.

+

For example to specify a red color which is 40% transparent you + write

+ SetColor( +"red@0.4"); +

+

or to specify 90% transparancy you write

+  SetColor +("red@0.9");

+

Below is an example of how a bar graph with a background image can + make use of transparency + +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/482Availablenamedcolors.html b/html/includes/jpgraph/docs/html/482Availablenamedcolors.html new file mode 100644 index 0000000000..45c45f70d4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/482Availablenamedcolors.html @@ -0,0 +1,39 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.8.2 Available named colors

+

The chart below shows all available named colors. +
+
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/483Themecolorsforpies.html b/html/includes/jpgraph/docs/html/483Themecolorsforpies.html new file mode 100644 index 0000000000..0079440537 --- /dev/null +++ b/html/includes/jpgraph/docs/html/483Themecolorsforpies.html @@ -0,0 +1,45 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.8.3 Theme colors for pie's

+

For more on how to use the different themes to set the colors of Pie + plots please refer to "Working with 2D & 3D pie plots"

+

+
Theme 1: Earth

+

+
Theme 2: Pastel

+

+
Theme 3: Water

+

+
Theme 4: Sand

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/48SpecifyingcolorsinJpGraph.html b/html/includes/jpgraph/docs/html/48SpecifyingcolorsinJpGraph.html new file mode 100644 index 0000000000..4231074307 --- /dev/null +++ b/html/includes/jpgraph/docs/html/48SpecifyingcolorsinJpGraph.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4.8 Specifying colors in JpGraph

+

Colors can be specified in three different ways

+
    +
  1. By using one of the, roughly, 400 pre-defined color names, e.g
    +  SetColor +("khaki");
    +

    A named color can also be modified by adding a adjustment factor. An + adjustment factor, 0 < f < 1, a smaller value will give a darker + version and a value of 0 or 1 will return the original color. A value > + 1 will make the color brighter. A few examples

    +  SetColor +("khaki:0.5" +); // A darker version of "khaki" +
    SetColor("yellow:1.2");  +// A slightly lighter version of "yellow" +

    +

    +
  2. +
  3. By specifying a RGB triple, e.g.
    +  SetColor(array(65, +100,176));
    +

    +
  4. +
  5. By specifying the color as a hex string value
    +  SetColor +("#A16BFF");
    +

    +
  6. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/4QuickStartDynamicImageGeneration.html b/html/includes/jpgraph/docs/html/4QuickStartDynamicImageGeneration.html new file mode 100644 index 0000000000..c8d13a407b --- /dev/null +++ b/html/includes/jpgraph/docs/html/4QuickStartDynamicImageGeneration.html @@ -0,0 +1,44 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

4 Quick Start: Dynamic Image Generation

+

The purpose of this chapter is to put dynamic image generation in + perspective and illustrate how HTML tags is used to call image + generating scripts. Even if You are familiar with PHP it is strongly + recommended to quickly browse through this chapter to make sure all + concepts are known.

+

If You fully understand and can explain the concept of MIME types, + HTTP streams and why the "Headers already sent error" error is very + common when generating dynamic images with PHP it is probably safe to + skip this chapter. Otherwise it might be wise to read through this + chapter once.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/51Enablingthecachesystem.html b/html/includes/jpgraph/docs/html/51Enablingthecachesystem.html new file mode 100644 index 0000000000..684b39559c --- /dev/null +++ b/html/includes/jpgraph/docs/html/51Enablingthecachesystem.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

5.1 Enabling the cache system

+

The enabling disabling of the cache system is controlled by two + defines (in jpg-config.php)

+

+ DEFINE( +"USE_CACHE", +true); +
DEFINE("READ_CACHE", +true)
+

+

+

The first of these, USE_CACHE, is the master-switch which must be + set to true to enable the caching system. The second switch READ_CACHE + very seldom needs to be changed.

+

This second switch basically tells whether or not JpGraph should + ever look in the cache. Setting this to false and the master-switch to + true would then always generate an new updated image file in the cache + and this new image would be send back to the browser. The main use for + this (admittedly) strange setting is if you like to have the side + effect of the script that a fresh image is always stored in the cache + directory.

+

Once you have enabled the cache you must also make sure that a valid + cache directory is setup. The cache directory is specified with the + define

+

+ DEFINE( +"CACHE_DIR", +"/tmp/jpgraph_cache/"); +

+

+

You can of course change the default directory to whatever directory + you fancy. But, you must remember one important thing. The + cache directory must be writable for the user running Apache/PHP +.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/51Thespecialprodlocale.html b/html/includes/jpgraph/docs/html/51Thespecialprodlocale.html new file mode 100644 index 0000000000..932ba67be9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/51Thespecialprodlocale.html @@ -0,0 +1,43 @@ + + + + + + + + + + + +Contents +Previous +Next +
+ +

5.1 The special "prod" locale

+ Since error messages are really meant for developers and are on a quite + detailed technical level. For end users in a production setting this is + often not wanted. Instead it is common to give a generic error message + that the user needs to contact the IS support. +

For this reason one of the resource files included is the special + language "prod" which is meant to be used in a production site where to + give a generic error message. The generic error message can be tailored + by changing a define in the prod locale resource file.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/52Includedlocalizederrormessages.html b/html/includes/jpgraph/docs/html/52Includedlocalizederrormessages.html new file mode 100644 index 0000000000..ed57557463 --- /dev/null +++ b/html/includes/jpgraph/docs/html/52Includedlocalizederrormessages.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

5.2 Included localized error messages

+ As of version 1.20.4 the following locales are available + + All resource files are named according to the ISO locale name with an + extension of ".inc.php"
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/52Usingthecacheinyourscript.html b/html/includes/jpgraph/docs/html/52Usingthecacheinyourscript.html new file mode 100644 index 0000000000..5abd496d53 --- /dev/null +++ b/html/includes/jpgraph/docs/html/52Usingthecacheinyourscript.html @@ -0,0 +1,75 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

5.2 Using the cache in your script

+

To use caching in your script you must supply a suitable file name + which will be used to store the image in the cache. You can also supply + a timeout value indicating how many minutes the cached image should be + considered valid.

+

These parameters are supplied in the initial Graph() method call + which should be among the first in your script. Instead of manually + specifying a file name to be used you could often use the special name + "auto". If the filename is specified as "auto" the cashed image will + then be named the same as the image script but with the correct + extension depending on what image format have been chosen.

+

If you don't specify a file name no caching will be used no matter + the settings of USE_CACHE (without a file name it is impossible!)

+

The following call to Graph() shows a typical use of the cache.

+

+ $graph = new  +Graph(300,200 +,"auto",60) +

+

+

The above code will use the automatic filename and a make the cache + valid for 60 minutes.

+

So, how does this all work now?

+

The first time you call your script (no cached image) everything + will be as usual, the script will run and you will in the end send back + the image to the browser. However if you have the caching enabled + JpGraph will automatically have stored a copy of the generated image in + the cache directory.

+

The next time you call the script the first thing that happens in + the initial Graph() is that it will go and check in the cache directory + if the named image exists there. If this is the case it will also + checks that the image isn't too old (as compared to the specified + timeout value). If the image is valid then the image will be streamed + straight back from the image file to the browser and the script will + end it's execution.

+

Hence, if the image is found in the cache no code lines + after the initial Graph() call will be executed

+

The design decision behind this is that your image script code never + has to include anything special to make full use of the cache. It will + just automatically work.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/53Creatingyourownlanguageresourcefile.html b/html/includes/jpgraph/docs/html/53Creatingyourownlanguageresourcefile.html new file mode 100644 index 0000000000..de6d3cd2cf --- /dev/null +++ b/html/includes/jpgraph/docs/html/53Creatingyourownlanguageresourcefile.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+ +

5.3 Creating your own language resource file

+ All error messages are stored in an array with a specific index that + cannot be changed. This index is used in the library to reference a + specific error message. Since error messages can also have additional + parameters the error messages also includes count that specifies how + many arguments can be handled. +

The arguments are formatted in the error text in the same way as + parameters in the printf() family of functions.

+

To create your own localized error resource file You should copy the + "en.inc.php" to a temporary file, rename it for localem and then + translate each error message to Your language of choice. Make sure the + file is stored under the lang/ catalogue and You are ready to use your + new locale.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/53UsingthecachewithClientSideImageMaps.html b/html/includes/jpgraph/docs/html/53UsingthecachewithClientSideImageMaps.html new file mode 100644 index 0000000000..873b6c0862 --- /dev/null +++ b/html/includes/jpgraph/docs/html/53UsingthecachewithClientSideImageMaps.html @@ -0,0 +1,108 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

5.3 Using the cache with Client Side Image Maps

+

You can also use the cache system for CSIM as well. The cache system + interface is slightly different in this case since the cache needs to + store both the cached image and the cached image-map. + It also needs to change due to the way CSIM HTML paradigm work. The two + major differences from the "standard" cache is

+
    +
  1. The cached version will not be stored in the + previous defined cache directory. See more below.
  2. +
  3. You must call an extra method, CheckCSIMCache(), to check the + cache, see more below.
  4. +
+

+

The performance benefits even for simple CSIM images is around 50% + if the cache can be used and can of course be several 1000% if + construction of the image requires DB calls and other complex + operations which can be avoided.

+

Before reading further you should have an understanding on how the + CSIM works by reading the section "sing Client side image maps".

+

Please remember that when using CSIM you must end your script with a + call to Graph::StrokeCSIM() method instead of the +Graph::Stroke() used for non-csim.

+

To use the cache with CSIM you have to call the +Graph::CheckCSIMCache(). As with the caching for non-CSIM you have + to supply a name to be used for the cached version as well as an + optional timeout value. The default timeout value if nothing else is + specified is 60 minutes.

+

The name argument requires some more explanations. You must specify + a relative name here. For example "myimage" or perhaps + "firstpage/image3". Depending on your installation of JpGraph this will + now end up in the directory specified in the CSIMCACHE_DIR define. This + must also be a directory accessible by the normal web server. By + default a directory called "csimcache" will be created in the same + directory as the image script itself.

+

This has the drawback that the directory from where the script is + executed must be writable by the process running PHP. Best practice for + this is to keep the number of writable directory for PHP down to a + minimum and re-use the same directory as is used for the standard + cache. This however, require that your system administrator setup that + cache directory so that it also accessible by the HTTP server from the + htdocs root.

+

The CheckCSIMCache() method checks the cache for an existing cached + version and if found it returns it and halts execution of the script. + So, this call should be the first call after the creation of the + Graph() and before any heavy work is done to create the image so that + you can minimize the execution of the script in the case a match is + found.

+

So, the general structure of a script that uses CSIM and the cache + is

+ $graph = new  +Graph(400,300 +); +
+
// Check cache, 10 min timeout +
$graph->CheckCSIMCache( +"image1",10); +
+
+// !! If cached version exists, execution halts here !! +
+
// +
// ... Construct the image with heavy DB calls etc, etc +
// +
+
$graph->StrokeCSIM(); +

+

Please note that you do not need to pass any + argument to the final call to StrokeCSIM() as you do when not using the + cache.

Note: The CSIM caching works by storing + two files in the cache directory. One file being the image and the + other file being the corresponding image map as a pure HTML file.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/54Somefinalcomments.html b/html/includes/jpgraph/docs/html/54Somefinalcomments.html new file mode 100644 index 0000000000..5b3caf1ce4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/54Somefinalcomments.html @@ -0,0 +1,45 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

5.4 Some final comments

+

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/551Clipping.html b/html/includes/jpgraph/docs/html/551Clipping.html new file mode 100644 index 0000000000..9ef479c105 --- /dev/null +++ b/html/includes/jpgraph/docs/html/551Clipping.html @@ -0,0 +1,43 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

5.5.1 Clipping

+

By default all plots are clipped outside the plot area. This means + that if you manually specify a scale and then try to plot which has + values smaller/larger than the scale those values will not show.

+

The clipping algorithm is "perfect" in the sense that for example + line plots where the plot area cuts the line between two data points + the line will be drawn up to the edge of the plot area. The algorithm + used is O(1) in number of data points.

+

The disabling/enabling of clipping manually is controlled by +Graph::SetClipping()

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/552Commonlyusedproperties.html b/html/includes/jpgraph/docs/html/552Commonlyusedproperties.html new file mode 100644 index 0000000000..cd484d3f56 --- /dev/null +++ b/html/includes/jpgraph/docs/html/552Commonlyusedproperties.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

5.5.2 Commonly used properties

+

+
    +
  1. Each graph can have three titles accessed through the properties + 'Graph::title', ''Graph::subtitle' and ''Graph::subsubtitle'
  2. +
  3. Each graph have a legend accessed through the 'Graph::legend' + property
  4. +
  5. Each graph can have a left, center and right footer accessed + through 'Graph::footer::left','Graph::footer::center' and + 'Graph::footer::right'
  6. +
  7. You access the axis through 'Graph::xaxis', 'Graph::yaxis' and + 'Graph::y2axis'
  8. +
  9. You access the grids through 'Graph::xgrid', 'Graph::ygrid' and + 'Graph::y2grid'
  10. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/553Commonlyusedmethods.html b/html/includes/jpgraph/docs/html/553Commonlyusedmethods.html new file mode 100644 index 0000000000..ece82b688a --- /dev/null +++ b/html/includes/jpgraph/docs/html/553Commonlyusedmethods.html @@ -0,0 +1,54 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

5.5.3 Commonly used methods

+

+
    +
  1. You add plot objects (bar plots, pie plots, texts, bands, lines + etc) with the 'Graph::Add() method.
  2. +
  3. Each graph can have a specified margin set by 'Graph::SetMargin()'
  4. +
  5. Each graph can have a fill color in the plot area + 'Graph::SetColor()'
  6. +
  7. The plot areas may have a box around it 'Graph::SetBox()'
  8. +
  9. Each graph can have a specified margin color + 'Graph::SetMarginColor()'
  10. +
  11. Each graph can have a frame or not 'Graph::SetFrame()'
  12. +
  13. Each graph can have a specified drop shadow 'Graph::SetShadow()'
  14. +
  15. The grid lines can be either behind or in front of the plots + 'Graph::SetGridDepth()'
  16. +
  17. The plot can be rotated an arbitrary angle with 'Graph::SetAngle()'
  18. +
  19. You can add a background image with 'Graph::SetBackgroundImage'
  20. +
  21. You can change the overall appearance of the axis with + 'Graph::SetAxisStyle'
  22. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/55Commonfeatureforallgraphs.html b/html/includes/jpgraph/docs/html/55Commonfeatureforallgraphs.html new file mode 100644 index 0000000000..0a97ebbdb0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/55Commonfeatureforallgraphs.html @@ -0,0 +1,36 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

5.5 Common feature for all graphs

+

This is a summary of the available feature for all Graph based + charts, i.e. line plots, error plots, scatter plots, etc.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/5Localizingerrormessages.html b/html/includes/jpgraph/docs/html/5Localizingerrormessages.html new file mode 100644 index 0000000000..1d0b5355e1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/5Localizingerrormessages.html @@ -0,0 +1,52 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

5 Localizing error messages

+

The library has a quite extensive set of error messages to give + hints and catch erroneous input to many of the controlling methods and + also do sanity check on the data to be plotted.

+

All error messages are collected in resource files which are + localized to a specific language. All resource files are located under + the "lang/" directory in the JpGraph installation directory. The + deafult locale to be used is defined in the configuration file with the + setting DEFAULT_ERR_LOCALE in the distribution this is set to English + locale.

+

The chosen locale is specified in the beginning of the script with a + call to the static method JpGraphError::SetErrLocale(). The + argument to this method is the ISO naming of the country/language to be + selected. For example to enable the special production locale the + following line should be added in the beginning of the script

+
+JpGraphError::SetErrLocale('prod');
+
+ If an unknown or unsupported locale is given the error message will + default to English.
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/5UnderstandingtheJpGraphcachingsystem.html b/html/includes/jpgraph/docs/html/5UnderstandingtheJpGraphcachingsystem.html new file mode 100644 index 0000000000..f9b23754a4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/5UnderstandingtheJpGraphcachingsystem.html @@ -0,0 +1,44 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

5 Understanding the JpGraph caching system

+

To reduce load on the web server JpGraph implements an advanced + caching system which avoids the burden of always having to run the full + image script.

+

Depending on the complexity of the image script (for example if it + is doing several DB lookups) this could significantly improve + performance.

+

The rationale behind this is of course performance, and the + observation that very few graphs are really real-time, i.e. needs to be + updated absolutely every time the graphing script is called.

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/61Enablingthecachesystem.html b/html/includes/jpgraph/docs/html/61Enablingthecachesystem.html new file mode 100644 index 0000000000..9f5e43aa11 --- /dev/null +++ b/html/includes/jpgraph/docs/html/61Enablingthecachesystem.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.1 Enabling the cache system

+

The enabling disabling of the cache system is controlled by two + defines (in jpg-config.php)

+

+ DEFINE( +"USE_CACHE", +true); +
DEFINE("READ_CACHE", +true)
+

+

+

The first of these, USE_CACHE, is the master-switch which must be + set to true to enable the caching system. The second switch READ_CACHE + very seldom needs to be changed.

+

This second switch basically tells whether or not JpGraph should + ever look in the cache. Setting this to false and the master-switch to + true would then always generate an new updated image file in the cache + and this new image would be send back to the browser. The main use for + this (admittedly) strange setting is if you like to have the side + effect of the script that a fresh image is always stored in the cache + directory.

+

Once you have enabled the cache you must also make sure that a valid + cache directory is setup. The cache directory is specified with the + define

+

+ DEFINE( +"CACHE_DIR", +"/tmp/jpgraph_cache/"); +

+

+

You can of course change the default directory to whatever directory + you fancy. But, you must remember one important thing. The + cache directory must be writable for the user running Apache/PHP +.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/61Thebasicstructureofanimagemapscript.html b/html/includes/jpgraph/docs/html/61Thebasicstructureofanimagemapscript.html new file mode 100644 index 0000000000..a774622ea1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/61Thebasicstructureofanimagemapscript.html @@ -0,0 +1,66 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.1 The basic structure of an image map script

+

The standard structure for an HTML page using client side image maps + would be something along the lines of

+

+
+// Image map specification with name "mapname"
+<MAP NAME=...>
+... specification ...
+</MAP>
+
+// Image tag
+<img src="..." ISMAP USEMAP="mapname">
+
+

This poses an interesting question.

+

Since we normally call the graphing script directly in the <img> tag + how do we get hold of the image map (which is available only in the + image script) in this "HTML wrapper" script?

+

In JpGraph there is actually two ways of solving this.

+
    +
  1. Use the preferred "builtin" way using the modified Stroke() method + Graph::StrokeCSIM() instead of the standard Graph::Stroke() method.
  2. +
  3. Directly use the Graph::GetHTMLImageMap() which gives you fine + control at the expense of more complex coding.
  4. +
+

The first (and preferred) way modifies the stroke method so that + instead of returning an image (like the standard Stroke() method) + StrokeCSIM() actually returns an HTML page containing both the image + map specification and the correct <IMG> tag.

+

This of course means that it is necessary to treat an image map + returning image script differently from a non-CSIM image script, for + example you can't use it directly as the target for the "src" attribute + of the <IMG> tag since it sends back an actual HTML page containing + both an image tag together with an image map.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/62Specifyingtargetsforimagemapplots.html b/html/includes/jpgraph/docs/html/62Specifyingtargetsforimagemapplots.html new file mode 100644 index 0000000000..83c7bc923f --- /dev/null +++ b/html/includes/jpgraph/docs/html/62Specifyingtargetsforimagemapplots.html @@ -0,0 +1,60 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.2 Specifying targets for image map plots

+

To turn a standard image script into a CSIM script the first thing + needed to do is to supply the appropriate URL targets for the hotspots + in the image.

+

What the hotspots represent depends on the type of plot you are + doing. The following plot types and graph areas support image maps.

+ +

To specify a link for each hotspot you have to use the + SetCSIMTargets() method for each plot (or specific area) in the + graph which should be a hotspot.

+

There are two arguments to this method

+
    +
  1. $aTargets, an array of valid URL targets. One URL per hot spot, for + example if you have a 10 values bar plot you need 10 URLs. If the + SetCSIMTarget() is applied to, for example, a text then of course only + one URL target should be specified.
  2. +
  3. $aAlts, an array of valid alt-texts. Many browsers (but not all) + will show this text string if the mouse hovers over a hotspot.
  4. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/62Usingthecacheinyourscript.html b/html/includes/jpgraph/docs/html/62Usingthecacheinyourscript.html new file mode 100644 index 0000000000..5ea2b399a6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/62Usingthecacheinyourscript.html @@ -0,0 +1,75 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.2 Using the cache in your script

+

To use caching in your script you must supply a suitable file name + which will be used to store the image in the cache. You can also supply + a timeout value indicating how many minutes the cached image should be + considered valid.

+

These parameters are supplied in the initial Graph() method call + which should be among the first in your script. Instead of manually + specifying a file name to be used you could often use the special name + "auto". If the filename is specified as "auto" the cashed image will + then be named the same as the image script but with the correct + extension depending on what image format have been chosen.

+

If you don't specify a file name no caching will be used no matter + the settings of USE_CACHE (without a file name it is impossible!)

+

The following call to Graph() shows a typical use of the cache.

+

+ $graph = new  +Graph(300,200 +,"auto",60) +

+

+

The above code will use the automatic filename and a make the cache + valid for 60 minutes.

+

So, how does this all work now?

+

The first time you call your script (no cached image) everything + will be as usual, the script will run and you will in the end send back + the image to the browser. However if you have the caching enabled + JpGraph will automatically have stored a copy of the generated image in + the cache directory.

+

The next time you call the script the first thing that happens in + the initial Graph() is that it will go and check in the cache directory + if the named image exists there. If this is the case it will also + checks that the image isn't too old (as compared to the specified + timeout value). If the image is valid then the image will be streamed + straight back from the image file to the browser and the script will + end it's execution.

+

Hence, if the image is found in the cache no code lines + after the initial Graph() call will be executed

+

The design decision behind this is that your image script code never + has to include anything special to make full use of the cache. It will + just automatically work.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/63UsingStrokeCSIM.html b/html/includes/jpgraph/docs/html/63UsingStrokeCSIM.html new file mode 100644 index 0000000000..1c16dd8c19 --- /dev/null +++ b/html/includes/jpgraph/docs/html/63UsingStrokeCSIM.html @@ -0,0 +1,107 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.3 Using StrokeCSIM()

+

The simplest way of creating a creating a CSIM image is with the + StrokeCSIM() method. As mentioned before this method actually returns a + (small) HTML page containing both the image-tag as well as the image + map specification. Hence it is not possible to use a script that + ends with this method in a standard image-tags src property.

+

There are two ways to create CSIM (or get hold of) the image maps

+
    +
  1. Use the CSIM image script as the target in a standard anchor + reference, for example +
    +<a href="mycsimscript.html">
    +
    +
    This has the drawback that the image page will only contain the + image and nothing else.
  2. +
  3. The other way will allow the image script to be included in an + arbitrary HTML page by just including the image script at the wanted + place in the HTML page using any of the standard "include" php + statement. For example +
    +<h2> This is an CSIM image </h2>
    +
    +<?php
    +include "mycsimscript.php"
    +?>
    +
    +
  4. +
+

Note: If there are several CSIM images on + the same page it is necessary to use "include_once" in the scripts for + the inclusion of "jpgraph.php" and the other jpgraph library files + since the files will be included multiple times on the same page and + one or more "Already defined error" will be displayed.

+

The process to replace Stroke() with StrokeCSIM() is strait forward. + Replace all existing calls to Stroke() with the equivalent calls to + StrokeCSIM().

+

The only difference is that it is necessary ti supply a minimum of + one file name in the StrokeCSIM() method. The first argument must be + the name of the actual image script file including the extension. So + for example if the image script is called "mycsimscript.php" it is + necessary to write +
 

+ $graph-> +StrokeCSIM( +'mycsimscript.php') +

+

+
However, it is possible to apply a small "trick" here. PHP maintain + a special variable called "__FILE__" which is always set to the current + file name. This means you could use the following construction:

+

+ $graph-> +StrokeCSIM( +basename( +__FILE__)) +

+

This is a better way since the script can now be renamed without + having to change any code in the file which otherwise would be needed.

Note: Why does the script name need to be used as + the first parameter? The reason is that in the creation of the HTML + page which is sent back we need to refer to the script in the image + tag. So why is it not possible to use the PHP_SELF reference? The + problem with PHP_SELF is that in the case where we include the + image-script in an HTML page and use the PHP_SELF we will get the name + of the HTML page and not the actual script in which the PHP_SELF is + used. We also can not use the __FILE__ trick in the library since in + the context __FILE__ is set to "jpgraph.php". Hence, this must be + specified by the client as shown above.

+

The other arguments to StrokeCSIM() are optional. Please note that + if several CSIM images are used in the same HTML page it is also + necessary to specify the image map name as the second parameter since + all image maps must be unique to properly match each image map against + each image. Please consult the class reference + StrokeCSIM() for more details.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/63UsingthecachewithClientSideImageMaps.html b/html/includes/jpgraph/docs/html/63UsingthecachewithClientSideImageMaps.html new file mode 100644 index 0000000000..4afe69583a --- /dev/null +++ b/html/includes/jpgraph/docs/html/63UsingthecachewithClientSideImageMaps.html @@ -0,0 +1,108 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.3 Using the cache with Client Side Image Maps

+

You can also use the cache system for CSIM as well. The cache system + interface is slightly different in this case since the cache needs to + store both the cached image and the cached image-map. + It also needs to change due to the way CSIM HTML paradigm work. The two + major differences from the "standard" cache is

+
    +
  1. The cached version will not be stored in the + previous defined cache directory. See more below.
  2. +
  3. You must call an extra method, CheckCSIMCache(), to check the + cache, see more below.
  4. +
+

+

The performance benefits even for simple CSIM images is around 50% + if the cache can be used and can of course be several 1000% if + construction of the image requires DB calls and other complex + operations which can be avoided.

+

Before reading further you should have an understanding on how the + CSIM works by reading the section "sing Client side image maps".

+

Please remember that when using CSIM you must end your script with a + call to Graph::StrokeCSIM() method instead of the +Graph::Stroke() used for non-csim.

+

To use the cache with CSIM you have to call the +Graph::CheckCSIMCache(). As with the caching for non-CSIM you have + to supply a name to be used for the cached version as well as an + optional timeout value. The default timeout value if nothing else is + specified is 60 minutes.

+

The name argument requires some more explanations. You must specify + a relative name here. For example "myimage" or perhaps + "firstpage/image3". Depending on your installation of JpGraph this will + now end up in the directory specified in the CSIMCACHE_DIR define. This + must also be a directory accessible by the normal web server. By + default a directory called "csimcache" will be created in the same + directory as the image script itself.

+

This has the drawback that the directory from where the script is + executed must be writable by the process running PHP. Best practice for + this is to keep the number of writable directory for PHP down to a + minimum and re-use the same directory as is used for the standard + cache. This however, require that your system administrator setup that + cache directory so that it also accessible by the HTTP server from the + htdocs root.

+

The CheckCSIMCache() method checks the cache for an existing cached + version and if found it returns it and halts execution of the script. + So, this call should be the first call after the creation of the + Graph() and before any heavy work is done to create the image so that + you can minimize the execution of the script in the case a match is + found.

+

So, the general structure of a script that uses CSIM and the cache + is

+ $graph = new  +Graph(400,300 +); +
+
// Check cache, 10 min timeout +
$graph->CheckCSIMCache( +"image1",10); +
+
+// !! If cached version exists, execution halts here !! +
+
// +
// ... Construct the image with heavy DB calls etc, etc +
// +
+
$graph->StrokeCSIM(); +

+

Please note that you do not need to pass any + argument to the final call to StrokeCSIM() as you do when not using the + cache.

Note: The CSIM caching works by storing + two files in the cache directory. One file being the image and the + other file being the corresponding image map as a pure HTML file.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/64ExamplesofImagemaps.html b/html/includes/jpgraph/docs/html/64ExamplesofImagemaps.html new file mode 100644 index 0000000000..85088eafda --- /dev/null +++ b/html/includes/jpgraph/docs/html/64ExamplesofImagemaps.html @@ -0,0 +1,58 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.4 Examples of Image maps

+

In the Example/ directory there are a number of examples of how to + setup the various types of image maps. The following examples are + currently available

+ +

In order to easily access all of these examples it is possible to + call the testsuit.php example with an additional argument "t=2". + By following the link +testsuit.php?t=2 a separate window will open with all the possible + CSIM examples.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/64Somefinalcomments.html b/html/includes/jpgraph/docs/html/64Somefinalcomments.html new file mode 100644 index 0000000000..c51a321595 --- /dev/null +++ b/html/includes/jpgraph/docs/html/64Somefinalcomments.html @@ -0,0 +1,45 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.4 Some final comments

+

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/651Clipping.html b/html/includes/jpgraph/docs/html/651Clipping.html new file mode 100644 index 0000000000..b7ac60b3b1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/651Clipping.html @@ -0,0 +1,45 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.5.1 Clipping

+

By default plots are not clipped outside the plot area for + performance reasons.

+

This means that if you have manually specified a scale range and + your data is outside that range the plot will be drawn outside the + scale and into the margin.

+

The clipping algorithm is "perfect" in the sense that for example + line plots where the plot area cuts the line between two data points + the line will be drawn up to the edge of the plot area. The algorithm + used is O(1) in number of data points.

+

The disabling/enabling of clipping manually is controlled by +Graph::SetClipping()

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/652Commonlyusedproperties.html b/html/includes/jpgraph/docs/html/652Commonlyusedproperties.html new file mode 100644 index 0000000000..f7bd686670 --- /dev/null +++ b/html/includes/jpgraph/docs/html/652Commonlyusedproperties.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.5.2 Commonly used properties

+

+
    +
  1. Each graph can have three titles accessed through the properties + 'Graph::title', ''Graph::subtitle' and ''Graph::subsubtitle'
  2. +
  3. Each graph have a legend accessed through the 'Graph::legend' + property
  4. +
  5. Each graph can have a left, center and right footer accessed + through 'Graph::footer::left','Graph::footer::center' and + 'Graph::footer::right'
  6. +
  7. You access the axis through 'Graph::xaxis', 'Graph::yaxis' and + 'Graph::y2axis'
  8. +
  9. You access the grids through 'Graph::xgrid', 'Graph::ygrid' and + 'Graph::y2grid'
  10. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/653Commonlyusedmethods.html b/html/includes/jpgraph/docs/html/653Commonlyusedmethods.html new file mode 100644 index 0000000000..15ea6fc639 --- /dev/null +++ b/html/includes/jpgraph/docs/html/653Commonlyusedmethods.html @@ -0,0 +1,54 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.5.3 Commonly used methods

+

+
    +
  1. You add plot objects (bar plots, pie plots, texts, bands, lines + etc) with the 'Graph::Add() method.
  2. +
  3. Each graph can have a specified margin set by 'Graph::SetMargin()'
  4. +
  5. Each graph can have a fill color in the plot area + 'Graph::SetColor()'
  6. +
  7. The plot areas may have a box around it 'Graph::SetBox()'
  8. +
  9. Each graph can have a specified margin color + 'Graph::SetMarginColor()'
  10. +
  11. Each graph can have a frame or not 'Graph::SetFrame()'
  12. +
  13. Each graph can have a specified drop shadow 'Graph::SetShadow()'
  14. +
  15. The grid lines can be either behind or in front of the plots + 'Graph::SetGridDepth()'
  16. +
  17. The plot can be rotated an arbitrary angle with 'Graph::SetAngle()'
  18. +
  19. You can add a background image with 'Graph::SetBackgroundImage'
  20. +
  21. You can change the overall appearance of the axis with + 'Graph::SetAxisStyle'
  22. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/65Commonfeatureforallgraphs.html b/html/includes/jpgraph/docs/html/65Commonfeatureforallgraphs.html new file mode 100644 index 0000000000..ffd4235f0b --- /dev/null +++ b/html/includes/jpgraph/docs/html/65Commonfeatureforallgraphs.html @@ -0,0 +1,36 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.5 Common feature for all graphs

+

This is a summary of the available feature for all Graph based + charts, i.e. line plots, error plots, scatter plots, etc.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/65HowdoesStrokeCSIMwork.html b/html/includes/jpgraph/docs/html/65HowdoesStrokeCSIMwork.html new file mode 100644 index 0000000000..c88769714e --- /dev/null +++ b/html/includes/jpgraph/docs/html/65HowdoesStrokeCSIMwork.html @@ -0,0 +1,51 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.5 How does StrokeCSIM() work?

+

Knowledge of the exact technical details of the way StrokeCSIM() + works is probably not needed by many people but for completeness we + outline those details in this short section.

+

The fundamental issue we have to solve is that we must be able to + call the image script in two modes. When the user includes the image + script the StrokeCSIM() method should return the HTML page but when the + image script is later called directly in the image tag it must not + return an HTML page but rather the actual image.

+

The way this is solved is by using one HTTP argument which is passed + on automatically when we use the image script name in the image-tag.

+

If you look at the generated HTML you will see that the argument to + the src-property of the image tag is not simply the script name but the + script name with a additional argument.

+

In the JpGraph internal code this pre-defined argument is checked + for and if it exists the image is send back and not the HTML page.

+

The name of this argument is defined by a DEFINE() statement in + JpGraph. The define is _CSIM_DISPLAY.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/66Gettingholdoftheimagemap.html b/html/includes/jpgraph/docs/html/66Gettingholdoftheimagemap.html new file mode 100644 index 0000000000..4c6e7aaafc --- /dev/null +++ b/html/includes/jpgraph/docs/html/66Gettingholdoftheimagemap.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.6 Getting hold of the image map

+

In the case where you want to store the image on disk and later use + it in an img-tag you need to get hold of the image map. For this you + will have to use the function + Graph::GetHTMLImageMap()

+

An example of the use of this is shown below. With these lines the + image will be written to a file. The script then returns a HTML page + which contains the Client side image map and an img-tag which will + retrieve the previously stored file.

+  $graph->Stroke( +"/usr/local/httpd/htdocs/img/image001.png" +); +
echo 
$graph +->GetHTMLImageMap +("myimagemap001" +); +
echo 
+"<img src=\"img/image001.png\" ISMAP USEMAP=\"#myimagemap001\" border=0>" +;
+

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/67Imagemapsandthecachesystem.html b/html/includes/jpgraph/docs/html/67Imagemapsandthecachesystem.html new file mode 100644 index 0000000000..7d06a057ec --- /dev/null +++ b/html/includes/jpgraph/docs/html/67Imagemapsandthecachesystem.html @@ -0,0 +1,39 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6.7 Image maps and the cache system

+

For version 1.9 the cache system has been extended to include even + the CSIM maps. For each CSIM graph two files are stored in the cache, + the image file itself as well as the wrapper HTML with the actual image + map. For further information see the chapter on "Understanding the + Cache system"

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/6UnderstandingtheJpGraphcachingsystem.html b/html/includes/jpgraph/docs/html/6UnderstandingtheJpGraphcachingsystem.html new file mode 100644 index 0000000000..b2061acd00 --- /dev/null +++ b/html/includes/jpgraph/docs/html/6UnderstandingtheJpGraphcachingsystem.html @@ -0,0 +1,44 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6 Understanding the JpGraph caching system

+

To reduce load on the web server JpGraph implements an advanced + caching system which avoids the burden of always having to run the full + image script.

+

Depending on the complexity of the image script (for example if it + is doing several DB lookups) this could significantly improve + performance.

+

The rationale behind this is of course performance, and the + observation that very few graphs are really real-time, i.e. needs to be + updated absolutely every time the graphing script is called.

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/6UsingimagemapswithJpGraph.html b/html/includes/jpgraph/docs/html/6UsingimagemapswithJpGraph.html new file mode 100644 index 0000000000..f6a54734c1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/6UsingimagemapswithJpGraph.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

6 Using image maps with JpGraph

+

Image maps, or client side image (CSIM) as they are known is fully + supported in JpGraph. It gives you the opportunity to create hot-spots + in the graphs which allows you to build a set of "drill-down" graphs.

+

In the following section is based on the assumption that the reader + is familiar with the basic concepts of client side image map in HTML.

+

To shortly recapitulate. Client side image maps consists of two + parts. The first part is the actual image and the second part is a + mapping that gives the coordinates for areas in the image which should + be marked as hot spots (i.e. click-able by the user). The library can + automatically generate these coordinate maps from a given graph.

+

Through out the manual areas of the graph that may be used as a + hotspot is given in conjuction with the general description of that + area.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7101Usingtheautomaticdatetimescale.html b/html/includes/jpgraph/docs/html/7101Usingtheautomaticdatetimescale.html new file mode 100644 index 0000000000..3ddf5e42e1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7101Usingtheautomaticdatetimescale.html @@ -0,0 +1,216 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.10.1 Using the automatic date/time scale

+

The easiest way to get a date time scale for the X-axis is to use + the pre-defined "dat" scale. To be able to use that it is first + necessary to include the module "jpgraph_date.php" and the + specify the scale, for example as "datlin" in the call to SetScale() + as the following code snippet shows.

+  require_once("../jpgraph.php"); +
require_once(
"../jpgraph_line.php"); +
require_once(
"../jpgraph_date.php"); +
... +
$graph  += new Graph(540, +300); +
$graph->SetScale( +'datlin'); +
...

+

The above code snippet would create a date/linear scale for the + graph. We will first show a basic use of the date scale and then go on + to illustrate how it is possible to tailor the exact formatting of the + date axis.

+

When using the fully automatic formatting the library will use the + shortest possible string that uniquely identifieas a date/time. For + example if the entire intervall falls within the same day only the time + values will be displayed, if the intervall falls over several days then + also the date will be added to the label.

+

As usual it is also possible to manually force a certain label + formatting to be used this is illustrated below.

+

7.10.1.1 Specifying the input data

+

The first basic example below creates a data set that emulates a + sample rate every S second and falls over a total period of two days. + It is important to note that the input data on the X-axis must be a in + the form of timestamp data, i.e. the number of seconds from the system + epoch. In PHP the current timestamp value is returned by the function + time().

+

This means that it is always mandatory to specify two input vectors + for a plot. For example to specify a line plot

+  $line  += new LinePlot +($data,$xdata); +

+

The example below show this in practice

+
+
Figure 80: Using the special date X-axis with all default + values [src] +  +

+

+

Please review the script (by following the [src] link) that creates + this graph before continuing since we will base all further examples on + the above example.

+

7.10.1.2 Adjusting the start and end alignment

+

As can be seen from the above example the scale starts slightly + before the first data point. Why? This is of course by purpose in order + to make the first time label to start on an "even" value, in this case + on an hour. Depending on the entire interval of the graph the start + value will always be chosen to be the largest "even" time value, this + could for example be on an even minute, even 30min, even hour, even + day, even week and so on.

+

The alignment of the start (and end) vdate alignment can also be + adjusted manually by using the two methods

+ +

These method allow the alignment to be made by specifying one of the + following constants.

+

For the SetTimeAlign() the following symbolic constants can be used

+
    +
  1. Alignment on seconds +
      +
    • MINADJ_1, Align on a single second (This is the lowest resolution)
    • +
    • MINADJ_5, Align on the nearest 5 seconds
    • +
    • MINADJ_10, Align on the nearest 10 seconds
    • +
    • MINADJ_15, Align on the nearest 15 seconds
    • +
    • MINADJ_30, Align on the nearest 30 seconds
    • +
    +
  2. +
  3. Alignment on minutes +
      +
    • MINADJ_1, Align to the nearest minute
    • +
    • MINADJ_5, Align on the nearest 5 minutes
    • +
    • MINADJ_10, Align on the nearest 10 minutes
    • +
    • MINADJ_15, Align on the nearest 15 minutes
    • +
    • MINADJ_30, Align on the nearest 30 minutes
    • +
    +
  4. +
  5. Alignment on hours +
      +
    • HOURADJ_1, Align to the nearest hour
    • +
    • HOURADJ_2, Align to the nearest two hour
    • +
    • HOURADJ_3, Align to the nearest three hour
    • +
    • HOURADJ_4, Align to the nearest four hour
    • +
    • HOURADJ_6, Align to the nearest six hour
    • +
    • HOURADJ_12, Align to the nearest tolw hour
    • +
    +
  6. +
+

For the SetDateAlign() the following symbolic constants can + be used

+
    +
  1. Alignment on a day basis +
      +
    • DAYADJ_1, Align on the start of a day
    • +
    • DAYADJ_7, Align on the start of a week
    • +
    • DAYADJ_WEEK, Synonym to DAYADJ_7
    • +
    +
  2. +
  3. Alignment on a monthly basis +
      +
    • MONTHADJ_1, Align on a month start
    • +
    • MONTHADJ_6, Align on the start of halfyear
    • +
    +
  4. +
  5. Alignment on a yearly basis +
      +
    • YEARADJ_1, Align on a year
    • +
    • YEARADJ_2, Align on a bi-yearly basis
    • +
    • YEARADJ_5, Align on a 5 year basis
    • +
    +
  6. +
+

Some examples will calrify the use of these methods.

+

Example 1. We want the time adjustment to start on an even + quarter of an hour, i.e. an even 15 minute period.

+  $graph +->xaxis->scale-> +SetTimeAlign( +MINADJ_15); +

+

+

Example 2. We want the time to start on an even 2 hour

+  $graph +->xaxis->scale-> +SetTimeAlign( +HOURADJ_2); +

+

+

Example 3. We want the start to be on an even day

+  $graph +->xaxis->scale-> +SetDateAlign( +DAYADJ_1); +

+

+

7.10.1.3 Adjusting the label format

+

The default label format always tries to use the shortest possible + unique string. To manually set a manual scale the method + SetDateFormat() is used for example as in

+  $graph +->xaxis->scale-> +SetDateFormat( +'H:i'); +

+

The above example will force the labels to be displayed as hour (24h) + and minutes.

+
+
Figure 81: Using specific label format and align time axis to + start and end on an even 10min [src]  +

+

+

+

7.10.1.4 Adjusting the date scale density

+

As with the linear scale it is possible to indicate what density of + scale ticks is needed. This is specified as usual with a call to + Graph::SetTickDensity()

+  $graph->SetTickDensity( +TICKD_DENSE); +

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7102Specifyingadatetimescalewithamanualcallback.html b/html/includes/jpgraph/docs/html/7102Specifyingadatetimescalewithamanualcallback.html new file mode 100644 index 0000000000..b26e2f4a61 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7102Specifyingadatetimescalewithamanualcallback.html @@ -0,0 +1,236 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.10.2 Specifying a date/time scale with a manual + call-back

+

In the following we will assume that all data points are specified + by a tuple where the date/time is specified as a timestamp in second in + the same format as is returned by the PHP function time().

+

The trick here is to use a label formatting callback routine which + gets called to format each label on the scale.

+

What we do is that we specify that the X-scale should be an ordinary + "int" scale (remember that the data values are timestamps which are + integers). We then install our custom label callback (with a call to + SetLabelFormatCallback()) which given a timestamp formats it to a + suitable human readable form. In our example we will use the PHP + function Date() for this purpose.

+

The callback we use will be

+   +// The callback that converts timestamp to minutes and seconds +
function  +TimeCallback( +$aVal) { +
    return 
Date +('H:i:s',$aVal); +
}

+

Using some random data we can now generate the following graph

+
+
Figure 82: Example on how to format an axis to hold a + date/time scale using and integer scale and a callback routine [src]  +

+

+

In the above example we have specified the X-scale manually to make + sure that the min/max values on the X-axis exactly matches the min/max + x-data values.

+

SetLabelFormatCallback() will be called for each of the displayed + labels and the argument passed on to the supplied function is the + default label that the library is assigning that specific label.

+

This means that if the data to be displayed is based on, for + example, timestamps which are given in seconds the displayed value + might not be aligned to how time/date values normally should be + displayed.

+

Using integer scales this will not work very well since the library + determines label positions to be at even positions (e.g. every 2,5,10, + 20,50,100 etc) to suit the auto-scaling since the library will assume + that the data is integers and not timestamp values.

+

The best way to solve this is to use an integer X-scale together + with a a callback function with a manually specified scale. In order to + setup the scale a bit of manually work is needed. Depending on the data + to be displayed one should ensure that the scale starts and ends at + suitable times and that the tick interval chosen fits with an even + multiple of minutes, hours, days or what is best suited for the time + range that is to be displayed.

+

The following code example illustrates this. It creates some "fake" + data that is assumed to be sampled time based data and sets up some + suitable scales and tick interval. This script may be used as a basis + for more advanced handling of the time data.

+(File: timestampex01.php) +
<?php +
+// Example on how to treat and format timestamp as human readable labels +
require_once( +"../jpgraph.php"); +
require_once(
"../jpgraph_line.php"); +
+
// Number of "fake" data points +
DEFINE('NDATAPOINTS', +500); +
+
+// Assume data points are sample every 10th second +
DEFINE('SAMPLERATE', +10);  +
+
+// Callback formatting function for the X-scale to convert timestamps +
// to hour and minutes. +
function  +TimeCallback( +$aVal) { +
    return 
Date +('H:i'$aVal); +
} +
+
// Get start time +
$start time(); +
+// Set the start time to be on the closest minute just before the "start" timestamp +
$adjstart  += floor($start  +60); +
+
+// Create a data set in range (20,100) and X-positions +
+// We also apply a simple low pass filter on the data to make it less +
// random and a little smoother +
$data  += array(); +
$xdata  += array(); +
$data[0] =  +rand(20,100 +); +
$xdata[0] =  +$adjstart; +
for( 
$i=1 +$i  +NDATAPOINTS; ++ +$i ) { +
    
$data[$i] =  +rand(20,100 +)*0.2 $data[ +$i-1]*0.8 +; +
    
$xdata +[$i] = $adjstart  +$i  +SAMPLERATE; +
} +
+
+// Assume that the data points represents data that is sampled every 10s +
// when determing the end value on the scale. We also add some extra +
// length to end on an even label tick. +
$adjend $adjstart  + ( +NDATAPOINTS+10)*10 +; +
+
$graph  += new Graph(500, +250); +
$graph->SetMargin( +40,20,30 +,50); +
+
+// Now specify the X-scale explicit but let the Y-scale be auto-scaled +
$graph->SetScale( +"intlin",0,0 +,$adjstart,$adjend); +
$graph->title-> +Set( +"Example on TimeStamp Callback"); +
+
+// Setup the callback and adjust the angle of the labels +
$graph->xaxis-> +SetLabelFormatCallback( +'TimeCallback'); +
$graph->xaxis-> +SetLabelAngle( +90); +
+
+// Set the labels every 5min (i.e. 300seconds) and minor ticks every minute +
$graph->xaxis-> +scale->ticks->Set +(300,60); +
+
$line  += new LinePlot +($data,$xdata); +
$line->SetColor( +'lightblue'); +
$graph->Add( +$line); +
+
$graph->Stroke(); +
?> +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/710Handlingdatetimescales.html b/html/includes/jpgraph/docs/html/710Handlingdatetimescales.html new file mode 100644 index 0000000000..ee47166427 --- /dev/null +++ b/html/includes/jpgraph/docs/html/710Handlingdatetimescales.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.10 Handling date/time scales

+

With date/time scale we refer to the plotting of data where the + independent variable (X-axis) de-nominates a time value. This could for + example be the temperature measured in intervals during a day.

+

From version 1.18 and onwards there are two principal ways of + handling date/time scales. The manual way and fully automatic using the + special "dat" scale. For most cases the automatic "dat" scale is the + preferred choice but in rare circumstances it might be more appropriate + to use the manual way since it gives slightly more control (but not + that much) of the overall handling of scales.

+

To be able to use a date/time scale at all we will assume that the + data points are represented by both an X coordinate (time-value) and a + Y-value (anything else wouldn't make sense).

+

We first start by describing the use of the "dat" scale.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7110Adjustingthegridlinesintheplot.html b/html/includes/jpgraph/docs/html/7110Adjustingthegridlinesintheplot.html new file mode 100644 index 0000000000..c813612f39 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7110Adjustingthegridlinesintheplot.html @@ -0,0 +1,84 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.10 Adjusting the grid lines in the plot

+

By default only the Y-axis have grid lines and then only on major + ticks, i.e. ticks which have a label. It is of course possible to + change this. Both the X , Y and Y2 can have grid lines. It is also + possible to let the gridlines also be drawn on the minor tick marks, + i.e. ticks without a label. Lets see how we can apply this to the graph + above.

+

The grid is modified by accessing the xgrid (or ygrid) component of + the graph. So to display minor grid lines for the Y graph we make the + call

+ $graph->ygrid->Show +(true,true) +

+

The first parameter determines if the grid should be displayed at + all and the second parameter determines whether or not the minor grid + lines should be displayed.

+

If you also wanted the grid lines to be displayed for the Y2 axis + you would call

+ $graph-> +y2grid->Show(true +,true)

+

Note. In general it is not a good idea to display + both the Y and Y2 grid lines since the resulting image becomes + difficult to read for a viewer.

+

We can also enable the X-grid lines with the call

+  $graph +->xgrid->Show( +true) +

+

+

In the above line we will of course only just enable the major grid + lines.

+

To bring all this together we will display a graph with grid lines + for both Y and X axis enabled.

+
+
Figure 20: Enabling major and minor gridlines for Y-axis and + major grid lines for the X-axis +[src]  +

+

+

Note: If you think the first value of the + Y-axis is to close to the first label of the X-axis you have the option + of either increasing the margin (with a call to + SetLabelMargin() ) or to hide the first label (with a call to + HideFirstTickLabel() )

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7111Usingfilledgridlines.html b/html/includes/jpgraph/docs/html/7111Usingfilledgridlines.html new file mode 100644 index 0000000000..f11139a1d5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7111Usingfilledgridlines.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.11 Using filled grid lines

+

Another option for the grid lines is the possibility to have the + area between the grid lines filled with alternating two colors. The + example below illustrates this.

+
+
Figure 21: Using two alternating colors between the gridlines + [src]  +

+

+

In the example above we have also made use of alpha-blending + (requires GD 2.x or higher). By default the filled grid lines are + disabled. To enable this style you have to call the +Grid::SetFill() method.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7112SpecifyingtextlabelsfortheXaxis.html b/html/includes/jpgraph/docs/html/7112SpecifyingtextlabelsfortheXaxis.html new file mode 100644 index 0000000000..38dbe32ed7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7112SpecifyingtextlabelsfortheXaxis.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.12 Specifying text labels for the X-axis

+

You might want to have specific labels you want to use for the + X-axis when this has been specified as a "text" scale. In the previous + example each Y-point might represent a specific measurement for each of + the first 10 month. We might then want to display the name of the + months as X-scale.

+

To specify the labels on the scale you make use of the + SetTickLabels() method.

+

To get a localized version of the name of the month you can use a + nice feature in JpGraph, the global '$gDateLocal' object which is an + instance of the + DateLocale

+

This class has a number of methods to get localized versions of + relevant names for dates, (months and weekdays).

+

So to specify the X-axis with the short form of the month names we + use the construction

+  $a  +$gDateLocale-> +GetShortMonth(); +
$graph->xaxis-> +SetTickLabels( +$a);
+

+

This will, now result in the image displayed below

+
+
Figure 22: Specifying text labels for the X-axis [src]  +

+

+

Note: It is also perfectly legal to override + the default labels for the Y (and Y2) axis in the same way, however + there is seldom need for that. Please note that the supplied labels + will be applied to each major tick label. If there are insufficient + number of supplied labels the non-existent positions will have empty + labels.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7113Adjustingtheticksonatextscale.html b/html/includes/jpgraph/docs/html/7113Adjustingtheticksonatextscale.html new file mode 100644 index 0000000000..e82658930e --- /dev/null +++ b/html/includes/jpgraph/docs/html/7113Adjustingtheticksonatextscale.html @@ -0,0 +1,63 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.13 Adjusting the ticks on a text scale

+

As can be seen in the previous example the X-axis is slightly + cluttered with the labels very close to each other. We might rectify + this by either enlarging the image or just displaying fewer tick label + on the x-axis.

+

Specifying that we only want, for example, to print every second + label on the axis is done by a call to the method + SetTextLabelInterval() Which would result in the graph

+
+
Figure 23: Just printing every second label on the X-axis [src]  +

+

+

+

If the text labels are long (for example full dates) then another + way might be to adjust the angle of the text. We could for example + choose to rotate the labels on the X-axis by 90 degrees. With the help + of the SetLabelAngle() +

+

Which would then result in the image below

+
+
Figure 24: Rotating the X-labels 90 degrees [src]  +

+

+

Note: The internal fonts which we have been + using so only supports 0 or 90 degrees rotation. To use arbitrary + angles you must specify TTF fonts. More on fonts later.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7114Usingfilledlinegraphs.html b/html/includes/jpgraph/docs/html/7114Usingfilledlinegraphs.html new file mode 100644 index 0000000000..12057df925 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7114Usingfilledlinegraphs.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.14 Using filled line graphs

+

Using a filled line plot is not much different from using a normal + line plot, in fact the only difference is that you must call the method + SetFillColor() + on a normal line plot. This will then fill the area under the line + graph with the chosen color.

+

In the example below we have also, as an example, specified plot + marks (see previous sections).

+
+
Figure 25: Filled line graph with plot marks [src]  +

+

+

Note 1. If you add multiple filled line plots to + one graph make sure you add the one with the highest Y-values first + since it will otherwise overwrite the other plots and they will not be + visible. Plots are stroked in the order they are added to the graph, so + the graph you want front-most must be added last.

+

Note 2. When using legends with filled line plot + the legend will show the fill color and not the bounding line color.

+

Note 3. Filled line plots is only supposed to be + used with positive values. Filling line plots which have negative data + values will probably not have the appearance you expect.

+

As you can see from the graph above the grid lines are below the + filled line graph. If you want the grid lines in front of the graph you + can adjust the depth with call to + Graph::SetGridDepth() As the following example shows

+
+
Figure 26: Adjusting the depth of the gridlines [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7115Usingaccumulatedlinegraphs.html b/html/includes/jpgraph/docs/html/7115Usingaccumulatedlinegraphs.html new file mode 100644 index 0000000000..fbd53a7577 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7115Usingaccumulatedlinegraphs.html @@ -0,0 +1,90 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.15 Using accumulated line graphs

+

Accumulated line graphs are line graphs that are "stacked" on top of + each other. That is, the values in the supplied data for the Y-axis is + not the absolute value but rather the relative value from graph below. + For example if you have two line graphs with three points each, say + [3,7,5] and [6,9,7]. The first graph will be plotted on the absolute + Y-values [3,7,5] the second plot will be plotted at [3+6, 7+9, 5+7], + hence the values of the previous graphs will be used as offsets.

+

You may add any number of ordinary line graphs together. If you want + to use three line plots in an accumulated line plot graph you write the + following code

+

// First create the individual plots +
$p1 = new LinePlot( +$datay_1); +
$p2 = new LinePlot( +$datay_2); +
$p3 = new LinePlot( +$datay_3); +
+
+// Then add them together to form a accumulated plot +
$ap = new AccLinePlot(array($p1, +$p2,$p3)); +
+
+// Add the accumulated line plot to the graph +
$graph->Add( +$ap);
+

+

You might of course also fill each line plot by adding the lines

+  $p1 +->SetFillColor +("red"); +
$p2->SetFillColor( +"blue"); +
$p3->SetFillColor( +"green"); +

+

Using some appropriate data this might then give a graph perhaps + like the one showed in the figure below

+
+
Figure 27: Accumulated filled line graph [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7116ConstructingsmoothlineplotswithCubicSplines.html b/html/includes/jpgraph/docs/html/7116ConstructingsmoothlineplotswithCubicSplines.html new file mode 100644 index 0000000000..2ee005e2d1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7116ConstructingsmoothlineplotswithCubicSplines.html @@ -0,0 +1,85 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.16 Constructing smooth line plots with Cubic + Splines

+

If you only have access to a few data points but still want a smooth + curve between those data points JpGraph can help you achieving that by + letting you construct cubic splines. If you never have heard of cubic + splines before, don't worry. You only have to supply the data points + you know tell JpGraph how many interpolated points in total you want in + the graph. JpGraph will now take care of constructing a smooth curve + between all you data points. The new, smooth, curve will be made up of + exactly as many interpolated points as you have specified.

+

To construct a spline you need both the X and Y coordinates for the + known data points.

+

You start by constructing a new Spline instance. To + get access to the Spline class you must first remember to include the + file "jpgraph_regstat.php". You instantiate this class by calling it + with your two known data arrays (X and Y) as follows.

+  $spline  += new Spline($xdata, +$ydata); +

+

This call initializes the spline with the data points you have. These + data points are also known as Control points for the spline. + This helper class doesn't draw any line itself. Instead it is merely + used to get a new (larger) data array which have all the interpolated + values. You then use these new value in your plot. This way give you + great flexibility in how you want to use this interpolated data.

+

Continuing the above line we now use the Spline::Get() + method to get an interpolated array containing a specified number of + points. So for example the line

+  list( +$sdatax, +$sdatay) =  +$spline->Get(50 +);

+

Will construct the two new data arrays '$sdatax' and '$sdatay' which + contains 50 data points. These two arrays are constructed from the + control point we specified when we created the '$spline' object.

+

You would then use these two new data array in exactly the same way + as you would form ordinary data vectors.

+

The following example illustrates this

+
+
Figure 28: Using spline to get a smooth curve between the + control points. +[src]  +

+

+

In order to make the example more interesting we actually use two + plots. First a line plot to get the smooth curve and then a standard + scatter plot which is used to illustrate where the control points are.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7117Addingplotmarkstoalineplot.html b/html/includes/jpgraph/docs/html/7117Addingplotmarkstoalineplot.html new file mode 100644 index 0000000000..1ba7d21fc4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7117Addingplotmarkstoalineplot.html @@ -0,0 +1,155 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.17 Adding plot marks to a line plot

+

To emphasize the specific data points it is possible to add plot + marks at each data point. Plot marks can be either

+ +

You access the plot mark through the "mark" instance variable in the + plot, as in

+ $lineplot-> +mark->SetColor("red" +);

+

To choose between the different plot marks you call the +PlotMark::SetType() method with the correct define to choose the + plot type you want to use.

+

The simple shape type of plot marks are

+ +

To specify an arbitrary image you use the special define

+ +

In this case you must also specify a image file name and an optional + scaling constant. For example as in

+  $lineplot->mark-> +SetTYPE( +MARK_IMG, +"myimage.jpg", +1.5); +

+

+

If you want to use one of the built-in images the following images + are available. Please note that not all images are available in all + possible colors. The available colors for each image is listed below.

+

The following shape (the first class) plot marks are available

+
    +
  1. MARK_SQUARE, A filled square
  2. +
  3. MARK_UTRIANGLE, A triangle pointed upwards
  4. +
  5. MARK_DTRIANGLE, A triangle pointed downwards
  6. +
  7. MARK_DIAMOND, A diamond
  8. +
  9. MARK_CIRCLE, A circle
  10. +
  11. MARK_FILLEDCIRCLE, A filled circle
  12. +
  13. MARK_CROSS, A cross
  14. +
  15. MARK_STAR, A star
  16. +
  17. MARK_X, An 'X'
  18. +
  19. MARK_FLASH, A "flash" shape
  20. +
  21. MARK_IMAGE, Use the image specified with the filename and scale as + the second and third argument as the mark.
  22. +
+

+

For the second class (built-in images) the following table list the + different images as well as what color they are available in. For the + built-in images you specify the color with the second argument.

+

Note that some of the images are available in different sizes. The + reason is that even though you can scale them by the third argument + there is a visual degradation to scale an image larger than it's + original size since some pixels needs to be interpolated. Reducing the + size with a scale < 1.0 gives much better visual apperance.

+

The scaling works with both GD 1 and GD 2 but with GD 2 the quality + of the scaling is much better.

+

Built-in images and available colors:

+ + + + + + + + + + + + + + + +
TypeDescriptionColors
MARK_IMG_PUSHPIN, MARK_IMG_SPUSHPIN Push-pin image +'red','blue','green','pink','orange'
MARK_IMG_LPUSHPIN A larger Push-pin image +'red','blue','green','pink','orange'
MARK_IMG_BALL, MARK_IMAGE_SBALLA round 3D rendered ball +'bluegreen','cyan','darkgray','greengray', + 'gray','graypurple','green','greenblue','lightblue', + 'lightred','navy','orange','purple','red','yellow'
MARK_IMAGE_MBALLA medium sized round 3D rendered ball + 'blue','bluegreen','brown','cyan', + 'darkgray','greengray','gray','green', + 'greenblue','lightblue','lightred', 'purple','red','white','yellow'
MARK_IMAGE_LBALLA large sized round 3D rendered ball + 'blue','lightblue','brown','darkgreen', + 'green','purple','red','gray','yellow','silver','gray'
MARK_IMAGE_SQUAREA 3D rendered square +'bluegreen','blue','green', 'lightblue','orange','purple','red','yellow'
MARK_IMG_STARA 3D rendered star image +'bluegreen','lightblue','purple','blue','green','pink','red','yellow'
MARK_IMG_DIAMONDA 3D rendered diamond +'lightblue','darkblue','gray', 'blue','pink','purple','red','yellow'
MARK_IMG_BEVELA 3D rendered bevel style round ring +'green','purple','orange','red','yellow'
+ Below we give two examples of images using these features.
+
+
Figure 29: Using an arbitrary image as plot mark [src]  +

+
+

+

+
+
Figure 30: Using the built-in images [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/711AddingplotmarkstolineplotsXXX.html b/html/includes/jpgraph/docs/html/711AddingplotmarkstolineplotsXXX.html new file mode 100644 index 0000000000..902b7f0928 --- /dev/null +++ b/html/includes/jpgraph/docs/html/711AddingplotmarkstolineplotsXXX.html @@ -0,0 +1,61 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.1 Adding plot marks to line-plots XXX

+

It might sometimes be desirable to highlight the data-points with + marks in the intersection between the given x and Y-coordinates. This + is accomplished by specifying the wanted plot mark type for the "mark" + property of the line graph. A full list of all available marks is given + in the class reference +PlotMarks

+

For now let's just add a triangle shape marker to our previous graph + by adding the line

 $lineplot-> +mark->SetType(MARK_UTRIANGLE +);

+

This will give the graph as shown below

+
+
Figure 7: Adding markers to the previous example [src]  +

+

+

+

If you like you can of course both change the size, fill-color and + frame color of the chosen plot mark.

+

The colors of the marks will, if you don't specify them explicitly, + follow the line color. Please note that if you want different colors + for the marks and the line the call to SetColor() for the marks must be + done after the call to the line since the marks color will always be + reset to the lines color when you set the line.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/711Adjustinglabelsonatextscale.html b/html/includes/jpgraph/docs/html/711Adjustinglabelsonatextscale.html new file mode 100644 index 0000000000..2011fdc285 --- /dev/null +++ b/html/includes/jpgraph/docs/html/711Adjustinglabelsonatextscale.html @@ -0,0 +1,131 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.11 Adjusting labels on a text scale

+

In the following section we will work through an number of examples + on how to manipulate labels on a text scale. Primarily we will + investigate how to best handle the case where you have a large number + of values.

+

As a remainder; Text scale is meant to be used on the X-axis when + the X-axis doesn't have a numeric value, i.e you are only interested in + linear ordering of the data. If you don't specify the labels manually + they will be set automatically starting from 1 as the example below + shows.

+

+
+
Figure 83: A simple bar plot using an automatic text scale [src]  +

+

+

+

To specify the labels on the X-axis as suitable text strings you + call the method + Axis::SetTickLabels() with an array containing the text-labels. If + there are more data points than labels the non-specified labels will be + given their ordinal number. If we augment the previous example with the + name of the month we get the following new example

+

+
+
Figure 84: Manually specifying the text scale labels [src]  +

+

+

+

+
Tip: To get hold of localized version of + the month names (or weekdays) you can use the + DateLocal class available in the global variable $gDateLocale If no + locale has been specified the default locale for the installation will + be used. +
+

What happen now if we have a larger number of bars? Let's try with + 25 bars and see what result we get.

+

+
+
Figure 85: A larger data set [src]  +

+

+

+

Not all to impressive. The labels are to close and they overlap. + Hence it is not a good idea to display every label. To adjust what + labels are to be displayed you use the + SetTextLabelInterval() method. The argument to this method is the + interval between text labels. So to display only every 3 month you + would add the line

+

+ $graph->xaxis->SetTextLabelIntervall(3 +)

+

+

Which would give the result shown below

+
+
Figure 86: Displaying only every third label [src]  +

+

+

+

Much better, quite readable.

+

If we have an even larger data set it might not longer be meaningful + to display all the tick marks since they would simple become to close. + In JpGraph there is a possibility to specify that you only would like + every n:th tick mark to be visible ( + SetTextTickIntervall() ). For bar graphs using text scale however, + that might not be such a good idea since the tick marks are between the + bars and the labels centered under the bars. If we only were to + display, say, every 3 tick mark it wouldn't look to good. Not that we + can't do it, as the example below shows, but it just doesn't look very + good.

+
+
Figure 87: Displaying just every third tick mark. [src]  +

+

+

+

A better way to handle large data set is simply to hide the tick + marks all together. Tick marks may be hidden by calling the method + Axis::HideTicks(); If we hide all the ticks on the X-axis we will + get the result shown below

+
+
Figure 88: Hiding all tick mark. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/712Addingarbitrarytextstringstothegraph.html b/html/includes/jpgraph/docs/html/712Addingarbitrarytextstringstothegraph.html new file mode 100644 index 0000000000..5d8de0ed49 --- /dev/null +++ b/html/includes/jpgraph/docs/html/712Addingarbitrarytextstringstothegraph.html @@ -0,0 +1,108 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.12 Adding arbitrary text strings to the graph

+

To add clarification or other information text strings to the graph + you can add arbitrary lines of text anywhere you like onto the graph. + The text might have multiple lines and you can choose the paragraph + alignment.

+

To add text you have to create one or more instances of the + Text() object and then add the text object to the graph with the + AddText() method.

+

The position of these text boxes are given as fraction of the width + and height of the graph. When you are positioning these text boxes you + might also choose what part of the text box should be considered the + anchor point for the position you specify.

+

By default the anchor point is the upper left corner of the bounding + box for the text.

+

To show some ways of positioning the text we use a very simple bar + graph not to distract from the text. We first just add a single text + line with most of the settings their default value by adding the + following lines to the graph

+  $txt=new Text( +"This is a text"); +
$txt->Pos( +0,0); +
$txt->SetColor( +"red"); +
$graph->AddText( +$txt);
+

+

The result is shown below.

+
+
Figure 89: Adding a single text string in the upper left + corner [src] +  +

+

+

Not too exiting. Let's make it more interesting by having a + background color, using larger fonts and framing the text box and + adding a drop shadow to the text box by using the methods + SetBox() and SetBox()

+
+
Figure 90: Making the text more interesting [src]  +

+

+

That's better. Now we get some attention. If you want to add a text + with several lines you just need to separate the lines with a newline + ('\n' character). The default paragraph alignment is left edge but you + can also use right and center alignment.

+

As an illustration let's add a couple of more lines to the previous + text, center the text box in the middle of the graph and also use + centered paragraph alignment for the text. To adjust the paragraph + alignment of the text you have to use the + Text::ParagraphAlign()

+
+
Figure 91: Text with multiple lines and centered paragraph + alignment +[src]  +

+

+

Of course there is no limit to the number of text string you can add + to the graph.

+

From version 1.12 it is also possible to add text strings to a graph + using the scale coordinates instead. This is accomplished by using the Text::SetScalePos() Which + is completely analog to SetPos() with the only difference that the + positions given are interpretated as scale values instead of fractions + of the width and height.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/712Displayingthevaluesforeachdatapoint.html b/html/includes/jpgraph/docs/html/712Displayingthevaluesforeachdatapoint.html new file mode 100644 index 0000000000..e48e59d758 --- /dev/null +++ b/html/includes/jpgraph/docs/html/712Displayingthevaluesforeachdatapoint.html @@ -0,0 +1,83 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.2 Displaying the values for each data point

+

As a final easy modification we can enable the display of the data + value above each data point. The value is represented by the 'value' + property in the plot. (You can read more about the possibilities of the + display value + in the class reference.)

+

To enable the display of the value you just need to call the Show() + method of the value as in

+  $lineplot->value-> +Show() +

+

Adding that line to the previous line plot would give the result + shown below.

+
+
Figure 8: Displaying the value for each data point [src]  +

+

+

We can of course change both color, font and format of the displayed + value. So for example if we wanted the display values to be dark red, + use a bold font and have a '$' in front we need to add the lines

+  $lineplot->value +->SetColor("darkred"); +
$lineplot +->value->SetFont( +FF_FONT1, +FS_BOLD); +
$lineplot +->value->SetFormat( +"$ %0.1f"); +

+

This would then result in the following image

+
+
Figure 9: Making the display values a little bit more + interesting +[src]  +

+

+

Note: You can achieve more advanced + formatting by using not just the printf() style format string by a + format callback function. This could allow you to change the displayed + value with more advanced formatting such as displaying money values + with "," to separate thousands.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/713Addingseveralplotstothesamegraph.html b/html/includes/jpgraph/docs/html/713Addingseveralplotstothesamegraph.html new file mode 100644 index 0000000000..5dfb31d183 --- /dev/null +++ b/html/includes/jpgraph/docs/html/713Addingseveralplotstothesamegraph.html @@ -0,0 +1,88 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.3 Adding several plots to the same graph

+

What if we want to add a second plot to the graph we just produced? + Well, this is quite straightforward and just requires two simple step:

+
    +
  1. Create the second plot
  2. +
  3. Add it to the graph
  4. +
+

To create the second plot we need some data (we could of course use + the same data as for the first plot but then we wouldn't be able to see + the new plot!)

+

The following lines show how to create the new plot and add it to + the graph (we only show the new lines - not the full script)

+  $ydata2  += array(1,19, +15,7,22 +,14,5, +9,21,13 +); +
$lineplot2 +=new LinePlot($ydata2); +
$lineplot2 +->SetColor("orange"); +
$lineplot2 +->SetWeight(2); +
+
$graph->Add( +$lineplot2); +

+

Making these changes to the previous graph script would generate a + new graph as illustrated below.

+
+
Figure 10: Adding a second plot to the previous graph [src]  +

+

+

There is a few things worth noting here

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/713AddingtitlesandfooterstotheGraph.html b/html/includes/jpgraph/docs/html/713AddingtitlesandfooterstotheGraph.html new file mode 100644 index 0000000000..5c9a9da6db --- /dev/null +++ b/html/includes/jpgraph/docs/html/713AddingtitlesandfooterstotheGraph.html @@ -0,0 +1,104 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.13 Adding titles and footers to the Graph

+

Each graph can have up to three different titles accessed by the + three properties

+
    +
  1. title
  2. +
  3. subtitle
  4. +
  5. subsubtitle
  6. +
+

All of these three properties is a standard text object which means + that you can have individual font, colors, margins and sizes of these + tree titles.

+

The only thing you need to think of is that you probably want to add + some extra margin to make room for the titles (using + Graph::SetMargin() )

+

The individual positioning of these titles are done automatically + and will adjust to the font size being used.

+

If you for, esthetic reasons, would like increase the distance from + the top where the title is positioned (or the intra distance between + title and sub title) you can use the + Text::SetMargin() method. For example the line

+

+ $graph->title->SetMargin +(20);

+

will set the distance between the top of the title string and the top + of the graph to 20 pixels. If you instead call the SetMargin() method + for the subtitle it will adjust the distance between the top of the + subtitle and the bottom of the title.

+

The titles will be positioned at the top and be centered in the + graph. Each of these titles may have multiple lines each separated by a + "\n" (newline) character. By default the paragraph alignment for each + title is centered but may of course be changed (using the + ParagraphAlign()) method.

+

Each graph can also have a footer. This footer is actually three + footers. Left, center and right. The 'left' footer is aligned to the + left, the 'center' at the bottom center and the right to the right.

+

Each of these three positions is a standard Text object which means + you can change color, font and size as you please individually on each + of these footer positions.

+

You access the footer through the Graph::footer property as the + following example shows

+

+ $graph-> +footer->left->Set +("(C) 2002 KXY" +); +
$graph->footer-> +center->Set("CONFIDENTIAL" +); +
$graph->footer-> +center-> +SetColor("red"); +
$graph->footer-> +center-> +SetFont( +FF_FONT2, +FS_BOLD); +
$graph->footer-> +right->Set("19 Aug 2002" +);

+

Note: If you enable the brand timing + argument you should leave the left footer empty.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/714AddingasecondYscale.html b/html/includes/jpgraph/docs/html/714AddingasecondYscale.html new file mode 100644 index 0000000000..0ecb7656cb --- /dev/null +++ b/html/includes/jpgraph/docs/html/714AddingasecondYscale.html @@ -0,0 +1,77 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.4 Adding a second Y-scale

+

As you saw in the preceding example you could add multiple plots to + the same graph and Y-axis. However what if the two plots you want to + display in the graph has very different ranges. One might for example + have Y-values like above but the other might have Y-values in the + 100:s. Even though it is perfectly possible to add them as above the + graph with the smallest values will have a very low dynamic range since + the scale must accomplish the bigger dynamic range of the second plot.

+

The solution to this is to use a second Y-axis with a different + scale and add the second plot to this Y-axis instead. Let's take a look + at how that is accomplished.

+

First we need to create a new data array with large values and + secondly we need to specify a scale for the Y2 axis. This is done by + the lines

+ $y2data = array( +354,200,265 +,99,111, +91,198,225 +,293,251); +
$graph->SetY2Scale( +"lin");
+

+

and finally we create a new line plot and add that to the second + Y-axis. Note that we here use a new method, AddY2(), since we want this + plot to be added to the second Y-axis. Note that JpGraph will only + support two different Y-axis. This is not considered a limitation since + using more than two scales in the same graph would make it very + difficult to interpret the meaning of the graph.

+

To make the graph a little bit more esthetic pleasing we use + different colors for the different plots and let the two different + Y-axis get the same colors as the plots.

+

The resulting graph is shown below. source)

+
+
Figure 11: Adding a second Y-scale plot to the same graph [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/714Addingatabtitle.html b/html/includes/jpgraph/docs/html/714Addingatabtitle.html new file mode 100644 index 0000000000..6f93f01382 --- /dev/null +++ b/html/includes/jpgraph/docs/html/714Addingatabtitle.html @@ -0,0 +1,48 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.14 Adding a tab title

+

A variant of the titles is the tab title. This is just + another option you have of putting a name on the graph. The appearance + of this type is a tab on top of the plot area with text inside.

+

You can access the tab using the 'tabtitle' property of the graph.

+

The following figure shows an example of how this can look.

+
+
Figure 92: Using the tabbed title style [src]  +

+

+

As usual you have full freedom to specify font and colors for this + type of title. Please see the class reference regarding +GraphTabTitle() for more information.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/715Addingalegendtothegraph.html b/html/includes/jpgraph/docs/html/715Addingalegendtothegraph.html new file mode 100644 index 0000000000..6263bb061a --- /dev/null +++ b/html/includes/jpgraph/docs/html/715Addingalegendtothegraph.html @@ -0,0 +1,125 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.5 Adding a legend to the graph

+

With more than one plot on the same graph it is necessary to somehow + indicate which plot is which. This is normally done by adding a legend + to the graph.

+

You will see that each plot type has a 'SetLegend()' method which is + used to name that plot in the legend. SO to name the two plots in the + example we have been working with so far we need to add the lines

+  $lineplot->SetLegend +("Plot 1"); +
$lineplot2 +->SetLegend("Plot 2"); +

+

to the previous code. The resulting graph is shown below

+
+
Figure 12: Adding a legend to the graph [src]  +

+

+

As you can see the legend gets automatically sized depending on how + many plots there are that have legend texts to display. By default it + is placed with it's top right corner close to the upper right edge of + the image. Depending on the image you might want to adjust this or you + might want to add a larger margin which is big enough to accompany the + legend. Let's do both.

+

First we increase the right margin and then we place the legend so + that it is roughly centered. We will also enlarge the overall image so + the plot area doesn't get too squeezed.

+

To modify the legend you access the 'legend' property of the graph. + For a full reference on all the possibilities (changing colors, layout, + etc) see class legend in + the class reference

+

For this we use the legends 'SetPos()' method as in

+  $graph +->legend->Pos( +0.05,0.5,"right" +,"center");

+

+

Doing this small modification will give the result shown below

+
+
Figure 13: Adjusting the layout to give more rooms for the + legend [src]  +

+

+

The above method 'SetPos()' deserves some explanation since it might + not be obvious. You specify the position as a fraction of the overall + width and height of the entire image. This makes it possible for you to + resize the image within disturbing the relative position of the legend. + We will later see that the same method is just to place arbitrary text + in the image.

+

To give added flexibility one must also specify to what edge of the + legend the position given should be relative to. In the example above + we have specified "right" edge on the legend for the for the horizontal + positioning and "center" for the vertical position.

+

This means that the right edge of the legend should be position 5 % + of the image width from the right. If you had specified "left" the the + legends left edge would be positioned 5 % of the image width from the + image left side.

+

By default the legends in the legend box gets stacked on top of each + other. The other possibility is to have them sideways. To adjust this + you use the SetLayout() + method. Using a horizontal layout with the previous example give the + following result.

+
+
Figure 14: Using a horizontal layout for the legends [src]  +

+

+

+

7.1.5.1 Adjusting the layout of the legend

+

For more advanced fomatting of the legend it is possible to adjust

+ +

In order to adjust the number of columns used in the legend the + method Legend::SetColumns is used. So for example to have the + legend lined up using three columns the follwing lines have to be added + to teh script

+ $graph-> +legend-> +SetColumns(3);
+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/715Usingbackgroundimages.html b/html/includes/jpgraph/docs/html/715Usingbackgroundimages.html new file mode 100644 index 0000000000..1190f856c1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/715Usingbackgroundimages.html @@ -0,0 +1,95 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.15 Using background images

+

Instead of having a single color background you can easily have an + arbitrary image as the background. The image may be in either PNG, JPG + or GIF format depending on what your installation supports.

+

+
+

A note on GD: If you are using GD 2.xx you must + make sure that the define USE_TRUECOLOR is set to true. This is also + the default. Failure to do so in combination with GD 2.xx will make the + background image just look like a solid black square.

+
+
+

To use a specific image as the background you just have to use the + method + Graph::SetBackgroundImage() The arguments specify file-name, how + the image should be positioned in the graph and finally the format of + the image (if it is in JPG, PNG or GIF) format. If the format is + specified as "auto" (the default) then the appropriate image format + will be determined from the extension of the image file.

+

The file name is of course obvious but the second argument might not + be. This arguments determine how the image should be copied onto the + graph image. You can specify three different variants here

+
    +
  1. BGIMG_ COPY This will just copy the image unchanged onto the graph + from the top left corner.
  2. +
  3. BGIMG_CENTER This will just copy the image unchanged onto the graph + but it will center the image in the graph.
  4. +
  5. BGIMG_FILLFRAME This will scale the image to exactly fit the whole + graph image.
  6. +
  7. BGIMG_FILLPLOT This will scale the image to exactly fit just the + plot area of the graph.
  8. +
+

+

+
The following section only applies to palette based images. + True color images can NOT be manipulated this way. Applying the + following sections to true-color images will have no affect. +
+

You might often find yourself wanting to use a background image as a + "waterstamp". This usually means taking the original image, import it + to some image editing program and then "bleaching" the color + saturation, reducing the contrast and so on. Finally you save the + modified image which you then use as a background image.

+

This whole process can be automatically accomplished in JpGraph by + using the method + Graph::AdjBackgroundImage() which allow you to adjust color + saturation, brightness and contrast of the background image.

+

+ $graph-> +AdjBackgroundImage(...) +

+

+

to achieve the "watercolor" effect to avoid the image being too + intrusive in the graph.

+
+
Figure 93: Example on using a watermark type background image + [src]  +

+

+

Note: The background image depicts a 1998 + Triumph Tiger. This bike is a 900cc off-road bike.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/716Handlingnullvaluesinlineplots.html b/html/includes/jpgraph/docs/html/716Handlingnullvaluesinlineplots.html new file mode 100644 index 0000000000..ab9f9ee18c --- /dev/null +++ b/html/includes/jpgraph/docs/html/716Handlingnullvaluesinlineplots.html @@ -0,0 +1,50 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.6 Handling null-values in line plots

+

JpGraph offers two ways of handling null values (or discontinuities) + in the data. You can either have a "whole" in the data or the line may + be extended between the previous and next data point in the graph.

+

If the data value is null ("") or the special value "x" then the + data point will not be plotted and will leave a gap in the line.

+

If the data value is "-" then the line will be drawn between the + previous and next point in the data ignoring the "-" point.

+

The following example shows both these possibilities.

+

+
+
Figure 15: Handling null values in line graphs [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/716Usingabackgroundgradient.html b/html/includes/jpgraph/docs/html/716Usingabackgroundgradient.html new file mode 100644 index 0000000000..f549c49b15 --- /dev/null +++ b/html/includes/jpgraph/docs/html/716Usingabackgroundgradient.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.16 Using a background gradient

+

In addition to the background image you can also add a background + color gradient. This gradient can be covering the entire graph, just + the plot area or just the margins. This flexibility allows you to + combine a background image with a background color gradient. You can + for example use a background image in the plot area and a color + gradient out in the margins.

+

You specify a color gradient background by calling the + Graph::SetBackgroundGradient() method. All details are available in + the class reference (follow the link above). We finally give a quick + example on what kind of effect you can achieve using this feature.

+
+
Figure 94: Using a background color gradient with the + SetBackgroundGradient() method +[src]  +

+

+

+

Finally we like to mention that in the "/utils/misc/" directory you + will find a small utility script called "mkgrad.php". Running this + script presents you with a UI that makes it a breeze to create a + gradient image on it's own.

+

The UI for the utility is so obvious that we won't discuss it + further, we just show it below. The UI for the mkgrad.php utility The UI for the mkgrad.php utility

+

In the example below this utility is used to get a more interesting + plot area.

+

+
+
Figure 95: Example of the use of a gradient background [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/717UsingcallbacksforPlotmarks.html b/html/includes/jpgraph/docs/html/717UsingcallbacksforPlotmarks.html new file mode 100644 index 0000000000..53114665df --- /dev/null +++ b/html/includes/jpgraph/docs/html/717UsingcallbacksforPlotmarks.html @@ -0,0 +1,92 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.17 Using callbacks for Plot marks

+

An interesting enhancement when using Plotmarks is the possibility + to add a callback function to control the size and color of the + plotmarks.

+

This callback function will get called with the current Y-value (for + the plotmark) as it's argument. As return value the callback function + must return an array containing three (possible null) values. The + values returned must be

+
    +
  1. Plot mark Weight
  2. +
  3. Plot mark Color
  4. +
  5. Plot mark Fill color
  6. +
+

The exact meaning of the parameters will of course depend on the + type of plot marks being used.

+

The callback must be a global function and is installed with a call + to + PlotMark::SetCallback()

+

So for example to install a callback that changes the fill color for + all marks with a (Y) value higher than 90 you could add the lines

+

function  +MarkCallback( +$aVal) { +
    if( 
$aVal  +> 90)  +
        
$fcolor +="red" +
    
else +
        
$fcolor +=""; +
    return array(
"" +,"",$fcolor); +
} +
... +
$plot->mark-> +SetCallback( +"MarkCallback"); +
...

+

+

As you can see in the above example we have left some of the return + values blank. Doing this will just ignore any change of these value and + use the global settings for the plotmarks.

+

If you also let the (Y) value affect the size of the plot marks you + can get what is sometimes known as a "balloon plot". The example below + is basically a scatter plot that uses filled circles to mark the + points. A format callback is then used to change the color and size + depending on the Y-value for each plot.

+

+
+
Figure 96: Creating a balloon plot by using plot mark + callback function +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/717Usingthestepstyletorenderlineplots.html b/html/includes/jpgraph/docs/html/717Usingthestepstyletorenderlineplots.html new file mode 100644 index 0000000000..f21b7c8b57 --- /dev/null +++ b/html/includes/jpgraph/docs/html/717Usingthestepstyletorenderlineplots.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.7 Using the step-style to render line plots

+

Step style refers to an alternate way of rendering line plots by not + drawing a direct line between two adjacent points but rather draw two + segments. The first segment being a horizontal line to the next X-value + and then a vertical line from that point to the correct Y-value. This + is perhaps easier demonstrated by an example as seen below.

+

You specify that you want the plot to be rendered with this style by + calling the method +SetStepStyle() on the lineplot.

+
+
Figure 16: Rendering a line plot with the step style [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/718Rotatinggraphs90degrees.html b/html/includes/jpgraph/docs/html/718Rotatinggraphs90degrees.html new file mode 100644 index 0000000000..6297e5f12c --- /dev/null +++ b/html/includes/jpgraph/docs/html/718Rotatinggraphs90degrees.html @@ -0,0 +1,58 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.18 Rotating graphs 90 degrees

+

In section 10.2 you can read about + arbitrary rotation of the graphs. For most practical purposes rotation + of 90 degrees is most useful. This could for example be used to plot + horizontal bar graphs.

+

The slight complication with general rotation is that the margins + also rotates, this means that if you rotate a graph 90 degrees the left + margin in the image was originally the bottom margin. In additional by + default the center of the rotation is the center of the plot area and + not the entire image (if all the margins are symmetrical then they will + of course coincide). This means that depending on your margin the + center of the rotation will move. You can read more about this and how + to manually set the center for rotation in the section about rotation, 10.2

+

This is just a slight inconvenience which you have to take into + account when you need to set an explicit margin with a call to +Graph::SetMargin()

+

However, in order to make a rotation of 90 degrees much easier you + can easily rotate a graph 90 degrees and set the correct margin with a + call to +Graph::Set90AndMargin() The parameter to this method lets you + specify the margins as you will see them in the image without having to + think of what becomes what after the rotation.

+

So, the only thing you need to do is call this method and then the + graph will have been rotated 90 degrees.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/718Usinglogarithmicscale.html b/html/includes/jpgraph/docs/html/718Usinglogarithmicscale.html new file mode 100644 index 0000000000..4c91eeee9b --- /dev/null +++ b/html/includes/jpgraph/docs/html/718Usinglogarithmicscale.html @@ -0,0 +1,76 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.8 Using logarithmic scale

+

Using a logarithmic scale requires you to include the logarithmic + add on module in "jpgraph_log.php". So you must have the line

+   +include("jpgraph_log.php" +);

+

on the top of your code. To Illustrate how to use a logarithmic scale + let's make the right Y scale in the previous example a logarithmic + scale. This is done by the line

+  $graph->SetY2Scale( +"log"); +

+

This will then give the following result

+
+
Figure 17: Using a logarithmic scale for both the Y2 axis [src]  +

+

+

+

You can of course also use a logarithmic X-scale as well. The + following example shows this.

+
+
Figure 18: Example of using log scale on both X and Y axis + together with a linear Y2 scale +[src]  +

+

+

Even though we have so far only shown line graphs logarithmic scale + can also be used for bar, error, scatter plots as well. Even radar + plots supports the use of logarithmic plots. The following example + shows how to use a logarithmic scale for a bar graph.

+

+
+
Figure 19: Example of using logarithmic scale togther with + bar plots [src] +  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7191Standardtwoaxisgraphs.html b/html/includes/jpgraph/docs/html/7191Standardtwoaxisgraphs.html new file mode 100644 index 0000000000..02743c0953 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7191Standardtwoaxisgraphs.html @@ -0,0 +1,132 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.19.1 Standard two axis graphs

+

Assuming we start with the traditional two axis graph, one X and one + Y axis. You may then change the position of each axis by calling + Axis::SetPos($aPosition) You have to remember that you need to + specify the position on the other axis. SO you need to specify the + world-coordinate for the position. By default the axis are each + positioned at the 0-point on the other axis, i.e. the axis will cross + at the 0,0 point in the graph.

+

In addition to the standard positioning you may also use the two + special position markers "min" and "max". This will position the axis + at the minimum (or maximum) position of the other axis.

+

For example, to make sure that the X-axis is always at the bottom of + the graph (at lowest possible Y-value) you would have to add the line

+

+ $graph->xaxis->SetPos +("min");

+

+

To change the color and width of the axis you have to make use of + the Axis::SetColor() and + Axis::SetWeight() + methods.

+
Invisible axis Even though JpGraph (1.7) + doesn't directly support "hidden" axis where the labels are still drawn + it is very easy to achieve this effect by setting the colors of the + axis to be the same as the background. See the example barintex2.php in + the Example directory. To completely hide an axis you can make use of + the Hide() +
+

You might also want to add titles to the axis. This is done through + the Axis::SetTitle() + method. This is actually just a shortcut for accessing the title + property direct. Axis::title::Set() which also allow you to set the + alignment in one call.

+

By default the position of the title is to the far right for the + X-axis and in the middle (and 90 degrees rotated) for the Y-axis.

+

You can adjust the position of the title with the help of the second + argument to the + Axis::SetTitle() method.

+

The possible positions are "high","middle" and "low" which refers to + the scale values on the axis.

+

One common modification you might want to do to the title is to + increase the margin between the axis and the actual title. This is + often necessary to do for the Y-axis if the values displayed are large. + You may adjust the distance (in pixels) between the axis and the title + by using the method + Axis::SetTitleMargin()

+

So for example to increase the margin on the Y-axis you might add + the line

+

+ $graph->yaxis->SetTitleMargin(40 +);

+

+

to your code.

+

Finally we mention something about the positioning of tick marks and + labels on the axis. You have the possibility to choose what side of the + axis the tick marks and the labels should be at. For the X-axis this + can be specified as either on the the top (inside the plot area) or at + bottom (outside of the plotarea). In the same way you can specify for + the Y-axis if the labels ( or ticks) should be on the left or right + side.

+

To adjust the label positioning you have to use the method + Axis::SetTitleSide() and to adjust the position of the tick mark + you have to use the method + SetTickSide()

Note: There is also an alias + for this method, SetTickDirection() which is deprecated from version + 1.7 but kept for backwards compatibility.
Valid arguments for + these methods are

+ +

For example, the following lines added to a script would change side + of the labels and tickmarks for the X-axis.

+

+ $graph->xaxis->SetLabelPos +(SIDE_UP); +
$graph->xaxis-> +SetTickSide( +SIDE_DOWN); +

+

+

This technique is for example used if you position the X-axis at the + top of the graph as the following example shows.

+
+
Figure 97: Example of both how to adjust the position of the + X-axis as well as adjusting the side for the tick and axis title [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7192Scientificstyleaxis.html b/html/includes/jpgraph/docs/html/7192Scientificstyleaxis.html new file mode 100644 index 0000000000..a53ddab118 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7192Scientificstyleaxis.html @@ -0,0 +1,63 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.19.2 Scientific style axis

+

In scientific style plots it is often common to duplicate each axis + so that all sides of the graph have a labeled axis. This is of course + also fully supported by JpGraph.

+

Before we continue we show a small example to illustrate this + feature

+

+
+
Figure 98: Example of scientific axis [src]  +

+

+

+

The example above shows the basic configuration. There are now + several modifications you may do to these axis like

+ +

The style of axis is determined by the method + Graph::SetAxisStyle() The available type of axis are

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7193Adjustingthepositionofthescalelabels.html b/html/includes/jpgraph/docs/html/7193Adjustingthepositionofthescalelabels.html new file mode 100644 index 0000000000..4744b3d546 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7193Adjustingthepositionofthescalelabels.html @@ -0,0 +1,57 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.19.3 Adjusting the position of the scale labels +

+

How to adjust the actual labels are discussed elsewhere in this + manual (see ???,???). However we like to mention here that you can + adjust the label margin (distance between the axis and the labels) with + the method + Axis::SetLabelMargin()

+

to adjust the actual label format (like font, color, angle) you need + to access the Axis::SetFont() + and the Axis::SetColor() + methods. If you investigate the + Axis class you will discover more methods to adjust the many + aspects of the axis layout.

+

As a final note we also mention the methods + Axis::SetLabelAlign() and + Axis::SetLabelAngle() This first method is really only mentioned + here for completeness since it is mostly used for internal purposes. + However on some occasion you might want to adjust the alignment of the + labels. By default they are centered in respect to the tick mark. By + using the method you might override this positioning should you choose + to do so.

+

The second of these methods adjusts the angle of the label in + regards to the axis. This is very useful for X-axis that have long + labels.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7194Formattingthescalelabels.html b/html/includes/jpgraph/docs/html/7194Formattingthescalelabels.html new file mode 100644 index 0000000000..9ddbdc19cb --- /dev/null +++ b/html/includes/jpgraph/docs/html/7194Formattingthescalelabels.html @@ -0,0 +1,43 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.19.4 Formatting the scale labels

+

In order to have full control over the way that the labels are + displayed it is possible to define a callback function that will be + applied to all labels. The callback function will be called with the + label as the only argument and should return the value that will be + displayed in the graph. This could for example be used to turn seconds + (used to position data points) into hour and minutes on the scale. For + further reference see the two methods: + Graph::SetLabelFormatCallback(); and + Graph::SetLabelFormat();

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7195InvertingtheYaxis.html b/html/includes/jpgraph/docs/html/7195InvertingtheYaxis.html new file mode 100644 index 0000000000..7b5840b986 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7195InvertingtheYaxis.html @@ -0,0 +1,59 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.19.5 Inverting the Y-axis

+

One good way of illustrate the usefulness of label callbacks in a + slightly different context is to show how we can achieve the effect of + an inverted Y-scale.

+

An inverted Y-scale has the lowest number at the top and the scale + values increases downwards.

+

Even though JpGraph doesn't directly support this feature it is + quite easy to achieve with just a few extra lines of code in your image + script.

+

Before we continue we give an example of what we are referring to.

+

+
+
Figure 99: Inverted Y-axis [src]  +

+

+

+

Two achieve this effect there are two simple steps to take:

+
    +
  1. Negate all you Y-value in the data
  2. +
  3. Create a callback that negates the scale labels so they appear to + be positive.
  4. +
+

And that's it! We refer you to the code in the example above for the + details.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/719Formattingtheaxis.html b/html/includes/jpgraph/docs/html/719Formattingtheaxis.html new file mode 100644 index 0000000000..a23972035b --- /dev/null +++ b/html/includes/jpgraph/docs/html/719Formattingtheaxis.html @@ -0,0 +1,38 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.19 Formatting the axis

+

To get the exact type of axis you want in your graph there are a + number of adjustments available for you. You may change, color, size, + position and general appearance.

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/719Moreonscales.html b/html/includes/jpgraph/docs/html/719Moreonscales.html new file mode 100644 index 0000000000..7902940976 --- /dev/null +++ b/html/includes/jpgraph/docs/html/719Moreonscales.html @@ -0,0 +1,87 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1.9 More on scales

+

As you saw in the previous example it is possible to use different + types of scales. In JpGraph you can use the following scales

+ +

Any combination of these may be used. Linear and logarithmic scales + are pretty straightforward. The text scale might deserve some + explanation. The easiest way to think of the text scale is as a linear + scale consisting of only natural numbers, i.e. 0,1,2,3,4,... . This + scale is used when you just have a number of Y-values you want to plot + in a consecutive order and don't care about the X-values. For the above + example it will also work fine to use a linear X-scale (try it!). + However, the scale is now treated as consisting or real numbers so the + auto scaling, depending on the size of the image an the number of data + points, might decide to display other labels then the natural numbers., + i.e. a label might be 2.5 say. This is not going to happen if you use a + text scale.

+

The normal practice for text scale is to specify text strings as + labels instead as the default natural numbers. You can specify text + strings for the labels by calling the + SetTickLabels() method on the Axis.

+

To specify the scale you use the + SetScale() method. A few examples might help clarify this.

+ +

As you can see all your graphs will require at least one call to + SetScale() in the beginning of your script. Normally it will come right + after the creation of the Graph().

+

To specify the scale for the Y2 axis you use the + SetY2Scale() Since you only specify one axis you only specify + "half" of the string in the previous examples. So to set a logarithmic + Y2 scale you will call

+  $graph->SetY2Scale( +"log"); +

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/71Lineplots.html b/html/includes/jpgraph/docs/html/71Lineplots.html new file mode 100644 index 0000000000..170a0aba4e --- /dev/null +++ b/html/includes/jpgraph/docs/html/71Lineplots.html @@ -0,0 +1,220 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1 Line plots

+

The first example draws a line graph consisting of 10 Y-values. In + this first example we show the full code. In the following examples we + will only show interesting piece of the code.

+(File: example0.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_line.php"); +
+
// Some data +
$ydata  += array(11,3, +8,12,5 +,1,9, +13,5,7 +); +
+
+// Create the graph. These two calls are always required +
$graph  += new Graph(350, +250,"auto");     +
$graph->SetScale( +"textlin"); +
+
// Create the linear plot +
$lineplot +=new LinePlot($ydata); +
$lineplot +->SetColor("blue"); +
+
// Add the plot to the graph +
$graph->Add( +$lineplot); +
+
// Display the graph +
$graph->Stroke(); +
?> +
+
+
Figure 4: A simple line graph [src]  +

+

+

+

You might note a few things

+ +

This is a perfect fine graph but looks a little bit "sparse". To + make it more interesting we might want to add a few things like

+ +

From looking at the previous example you can see that you access all + properties of JpGraph through the objects you create. Graph(), + LinePlot() and so on. In general all objects you can see in the graph + is accessed through a named instance.

+

For example the title of the graph is accessed through the + 'Graph::title' property. So to specify a title string you make a call + to the 'Set()' method on the title property as in:

+

+ $graph->title->Set +('Example 2');

+

So by adding just a few more lines to the previous code we get a + graph as shown below.

+
+
Figure 5: Same basic graph as in previous figure but with a + titles for graph and axis. +[src]  +

+

+

To achieve this we just needed to add a few more lines. (We only show + the part of example 1 we changed, to look at the full source just click + the [src] link in the caption. )

+   +// Setup margin and titles +
$graph->img-> +SetMargin(40,20 +,20,40); +
$graph->title-> +Set( +"Example 2"); +
$graph->xaxis-> +title->Set("X-title" +); +
$graph->yaxis-> +title->Set("Y-title" +); +

+

+

Again there are a couple of things you should note here

+ +

+

A nice change would now be to have all the titles in a bold font and + the line plot a little bit thicker and in blue color. Let's do that by + adding the lines

 $graph-> +title->SetFont(FF_FONT1 +,FS_BOLD); +
$graph->yaxis-> +title->SetFont(FF_FONT1 +,FS_BOLD); +
$graph->xaxis-> +title->SetFont(FF_FONT1 +,FS_BOLD); +
$lineplot +->SetColor("blue"); +
$lineplot +->SetWeight(2);   +// Two pixel wide
+

+

Again please note the consistent interface. To change font you just + have to invoke the SetFont() method on the appropriate object. This + principle is true for most methods you will learn. The methods may be + applied to a variety of objects in JpGraph. So for example it might not + come as a big surprise that to have the Y-axis in red you have to say:

+ $graph->yaxis->SetColor +("red")

+

or perhaps we also want to make the Y-axis a bit wider by

+  $graph +->yaxis->SetWidth( +2) +

+

As a final touch let's add a frame and a drop shadow around the + image since this is by default turned off. This is done with

+  $graph +->SetShadow()

+

The result of all these modifications are shown below.

+
+
Figure 6: Making the image a little bit more interesting by + adding som colors and changing the fonts [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/71Thebasicstructureofanimagemapscript.html b/html/includes/jpgraph/docs/html/71Thebasicstructureofanimagemapscript.html new file mode 100644 index 0000000000..e6b07ca10b --- /dev/null +++ b/html/includes/jpgraph/docs/html/71Thebasicstructureofanimagemapscript.html @@ -0,0 +1,66 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.1 The basic structure of an image map script

+

The standard structure for an HTML page using client side image maps + would be something along the lines of

+

+
+// Image map specification with name "mapname"
+<MAP NAME=...>
+... specification ...
+</MAP>
+
+// Image tag
+<img src="..." ISMAP USEMAP="mapname">
+
+

This poses an interesting question.

+

Since we normally call the graphing script directly in the <img> tag + how do we get hold of the image map (which is available only in the + image script) in this "HTML wrapper" script?

+

In JpGraph there is actually two ways of solving this.

+
    +
  1. Use the preferred "builtin" way using the modified Stroke() method + Graph::StrokeCSIM() instead of the standard Graph::Stroke() method.
  2. +
  3. Directly use the Graph::GetHTMLImageMap() which gives you fine + control at the expense of more complex coding.
  4. +
+

The first (and preferred) way modifies the stroke method so that + instead of returning an image (like the standard Stroke() method) + StrokeCSIM() actually returns an HTML page containing both the image + map specification and the correct <IMG> tag.

+

This of course means that it is necessary to treat an image map + returning image script differently from a non-CSIM image script, for + example you can't use it directly as the target for the "src" attribute + of the <IMG> tag since it sends back an actual HTML page containing + both an image tag together with an image map.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/720Adjustingtheautoscalinglimitsgracevalue.html b/html/includes/jpgraph/docs/html/720Adjustingtheautoscalinglimitsgracevalue.html new file mode 100644 index 0000000000..30bf7de262 --- /dev/null +++ b/html/includes/jpgraph/docs/html/720Adjustingtheautoscalinglimitsgracevalue.html @@ -0,0 +1,93 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.20 Adjusting the auto-scaling limits - grace value +

+

By default the auto-scaling algorithm tries to make best possible + use of screen estate by making the scale as large as possible, i.e. the + extreme values (min/max) will be on the top and bottom of the scale if + they happen to fall on a scale-tick. So for example doing a simple line + plot could look like the plot shown in the below.

+
+
Figure 100: A typical graph with autoscaling and grace=0 [src]  +

+

+

However you might sometime want to add some extra to the minimum and + maximum values so that there is some "air" in the graph between the end + of the scale values and the extreme points in the graphs. This can be + done by adding a "grace" percentage to the scale. So for example adding + 10% to the y-scale in the image above is done by calling the + SetGrace() method on the yscale as in

+

+ $graph->yaxis->scale +->SetGrace(10, +10); +

+

These lines add a minimum of 10% to the top and bottom values of the + scale. Note that we say "minimum" since depending on the specific tick + values choose this might be a little bit more to make the end of the + scale fall on an even tick mark.

+

Adding this line to the previous graph will result in the following + example

+

+
+
Figure 101: Adding 10% grace value to top and bottom of the + Y-scale [src] +  +

+

+

Since we haven't adjusted the position of the X-axis it will remain + at Y=0 which might not necessary be what we would like so we therefor + also add the line

+

+ $graph->xaxis->SetPos +("min");

+

+

So that the X-axis always will remain at the lowest possible + Y-value. Doing this will then result in the example below

+

+
+
Figure 102: Using grace but also adjusting the position of + the X-axis +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7210Creatingsemifilledbargraphs.html b/html/includes/jpgraph/docs/html/7210Creatingsemifilledbargraphs.html new file mode 100644 index 0000000000..9551e59009 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7210Creatingsemifilledbargraphs.html @@ -0,0 +1,50 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2.10 Creating semi-filled bar graphs

+

Semi filled bar graphs are in principle the same as normal filled + bar graphs but with the additional feature that you can choose to only + fill a specified range (or ranges) of X-coordinates. The figure below + illustrates this

+

+
+ + +
Figure 56: Semi-filled line graph [src]  +

+

+

+

In this example we defined two areas along the X-axis to be filled. + You can add filled areas by using the method + AddArea() and specifying range and color for the filled area.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7211Customizingthepatterns.html b/html/includes/jpgraph/docs/html/7211Customizingthepatterns.html new file mode 100644 index 0000000000..3806a67297 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7211Customizingthepatterns.html @@ -0,0 +1,90 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.21.1 Customizing the patterns

+

All patterns can be customized by

+ +

Note: 3D planes actually carry another + possible modification. You can specify the vanish point to change the + perspective used. You can't access the method to change the horizon + directly but you can access it through
+  $band +->prect->SetHorizon( +$aHorizon) +

+

+

assuming that the band is a 3D plane.

+

To finish this section we give one final, more creative, example on + how to use the bands.

+
+
Figure 113: Combining 3D plane, solid band and a sttaic line [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/721Addingbandsofpatternandcolortographs.html b/html/includes/jpgraph/docs/html/721Addingbandsofpatternandcolortographs.html new file mode 100644 index 0000000000..6a66337a65 --- /dev/null +++ b/html/includes/jpgraph/docs/html/721Addingbandsofpatternandcolortographs.html @@ -0,0 +1,130 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.21 Adding bands of pattern and color to graphs

+

As an additional way of emphasizing certain areas of the graph it is + possible to add bands (either vertical or horizontal) to any one of the + standard X-Y coordinate system based graphs. A band is a rectangular + area that stretches one entire axis. This means that if you define a + band between X-coordinates 3 and 5 the band area will occupy an area + between the X-coordinates and the entire Y-range.

+

In order to access this functionality you must first make sure that + you include the additional library file jpgraph_plotband.php

+

At the time of this writing (current as of JpGraph 1.8) the table + below illustrates the 8 basic types of patterns available. We will + shortly show you how you can customize these patterns, To keep these + examples clear we have only used one pattern in each figure.

+

+ + + + + +
+
+
Figure 103: +[src]  +

+
+

+
+
+
Figure 104: +[src]  +

+
+

+
+
+
Figure 105: +[src]  +

+
+

+
+
+
Figure 106: +[src]  +

+
+

+
+
+
Figure 107: +[src]  +

+
+

+
+
+
Figure 108: [src]  +

+
+

+
+
+
Figure 109: +[src]  +

+
+

+
+
+
Figure 110: +[src]  +

+
+

+
+

To add a one of these patterns to your graph you need to call the + method + PlotBand::PlotBand() The arguments is fairly easy to understand. + The pattern you would like to use is specified by using the correct + constant. You can see the name of the correct constants in the figures + above. You also need to specify if the band should stretch along the + vertical or horizontal axis as well as the min and max coordinates for + the band. As coordinates you may also use the special values "min" and + "max" which automatically sets the value to the minimum/maximum value + of the scale. The specified numeric value will be automatically + truncated to fit within the plot area.

+

We don't discuss the other arguments further here, instead we refer + you to the class reference.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/721Adjustingthewidthofthebars.html b/html/includes/jpgraph/docs/html/721Adjustingthewidthofthebars.html new file mode 100644 index 0000000000..41d3f2e6f2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/721Adjustingthewidthofthebars.html @@ -0,0 +1,51 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2.1 Adjusting the width of the bars

+

JpGraph allows you to easy customize the appearance of the bar + graph, for example to change the width of each bar. The width of each + bar can be specified either as a fraction of the width between each + major tick or as an absolute width (in pixels).

+

To set the width in fraction you use the method + SetWidth() and to set the width in pixels you use the + SetAbsWidth()

+

As an example let's take the previous example and set the width to + 100% of the distance between the ticks. The example will now become

+

+
+
Figure 34: Setting the width of the bars to 100% of the tick + width [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/722Addingstaticlinestotheplot.html b/html/includes/jpgraph/docs/html/722Addingstaticlinestotheplot.html new file mode 100644 index 0000000000..0246ff0721 --- /dev/null +++ b/html/includes/jpgraph/docs/html/722Addingstaticlinestotheplot.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.22 Adding static lines to the plot

+

In addition to the bands you can also add static lines to the graph. + An example of that is actually shown in figure 11 above. You create a + line as an instance of + class PlotLine . So for example the lines

+  $sline  += new PlotLine +(HORIZONTAL,0, +"black",2); +
$graph->Add( +$sline); +

+

will add a 2-pixel wide horizontal static line at Y-position zero.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/722Displayingthevalueofeachbar.html b/html/includes/jpgraph/docs/html/722Displayingthevalueofeachbar.html new file mode 100644 index 0000000000..6f6a088819 --- /dev/null +++ b/html/includes/jpgraph/docs/html/722Displayingthevalueofeachbar.html @@ -0,0 +1,104 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2.2 Displaying the value of each bar

+

You can easily choose to display the value (and it's format) on top + of each bar by accessing the bar's 'value' property. So for example by + just adding the line

+  $barplot->value-> +Show(); +

+

Will enable the values in it's simplest form and will give the + result

+
+
Figure 35: Showing the values for each bar [src]  +

+

+

You cane see a small nuisance in this graph. The auto scaling + algorithm chooses quite tight limits for the scale so that the bars + just fit. Adding the value on top of the bar makes it collide with the + top of the graph. To remedy this we tell the auto scaling algorithm to + allow for more "grace" space at the top of the scale by using the + method + SetGrace() which is used to tell the scale to add a percentage (of + the total scale span) more space to either one end or both ends of the + scale. In this case we add 20% more space at the top to make more room + for the values with the line

+  $graph->yaxis-> +scale-> +SetGrace(20);
+

+

+

This will then give the graph as shown below

+
+
Figure 36: Adding some grace space to the top of the Y-scale [src]  +

+

+

+

You can also adjust the general position of the value in respect to + the bar by using the + BarPlot::SetValuePos() method. You can set the position to either + 'top' (the default) , 'center' or 'bottom'. The graph below shows the + value being positioned in the center. In this example we have also + adjusted the format to just display the value as an integer without any + decimals.

+
+
Figure 37: Putting the values in the middle of the bar. [src]  +

+

+

It is also possible to specify a more fine grained control on how + you want the values presented. You can for example, rotate them, change + font, change color. It is also possible to adjust the actual value + displayed by either using a printf()-type format string or with the + more advanced technique of a format callback routine.

+

To show what you can do we just give another example for you to + examine without much further explanations. Just remember that to have + text at an angle other than 0 or 90 degrees we have to use TTF fonts. + Even though we haven't explained the SetFont() method it should be + fairly obvious.

+
+
Figure 38: Making the displayed values more interesting [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/723Addingadropshadowtothebar.html b/html/includes/jpgraph/docs/html/723Addingadropshadowtothebar.html new file mode 100644 index 0000000000..06610a1c4a --- /dev/null +++ b/html/includes/jpgraph/docs/html/723Addingadropshadowtothebar.html @@ -0,0 +1,44 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2.3 Adding a drop shadow to the bar

+

One simple way of making the bar graph more attracting is to add a + drop shadow to each bar. This is done by calling the + SetShadow() method. An example will clarify this.

+
+
Figure 39: Adding a drop shadow to each bar [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/724Adjustingthealignmentofbarsonatextscale.html b/html/includes/jpgraph/docs/html/724Adjustingthealignmentofbarsonatextscale.html new file mode 100644 index 0000000000..d640f06c11 --- /dev/null +++ b/html/includes/jpgraph/docs/html/724Adjustingthealignmentofbarsonatextscale.html @@ -0,0 +1,39 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2.4 Adjusting the alignment of bars on a text + scale

+

As you have seen from the previous examples bar graphs are normally + centered between the trick marks on a text scale. However, you can + modify this behavior by calling the method + BarPlot::SetAlign()

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/725Usinggroupedbarplots.html b/html/includes/jpgraph/docs/html/725Usinggroupedbarplots.html new file mode 100644 index 0000000000..ba994ef440 --- /dev/null +++ b/html/includes/jpgraph/docs/html/725Usinggroupedbarplots.html @@ -0,0 +1,87 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2.5 Using grouped bar plots

+

These types of bar graph is used to easy group two or more bars + together around each tick (X-value). The bars will be placed + immediately beside each other and as a group centered on each tick + mark. A grouped bar is created by aggregating two or more ordinary bar + graphs and creating a + GroupBarPlot() From two ordinary bar graphs along the lines of

+   +// Create the bar plots +
$b1plot  += new BarPlot($data1y); +
$b1plot->SetFillColor( +"orange"); +
+
$b2plot  += new BarPlot($data2y); +
$b2plot->SetFillColor( +"blue"); +
+
// Create the grouped bar plot +
$gbplot  += new GroupBarPlot +(array($b1plot +,$b2plot)); +
+
// ...and add it to the graPH +
$graph->Add( +$gbplot); +

+

The following example illustrates this type of graph

+
+
Figure 40: A grouped bar plot [src]  +

+

+

There is no limit on the number of plots you may group together.

+

If you use the SetWidth() method on the GroupBarPlot() this will + affect the total width used by all the added plots. Each individual bar + width will be the same for all added bars. The default width for + grouped bar is 70%.

+

Setting the grouped with to 0.9 would result in the image below.

+
+
Figure 41: Adjusting the width for a gropued bar plot. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/726Usingaccumulatedbarplots.html b/html/includes/jpgraph/docs/html/726Usingaccumulatedbarplots.html new file mode 100644 index 0000000000..f3b8a53e17 --- /dev/null +++ b/html/includes/jpgraph/docs/html/726Usingaccumulatedbarplots.html @@ -0,0 +1,52 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2.6 Using accumulated bar plots

+

The final variety of group bars you can have are accumulated bars. + They work in much the same way as accumulated line plots described + above. Each plot is stacked on top of each other.

+

You create accumulated bar plots in the same way as grouped bar + plots by first creating a number of ordinary bar plots that are then + aggregated with a call to + AccBarPlot();

+

An example makes this clear. Let's use the same data as in the two + examples above but instead of grouping the bars we accumulate (or + stack) them. The code would be very similar (actually only one line has + to change)

+
+
Figure 42: Accumulated bar plots [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/727Usinggroupedaccumulatedbargraphs.html b/html/includes/jpgraph/docs/html/727Usinggroupedaccumulatedbargraphs.html new file mode 100644 index 0000000000..d1616cf84c --- /dev/null +++ b/html/includes/jpgraph/docs/html/727Usinggroupedaccumulatedbargraphs.html @@ -0,0 +1,95 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2.7 Using grouped accumulated bar graphs

+

It is perfectly possible to combine the previous bar types to have + grouped accumulated bar plots. This is done by just adding the + different accumulated plots to a group bar plot, for example the + following code would do that.

+   +// Create all the 4 bar plots +
$b1plot  += new BarPlot($data1y); +
$b1plot->SetFillColor( +"orange"); +
$b2plot  += new BarPlot($data2y); +
$b2plot->SetFillColor( +"blue"); +
$b3plot  += new BarPlot($data3y); +
$b3plot->SetFillColor( +"green"); +
$b4plot  += new BarPlot($data4y); +
$b4plot->SetFillColor( +"brown"); +
+
// Create the accumulated bar plots +
$ab1plot  += new AccBarPlot +(array($b1plot +,$b2plot)); +
$ab2plot  += new AccBarPlot +(array($b3plot +,$b4plot)); +
+
// Create the grouped bar plot +
$gbplot  += new GroupBarPlot +(array($ab1plot +,$ab2plot)); +
+
// ...and add it to the graph +
$graph->Add( +$gbplot); +

+

Putting this together in an example would then produce the graph as + shown below

+
+
Figure 43: Combining grouped and accumulated bar plots [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/728Horizontalbargraphs.html b/html/includes/jpgraph/docs/html/728Horizontalbargraphs.html new file mode 100644 index 0000000000..17fa365731 --- /dev/null +++ b/html/includes/jpgraph/docs/html/728Horizontalbargraphs.html @@ -0,0 +1,98 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2.8 Horizontal bar graphs

+

It can often come in handy to have horizontal bar graphs especially + if you have a large number of values to display. Even though JpGraph + doesn't directly support horizontal bar graphs this is easy achieved by + constructing a normal vertical bar graph which is then rotated 90 + degrees.

+

The example below shows a simple example of this

+
+
Figure 44: A typical horizontal bar graph with the Y-axis at + the bottom +[src]  +

+

+

+

In order to achieve this effect you should study the above example + carefully and you might notice two things

+ +

We finally show three more examples of horizontal bar plots. In the + first plot we have hidden the Y-axis and in the second we have + positioned the Y - axis at top as opposed to the bottom as the first + example shows.

+

+
+
Figure 45: Horizontal bar graph with hidden Y axis [src]  +

+

+

+
+
Figure 46: Horizontal bar graph with Y axis at the top [src]  +

+

+

+

In the final example which is almost similar to the two first we + illustrate the use of labels with more than one line.

+
+
Figure 47: Horizontal bar graph with manual integer scale as + well as multiple line labels +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/729Usinggradientfillforbargraphs.html b/html/includes/jpgraph/docs/html/729Usinggradientfillforbargraphs.html new file mode 100644 index 0000000000..f6f4f37d02 --- /dev/null +++ b/html/includes/jpgraph/docs/html/729Usinggradientfillforbargraphs.html @@ -0,0 +1,126 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2.9 Using gradient fill for bar graphs

+

It is possible to use color gradient fill for the individual bars in + the bar graph.

+

Color gradient fill fills a rectangle with a smooth transition + between two colors. In what direction the transition goes (from left to + right, down and up, from the middle and out etc) is determined by the + style of the gradient fill. JpGraph currently supports 8 different + styles. All supported styles are displayed in the figure below.

+
+
Figure 48: +[src]  +

+

+

+
+
Figure 49: +[src]  +

+

+

+
+
Figure 50: +[src]  +

+

+

+
+
Figure 51: +[src]  +

+

+

+
+
Figure 52: +[src]  +

+

+

+
+
Figure 53: +[src]  +

+

+

+
+
Figure 54: +[src]  +

+

+

+
+
Figure 55: +[src]  +

+

+

+

To specify a gradient fill for the bar plots you make use of the + method + BarPlot::SetFillGradient() . See the class reference for details of + this function.

+

When using gradient fills there are a couple of caveats you should + be aware of:

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/72Bargraphs.html b/html/includes/jpgraph/docs/html/72Bargraphs.html new file mode 100644 index 0000000000..afbf33932a --- /dev/null +++ b/html/includes/jpgraph/docs/html/72Bargraphs.html @@ -0,0 +1,95 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2 Bar graphs

+

Jpgraph also supports 2D vertical bar plots. Before you can use any + bar plots you must make sure that you included the file + "jpgraph_bar.php" in your script.

+

Using bar plots is quite straightforward and works in much the same + way as line plots which you are already familiar with from the previous + examples. Assuming you have a data array consisting of the values + [12,8,19,3,10,5] and you want to display them as a bar plot. This is + the simplest way to do this:

+  $datay=array(12, +8,19,3 +,10,5); +
$bplot  += new BarPlot($datay); +
$graph->Add( +$bplot); +

+

If you compare this to the previous line examples you can see that + the only change necessary was that instead of creating a new line plot + (via the new LinePlot(...) call) we used the statement new + BarPplot().

+

The other change we should do is to make sure the X-axis have an + text-scale (it is perfectly fine to use a linear X-scale but in most + cases this is not the effect you want when you use a bar graph, see + more below). With this two simple change we will now get a bar graph as + displayed in the following image

+
+
Figure 31: A very simple bar graph [src]  +

+

+

You can of course modify the appearance of the bar graph. So for + example to change the fill color you would use the + BarPlot::SetFillColor() method. Making this small change to the + previous example would give the expected effect as can be seen in the + next example.

+
+
Figure 32: A very simple bar graph with changed fill color [src]  +

+

+

Note: You should note from the previous two + graphs that slight change in appearance for the X-scale. The bar graphs + gets automatically centered between the tick marks when using as text + x-scale. If you were to use a linear scale they would instead start at + the left edge of the X-axis and the X-axis would be labeled with a + linear scale. As is illustrated in the (small) example below.
+
+
Figure 33: A small example with a bar graph using a linear + X-scale [src] +  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/72Specifyingtargetsforimagemapplots.html b/html/includes/jpgraph/docs/html/72Specifyingtargetsforimagemapplots.html new file mode 100644 index 0000000000..1de695b81f --- /dev/null +++ b/html/includes/jpgraph/docs/html/72Specifyingtargetsforimagemapplots.html @@ -0,0 +1,60 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.2 Specifying targets for image map plots

+

To turn a standard image script into a CSIM script the first thing + needed to do is to supply the appropriate URL targets for the hotspots + in the image.

+

What the hotspots represent depends on the type of plot you are + doing. The following plot types and graph areas support image maps.

+ +

To specify a link for each hotspot you have to use the + SetCSIMTargets() method for each plot (or specific area) in the + graph which should be a hotspot.

+

There are two arguments to this method

+
    +
  1. $aTargets, an array of valid URL targets. One URL per hot spot, for + example if you have a 10 values bar plot you need 10 URLs. If the + SetCSIMTarget() is applied to, for example, a text then of course only + one URL target should be specified.
  2. +
  3. $aAlts, an array of valid alt-texts. Many browsers (but not all) + will show this text string if the mouse hovers over a hotspot.
  4. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/731Usinglineerrorplots.html b/html/includes/jpgraph/docs/html/731Usinglineerrorplots.html new file mode 100644 index 0000000000..e19cdf545f --- /dev/null +++ b/html/includes/jpgraph/docs/html/731Usinglineerrorplots.html @@ -0,0 +1,82 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.3.1 Using line error plots

+

A line error plot is an error plot with the addition that a line is + drawn between the average value of each error pair. You use this type + of plot the exact same way you would use an error plot. The only change + is that you must instantiated an + ErrorLinePlot() instead and make sure you have included the + "jpgraph_line.php" since the line error plot makes use of the line plot + class to stroke the line.

+

To control the various properties of the line drawn the "line" + property of the error line plot may be accessed. So, for example, if + you want the line to be 2 pixels wide and blue you would have to add + the following two lines

+  $elplot->line-> +SetWeight(2); +
$elplot->line-> +SetColor( +"blue"); +

+

to generate the graph as shown below

+
+
Figure 59: Linear error plot [src]  +

+

+

You may of course add legends to none, one or both of the line types + in the above graph. So for example if we wanted the legend "Min/Max" + for the red error bars and a legend "Average" for the blue line you + would have to add the lines

+  $errplot->SetLegend( +"Min/Max"); +
$errplot->line-> +SetLegend( +"Average"); +

+

The resulting graph will now look like (note that we are using the + default placement of the legend box)

+
+
Figure 60: Addding a legend box to the line error plot. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/73Errorplots.html b/html/includes/jpgraph/docs/html/73Errorplots.html new file mode 100644 index 0000000000..007fe74b74 --- /dev/null +++ b/html/includes/jpgraph/docs/html/73Errorplots.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.3 Error plots

+

Error plots are used to visually indicate uncertainty in data + points. This is done by for each X value by giving both a minimum and a + maximum Y-value.

+

Before you can use error plots you must remember to include the file + "jpgraph_error.php" in your script.

+

The following example illustrates a simple error bar. We will have 5 + points, so we need 10 Y-values. We also would like the error bars to be + red and 2 pixels wide. All this is accomplished by creating an + ErrorPlot() in much the same way as, for example, a normal line + plot. Doing this would now give the example shown below.

+

+
+
Figure 57: A simple error bar [src]  +

+

+

You might notice that there is one displeasing esthetic quality of + this graph. The X-scale is just wide enough to just accompany the + number of error bars and hence the first bar is drawn on the Y-axis and + the and last bar just at the edge of the plot area. To adjust this you + might call the SetCenter() + method which will adjust the X-scale so it does not use the full width + of the X-axis.

+

The following example illustrates the use of this feature by + applying this technique to the previous example

+
+
Figure 58: Adjusting the X-scale not to use the full width of + the X-axis. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/73UsingStrokeCSIM.html b/html/includes/jpgraph/docs/html/73UsingStrokeCSIM.html new file mode 100644 index 0000000000..ed4618aa46 --- /dev/null +++ b/html/includes/jpgraph/docs/html/73UsingStrokeCSIM.html @@ -0,0 +1,107 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.3 Using StrokeCSIM()

+

The simplest way of creating a creating a CSIM image is with the + StrokeCSIM() method. As mentioned before this method actually returns a + (small) HTML page containing both the image-tag as well as the image + map specification. Hence it is not possible to use a script that + ends with this method in a standard image-tags src property.

+

There are two ways to create CSIM (or get hold of) the image maps

+
    +
  1. Use the CSIM image script as the target in a standard anchor + reference, for example +
    +<a href="mycsimscript.html">
    +
    +
    This has the drawback that the image page will only contain the + image and nothing else.
  2. +
  3. The other way will allow the image script to be included in an + arbitrary HTML page by just including the image script at the wanted + place in the HTML page using any of the standard "include" php + statement. For example +
    +<h2> This is an CSIM image </h2>
    +
    +<?php
    +include "mycsimscript.php"
    +?>
    +
    +
  4. +
+

Note: If there are several CSIM images on + the same page it is necessary to use "include_once" in the scripts for + the inclusion of "jpgraph.php" and the other jpgraph library files + since the files will be included multiple times on the same page and + one or more "Already defined error" will be displayed.

+

The process to replace Stroke() with StrokeCSIM() is strait forward. + Replace all existing calls to Stroke() with the equivalent calls to + StrokeCSIM().

+

The only difference is that it is necessary ti supply a minimum of + one file name in the StrokeCSIM() method. The first argument must be + the name of the actual image script file including the extension. So + for example if the image script is called "mycsimscript.php" it is + necessary to write +
 

+ $graph-> +StrokeCSIM( +'mycsimscript.php') +

+

+
However, it is possible to apply a small "trick" here. PHP maintain + a special variable called "__FILE__" which is always set to the current + file name. This means you could use the following construction:

+

+ $graph-> +StrokeCSIM( +basename( +__FILE__)) +

+

This is a better way since the script can now be renamed without + having to change any code in the file which otherwise would be needed.

Note: Why does the script name need to be used as + the first parameter? The reason is that in the creation of the HTML + page which is sent back we need to refer to the script in the image + tag. So why is it not possible to use the PHP_SELF reference? The + problem with PHP_SELF is that in the case where we include the + image-script in an HTML page and use the PHP_SELF we will get the name + of the HTML page and not the actual script in which the PHP_SELF is + used. We also can not use the __FILE__ trick in the library since in + the context __FILE__ is set to "jpgraph.php". Hence, this must be + specified by the client as shown above.

+

The other arguments to StrokeCSIM() are optional. Please note that + if several CSIM images are used in the same HTML page it is also + necessary to specify the image map name as the second parameter since + all image maps must be unique to properly match each image map against + each image. Please consult the class reference + StrokeCSIM() for more details.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/74ExamplesofImagemaps.html b/html/includes/jpgraph/docs/html/74ExamplesofImagemaps.html new file mode 100644 index 0000000000..2f34dbe468 --- /dev/null +++ b/html/includes/jpgraph/docs/html/74ExamplesofImagemaps.html @@ -0,0 +1,58 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.4 Examples of Image maps

+

In the Example/ directory there are a number of examples of how to + setup the various types of image maps. The following examples are + currently available

+ +

In order to easily access all of these examples it is possible to + call the testsuit.php example with an additional argument "t=2". + By following the link +testsuit.php?t=2 a separate window will open with all the possible + CSIM examples.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/74Scatterplots.html b/html/includes/jpgraph/docs/html/74Scatterplots.html new file mode 100644 index 0000000000..62797e9b6a --- /dev/null +++ b/html/includes/jpgraph/docs/html/74Scatterplots.html @@ -0,0 +1,113 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.4 Scatter plots

+

Scatter plots are very simple; they plot a number of points + specified by their X- and Y-coordinate. Each point is stroked on the + image with a mark as with line plots. The stroked marks can also be + connected with an optional line.

Note: Even + though it is only scatter plot that was designed to be used with X,Y + plots it is perfectly possible to use use both X,Y coordinates for bar + and line plots as well.

+

Even though you would normally supply X-coordinates it is still + perfectly possible to use a text-scale for X-coordinates to just + enumerate the points. This is especially useful when using the + "Impulse" type of scatter plot as is shown below.

+

Scatter pots are created by including the jpgraph extension + "jpgraph_scatter.php" and then creating an instance of plot type of + ScatterPlot(). To specify the mark you want to use you access the mark + with the instance variable "mark" in the scatter plot. The default is + to use an unfilled small circle.

+

To create a scatter plot you will create an instance

+

A simple example using just default values will illustrate this

+

+
+
Figure 61: The simplest possible scatter plot [src]  +

+

+

We can easily adjust the size and colors for the markers to get + another effect as shown below

+
+
Figure 62: The simplest possible scatter plot with adjusted + marks [src] +  +

+

+

Another possible variant of scatter plot is impulse-scatter plots. + This is a variant of normal scatter plot where each mark have a line + from the mark to the Y=0 base line. To change a scatter plot into an + impulse scatter plot you have to call the method + SetImpuls() on the scatter plot.

+

This type of plots are often used to illustrate signals in + conjunction with digital signal processing. The following two examples + illustrates simple use of impulse plots.

+
+
Figure 63: A simple impuls plot [src]  +

+

+

The next example shows how to modify the color and width of the + impulse plot

+
+
Figure 64: A modified impuls plot [src]  +

+

+

Note: You may draw impulse graphs without + any mark by specifying the mark type as (-1) . That way only the + impulse lines will be drawn.

+

As a final touch we show two more advanced impulse graphs . In these + graphs we have used more advanced formatting for the Y-axis labels as + well as adjusted the position of the axis position.

+
+
Figure 65: In this imuplsplot we have adjusted the position + of the X-axis to the bottom and also added more decimals to the labels + on the Y-axis +[src]  +

+

+

+
+
Figure 66: In this impuls plot we have also added a lineplot + with a dotted line style. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/75Fieldplots.html b/html/includes/jpgraph/docs/html/75Fieldplots.html new file mode 100644 index 0000000000..c04721348d --- /dev/null +++ b/html/includes/jpgraph/docs/html/75Fieldplots.html @@ -0,0 +1,60 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.5 Field plots

+

A variant of scatter plot is the so called Field Plots this + is basically a scatter plot where each scatter point is an arrow with a + direction between 0 to 359 degrees. This effectively allows the + visualization of 3 parameters at each point (x,y,angle). As an + additional bonus there is also possible to define a callback for each + scatter plot to also define the color for each point.

+

To create a field plot you create an instance of +FieldPlot in the same way as you created a normal scatter plot. The + arguments to this method are Y-coordinate, X-coordinate and angle. To + specify a callback you use +FieldPlot::SetCallback()

+

The following example (and code) illustrates the usage of the field + plot type.

+

+
+
Figure 67: Example of the Field plot type [src]  +

+

+

In addition to the parameters mentioned above you can also adjust + both the general size of the arrow and also the specific size of the + arrowhead. The arrow size is specified in pixels and the arrow head is + specified as an integers between 0 and 10. These sizes are specified + with a call to +FieldPlot::arrow::SetSize()

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/75HowdoesStrokeCSIMwork.html b/html/includes/jpgraph/docs/html/75HowdoesStrokeCSIMwork.html new file mode 100644 index 0000000000..6f32ef63e1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/75HowdoesStrokeCSIMwork.html @@ -0,0 +1,51 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.5 How does StrokeCSIM() work?

+

Knowledge of the exact technical details of the way StrokeCSIM() + works is probably not needed by many people but for completeness we + outline those details in this short section.

+

The fundamental issue we have to solve is that we must be able to + call the image script in two modes. When the user includes the image + script the StrokeCSIM() method should return the HTML page but when the + image script is later called directly in the image tag it must not + return an HTML page but rather the actual image.

+

The way this is solved is by using one HTTP argument which is passed + on automatically when we use the image script name in the image-tag.

+

If you look at the generated HTML you will see that the argument to + the src-property of the image tag is not simply the script name but the + script name with a additional argument.

+

In the JpGraph internal code this pre-defined argument is checked + for and if it exists the image is send back and not the HTML page.

+

The name of this argument is defined by a DEFINE() statement in + JpGraph. The define is _CSIM_DISPLAY.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/761StockCharts.html b/html/includes/jpgraph/docs/html/761StockCharts.html new file mode 100644 index 0000000000..6ba6c68eb8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/761StockCharts.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.6.1 Stock Charts

+

Stock charts is used to display data values where one is interested + in 4 different values for each data point. This could for example be + used to display a stocks open,close, min and max value during a + specific day. Hence the name Stock chart (or Stock plot).

+

The figure below illustrates a sample Stock chart plot

+
+
Figure 68: A simple stock plot [src]  +

+

+

For this type of plot the Y-data array must be consist of a number + of quadruples of data where each quadruple consists of + (open,close,min,max). The open and close values determine the min max + for the middle bar and the min,max determine the end points of the + "error-lines" at the top and bottom of of each bar.

+

Note that the data follows the following rules

+ +

To separate the two cases where "open > close" or "open < close " + different colors are used. These colors are specified with the +SetColor() method. By default a positive bar (close > open) have a + fill color of white and for the negative case where (close < open) the + bars have a red color.

+

You can specify the width of the bar by setting the width (in + pixels) with a call to the method +SetWidth()

+

The final variation of stock plots you can have is to determine + whether or not the end point for the min,max lines should have the + horizontal line marking the end of the line or not. This can be + adjusted with a call to method +HideEndLine().

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/762BoxPLotsStockchartswithamedianline.html b/html/includes/jpgraph/docs/html/762BoxPLotsStockchartswithamedianline.html new file mode 100644 index 0000000000..1574ef1b2e --- /dev/null +++ b/html/includes/jpgraph/docs/html/762BoxPLotsStockchartswithamedianline.html @@ -0,0 +1,48 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.6.2 BoxPLots : Stock charts with a median line

+

A minor variation of stock charts is the "BoxPlot()" this is almost + the same as StockPlot() but with the very small difference that in + addition to the open,close,min, max values you also specify a median + value . The median lies between the open and close value and is + illustrated as a horizontal line within the bar.

+
+
Figure 69: A simple box type stock plot [src]  +

+

+

You may modify the median line color for positive and negative data + points / bars by using the +SetMedianColor() method.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/763ImagemapsforBoxandStockcharts.html b/html/includes/jpgraph/docs/html/763ImagemapsforBoxandStockcharts.html new file mode 100644 index 0000000000..ed21c67946 --- /dev/null +++ b/html/includes/jpgraph/docs/html/763ImagemapsforBoxandStockcharts.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.6.3 Image maps for Box and Stock charts

+

In the same way as for other plots you may associate an image map + with these plots. The "hot" area for each plot is the mid "bar" + section. In the same way as other plot types you use the + SetCSIMTargets() to set the URLs you want to use.

+

These plot types, though normally used without explicit X-values, + can of course handle a supplied X-coordinate array without any problem.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/76BoxandStockcharts.html b/html/includes/jpgraph/docs/html/76BoxandStockcharts.html new file mode 100644 index 0000000000..d49029af47 --- /dev/null +++ b/html/includes/jpgraph/docs/html/76BoxandStockcharts.html @@ -0,0 +1,36 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.6 Box and Stock charts

+

JpGraph offers two variation on what is usually known as stock + charts, candle-charts or box plot.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/76Gettingholdoftheimagemap.html b/html/includes/jpgraph/docs/html/76Gettingholdoftheimagemap.html new file mode 100644 index 0000000000..5d26ee2ef3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/76Gettingholdoftheimagemap.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.6 Getting hold of the image map

+

In the case where you want to store the image on disk and later use + it in an img-tag you need to get hold of the image map. For this you + will have to use the function + Graph::GetHTMLImageMap()

+

An example of the use of this is shown below. With these lines the + image will be written to a file. The script then returns a HTML page + which contains the Client side image map and an img-tag which will + retrieve the previously stored file.

+  $graph->Stroke( +"/usr/local/httpd/htdocs/img/image001.png" +); +
echo 
$graph +->GetHTMLImageMap +("myimagemap001" +); +
echo 
+"<img src=\"img/image001.png\" ISMAP USEMAP=\"#myimagemap001\" border=0>" +;
+

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/77Combiningdifferentgraphtypes.html b/html/includes/jpgraph/docs/html/77Combiningdifferentgraphtypes.html new file mode 100644 index 0000000000..58ba2f9686 --- /dev/null +++ b/html/includes/jpgraph/docs/html/77Combiningdifferentgraphtypes.html @@ -0,0 +1,108 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.7 Combining different graph types

+

It is perfectly legal to add several different plot types to the + same graph. It is therefore possible to mix line plots with (for + example) filled bar graphs. What you should keep in mind doing this is + the order in which these plots are stroked to the image since a later + stroke will overwrite a previous one. All plots are stroked in the + order you add them, i.e. the first plot added will be stroked first. + You can therefore control which plot is placed in the background and + which one is placed in the foreground by the order you add them to the + plot.

+

To start simple we just mix a filled line plot with a non-filled + line plot as the following example shows.

+

+
+
Figure 70: Mixing filled and non-filled line plots in the + same graph +[src]  +

+

+

+

Let's now go to something a little bit more complicated. How to mix + bar and line graphs. Let's just take one of our previous bar graphs and + add a line plot to it and see what happens.

+

+
+
Figure 71: Adding a line to a bar graph [src]  +

+

+

Not too bad. But we can't see the line so we change the order in + which we add the lines to the graph and sees what happens.

+
+
Figure 72: Adding a line to a bar graph, in different orderv2 + [src]  +

+

+

+

If you want the line points to be aligned in the center of the bars + you can accomplish this is two ways.

+

If you use a text scale then you need to call the + LinePlot::SetBarCenter()

+
+
Figure 73: Centering the line point in the middle of the bars + using LinePlot::SetBarCenter() [src]  +

+

+

+

You can also use an integer scale. This places both + the bar and the line points centered at the tick marks. As the + following example will show

+

+
+
Figure 74: Using a linear scale [src]  +

+

+

Note: In this example we also have + illustrated the fact that it is possible to add text labels to a linear + (or integer) scales as well.

+

As a final example we show how you can combine a scatter plot and a + line plot which could be used to illustrate a regression line fitting.

+
+
Figure 75: Combining a scatter plot and a line plot [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/77Imagemapsandthecachesystem.html b/html/includes/jpgraph/docs/html/77Imagemapsandthecachesystem.html new file mode 100644 index 0000000000..2e1598d6bb --- /dev/null +++ b/html/includes/jpgraph/docs/html/77Imagemapsandthecachesystem.html @@ -0,0 +1,39 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.7 Image maps and the cache system

+

For version 1.9 the cache system has been extended to include even + the CSIM maps. For each CSIM graph two files are stored in the cache, + the image file itself as well as the wrapper HTML with the actual image + map. For further information see the chapter on "Understanding the + Cache system"

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/78Specifyingthescalemanually.html b/html/includes/jpgraph/docs/html/78Specifyingthescalemanually.html new file mode 100644 index 0000000000..6164f962d4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/78Specifyingthescalemanually.html @@ -0,0 +1,106 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.8 Specifying the scale manually

+

Normally the automatic scaling should be doing an adequate job in + most circumstances but there might be cases where you like to manually + set the scale. For example if you have several graphs where you like to + be able to easily compare them and therefore want them all to have the + same scale.

+

To specify a manual scale you have to add arguments to the standard Graph::SetScale() method. + So to specify that you want an Y-scale between 0 and 100 you need to + write

+ $graph-> +SetScale( +"textlin",0,100 +);

+

When you specify a scale manually there is one additional thing you + need to decide. How the tick marks should be positioned. You have three + choices

+
    +
  1. Let JpGraph decide suitable tick marks honoring the exact scale you + specified. This is the default behavior if you don't do anything + else.
  2. +
  3. Allow JpGraph to slightly adjust your specified min and max values. + With the default method, depending on the min and max values, the end + and start of the scale might not fall on an exact tick mark. For + esthetic reasons you might still want the last/first tick mark to fall + on the edges of the scale. By calling + LinearScale::SetAutoTicks() you tell JpGraph to make the smallest + necessary adjustment of the end/start points so that they fall on an + exact tick mark.
  4. +
  5. Manually specify the tick marks with a call to + LinearTicks::Set() For example
    +  $graph->SetScale( +"textlin",0,100 +); +
    $graph->yscale-> +ticks->Set(10 +,5);
    +

    Will set the major tick marks every at 0,10,20,.. And every minor + tick mark in between (0,5,10,15,20,25,...).

    +
  6. +
+

The three images below illustrates the difference between the + possibilities of ticks for a manual scale.

+
+
Figure 76: Manual scale, manual ticks major=7 minor=2 [src]  +

+

+

+

+
+
Figure 77: Manual scale, automatic ticks with exact limits [src]  +

+

+

+

+
+
Figure 78: Manual scale, automatic ticks where we allow + adjustments of the limits +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/79Adjustingtheautomatictickmarks.html b/html/includes/jpgraph/docs/html/79Adjustingtheautomatictickmarks.html new file mode 100644 index 0000000000..6d9775fe65 --- /dev/null +++ b/html/includes/jpgraph/docs/html/79Adjustingtheautomatictickmarks.html @@ -0,0 +1,54 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7.9 Adjusting the automatic tick marks

+

You can adjust the automatic tick marks by telling JpGraph how dense + you want them to be. You use the + Graph::SetTickDensity() method. You can set the density setting in + four steps

+ +

Taking the previous example with the manual scale but automatic + ticks and using a denser ticks setting gives the following result

+
+
Figure 79: Manual scale with automatic ticks but with a + denser tick settings. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7UsingimagemapswithJpGraph.html b/html/includes/jpgraph/docs/html/7UsingimagemapswithJpGraph.html new file mode 100644 index 0000000000..8c2c73d166 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7UsingimagemapswithJpGraph.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7 Using image maps with JpGraph

+

Image maps, or client side image (CSIM) as they are known is fully + supported in JpGraph. It gives you the opportunity to create hot-spots + in the graphs which allows you to build a set of "drill-down" graphs.

+

In the following section is based on the assumption that the reader + is familiar with the basic concepts of client side image map in HTML.

+

To shortly recapitulate. Client side image maps consists of two + parts. The first part is the actual image and the second part is a + mapping that gives the coordinates for areas in the image which should + be marked as hot spots (i.e. click-able by the user). The library can + automatically generate these coordinate maps from a given graph.

+

Through out the manual areas of the graph that may be used as a + hotspot is given in conjuction with the general description of that + area.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/7WorkingwithorthogonalXYplots.html b/html/includes/jpgraph/docs/html/7WorkingwithorthogonalXYplots.html new file mode 100644 index 0000000000..fc9186e462 --- /dev/null +++ b/html/includes/jpgraph/docs/html/7WorkingwithorthogonalXYplots.html @@ -0,0 +1,41 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

7 Working with orthogonal X,Y-plots

+

The purpose of this chapter is to introduce the basic concepts of + creating scripts with JpGraph that will generate various types of basic + plots. Throughout the text it is possible to view the exact source for + all the graphs by clicking on the "[src]" link in the caption of the + image shown. This will open the image together with the source in a + separate window. This way it is easy to compare the actual image with + the script that generated the image.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8101Usingtheautomaticdatetimescale.html b/html/includes/jpgraph/docs/html/8101Usingtheautomaticdatetimescale.html new file mode 100644 index 0000000000..8f68180cc3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8101Usingtheautomaticdatetimescale.html @@ -0,0 +1,216 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.10.1 Using the automatic date/time scale

+

The easiest way to get a date time scale for the X-axis is to use + the pre-defined "dat" scale. To be able to use that it is first + necessary to include the module "jpgraph_date.php" and the + specify the scale, for example as "datlin" in the call to SetScale() + as the following code snippet shows.

+  require_once("../jpgraph.php"); +
require_once(
"../jpgraph_line.php"); +
require_once(
"../jpgraph_date.php"); +
... +
$graph  += new Graph(540, +300); +
$graph->SetScale( +'datlin'); +
...

+

The above code snippet would create a date/linear scale for the + graph. We will first show a basic use of the date scale and then go on + to illustrate how it is possible to tailor the exact formatting of the + date axis.

+

When using the fully automatic formatting the library will use the + shortest possible string that uniquely identifieas a date/time. For + example if the entire intervall falls within the same day only the time + values will be displayed, if the intervall falls over several days then + also the date will be added to the label.

+

As usual it is also possible to manually force a certain label + formatting to be used this is illustrated below.

+

8.10.1.1 Specifying the input data

+

The first basic example below creates a data set that emulates a + sample rate every S second and falls over a total period of two days. + It is important to note that the input data on the X-axis must be a in + the form of timestamp data, i.e. the number of seconds from the system + epoch. In PHP the current timestamp value is returned by the function + time().

+

This means that it is always mandatory to specify two input vectors + for a plot. For example to specify a line plot

+  $line  += new LinePlot +($data,$xdata); +

+

The example below show this in practice

+
+
Figure 76: Using the special date X-axis with all default + values [src] +  +

+

+

Please review the script (by following the [src] link) that creates + this graph before continuing since we will base all further examples on + the above example.

+

8.10.1.2 Adjusting the start and end alignment

+

As can be seen from the above example the scale starts slightly + before the first data point. Why? This is of course by purpose in order + to make the first time label to start on an "even" value, in this case + on an hour. Depending on the entire interval of the graph the start + value will always be chosen to be the largest "even" time value, this + could for example be on an even minute, even 30min, even hour, even + day, even week and so on.

+

The alignment of the start (and end) vdate alignment can also be + adjusted manually by using the two methods

+ +

These method allow the alignment to be made by specifying one of the + following constants.

+

For the SetTimeAlign() the following symbolic constants can be used

+
    +
  1. Alignment on seconds +
      +
    • MINADJ_1, Align on a single second (This is the lowest resolution)
    • +
    • MINADJ_5, Align on the nearest 5 seconds
    • +
    • MINADJ_10, Align on the nearest 10 seconds
    • +
    • MINADJ_15, Align on the nearest 15 seconds
    • +
    • MINADJ_30, Align on the nearest 30 seconds
    • +
    +
  2. +
  3. Alignment on minutes +
      +
    • MINADJ_1, Align to the nearest minute
    • +
    • MINADJ_5, Align on the nearest 5 minutes
    • +
    • MINADJ_10, Align on the nearest 10 minutes
    • +
    • MINADJ_15, Align on the nearest 15 minutes
    • +
    • MINADJ_30, Align on the nearest 30 minutes
    • +
    +
  4. +
  5. Alignment on hours +
      +
    • HOURADJ_1, Align to the nearest hour
    • +
    • HOURADJ_2, Align to the nearest two hour
    • +
    • HOURADJ_3, Align to the nearest three hour
    • +
    • HOURADJ_4, Align to the nearest four hour
    • +
    • HOURADJ_6, Align to the nearest six hour
    • +
    • HOURADJ_12, Align to the nearest tolw hour
    • +
    +
  6. +
+

For the SetDateAlign() the following symbolic constants can + be used

+
    +
  1. Alignment on a day basis +
      +
    • DAYADJ_1, Align on the start of a day
    • +
    • DAYADJ_7, Align on the start of a week
    • +
    • DAYADJ_WEEK, Synonym to DAYADJ_7
    • +
    +
  2. +
  3. Alignment on a monthly basis +
      +
    • MONTHADJ_1, Align on a month start
    • +
    • MONTHADJ_6, Align on the start of halfyear
    • +
    +
  4. +
  5. Alignment on a yearly basis +
      +
    • YEARADJ_1, Align on a year
    • +
    • YEARADJ_2, Align on a bi-yearly basis
    • +
    • YEARADJ_5, Align on a 5 year basis
    • +
    +
  6. +
+

Some examples will calrify the use of these methods.

+

Example 1. We want the time adjustment to start on an even + quarter of an hour, i.e. an even 15 minute period.

+  $graph +->xaxis->scale-> +SetTimeAlign( +MINADJ_15); +

+

+

Example 2. We want the time to start on an even 2 hour

+  $graph +->xaxis->scale-> +SetTimeAlign( +HOURADJ_2); +

+

+

Example 3. We want the start to be on an even day

+  $graph +->xaxis->scale-> +SetDateAlign( +DAYADJ_1); +

+

+

8.10.1.3 Adjusting the label format

+

The default label format always tries to use the shortest possible + unique string. To manually set a manual scale the method + SetDateFormat() is used for example as in

+  $graph +->xaxis->scale-> +SetDateFormat( +'H:i'); +

+

The above example will force the labels to be displayed as hour (24h) + and minutes.

+
+
Figure 77: Using specific label format and align time axis to + start and end on an even 10min [src]  +

+

+

+

8.10.1.4 Adjusting the date scale density

+

As with the linear scale it is possible to indicate what density of + scale ticks is needed. This is specified as usual with a call to + Graph::SetTickDensity()

+  $graph->SetTickDensity( +TICKD_DENSE); +

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8102Specifyingadatetimescalewithamanualcallback.html b/html/includes/jpgraph/docs/html/8102Specifyingadatetimescalewithamanualcallback.html new file mode 100644 index 0000000000..f9259224d3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8102Specifyingadatetimescalewithamanualcallback.html @@ -0,0 +1,236 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.10.2 Specifying a date/time scale with a manual + call-back

+

In the following we will assume that all data points are specified + by a tuple where the date/time is specified as a timestamp in second in + the same format as is returned by the PHP function time().

+

The trick here is to use a label formatting callback routine which + gets called to format each label on the scale.

+

What we do is that we specify that the X-scale should be an ordinary + "int" scale (remember that the data values are timestamps which are + integers). We then install our custom label callback (with a call to + SetLabelFormatCallback()) which given a timestamp formats it to a + suitable human readable form. In our example we will use the PHP + function Date() for this purpose.

+

The callback we use will be

+   +// The callback that converts timestamp to minutes and seconds +
function  +TimeCallback( +$aVal) { +
    return 
Date +('H:i:s',$aVal); +
}

+

Using some random data we can now generate the following graph

+
+
Figure 78: Example on how to format an axis to hold a + date/time scale using and integer scale and a callback routine [src]  +

+

+

In the above example we have specified the X-scale manually to make + sure that the min/max values on the X-axis exactly matches the min/max + x-data values.

+

SetLabelFormatCallback() will be called for each of the displayed + labels and the argument passed on to the supplied function is the + default label that the library is assigning that specific label.

+

This means that if the data to be displayed is based on, for + example, timestamps which are given in seconds the displayed value + might not be aligned to how time/date values normally should be + displayed.

+

Using integer scales this will not work very well since the library + determines label positions to be at even positions (e.g. every 2,5,10, + 20,50,100 etc) to suit the auto-scaling since the library will assume + that the data is integers and not timestamp values.

+

The best way to solve this is to use an integer X-scale together + with a a callback function with a manually specified scale. In order to + setup the scale a bit of manually work is needed. Depending on the data + to be displayed one should ensure that the scale starts and ends at + suitable times and that the tick interval chosen fits with an even + multiple of minutes, hours, days or what is best suited for the time + range that is to be displayed.

+

The following code example illustrates this. It creates some "fake" + data that is assumed to be sampled time based data and sets up some + suitable scales and tick interval. This script may be used as a basis + for more advanced handling of the time data.

+(File: timestampex01.php) +
<?php +
+// Example on how to treat and format timestamp as human readable labels +
require_once( +"../jpgraph.php"); +
require_once(
"../jpgraph_line.php"); +
+
// Number of "fake" data points +
DEFINE('NDATAPOINTS', +500); +
+
+// Assume data points are sample every 10th second +
DEFINE('SAMPLERATE', +10);  +
+
+// Callback formatting function for the X-scale to convert timestamps +
// to hour and minutes. +
function  +TimeCallback( +$aVal) { +
    return 
Date +('H:i'$aVal); +
} +
+
// Get start time +
$start time(); +
+// Set the start time to be on the closest minute just before the "start" timestamp +
$adjstart  += floor($start  +60); +
+
+// Create a data set in range (20,100) and X-positions +
+// We also apply a simple low pass filter on the data to make it less +
// random and a little smoother +
$data  += array(); +
$xdata  += array(); +
$data[0] =  +rand(20,100 +); +
$xdata[0] =  +$adjstart; +
for( 
$i=1 +$i  +NDATAPOINTS; ++ +$i ) { +
    
$data[$i] =  +rand(20,100 +)*0.2 $data[ +$i-1]*0.8 +; +
    
$xdata +[$i] = $adjstart  +$i  +SAMPLERATE; +
} +
+
+// Assume that the data points represents data that is sampled every 10s +
// when determing the end value on the scale. We also add some extra +
// length to end on an even label tick. +
$adjend $adjstart  + ( +NDATAPOINTS+10)*10 +; +
+
$graph  += new Graph(500, +250); +
$graph->SetMargin( +40,20,30 +,50); +
+
+// Now specify the X-scale explicit but let the Y-scale be auto-scaled +
$graph->SetScale( +"intlin",0,0 +,$adjstart,$adjend); +
$graph->title-> +Set( +"Example on TimeStamp Callback"); +
+
+// Setup the callback and adjust the angle of the labels +
$graph->xaxis-> +SetLabelFormatCallback( +'TimeCallback'); +
$graph->xaxis-> +SetLabelAngle( +90); +
+
+// Set the labels every 5min (i.e. 300seconds) and minor ticks every minute +
$graph->xaxis-> +scale->ticks->Set +(300,60); +
+
$line  += new LinePlot +($data,$xdata); +
$line->SetColor( +'lightblue'); +
$graph->Add( +$line); +
+
$graph->Stroke(); +
?> +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/810Handlingdatetimescales.html b/html/includes/jpgraph/docs/html/810Handlingdatetimescales.html new file mode 100644 index 0000000000..c703f025d1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/810Handlingdatetimescales.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.10 Handling date/time scales

+

With date/time scale we refer to the plotting of data where the + independent variable (X-axis) de-nominates a time value. This could for + example be the temperature measured in intervals during a day.

+

From version 1.18 and onwards there are two principal ways of + handling date/time scales. The manual way and fully automatic using the + special "dat" scale. For most cases the automatic "dat" scale is the + preferred choice but in rare circumstances it might be more appropriate + to use the manual way since it gives slightly more control (but not + that much) of the overall handling of scales.

+

To be able to use a date/time scale at all we will assume that the + data points are represented by both an X coordinate (time-value) and a + Y-value (anything else wouldn't make sense).

+

We first start by describing the use of the "dat" scale.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8110Adjustingthegridlinesintheplot.html b/html/includes/jpgraph/docs/html/8110Adjustingthegridlinesintheplot.html new file mode 100644 index 0000000000..ed346f26c7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8110Adjustingthegridlinesintheplot.html @@ -0,0 +1,84 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.10 Adjusting the grid lines in the plot

+

By default only the Y-axis have grid lines and then only on major + ticks, i.e. ticks which have a label. It is of course possible to + change this. Both the X , Y and Y2 can have grid lines. It is also + possible to let the gridlines also be drawn on the minor tick marks, + i.e. ticks without a label. Lets see how we can apply this to the graph + above.

+

The grid is modified by accessing the xgrid (or ygrid) component of + the graph. So to display minor grid lines for the Y graph we make the + call

+ $graph->ygrid->Show +(true,true) +

+

The first parameter determines if the grid should be displayed at + all and the second parameter determines whether or not the minor grid + lines should be displayed.

+

If you also wanted the grid lines to be displayed for the Y2 axis + you would call

+ $graph-> +y2grid->Show(true +,true)

+

Note. In general it is not a good idea to display + both the Y and Y2 grid lines since the resulting image becomes + difficult to read for a viewer.

+

We can also enable the X-grid lines with the call

+  $graph +->xgrid->Show( +true) +

+

+

In the above line we will of course only just enable the major grid + lines.

+

To bring all this together we will display a graph with grid lines + for both Y and X axis enabled.

+
+
Figure 18: Enabling major and minor gridlines for Y-axis and + major grid lines for the X-axis +[src]  +

+

+

Note: If you think the first value of the + Y-axis is to close to the first label of the X-axis you have the option + of either increasing the margin (with a call to + SetLabelMargin() ) or to hide the first label (with a call to + HideFirstTickLabel() )

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8111Usingfilledgridlines.html b/html/includes/jpgraph/docs/html/8111Usingfilledgridlines.html new file mode 100644 index 0000000000..2db7fd0f96 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8111Usingfilledgridlines.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.11 Using filled grid lines

+

Another option for the grid lines is the possibility to have the + area between the grid lines filled with alternating two colors. The + example below illustrates this.

+
+
Figure 19: Using two alternating colors between the gridlines + [src]  +

+

+

In the example above we have also made use of alpha-blending + (requires GD 2.x or higher). By default the filled grid lines are + disabled. To enable this style you have to call the +Grid::SetFill() method.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8112SpecifyingtextlabelsfortheXaxis.html b/html/includes/jpgraph/docs/html/8112SpecifyingtextlabelsfortheXaxis.html new file mode 100644 index 0000000000..a26e354ef1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8112SpecifyingtextlabelsfortheXaxis.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.12 Specifying text labels for the X-axis

+

You might want to have specific labels you want to use for the + X-axis when this has been specified as a "text" scale. In the previous + example each Y-point might represent a specific measurement for each of + the first 10 month. We might then want to display the name of the + months as X-scale.

+

To specify the labels on the scale you make use of the + SetTickLabels() method.

+

To get a localized version of the name of the month you can use a + nice feature in JpGraph, the global '$gDateLocal' object which is an + instance of the + DateLocale

+

This class has a number of methods to get localized versions of + relevant names for dates, (months and weekdays).

+

So to specify the X-axis with the short form of the month names we + use the construction

+  $a  +$gDateLocale-> +GetShortMonth(); +
$graph->xaxis-> +SetTickLabels( +$a);
+

+

This will, now result in the image displayed below

+
+
Figure 20: Specifying text labels for the X-axis [src]  +

+

+

Note: It is also perfectly legal to override + the default labels for the Y (and Y2) axis in the same way, however + there is seldom need for that. Please note that the supplied labels + will be applied to each major tick label. If there are insufficient + number of supplied labels the non-existent positions will have empty + labels.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8113Adjustingtheticksonatextscale.html b/html/includes/jpgraph/docs/html/8113Adjustingtheticksonatextscale.html new file mode 100644 index 0000000000..93488756fc --- /dev/null +++ b/html/includes/jpgraph/docs/html/8113Adjustingtheticksonatextscale.html @@ -0,0 +1,63 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.13 Adjusting the ticks on a text scale

+

As can be seen in the previous example the X-axis is slightly + cluttered with the labels very close to each other. We might rectify + this by either enlarging the image or just displaying fewer tick label + on the x-axis.

+

Specifying that we only want, for example, to print every second + label on the axis is done by a call to the method + SetTextLabelInterval() Which would result in the graph

+
+
Figure 21: Just printing every second label on the X-axis [src]  +

+

+

+

If the text labels are long (for example full dates) then another + way might be to adjust the angle of the text. We could for example + choose to rotate the labels on the X-axis by 90 degrees. With the help + of the SetLabelAngle() +

+

Which would then result in the image below

+
+
Figure 22: Rotating the X-labels 90 degrees [src]  +

+

+

Note: The internal fonts which we have been + using so only supports 0 or 90 degrees rotation. To use arbitrary + angles you must specify TTF fonts. More on fonts later.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8114Usingfilledlinegraphs.html b/html/includes/jpgraph/docs/html/8114Usingfilledlinegraphs.html new file mode 100644 index 0000000000..c546daddb8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8114Usingfilledlinegraphs.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.14 Using filled line graphs

+

Using a filled line plot is not much different from using a normal + line plot, in fact the only difference is that you must call the method + SetFillColor() + on a normal line plot. This will then fill the area under the line + graph with the chosen color.

+

In the example below we have also, as an example, specified plot + marks (see previous sections).

+
+
Figure 23: Filled line graph with plot marks [src]  +

+

+

Note 1. If you add multiple filled line plots to + one graph make sure you add the one with the highest Y-values first + since it will otherwise overwrite the other plots and they will not be + visible. Plots are stroked in the order they are added to the graph, so + the graph you want front-most must be added last.

+

Note 2. When using legends with filled line plot + the legend will show the fill color and not the bounding line color.

+

Note 3. Filled line plots is only supposed to be + used with positive values. Filling line plots which have negative data + values will probably not have the appearance you expect.

+

As you can see from the graph above the grid lines are below the + filled line graph. If you want the grid lines in front of the graph you + can adjust the depth with call to + Graph::SetGridDepth() As the following example shows

+
+
Figure 24: Adjusting the depth of the gridlines [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8115Usingaccumulatedlinegraphs.html b/html/includes/jpgraph/docs/html/8115Usingaccumulatedlinegraphs.html new file mode 100644 index 0000000000..25ba44e17d --- /dev/null +++ b/html/includes/jpgraph/docs/html/8115Usingaccumulatedlinegraphs.html @@ -0,0 +1,90 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.15 Using accumulated line graphs

+

Accumulated line graphs are line graphs that are "stacked" on top of + each other. That is, the values in the supplied data for the Y-axis is + not the absolute value but rather the relative value from graph below. + For example if you have two line graphs with three points each, say + [3,7,5] and [6,9,7]. The first graph will be plotted on the absolute + Y-values [3,7,5] the second plot will be plotted at [3+6, 7+9, 5+7], + hence the values of the previous graphs will be used as offsets.

+

You may add any number of ordinary line graphs together. If you want + to use three line plots in an accumulated line plot graph you write the + following code

+

// First create the individual plots +
$p1 = new LinePlot( +$datay_1); +
$p2 = new LinePlot( +$datay_2); +
$p3 = new LinePlot( +$datay_3); +
+
+// Then add them together to form a accumulated plot +
$ap = new AccLinePlot(array($p1, +$p2,$p3)); +
+
+// Add the accumulated line plot to the graph +
$graph->Add( +$ap);
+

+

You might of course also fill each line plot by adding the lines

+  $p1 +->SetFillColor +("red"); +
$p2->SetFillColor( +"blue"); +
$p3->SetFillColor( +"green"); +

+

Using some appropriate data this might then give a graph perhaps + like the one showed in the figure below

+
+
Figure 25: Accumulated filled line graph [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8116ConstructingsmoothlineplotswithCubicSplines.html b/html/includes/jpgraph/docs/html/8116ConstructingsmoothlineplotswithCubicSplines.html new file mode 100644 index 0000000000..9da126d972 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8116ConstructingsmoothlineplotswithCubicSplines.html @@ -0,0 +1,85 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.16 Constructing smooth line plots with Cubic + Splines

+

If you only have access to a few data points but still want a smooth + curve between those data points JpGraph can help you achieving that by + letting you construct cubic splines. If you never have heard of cubic + splines before, don't worry. You only have to supply the data points + you know tell JpGraph how many interpolated points in total you want in + the graph. JpGraph will now take care of constructing a smooth curve + between all you data points. The new, smooth, curve will be made up of + exactly as many interpolated points as you have specified.

+

To construct a spline you need both the X and Y coordinates for the + known data points.

+

You start by constructing a new Spline instance. To + get access to the Spline class you must first remember to include the + file "jpgraph_regstat.php". You instantiate this class by calling it + with your two known data arrays (X and Y) as follows.

+  $spline  += new Spline($xdata, +$ydata); +

+

This call initializes the spline with the data points you have. These + data points are also known as Control points for the spline. + This helper class doesn't draw any line itself. Instead it is merely + used to get a new (larger) data array which have all the interpolated + values. You then use these new value in your plot. This way give you + great flexibility in how you want to use this interpolated data.

+

Continuing the above line we now use the Spline::Get() + method to get an interpolated array containing a specified number of + points. So for example the line

+  list( +$sdatax, +$sdatay) =  +$spline->Get(50 +);

+

Will construct the two new data arrays '$sdatax' and '$sdatay' which + contains 50 data points. These two arrays are constructed from the + control point we specified when we created the '$spline' object.

+

You would then use these two new data array in exactly the same way + as you would form ordinary data vectors.

+

The following example illustrates this

+
+
Figure 26: Using spline to get a smooth curve between the + control points. +[src]  +

+

+

In order to make the example more interesting we actually use two + plots. First a line plot to get the smooth curve and then a standard + scatter plot which is used to illustrate where the control points are.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8117Addingplotmarkstoalineplot.html b/html/includes/jpgraph/docs/html/8117Addingplotmarkstoalineplot.html new file mode 100644 index 0000000000..091e7f03d7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8117Addingplotmarkstoalineplot.html @@ -0,0 +1,155 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.17 Adding plot marks to a line plot

+

To emphasize the specific data points it is possible to add plot + marks at each data point. Plot marks can be either

+ +

You access the plot mark through the "mark" instance variable in the + plot, as in

+ $lineplot-> +mark->SetColor("red" +);

+

To choose between the different plot marks you call the +PlotMark::SetType() method with the correct define to choose the + plot type you want to use.

+

The simple shape type of plot marks are

+ +

To specify an arbitrary image you use the special define

+ +

In this case you must also specify a image file name and an optional + scaling constant. For example as in

+  $lineplot->mark-> +SetTYPE( +MARK_IMG, +"myimage.jpg", +1.5); +

+

+

If you want to use one of the built-in images the following images + are available. Please note that not all images are available in all + possible colors. The available colors for each image is listed below.

+

The following shape (the first class) plot marks are available

+
    +
  1. MARK_SQUARE, A filled square
  2. +
  3. MARK_UTRIANGLE, A triangle pointed upwards
  4. +
  5. MARK_DTRIANGLE, A triangle pointed downwards
  6. +
  7. MARK_DIAMOND, A diamond
  8. +
  9. MARK_CIRCLE, A circle
  10. +
  11. MARK_FILLEDCIRCLE, A filled circle
  12. +
  13. MARK_CROSS, A cross
  14. +
  15. MARK_STAR, A star
  16. +
  17. MARK_X, An 'X'
  18. +
  19. MARK_FLASH, A "flash" shape
  20. +
  21. MARK_IMAGE, Use the image specified with the filename and scale as + the second and third argument as the mark.
  22. +
+

+

For the second class (built-in images) the following table list the + different images as well as what color they are available in. For the + built-in images you specify the color with the second argument.

+

Note that some of the images are available in different sizes. The + reason is that even though you can scale them by the third argument + there is a visual degradation to scale an image larger than it's + original size since some pixels needs to be interpolated. Reducing the + size with a scale < 1.0 gives much better visual apperance.

+

The scaling works with both GD 1 and GD 2 but with GD 2 the quality + of the scaling is much better.

+

Built-in images and available colors:

+ + + + + + + + + + + + + + + +
TypeDescriptionColors
MARK_IMG_PUSHPIN, MARK_IMG_SPUSHPIN Push-pin image +'red','blue','green','pink','orange'
MARK_IMG_LPUSHPIN A larger Push-pin image +'red','blue','green','pink','orange'
MARK_IMG_BALL, MARK_IMAGE_SBALLA round 3D rendered ball +'bluegreen','cyan','darkgray','greengray', + 'gray','graypurple','green','greenblue','lightblue', + 'lightred','navy','orange','purple','red','yellow'
MARK_IMAGE_MBALLA medium sized round 3D rendered ball + 'blue','bluegreen','brown','cyan', + 'darkgray','greengray','gray','green', + 'greenblue','lightblue','lightred', 'purple','red','white','yellow'
MARK_IMAGE_LBALLA large sized round 3D rendered ball + 'blue','lightblue','brown','darkgreen', + 'green','purple','red','gray','yellow','silver','gray'
MARK_IMAGE_SQUAREA 3D rendered square +'bluegreen','blue','green', 'lightblue','orange','purple','red','yellow'
MARK_IMG_STARA 3D rendered star image +'bluegreen','lightblue','purple','blue','green','pink','red','yellow'
MARK_IMG_DIAMONDA 3D rendered diamond +'lightblue','darkblue','gray', 'blue','pink','purple','red','yellow'
MARK_IMG_BEVELA 3D rendered bevel style round ring +'green','purple','orange','red','yellow'
+ Below we give two examples of images using these features.
+
+
Figure 27: Using an arbitrary image as plot mark [src]  +

+
+

+

+
+
Figure 28: Using the built-in images [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/811AddingplotmarkstolineplotsXXX.html b/html/includes/jpgraph/docs/html/811AddingplotmarkstolineplotsXXX.html new file mode 100644 index 0000000000..cebc80a65b --- /dev/null +++ b/html/includes/jpgraph/docs/html/811AddingplotmarkstolineplotsXXX.html @@ -0,0 +1,61 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.1 Adding plot marks to line-plots XXX

+

It might sometimes be desirable to highlight the data-points with + marks in the intersection between the given x and Y-coordinates. This + is accomplished by specifying the wanted plot mark type for the "mark" + property of the line graph. A full list of all available marks is given + in the class reference +PlotMarks

+

For now let's just add a triangle shape marker to our previous graph + by adding the line

 $lineplot-> +mark->SetType(MARK_UTRIANGLE +);

+

This will give the graph as shown below

+
+
Figure 6: Adding markers to the previous example [src]  +

+

+

+

If you like you can of course both change the size, fill-color and + frame color of the chosen plot mark.

+

The colors of the marks will, if you don't specify them explicitly, + follow the line color. Please note that if you want different colors + for the marks and the line the call to SetColor() for the marks must be + done after the call to the line since the marks color will always be + reset to the lines color when you set the line.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/811Adjustinglabelsonatextscale.html b/html/includes/jpgraph/docs/html/811Adjustinglabelsonatextscale.html new file mode 100644 index 0000000000..7ab45a6184 --- /dev/null +++ b/html/includes/jpgraph/docs/html/811Adjustinglabelsonatextscale.html @@ -0,0 +1,131 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.11 Adjusting labels on a text scale

+

In the following section we will work through an number of examples + on how to manipulate labels on a text scale. Primarily we will + investigate how to best handle the case where you have a large number + of values.

+

As a remainder; Text scale is meant to be used on the X-axis when + the X-axis doesn't have a numeric value, i.e you are only interested in + linear ordering of the data. If you don't specify the labels manually + they will be set automatically starting from 1 as the example below + shows.

+

+
+
Figure 79: A simple bar plot using an automatic text scale [src]  +

+

+

+

To specify the labels on the X-axis as suitable text strings you + call the method + Axis::SetTickLabels() with an array containing the text-labels. If + there are more data points than labels the non-specified labels will be + given their ordinal number. If we augment the previous example with the + name of the month we get the following new example

+

+
+
Figure 80: Manually specifying the text scale labels [src]  +

+

+

+

+
Tip: To get hold of localized version of + the month names (or weekdays) you can use the + DateLocal class available in the global variable $gDateLocale If no + locale has been specified the default locale for the installation will + be used. +
+

What happen now if we have a larger number of bars? Let's try with + 25 bars and see what result we get.

+

+
+
Figure 81: A larger data set [src]  +

+

+

+

Not all to impressive. The labels are to close and they overlap. + Hence it is not a good idea to display every label. To adjust what + labels are to be displayed you use the + SetTextLabelInterval() method. The argument to this method is the + interval between text labels. So to display only every 3 month you + would add the line

+

+ $graph->xaxis->SetTextLabelIntervall(3 +)

+

+

Which would give the result shown below

+
+
Figure 82: Displaying only every third label [src]  +

+

+

+

Much better, quite readable.

+

If we have an even larger data set it might not longer be meaningful + to display all the tick marks since they would simple become to close. + In JpGraph there is a possibility to specify that you only would like + every n:th tick mark to be visible ( + SetTextTickIntervall() ). For bar graphs using text scale however, + that might not be such a good idea since the tick marks are between the + bars and the labels centered under the bars. If we only were to + display, say, every 3 tick mark it wouldn't look to good. Not that we + can't do it, as the example below shows, but it just doesn't look very + good.

+
+
Figure 83: Displaying just every third tick mark. [src]  +

+

+

+

A better way to handle large data set is simply to hide the tick + marks all together. Tick marks may be hidden by calling the method + Axis::HideTicks(); If we hide all the ticks on the X-axis we will + get the result shown below

+
+
Figure 84: Hiding all tick mark. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/811Simpleradarplots.html b/html/includes/jpgraph/docs/html/811Simpleradarplots.html new file mode 100644 index 0000000000..24d1ac1aa6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/811Simpleradarplots.html @@ -0,0 +1,95 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.1 Simple radar plots

+

Let's start by creating a very simple radar plot based on 5 data + points using mostly default values.

+

As the first thing you must remember to include the extension module + that contains the radar plot. "jpgraph_radar.php".

+

A very simple radar plot is created by the code

+(File: radarex1.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_radar.php"); +
     +
// Some data to plot +
$data  += array(55,80, +46,71,95 +); +
     +
// Create the graph and the plot +
$graph  += new RadarGraph +(250,200, +"auto"); +
$plot  += new RadarPlot +($data); +
+
// Add the plot and display the graph +
$graph->Add( +$plot); +
$graph->Stroke(); +
?>

+

and would give the result

+
+
Figure 115: A first very simple radar plot using default + settings [src] +  +

+

+

To change the size and position of the radar graph is similar to the + pie plot and you do it by using the methods + SetSize() and + SetCenter()

+

If you want a filled radar plot you need to specify the fill color + with the method + SetFillColor() The following example shows these methods in action

+
+
Figure 116: Changing size, position and adding fill color to + the radar plot. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/812Addingarbitrarytextstringstothegraph.html b/html/includes/jpgraph/docs/html/812Addingarbitrarytextstringstothegraph.html new file mode 100644 index 0000000000..dbc60e6c05 --- /dev/null +++ b/html/includes/jpgraph/docs/html/812Addingarbitrarytextstringstothegraph.html @@ -0,0 +1,108 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.12 Adding arbitrary text strings to the graph

+

To add clarification or other information text strings to the graph + you can add arbitrary lines of text anywhere you like onto the graph. + The text might have multiple lines and you can choose the paragraph + alignment.

+

To add text you have to create one or more instances of the + Text() object and then add the text object to the graph with the + AddText() method.

+

The position of these text boxes are given as fraction of the width + and height of the graph. When you are positioning these text boxes you + might also choose what part of the text box should be considered the + anchor point for the position you specify.

+

By default the anchor point is the upper left corner of the bounding + box for the text.

+

To show some ways of positioning the text we use a very simple bar + graph not to distract from the text. We first just add a single text + line with most of the settings their default value by adding the + following lines to the graph

+  $txt=new Text( +"This is a text"); +
$txt->Pos( +0,0); +
$txt->SetColor( +"red"); +
$graph->AddText( +$txt);
+

+

The result is shown below.

+
+
Figure 85: Adding a single text string in the upper left + corner [src] +  +

+

+

Not too exiting. Let's make it more interesting by having a + background color, using larger fonts and framing the text box and + adding a drop shadow to the text box by using the methods + SetBox() and SetBox()

+
+
Figure 86: Making the text more interesting [src]  +

+

+

That's better. Now we get some attention. If you want to add a text + with several lines you just need to separate the lines with a newline + ('\n' character). The default paragraph alignment is left edge but you + can also use right and center alignment.

+

As an illustration let's add a couple of more lines to the previous + text, center the text box in the middle of the graph and also use + centered paragraph alignment for the text. To adjust the paragraph + alignment of the text you have to use the + Text::ParagraphAlign()

+
+
Figure 87: Text with multiple lines and centered paragraph + alignment +[src]  +

+

+

Of course there is no limit to the number of text string you can add + to the graph.

+

From version 1.12 it is also possible to add text strings to a graph + using the scale coordinates instead. This is accomplished by using the Text::SetScalePos() Which + is completely analog to SetPos() with the only difference that the + positions given are interpretated as scale values instead of fractions + of the width and height.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/812Displayingthevaluesforeachdatapoint.html b/html/includes/jpgraph/docs/html/812Displayingthevaluesforeachdatapoint.html new file mode 100644 index 0000000000..85d63374d8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/812Displayingthevaluesforeachdatapoint.html @@ -0,0 +1,83 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.2 Displaying the values for each data point

+

As a final easy modification we can enable the display of the data + value above each data point. The value is represented by the 'value' + property in the plot. (You can read more about the possibilities of the + display value + in the class reference.)

+

To enable the display of the value you just need to call the Show() + method of the value as in

+  $lineplot->value-> +Show() +

+

Adding that line to the previous line plot would give the result + shown below.

+
+
Figure 7: Displaying the value for each data point [src]  +

+

+

We can of course change both color, font and format of the displayed + value. So for example if we wanted the display values to be dark red, + use a bold font and have a '$' in front we need to add the lines

+  $lineplot->value +->SetColor("darkred"); +
$lineplot +->value->SetFont( +FF_FONT1, +FS_BOLD); +
$lineplot +->value->SetFormat( +"$ %0.1f"); +

+

This would then result in the following image

+
+
Figure 8: Making the display values a little bit more + interesting +[src]  +

+

+

Note: You can achieve more advanced + formatting by using not just the printf() style format string by a + format callback function. This could allow you to change the displayed + value with more advanced formatting such as displaying money values + with "," to separate thousands.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/812Specifyingtitlesfortheaxisandlegendsfortheplots.html b/html/includes/jpgraph/docs/html/812Specifyingtitlesfortheaxisandlegendsfortheplots.html new file mode 100644 index 0000000000..24f35c6dea --- /dev/null +++ b/html/includes/jpgraph/docs/html/812Specifyingtitlesfortheaxisandlegendsfortheplots.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.2 Specifying titles for the axis and legends for + the plots

+

We normally would like something more meaningful as description of + each axis than it's number. Specifying the titles are accomplished + through the use of the method SetTitles() of the graph. Let's say that + each axis corresponds to a month. We could then use the code

+  $titles  += $gDateLocale +->GetShortMonth +(); +
$graph->SetTitles( +$titles); +

+

As you can see the way radar plot is constructed will assign the + titles (and plot points) in a counter-clockwise direction. If you want + them in clock-wise order you will have to inverse your input data array + as well as the title array.

+

To specify a legend you (as with the other plot) make use of the + SetLegend(); method on each radar plot.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/813Addinggridlinetotheradarplot.html b/html/includes/jpgraph/docs/html/813Addinggridlinetotheradarplot.html new file mode 100644 index 0000000000..01fbe8d8cc --- /dev/null +++ b/html/includes/jpgraph/docs/html/813Addinggridlinetotheradarplot.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.3 Adding grid line to the radar plot

+

Each major tick mark can also be connected together to create a + grid. The grid is accessed through the 'grid' property of the graph. To + enable the grid and set the line style to "dotted" you would have to + add the lines

+ $graph->grid->Show +(); +
$graph->grid-> +SetLineStyle( +"dotted"); +

+

and would result in the following graph

+
+
Figure 117: Adding dotted gridlines to the graph [src]  +

+

+

By design the plot is above the grid line but beneath the axis in + image depth, hence some part of the grid lines are hidden.

+

To have the grid lines more "visible" just change their color, say + to, dark red by invoking the SetColor() method on the grid lines which + would give the following result

+

Another simple change we could do would be to just change the + background color of the radar graph. This is (not surprisingly) done by + a call to the method SetColor() invoked on the graph object.

+
+
Figure 118: Changing the background color [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/813Addingseveralplotstothesamegraph.html b/html/includes/jpgraph/docs/html/813Addingseveralplotstothesamegraph.html new file mode 100644 index 0000000000..6fbb88a995 --- /dev/null +++ b/html/includes/jpgraph/docs/html/813Addingseveralplotstothesamegraph.html @@ -0,0 +1,88 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.3 Adding several plots to the same graph

+

What if we want to add a second plot to the graph we just produced? + Well, this is quite straightforward and just requires two simple step:

+
    +
  1. Create the second plot
  2. +
  3. Add it to the graph
  4. +
+

To create the second plot we need some data (we could of course use + the same data as for the first plot but then we wouldn't be able to see + the new plot!)

+

The following lines show how to create the new plot and add it to + the graph (we only show the new lines - not the full script)

+  $ydata2  += array(1,19, +15,7,22 +,14,5, +9,21,13 +); +
$lineplot2 +=new LinePlot($ydata2); +
$lineplot2 +->SetColor("orange"); +
$lineplot2 +->SetWeight(2); +
+
$graph->Add( +$lineplot2); +

+

Making these changes to the previous graph script would generate a + new graph as illustrated below.

+
+
Figure 9: Adding a second plot to the previous graph [src]  +

+

+

There is a few things worth noting here

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/813AddingtitlesandfooterstotheGraph.html b/html/includes/jpgraph/docs/html/813AddingtitlesandfooterstotheGraph.html new file mode 100644 index 0000000000..9b11fa1f1a --- /dev/null +++ b/html/includes/jpgraph/docs/html/813AddingtitlesandfooterstotheGraph.html @@ -0,0 +1,104 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.13 Adding titles and footers to the Graph

+

Each graph can have up to three different titles accessed by the + three properties

+
    +
  1. title
  2. +
  3. subtitle
  4. +
  5. subsubtitle
  6. +
+

All of these three properties is a standard text object which means + that you can have individual font, colors, margins and sizes of these + tree titles.

+

The only thing you need to think of is that you probably want to add + some extra margin to make room for the titles (using + Graph::SetMargin() )

+

The individual positioning of these titles are done automatically + and will adjust to the font size being used.

+

If you for, esthetic reasons, would like increase the distance from + the top where the title is positioned (or the intra distance between + title and sub title) you can use the + Text::SetMargin() method. For example the line

+

+ $graph->title->SetMargin +(20);

+

will set the distance between the top of the title string and the top + of the graph to 20 pixels. If you instead call the SetMargin() method + for the subtitle it will adjust the distance between the top of the + subtitle and the bottom of the title.

+

The titles will be positioned at the top and be centered in the + graph. Each of these titles may have multiple lines each separated by a + "\n" (newline) character. By default the paragraph alignment for each + title is centered but may of course be changed (using the + ParagraphAlign()) method.

+

Each graph can also have a footer. This footer is actually three + footers. Left, center and right. The 'left' footer is aligned to the + left, the 'center' at the bottom center and the right to the right.

+

Each of these three positions is a standard Text object which means + you can change color, font and size as you please individually on each + of these footer positions.

+

You access the footer through the Graph::footer property as the + following example shows

+

+ $graph-> +footer->left->Set +("(C) 2002 KXY" +); +
$graph->footer-> +center->Set("CONFIDENTIAL" +); +
$graph->footer-> +center-> +SetColor("red"); +
$graph->footer-> +center-> +SetFont( +FF_FONT2, +FS_BOLD); +
$graph->footer-> +right->Set("19 Aug 2002" +);

+

Note: If you enable the brand timing + argument you should leave the left footer empty.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/814AddingasecondYscale.html b/html/includes/jpgraph/docs/html/814AddingasecondYscale.html new file mode 100644 index 0000000000..f2ea44b5e2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/814AddingasecondYscale.html @@ -0,0 +1,77 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.4 Adding a second Y-scale

+

As you saw in the preceding example you could add multiple plots to + the same graph and Y-axis. However what if the two plots you want to + display in the graph has very different ranges. One might for example + have Y-values like above but the other might have Y-values in the + 100:s. Even though it is perfectly possible to add them as above the + graph with the smallest values will have a very low dynamic range since + the scale must accomplish the bigger dynamic range of the second plot.

+

The solution to this is to use a second Y-axis with a different + scale and add the second plot to this Y-axis instead. Let's take a look + at how that is accomplished.

+

First we need to create a new data array with large values and + secondly we need to specify a scale for the Y2 axis. This is done by + the lines

+ $y2data = array( +354,200,265 +,99,111, +91,198,225 +,293,251); +
$graph->SetY2Scale( +"lin");
+

+

and finally we create a new line plot and add that to the second + Y-axis. Note that we here use a new method, AddY2(), since we want this + plot to be added to the second Y-axis. Note that JpGraph will only + support two different Y-axis. This is not considered a limitation since + using more than two scales in the same graph would make it very + difficult to interpret the meaning of the graph.

+

To make the graph a little bit more esthetic pleasing we use + different colors for the different plots and let the two different + Y-axis get the same colors as the plots.

+

The resulting graph is shown below. source)

+
+
Figure 10: Adding a second Y-scale plot to the same graph [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/814Addingatabtitle.html b/html/includes/jpgraph/docs/html/814Addingatabtitle.html new file mode 100644 index 0000000000..a579d141ee --- /dev/null +++ b/html/includes/jpgraph/docs/html/814Addingatabtitle.html @@ -0,0 +1,48 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.14 Adding a tab title

+

A variant of the titles is the tab title. This is just + another option you have of putting a name on the graph. The appearance + of this type is a tab on top of the plot area with text inside.

+

You can access the tab using the 'tabtitle' property of the graph.

+

The following figure shows an example of how this can look.

+
+
Figure 88: Using the tabbed title style [src]  +

+

+

As usual you have full freedom to specify font and colors for this + type of title. Please see the class reference regarding +GraphTabTitle() for more information.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/814Addingseveralplotstothesameradargraph.html b/html/includes/jpgraph/docs/html/814Addingseveralplotstothesameradargraph.html new file mode 100644 index 0000000000..4891ed31eb --- /dev/null +++ b/html/includes/jpgraph/docs/html/814Addingseveralplotstothesameradargraph.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.4 Adding several plots to the same radar graph +

+

You can easily create several radar plot which are added to the same + radar graph. The thing to remember is that if you use filled radar + plots and they overlap each other that the order which they are added + will be the order they are drawn.

+

A simple example of this is shown below

+
+
Figure 119: Several radar plots in one radar graph [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/815Addingalegendtothegraph.html b/html/includes/jpgraph/docs/html/815Addingalegendtothegraph.html new file mode 100644 index 0000000000..11cec48fa5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/815Addingalegendtothegraph.html @@ -0,0 +1,122 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.5 Adding a legend to the graph

+

With more than one plot on the same graph it is necessary to somehow + indicate which plot is which. This is normally done by adding a legend + to the graph.

+

You will see that each plot type has a 'SetLegend()' method which is + used to name that plot in the legend. SO to name the two plots in the + example we have been working with so far we need to add the lines

+  $lineplot->SetLegend +("Plot 1"); +
$lineplot2 +->SetLegend("Plot 2"); +

+

to the previous code. The resulting graph is shown below + + As you can see the legend gets automatically sized depending on how + many plots there are that have legend texts to display. By default it + is placed with it's top right corner close to the upper right edge of + the image. Depending on the image you might want to adjust this or you + might want to add a larger margin which is big enough to accompany the + legend. Let's do both.

+

First we increase the right margin and then we place the legend so + that it is roughly centered. We will also enlarge the overall image so + the plot area doesn't get too squeezed.

+

To modify the legend you access the 'legend' property of the graph. + For a full reference on all the possibilities (changing colors, layout, + etc) see class legend in + the class reference

+

For this we use the legends 'SetPos()' method as in

+  $graph +->legend->Pos( +0.05,0.5,"right" +,"center");

+

+

Doing this small modification will give the result shown below

+
+
Figure 11: Adjusting the layout to give more rooms for the + legend [src]  +

+

+

The above method 'SetPos()' deserves some explanation since it might + not be obvious. You specify the position as a fraction of the overall + width and height of the entire image. This makes it possible for you to + resize the image within disturbing the relative position of the legend. + We will later see that the same method is just to place arbitrary text + in the image.

+

To give added flexibility one must also specify to what edge of the + legend the position given should be relative to. In the example above + we have specified "right" edge on the legend for the for the horizontal + positioning and "center" for the vertical position.

+

This means that the right edge of the legend should be position 5 % + of the image width from the right. If you had specified "left" the the + legends left edge would be positioned 5 % of the image width from the + image left side.

+

By default the legends in the legend box gets stacked on top of each + other. The other possibility is to have them sideways. To adjust this + you use the SetLayout() + method. Using a horizontal layout with the previous example give the + following result.

+
+
Figure 12: Using a horizontal layout for the legends [src]  +

+

+

+

8.1.5.1 Adjusting the layout of the legend

+

For more advanced fomatting of the legend it is possible to adjust

+ +

In order to adjust the number of columns used in the legend the + method Legend::SetColumns is used. So for example to have the + legend lined up using three columns the follwing lines have to be added + to teh script

+ $graph-> +legend-> +SetColumns(3);
+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/815Addingplotmarksiradargraphs.html b/html/includes/jpgraph/docs/html/815Addingplotmarksiradargraphs.html new file mode 100644 index 0000000000..a93684f300 --- /dev/null +++ b/html/includes/jpgraph/docs/html/815Addingplotmarksiradargraphs.html @@ -0,0 +1,44 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.5 Adding plotmarks i radar graphs

+

In exactly the same way as for line graphs it is possible to add + plot marks in radar plots. The mark property is accessed through the + RadarPlot::mark The example below adds a red ball as a marker.

+
+
Figure 120: Adding plotmarks to a radar plot [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/815Usingbackgroundimages.html b/html/includes/jpgraph/docs/html/815Usingbackgroundimages.html new file mode 100644 index 0000000000..239939f669 --- /dev/null +++ b/html/includes/jpgraph/docs/html/815Usingbackgroundimages.html @@ -0,0 +1,95 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.15 Using background images

+

Instead of having a single color background you can easily have an + arbitrary image as the background. The image may be in either PNG, JPG + or GIF format depending on what your installation supports.

+

+
+

A note on GD: If you are using GD 2.xx you must + make sure that the define USE_TRUECOLOR is set to true. This is also + the default. Failure to do so in combination with GD 2.xx will make the + background image just look like a solid black square.

+
+
+

To use a specific image as the background you just have to use the + method + Graph::SetBackgroundImage() The arguments specify file-name, how + the image should be positioned in the graph and finally the format of + the image (if it is in JPG, PNG or GIF) format. If the format is + specified as "auto" (the default) then the appropriate image format + will be determined from the extension of the image file.

+

The file name is of course obvious but the second argument might not + be. This arguments determine how the image should be copied onto the + graph image. You can specify three different variants here

+
    +
  1. BGIMG_ COPY This will just copy the image unchanged onto the graph + from the top left corner.
  2. +
  3. BGIMG_CENTER This will just copy the image unchanged onto the graph + but it will center the image in the graph.
  4. +
  5. BGIMG_FILLFRAME This will scale the image to exactly fit the whole + graph image.
  6. +
  7. BGIMG_FILLPLOT This will scale the image to exactly fit just the + plot area of the graph.
  8. +
+

+

+
The following section only applies to palette based images. + True color images can NOT be manipulated this way. Applying the + following sections to true-color images will have no affect. +
+

You might often find yourself wanting to use a background image as a + "waterstamp". This usually means taking the original image, import it + to some image editing program and then "bleaching" the color + saturation, reducing the contrast and so on. Finally you save the + modified image which you then use as a background image.

+

This whole process can be automatically accomplished in JpGraph by + using the method + Graph::AdjBackgroundImage() which allow you to adjust color + saturation, brightness and contrast of the background image.

+

+ $graph-> +AdjBackgroundImage(...) +

+

+

to achieve the "watercolor" effect to avoid the image being too + intrusive in the graph.

+
+
Figure 89: Example on using a watermark type background image + [src]  +

+

+

Note: The background image depicts a 1998 + Triumph Tiger. This bike is a 900cc off-road bike.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/816Handlingnullvaluesinlineplots.html b/html/includes/jpgraph/docs/html/816Handlingnullvaluesinlineplots.html new file mode 100644 index 0000000000..a5fbefec18 --- /dev/null +++ b/html/includes/jpgraph/docs/html/816Handlingnullvaluesinlineplots.html @@ -0,0 +1,50 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.6 Handling null-values in line plots

+

JpGraph offers two ways of handling null values (or discontinuities) + in the data. You can either have a "whole" in the data or the line may + be extended between the previous and next data point in the graph.

+

If the data value is null ("") or the special value "x" then the + data point will not be plotted and will leave a gap in the line.

+

If the data value is "-" then the line will be drawn between the + previous and next point in the data ignoring the "-" point.

+

The following example shows both these possibilities.

+

+
+
Figure 13: Handling null values in line graphs [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/816Usingabackgroundgradient.html b/html/includes/jpgraph/docs/html/816Usingabackgroundgradient.html new file mode 100644 index 0000000000..b856e74c94 --- /dev/null +++ b/html/includes/jpgraph/docs/html/816Usingabackgroundgradient.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.16 Using a background gradient

+

In addition to the background image you can also add a background + color gradient. This gradient can be covering the entire graph, just + the plot area or just the margins. This flexibility allows you to + combine a background image with a background color gradient. You can + for example use a background image in the plot area and a color + gradient out in the margins.

+

You specify a color gradient background by calling the + Graph::SetBackgroundGradient() method. All details are available in + the class reference (follow the link above). We finally give a quick + example on what kind of effect you can achieve using this feature.

+
+
Figure 90: Using a background color gradient with the + SetBackgroundGradient() method +[src]  +

+

+

+

Finally we like to mention that in the "/utils/misc/" directory you + will find a small utility script called "mkgrad.php". Running this + script presents you with a UI that makes it a breeze to create a + gradient image on it's own.

+

The UI for the utility is so obvious that we won't discuss it + further, we just show it below. The UI for the mkgrad.php utility The UI for the mkgrad.php utility

+

In the example below this utility is used to get a more interesting + plot area.

+

+
+
Figure 91: Example of the use of a gradient background [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/817UsingcallbacksforPlotmarks.html b/html/includes/jpgraph/docs/html/817UsingcallbacksforPlotmarks.html new file mode 100644 index 0000000000..8d7c05e336 --- /dev/null +++ b/html/includes/jpgraph/docs/html/817UsingcallbacksforPlotmarks.html @@ -0,0 +1,76 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.17 Using callbacks for Plot marks

+

An interesting enhancement when using Plotmarks is the possibility + to add a callback function to control the size and color of the + plotmarks.

+

This callback function will get called with the current Y-value (for + the plotmark) as it's argument. As return value the callback function + must return an array containing three (possible null) values. The + values returned must be

+
    +
  1. Plot mark Weight
  2. +
  3. Plot mark Color
  4. +
  5. Plot mark Fill color
  6. +
+

The exact meaning of the parameters will of course depend on the + type of plot marks being used.

+

The callback must be a global function and is installed with a call + to + PlotMark::SetCallback()

+

So for example to install a callback that changes the fill color for + all marks with a (Y) value higher than 90 you could add the lines

+

+ + 90) $fcolor="red" else $fcolor=""; return array("","",$fcolor); } ... + $plot->mark->SetCallback("MarkCallback"); ...'; ShowCodeSnippet($t); ?>

+

As you can see in the above example we have left some of the return + values blank. Doing this will just ignore any change of these value and + use the global settings for the plotmarks.

+

If you also let the (Y) value affect the size of the plot marks you + can get what is sometimes known as a "balloon plot". The example below + is basically a scatter plot that uses filled circles to mark the + points. A format callback is then used to change the color and size + depending on the Y-value for each plot.

+

+
+
Figure 92: Creating a balloon plot by using plot mark + callback function +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/817Usingthestepstyletorenderlineplots.html b/html/includes/jpgraph/docs/html/817Usingthestepstyletorenderlineplots.html new file mode 100644 index 0000000000..b464e7000b --- /dev/null +++ b/html/includes/jpgraph/docs/html/817Usingthestepstyletorenderlineplots.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.7 Using the step-style to render line plots

+

Step style refers to an alternate way of rendering line plots by not + drawing a direct line between two adjacent points but rather draw two + segments. The first segment being a horizontal line to the next X-value + and then a vertical line from that point to the correct Y-value. This + is perhaps easier demonstrated by an example as seen below.

+

You specify that you want the plot to be rendered with this style by + calling the method +SetStepStyle() on the lineplot.

+
+
Figure 14: Rendering a line plot with the step style [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/818Rotatinggraphs90degrees.html b/html/includes/jpgraph/docs/html/818Rotatinggraphs90degrees.html new file mode 100644 index 0000000000..d570581e4b --- /dev/null +++ b/html/includes/jpgraph/docs/html/818Rotatinggraphs90degrees.html @@ -0,0 +1,58 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.18 Rotating graphs 90 degrees

+

In section 10.2 you can read about + arbitrary rotation of the graphs. For most practical purposes rotation + of 90 degrees is most useful. This could for example be used to plot + horizontal bar graphs.

+

The slight complication with general rotation is that the margins + also rotates, this means that if you rotate a graph 90 degrees the left + margin in the image was originally the bottom margin. In additional by + default the center of the rotation is the center of the plot area and + not the entire image (if all the margins are symmetrical then they will + of course coincide). This means that depending on your margin the + center of the rotation will move. You can read more about this and how + to manually set the center for rotation in the section about rotation, 10.2

+

This is just a slight inconvenience which you have to take into + account when you need to set an explicit margin with a call to +Graph::SetMargin()

+

However, in order to make a rotation of 90 degrees much easier you + can easily rotate a graph 90 degrees and set the correct margin with a + call to +Graph::Set90AndMargin() The parameter to this method lets you + specify the margins as you will see them in the image without having to + think of what becomes what after the rotation.

+

So, the only thing you need to do is call this method and then the + graph will have been rotated 90 degrees.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/818Usinglogarithmicscale.html b/html/includes/jpgraph/docs/html/818Usinglogarithmicscale.html new file mode 100644 index 0000000000..7e0a31f436 --- /dev/null +++ b/html/includes/jpgraph/docs/html/818Usinglogarithmicscale.html @@ -0,0 +1,76 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.8 Using logarithmic scale

+

Using a logarithmic scale requires you to include the logarithmic + add on module in "jpgraph_log.php". So you must have the line

+   +include("jpgraph_log.php" +);

+

on the top of your code. To Illustrate how to use a logarithmic scale + let's make the right Y scale in the previous example a logarithmic + scale. This is done by the line

+  $graph->SetY2Scale( +"log"); +

+

This will then give the following result

+
+
Figure 15: Using a logarithmic scale for both the Y2 axis [src]  +

+

+

+

You can of course also use a logarithmic X-scale as well. The + following example shows this.

+
+
Figure 16: Example of using log scale on both X and Y axis + together with a linear Y2 scale +[src]  +

+

+

Even though we have so far only shown line graphs logarithmic scale + can also be used for bar, error, scatter plots as well. Even radar + plots supports the use of logarithmic plots. The following example + shows how to use a logarithmic scale for a bar graph.

+

+
+
Figure 17: Example of using logarithmic scale togther with + bar plots [src] +  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8191Standardtwoaxisgraphs.html b/html/includes/jpgraph/docs/html/8191Standardtwoaxisgraphs.html new file mode 100644 index 0000000000..6fe77fae89 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8191Standardtwoaxisgraphs.html @@ -0,0 +1,132 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.19.1 Standard two axis graphs

+

Assuming we start with the traditional two axis graph, one X and one + Y axis. You may then change the position of each axis by calling + Axis::SetPos($aPosition) You have to remember that you need to + specify the position on the other axis. SO you need to specify the + world-coordinate for the position. By default the axis are each + positioned at the 0-point on the other axis, i.e. the axis will cross + at the 0,0 point in the graph.

+

In addition to the standard positioning you may also use the two + special position markers "min" and "max". This will position the axis + at the minimum (or maximum) position of the other axis.

+

For example, to make sure that the X-axis is always at the bottom of + the graph (at lowest possible Y-value) you would have to add the line

+

+ $graph->xaxis->SetPos +("min");

+

+

To change the color and width of the axis you have to make use of + the Axis::SetColor() and + Axis::SetWeight() + methods.

+
Invisible axis Even though JpGraph (1.7) + doesn't directly support "hidden" axis where the labels are still drawn + it is very easy to achieve this effect by setting the colors of the + axis to be the same as the background. See the example barintex2.php in + the Example directory. To completely hide an axis you can make use of + the Hide() +
+

You might also want to add titles to the axis. This is done through + the Axis::SetTitle() + method. This is actually just a shortcut for accessing the title + property direct. Axis::title::Set() which also allow you to set the + alignment in one call.

+

By default the position of the title is to the far right for the + X-axis and in the middle (and 90 degrees rotated) for the Y-axis.

+

You can adjust the position of the title with the help of the second + argument to the + Axis::SetTitle() method.

+

The possible positions are "high","middle" and "low" which refers to + the scale values on the axis.

+

One common modification you might want to do to the title is to + increase the margin between the axis and the actual title. This is + often necessary to do for the Y-axis if the values displayed are large. + You may adjust the distance (in pixels) between the axis and the title + by using the method + Axis::SetTitleMargin()

+

So for example to increase the margin on the Y-axis you might add + the line

+

+ $graph->yaxis->SetTitleMargin(40 +);

+

+

to your code.

+

Finally we mention something about the positioning of tick marks and + labels on the axis. You have the possibility to choose what side of the + axis the tick marks and the labels should be at. For the X-axis this + can be specified as either on the the top (inside the plot area) or at + bottom (outside of the plotarea). In the same way you can specify for + the Y-axis if the labels ( or ticks) should be on the left or right + side.

+

To adjust the label positioning you have to use the method + Axis::SetTitleSide() and to adjust the position of the tick mark + you have to use the method + SetTickSide()

Note: There is also an alias + for this method, SetTickDirection() which is deprecated from version + 1.7 but kept for backwards compatibility.
Valid arguments for + these methods are

+ +

For example, the following lines added to a script would change side + of the labels and tickmarks for the X-axis.

+

+ $graph->xaxis->SetLabelPos +(SIDE_UP); +
$graph->xaxis-> +SetTickSide( +SIDE_DOWN); +

+

+

This technique is for example used if you position the X-axis at the + top of the graph as the following example shows.

+
+
Figure 93: Example of both how to adjust the position of the + X-axis as well as adjusting the side for the tick and axis title [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8192Scientificstyleaxis.html b/html/includes/jpgraph/docs/html/8192Scientificstyleaxis.html new file mode 100644 index 0000000000..d2e27b35bc --- /dev/null +++ b/html/includes/jpgraph/docs/html/8192Scientificstyleaxis.html @@ -0,0 +1,63 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.19.2 Scientific style axis

+

In scientific style plots it is often common to duplicate each axis + so that all sides of the graph have a labeled axis. This is of course + also fully supported by JpGraph.

+

Before we continue we show a small example to illustrate this + feature

+

+
+
Figure 94: Example of scientific axis [src]  +

+

+

+

The example above shows the basic configuration. There are now + several modifications you may do to these axis like

+ +

The style of axis is determined by the method + Graph::SetAxisStyle() The available type of axis are

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8193Adjustingthepositionofthescalelabels.html b/html/includes/jpgraph/docs/html/8193Adjustingthepositionofthescalelabels.html new file mode 100644 index 0000000000..e0450304a4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8193Adjustingthepositionofthescalelabels.html @@ -0,0 +1,57 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.19.3 Adjusting the position of the scale labels +

+

How to adjust the actual labels are discussed elsewhere in this + manual (see ???,???). However we like to mention here that you can + adjust the label margin (distance between the axis and the labels) with + the method + Axis::SetLabelMargin()

+

to adjust the actual label format (like font, color, angle) you need + to access the Axis::SetFont() + and the Axis::SetColor() + methods. If you investigate the + Axis class you will discover more methods to adjust the many + aspects of the axis layout.

+

As a final note we also mention the methods + Axis::SetLabelAlign() and + Axis::SetLabelAngle() This first method is really only mentioned + here for completeness since it is mostly used for internal purposes. + However on some occasion you might want to adjust the alignment of the + labels. By default they are centered in respect to the tick mark. By + using the method you might override this positioning should you choose + to do so.

+

The second of these methods adjusts the angle of the label in + regards to the axis. This is very useful for X-axis that have long + labels.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8194Formattingthescalelabels.html b/html/includes/jpgraph/docs/html/8194Formattingthescalelabels.html new file mode 100644 index 0000000000..ca7db32d95 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8194Formattingthescalelabels.html @@ -0,0 +1,43 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.19.4 Formatting the scale labels

+

In order to have full control over the way that the labels are + displayed it is possible to define a callback function that will be + applied to all labels. The callback function will be called with the + label as the only argument and should return the value that will be + displayed in the graph. This could for example be used to turn seconds + (used to position data points) into hour and minutes on the scale. For + further reference see the two methods: + Graph::SetLabelFormatCallback(); and + Graph::SetLabelFormat();

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8195InvertingtheYaxis.html b/html/includes/jpgraph/docs/html/8195InvertingtheYaxis.html new file mode 100644 index 0000000000..583ffd723c --- /dev/null +++ b/html/includes/jpgraph/docs/html/8195InvertingtheYaxis.html @@ -0,0 +1,59 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.19.5 Inverting the Y-axis

+

One good way of illustrate the usefulness of label callbacks in a + slightly different context is to show how we can achieve the effect of + an inverted Y-scale.

+

An inverted Y-scale has the lowest number at the top and the scale + values increases downwards.

+

Even though JpGraph doesn't directly support this feature it is + quite easy to achieve with just a few extra lines of code in your image + script.

+

Before we continue we give an example of what we are referring to.

+

+
+
Figure 95: Inverted Y-axis [src]  +

+

+

+

Two achieve this effect there are two simple steps to take:

+
    +
  1. Negate all you Y-value in the data
  2. +
  3. Create a callback that negates the scale labels so they appear to + be positive.
  4. +
+

And that's it! We refer you to the code in the example above for the + details.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/819Formattingtheaxis.html b/html/includes/jpgraph/docs/html/819Formattingtheaxis.html new file mode 100644 index 0000000000..4fb50d4d42 --- /dev/null +++ b/html/includes/jpgraph/docs/html/819Formattingtheaxis.html @@ -0,0 +1,38 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.19 Formatting the axis

+

To get the exact type of axis you want in your graph there are a + number of adjustments available for you. You may change, color, size, + position and general appearance.

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/819Moreonscales.html b/html/includes/jpgraph/docs/html/819Moreonscales.html new file mode 100644 index 0000000000..05837fd282 --- /dev/null +++ b/html/includes/jpgraph/docs/html/819Moreonscales.html @@ -0,0 +1,85 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1.9 More on scales

+

As you saw in the previous example it is possible to use different + types of scales. In JpGraph you can use the following scales

+ +

Any combination of these may be used. Linear and logarithmic scales + are pretty straightforward. The text scale might deserve some + explanation. The easiest way to think of the text scale is as a linear + scale consisting of only natural numbers, i.e. 0,1,2,3,4,... . This + scale is used when you just have a number of Y-values you want to plot + in a consecutive order and don't care about the X-values. For the above + example it will also work fine to use a linear X-scale (try it!). + However, the scale is now treated as consisting or real numbers so the + auto scaling, depending on the size of the image an the number of data + points, might decide to display other labels then the natural numbers., + i.e. a label might be 2.5 say. This is not going to happen if you use a + text scale.

+

The normal practice for text scale is to specify text strings as + labels instead as the default natural numbers. You can specify text + strings for the labels by calling the + SetTickLabels() method on the Axis.

+

To specify the scale you use the + SetScale() method. A few examples might help clarify this.

+ +

As you can see all your graphs will require at least one call to + SetScale() in the beginning of your script. Normally it will come right + after the creation of the Graph().

+

To specify the scale for the Y2 axis you use the + SetY2Scale() Since you only specify one axis you only specify + "half" of the string in the previous examples. So to set a logarithmic + Y2 scale you will call + + SetY2Scale("log");'; ShowCodeSnippet($t); ?>

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/81Lineplots.html b/html/includes/jpgraph/docs/html/81Lineplots.html new file mode 100644 index 0000000000..1c5beda2ef --- /dev/null +++ b/html/includes/jpgraph/docs/html/81Lineplots.html @@ -0,0 +1,220 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1 Line plots

+

The first example draws a line graph consisting of 10 Y-values. In + this first example we show the full code. In the following examples we + will only show interesting piece of the code.

+(File: example0.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_line.php"); +
+
// Some data +
$ydata  += array(11,3, +8,12,5 +,1,9, +13,5,7 +); +
+
+// Create the graph. These two calls are always required +
$graph  += new Graph(350, +250,"auto");     +
$graph->SetScale( +"textlin"); +
+
// Create the linear plot +
$lineplot +=new LinePlot($ydata); +
$lineplot +->SetColor("blue"); +
+
// Add the plot to the graph +
$graph->Add( +$lineplot); +
+
// Display the graph +
$graph->Stroke(); +
?> +
+
+
Figure 3: A simple line graph [src]  +

+

+

+

You might note a few things

+ +

This is a perfect fine graph but looks a little bit "sparse". To + make it more interesting we might want to add a few things like

+ +

From looking at the previous example you can see that you access all + properties of JpGraph through the objects you create. Graph(), + LinePlot() and so on. In general all objects you can see in the graph + is accessed through a named instance.

+

For example the title of the graph is accessed through the + 'Graph::title' property. So to specify a title string you make a call + to the 'Set()' method on the title property as in:

+

+ $graph->title->Set +('Example 2');

+

So by adding just a few more lines to the previous code we get a + graph as shown below.

+
+
Figure 4: Same basic graph as in previous figure but with a + titles for graph and axis. +[src]  +

+

+

To achieve this we just needed to add a few more lines. (We only show + the part of example 1 we changed, to look at the full source just click + the [src] link in the caption. )

+   +// Setup margin and titles +
$graph->img-> +SetMargin(40,20 +,20,40); +
$graph->title-> +Set( +"Example 2"); +
$graph->xaxis-> +title->Set("X-title" +); +
$graph->yaxis-> +title->Set("Y-title" +); +

+

+

Again there are a couple of things you should note here

+ +

+

A nice change would now be to have all the titles in a bold font and + the line plot a little bit thicker and in blue color. Let's do that by + adding the lines

 $graph-> +title->SetFont(FF_FONT1 +,FS_BOLD); +
$graph->yaxis-> +title->SetFont(FF_FONT1 +,FS_BOLD); +
$graph->xaxis-> +title->SetFont(FF_FONT1 +,FS_BOLD); +
$lineplot +->SetColor("blue"); +
$lineplot +->SetWeight(2);   +// Two pixel wide
+

+

Again please note the consistent interface. To change font you just + have to invoke the SetFont() method on the appropriate object. This + principle is true for most methods you will learn. The methods may be + applied to a variety of objects in JpGraph. So for example it might not + come as a big surprise that to have the Y-axis in red you have to say:

+ $graph->yaxis->SetColor +("red")

+

or perhaps we also want to make the Y-axis a bit wider by

+  $graph +->yaxis->SetWidth( +2) +

+

As a final touch let's add a frame and a drop shadow around the + image since this is by default turned off. This is done with

+  $graph +->SetShadow()

+

The result of all these modifications are shown below.

+
+
Figure 5: Making the image a little bit more interesting by + adding som colors and changing the fonts [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/81Radarplots.html b/html/includes/jpgraph/docs/html/81Radarplots.html new file mode 100644 index 0000000000..3f388580ed --- /dev/null +++ b/html/includes/jpgraph/docs/html/81Radarplots.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.1 Radar plots

+

Spider plots are most often used to display how a number of results + compare to some set targets. They make good use of the human ability to + spot symmetry (or rather un-symmetry) . the figure below show an + example of a spider (sometimes called a web-plot). Spiderplots are not + suitable if you want very accurate readings from the graph since, by + it's nature, it can be difficult to read out very detailed values.

+
+
Figure 114: A typical radar graph with two plots [src]  +

+

+

+ +

In the following section we show how to draw both simple and complex + radar graph. As we will show all the settings will follow the same + pattern as for the more standard linear graphs.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/820Adjustingtheautoscalinglimitsgracevalue.html b/html/includes/jpgraph/docs/html/820Adjustingtheautoscalinglimitsgracevalue.html new file mode 100644 index 0000000000..1440fea043 --- /dev/null +++ b/html/includes/jpgraph/docs/html/820Adjustingtheautoscalinglimitsgracevalue.html @@ -0,0 +1,93 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.20 Adjusting the auto-scaling limits - grace value +

+

By default the auto-scaling algorithm tries to make best possible + use of screen estate by making the scale as large as possible, i.e. the + extreme values (min/max) will be on the top and bottom of the scale if + they happen to fall on a scale-tick. So for example doing a simple line + plot could look like the plot shown in the below.

+
+
Figure 96: A typical graph with autoscaling and grace=0 [src]  +

+

+

However you might sometime want to add some extra to the minimum and + maximum values so that there is some "air" in the graph between the end + of the scale values and the extreme points in the graphs. This can be + done by adding a "grace" percentage to the scale. So for example adding + 10% to the y-scale in the image above is done by calling the + SetGrace() method on the yscale as in

+

+ $graph->yaxis->scale +->SetGrace(10, +10); +

+

These lines add a minimum of 10% to the top and bottom values of the + scale. Note that we say "minimum" since depending on the specific tick + values choose this might be a little bit more to make the end of the + scale fall on an even tick mark.

+

Adding this line to the previous graph will result in the following + example

+

+
+
Figure 97: Adding 10% grace value to top and bottom of the + Y-scale [src] +  +

+

+

Since we haven't adjusted the position of the X-axis it will remain + at Y=0 which might not necessary be what we would like so we therefor + also add the line

+

+ $graph->xaxis->SetPos +("min");

+

+

So that the X-axis always will remain at the lowest possible + Y-value. Doing this will then result in the example below

+

+
+
Figure 98: Using grace but also adjusting the position of the + X-axis [src] +  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8210Creatingsemifilledbargraphs.html b/html/includes/jpgraph/docs/html/8210Creatingsemifilledbargraphs.html new file mode 100644 index 0000000000..d7ae413dfc --- /dev/null +++ b/html/includes/jpgraph/docs/html/8210Creatingsemifilledbargraphs.html @@ -0,0 +1,50 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.10 Creating semi-filled bar graphs

+

Semi filled bar graphs are in principle the same as normal filled + bar graphs but with the additional feature that you can choose to only + fill a specified range (or ranges) of X-coordinates. The figure below + illustrates this

+

+
+ + +
Figure 52: Semi-filled line graph [src]  +

+

+

+

In this example we defined two areas along the X-axis to be filled. + You can add filled areas by using the method + AddArea() and specifying range and color for the filled area.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8211Customizingthepatterns.html b/html/includes/jpgraph/docs/html/8211Customizingthepatterns.html new file mode 100644 index 0000000000..f20090e79b --- /dev/null +++ b/html/includes/jpgraph/docs/html/8211Customizingthepatterns.html @@ -0,0 +1,90 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.21.1 Customizing the patterns

+

All patterns can be customized by

+ +

Note: 3D planes actually carry another + possible modification. You can specify the vanish point to change the + perspective used. You can't access the method to change the horizon + directly but you can access it through
+  $band +->prect->SetHorizon( +$aHorizon) +

+

+

assuming that the band is a 3D plane.

+

To finish this section we give one final, more creative, example on + how to use the bands.

+
+
Figure 109: Combining 3D plane, solid band and a sttaic line [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/821Addingbandsofpatternandcolortographs.html b/html/includes/jpgraph/docs/html/821Addingbandsofpatternandcolortographs.html new file mode 100644 index 0000000000..3aee808993 --- /dev/null +++ b/html/includes/jpgraph/docs/html/821Addingbandsofpatternandcolortographs.html @@ -0,0 +1,130 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.21 Adding bands of pattern and color to graphs

+

As an additional way of emphasizing certain areas of the graph it is + possible to add bands (either vertical or horizontal) to any one of the + standard X-Y coordinate system based graphs. A band is a rectangular + area that stretches one entire axis. This means that if you define a + band between X-coordinates 3 and 5 the band area will occupy an area + between the X-coordinates and the entire Y-range.

+

In order to access this functionality you must first make sure that + you include the additional library file jpgraph_plotband.php

+

At the time of this writing (current as of JpGraph 1.8) the table + below illustrates the 8 basic types of patterns available. We will + shortly show you how you can customize these patterns, To keep these + examples clear we have only used one pattern in each figure.

+

+ + + + + +
+
+
Figure 99: +[src]  +

+
+

+
+
+
Figure 100: +[src]  +

+
+

+
+
+
Figure 101: +[src]  +

+
+

+
+
+
Figure 102: +[src]  +

+
+

+
+
+
Figure 103: +[src]  +

+
+

+
+
+
Figure 104: [src]  +

+
+

+
+
+
Figure 105: +[src]  +

+
+

+
+
+
Figure 106: +[src]  +

+
+

+
+

To add a one of these patterns to your graph you need to call the + method + PlotBand::PlotBand() The arguments is fairly easy to understand. + The pattern you would like to use is specified by using the correct + constant. You can see the name of the correct constants in the figures + above. You also need to specify if the band should stretch along the + vertical or horizontal axis as well as the min and max coordinates for + the band. As coordinates you may also use the special values "min" and + "max" which automatically sets the value to the minimum/maximum value + of the scale. The specified numeric value will be automatically + truncated to fit within the plot area.

+

We don't discuss the other arguments further here, instead we refer + you to the class reference.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/821AddingguidelinestoPiePlots.html b/html/includes/jpgraph/docs/html/821AddingguidelinestoPiePlots.html new file mode 100644 index 0000000000..012f8bd0a4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/821AddingguidelinestoPiePlots.html @@ -0,0 +1,93 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.1 Adding guide lines to Pie Plots

+

For very busy Pie plots it can become too little space for the + labels to be printed just beside the pie slice. For this purpose it is + possible to use guide lines for the labels. The library will then draw + a line from the center edge of the slices to the label which will be + positioned further out from the Pie Plot.

+

There is one method that is primarily used to handle this, + PiePlot::SetGuideLines() the simplest usage of this would be

+  $pieplot +->SetGuideLines +();

+

An example of this could then be

+
+
Figure 124: Using guide lines for PiePlots [src]  +

+

+

The above example will give guide lines very similar as what is + produced by other programs, e.g. Excel. In addition to the above + variant it is also possible to instruct the library to line up the + labels vertically in a way that we think is easier to read. This is + achieved by specifying the second parameter to the SetGuideLines() to + 'false' as in

 $pieplot-> +SetGuideLines( +true,false);
+

+

The first parameter is to enable/disable the guide-lines. With the + same example as above this would then produce the image

+
+
Figure 125: Using guide lines for PiePlots with vertically + lined up labels. +[src]  +

+

+

It is also possible to configure the vertical distance between the + labels. By default the distance between the labels is roughly 40% of + the labels font height. By using the method + PiePlot::SetGuideLinesAdjust() it is possible to specify a + fractional value which is interpretated as the distance between the + bottom of one label to the bottom of the next. This means that + specifying a value of '1.0' the labels will have no space between them + and the bottom of one label will touch the top of another label. By + default this value is 1.4.

+

By increasing or decreasing this value it is possible to make the + labels become positioned more or less compact. Below we have taken the + above example and reduced the distance to '1.1' and as can be seen this + yields much more compact labeling.

+
+
Figure 126: Adjusting to a smaller vertical distance between + the labels +[src]  +

+

+

+

Note: Guide lines is only available in 2D Pie plots.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/821Adjustingthewidthofthebars.html b/html/includes/jpgraph/docs/html/821Adjustingthewidthofthebars.html new file mode 100644 index 0000000000..98f4726346 --- /dev/null +++ b/html/includes/jpgraph/docs/html/821Adjustingthewidthofthebars.html @@ -0,0 +1,51 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.1 Adjusting the width of the bars

+

JpGraph allows you to easy customize the appearance of the bar + graph, for example to change the width of each bar. The width of each + bar can be specified either as a fraction of the width between each + major tick or as an absolute width (in pixels).

+

To set the width in fraction you use the method + SetWidth() and to set the width in pixels you use the + SetAbsWidth()

+

As an example let's take the previous example and set the width to + 100% of the distance between the ticks. The example will now become

+

+
+
Figure 30: Setting the width of the bars to 100% of the tick + width [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/822Addingstaticlinestotheplot.html b/html/includes/jpgraph/docs/html/822Addingstaticlinestotheplot.html new file mode 100644 index 0000000000..5ea197a6fc --- /dev/null +++ b/html/includes/jpgraph/docs/html/822Addingstaticlinestotheplot.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.22 Adding static lines to the plot

+

In addition to the bands you can also add static lines to the graph. + An example of that is actually shown in figure 11 above. You create a + line as an instance of + class PlotLine . So for example the lines

+  $sline  += new PlotLine +(HORIZONTAL,0, +"black",2); +
$graph->Add( +$sline); +

+

will add a 2-pixel wide horizontal static line at Y-position zero.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/822Creating3Dpieplots.html b/html/includes/jpgraph/docs/html/822Creating3Dpieplots.html new file mode 100644 index 0000000000..00477f8d7c --- /dev/null +++ b/html/includes/jpgraph/docs/html/822Creating3Dpieplots.html @@ -0,0 +1,59 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.2 Creating 3D pie plots

+

So far we have only made use of 2D pie plots, creating 3D pie plots + is no more difficult. Instead of creating the plots with a call to + PiePlot() you create the plots with a call to + PiePlot3D() If we just take the first simple pie plot and replace + the call to PiePlot() with a call to PiePlot3D() we get the following + result.

+
+
Figure 127: A first example of a 3D pie plot [src]  +

+

+

3D Pie plots have the same possibilities as the normal pie plots + with the added twist of a 3:rd dimension. You can adjust the + perspective angle with the method + SetAngle() So for example to make the pie more "flat" you just set + it to a smaller angle. Setting the perspective angle to 20 degrees in + the previous example will give the following result.

+
+
Figure 128: Adjusting the perspective angle [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/822Displayingthevalueofeachbar.html b/html/includes/jpgraph/docs/html/822Displayingthevalueofeachbar.html new file mode 100644 index 0000000000..e294160979 --- /dev/null +++ b/html/includes/jpgraph/docs/html/822Displayingthevalueofeachbar.html @@ -0,0 +1,104 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.2 Displaying the value of each bar

+

You can easily choose to display the value (and it's format) on top + of each bar by accessing the bar's 'value' property. So for example by + just adding the line

+  $barplot->value-> +Show(); +

+

Will enable the values in it's simplest form and will give the + result

+
+
Figure 31: Showing the values for each bar [src]  +

+

+

You cane see a small nuisance in this graph. The auto scaling + algorithm chooses quite tight limits for the scale so that the bars + just fit. Adding the value on top of the bar makes it collide with the + top of the graph. To remedy this we tell the auto scaling algorithm to + allow for more "grace" space at the top of the scale by using the + method + SetGrace() which is used to tell the scale to add a percentage (of + the total scale span) more space to either one end or both ends of the + scale. In this case we add 20% more space at the top to make more room + for the values with the line

+  $graph->yaxis-> +scale-> +SetGrace(20);
+

+

+

This will then give the graph as shown below

+
+
Figure 32: Adding some grace space to the top of the Y-scale [src]  +

+

+

+

You can also adjust the general position of the value in respect to + the bar by using the + BarPlot::SetValuePos() method. You can set the position to either + 'top' (the default) , 'center' or 'bottom'. The graph below shows the + value being positioned in the center. In this example we have also + adjusted the format to just display the value as an integer without any + decimals.

+
+
Figure 33: Putting the values in the middle of the bar. [src]  +

+

+

It is also possible to specify a more fine grained control on how + you want the values presented. You can for example, rotate them, change + font, change color. It is also possible to adjust the actual value + displayed by either using a printf()-type format string or with the + more advanced technique of a format callback routine.

+

To show what you can do we just give another example for you to + examine without much further explanations. Just remember that to have + text at an angle other than 0 or 90 degrees we have to use TTF fonts. + Even though we haven't explained the SetFont() method it should be + fairly obvious.

+
+
Figure 34: Making the displayed values more interesting [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/823Addingadropshadowtothebar.html b/html/includes/jpgraph/docs/html/823Addingadropshadowtothebar.html new file mode 100644 index 0000000000..1899d2fb33 --- /dev/null +++ b/html/includes/jpgraph/docs/html/823Addingadropshadowtothebar.html @@ -0,0 +1,44 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.3 Adding a drop shadow to the bar

+

One simple way of making the bar graph more attracting is to add a + drop shadow to each bar. This is done by calling the + SetShadow() method. An example will clarify this.

+
+
Figure 35: Adding a drop shadow to each bar [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/823Explodingpieslices.html b/html/includes/jpgraph/docs/html/823Explodingpieslices.html new file mode 100644 index 0000000000..29dee3d031 --- /dev/null +++ b/html/includes/jpgraph/docs/html/823Explodingpieslices.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.3 Exploding pie slices

+

One way to attract attention to some specific piece of information + in a pie chart is to "explode" one or more slices. Both 2D and 3D pies + support exploding one or several slices.

+

Exploding slices is accomplished by the methods + Explode() and + ExplodeSlice() The first method is used if you want to explode more + than one slices and the second is a shorthand to make it easy to just + explode one slice.

+

For example to explode one slice the default "explode" radius you + would just have to say

+  $pieplot->ExplodeSlice( +1) +

+

The above line would explode the second slice (slices are numbered + from 0 and upwards) the default amount. Doing this to the two previous + example would result in

+
+
Figure 129: Exploding one slice [src]  +

+

+

+

+
+
Figure 130: Exploding one 3D slice [src]  +

+

+

+

To explode all slices at once you can use the + PiePlot::ExplodeAll() method. If you want to explode several slices + you can use the + PiePlot::Explode() method and supply a suitable array argument.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/824Adjustingthealignmentofbarsonatextscale.html b/html/includes/jpgraph/docs/html/824Adjustingthealignmentofbarsonatextscale.html new file mode 100644 index 0000000000..3b2749cd19 --- /dev/null +++ b/html/includes/jpgraph/docs/html/824Adjustingthealignmentofbarsonatextscale.html @@ -0,0 +1,39 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.4 Adjusting the alignment of bars on a text + scale

+

As you have seen from the previous examples bar graphs are normally + centered between the trick marks on a text scale. However, you can + modify this behavior by calling the method + BarPlot::SetAlign()

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/824Specifyingandadjustinglabelsonpieplots.html b/html/includes/jpgraph/docs/html/824Specifyingandadjustinglabelsonpieplots.html new file mode 100644 index 0000000000..da01fba7a7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/824Specifyingandadjustinglabelsonpieplots.html @@ -0,0 +1,80 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.4 Specifying and adjusting labels on pie plots +

+

By default the values shown just outside the pie for each slice are + the percentage value for each slice. If you instead wanted the absolute + value you would just have to use the + SetLabelType() method. So to use the absolute value you would call

+

+ $pieplot-> +SetLabelType( +"PIE_VALUE_ABS"); +

+

+

Furthermore you could enhance the formatting of the value by either + using a printf() style format string (using + SetFormat() ) or by providing a formatting function callback (using + + SetFormatCallback() ) for doing more advanced formatting.

+

You can also adjust the position of the labels by means of the + PiePlot::SetLabelPos() method. The argument to this method is + either the fraction of the radius or the string 'auto'. In the latter + case JpGraph automatically determines the best position and the the + first case The following example illustrates this

+
+
Figure 131: Example of adjusting the position of the labels + for the slices +[src]  +

+

+

+

If this formatting is not enough you can also "manually" specify the + labels for each slice individually. You do this by using the + PiePLot::SetLabels() method. This will let you specify individual + text strings for each label. In each specification you can also add a + printf() formatting specification for a number. The number passed on + will be either the absolute value for the slice or the percentage value + depending on what was specified in the call to + SetLabelType()

+

The SetLabels() method can also take a second parameter, the label + position parameter. This is just a shortcut to the SetLabelPos() as + described above. By default the position will be set to 'auto' if not + explicitely specified.

Note: The alignment of + the labels will be different depending on whether they are inside or + outside the pie. When inside the center of the strings will be aligned + with the center of the slice at the specified fraction of the radius. + When positioned outside the alignment will depend on the angle to avoid + that the labels inadvertely writes over the pie.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/825Specifyingslicecolorsandusingthemes.html b/html/includes/jpgraph/docs/html/825Specifyingslicecolorsandusingthemes.html new file mode 100644 index 0000000000..c03375b027 --- /dev/null +++ b/html/includes/jpgraph/docs/html/825Specifyingslicecolorsandusingthemes.html @@ -0,0 +1,84 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.5 Specifying slice colors and using themes

+

Another typical change would be to change the colors of the slices. + There are two fundamental ways of doing this. You either manually + specify the colors for the slices as an array using the method + SetSliceColors() If you specify fewer colors than the number of + slices they will just wrap around.

+

Another way is to use one of the pre-defined color "themes". This is + just a predefined set of colors that will be used for the slices. You + choose what "theme" you like to use with the method ( + SetTheme() ) At the time of this writing the available themes are

+ +

The following example shows the same pie using the different + "themes" in order.

+
+
Figure 132: +[src]  +

+

+

+
+
Figure 133: +[src]  +

+

+

+
+
Figure 134: +[src]  +

+

+

+
+
Figure 135: +[src]  +

+

+

+

A complete color chart of all available colors in the different + themes can be found here

+

Another simple change is to remove the border ( or change it's + colors ) that separates each slice. This can be done by a call to + ShowBorder()

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/825Usinggroupedbarplots.html b/html/includes/jpgraph/docs/html/825Usinggroupedbarplots.html new file mode 100644 index 0000000000..dced157f18 --- /dev/null +++ b/html/includes/jpgraph/docs/html/825Usinggroupedbarplots.html @@ -0,0 +1,87 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.5 Using grouped bar plots

+

These types of bar graph is used to easy group two or more bars + together around each tick (X-value). The bars will be placed + immediately beside each other and as a group centered on each tick + mark. A grouped bar is created by aggregating two or more ordinary bar + graphs and creating a + GroupBarPlot() From two ordinary bar graphs along the lines of

+   +// Create the bar plots +
$b1plot  += new BarPlot($data1y); +
$b1plot->SetFillColor( +"orange"); +
+
$b2plot  += new BarPlot($data2y); +
$b2plot->SetFillColor( +"blue"); +
+
// Create the grouped bar plot +
$gbplot  += new GroupBarPlot +(array($b1plot +,$b2plot)); +
+
// ...and add it to the graPH +
$graph->Add( +$gbplot); +

+

The following example illustrates this type of graph

+
+
Figure 36: A grouped bar plot [src]  +

+

+

There is no limit on the number of plots you may group together.

+

If you use the SetWidth() method on the GroupBarPlot() this will + affect the total width used by all the added plots. Each individual bar + width will be the same for all added bars. The default width for + grouped bar is 70%.

+

Setting the grouped with to 0.9 would result in the image below.

+
+
Figure 37: Adjusting the width for a gropued bar plot. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/826Addingdropshadowstotheslices.html b/html/includes/jpgraph/docs/html/826Addingdropshadowstotheslices.html new file mode 100644 index 0000000000..bb69f5befd --- /dev/null +++ b/html/includes/jpgraph/docs/html/826Addingdropshadowstotheslices.html @@ -0,0 +1,46 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.6 Adding drop shadows to the slices

+

An additional visual enhancements can be made by adding a drop + shadow to the individual slices. This is accomplished by means of the PiePlot::SetShadow() + method. Adding a drop shadow is often more affective if the pie has one + or more slices exploded as the following example shows

+
+
Figure 136: Adding a drop hadow to the slices [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/826Usingaccumulatedbarplots.html b/html/includes/jpgraph/docs/html/826Usingaccumulatedbarplots.html new file mode 100644 index 0000000000..7a10115610 --- /dev/null +++ b/html/includes/jpgraph/docs/html/826Usingaccumulatedbarplots.html @@ -0,0 +1,52 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.6 Using accumulated bar plots

+

The final variety of group bars you can have are accumulated bars. + They work in much the same way as accumulated line plots described + above. Each plot is stacked on top of each other.

+

You create accumulated bar plots in the same way as grouped bar + plots by first creating a number of ordinary bar plots that are then + aggregated with a call to + AccBarPlot();

+

An example makes this clear. Let's use the same data as in the two + examples above but instead of grouping the bars we accumulate (or + stack) them. The code would be very similar (actually only one line has + to change)

+
+
Figure 38: Accumulated bar plots [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/827Anothervariantof2DPieplots.html b/html/includes/jpgraph/docs/html/827Anothervariantof2DPieplots.html new file mode 100644 index 0000000000..160b23cc4b --- /dev/null +++ b/html/includes/jpgraph/docs/html/827Anothervariantof2DPieplots.html @@ -0,0 +1,92 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.7 Another variant of 2D Pie plots

+

As mentioned in the beginning there are two versions of the 2D pie + plots. The normal pie plot created as an instance of + class PiePlot and a variant created as an instance of + class PiePlotC

+

This variant is an extension of the standard PiePlot in the sense + that it also have a filled circle in the center. The following example + illustrates this

+

+
+
Figure 137: Example of the variant of pie plot with a filled + center circle +[src]  +

+

+

+

Since the PiePlotC is an extension to the basic pie plot all the + normal formatting you can do for pie plots you can also do for the + PiePlotC .

+

The additional formatting only concerns the filled middle circle. + You have the option of adjusting size, fill color and all font + properties. You perform these operations with the methods

+

+ + + + + +
+PiePlotC::SetMidColor()Set fill color of mid circle
+PiePlotC::SetMidSize()Set size (fraction of radius)
+PiePlotC::SetMidTitle()Set title string (may be + multi-lined)
+PiePlotC::SetMid()Set all parameters in a single method + call
+

In addition to the normal CSIM for PiePlot:s the center area is also + a CSIM hotspot. You specify the target CSIM with a call to + PiePlotC::SetMidCSIM()

+

The next example shows an example with some more innovative + formatting. In this example we have :

+ +

+
+
Figure 138: PiePlotC with some more innovative formatting to + make it more interesting. +[src]  +

+

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/827Usinggroupedaccumulatedbargraphs.html b/html/includes/jpgraph/docs/html/827Usinggroupedaccumulatedbargraphs.html new file mode 100644 index 0000000000..4a97fd1b03 --- /dev/null +++ b/html/includes/jpgraph/docs/html/827Usinggroupedaccumulatedbargraphs.html @@ -0,0 +1,95 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.7 Using grouped accumulated bar graphs

+

It is perfectly possible to combine the previous bar types to have + grouped accumulated bar plots. This is done by just adding the + different accumulated plots to a group bar plot, for example the + following code would do that.

+   +// Create all the 4 bar plots +
$b1plot  += new BarPlot($data1y); +
$b1plot->SetFillColor( +"orange"); +
$b2plot  += new BarPlot($data2y); +
$b2plot->SetFillColor( +"blue"); +
$b3plot  += new BarPlot($data3y); +
$b3plot->SetFillColor( +"green"); +
$b4plot  += new BarPlot($data4y); +
$b4plot->SetFillColor( +"brown"); +
+
// Create the accumulated bar plots +
$ab1plot  += new AccBarPlot +(array($b1plot +,$b2plot)); +
$ab2plot  += new AccBarPlot +(array($b3plot +,$b4plot)); +
+
// Create the grouped bar plot +
$gbplot  += new GroupBarPlot +(array($ab1plot +,$ab2plot)); +
+
// ...and add it to the graph +
$graph->Add( +$gbplot); +

+

Putting this together in an example would then produce the graph as + shown below

+
+
Figure 39: Combining grouped and accumulated bar plots [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/828Horizontalbargraphs.html b/html/includes/jpgraph/docs/html/828Horizontalbargraphs.html new file mode 100644 index 0000000000..d1607bc938 --- /dev/null +++ b/html/includes/jpgraph/docs/html/828Horizontalbargraphs.html @@ -0,0 +1,98 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.8 Horizontal bar graphs

+

It can often come in handy to have horizontal bar graphs especially + if you have a large number of values to display. Even though JpGraph + doesn't directly support horizontal bar graphs this is easy achieved by + constructing a normal vertical bar graph which is then rotated 90 + degrees.

+

The example below shows a simple example of this

+
+
Figure 40: A typical horizontal bar graph with the Y-axis at + the bottom +[src]  +

+

+

+

In order to achieve this effect you should study the above example + carefully and you might notice two things

+ +

We finally show three more examples of horizontal bar plots. In the + first plot we have hidden the Y-axis and in the second we have + positioned the Y - axis at top as opposed to the bottom as the first + example shows.

+

+
+
Figure 41: Horizontal bar graph with hidden Y axis [src]  +

+

+

+
+
Figure 42: Horizontal bar graph with Y axis at the top [src]  +

+

+

+

In the final example which is almost similar to the two first we + illustrate the use of labels with more than one line.

+
+
Figure 43: Horizontal bar graph with manual integer scale as + well as multiple line labels +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/829Usinggradientfillforbargraphs.html b/html/includes/jpgraph/docs/html/829Usinggradientfillforbargraphs.html new file mode 100644 index 0000000000..533721fe99 --- /dev/null +++ b/html/includes/jpgraph/docs/html/829Usinggradientfillforbargraphs.html @@ -0,0 +1,126 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2.9 Using gradient fill for bar graphs

+

It is possible to use color gradient fill for the individual bars in + the bar graph.

+

Color gradient fill fills a rectangle with a smooth transition + between two colors. In what direction the transition goes (from left to + right, down and up, from the middle and out etc) is determined by the + style of the gradient fill. JpGraph currently supports 8 different + styles. All supported styles are displayed in the figure below.

+
+
Figure 44: +[src]  +

+

+

+
+
Figure 45: +[src]  +

+

+

+
+
Figure 46: +[src]  +

+

+

+
+
Figure 47: +[src]  +

+

+

+
+
Figure 48: +[src]  +

+

+

+
+
Figure 49: +[src]  +

+

+

+
+
Figure 50: +[src]  +

+

+

+
+
Figure 51: +[src]  +

+

+

+

To specify a gradient fill for the bar plots you make use of the + method + BarPlot::SetFillGradient() . See the class reference for details of + this function.

+

When using gradient fills there are a couple of caveats you should + be aware of:

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/82Bargraphs.html b/html/includes/jpgraph/docs/html/82Bargraphs.html new file mode 100644 index 0000000000..c0492233c2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/82Bargraphs.html @@ -0,0 +1,89 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2 Bar graphs

+

Jpgraph also supports 2D vertical bar plots. Before you can use any + bar plots you must make sure that you included the file + "jpgraph_bar.php" in your script.

+

Using bar plots is quite straightforward and works in much the same + way as line plots which you are already familiar with from the previous + examples. Assuming you have a data array consisting of the values + [12,8,19,3,10,5] and you want to display them as a bar plot. This is + the simplest way to do this:

+  $datay=array(12, +8,19,3 +,10,5); +
$bplot  += new BarPlot($datay); +
$graph->Add( +$bplot); +

+

If you compare this to the previous line examples you can see that + the only change necessary was that instead of creating a new line plot + (via the new LinePlot(...) call) we used the statement new + BarPplot().

+

The other change we should do is to make sure the X-axis have an + text-scale (it is perfectly fine to use a linear X-scale but in most + cases this is not the effect you want when you use a bar graph, see + more below). With this two simple change we will now get a bar graph as + displayed in the following image + + You can of course modify the appearance of the bar graph. So for + example to change the fill color you would use the + BarPlot::SetFillColor() method. Making this small change to the + previous example would give the expected effect as can be seen in the + next example. + +

Note: You should note from the previous two + graphs that slight change in appearance for the X-scale. The bar graphs + gets automatically centered between the tick marks when using as text + x-scale. If you were to use a linear scale they would instead start at + the left edge of the X-axis and the X-axis would be labeled with a + linear scale. As is illustrated in the (small) example below.
+
+
Figure 29: A small example with a bar graph using a linear + X-scale [src] +  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/82Pieplots.html b/html/includes/jpgraph/docs/html/82Pieplots.html new file mode 100644 index 0000000000..ceaf9a2835 --- /dev/null +++ b/html/includes/jpgraph/docs/html/82Pieplots.html @@ -0,0 +1,155 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.2 Pie plots

+

So far we have just show plots based on an X-Y coordinate system. + This is not the only types of graphs you can create with JpGraph. + Another common type is Pie plots. JpGraph supports both 2D and 3D pie + plots. For 2D pie plots there are also 2 versions, but more on that + later.

+

The main difference as compared to the X-Y plots is that to all pie + plots are added to the + PieGraph() instead of the Graph() object we used for the X-Y graphs + we have drawn so far. For this you must first include the + "jpgraph_pie.php" in your script (or "jpgraph_pie3d.php" if you want to + use 3-dimensional pies).

+

Below you cane see the code needed to create the simplest possible + pie graph just using the default settings.

+

include ( +"../jpgraph.php"); +
include (
"../jpgraph_pie.php"); +
+
$data  += array(40,60, +21,33); +
+
$graph  += new PieGraph +(300,200); +
$graph->SetShadow(); +
+
$graph->title-> +Set( +"A simple Pie plot"); +
+
$p1 = new PiePlot( +$data); +
$graph->Add( +$p1); +
$graph->Stroke(); +

+

The above code would give the following pie graph

+
+
Figure 121: The simplest possible pie graph [src]  +

+

+

There is a few things worth noting here

+ +

You can change almost all aspects of appearance of the pie graphs. + For example you could change :

+ +

+

The next simplest addition we can do is to add a legend to the pie + graph. We do this by using the + SetLegends(); method. By adding the legends to the previous example + we get the following image

+
+
Figure 122: Adding a legend to the pie graph [src]  +

+

+

+

(In the figure above we also moved the center of the pie slightly to + the left to make more room for the legend box.)

+

The text for the legends can also contain printf() style format + strings to format a number. This number passed on into this string is + either the absolute value of the slice or the percentage value. How to + switch between the is describe further down in this chapter.

+

The next change you might want to change is the size and position of + the Pie plot. You can change the size with a call to + SetSize(); and the position of the center of the pie plot with a + call to SetCenter(); + The size can be specified as either an absolute size in pixels or as a + fraction of width/height (whatever is the smallest). The position of + the pie plot is specified as a fraction of the width and height.

+

To put the size and positioning API to use we will show how to put + several pie plots on the same pie graph. In the following example we + have also adjusted the legends of the slice values to use a smaller + font.

+

What we do in this example is quite simple, create 4 pie plots, make + them smaller and put them in the four corner of the graph. This will + give the result as shown in the following example.

+
+
Figure 123: Multiple pie plots in the same pie graph [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/831Overview.html b/html/includes/jpgraph/docs/html/831Overview.html new file mode 100644 index 0000000000..3b58f1e199 --- /dev/null +++ b/html/includes/jpgraph/docs/html/831Overview.html @@ -0,0 +1,61 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.3.1 Overview

+

Each data point in a polar plot is represented by a tuple consisting + of a radius and an angle. The polar plot itself can be either outlined + or filled. In addition each point may have a standard marker (the same + as for line and scatter plots).

+

The scale for the radius can be either linear or logarithmic.

+

A polar graph is created by creating an instance of +PolarGraph::PolarGraph(). The polar graph type inherits all the + capabilities of ordinary X-Y graphs, i.e they can have background + images, background gradients, tabbed titles and so on.

+

Polar graphs comes in two basic types, they can either show a full + 360 degree graph or a half 180 degree graph. The two examples below + show these two basic types of graphs.

+

+
+
Figure 139: A simple 360 degree polar graph [src]  +

+

+

+
+
Figure 140: The 180 degree variant polar plot. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/831Usinglineerrorplots.html b/html/includes/jpgraph/docs/html/831Usinglineerrorplots.html new file mode 100644 index 0000000000..7267c7a67a --- /dev/null +++ b/html/includes/jpgraph/docs/html/831Usinglineerrorplots.html @@ -0,0 +1,82 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.3.1 Using line error plots

+

A line error plot is an error plot with the addition that a line is + drawn between the average value of each error pair. You use this type + of plot the exact same way you would use an error plot. The only change + is that you must instantiated an + ErrorLinePlot() instead and make sure you have included the + "jpgraph_line.php" since the line error plot makes use of the line plot + class to stroke the line.

+

To control the various properties of the line drawn the "line" + property of the error line plot may be accessed. So, for example, if + you want the line to be 2 pixels wide and blue you would have to add + the following two lines

+  $elplot->line-> +SetWeight(2); +
$elplot->line-> +SetColor( +"blue"); +

+

to generate the graph as shown below

+
+
Figure 55: Linear error plot [src]  +

+

+

You may of course add legends to none, one or both of the line types + in the above graph. So for example if we wanted the legend "Min/Max" + for the red error bars and a legend "Average" for the blue line you + would have to add the lines

+  $errplot->SetLegend( +"Min/Max"); +
$errplot->line-> +SetLegend( +"Average"); +

+

The resulting graph will now look like (note that we are using the + default placement of the legend box)

+
+
Figure 56: Addding a legend box to the line error plot. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/832Adjustingtheradiusscale.html b/html/includes/jpgraph/docs/html/832Adjustingtheradiusscale.html new file mode 100644 index 0000000000..5b7962f053 --- /dev/null +++ b/html/includes/jpgraph/docs/html/832Adjustingtheradiusscale.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.3.2 Adjusting the radius scale

+

The radius axis can be shown in either a linear or logarithmic + scale. This is controlled, as usual, by a call to +PolarGraph::SetScale() The two examples below show the same plot in + either linear or logarithmic scale

+

+
+
Figure 141: Using a logarithmic scale [src]  +

+

+

+

+
+
Figure 142: Using a linear scale [src]  +

+

+

+

Please note that the maximum values of the scales are different.

+

By default the scale will be auto scaled depending on the data. You + can also specify a manual scale by supplying an extra argument to the + SetScale() value. The only difference from the manual scaling with the + other X-Y-graphs is that for polar graph you only specify a manual + maximum. The minimum will always be 0 for the linear scale and a scaled + value of 10 (i.e 1, 0.1, 0.001 and so on) for the logarithmic scale.

+

The plot is clipped to the plot area so if you specify a smaller + scale then the maximum value that part of the plot that are outside the + plot area will be clipped.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/833Adjustingthegridlines.html b/html/includes/jpgraph/docs/html/833Adjustingthegridlines.html new file mode 100644 index 0000000000..1d40579eff --- /dev/null +++ b/html/includes/jpgraph/docs/html/833Adjustingthegridlines.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.3.3 Adjusting the grid lines

+

As usual you have full freedom to select what grid lines you like to + show (and what colors they should have). There are three different + types of grid lines you may adjust. The radius minor and major grid + lines and the angle grid lines.

+

You select what grid lines to show with a call to +PolarAxis::ShowGrid() The two example below shows a logarithmic plot + with either just major grid lines or both minor and major grid lines.

+

+
+
Figure 143: Using a logarithmic scale with just major + gridlines [src] +  +

+

+

+

+
+
Figure 144: Using a logarithmic scale with both minor and + major gridlines +[src]  +

+

+

The colors of the grid lines are specified with a call to + PolarAxis::SetGridColor()

+

For the angle grid lines it is possible to specify the angle + division between each grid line with the method + PolarAxis::SetAngleStep() You specify the step distance in degrees. + By default the step size is 15 degrees.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/834Adjustingthelabelfonts.html b/html/includes/jpgraph/docs/html/834Adjustingthelabelfonts.html new file mode 100644 index 0000000000..9ad883fc78 --- /dev/null +++ b/html/includes/jpgraph/docs/html/834Adjustingthelabelfonts.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.3.4 Adjusting the label fonts

+

You can individually specify different fonts and colors for the + angle and the radius labels. The radius font is specified with + PolarAxis::SetFont() and the angle font is specified with a call to + PolarAxis::SetAngleFont()

+

You can adjust the color with the method +PolarAxis::SetColor() ?>

+

The following example specifies different color for the labels. it + also shows that you can add both a radial axis title as well as a + tabbed title. In this example we have also chosen not to show the frame + around the edge of the plot.

+

+
+
Figure 145: Different colors for labels, specifying both a + tabbed title as well as a axis title [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/835Adjustingthelabels.html b/html/includes/jpgraph/docs/html/835Adjustingthelabels.html new file mode 100644 index 0000000000..3493a4c10d --- /dev/null +++ b/html/includes/jpgraph/docs/html/835Adjustingthelabels.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.3.5 Adjusting the labels

+

As can be seen from the previous examples the angle labels have a + small superscripted "o" after each label. You can select if you like to + show this degree mark or not with a call to the + PolarAxis::SetANgleDegreeMark() method by which you can enable or + disable that mark after the angels.

+

For the radius labels all standard formatting that can be done to + the X-Y axis such as format string or format callbacks are supported.

+

A common modification for polar plots is probably to disable the + display the last label when using a 360 degree plot since the last + label will "collide" with the plot box around the plot area. It is + possible to disable the last label with a call to +Axis::HideLastTickLabel() As you can see this has been used in some + of the examples in this chapter.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/836Imagemaps.html b/html/includes/jpgraph/docs/html/836Imagemaps.html new file mode 100644 index 0000000000..21646fa8b5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/836Imagemaps.html @@ -0,0 +1,60 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.3.6 Image maps

+

If you have specified markers for the polar plot (by setting the + mark property of the plot) each marker can be a hot spot in a client + side image map. The target URL are as usual specified with the + SetCSIMTargets() as the following short code excerpt shows

+   +// Start by specifying the proper URL targets +
$targets  += array("#1","#2", ....... ); +
$polarplot  += new PoalrPlot +($data); +
$polarplot +->mark->SetType( +MARK_SQUARE); +
$polarplot +->SetCSIMTargets +(targets); +
$graph->Add( +$polarplot); +
$graph->StrokeCSIM(); +

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/837Afinalexample.html b/html/includes/jpgraph/docs/html/837Afinalexample.html new file mode 100644 index 0000000000..6672985201 --- /dev/null +++ b/html/includes/jpgraph/docs/html/837Afinalexample.html @@ -0,0 +1,45 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.3.7 A final example

+

As a final example we show a full 360 degree polar plot with square + markers as well as background color gradient and a legend for the plot.

+
+
Figure 146: A polar plot with both legend and background + gradient fill. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/83Errorplots.html b/html/includes/jpgraph/docs/html/83Errorplots.html new file mode 100644 index 0000000000..986e938e7a --- /dev/null +++ b/html/includes/jpgraph/docs/html/83Errorplots.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.3 Error plots

+

Error plots are used to visually indicate uncertainty in data + points. This is done by for each X value by giving both a minimum and a + maximum Y-value.

+

Before you can use error plots you must remember to include the file + "jpgraph_error.php" in your script.

+

The following example illustrates a simple error bar. We will have 5 + points, so we need 10 Y-values. We also would like the error bars to be + red and 2 pixels wide. All this is accomplished by creating an + ErrorPlot() in much the same way as, for example, a normal line + plot. Doing this would now give the example shown below.

+

+
+
Figure 53: A simple error bar [src]  +

+

+

You might notice that there is one displeasing esthetic quality of + this graph. The X-scale is just wide enough to just accompany the + number of error bars and hence the first bar is drawn on the Y-axis and + the and last bar just at the edge of the plot area. To adjust this you + might call the SetCenter() + method which will adjust the X-scale so it does not use the full width + of the X-axis.

+

The following example illustrates the use of this feature by + applying this technique to the previous example

+
+
Figure 54: Adjusting the X-scale not to use the full width of + the X-axis. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/83Polarplots.html b/html/includes/jpgraph/docs/html/83Polarplots.html new file mode 100644 index 0000000000..34f0ee437e --- /dev/null +++ b/html/includes/jpgraph/docs/html/83Polarplots.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.3 Polar plots

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/84Scatterplots.html b/html/includes/jpgraph/docs/html/84Scatterplots.html new file mode 100644 index 0000000000..77b174fcb0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/84Scatterplots.html @@ -0,0 +1,113 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.4 Scatter plots

+

Scatter plots are very simple; they plot a number of points + specified by their X- and Y-coordinate. Each point is stroked on the + image with a mark as with line plots. The stroked marks can also be + connected with an optional line.

Note: Even + though it is only scatter plot that was designed to be used with X,Y + plots it is perfectly possible to use use both X,Y coordinates for bar + and line plots as well.

+

Even though you would normally supply X-coordinates it is still + perfectly possible to use a text-scale for X-coordinates to just + enumerate the points. This is especially useful when using the + "Impulse" type of scatter plot as is shown below.

+

Scatter pots are created by including the jpgraph extension + "jpgraph_scatter.php" and then creating an instance of plot type of + ScatterPlot(). To specify the mark you want to use you access the mark + with the instance variable "mark" in the scatter plot. The default is + to use an unfilled small circle.

+

To create a scatter plot you will create an instance

+

A simple example using just default values will illustrate this

+

+
+
Figure 57: The simplest possible scatter plot [src]  +

+

+

We can easily adjust the size and colors for the markers to get + another effect as shown below

+
+
Figure 58: The simplest possible scatter plot with adjusted + marks [src] +  +

+

+

Another possible variant of scatter plot is impulse-scatter plots. + This is a variant of normal scatter plot where each mark have a line + from the mark to the Y=0 base line. To change a scatter plot into an + impulse scatter plot you have to call the method + SetImpuls() on the scatter plot.

+

This type of plots are often used to illustrate signals in + conjunction with digital signal processing. The following two examples + illustrates simple use of impulse plots.

+
+
Figure 59: A simple impuls plot [src]  +

+

+

The next example shows how to modify the color and width of the + impulse plot

+
+
Figure 60: A modified impuls plot [src]  +

+

+

Note: You may draw impulse graphs without + any mark by specifying the mark type as (-1) . That way only the + impulse lines will be drawn.

+

As a final touch we show two more advanced impulse graphs . In these + graphs we have used more advanced formatting for the Y-axis labels as + well as adjusted the position of the axis position.

+
+
Figure 61: In this imuplsplot we have adjusted the position + of the X-axis to the bottom and also added more decimals to the labels + on the Y-axis +[src]  +

+

+

+
+
Figure 62: In this impuls plot we have also added a lineplot + with a dotted line style. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/85Fieldplots.html b/html/includes/jpgraph/docs/html/85Fieldplots.html new file mode 100644 index 0000000000..9c79d90485 --- /dev/null +++ b/html/includes/jpgraph/docs/html/85Fieldplots.html @@ -0,0 +1,60 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.5 Field plots

+

A variant of scatter plot is the so called Field Plots this + is basically a scatter plot where each scatter point is an arrow with a + direction between 0 to 359 degrees. This effectively allows the + visualization of 3 parameters at each point (x,y,angle). As an + additional bonus there is also possible to define a callback for each + scatter plot to also define the color for each point.

+

To create a field plot you create an instance of +FieldPlot in the same way as you created a normal scatter plot. The + arguments to this method are Y-coordinate, X-coordinate and angle. To + specify a callback you use +FieldPlot::SetCallback()

+

The following example (and code) illustrates the usage of the field + plot type.

+

+
+
Figure 63: Example of the Field plot type [src]  +

+

+

In addition to the parameters mentioned above you can also adjust + both the general size of the arrow and also the specific size of the + arrowhead. The arrow size is specified in pixels and the arrow head is + specified as an integers between 0 and 10. These sizes are specified + with a call to +FieldPlot::arrow::SetSize()

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/861StockCharts.html b/html/includes/jpgraph/docs/html/861StockCharts.html new file mode 100644 index 0000000000..c5ffa3dc7b --- /dev/null +++ b/html/includes/jpgraph/docs/html/861StockCharts.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.6.1 Stock Charts

+

Stock charts is used to display data values where one is interested + in 4 different values for each data point. This could for example be + used to display a stocks open,close, min and max value during a + specific day. Hence the name Stock chart (or Stock plot).

+

The figure below illustrates a sample Stock chart plot

+
+
Figure 64: A simple stock plot [src]  +

+

+

For this type of plot the Y-data array must be consist of a number + of quadruples of data where each quadruple consists of + (open,close,min,max). The open and close values determine the min max + for the middle bar and the min,max determine the end points of the + "error-lines" at the top and bottom of of each bar.

+

Note that the data follows the following rules

+ +

To separate the two cases where "open > close" or "open < close " + different colors are used. These colors are specified with the +SetColor() method. By default a positive bar (close > open) have a + fill color of white and for the negative case where (close < open) the + bars have a red color.

+

You can specify the width of the bar by setting the width (in + pixels) with a call to the method +SetWidth()

+

The final variation of stock plots you can have is to determine + whether or not the end point for the min,max lines should have the + horizontal line marking the end of the line or not. This can be + adjusted with a call to method +HideEndLine().

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/862BoxPLotsStockchartswithamedianline.html b/html/includes/jpgraph/docs/html/862BoxPLotsStockchartswithamedianline.html new file mode 100644 index 0000000000..cb99deb831 --- /dev/null +++ b/html/includes/jpgraph/docs/html/862BoxPLotsStockchartswithamedianline.html @@ -0,0 +1,48 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.6.2 BoxPLots : Stock charts with a median line

+

A minor variation of stock charts is the "BoxPlot()" this is almost + the same as StockPlot() but with the very small difference that in + addition to the open,close,min, max values you also specify a median + value . The median lies between the open and close value and is + illustrated as a horizontal line within the bar.

+
+
Figure 65: A simple box type stock plot [src]  +

+

+

You may modify the median line color for positive and negative data + points / bars by using the +SetMedianColor() method.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/863ImagemapsforBoxandStockcharts.html b/html/includes/jpgraph/docs/html/863ImagemapsforBoxandStockcharts.html new file mode 100644 index 0000000000..97c0b362cf --- /dev/null +++ b/html/includes/jpgraph/docs/html/863ImagemapsforBoxandStockcharts.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.6.3 Image maps for Box and Stock charts

+

In the same way as for other plots you may associate an image map + with these plots. The "hot" area for each plot is the mid "bar" + section. In the same way as other plot types you use the + SetCSIMTargets() to set the URLs you want to use.

+

These plot types, though normally used without explicit X-values, + can of course handle a supplied X-coordinate array without any problem.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/86BoxandStockcharts.html b/html/includes/jpgraph/docs/html/86BoxandStockcharts.html new file mode 100644 index 0000000000..00f7679275 --- /dev/null +++ b/html/includes/jpgraph/docs/html/86BoxandStockcharts.html @@ -0,0 +1,36 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.6 Box and Stock charts

+

JpGraph offers two variation on what is usually known as stock + charts, candle-charts or box plot.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/87Combiningdifferentgraphtypes.html b/html/includes/jpgraph/docs/html/87Combiningdifferentgraphtypes.html new file mode 100644 index 0000000000..01295e85a9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/87Combiningdifferentgraphtypes.html @@ -0,0 +1,108 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.7 Combining different graph types

+

It is perfectly legal to add several different plot types to the + same graph. It is therefore possible to mix line plots with (for + example) filled bar graphs. What you should keep in mind doing this is + the order in which these plots are stroked to the image since a later + stroke will overwrite a previous one. All plots are stroked in the + order you add them, i.e. the first plot added will be stroked first. + You can therefore control which plot is placed in the background and + which one is placed in the foreground by the order you add them to the + plot.

+

To start simple we just mix a filled line plot with a non-filled + line plot as the following example shows.

+

+
+
Figure 66: Mixing filled and non-filled line plots in the + same graph +[src]  +

+

+

+

Let's now go to something a little bit more complicated. How to mix + bar and line graphs. Let's just take one of our previous bar graphs and + add a line plot to it and see what happens.

+

+
+
Figure 67: Adding a line to a bar graph [src]  +

+

+

Not too bad. But we can't see the line so we change the order in + which we add the lines to the graph and sees what happens.

+
+
Figure 68: Adding a line to a bar graph, in different orderv2 + [src]  +

+

+

+

If you want the line points to be aligned in the center of the bars + you can accomplish this is two ways.

+

If you use a text scale then you need to call the + LinePlot::SetBarCenter()

+
+
Figure 69: Centering the line point in the middle of the bars + using LinePlot::SetBarCenter() [src]  +

+

+

+

You can also use an integer scale. This places both + the bar and the line points centered at the tick marks. As the + following example will show

+

+
+
Figure 70: Using a linear scale [src]  +

+

+

Note: In this example we also have + illustrated the fact that it is possible to add text labels to a linear + (or integer) scales as well.

+

As a final example we show how you can combine a scatter plot and a + line plot which could be used to illustrate a regression line fitting.

+
+
Figure 71: Combining a scatter plot and a line plot [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/88Specifyingthescalemanually.html b/html/includes/jpgraph/docs/html/88Specifyingthescalemanually.html new file mode 100644 index 0000000000..1671d57c0f --- /dev/null +++ b/html/includes/jpgraph/docs/html/88Specifyingthescalemanually.html @@ -0,0 +1,106 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.8 Specifying the scale manually

+

Normally the automatic scaling should be doing an adequate job in + most circumstances but there might be cases where you like to manually + set the scale. For example if you have several graphs where you like to + be able to easily compare them and therefore want them all to have the + same scale.

+

To specify a manual scale you have to add arguments to the standard Graph::SetScale() method. + So to specify that you want an Y-scale between 0 and 100 you need to + write

+ $graph-> +SetScale( +"textlin",0,100 +);

+

When you specify a scale manually there is one additional thing you + need to decide. How the tick marks should be positioned. You have three + choices

+
    +
  1. Let JpGraph decide suitable tick marks honoring the exact scale you + specified. This is the default behavior if you don't do anything + else.
  2. +
  3. Allow JpGraph to slightly adjust your specified min and max values. + With the default method, depending on the min and max values, the end + and start of the scale might not fall on an exact tick mark. For + esthetic reasons you might still want the last/first tick mark to fall + on the edges of the scale. By calling + LinearScale::SetAutoTicks() you tell JpGraph to make the smallest + necessary adjustment of the end/start points so that they fall on an + exact tick mark.
  4. +
  5. Manually specify the tick marks with a call to + LinearTicks::Set() For example
    +  $graph->SetScale( +"textlin",0,100 +); +
    $graph->yscale-> +ticks->Set(10 +,5);
    +

    Will set the major tick marks every at 0,10,20,.. And every minor + tick mark in between (0,5,10,15,20,25,...).

    +
  6. +
+

The three images below illustrates the difference between the + possibilities of ticks for a manual scale.

+
+
Figure 72: Manual scale, manual ticks major=7 minor=2 [src]  +

+

+

+

+
+
Figure 73: Manual scale, automatic ticks with exact limits [src]  +

+

+

+

+
+
Figure 74: Manual scale, automatic ticks where we allow + adjustments of the limits +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/89Adjustingtheautomatictickmarks.html b/html/includes/jpgraph/docs/html/89Adjustingtheautomatictickmarks.html new file mode 100644 index 0000000000..fd41518ece --- /dev/null +++ b/html/includes/jpgraph/docs/html/89Adjustingtheautomatictickmarks.html @@ -0,0 +1,54 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8.9 Adjusting the automatic tick marks

+

You can adjust the automatic tick marks by telling JpGraph how dense + you want them to be. You use the + Graph::SetTickDensity() method. You can set the density setting in + four steps

+ +

Taking the previous example with the manual scale but automatic + ticks and using a denser ticks setting gives the following result

+
+
Figure 75: Manual scale with automatic ticks but with a + denser tick settings. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8WorkingwithnonXYplots.html b/html/includes/jpgraph/docs/html/8WorkingwithnonXYplots.html new file mode 100644 index 0000000000..3ee20f3b50 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8WorkingwithnonXYplots.html @@ -0,0 +1,52 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8 Working with non X,Y-plots

+

Non X,Y plots includes

+ +

The fundamental difference is that these classes makes use of an + extended version of the basic Graph class. Therefor you can not mix X,Y + plots with non-X,Y plots. For example it is not possible to mix a line + graph with a Polar graph.

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/8WorkingwithorthogonalXYplots.html b/html/includes/jpgraph/docs/html/8WorkingwithorthogonalXYplots.html new file mode 100644 index 0000000000..f16753b567 --- /dev/null +++ b/html/includes/jpgraph/docs/html/8WorkingwithorthogonalXYplots.html @@ -0,0 +1,41 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

8 Working with orthogonal X,Y-plots

+

The purpose of this chapter is to introduce the basic concepts of + creating scripts with JpGraph that will generate various types of basic + plots. Throughout the text it is possible to view the exact source for + all the graphs by clicking on the "[src]" link in the caption of the + image shown. This will open the image together with the source in a + separate window. This way it is easy to compare the actual image with + the script that generated the image.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/910Groupingactivities.html b/html/includes/jpgraph/docs/html/910Groupingactivities.html new file mode 100644 index 0000000000..39a30768de --- /dev/null +++ b/html/includes/jpgraph/docs/html/910Groupingactivities.html @@ -0,0 +1,60 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.10 Grouping activities

+

It is common to group activities. We have used this feature in the + examples of constrains. There is no special type for activity bars that + are used to illustrate grouping. The common way of illustrating this + (as have been used above) is to add "half" a triangle marker at both + ends of the bar. The special provision that JpGraph does is that if you + add a left or right marker of type MARK_LEFTTRIANGLE or + MARK_RIGHTTRIANGLE those triangles will be drawn under the bars to give + the effect as show in the examples above. In the example above we also + have made the grouping bars have slightly less heigh since the end + triangles will visually "grow" the bar.

+

So to get the effect we want for a group bar we have to use the two + lines:

+ $groupbar-> +leftMark-> +SetType( +"MARK_LEFTTRIANGLE"); +
$groupbar +->rightMark->SetType( +"MARK_RIGHTTRIANGLE") +

+

+

As of the current version There is not yet any formatting support to + accomplish the effect of indentation for the titles so this is + accomplished by using a fixed width font and adding spaces in front of + the title.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9111Addingatitleforthecolumns.html b/html/includes/jpgraph/docs/html/9111Addingatitleforthecolumns.html new file mode 100644 index 0000000000..ca333d8b8f --- /dev/null +++ b/html/includes/jpgraph/docs/html/9111Addingatitleforthecolumns.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.11.1 Adding a title for the columns

+

Precisely as before you can also have a title spanning all the + columns. This title is specified with the property tableTitle of + the scale. Specifying a table title will automatically adjust the + height of the column titles to fit the table title. The small code + snippet below shows how to add a title.

 $graph +->scale->tableTitle-> +Set('Phase 1'); +
$graph->scale-> +tableTitle-> +SetFont( +FF_ARIAL, +FS_NORMAL,12); +
$graph->scale-> +SetTableTitleBackground( +'darkgreen@0.6'); +
$graph->scale-> +tableTitle-> +Show(true);
+

+

A full example of this is shown below

+
+
Figure 165: Adding a column titles stratching all title + columns. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9112SpecifyingCSIMentriesforcolumntitles.html b/html/includes/jpgraph/docs/html/9112SpecifyingCSIMentriesforcolumntitles.html new file mode 100644 index 0000000000..5355a2bc88 --- /dev/null +++ b/html/includes/jpgraph/docs/html/9112SpecifyingCSIMentriesforcolumntitles.html @@ -0,0 +1,49 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.11.2 Specifying CSIM entries for column titles +

+

In exactly the same way as for a single title it is possible to + specify individual CSIM targets for each of the title columns. This is + accomplished by specifying an array for both the target and the alt + text instead of a single string as arguments for SetCSIMTarget() + The following code snippet shows how to specify that.

+  $bar +->title->SetCSIMTarget(array('sometarget1.html','sometarget1.html'), +
array(
'alttext1' +,'alttext2'));

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/911Simpleradarplots.html b/html/includes/jpgraph/docs/html/911Simpleradarplots.html new file mode 100644 index 0000000000..cf09a14d7b --- /dev/null +++ b/html/includes/jpgraph/docs/html/911Simpleradarplots.html @@ -0,0 +1,95 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.1.1 Simple radar plots

+

Let's start by creating a very simple radar plot based on 5 data + points using mostly default values.

+

As the first thing you must remember to include the extension module + that contains the radar plot. "jpgraph_radar.php".

+

A very simple radar plot is created by the code

+(File: radarex1.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_radar.php"); +
     +
// Some data to plot +
$data  += array(55,80, +46,71,95 +); +
     +
// Create the graph and the plot +
$graph  += new RadarGraph +(250,200, +"auto"); +
$plot  += new RadarPlot +($data); +
+
// Add the plot and display the graph +
$graph->Add( +$plot); +
$graph->Stroke(); +
?>

+

and would give the result

+
+
Figure 111: A first very simple radar plot using default + settings [src] +  +

+

+

To change the size and position of the radar graph is similar to the + pie plot and you do it by using the methods + SetSize() and + SetCenter()

+

If you want a filled radar plot you need to specify the fill color + with the method + SetFillColor() The following example shows these methods in action

+
+
Figure 112: Changing size, position and adding fill color to + the radar plot. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/911Usingmultiplecolumnsastitles.html b/html/includes/jpgraph/docs/html/911Usingmultiplecolumnsastitles.html new file mode 100644 index 0000000000..07e52bfcaa --- /dev/null +++ b/html/includes/jpgraph/docs/html/911Usingmultiplecolumnsastitles.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.11 Using multiple columns as titles

+

It is often of interest not only to show one title for a gantt bar + but often one wants to show, title, start date, end date, duration or + effort and so on. Up until now we have, to keep things simple only + shown a single title for each activity. We will now show you how you + can specify an arbitrary number of columns as titles for a Gantt chart + as well as adding icons in the graph columns.

+

First out is an example to help visualize what we will achieve

+
+
Figure 164: A Gantt chart with multiple columns [src]  +

+

+

To use multiple columns there is two steps. First you need to set + the titles (name, color, fonts etc). Thereafter you need to add the + title columns for each individual bar.

+

To set the columns you will have to work with the Activity + information property of the scale. The following code excerpt show + this

+ $graph->scale->actinfo +->SetColTitles +( +
    array(
'Note' +,'Task','Duration', +'Start', +'Finish'),array( +30,100));
+

+

You will notice two things. We fist specify the titles using an + array. We have also specified a second array with the numbers 30 and + 100. This is an optional array that specifies the minimum width of, in + this case, the first two columns. By default the columns will be wide + enough to hold the widest text string in the column. However for + esthetic reasons you might sometimes want to increase the minium width. + This is what we have done here for the first two columns.

+

Furthermore you can also adjust the background colors and the style + and colors of the vertical dividing grid lines. In the previous image + we used the lines

 $graph-> +scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +
$graph->scale-> +actinfo-> +SetFont( +FF_ARIAL, +FS_NORMAL,10); +
$graph->scale-> +actinfo->vgrid->SetStyle +('solid'); +
$graph->scale-> +actinfo->vgrid->SetColor +('gray');

+

The style for the grid lines can also be "dashed", "dotted" or + "longdashed" as in other line formatting contexts within the library. + You can also adjust if you would like the small "3D" effect in the + titles. By default this is enabled. You can easily turn this of with a + call to

+ $graph->scale->actinfo +->SetStyle(ACTINFO_2D); +

+

To adjust the colors of the vertical dividing lines in the title the + method SetColor() is used as in + "$graph->scale->actinfo->SetColor('navy');".

+

The second thins is to actually populate the columns. This is done + (of course) as you add the activity bars to the graph. Previous we just + used a string as the title when we wasn't using columns. By simply + replacing this string with an array we specify the content of the + columns.

+

For example to specify two column titles we just create a + hypothetical Gantt bar as In the full example above we put all this in + arrays to make for better coding practice since we create several bars.

+

In addition to ordinary text you can also add an image or any of the + predefined icons available. In order to add that in a column you first + create an instance of IconImage() and then specify that instance + instead of the text. So in the previous code snippet if we wanted a + "open folder" image in the first column we would change the lines to

+ $iconopen = new  +IconImage( +GICON_FOLDEROPEN, +0.6); +
$title2=""; +
$bar  += new GanttBar +(0,array($iconopen, +$title2), +"2003-11-23", +"2003-12-05"); +

+

The available builtin icons are

+ +

In addition you can also use any of you own images if you specify + the argument as a string, for example

+  $myicon IconImage( +'myicon.png'); +

+

If you wonder, the second argument in the IconImage() call is + an optional scaling factor which you can use to adjust the size of the + image.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9121Addingatabletitle.html b/html/includes/jpgraph/docs/html/9121Addingatabletitle.html new file mode 100644 index 0000000000..f401fc217f --- /dev/null +++ b/html/includes/jpgraph/docs/html/9121Addingatabletitle.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.12.1 Adding a table title

+

The (default) white area in the top left of the gantt table may have + a title. This is accessed by the 'tableTitle' property of the gantt + scale. Using this is straightforward as the following lines show.

+  $graph +->scale->tableTitle-> +Set( +"(Rev: 1.22)"); +
$graph->scale-> +tableTitle-> +SetFont( +FF_FONT1, +FS_BOLD); +
$graph->scale-> +SetTableTitleBackground( +"silver"); +
$graph->scale-> +tableTitle-> +Show();
+

+

The example lines above also changes the default white background to + silver. Adding these lines to the previous example gives the following + result:

+
+
Figure 166: Adding a table title. [src]  +

+

+

From the above example you might notice that the width of the left + column (which holds all the titles) have automatically adjusted itself + to make the table title fit.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9122Modifyingthedividerlines.html b/html/includes/jpgraph/docs/html/9122Modifyingthedividerlines.html new file mode 100644 index 0000000000..b18a771d39 --- /dev/null +++ b/html/includes/jpgraph/docs/html/9122Modifyingthedividerlines.html @@ -0,0 +1,66 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.12.2 Modifying the divider lines

+

The vertical and horizontal lines between the titles and the bars + can be modified by accessing the 'divider' and 'dividerh' properties of + the scale. Again, this is straightforward as the following example + shows:

+ $graph->scale->divider +->SetWeight(3); +
$graph->scale-> +divider-> +SetColor( +"navy"); +
$graph->scale-> +dividerh-> +SetWeight(3); +
$graph->scale-> +dividerh-> +SetColor( +"navy"); +

+

The effect of this is shown in Figure 167 below

+
+
Figure 167: Modifying the dividing line [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9123Modifyingtheboxaroundtheplot.html b/html/includes/jpgraph/docs/html/9123Modifyingtheboxaroundtheplot.html new file mode 100644 index 0000000000..398a3ebbf8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/9123Modifyingtheboxaroundtheplot.html @@ -0,0 +1,55 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.12.3 Modifying the box around the plot

+

In a similar manner to the other plots in JpGraph you modify the Box + round the plot with the standard graph method 'SetBox()' as in

+  $graph +->SetBox(true, +"navy",3)
+

+

which will result in a thicker plot box around the area as shown + below

+
+
Figure 168: Modifying the box around the plotarea [src]  +

+

+

Note: You might notice the slight + discrepancy in design that here you use a method and in the previous + cases accessed a property which you modified. This is the unfortunate + affect of the evolving design and development of this library once it + was realised that the original design could be improved upon.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9124Horizontalgridsandalternatinglinecolors.html b/html/includes/jpgraph/docs/html/9124Horizontalgridsandalternatinglinecolors.html new file mode 100644 index 0000000000..0b443de062 --- /dev/null +++ b/html/includes/jpgraph/docs/html/9124Horizontalgridsandalternatinglinecolors.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.12.4 Horizontal grids and alternating line colors +

+

In order to make large charts easier to read it is possible to + specify alternating an horizontal grid and optional alternating line + colors in the background for Gantt charts. The horizontal grid is + accessed through the Graph::hgrid property and the line (used in + the grid) is accessed through the Graph::hgrid::line + sub-property

+

In order to specify the alternating line colors the + SetRowFillColor() method is used. For example, to use alternating + blue background with blue grid line the following lines would have to + be added to the graph script

+   +// Setup a horizontal grid +
$graph->hgrid-> +Show(); +
$graph->hgrid-> +line->SetColor('lightblue' +); +
$graph->hgrid-> +SetRowFillColor( +'darkblue@0.9'); +

+

Below is an example of a Gantt graph using this formatting

+
+
Figure 169: Adding a horizontal grid to the graph [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9125AddingiconstoGanttgraphs.html b/html/includes/jpgraph/docs/html/9125AddingiconstoGanttgraphs.html new file mode 100644 index 0000000000..a01c5f527c --- /dev/null +++ b/html/includes/jpgraph/docs/html/9125AddingiconstoGanttgraphs.html @@ -0,0 +1,54 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.12.5 Adding icons to Gantt graphs

+ As is illustrated in the image above it is also possible (just like for + normal Graph) to add small images (or icons) to a Gantt graph by + creating an IconPlot() instance and then adding it to the graph. In the + image above the following lines were used to add the small image of + "tux" in the left lower corner
+  $icon = new IconPlot( +'penguin.png', +0.01,0.95,1 +,15); +
$icon->SetAnchor( +'left', +'bottom'); +
$graph->Add( +$icon);
+
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9126Adjustingthemarginswithautosizing.html b/html/includes/jpgraph/docs/html/9126Adjustingthemarginswithautosizing.html new file mode 100644 index 0000000000..0ebb7820b2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/9126Adjustingthemarginswithautosizing.html @@ -0,0 +1,48 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.12.6 Adjusting the margins with auto-sizing

+ As of version 1.17 it is possible to use Graph::SetMargin() to specify + the margin for a Gantt graph even when the vertical height is + determined automatically. For example to generate a graph with no left, + right or bottom margin the following lines would be needed
+  $graph  += new GanttGraph +(500); +
$graph->SetMargin( +0,0,30 +,0);
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/912MoregeneralGanttformatting.html b/html/includes/jpgraph/docs/html/912MoregeneralGanttformatting.html new file mode 100644 index 0000000000..1267f8a3a8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/912MoregeneralGanttformatting.html @@ -0,0 +1,41 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.12 More general Gantt formatting

+

In this section we will show a few more way by which you may + customize the gantt chart itself. This includes

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/912Specifyingtitlesfortheaxisandlegendsfortheplots.html b/html/includes/jpgraph/docs/html/912Specifyingtitlesfortheaxisandlegendsfortheplots.html new file mode 100644 index 0000000000..13a57fa784 --- /dev/null +++ b/html/includes/jpgraph/docs/html/912Specifyingtitlesfortheaxisandlegendsfortheplots.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.1.2 Specifying titles for the axis and legends for + the plots

+

We normally would like something more meaningful as description of + each axis than it's number. Specifying the titles are accomplished + through the use of the method SetTitles() of the graph. Let's say that + each axis corresponds to a month. We could then use the code

+  $titles  += $gDateLocale +->GetShortMonth +(); +
$graph->SetTitles( +$titles); +

+

As you can see the way radar plot is constructed will assign the + titles (and plot points) in a counter-clockwise direction. If you want + them in clock-wise order you will have to inverse your input data array + as well as the title array.

+

To specify a legend you (as with the other plot) make use of the + SetLegend(); method on each radar plot.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/913Addinggridlinetotheradarplot.html b/html/includes/jpgraph/docs/html/913Addinggridlinetotheradarplot.html new file mode 100644 index 0000000000..fc23cecf3b --- /dev/null +++ b/html/includes/jpgraph/docs/html/913Addinggridlinetotheradarplot.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.1.3 Adding grid line to the radar plot

+

Each major tick mark can also be connected together to create a + grid. The grid is accessed through the 'grid' property of the graph. To + enable the grid and set the line style to "dotted" you would have to + add the lines

+ $graph->grid->Show +(); +
$graph->grid-> +SetLineStyle( +"dotted"); +

+

and would result in the following graph

+
+
Figure 113: Adding dotted gridlines to the graph [src]  +

+

+

By design the plot is above the grid line but beneath the axis in + image depth, hence some part of the grid lines are hidden.

+

To have the grid lines more "visible" just change their color, say + to, dark red by invoking the SetColor() method on the grid lines which + would give the following result

+

Another simple change we could do would be to just change the + background color of the radar graph. This is (not surprisingly) done by + a call to the method SetColor() invoked on the graph object.

+
+
Figure 114: Changing the background color [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/913SimplifyingthedrawingofGanttgraphs.html b/html/includes/jpgraph/docs/html/913SimplifyingthedrawingofGanttgraphs.html new file mode 100644 index 0000000000..93b14d3757 --- /dev/null +++ b/html/includes/jpgraph/docs/html/913SimplifyingthedrawingofGanttgraphs.html @@ -0,0 +1,140 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.13 Simplifying the drawing of Gantt graphs

+

As we have shown in the previous examples constructing a Gantt chart + consists of a number of repetitive tasks; Create the individual + activity bars and add them to the graph.

+

Now when you have a basic understanding of how this works you are + ready to appreciate a small helper method. +GanttGraph::CreateSimple(). This method takes a few arrays of data + which specifies you Gantt chart and then constructs this chart. By + using this method you sacrifices a few adjustment possibilities for + simplicity. This method is nothing magical it just takes the data for + the activities,(start and end date, titles, progress, any constrains + and so on) and constructs the activities and adds them to the graph.

+

The activities are specified in data array which for each activity + have the following fields

+ +

+

So for example to create a Gantt chart consisting of two activities + which are grouped and a milestone one would have to use something + similar to the following code

+

+ $data = array( +
  array(
0,ACTYPE_GROUP,    "Phase 1",        "2001-10-26", +"2001-11-23", +""), +
  array(
1,ACTYPE_NORMAL,   "  Label 2",      "2001-10-26", +"2001-11-13", +"[KJ]"), +
  array(
2,ACTYPE_NORMAL,   "  Label 3",      "2001-11-20", +"2001-11-22", +"[EP]"), +
  array(
3,ACTYPE_MILESTONE,"  Phase 1 Done""2001-11-23", +"M2") ); +
+
// Create the basic graph +
$graph  += new GanttGraph +(); +
$graph->title-> +Set( +"Gantt Graph using CreateSimple()"); +
+
// Setup scale +
$graph->ShowHeaders( +GANTT_HYEAR  +GANTT_HMONTH  +GANTT_HDAY  +GANTT_HWEEK); +
$graph->scale-> +week->SetStyle(WEEKSTYLE_FIRSTDAY); +
+
// Add the specified activities +
$graph->CreateSimple( +$data); +
+
// .. and stroke the graph +
$graph->Stroke(); +

+

This will then show up as

+
+
Figure 170: Using the simplified way via CreateSimple() + method +[src]  +

+

+

You may (slightly) modify the appearance of the simple Gantt charts + by means of the methods GanttGraph::SetSimpleFont() and GanttGraph::SetSimpleStyle() But not anything else, remember + that the purpose with this way of constructing graphs is to be simple. + If you need full advanced control you have to construct all the + activities in the "normal" way.

+

You can also specify constrains and progress for each bar by + supplying additional data arrays to GanttGraph::CreateSimple().

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/914AddingCSIMClientsideImageMapstoGanttcharts.html b/html/includes/jpgraph/docs/html/914AddingCSIMClientsideImageMapstoGanttcharts.html new file mode 100644 index 0000000000..4377e594ad --- /dev/null +++ b/html/includes/jpgraph/docs/html/914AddingCSIMClientsideImageMapstoGanttcharts.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.14 Adding CSIM (Client side Image Maps) to Gantt + charts

+

Gantt charts can have independent (different targets) hot spots in + both the activities and in the associated labels for each activity.

+

You specify the target and the associated "Alt" text for an activity + bar by calling the + GanttBar::SetCSIMTarget() and + GanttBar::SetCSIMAlt()

+

In a similar way you set the target and Alt texts for the activity + title as the following code extract shows.

 $bar +->SetCSIMTarget +("http://localhost/abc/" +); +
$bar->SetCSIMAlt( +"Alt Text for the bar"); +
$bar->title-> +SetCSIMTarget( +"http://localhost/abc"); +
$bar->title-> +SetCSIMAlt( +"Alt Text for the title"); +

+

The above code assumes that your activity is available in the + variable 'bar'. In the example directory there is a complete example of + how to use CSIM together with Gantt charts in the "ganttcsimex1.php" + file. (Please note that this example makes use of the simplified Gantt + chart specification using the CreateSimple() method.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/914Addingseveralplotstothesameradargraph.html b/html/includes/jpgraph/docs/html/914Addingseveralplotstothesameradargraph.html new file mode 100644 index 0000000000..1d96362085 --- /dev/null +++ b/html/includes/jpgraph/docs/html/914Addingseveralplotstothesameradargraph.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.1.4 Adding several plots to the same radar graph +

+

You can easily create several radar plot which are added to the same + radar graph. The thing to remember is that if you use filled radar + plots and they overlap each other that the order which they are added + will be the order they are drawn.

+

A simple example of this is shown below

+
+
Figure 115: Several radar plots in one radar graph [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/915Addingconstrainsbetweenyouractivities.html b/html/includes/jpgraph/docs/html/915Addingconstrainsbetweenyouractivities.html new file mode 100644 index 0000000000..8e5ddf520d --- /dev/null +++ b/html/includes/jpgraph/docs/html/915Addingconstrainsbetweenyouractivities.html @@ -0,0 +1,92 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.15 Adding constrains between your activities

+

With Gantt charts there is often the need to illustrate constrains + between one or several activities. One of the most common constrain is + that on activity can't start before an other activity finish.

+

JpGraph support visualizing the following types of constrains

+ +

An example will clarify how to specify a constrain between two + activities.

+

Assume that we start with the Gantt schema as illustrated below

+
+
Figure 171: The original Gantt schema we wich to add + constrains to +[src]  +

+

+

We would now like to add the constrains that the activity "Label 3" + cant start before activity "Label 2" has finished and that the + milestone "Phase 1 done" is depending on when activity "Label 3" is + done.

+

The principle of adding constrains is that you for each activity you + want to have a constrain you have to tell to what other activity this + constrain should be to. That other activity is specified by telling on + what row that activity lies. Depending on what type of constrain, e.g. + Start-to-End, an arrow will now connect the two activities in correct + way.

+

The way to do this is to call the + SetConstrain() method on the activity. In this method you specify + the type of constrain as well as to what other activity this constrain + should be to. If you read the class reference you can also see that you + can specify the type and size of arrow used. For now we will just use + the default sizes and type.

+

So for example to add an End-To-Start constrain between "Label 2" + and "Label 3" you could write

+  $bar2-> +SetConstrain(2,CONSTRAIN_ENDSTART)
+

+

The first parameter in the call above "2" is the row of the target + activity (i.e. the row where "Label 3") activity is. In the example + below we have added the constrains we wanted.

+
+
Figure 172: Adding constrains to a gantt chart [src]  +

+

+

A note: The actual path followed by the arrow is controlled by some + heuristics to make it clear what the constrain is. It has been a design + decision that in order to keep the API simple the user has no further + detailed controlled on the actual path followed. However, in future + version the heuristics may be extended and provide some + user-controllable parameters.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/915Addingplotmarksiradargraphs.html b/html/includes/jpgraph/docs/html/915Addingplotmarksiradargraphs.html new file mode 100644 index 0000000000..df1f191bff --- /dev/null +++ b/html/includes/jpgraph/docs/html/915Addingplotmarksiradargraphs.html @@ -0,0 +1,44 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.1.5 Adding plotmarks i radar graphs

+

In exactly the same way as for line graphs it is possible to add + plot marks in radar plots. The mark property is accessed through the + RadarPlot::mark The example below adds a red ball as a marker.

+
+
Figure 116: Adding plotmarks to a radar plot [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9161Showingonlypartofthegraph.html b/html/includes/jpgraph/docs/html/9161Showingonlypartofthegraph.html new file mode 100644 index 0000000000..d9a1064064 --- /dev/null +++ b/html/includes/jpgraph/docs/html/9161Showingonlypartofthegraph.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.16.1 Showing only part of the graph

+

You can choose to only display a vertical slice of the overall Gantt + chart by explicitly specifying a date range with the method + GanttGraph::SetDateRange(). This will cap any bars to only be displayed + in between the start and end date given as parameters. For example + specifying

+ $graph-> +SetDateRange( +"2001-12-20", +"2002-01-20"); +

+

will show the part of the Gantt chart between the 20 Dec 2001 and 20 + of January 2002. Please note that the format depends on the locale + setting.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9162Specifyingstartdayofweek.html b/html/includes/jpgraph/docs/html/9162Specifyingstartdayofweek.html new file mode 100644 index 0000000000..46df99b2e9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/9162Specifyingstartdayofweek.html @@ -0,0 +1,38 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.16.2 Specifying start day of week

+

You can set the week start day with a call to + GanttScale::SetWeekStart(). This method takes an integer [0,6] as input + which represents the start day of the week, 0 means Sunday, 1 Monday, 2 + Tuesday and so on. The default is to start the week on Monday.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/916Advancedformatting.html b/html/includes/jpgraph/docs/html/916Advancedformatting.html new file mode 100644 index 0000000000..71190f6d1a --- /dev/null +++ b/html/includes/jpgraph/docs/html/916Advancedformatting.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.16 Advanced formatting

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/917Localizing.html b/html/includes/jpgraph/docs/html/917Localizing.html new file mode 100644 index 0000000000..ed79867402 --- /dev/null +++ b/html/includes/jpgraph/docs/html/917Localizing.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.17 Localizing

+

Depending on your installation of PHP you might have support for + several locales. By default the locale is set up to use the default + locale on the server.

+

To specifically set a locale you specify the wanted locale with a + locale string (ala standard PHP), for example American English is + specified with the string 'EN_US', British English with 'EN_UK' 'nl_NL' + for Dutch and so on. If your current installation does not support the + specified locale an error message will be given.

+  $graph +->scale->SetDateLocale( +"se_SE"); +

+

The result is displayed below.

+
+
Figure 173: Using swedish locale. (Can you spot the + difference from English?) +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9181Enablingantialiasedlines.html b/html/includes/jpgraph/docs/html/9181Enablingantialiasedlines.html new file mode 100644 index 0000000000..e364246040 --- /dev/null +++ b/html/includes/jpgraph/docs/html/9181Enablingantialiasedlines.html @@ -0,0 +1,89 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.18.1 Enabling anti-aliased lines

+

Anti-aliased lines are enabled by calling the method + SetAntiAliasing() in the + Image class in the script where you want to use anti-aliasing.

+

The anti-aliasing for lines works by "smoothing" out the edges on + the line by using a progressive scale of colors interpolated between + the background color and the line color.

+

Note: The algorithm used for anti-aliasing + of lines is quite simple. It would be possible to achieve even better + result by doing some real 2D signal processing. However, doing real + time 2D signal processing on a HTTP server would be foolish so the + design is deliberately kept simple. To achieve best visual result + always use a dark line color on a light background.

+

An example will show that this, quite simple algorithm, gives a + reasonable good result. The figures below shows a radar plot with and + without anti-aliasing.

+

+
+
Figure 174: Spiderplot without anti-aliasing [src]  +

+

+

+

+
+
Figure 175: Spiderplot with anti-aliasing [src]  +

+

+

+

One thing you need to keep in mind when deciding to use + anti-aliasing is that it could have potentially a dramatic effect on + the time it takes to generate the image. Line drawing with + anti-aliasing turned on is roughly 8 times slower than the normal line + drawing so treat this feature wisely.

+

Furthermore there are a couple of "gotchas" you should be aware of + when using anti-aliasing.

+
    +
  1. Anti-aliased lines uses up more of the available color-palette. The + exact number of colors used is dependent on the line-angle, a near + horizontal or near vertical line uses more colors (number of lines with + different angles uses more colors). Hence it might not be possible to + use anti-aliasing with color-gradient fill since the number of + available colors in the palette might not be enough. A normal palette + can keep around 256 colors. This means that you are advised to use a + true-color image when using anti-aliasing.
  2. +
  3. Anti-aliasing does not work very well together with background + images since it assumes a the same solid color on each side of the + line. Doing a more advanced anti-aliasing algorithm would simple take + to much processing power.
  4. +
  5. Anti-aliased lines will ignore the line width specified. They will + always have a width of roughly 1.
  6. +
+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/918AntialiasinginJpGraph.html b/html/includes/jpgraph/docs/html/918AntialiasinginJpGraph.html new file mode 100644 index 0000000000..9cd09179a7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/918AntialiasinginJpGraph.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.18 Anti-aliasing in JpGraph

+

From version 1.2 JpGraph supports drawing of anti-aliased lines. + There are a few caveats in order to use this which is discussed in this + section.

+

Note: Note that anti-aliasing will not be + used for either horizontal, vertical or 45 degree lines since they are + by their nature are sampled at adequate rate.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/919Rotatingthegraphs.html b/html/includes/jpgraph/docs/html/919Rotatingthegraphs.html new file mode 100644 index 0000000000..fb40533c4a --- /dev/null +++ b/html/includes/jpgraph/docs/html/919Rotatingthegraphs.html @@ -0,0 +1,140 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.19 Rotating the graphs

+

JpGraph provide the possibility for you to rotate the generated + graph an arbitrary angle. This will only affect the actual graph (axis, + axis titles, labels and so on) and not fixed elements on the graph like + title or footer.

+

Rotation is probably most used to rotate a graph 90 degrees, for + example a bar graph to get the effect of horizontal bars.

+

+
+

Performance note: Adding a rotation transformation + will make the graph generation slightly slower since each point of the + graph as to go through a transformation step before being stroked on to + the image. JpGraph optimizes this by using a pre-calculated + transformation matric and also optimizes the special case 90 degrees.

+
+
+

By default the center of the rotation will be the center of the plot + area, which may or may not coincide with the center of the entire + image.

+

To control the rotation you use the two methods

+ +

For example

+ $graph->image->SetAngle +(45);

+

+

There is actually a third method that you could use, adding a + translation to the graph after the rotation. Since + this probably a very little used method we don't discuss it further but + refer the reader to the class reference instead + Graph:image::SetTranslation()

+

When you rotate an image you should be aware of that the individual + labels on the axis are not rotated. The design decision behind this is +
a) Bit mapped font can't be rotated +
b) Maintain readability

+

Please remember that you may still rotate the labels by calling the Axis::SetLabelAngle() + method.

+

Since the anchor point for labels is by default the optimum for + graph at 0 degree you might want to adjust the anchor point and + alignment for the labels on the axis to get a better visual appearance + on you rotated graph. This is accomplished by the method + Axis::SetLabelAlign() For a detailed discussion on how to do this + please see the section on horizontal bar graphs, ( +Working with bar plots )

+

The table below shows some examples on different kinds of rotation + to give you an idea of how changing the angle and rotation center may + be used to generate different effects. The top left graph is the + original image. The point of rotation has been marked with a red-cross + in each of the images.

+

+
+
Figure 176: Original image [src]  +

+

+

+
+
Figure 177: Rotated 45 degrees around center of plot area [src]  +

+

+

+
+
Figure 178: Rotated 90 degrees around center of plot area [src]  +

+

+

+
+
Figure 179: Rotated 45 degrees around center of the image [src]  +

+

+

+
+
Figure 180: Rotated 90 degrees around center of the image [src]  +

+

+

+
+
Figure 181: Rotated -30 degrees around the lower left point + of the plot area +[src]  +

+

+

+

As you can see from the images above if you rotate about any other + point than the center of the plot area the plot can be placed outside + the image after rotation.

+

Since the rotation, by design, only affects the plot area it is + often most effective to use when the color of the margin is the same as + the background color.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/91Radarplots.html b/html/includes/jpgraph/docs/html/91Radarplots.html new file mode 100644 index 0000000000..ed9aae17dd --- /dev/null +++ b/html/includes/jpgraph/docs/html/91Radarplots.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.1 Radar plots

+

Spider plots are most often used to display how a number of results + compare to some set targets. They make good use of the human ability to + spot symmetry (or rather un-symmetry) . the figure below show an + example of a spider (sometimes called a web-plot). Spiderplots are not + suitable if you want very accurate readings from the graph since, by + it's nature, it can be difficult to read out very detailed values.

+
+
Figure 110: A typical radar graph with two plots [src]  +

+

+

+ +

In the following section we show how to draw both simple and complex + radar graph. As we will show all the settings will follow the same + pattern as for the more standard linear graphs.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/91WhyuseGanttcharts.html b/html/includes/jpgraph/docs/html/91WhyuseGanttcharts.html new file mode 100644 index 0000000000..a7f96e22c1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/91WhyuseGanttcharts.html @@ -0,0 +1,42 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.1 Why use Gantt charts?

+

The cynical view: To explain why your project is over-due and + over-budget.

+

The pragmatic view: To keep management of our back and know what we + have forgotten

+

The common view: As a tool to help identify project issues and + highlight problem areas.

+

Basically, Gantt charts are used to show the state of a number of + activities (possible grouped) against time.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/920Adjustingbrightnessandcontrastforimagesandbackgrounds.html b/html/includes/jpgraph/docs/html/920Adjustingbrightnessandcontrastforimagesandbackgrounds.html new file mode 100644 index 0000000000..57035c3956 --- /dev/null +++ b/html/includes/jpgraph/docs/html/920Adjustingbrightnessandcontrastforimagesandbackgrounds.html @@ -0,0 +1,67 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.20 Adjusting brightness and contrast for images and + backgrounds

+

The following section only applies to palette images. This + means it wont work on true-color images.

+

It is often desirable to have a background image look a little bit + "washed" out so it doesn't take the concentration away from the actual + graph. There are basically two ways of accomplish this

+
    +
  1. Prepare the image with an external images editor to adjust the + level of brightness and contrasty to a desirable level
  2. +
  3. Use JpGraph:s built in adjustment for contrast, brightness and + color saturation.
  4. +
+

To adjust the background image call The levels for both brightness + and contrast are real numbers in the range [-1, 1] You can choose to + adjust for example just the background image or you might also choose + to adjust the whole image. To change the background image just use the + method + Graph::AdjBackgroundImage() to specify a suitable value. Let's show + some example on what we can do with this. The following example have + been generated by using the small utility "adjimg.php" which you can + find in the "utils/" directory.

+

+
Brightness=0, contrast=0, saturation = -1 (Original image)

+

+
Brightness=0, contrast=0, saturation = -1 (Black & White image)

+

+
Brightness=0.3, contrast=-0.3, saturation=0

+

+
Brightness=0.4, contrast=-0.7, saturation=0

+

+
Brightness=0.4, contrast=-0.7, saturation=-1

+

+
Brightness=0, contrast=0, saturation=1

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/921AddingguidelinestoPiePlots.html b/html/includes/jpgraph/docs/html/921AddingguidelinestoPiePlots.html new file mode 100644 index 0000000000..db9ecf3d1c --- /dev/null +++ b/html/includes/jpgraph/docs/html/921AddingguidelinestoPiePlots.html @@ -0,0 +1,93 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.2.1 Adding guide lines to Pie Plots

+

For very busy Pie plots it can become too little space for the + labels to be printed just beside the pie slice. For this purpose it is + possible to use guide lines for the labels. The library will then draw + a line from the center edge of the slices to the label which will be + positioned further out from the Pie Plot.

+

There is one method that is primarily used to handle this, + PiePlot::SetGuideLines() the simplest usage of this would be

+  $pieplot +->SetGuideLines +();

+

An example of this could then be

+
+
Figure 120: Using guide lines for PiePlots [src]  +

+

+

The above example will give guide lines very similar as what is + produced by other programs, e.g. Excel. In addition to the above + variant it is also possible to instruct the library to line up the + labels vertically in a way that we think is easier to read. This is + achieved by specifying the second parameter to the SetGuideLines() to + 'false' as in

 $pieplot-> +SetGuideLines( +true,false);
+

+

The first parameter is to enable/disable the guide-lines. With the + same example as above this would then produce the image

+
+
Figure 121: Using guide lines for PiePlots with vertically + lined up labels. +[src]  +

+

+

It is also possible to configure the vertical distance between the + labels. By default the distance between the labels is roughly 40% of + the labels font height. By using the method + PiePlot::SetGuideLinesAdjust() it is possible to specify a + fractional value which is interpretated as the distance between the + bottom of one label to the bottom of the next. This means that + specifying a value of '1.0' the labels will have no space between them + and the bottom of one label will touch the top of another label. By + default this value is 1.4.

+

By increasing or decreasing this value it is possible to make the + labels become positioned more or less compact. Below we have taken the + above example and reduced the distance to '1.1' and as can be seen this + yields much more compact labeling.

+
+
Figure 122: Adjusting to a smaller vertical distance between + the labels +[src]  +

+

+

+

Note: Guide lines is only available in 2D Pie plots.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/921Timingthegenerationofgraphs.html b/html/includes/jpgraph/docs/html/921Timingthegenerationofgraphs.html new file mode 100644 index 0000000000..f6761e4444 --- /dev/null +++ b/html/includes/jpgraph/docs/html/921Timingthegenerationofgraphs.html @@ -0,0 +1,65 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.21 Timing the generation of graphs

+

During development and optimization it can be very handy to have the + actual time it took to generate the image as a footnote. The following + example shows the usage of this feature

+
+
Figure 182: Timing of a graph [src]  +

+

+

To enable this feature you can proceed in two ways.

+
    +
  1. You can either set the global define BRAND_TIMING (in jpgraph.php) + to true. This will add the timing string to all graphs generated.
  2. +
  3. .. or you can enable it for a specific graph by setting the global + variable $gJpgBrandTiming as in
    +  $gJpgBrandTiming=true; +
    +

    in the beginning of the script.

    +
  4. +
+

If you like you might also change the way the timing is formatted by + setting the string defined by BRAND_TIMING_FORMAT (in jpgraph.php). + This string represents a standard printf() format string.

+Note: JpGraph contains a utility class called JpgTimer which you + can use yourself should you need ms timing of part of your own code. + The API is really simple. The class supports multiple running timers + and you start a timer simply by calling the Push() method. This will + start a new timer and put it on the top of the timer stack. To stop the + timer, pop it from the stack and return the timing value simply call + Pop().

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/922Creating3Dpieplots.html b/html/includes/jpgraph/docs/html/922Creating3Dpieplots.html new file mode 100644 index 0000000000..3b8faef380 --- /dev/null +++ b/html/includes/jpgraph/docs/html/922Creating3Dpieplots.html @@ -0,0 +1,59 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.2.2 Creating 3D pie plots

+

So far we have only made use of 2D pie plots, creating 3D pie plots + is no more difficult. Instead of creating the plots with a call to + PiePlot() you create the plots with a call to + PiePlot3D() If we just take the first simple pie plot and replace + the call to PiePlot() with a call to PiePlot3D() we get the following + result.

+
+
Figure 123: A first example of a 3D pie plot [src]  +

+

+

3D Pie plots have the same possibilities as the normal pie plots + with the added twist of a 3:rd dimension. You can adjust the + perspective angle with the method + SetAngle() So for example to make the pie more "flat" you just set + it to a smaller angle. Setting the perspective angle to 20 degrees in + the previous example will give the following result.

+
+
Figure 124: Adjusting the perspective angle [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/922Usingcountryflagsinvariouscontext.html b/html/includes/jpgraph/docs/html/922Usingcountryflagsinvariouscontext.html new file mode 100644 index 0000000000..6a757ee72f --- /dev/null +++ b/html/includes/jpgraph/docs/html/922Usingcountryflagsinvariouscontext.html @@ -0,0 +1,75 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.22 Using country flags in various context

+

JpGraph has built-in support for over 200 country flags, i.e. they + are available to be used in graphs without any external image + definitions.

+

Country flags can be used in primarily two settings

+
    +
  1. As image markers in line and scatter graphs
  2. +
  3. As background images for graphs
  4. +
  5. As a special type of icons (using the IconPlot()) which can be + added to the graph in any arbitrary position. See next section
  6. +
+

In order to make it easy to find the appropriate country flags they + can be specified with either full or partial name or as an numeric + index. The routines in JpGraph are "smart" enough to figure out which + way you are trying to specify a particular flag.

+

To specify a country flag as a marker you have to specify the + special mark type as one of MARK_FLAG1,MARK_FLAG2,MARK_FLAG3 or + MARK_FLAG4

+

Flags are internally stored in 4 different sizes which is indicated + by the number in the mark types. Flags may also be arbitrary scaled + when displayed. Since this is partially overlapping functionality you + might very well ask why the flags are stored in four different basic + sizes. The reason is of course performance. It you only want a very + small flag it takes processing time to scale down a large image to, + say, a small icon size. At the same time for large flags to be used as + background a small original flag might not have enough details to be + scaled up to a large size. Hence the reason for storing the flags in 4 + different sizes.

+

The example below shows how to use country flags as markers

+
+
Figure 183: Using country flags as line plot markers [src]  +

+

+

To use country flags as background one has to use the method + Graph::SetBackgroundCountryFlag(). With this method you can specify + both how much of the image should be filled as well as how much of the + flag should be mixed into the background.

+

To see a list of all supported country flags you can run the script + "listallcountryflags.php" in the Example directory. This will show you + a table with all flags.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/923Addingiconsontothegraph.html b/html/includes/jpgraph/docs/html/923Addingiconsontothegraph.html new file mode 100644 index 0000000000..46ee3b4b38 --- /dev/null +++ b/html/includes/jpgraph/docs/html/923Addingiconsontothegraph.html @@ -0,0 +1,65 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.23 Adding icons onto the graph

+

In addition to the standard background image you can also add an + arbitrary number of icons onto the background of the graph. These icons + are created with a call to the special Plot class IconPlot.

+

The image from icons are taken from a file or as one of the builtin + country flags.

+

You may control how much of the icon should be blended into the + background by specifying a percentage (1-100). The example below shows + how to mix in the picture of "Tux" into the background of a filled line + graph. Note: This example uses alpha blending and will therefore + require GD2.

+
+
Figure 184: Adding an icon into the background [src]  +

+

+

To specify any of the roughly 200 country flags as an icon you first + create an empty Icon and then call the IconPlot::SetCountryFlag() with + the appropriate parameters. (See the class reference). This is + illustrated below by adding the Icelandic flag into the background as + an icon

+
+
Figure 185: Adding an icon flag into the background [src]  +

+

+

Note: Some older versions of PHP pre-4.3.3 + using the builtin GD have problems rendering blended images. If you + have this problem then you need to upgrade to a more recent version of + PHP.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/923Explodingpieslices.html b/html/includes/jpgraph/docs/html/923Explodingpieslices.html new file mode 100644 index 0000000000..1c8fab49fc --- /dev/null +++ b/html/includes/jpgraph/docs/html/923Explodingpieslices.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.2.3 Exploding pie slices

+

One way to attract attention to some specific piece of information + in a pie chart is to "explode" one or more slices. Both 2D and 3D pies + support exploding one or several slices.

+

Exploding slices is accomplished by the methods + Explode() and + ExplodeSlice() The first method is used if you want to explode more + than one slices and the second is a shorthand to make it easy to just + explode one slice.

+

For example to explode one slice the default "explode" radius you + would just have to say

+  $pieplot->ExplodeSlice( +1) +

+

The above line would explode the second slice (slices are numbered + from 0 and upwards) the default amount. Doing this to the two previous + example would result in

+
+
Figure 125: Exploding one slice [src]  +

+

+

+

+
+
Figure 126: Exploding one 3D slice [src]  +

+

+

+

To explode all slices at once you can use the + PiePlot::ExplodeAll() method. If you want to explode several slices + you can use the + PiePlot::Explode() method and supply a suitable array argument.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/924Specifyingandadjustinglabelsonpieplots.html b/html/includes/jpgraph/docs/html/924Specifyingandadjustinglabelsonpieplots.html new file mode 100644 index 0000000000..2eabf36a66 --- /dev/null +++ b/html/includes/jpgraph/docs/html/924Specifyingandadjustinglabelsonpieplots.html @@ -0,0 +1,80 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.2.4 Specifying and adjusting labels on pie plots +

+

By default the values shown just outside the pie for each slice are + the percentage value for each slice. If you instead wanted the absolute + value you would just have to use the + SetLabelType() method. So to use the absolute value you would call

+

+ $pieplot-> +SetLabelType( +"PIE_VALUE_ABS"); +

+

+

Furthermore you could enhance the formatting of the value by either + using a printf() style format string (using + SetFormat() ) or by providing a formatting function callback (using + + SetFormatCallback() ) for doing more advanced formatting.

+

You can also adjust the position of the labels by means of the + PiePlot::SetLabelPos() method. The argument to this method is + either the fraction of the radius or the string 'auto'. In the latter + case JpGraph automatically determines the best position and the the + first case The following example illustrates this

+
+
Figure 127: Example of adjusting the position of the labels + for the slices +[src]  +

+

+

+

If this formatting is not enough you can also "manually" specify the + labels for each slice individually. You do this by using the + PiePLot::SetLabels() method. This will let you specify individual + text strings for each label. In each specification you can also add a + printf() formatting specification for a number. The number passed on + will be either the absolute value for the slice or the percentage value + depending on what was specified in the call to + SetLabelType()

+

The SetLabels() method can also take a second parameter, the label + position parameter. This is just a shortcut to the SetLabelPos() as + described above. By default the position will be set to 'auto' if not + explicitely specified.

Note: The alignment of + the labels will be different depending on whether they are inside or + outside the pie. When inside the center of the strings will be aligned + with the center of the slice at the specified fraction of the radius. + When positioned outside the alignment will depend on the angle to avoid + that the labels inadvertely writes over the pie.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/925Specifyingslicecolorsandusingthemes.html b/html/includes/jpgraph/docs/html/925Specifyingslicecolorsandusingthemes.html new file mode 100644 index 0000000000..f686e0b909 --- /dev/null +++ b/html/includes/jpgraph/docs/html/925Specifyingslicecolorsandusingthemes.html @@ -0,0 +1,84 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.2.5 Specifying slice colors and using themes

+

Another typical change would be to change the colors of the slices. + There are two fundamental ways of doing this. You either manually + specify the colors for the slices as an array using the method + SetSliceColors() If you specify fewer colors than the number of + slices they will just wrap around.

+

Another way is to use one of the pre-defined color "themes". This is + just a predefined set of colors that will be used for the slices. You + choose what "theme" you like to use with the method ( + SetTheme() ) At the time of this writing the available themes are

+ +

The following example shows the same pie using the different + "themes" in order.

+
+
Figure 128: +[src]  +

+

+

+
+
Figure 129: +[src]  +

+

+

+
+
Figure 130: +[src]  +

+

+

+
+
Figure 131: +[src]  +

+

+

+

A complete color chart of all available colors in the different + themes can be found here

+

Another simple change is to remove the border ( or change it's + colors ) that separates each slice. This can be done by a call to + ShowBorder()

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/926Addingdropshadowstotheslices.html b/html/includes/jpgraph/docs/html/926Addingdropshadowstotheslices.html new file mode 100644 index 0000000000..7a0cc3bff4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/926Addingdropshadowstotheslices.html @@ -0,0 +1,46 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.2.6 Adding drop shadows to the slices

+

An additional visual enhancements can be made by adding a drop + shadow to the individual slices. This is accomplished by means of the PiePlot::SetShadow() + method. Adding a drop shadow is often more affective if the pie has one + or more slices exploded as the following example shows

+
+
Figure 132: Adding a drop hadow to the slices [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/927Anothervariantof2DPieplots.html b/html/includes/jpgraph/docs/html/927Anothervariantof2DPieplots.html new file mode 100644 index 0000000000..084fe5e7e7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/927Anothervariantof2DPieplots.html @@ -0,0 +1,92 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.2.7 Another variant of 2D Pie plots

+

As mentioned in the beginning there are two versions of the 2D pie + plots. The normal pie plot created as an instance of + class PiePlot and a variant created as an instance of + class PiePlotC

+

This variant is an extension of the standard PiePlot in the sense + that it also have a filled circle in the center. The following example + illustrates this

+

+
+
Figure 133: Example of the variant of pie plot with a filled + center circle +[src]  +

+

+

+

Since the PiePlotC is an extension to the basic pie plot all the + normal formatting you can do for pie plots you can also do for the + PiePlotC .

+

The additional formatting only concerns the filled middle circle. + You have the option of adjusting size, fill color and all font + properties. You perform these operations with the methods

+

+ + + + + +
+PiePlotC::SetMidColor()Set fill color of mid circle
+PiePlotC::SetMidSize()Set size (fraction of radius)
+PiePlotC::SetMidTitle()Set title string (may be + multi-lined)
+PiePlotC::SetMid()Set all parameters in a single method + call
+

In addition to the normal CSIM for PiePlot:s the center area is also + a CSIM hotspot. You specify the target CSIM with a call to + PiePlotC::SetMidCSIM()

+

The next example shows an example with some more innovative + formatting. In this example we have :

+ +

+
+
Figure 134: PiePlotC with some more innovative formatting to + make it more interesting. +[src]  +

+

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/92CapabilitiesinJpGraphGanttmodule.html b/html/includes/jpgraph/docs/html/92CapabilitiesinJpGraphGanttmodule.html new file mode 100644 index 0000000000..518cd3758d --- /dev/null +++ b/html/includes/jpgraph/docs/html/92CapabilitiesinJpGraphGanttmodule.html @@ -0,0 +1,74 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.2 Capabilities in JpGraph Gantt module

+

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/92Pieplots.html b/html/includes/jpgraph/docs/html/92Pieplots.html new file mode 100644 index 0000000000..89d9e06ea9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/92Pieplots.html @@ -0,0 +1,155 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.2 Pie plots

+

So far we have just show plots based on an X-Y coordinate system. + This is not the only types of graphs you can create with JpGraph. + Another common type is Pie plots. JpGraph supports both 2D and 3D pie + plots. For 2D pie plots there are also 2 versions, but more on that + later.

+

The main difference as compared to the X-Y plots is that to all pie + plots are added to the + PieGraph() instead of the Graph() object we used for the X-Y graphs + we have drawn so far. For this you must first include the + "jpgraph_pie.php" in your script (or "jpgraph_pie3d.php" if you want to + use 3-dimensional pies).

+

Below you cane see the code needed to create the simplest possible + pie graph just using the default settings.

+

include ( +"../jpgraph.php"); +
include (
"../jpgraph_pie.php"); +
+
$data  += array(40,60, +21,33); +
+
$graph  += new PieGraph +(300,200); +
$graph->SetShadow(); +
+
$graph->title-> +Set( +"A simple Pie plot"); +
+
$p1 = new PiePlot( +$data); +
$graph->Add( +$p1); +
$graph->Stroke(); +

+

The above code would give the following pie graph

+
+
Figure 117: The simplest possible pie graph [src]  +

+

+

There is a few things worth noting here

+ +

You can change almost all aspects of appearance of the pie graphs. + For example you could change :

+ +

+

The next simplest addition we can do is to add a legend to the pie + graph. We do this by using the + SetLegends(); method. By adding the legends to the previous example + we get the following image

+
+
Figure 118: Adding a legend to the pie graph [src]  +

+

+

+

(In the figure above we also moved the center of the pie slightly to + the left to make more room for the legend box.)

+

The text for the legends can also contain printf() style format + strings to format a number. This number passed on into this string is + either the absolute value of the slice or the percentage value. How to + switch between the is describe further down in this chapter.

+

The next change you might want to change is the size and position of + the Pie plot. You can change the size with a call to + SetSize(); and the position of the center of the pie plot with a + call to SetCenter(); + The size can be specified as either an absolute size in pixels or as a + fraction of width/height (whatever is the smallest). The position of + the pie plot is specified as a fraction of the width and height.

+

To put the size and positioning API to use we will show how to put + several pie plots on the same pie graph. In the following example we + have also adjusted the legends of the slice values to use a smaller + font.

+

What we do in this example is quite simple, create 4 pie plots, make + them smaller and put them in the four corner of the graph. This will + give the result as shown in the following example.

+
+
Figure 119: Multiple pie plots in the same pie graph [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/931Overview.html b/html/includes/jpgraph/docs/html/931Overview.html new file mode 100644 index 0000000000..c4539fb043 --- /dev/null +++ b/html/includes/jpgraph/docs/html/931Overview.html @@ -0,0 +1,61 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.3.1 Overview

+

Each data point in a polar plot is represented by a tuple consisting + of a radius and an angle. The polar plot itself can be either outlined + or filled. In addition each point may have a standard marker (the same + as for line and scatter plots).

+

The scale for the radius can be either linear or logarithmic.

+

A polar graph is created by creating an instance of +PolarGraph::PolarGraph(). The polar graph type inherits all the + capabilities of ordinary X-Y graphs, i.e they can have background + images, background gradients, tabbed titles and so on.

+

Polar graphs comes in two basic types, they can either show a full + 360 degree graph or a half 180 degree graph. The two examples below + show these two basic types of graphs.

+

+
+
Figure 135: A simple 360 degree polar graph [src]  +

+

+

+
+
Figure 136: The 180 degree variant polar plot. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/932Adjustingtheradiusscale.html b/html/includes/jpgraph/docs/html/932Adjustingtheradiusscale.html new file mode 100644 index 0000000000..7380ea4850 --- /dev/null +++ b/html/includes/jpgraph/docs/html/932Adjustingtheradiusscale.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.3.2 Adjusting the radius scale

+

The radius axis can be shown in either a linear or logarithmic + scale. This is controlled, as usual, by a call to +PolarGraph::SetScale() The two examples below show the same plot in + either linear or logarithmic scale

+

+
+
Figure 137: Using a logarithmic scale [src]  +

+

+

+

+
+
Figure 138: Using a linear scale [src]  +

+

+

+

Please note that the maximum values of the scales are different.

+

By default the scale will be auto scaled depending on the data. You + can also specify a manual scale by supplying an extra argument to the + SetScale() value. The only difference from the manual scaling with the + other X-Y-graphs is that for polar graph you only specify a manual + maximum. The minimum will always be 0 for the linear scale and a scaled + value of 10 (i.e 1, 0.1, 0.001 and so on) for the logarithmic scale.

+

The plot is clipped to the plot area so if you specify a smaller + scale then the maximum value that part of the plot that are outside the + plot area will be clipped.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/933Adjustingthegridlines.html b/html/includes/jpgraph/docs/html/933Adjustingthegridlines.html new file mode 100644 index 0000000000..ad024eaf90 --- /dev/null +++ b/html/includes/jpgraph/docs/html/933Adjustingthegridlines.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.3.3 Adjusting the grid lines

+

As usual you have full freedom to select what grid lines you like to + show (and what colors they should have). There are three different + types of grid lines you may adjust. The radius minor and major grid + lines and the angle grid lines.

+

You select what grid lines to show with a call to +PolarAxis::ShowGrid() The two example below shows a logarithmic plot + with either just major grid lines or both minor and major grid lines.

+

+
+
Figure 139: Using a logarithmic scale with just major + gridlines [src] +  +

+

+

+

+
+
Figure 140: Using a logarithmic scale with both minor and + major gridlines +[src]  +

+

+

The colors of the grid lines are specified with a call to + PolarAxis::SetGridColor()

+

For the angle grid lines it is possible to specify the angle + division between each grid line with the method + PolarAxis::SetAngleStep() You specify the step distance in degrees. + By default the step size is 15 degrees.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/934Adjustingthelabelfonts.html b/html/includes/jpgraph/docs/html/934Adjustingthelabelfonts.html new file mode 100644 index 0000000000..9b9ac2ba8f --- /dev/null +++ b/html/includes/jpgraph/docs/html/934Adjustingthelabelfonts.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.3.4 Adjusting the label fonts

+

You can individually specify different fonts and colors for the + angle and the radius labels. The radius font is specified with + PolarAxis::SetFont() and the angle font is specified with a call to + PolarAxis::SetAngleFont()

+

You can adjust the color with the method +PolarAxis::SetColor() ?>

+

The following example specifies different color for the labels. it + also shows that you can add both a radial axis title as well as a + tabbed title. In this example we have also chosen not to show the frame + around the edge of the plot.

+

+
+
Figure 141: Different colors for labels, specifying both a + tabbed title as well as a axis title [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/935Adjustingthelabels.html b/html/includes/jpgraph/docs/html/935Adjustingthelabels.html new file mode 100644 index 0000000000..17cad525f1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/935Adjustingthelabels.html @@ -0,0 +1,47 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.3.5 Adjusting the labels

+

As can be seen from the previous examples the angle labels have a + small superscripted "o" after each label. You can select if you like to + show this degree mark or not with a call to the + PolarAxis::SetANgleDegreeMark() method by which you can enable or + disable that mark after the angels.

+

For the radius labels all standard formatting that can be done to + the X-Y axis such as format string or format callbacks are supported.

+

A common modification for polar plots is probably to disable the + display the last label when using a 360 degree plot since the last + label will "collide" with the plot box around the plot area. It is + possible to disable the last label with a call to +Axis::HideLastTickLabel() As you can see this has been used in some + of the examples in this chapter.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/936Imagemaps.html b/html/includes/jpgraph/docs/html/936Imagemaps.html new file mode 100644 index 0000000000..f9bffafb66 --- /dev/null +++ b/html/includes/jpgraph/docs/html/936Imagemaps.html @@ -0,0 +1,60 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.3.6 Image maps

+

If you have specified markers for the polar plot (by setting the + mark property of the plot) each marker can be a hot spot in a client + side image map. The target URL are as usual specified with the + SetCSIMTargets() as the following short code excerpt shows

+   +// Start by specifying the proper URL targets +
$targets  += array("#1","#2", ....... ); +
$polarplot  += new PoalrPlot +($data); +
$polarplot +->mark->SetType( +MARK_SQUARE); +
$polarplot +->SetCSIMTargets +(targets); +
$graph->Add( +$polarplot); +
$graph->StrokeCSIM(); +

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/937Afinalexample.html b/html/includes/jpgraph/docs/html/937Afinalexample.html new file mode 100644 index 0000000000..a85543e54f --- /dev/null +++ b/html/includes/jpgraph/docs/html/937Afinalexample.html @@ -0,0 +1,45 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.3.7 A final example

+

As a final example we show a full 360 degree polar plot with square + markers as well as background color gradient and a legend for the plot.

+
+
Figure 142: A polar plot with both legend and background + gradient fill. +[src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/93AsimpleGanttchart.html b/html/includes/jpgraph/docs/html/93AsimpleGanttchart.html new file mode 100644 index 0000000000..3d811e3a74 --- /dev/null +++ b/html/includes/jpgraph/docs/html/93AsimpleGanttchart.html @@ -0,0 +1,242 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.3 A simple Gantt chart

+

Time to show you an example of a Gantt chart and how easy it is to + make one. Lets make it the simplest possible Gantt chart. One activity, + named "Project", which lasts from "2001-11-01" to "2002-02-20".

+

All it takes to do this (using default values for everything) is the + following code.

(File: ganttex00.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_gantt.php"); +
+
// A new graph with automatic size +
$graph  += new GanttGraph +(0,0, +"auto"); +
+
//  A new activity on row '0' +
$activity  += new GanttBar +(0,"Project", +"2001-12-21", +"2002-01-20"); +
$graph->Add( +$activity); +
+
// Display the Gantt chart +
$graph->Stroke(); +
?> +

+

The resulting image is shown in Figure 147 below.

+
+
+
Figure 147: Your first simple Gantt chart. [src]  +

+
+

+

+

Let's note a few things with the above image and code:

+ +

So, lets start making this graph a little bit more interesting. + First we are going to add a title, then we will add a month scale and + finally we will change the color of the bar.

+

All that is taken care of in the code below.

+(File: ganttex01.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_gantt.php"); +
+
$graph  += new GanttGraph +(0,0, +"auto"); +
$graph->SetShadow(); +
+
// Add title and subtitle +
$graph->title-> +Set( +"A nice main title"); +
$graph->title-> +SetFont( +FF_ARIAL, +FS_BOLD,12); +
$graph->subtitle-> +Set( +"(Draft version)"); +
+
// Show day, week and month scale +
$graph->ShowHeaders( +GANTT_HDAY  +GANTT_HWEEK  +GANTT_HMONTH); +
+
+// Instead of week number show the date for the first day in the week +
// on the week scale +
$graph->scale-> +week->SetStyle(WEEKSTYLE_FIRSTDAY); +
+
+// Make the week scale font smaller than the default +
$graph->scale-> +week->SetFont(FF_FONT0 +); +
+
+// Use the short name of the month together with a 2 digit year +
// on the month scale +
$graph->scale-> +month-> +SetStyle( +MONTHSTYLE_SHORTNAMEYEAR2); +
+
+// Format the bar for the first activity +
// ($row,$title,$startdate,$enddate) +
$activity  += new GanttBar +(0,"Project", +"2001-12-21", +"2002-01-20"); +
+
+// Yellow diagonal line pattern on a red background +
$activity +->SetPattern(BAND_RDIAG, +"yellow"); +
$activity +->SetFillColor +("red"); +
+
// Finally add the bar to the graph +
$graph->Add( +$activity); +
+
// ... and display it +
$graph->Stroke(); +
?> +
The resulting image is shown in Figure + 148 below.
+
+
Figure 148: Making the Gantt chart a little bit more + interesting with title and more colors. [src]  +

+

+

From the above example you might note a few things

+ +

To show that this is really simple let's show the full year in the + month, and set the header style to be white text on a dark blue + background by adding the lines

+   +// Use the short name of the month together with a 4 digit year +
// on the month scale +
$graph->scale-> +month-> +SetStyle( +MONTHSTYLE_SHORTNAMEYEAR4); +
$graph->scale-> +month-> +SetTextColor( +"white"); +
$graph->scale-> +month-> +SetBackgroundColor( +"blue"); +

+

to the code above. The resulting image is shown in Figure 149

+
+
Figure 149: Enhancing the scale headers. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/93Polarplots.html b/html/includes/jpgraph/docs/html/93Polarplots.html new file mode 100644 index 0000000000..e474dd0ccc --- /dev/null +++ b/html/includes/jpgraph/docs/html/93Polarplots.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.3 Polar plots

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/94ThestructureofaGanttchart.html b/html/includes/jpgraph/docs/html/94ThestructureofaGanttchart.html new file mode 100644 index 0000000000..359fbf13eb --- /dev/null +++ b/html/includes/jpgraph/docs/html/94ThestructureofaGanttchart.html @@ -0,0 +1,62 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.4 The structure of a Gantt chart

+

A Gantt chart is made up of four distinct areas.

+
    +
  1. On the left side there is the activity title column.
  2. +
  3. On the top there is the scale headers (up to four headers may be + displayed)
  4. +
  5. The actual plot area where all the Gantt bars and markers go
  6. +
  7. The margin area, where for example the titles are shown
  8. +
+

Since a Gantt chart inherits all the usual properties of a JpGraph + Graph() you have the access to the same method to formatting the image + as before. For example to have a shadow around the image you call + Graph::SetShadow() and to set the margin color you can use + Graph::SetMarginColor(). Please refer to the reference documentation + for a full list of supported features.

+

To create a Gantt chart you add objects to it. As + of this writing you may add the following object by the use of the + GanttChart::Add() method

+ +

All these objects may be extensively modified in terms of + formatting. You can specify color (both fill- and frame color), size, + titles, style and patterns and so on. All these objects comes with (in + my mind) sensible default so you don't have to specify a lot of + parameters. But if you need a fine grain control or if you disagree + with my taste you can.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/95CreatingaGanttChart.html b/html/includes/jpgraph/docs/html/95CreatingaGanttChart.html new file mode 100644 index 0000000000..81c00e47f8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/95CreatingaGanttChart.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.5 Creating a GanttChart

+

You create a new Gantt Chart with a call to GanttChart(). The + signature for GanttGraph is the same as for ordinary JpGraph graphs, + i.e

function  +GanttGraph( +$aWidth, +$aHeight, +$aCachedName, +$aTimeOut, +$aInline) +

+

The only real difference is that for GanttCharts you can specify one + or both of the dimension parameters (width and height) as -1 in which + case that dimension will be automatically sized determined by scale and + fonts chosen. The following examples shows some possible ways of + creating a new graph

+ +

Since GanttGraph() inherits all the methods (that make sense for + GanttGraph) from Graph you can specify shadow, color etc of the general + frame.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/96PositioningobjectsintheGanttplot.html b/html/includes/jpgraph/docs/html/96PositioningobjectsintheGanttplot.html new file mode 100644 index 0000000000..2d32bae451 --- /dev/null +++ b/html/includes/jpgraph/docs/html/96PositioningobjectsintheGanttplot.html @@ -0,0 +1,71 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.6 Positioning objects in the Gantt plot

+

Bars and Milestones need both a vertical position and a horizontal + position. The horizontal start position is specified as a date, e.g. + "2001-06-23", and the vertical positions are specified as a number + [0,1,2,3,...]. This vertical number indicates the position from the top + where the object should be placed. To understand this you might imagine + a number of "invisible" horizontal bands with a certain height. If you + specify 0 as the vertical position the bar will be placed in the first + band, specify 3 and the bar will be placed in the fourth band and so + on.

+

It is perfectly legal, and perhaps even desirable to leave "gaps" + when laying out bands to group related activities. So, for example you + could have three activities/bars at positions 1,2,3 and then another 2 + bars at position 6,7 leaving band 0,4,5 empty.

+

All these "invisible bands" have the same height (equ-spaced). The + height of each band is automatically determined and depends on both the + method of layout ( as specified by (GanttChart::SetLayout()) and the + individual heights of the individual bars and titles. The rules are + quite simple:

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/971Specifyingverticalposition.html b/html/includes/jpgraph/docs/html/971Specifyingverticalposition.html new file mode 100644 index 0000000000..8af91f7e83 --- /dev/null +++ b/html/includes/jpgraph/docs/html/971Specifyingverticalposition.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.7.1 Specifying vertical position

+

As described above vertical positions are specified as a numeric + value [0..n] where 'n' is an arbitrary constant. (For practical + purposes n is most likely < 100)

+

Using our previous example we will illustrate this parameter by + changing the position of our 'Project' activity to position 7. Therefor + we change the call to GanttBar() to

+  $activity = new GanttBar( +7,"Project","2001-12-21" +,"2002-02-20" +);

+

and we then get the chart as shown below in Figure 150.

+

+
+
Figure 150: Changing the vertical position to 7 [src]  +

+

+

Note that the height of each position (vertical position) will + depend on the actual height of the bar.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/972Specifyingstartandendpositionforabar.html b/html/includes/jpgraph/docs/html/972Specifyingstartandendpositionforabar.html new file mode 100644 index 0000000000..dc383cc776 --- /dev/null +++ b/html/includes/jpgraph/docs/html/972Specifyingstartandendpositionforabar.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.7.2 Specifying start and end position for a bar +

+

Start of bars are given as a date string. The format depends on the + current locale. Examples of valid date strings are

+ +

Even if several format are supported it is recommended to use all + numeric dates, i.e in the form "2001-10-22".

+

Specifying the end position may be done in two different ways, + either by the end date in the same way as for the start date. The other + way is to specify the length of the activity in number of days + (and fractions thereof). Examples of valid end dates are:

+ +

Please note that duration is specified as numerical values and + not strings.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/973Milestones.html b/html/includes/jpgraph/docs/html/973Milestones.html new file mode 100644 index 0000000000..0712478d0e --- /dev/null +++ b/html/includes/jpgraph/docs/html/973Milestones.html @@ -0,0 +1,144 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.7.3 Milestones

+

Milestones are similar to bars but have no end date since milestones + just apply to one single date. Milestones are created much the same way + as activities but using method MileStone() instead.

+

The full signature for milestones are

  +function MileStone +($aVPos,$aTitle, +$aDate, +$aCaption) +

+

+

+ + + + + +
+ +  $aVPos  + The vertical position for the + bar, [0..n]
+ +  $aTitle  + Title for the activity
+ +  $aDate  + Date for the milestone
+ +  $aCaption  + Text to the right of the + milestone
+

Valid milestones are for example

+ +

By default milestones are rendered as a filled "Diamond" shape. This + may be optionally modified. The actual shape is specified by the 'mark' + property of milestone which is an instance of the PlotMark() class + (same class responsible for the marks in line graphs).

+

To change the shape of a milestone to, say a triangle, you use the + SetType() method as in

+  $milestone->mark-> +SetType( +MARK_DTRIANGLE) +

+

Let's put this into practice and add a milestone to our previous + example by adding the following two lines of code which result in + Figure 151 shown below.

+
+
Figure 151: Illustration of how to add a milestone to a gantt + chart [src]  +

+

+

+

You may note that by default the title color is red for milestones. + If you like to change this to be instead, say bold black, you would + invoke the SetColor() and SetFont() methods on the title property of + milestones as in

 $milestone-> +title->SetFont(FF_FONT1 +,FF_BOLD); +
$milestone +->title->SetColor( +"black"); +

+

and thew result would now (not surprisingly be)

+
+
Figure 152: Modifying the milestone title color and font [src]  +

+

+

To modify the caption you do exactly the same but act on property + 'caption' instead of 'title', i.e.

+  $milestone->caption-> +SetFont( +FF_FONT1, +FF_BOLD); +
$milestone +->caption->SetColor( +"black"); +

+

+

It is worth noting that you modify the bar title and caption the + exact same way by acting on the 'title' and 'caption' property for the + bars.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/974Verticalline.html b/html/includes/jpgraph/docs/html/974Verticalline.html new file mode 100644 index 0000000000..9874a6865f --- /dev/null +++ b/html/includes/jpgraph/docs/html/974Verticalline.html @@ -0,0 +1,160 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.7.4 Vertical line

+

The final object you may add to a Gantt chart is simple, but quite + useful, a straight vertical line extending over the whole plot height. + This could for example be used to illustrate different phases in a + project. You create a line object by a call to GanttVLine()

+

The full signature for GanttVLine() is

  +function GanttVLine +($aDate,$aTitle, +$aColor, +$aWeight, +$aStyle) +

+

+

+ + + + + + +
+ +  $aDate  + Date for the milestone
+ +  $aTitle  + Title for the line. The title is + displayed at the bottom of the line
+ +  $aColor  + Color for the line
+ +  $aWeight  + Line width
+ +  $aStyle  + Line style,"dashed", "dotted" and + so on
+

Valid creations of lines are for example

+ +

To add the line to the graph you just have to call GanttGraph::Add() + as with milestones and bars. Let's illustrate the use of vertical lines + by adding a line to the previous example.

 $vline  += new GanttVLine +("2001-12-24","Phase 1"); +
$graph->Add( +$vline); +

+

and the example (See 153) now becomes

+
+
Figure 153: Adding a vertical line with a title to the Gantt + chart [src]  +

+

+

From the above figure you can see that by default the line is drawn + at the beginning of the day of the specified date and in a 'dashed' + style. This can (of course!) be modified so that the line is + drawn/aligned anywhere in the specified day. You modify this by + invoking the method SetDayOffset() with an argument specifying the + fraction of the day where you want the line positioned.

+

If you, for example, want to display the line in the middle of the + day just add the line

+  $vline->SetDayOffset( +0.5); +

+

to the previous code and the result will be

+
+
Figure 154: Modifying the position of the line within the day + [src]  +

+

+

+

As usual you may modify the font, size and color by invoking the + appropriate method (SetFont(), SetColor()) on the 'title' property of + lines.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/975Addingmarkerstoaganttbar.html b/html/includes/jpgraph/docs/html/975Addingmarkerstoaganttbar.html new file mode 100644 index 0000000000..8e016f4f82 --- /dev/null +++ b/html/includes/jpgraph/docs/html/975Addingmarkerstoaganttbar.html @@ -0,0 +1,125 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.7.5 Adding markers to a gantt bar

+

You can easily add a variety of markers both to the start and end of + the gantt bar. They could for example be used as an alternate way to + illustrate important milestones or anticipated deliveries.

+

The left and right markers are accessed through the two properties + 'leftMark' and 'rightMark'. They are both instances of the general + 'PlotMark' class which is also used for the milestones (and in line + graphs). The 'PlotMark' class supports several different styles, for + example, diamond (the default for milestones), filled and unfilled + circles, squares, stares, and so on. Please refer to the reference + section for a complete listing.

+

Let's illustrate this by adding a right marker to the previous + example. We will use a style of a filled (red) circle with a white + title, say, "M5". In order to accomplish this we must augment the + previous example with the following lines:

 $activity +->rightMark->Show();     +
$activity +->rightMark->title-> +Set("M5"); +
$activity +->rightMark->SetType( +MARK_FILLEDCIRCLE); +
$activity +->rightMark->SetWidth( +10); +
$activity +->rightMark->SetColor( +"red"); +
$activity +->rightMark->SetFillColor( +"red"); +
$activity +->rightMark->title-> +SetFont( +FF_ARIAL, +FS_BOLD,12); +
$activity +->rightMark->title-> +SetColor( +"white"); +

+

This might seem like a lot of lines but this is as complicated as it + possible can get. As an illustration in the example belwo more or less + everything that is changeable has been changed, the default font, + font-color, fill-color, frame-color and width of marker. The two lines + only really necessary are the first two, showing the mark and setting a + title. One could still get a good result by using default values for + the rest of the properties.

+

The resulting image can be seen in Figure 155 below.

+
+
Figure 155: Adding a right marker to a bar. [src]  +

+

+

We have deliberately introduced a "strangeness" here. If the + previous two examples are compared it can bee seen that the last + example is larger than the previous one. Why?

+

The explanation is trivial once we recall that the height of bars + are sized relative to the horizontal spacing. The horizontal spacing + are based on the highest single bar including title size and, here come + the explanation, marker size. The horizontal spacing has grown since + the minimum height is now based on 10 points(=the height of the mark). + The bar still occupy the same percentage of the height so it seems to + have grown.

+

If this behavior is unwanted it is always possible to specify an + absolute size for the bar heigh, say 8 pixels, with a call

+  $activity->SetHeight +(8);

+

and achieve the result in Figure 156 below.

+
+
Figure 156: Specifying an absolute size for the height of the + bar. [src]  +

+

+

It is worth noting that the height reserved for each bar is still + the same since we haven't changed the height of the marker and the + reserved space is the maximum height used by any bar.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/976Adjustingtheminimumdistancebetweenbars.html b/html/includes/jpgraph/docs/html/976Adjustingtheminimumdistancebetweenbars.html new file mode 100644 index 0000000000..a2f20d475c --- /dev/null +++ b/html/includes/jpgraph/docs/html/976Adjustingtheminimumdistancebetweenbars.html @@ -0,0 +1,97 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.7.6 Adjusting the minimum distance between bars +

+

Let's see what happens if we set the height of each bar to be 100% + of the reserved height by adding another activity/bar below the first + one and set the height of each bar to 100% by adding the lines (We omit + the added lines to add another bar since they are just a copy of the + first bar)

+ $activity-> +SetHeight(1.0); +
$activity2 +->SetHeight(1.0); +

+

to the previous example. (Note that a value in the range [0..1] is + interpretated as the fraction of the reserved height while a value > 1 + is interpretated as the absolute size in pixels.)

+
+
Figure 157: Setting the height for each bar to 100% [src]  +

+

+

Aha.. What we are trying to do doesn't really make sense. Since we + have specified that the bar will always occupy 100% of the available + reserved with there will be no distance between the bars. So what if we + specify the bar as 10 pixel absolute by changing the lines to

+  $activity->SetHeight +(10); +
$activity2 +->SetHeight(10); +

+

we instead get

+
+
Figure 158: Setting both bars height to 10 pixels [src]  +

+

+

So what can we actually do? Well if you remember the reserved height + for each bar is the maximum height of all bars including titles. This + guarantees that no two bars will ever overlap. To guarantee that titles + don't end up too close together there is a Vertical Label Margin + which basically specifies some extra "air" in between the titles. The + amount of air is specified in percent of the title height. To set the + margin you use

+ GanttGraph:: +SetLabelVMarginFactor( +$aMargin) +

+

As an example let's set that margin in the previous example to 0 and + see what happens.

+
+
Figure 159: Setting the vertical label margin to 0% [src]  +

+

+

As you would perhaps expect the two bars just barely touches now + since there are no extra margin added. If the two bars hadn't had the + extra right marker it would have looked very compressed.

+

By default the vertical margin is set to 40%.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/97Ganttbars.html b/html/includes/jpgraph/docs/html/97Ganttbars.html new file mode 100644 index 0000000000..1fa671e770 --- /dev/null +++ b/html/includes/jpgraph/docs/html/97Ganttbars.html @@ -0,0 +1,82 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.7 Gantt bars

+

The most common of all object in a Gantt chart is of course the + activity bar (GanttBar()). In terms of formatting this object has a + very large flexibility. The full signature for the GanttBar constructor + is

function  +GanttBar( +$aVPos,$aTitle,$aStart +,$aEnd,$aCaption, +$aHeight) +

+

+

+ + + + + + + +
+ +  $aVPos  + The vertical position for the + bar, [0..n]
+ +  $aTitle  + Title for the activity
+ +  $aStart  + Start date for the activity given + as string, e.g "2001-09-22"
+ +  $aEnd  + End date for activity given as either + a date (a string) or as the duration (in days) of the activity, e.g + both "2001-10-15" and 20.5 are valid inputs
+ +  $aCaption  + Text string (caption) to appear + at the end (right side) of the bar
+ +  $aHeight  + Height of bar given as either + a value in range [0,1] in which case this is interpretated as what + fraction of the vertical position should the bar occupy. The height can + also be given in absolute pixels [1..200]
+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/981Minutescale.html b/html/includes/jpgraph/docs/html/981Minutescale.html new file mode 100644 index 0000000000..73bdc04baf --- /dev/null +++ b/html/includes/jpgraph/docs/html/981Minutescale.html @@ -0,0 +1,83 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.8.1 Minute scale

+

Minute scale is the lowest resolution you can use. It is often + convenient to use Minute scale with "GanttScale::SetINtervall()" since + by default the increment will be 1 minute. The style of minute scale + can be further adjusted by the use style parameters which can be + one of

+
    +
  1. "MINUTESTYLE_MM", This will display minutes as a two digit number + with a leading zero if necessary
  2. +
  3. "MINUTESTYLE_CUSTOM", This will let you specify you own custom + minute style by making a call to HeaderProperty:: SetFormatString() +
  4. +
+

Minute scale is enabled by adding the GANTT_HMIN in the + GanttGraph::ShowHeaders() call. For example as in

+  $graph +->ShowHeaders(GANTT_HDAY  +GANTT_HHOUR  +GANTT_HMIN); +

+

The code snippet below shows how to set up a minute scale with 30 + min interval and some custom colors.

+  $graph->scale-> +minute-> +SetIntervall( +30); +
$graph->scale-> +minute-> +SetBackgroundColor( +'lightyellow:1.5'); +
$graph->scale-> +minute-> +SetFont( +FF_FONT0); +
$graph->scale-> +minute-> +SetStyle( +MINUTESTYLE_MM); +
$graph->scale-> +minute->grid->SetColor +('lightgray');

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/982Hourscale.html b/html/includes/jpgraph/docs/html/982Hourscale.html new file mode 100644 index 0000000000..76e554ac3b --- /dev/null +++ b/html/includes/jpgraph/docs/html/982Hourscale.html @@ -0,0 +1,86 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.8.2 Hour scale

+

The hour scale has more builtin formatting possibilities. The + following formatting options are available

+
    +
  1. "HOURSTYLE_HM24", Will display the only the hour in military time + 0-24 , for example 13:00
  2. +
  3. "HOURSTYLE_H24", Will display the hour with both hour and minute in + military time 0-24, for example 13
  4. +
  5. "HOURSTYLE_HMAMPM", Will display the hour and minutes with a + suitable am/pm postfix, for example 1:30pm
  6. +
  7. "HOURSTYLE_HAMPM", Will display only the hour with a suitable am/pm + postfix, for example 1pm
  8. +
  9. "HOURSTYLE_CUSTOM", Custom defined format as specified with a call + to HeaderProperty::SetFormatString()
  10. +
+

For hours it is possible to specify the interval in either of two + ways. With an integer, e.g. 6, or as time interval, e.g. "1:30" which + makes the interval one and a half hour. The only restriction is that + the interval must be even dividable for 24 hours since one day is the + smallest possible interval to show. This means that it is allowed to + use, for example 2,4,6,"1:30" or "0:45" as intervals but not 7, "2:45".

+

The code snippet below shows hot to set up a hour scale to with 45 + minutes interval and some custom colors

 $graph +->scale->hour-> +SetBackgroundColor( +'lightyellow:1.5'); +
$graph->scale-> +hour->SetFont(FF_FONT1 +); +
$graph->scale-> +hour->SetStyle(HOURSTYLE_HMAMPM); +
$graph->scale-> +hour-> +SetIntervall( +"0:45"); +

+

The example below shows a gantt chart with the day and hour scale + enabled

+
+
Figure 160: Using hour scale in the Gantt chart [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/983Dayscale.html b/html/includes/jpgraph/docs/html/983Dayscale.html new file mode 100644 index 0000000000..b2d52ace0a --- /dev/null +++ b/html/includes/jpgraph/docs/html/983Dayscale.html @@ -0,0 +1,89 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.8.3 Day scale

+

By default the day scale show the first letter of the week day but + it is also posible to format the day scale in a number of different + ways. Days can have one of the following scale formats.

+ +

The formatting is specified by using the SetStyle() method as in

+  $graph +->scale->day-> +SetStyle( +DAYSTYLE_LONG); +

+

The graphical formatting possibilities for days allow the + possibility to specify a different color for the weekend background and + also for the Sunday.

+ +

In addition to this there is also a possibility to choose whether or + not the weekend background should be extended vertically down over the + plot area. (the default). Since that is a property more of the whole + plot this behavior is modified with a call to the method

+  UseWeekendBackground()
+

+

of the scale, e.g. +
 

+ $graph->scale->UseWeekendBackground(false +);

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/984Weekscale.html b/html/includes/jpgraph/docs/html/984Weekscale.html new file mode 100644 index 0000000000..113829c1a3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/984Weekscale.html @@ -0,0 +1,73 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.8.4 Week scale

+

Week scales, if enabled, by default shows the week number in range 1 + to 53 (as defined by ISO-8601, see the reference section).

+

It might be worth pointing out here that the week number calculation + is carried out within JpGraph and does not rely on the underlying OS + date libraries. This makes the behavior consistent over several OS:s + (at least M$ Windows does not comply to ISO-8601 or supply any + way of doing this through the normal libraries, e.g. strftime())

+

You may modify the week behavior in three ways. You can specify + (with SetStyle()) a different date format using the constants

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/985Monthscale.html b/html/includes/jpgraph/docs/html/985Monthscale.html new file mode 100644 index 0000000000..060a1c2e1a --- /dev/null +++ b/html/includes/jpgraph/docs/html/985Monthscale.html @@ -0,0 +1,73 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.8.5 Month scale

+

For month scale you can use the SetStyle() method to choose between + a variety of formats.

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/986Yearscale.html b/html/includes/jpgraph/docs/html/986Yearscale.html new file mode 100644 index 0000000000..2f7e85a013 --- /dev/null +++ b/html/includes/jpgraph/docs/html/986Yearscale.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.8.6 Year scale

+

Year scale has no extra formatting possibilities.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/98Formattingthescaleheaders.html b/html/includes/jpgraph/docs/html/98Formattingthescaleheaders.html new file mode 100644 index 0000000000..37c09ad056 --- /dev/null +++ b/html/includes/jpgraph/docs/html/98Formattingthescaleheaders.html @@ -0,0 +1,129 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.8 Formatting the scale headers

+

The scale headers allow you to view up to four different scales at + the same time. The four basic scales are:

+ +

You can choose what scale to include and exclude by using the + SetScale() method. For example, for a detailed gantt you might choose + to display days and weeks by specifying

 $graph +->ShowHeaders +( GANTT_HWEEK  +| GANTT_DAY );

+

If you instead wanted "the big picture" it might be enough to show + year and months by specifying

+  $graph->ShowHeaders +GANTT_YEAR  +GANTT_MONTH ); +

+

You can choose freely the combination of scales that you want, but a + chart must at least have one scale of course.

+

Once you have decided what level of details you need you can then + fine tune the exact layout/formatting of each of the enabled scales as + described below.

+

These scale header are all accessed through the graph instance + variables 'scale' as in

+  $graph->scale-> +week

+

or

+ $graph->scale->day
+

+

. All these headers share the following properties.

+ +

In addition to these methods each scale also has the property 'grid' + which determines the appearance of grid lines for that specific scale. + You may modify the appearance of grid lines by the "normal" line + methods, i.e. SetColor(),SetWeight() SetStyle() and Show(). So for + example to set the week grid line red you would use

+  $graph +->scale->week-> +grid->SetColor("red" +);

+

Each of the scales also have some specific formatting possibilities + as described below.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/991Addingcaptiontobars.html b/html/includes/jpgraph/docs/html/991Addingcaptiontobars.html new file mode 100644 index 0000000000..5b109c46ec --- /dev/null +++ b/html/includes/jpgraph/docs/html/991Addingcaptiontobars.html @@ -0,0 +1,71 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.9.1 Adding caption to bars

+

Caption for bars are placed at the far right side of the bars. They + can for example be used to indicate the resources assigned to a task, + the duration of the task or the progress of the activity.

+

Caption text for a bar is specified either when creating a bar or + later by accessing the 'caption' property of bars. So the two lines

+  $activity = new GanttBar +(0,"Activity 1", +"2001-11-21", +"2001-12-20", +"[BS,ER]") +

+

and

+ $activity-> +caption->Set("[BS,ER]" +);

+

are both ways of specifying the caption "[BS,ER]" for the activity. + Since activity is a standard JpGraph text object you can easily modify + font, color and size with calls to SetFont() and SetColor(), (e.g.

+  $activity->caption +->SetFont(FF_ARIAL, +FF_BOLD,9);
+

+

+

The figure below illustrates the use of caption

+
+
Figure 161: Illustration of the use of captions [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/992Addingprogressindicatorstobars.html b/html/includes/jpgraph/docs/html/992Addingprogressindicatorstobars.html new file mode 100644 index 0000000000..678498ce65 --- /dev/null +++ b/html/includes/jpgraph/docs/html/992Addingprogressindicatorstobars.html @@ -0,0 +1,76 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.9.2 Adding progress indicators to bars

+

To indicate the progress of a specific activity it is also possible + to add a progress indicator to each bar. This progress indicator + consists of a smaller bar within the bar. By default this progress bar + is black and 70% of the height of the bar. These parameter can (of + course) all be changed.

+

The properties for the progress indicator are accessed through the + 'progress' property and it's methods.

+

To set the progress for a specific activity you only specify the + percent as a fraction. As in

+  $activity->progress-> +Set(0.4)
+

+

In Figure 162 the previous example is modified to indicate the + progress of each activity by the default progress indicator. A solid + bar. To make it clearer we have also modified the caption to reflect + the displayed progress. (At the same time we also modified the scale + headers just to illustrate some more formatting options).

+
+
Figure 162: Adding progress indicators. [src]  +

+

+

To specify a different format for the progress you use the + SetPattern() method as in

+  $activity->progress-> +SetPattern( +BAND_RDIAG, +"blue"); +

+

In the reference section you can see the exact parameters and all + available methods.

+
+
Figure 163: Changing the style of the progress indicators. [src]  +

+

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/99Moreformattingforbars.html b/html/includes/jpgraph/docs/html/99Moreformattingforbars.html new file mode 100644 index 0000000000..2b797fff9a --- /dev/null +++ b/html/includes/jpgraph/docs/html/99Moreformattingforbars.html @@ -0,0 +1,36 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9.9 More formatting for bars

+

This section shows some further modification you might do to + activity bars.

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9Ganttcharts.html b/html/includes/jpgraph/docs/html/9Ganttcharts.html new file mode 100644 index 0000000000..80fabb6783 --- /dev/null +++ b/html/includes/jpgraph/docs/html/9Ganttcharts.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9 Gantt charts

+

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/9WorkingwithnonXYplots.html b/html/includes/jpgraph/docs/html/9WorkingwithnonXYplots.html new file mode 100644 index 0000000000..07cf236ee0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/9WorkingwithnonXYplots.html @@ -0,0 +1,52 @@ + + + + + + + + + + + +Contents +Previous +Next +
+

9 Working with non X,Y-plots

+

Non X,Y plots includes

+ +

The fundamental difference is that these classes makes use of an + extended version of the basic Graph class. Therefor you can not mix X,Y + plots with non-X,Y plots. For example it is not possible to mix a line + graph with a Polar graph.

+ +

+
+Contents +Previous +Next + + diff --git a/html/includes/jpgraph/docs/html/exframes/JpGraph_Logo.html b/html/includes/jpgraph/docs/html/exframes/JpGraph_Logo.html new file mode 100644 index 0000000000..2b969ebcb7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/JpGraph_Logo.html @@ -0,0 +1,4 @@ +
+Warning: highlight_file(JpGraph_Logo.php): failed to open stream: No such file or directory in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
+
+Warning: highlight_file(): Failed opening 'JpGraph_Logo.php' for highlighting in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
diff --git a/html/includes/jpgraph/docs/html/exframes/alphabarex1.html b/html/includes/jpgraph/docs/html/exframes/alphabarex1.html new file mode 100644 index 0000000000..92fef3e6fe --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/alphabarex1.html @@ -0,0 +1,3 @@ + +<?php

include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// Some data
$datay1=array(140,110,50,60);
$datay2=array(35,90,190,190);
$datay3=array(20,60,70,140);

// Create the basic graph
$graph = new Graph(450,250,'auto');    
$graph->SetScale("textlin");
$graph->img->SetMargin(40,80,30,40);

// Adjust the position of the legend box
$graph->legend->Pos(0.02,0.15);

// Adjust the color for theshadow of the legend
$graph->legend->SetShadow('darkgray@0.5');
$graph->legend->SetFillColor('lightblue@0.3');

// Get localised version of the month names
$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());

// Set a nice summer (in Stockholm) image
$graph->SetBackgroundImage('stship.jpg',BGIMG_COPY);

// Set axis titles and fonts
$graph->xaxis->title->Set('Year 2002');
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetColor('white');

$graph->xaxis->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->SetColor('white');

$graph->yaxis->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->SetColor('white');

//$graph->ygrid->Show(false);
$graph->ygrid->SetColor('white@0.5');

// Setup graph title
$graph->title->Set('Using alpha blending with a background');
// Some extra margin (from the top)
$graph->title->SetMargin(3);
$graph->title->SetFont(FF_COMIC,FS_NORMAL,12);

// Create the three var series we will combine
$bplot1 = new BarPlot($datay1);
$bplot2 = new BarPlot($datay2);
$bplot3 = new BarPlot($datay3);

// Setup the colors with 40% transparency (alpha channel)
$bplot1->SetFillColor('orange@0.4');
$bplot2->SetFillColor('brown@0.4');
$bplot3->SetFillColor('darkgreen@0.4');

// Setup legends
$bplot1->SetLegend('Label 1');
$bplot2->SetLegend('Label 2');
$bplot3->SetLegend('Label 3');

// Setup each bar with a shadow of 50% transparency
$bplot1->SetShadow('black@0.4');
$bplot2->SetShadow('black@0.4');
$bplot3->SetShadow('black@0.4');

$gbarplot = new GroupBarPlot(array($bplot1,$bplot2,$bplot3));
$gbarplot->SetWidth(0.6);
$graph->Add($gbarplot);

$graph->Stroke();
?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/antispamex01.html b/html/includes/jpgraph/docs/html/exframes/antispamex01.html new file mode 100644 index 0000000000..6e9ad97b5d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/antispamex01.html @@ -0,0 +1,3 @@ + +<?php
// Antispam example using a random string
require_once "../jpgraph_antispam.php";

// Create new anti-spam challenge creator
// Note: Neither '0' (digit) or 'O' (letter) can be used to avoid confusion
$spam = new AntiSpam();

// Create a random 5 char challenge and return the string generated
$chars $spam->Rand(5);

// Stroke random cahllenge
if( $spam->Stroke() === false ) {
    die(
'Illegal or no data to plot');
}

?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/backgroundex03.html b/html/includes/jpgraph/docs/html/exframes/backgroundex03.html new file mode 100644 index 0000000000..1c80d0bbc6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/backgroundex03.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

// Some data
$datay = array(28,19,18,23,12,11);
$data2y = array(14,18,33,29,39,55);

// A nice graph with anti-aliasing
$graph = new Graph(400,200,"auto");
$graph->img->SetMargin(40,180,40,40);    
$graph->SetBackgroundImage("tiger_bkg.png",BGIMG_COPY);

$graph->img->SetAntiAliasing("white");
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->title->Set("Background image");

// Use built in font
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Slightly adjust the legend from it's default position in the
// top right corner. 
$graph->legend->Pos(0.05,0.5,"right","center");

// Create the first line
$p1 = new LinePlot($datay);
$p1->mark->SetType(MARK_FILLEDCIRCLE);
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);
$p1->SetColor("blue");
$p1->SetCenter();
$p1->SetLegend("Triumph Tiger -98");
$graph->Add($p1);

// ... and the second
$p2 = new LinePlot($data2y);
$p2->mark->SetType(MARK_STAR);
$p2->mark->SetFillColor("red");
$p2->mark->SetWidth(4);
$p2->SetColor("red");
$p2->SetCenter();
$p2->SetLegend("New tiger -99");
$graph->Add($p2);

// Output line
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/balloonex1.html b/html/includes/jpgraph/docs/html/exframes/balloonex1.html new file mode 100644 index 0000000000..5b8a01e8e3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/balloonex1.html @@ -0,0 +1,3 @@ + +<?php
// $Id: balloonex1.php,v 1.5 2002/12/15 16:08:51 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_scatter.php");

// Some data
$datax = array(1,2,3,4,5,6,7,8);
$datay = array(12,23,95,18,65,28,86,44);
// Callback for markers
// Must return array(width,color,fill_color)
// If any of the returned values are "" then the
// default value for that parameter will be used.
function FCallback($aVal) {
    
// This callback will adjust the fill color and size of
    // the datapoint according to the data value according to
    
if( $aVal 30 $c "blue";
    elseif( 
$aVal 70 $c "green";
    else 
$c="red";
    return array(
floor($aVal/3),"",$c);
}

// Setup a basic graph
$graph = new Graph(400,300,'auto');
$graph->SetScale("linlin");
$graph->img->SetMargin(40,100,40,40);        
$graph->SetShadow();
$graph->title->Set("Example of ballon scatter plot");
// Use a lot of grace to get large scales
$graph->yaxis->scale->SetGrace(50,10);

// Make sure X-axis as at the bottom of the graph
$graph->xaxis->SetPos('min');

// Create the scatter plot
$sp1 = new ScatterPlot($datay,$datax);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);

// Uncomment the following two lines to display the values
$sp1->value->Show();
$sp1->value->SetFont(FF_FONT1,FS_BOLD);

// Specify the callback
$sp1->mark->SetCallback("FCallback");

// Setup the legend for plot
$sp1->SetLegend('Year 2002');

// Add the scatter plot to the graph
$graph->Add($sp1);

// ... and send to browser
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bar_csimex1.html b/html/includes/jpgraph/docs/html/exframes/bar_csimex1.html new file mode 100644 index 0000000000..5c18684927 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bar_csimex1.html @@ -0,0 +1,4 @@ + +<?php
include_once ("../jpgraph.php");
include_once (
"../jpgraph_bar.php");

$datay=array(12,26,9,17,31);

// Create the graph. 
// One minute timeout for the cached image
// INLINE_NO means don't stream it back to the browser.
$graph = new Graph(310,250,'auto');
$graph->SetScale("textlin");
$graph->img->SetMargin(60,30,20,40);
$graph->yaxis->SetTitleMargin(45);
$graph->yaxis->scale->SetGrace(30);
$graph->SetShadow();

// Turn the tickmarks
$graph->xaxis->SetTickSide(SIDE_DOWN);
$graph->yaxis->SetTickSide(SIDE_LEFT);

// Create a bar pot
$bplot = new BarPlot($datay);

// Create targets for the image maps. One for each column
$targ=array("bar_clsmex1.php#1","bar_clsmex1.php#2","bar_clsmex1.php#3","bar_clsmex1.php#4","bar_clsmex1.php#5","bar_clsmex1.php#6");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$bplot->SetCSIMTargets($targ,$alts);
$bplot->SetFillColor("orange");

// Use a shadow on the bar graphs (just use the default settings)
$bplot->SetShadow();
$bplot->value->SetFormat(" $ %2.1f",70);
$bplot->value->SetFont(FF_ARIAL,FS_NORMAL,9);
$bplot->value->SetColor("blue");
$bplot->value->Show();

$graph->Add($bplot);

$graph->title->Set("Image maps barex1");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Send back the HTML page which will call this script again
// to retrieve the image.
$graph->StrokeCSIM('bar_csimex1.php','bar_csimex1');


?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bar_csimex2.html b/html/includes/jpgraph/docs/html/exframes/bar_csimex2.html new file mode 100644 index 0000000000..65ebf8302a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bar_csimex2.html @@ -0,0 +1,4 @@ + +<?php
include_once ("../jpgraph.php");
include_once (
"../jpgraph_bar.php");

$data1y=array(12,8,19,3,10,5);
$data2y=array(8,2,12,7,14,4);

// Create the graph. These two calls are always required
$graph = new Graph(310,200,'auto');
$graph->SetScale("textlin");
$graph->img->SetMargin(40,30,20,40);
$graph->SetShadow();

// Create the bar plots
$b1plot = new BarPlot($data1y);
$b1plot->SetFillColor("orange");
$targ=array("bar_clsmex2.php#1","bar_clsmex2.php#2","bar_clsmex2.php#3",
"bar_clsmex2.php#4","bar_clsmex2.php#5","bar_clsmex2.php#6");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$b1plot->SetCSIMTargets($targ,$alts);

$b2plot = new BarPlot($data2y);
$b2plot->SetFillColor("blue");
$targ=array("bar_clsmex2.php#7","bar_clsmex2.php#8","bar_clsmex2.php#9",
"bar_clsmex2.php#10","bar_clsmex2.php#11","bar_clsmex2.php#12");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$b2plot->SetCSIMTargets($targ,$alts);

// Create the grouped bar plot
$abplot = new AccBarPlot(array($b1plot,$b2plot));

$abplot->SetShadow();
$abplot->value->Show();

// ...and add it to the graPH
$graph->Add($abplot);

$graph->title->Set("Image map barex2");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);


// Send back the HTML page which will call this script again
// to retrieve the image.
$graph->StrokeCSIM('bar_csimex2.php');

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bar_csimex3.html b/html/includes/jpgraph/docs/html/exframes/bar_csimex3.html new file mode 100644 index 0000000000..126e26712f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bar_csimex3.html @@ -0,0 +1,4 @@ + +<?php
// $Id: bar_csimex3.php,v 1.3 2002/08/31 20:03:46 aditus Exp $
// Horiontal bar graph with image maps
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$data1y=array(5,8,19,3,10,5);
$data2y=array(12,2,12,7,14,4);

// Setup the basic parameters for the graph
$graph = new Graph(400,700);
$graph->SetAngle(90);
$graph->SetScale("textlin");

// The negative margins are necessary since we
// have rotated the image 90 degress and shifted the 
// meaning of width, and height. This means that the 
// left and right margins now becomes top and bottom
// calculated with the image width and not the height.
$graph->img->SetMargin(-80,-80,210,210);

$graph->SetMarginColor('white');

// Setup title for graph
$graph->title->Set('Horizontal bar graph');
$graph->title->SetFont(FF_FONT2,FS_BOLD);
$graph->subtitle->Set("With image map\nNote: The URL just points back to this image");

// Setup X-axis.
$graph->xaxis->SetTitle("X-title",'center');
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetAngle(90);
$graph->xaxis->SetTitleMargin(30);
$graph->xaxis->SetLabelMargin(15);
$graph->xaxis->SetLabelAlign('right','center');

// Setup Y-axis

// First we want it at the bottom, i.e. the 'max' value of the
// x-axis
$graph->yaxis->SetPos('max');

// Arrange the title
$graph->yaxis->SetTitle("Turnaround (mkr)",'center');
$graph->yaxis->SetTitleSide(SIDE_RIGHT);
$graph->yaxis->title->SetFont(FF_FONT2,FS_BOLD);
$graph->yaxis->title->SetAngle(0);
$graph->yaxis->title->Align('center','top');
$graph->yaxis->SetTitleMargin(30);

// Arrange the labels
$graph->yaxis->SetLabelSide(SIDE_RIGHT);
$graph->yaxis->SetLabelAlign('center','top');

// Create the bar plots with image maps
$b1plot = new BarPlot($data1y);
$b1plot->SetFillColor("orange");
$targ=array("bar_clsmex2.php#1","bar_clsmex2.php#2","bar_clsmex2.php#3",
            
"bar_clsmex2.php#4","bar_clsmex2.php#5","bar_clsmex2.php#6");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$b1plot->SetCSIMTargets($targ,$alts);

$b2plot = new BarPlot($data2y);
$b2plot->SetFillColor("blue");
$targ=array("bar_clsmex2.php#7","bar_clsmex2.php#8","bar_clsmex2.php#9",
            
"bar_clsmex2.php#10","bar_clsmex2.php#11","bar_clsmex2.php#12");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$b2plot->SetCSIMTargets($targ,$alts);

// Create the accumulated bar plot
$abplot = new AccBarPlot(array($b1plot,$b2plot));
$abplot->SetShadow();

// We want to display the value of each bar at the top
$abplot->value->Show();
$abplot->value->SetFont(FF_FONT1,FS_NORMAL);
$abplot->value->SetAlign('left','center');
$abplot->value->SetColor("black","darkred");
$abplot->value->SetFormat('%.1f mkr');

// ...and add it to the graph
$graph->Add($abplot);

// Send back the HTML page which will call this script again
// to retrieve the image.
$graph->StrokeCSIM('bar_csimex3.php','bar_csimex3');

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bargradsmallex1.html b/html/includes/jpgraph/docs/html/exframes/bargradsmallex1.html new file mode 100644 index 0000000000..090658a724 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bargradsmallex1.html @@ -0,0 +1,4 @@ + +<?php

include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// We need some data
$datay=array(4,8,6);

// Setup the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);

$graph->title->Set('"GRAD_MIDVER"');
$graph->title->SetColor('darkred');

// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);

// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);

// Setup color for gradient fill style 
$bplot->SetFillGradient("navy","lightsteelblue",GRAD_MIDVER);

// Set color for the frame of each bar
$bplot->SetColor("navy");
$graph->Add($bplot);

// Finally send the graph to the browser
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bargradsmallex2.html b/html/includes/jpgraph/docs/html/exframes/bargradsmallex2.html new file mode 100644 index 0000000000..b92655069a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bargradsmallex2.html @@ -0,0 +1,4 @@ + +<?php

include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// We need some data
$datay=array(4,8,6);

// Setup the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);

$graph->title->Set('"GRAD_MIDHOR"');
$graph->title->SetColor('darkred');

// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);

// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);

// Setup color for gradient fill style 
$bplot->SetFillGradient("navy","lightsteelblue",GRAD_MIDHOR);

// Set color for the frame of each bar
$bplot->SetColor("navy");
$graph->Add($bplot);

// Finally send the graph to the browser
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bargradsmallex3.html b/html/includes/jpgraph/docs/html/exframes/bargradsmallex3.html new file mode 100644 index 0000000000..ee439bb643 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bargradsmallex3.html @@ -0,0 +1,4 @@ + +<?php

include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// We need some data
$datay=array(4,8,6);

// Setup the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);

$graph->title->Set('"GRAD_HOR"');
$graph->title->SetColor('darkred');

// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);

// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);

// Setup color for gradient fill style 
$bplot->SetFillGradient("navy","lightsteelblue",GRAD_HOR);

// Set color for the frame of each bar
$bplot->SetColor("navy");
$graph->Add($bplot);

// Finally send the graph to the browser
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bargradsmallex4.html b/html/includes/jpgraph/docs/html/exframes/bargradsmallex4.html new file mode 100644 index 0000000000..27a72a6a77 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bargradsmallex4.html @@ -0,0 +1,4 @@ + +<?php

include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// We need some data
$datay=array(4,8,6);

// Setup the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);

$graph->title->Set('"GRAD_VER"');
$graph->title->SetColor('darkred');

// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);

// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);

// Setup color for gradient fill style 
$bplot->SetFillGradient("navy","lightsteelblue",GRAD_VER);

// Set color for the frame of each bar
$bplot->SetColor("navy");
$graph->Add($bplot);

// Finally send the graph to the browser
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bargradsmallex5.html b/html/includes/jpgraph/docs/html/exframes/bargradsmallex5.html new file mode 100644 index 0000000000..d4ed655bec --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bargradsmallex5.html @@ -0,0 +1,4 @@ + +<?php

include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// We need some data
$datay=array(4,8,6);

// Setup the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);

$graph->title->Set('"GRAD_WIDE_MIDVER"');
$graph->title->SetColor('darkred');

// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);

// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);

// Setup color for gradient fill style 
$bplot->SetFillGradient("navy","lightsteelblue",GRAD_WIDE_MIDVER);

// Set color for the frame of each bar
$bplot->SetColor("navy");
$graph->Add($bplot);

// Finally send the graph to the browser
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bargradsmallex6.html b/html/includes/jpgraph/docs/html/exframes/bargradsmallex6.html new file mode 100644 index 0000000000..9f2609a610 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bargradsmallex6.html @@ -0,0 +1,4 @@ + +<?php

include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// We need some data
$datay=array(4,8,6);

// Setup the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);

$graph->title->Set('"GRAD_WIDE_MIDHOR"');
$graph->title->SetColor('darkred');

// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);

// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);

// Setup color for gradient fill style 
$bplot->SetFillGradient("navy","lightsteelblue",GRAD_WIDE_MIDHOR);

// Set color for the frame of each bar
$bplot->SetColor("navy");
$graph->Add($bplot);

// Finally send the graph to the browser
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bargradsmallex7.html b/html/includes/jpgraph/docs/html/exframes/bargradsmallex7.html new file mode 100644 index 0000000000..74d354fcb9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bargradsmallex7.html @@ -0,0 +1,4 @@ + +<?php

include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// We need some data
$datay=array(4,8,6);

// Setup the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);

$graph->title->Set('"GRAD_CENTER"');
$graph->title->SetColor('darkred');

// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);

// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);

// Setup color for gradient fill style 
$bplot->SetFillGradient("navy","lightsteelblue",GRAD_CENTER);

// Set color for the frame of each bar
$bplot->SetColor("navy");
$graph->Add($bplot);

// Finally send the graph to the browser
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bargradsmallex8.html b/html/includes/jpgraph/docs/html/exframes/bargradsmallex8.html new file mode 100644 index 0000000000..99f2682f08 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bargradsmallex8.html @@ -0,0 +1,4 @@ + +<?php

include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// We need some data
$datay=array(4,8,6);

// Setup the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->img->SetMargin(25,15,25,25);

$graph->title->Set('"GRAD_RAISED_PANEL"');
$graph->title->SetColor('darkred');

// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);

// Create the bar pot
$bplot = new BarPlot($datay);
$bplot->SetWidth(0.6);

// Setup color for gradient fill style 
$bplot->SetFillGradient('navy','orange',GRAD_RAISED_PANEL);

// Set color for the frame of each bar
$bplot->SetColor("navy");
$graph->Add($bplot);

// Finally send the graph to the browser
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/barline_csimex1.html b/html/includes/jpgraph/docs/html/exframes/barline_csimex1.html new file mode 100644 index 0000000000..2bdcf5456b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/barline_csimex1.html @@ -0,0 +1,3 @@ + +<?php 
include ("../jpgraph.php"); 
include (
"../jpgraph_line.php"); 
include (
"../jpgraph_bar.php"); 

$ydata = array(2,3,4,5,6,7,8,9,10,11); 
$ydata2 = array(1,2,3,4,5,6,7,8,9,10); 
$targ = array("#1","#2","#3","#4","#5","#6","#7","#8","#9","#10");
$alt = array(1,2,3,4,5,6,7,8,9,10); 

// Create the graph. 
$graph = new Graph(300,200,"auto");     
$graph->SetScale("textlin"); 
$graph->img->SetMargin(40,20,30,40); 
$graph->title->Set("CSIM example with bar and line"); 
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Setup axis titles
$graph->xaxis->title->Set("X-title"); 
$graph->yaxis->title->Set("Y-title"); 

// Create the linear plot 
$lineplot=new LinePlot($ydata); 
$lineplot->mark->SetType(MARK_FILLEDCIRCLE);
$lineplot->mark->SetWidth(5);
$lineplot->mark->SetColor('black');
$lineplot->mark->SetFillColor('red');
$lineplot->SetCSIMTargets($targ,$alt);

// Create line plot
$barplot=new barPlot($ydata2); 
$barplot->SetCSIMTargets($targ,$alt);

// Add the plots to the graph 
$graph->Add($lineplot); 
$graph->Add($barplot); 

$graph->StrokeCSIM('barline_csimex1.php');

?> 


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/barlinefreq_csimex1.html b/html/includes/jpgraph/docs/html/exframes/barlinefreq_csimex1.html new file mode 100644 index 0000000000..c216574593 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/barlinefreq_csimex1.html @@ -0,0 +1,4 @@ + +<?php
//
// Example of CSIM frequence bar that uses the cache
//
include_once ("../jpgraph.php");
include_once (
"../jpgraph_bar.php");
include_once (
"../jpgraph_line.php");


// Utility function to calculate the accumulated frequence
// for a set of values and ocurrences
function accfreq($data) {
    
rsort($data);
    
$s array_sum($data);
    
$as = array($data[0]);
    
$asp = array(100*$as[0]/$s);
    
$n count($data);
    for( 
$i=1$i $n; ++$i ) {
    
$as[$i] = $as[$i-1]+$data[$i];
    
$asp[$i] = 100.0*$as[$i]/$s;
    }
    return 
$asp;
}

// some data
$data_freq = array(22,20,12,10,5,4,2);
$data_accfreq accfreq($data_freq);

// Create the graph. 
$graph = new Graph(350,250);

// We need to make this extra call for CSIM scripts
// that make use of the cache. If the cache contains this
// graph the HTML wrapper will be returned and then the
// method will call exit() and hence NO LINES AFTER THIS 
// CALL WILL BE EXECUTED.
// $graph->CheckCSIMCache('auto');

// Setup some basic graph parameters
$graph->SetScale("textlin");
$graph->SetY2Scale('lin',0,100);
$graph->img->SetMargin(50,70,30,40);
$graph->yaxis->SetTitleMargin(30);
$graph->SetMarginColor('#EEEEEE');

// Setup titles and fonts
$graph->title->Set("Frequence plot");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Turn the tickmarks
$graph->xaxis->SetTickSide(SIDE_DOWN);
$graph->yaxis->SetTickSide(SIDE_LEFT);

$graph->y2axis->SetTickSide(SIDE_RIGHT);
$graph->y2axis->SetColor('black','blue');
$graph->y2axis->SetLabelFormat('%3d.0%%');

// Create a bar pot
$bplot = new BarPlot($data_freq);

// Create targets and alt texts for the image maps. One for each bar
// (In this example this is just "dummy" targets)
$targ=array("#1","#2","#3","#4","#5","#6","#7");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$bplot->SetCSIMTargets($targ,$alts);


// Create accumulative graph
$lplot = new LinePlot($data_accfreq);

// We want the line plot data point in the middle of the bars
$lplot->SetBarCenter();

// Use transperancy
$lplot->SetFillColor('lightblue@0.6');
$lplot->SetColor('blue@0.6');
//$lplot->SetColor('blue');
$graph->AddY2($lplot);


// Setup the bars
$bplot->SetFillColor("orange@0.2");
$bplot->SetValuePos('center');
$bplot->value->SetFormat("%d");
$bplot->value->SetFont(FF_ARIAL,FS_NORMAL,9);
$bplot->value->Show();

// Add it to the graph
$graph->Add($bplot);

// Send back the HTML page which will call this script again
// to retrieve the image.
$graph->StrokeCSIM('barlinefreq_csimex1.php');

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bartutex1.html b/html/includes/jpgraph/docs/html/exframes/bartutex1.html new file mode 100644 index 0000000000..773a6834f5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bartutex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// Some data
$databary=array(12,7,16,5,7,14,9,3);

// New graph with a drop shadow
$graph = new Graph(300,200,'auto');
$graph->SetShadow();

// Use a "text" X-scale
$graph->SetScale("textlin");

// Set title and subtitle
$graph->title->Set("Elementary barplot with a text scale");

// Use built in font
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Create the bar plot
$b1 = new BarPlot($databary);
$b1->SetLegend("Temperature");
//$b1->SetAbsWidth(6);
//$b1->SetShadow();

// The order the plots are added determines who's ontop
$graph->Add($b1);

// Finally output the  image
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bartutex2.html b/html/includes/jpgraph/docs/html/exframes/bartutex2.html new file mode 100644 index 0000000000..debde985d1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bartutex2.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// Some data
$databary=array(12,7,16,6,7,14,9,3);
$months=$gDateLocale->GetShortMonth();

// New graph with a drop shadow
$graph = new Graph(300,200,'auto');
$graph->SetShadow();

// Use a "text" X-scale
$graph->SetScale("textlin");

// Specify X-labels
$graph->xaxis->SetTickLabels($months);

// Set title and subtitle
$graph->title->Set("Textscale with specified labels");

// Use built in font
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Create the bar plot
$b1 = new BarPlot($databary);
$b1->SetLegend("Temperature");

//$b1->SetAbsWidth(6);
//$b1->SetShadow();

// The order the plots are added determines who's ontop
$graph->Add($b1);

// Finally output the  image
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bartutex3.html b/html/includes/jpgraph/docs/html/exframes/bartutex3.html new file mode 100644 index 0000000000..c48d1f0267 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bartutex3.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// Some data
$months=$gDateLocale->GetShortMonth();

srand ((double) microtime() * 1000000);
for( 
$i=0$i<25; ++$i) {
    
$databary[]=rand(1,50);
    
$databarx[]=$months[$i%12];
}
    
// New graph with a drop shadow
$graph = new Graph(300,200,'auto');
$graph->SetShadow();

// Use a "text" X-scale
$graph->SetScale("textlin");

// Specify X-labels
$graph->xaxis->SetTickLabels($databarx);

// Set title and subtitle
$graph->title->Set("Bar tutorial example 3");

// Use built in font
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Create the bar plot
$b1 = new BarPlot($databary);
$b1->SetLegend("Temperature");
//$b1->SetAbsWidth(6);
//$b1->SetShadow();

// The order the plots are added determines who's ontop
$graph->Add($b1);

// Finally output the  image
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bartutex4.html b/html/includes/jpgraph/docs/html/exframes/bartutex4.html new file mode 100644 index 0000000000..4f030cb6fe --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bartutex4.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// Some data
$months=$gDateLocale->GetShortMonth();

srand ((double) microtime() * 1000000);
for( 
$i=0$i<25; ++$i) {
    
$databary[]=rand(1,50);
    
$databarx[]=$months[$i%12];
}
    
// New graph with a drop shadow
$graph = new Graph(300,200,'auto');
$graph->SetShadow();

// Use a "text" X-scale
$graph->SetScale("textlin");

// Specify X-labels
//$databarx = array('tXi','','','xxx','','','iXii','','','OOO','','','tOO');
$graph->xaxis->SetFont(FF_FONT1,FS_NORMAL);
$graph->xaxis->SetTickLabels($databarx);
$graph->xaxis->SetTextLabelInterval(3);

// Set title and subtitle
$graph->title->Set("Displaying only every third label");

// Use built in font
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Create the bar plot
$b1 = new BarPlot($databary);
$b1->SetLegend("Temperature");
//$b1->SetAbsWidth(6);
//$b1->SetShadow();

// The order the plots are added determines who's ontop
$graph->Add($b1);

// Finally output the  image
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bartutex5.html b/html/includes/jpgraph/docs/html/exframes/bartutex5.html new file mode 100644 index 0000000000..91be3b7f20 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bartutex5.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// Some data
$months=$gDateLocale->GetShortMonth();

srand ((double) microtime() * 1000000);
for( 
$i=0$i<25; ++$i) {
    
$databary[]=rand(1,50);
    
$databarx[]=$months[$i%12];
}
    
// New graph with a drop shadow
$graph = new Graph(300,200,'auto');
$graph->SetShadow();

// Use a "text" X-scale
$graph->SetScale("textlin");

// Specify X-labels
$graph->xaxis->SetTickLabels($databarx);
$graph->xaxis->SetTextLabelInterval(1);
$graph->xaxis->SetTextTickInterval(3);

// Set title and subtitle
$graph->title->Set("Bar tutorial example 5");

// Use built in font
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Create the bar plot
$b1 = new BarPlot($databary);
$b1->SetLegend("Temperature");
$b1->SetWidth(0.4);

// The order the plots are added determines who's ontop
$graph->Add($b1);

// Finally output the  image
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/bartutex6.html b/html/includes/jpgraph/docs/html/exframes/bartutex6.html new file mode 100644 index 0000000000..38be9517ff --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/bartutex6.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

// Some data
$months=$gDateLocale->GetShortMonth();
srand ((double) microtime() * 1000000);
for( 
$i=0$i<25; ++$i) {
    
$databary[]=rand(1,50);
    
$databarx[]=$months[$i%12];
}
    
// New graph with a drop shadow
$graph = new Graph(300,200,'auto');
$graph->SetShadow();

// Use a "text" X-scale
$graph->SetScale("textlin");

// Specify X-labels
$graph->xaxis->SetTickLabels($databarx);
$graph->xaxis->SetTextLabelInterval(3);

// Hide the tick marks
$graph->xaxis->HideTicks();

// Set title and subtitle
$graph->title->Set("Bar tutorial example 6");

// Use built in font
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Create the bar plot
$b1 = new BarPlot($databary);
$b1->SetLegend("Temperature");
$b1->SetWidth(0.4);


// The order the plots are added determines who's ontop
$graph->Add($b1);

// Finally output the  image
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/boxstockcsimex1.html b/html/includes/jpgraph/docs/html/exframes/boxstockcsimex1.html new file mode 100644 index 0000000000..9290325acc --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/boxstockcsimex1.html @@ -0,0 +1,4 @@ + +<?php
// Example of a stock chart
include ("../jpgraph.php");
include (
"../jpgraph_stock.php");

// Data must be in the format : open,close,min,max,median
$datay = array(
    
34,42,27,45,36,
    
55,25,14,59,40,
    
15,40,12,47,23,
    
62,38,25,65,57,
    
38,49,32,64,45);

// Setup a simple graph
$graph = new Graph(300,200);
$graph->SetScale("textlin");
$graph->SetMarginColor('lightblue');
$graph->title->Set('Box Stock chart example');

// Create a new stock plot
$p1 = new BoxPlot($datay);

// Setup URL target for image map
$p1->SetCSIMTargets(array('#1','#2','#3','#4','#5'));

// Width of the bars (in pixels)
$p1->SetWidth(9);

//$p1->SetCenter();
// Uncomment the following line to hide the horizontal end lines
//$p1->HideEndLines();

// Add the plot to the graph and send it back to the browser
$graph->Add($p1);
$graph->StrokeCSIM(basename(__FILE__));

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/boxstockex1.html b/html/includes/jpgraph/docs/html/exframes/boxstockex1.html new file mode 100644 index 0000000000..5ed65bcea2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/boxstockex1.html @@ -0,0 +1,4 @@ + +<?php
// Example of a stock chart
include ("../jpgraph.php");
include (
"../jpgraph_stock.php");

// Data must be in the format : open,close,min,max,median
$datay = array(
    
34,42,27,45,36,
    
55,25,14,59,40,
    
15,40,12,47,23,
    
62,38,25,65,57,
    
38,49,32,64,45);

// Setup a simple graph
$graph = new Graph(300,200);
$graph->SetScale("textlin");
$graph->SetMarginColor('lightblue');
$graph->title->Set('Box Stock chart example');

// Create a new stock plot
$p1 = new BoxPlot($datay);

// Width of the bars (in pixels)
$p1->SetWidth(9);

// Uncomment the following line to hide the horizontal end lines
//$p1->HideEndLines();

// Add the plot to the graph and send it back to the browser
$graph->Add($p1);
$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/builtinplotmarksex1.html b/html/includes/jpgraph/docs/html/exframes/builtinplotmarksex1.html new file mode 100644 index 0000000000..88ee9f49ab --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/builtinplotmarksex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$datay1 = array(2,6,7,12,13,18);
$datay2 = array(5,12,12,19,25,20);

// Setup the graph
$graph = new Graph(350,200);
$graph->SetMargin(30,20,60,20);
$graph->SetMarginColor('white');
$graph->SetScale("linlin");

// Hide the frame around the graph
$graph->SetFrame(false);

// Setup title
$graph->title->Set("Using Builtin PlotMarks");
$graph->title->SetFont(FF_VERDANA,FS_BOLD,14);

// Note: requires jpgraph 1.12p or higher
// $graph->SetBackgroundGradient('blue','navy:0.5',GRAD_HOR,BGRAD_PLOT);
$graph->tabtitle->Set('Region 1' );
$graph->tabtitle->SetWidth(TABTITLE_WIDTHFULL);

// Enable X and Y Grid
$graph->xgrid->Show();
$graph->xgrid->SetColor('gray@0.5');
$graph->ygrid->SetColor('gray@0.5');

// Format the legend box
$graph->legend->SetColor('navy');
$graph->legend->SetFillColor('lightgreen');
$graph->legend->SetLineWeight(1);
$graph->legend->SetFont(FF_ARIAL,FS_BOLD,8);
$graph->legend->SetShadow('gray@0.4',3);
$graph->legend->SetAbsPos(15,120,'right','bottom');

// Create the line plots

$p1 = new LinePlot($datay1);
$p1->SetColor("red");
$p1->SetFillColor("yellow@0.5");
$p1->SetWeight(2);
$p1->mark->SetType(MARK_IMG_DIAMOND,5,0.6);
$p1->SetLegend('2006');
$graph->Add($p1);

$p2 = new LinePlot($datay2);
$p2->SetColor("darkgreen");
$p2->SetWeight(2);
$p2->SetLegend('2001');
$p2->mark->SetType(MARK_IMG_MBALL,'red');
$graph->Add($p2);

// Add a vertical line at the end scale position '7'
$l1 = new PlotLine(VERTICAL,7);
$graph->Add($l1);

// Output the graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/canvas_jpgarchex.html b/html/includes/jpgraph/docs/html/exframes/canvas_jpgarchex.html new file mode 100644 index 0000000000..5ff0a6aa43 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/canvas_jpgarchex.html @@ -0,0 +1,3 @@ + +<?php
// $Id: canvas_jpgarchex.php,v 1.3 2002/08/29 10:14:19 aditus Exp $
include "../jpgraph.php";
include 
"../jpgraph_canvas.php";
include 
"../jpgraph_canvtools.php";

// Scale we are using
$ymax=24;
$xmax=20;

// Setup the basic canvas
$g = new CanvasGraph(700,650,'auto');
$g->SetMargin(2,3,2,3);
$g->SetMarginColor("teal");
$g->InitFrame();

// ... and a scale
$scale = new CanvasScale($g);
$scale->Set(0,$xmax,0,$ymax);

// ... we need shape since we want the indented rectangle
$shape = new Shape($g,$scale);
$shape->SetColor('black');

// ... basic parameters for the overall image
$l 2;        // Left margin
$r 18;    // Row number to start the lowest line on
$width 16;    // Total width

// Setup the two basic rectangle text object we  will use
$tt = new CanvasRectangleText();
$tt->SetFont(FF_ARIAL,FS_NORMAL,14);
$tt->SetFillColor('');
$tt->SetColor('');
$tt->SetFontColor('navy');

$t = new CanvasRectangleText();
$t->SetFont(FF_ARIAL,FS_NORMAL,14);
$t->SetFillColor('goldenrod1');
$t->SetFontColor('navy');


// Now start drawing the arch overview from the bottom and up
// This is all pretty manual and one day I will write a proper
// framework to make it easy to construct these types of architecture
// overviews. But for now, just plain old coordinates..

// Line: GD Library and image libraries
$h=3;
$s  3$d=$l $width-9;
$t->SetFillColor('cadetblue3');
$t->Set("TTF",$d,$r+2,$s,1);
$t->Stroke($g->img,$scale);
$t->Set("PNG",$d+$s,$r+2,$s,1);
$t->Stroke($g->img,$scale);
$t->Set("JPEG",$d+2*$s,$r+2,$s,1);
$t->Stroke($g->img,$scale);
$shape->IndentedRectangle($l,$r,$width,$h,$s*3,1,2,'lightgreen');
$tt->Set("GD Basic library\n(1.8.x or 2.x)",$l,$r,$width,$h-1); 
$tt->Stroke($g->img,$scale);


// Area: Basic internal JpGraph architecture
$t->SetFillColor('goldenrod1');
$h 2;
$r -= $h$d=8;
$t->Set("Image primitives\n(RGB, Anti-aliasing,\nGD Abstraction)",$l,$r-0.5,$width*0.5,$h+0.5);
$t->Stroke($g->img,$scale);
$t->Set("Image Cache &\nStreaming",$l+0.5*$width,$r,$width*0.4,$h);
$t->Stroke($g->img,$scale);

$r -= $h$d=8;
$t->Set("2D Rot & Transformation",$l,$r,$width*0.5,$h-0.5); $t->Stroke($g->img,$scale);


$r -= 2$h 4;
$shape->IndentedRectangle($l,$r,$width*0.9,$h,$d,2,3,'goldenrod1');
$tt->Set("Axis, Labelling, (Auto)-Scaling",$l,$r,$width*0.9,$h-2); $tt->Stroke($g->img,$scale);

$r -= 1;
$shape->IndentedRectangle($l,$r,$width,7,$width*0.9,6,3,'goldenrod1');
$tt->Set("Error handling & Utility classes",$l,$r,$width,1); $tt->Stroke($g->img,$scale);


// Area: Top area with graph components
$t->SetFillColor('gold1');
$r -= 3;
$w $width*0.55/4$h 2;
$t->Set("Gantt\nGraph",$l,$r,$w,$h);
$t->Stroke($g->img,$scale);

$t->Set("Pie\nGraph",$l+$w,$r,$w,$h);
$t->Stroke($g->img,$scale);
$t->Set("Radar\nGraph",$l+$w*2,$r,$w,$h);
$t->Stroke($g->img,$scale);

$shape->IndentedRectangle($l,$r,$width,3,4*$w,2,0,'gold1');
$tt->Set("Base Graph\n(Orthogonal\ncoordinate system)",$l+4*$w,$r,$width-$w*4,3); 
$tt->Stroke($g->img,$scale);

$r -= 2;
$d 0.7;
$shape->IndentedRectangle($l+3*$w,$r,$w,4$w*$d,2,0,'gold1');
$t->Set("Canv\nUtil",$l+3*$w,$r,$w*$d,$h);     $t->Stroke($g->img,$scale);
$tt->Set("Canvas\nGraph",$l+3*$w,$r+2,$w,2); $tt->Stroke($g->img,$scale);

// Top line of plotting plugins
$t->SetFillColor('cyan');
$t->Set("Gantt\nPlot",$l,$r,$w,$h); $t->Stroke($g->img,$scale);
$t->Set("2D\nPlot",$l+$w,$r,$w/2,$h);     $t->Stroke($g->img,$scale);
$t->Set("3D\nPlot",$l+$w+$w/2,$r,$w/2,$h);$t->Stroke($g->img,$scale);
$t->Set("Radar\nPlot",$l+2*$w,$r,$w,$h); $t->Stroke($g->img,$scale);

$wp = ($width 4*$w)/4
$t->Set("Error\nPlot",$l+4*$w,$r,$wp,$h); $t->Stroke($g->img,$scale);
$t->Set("Line\nPlot",$l+4*$w+$wp,$r,$wp,$h); $t->Stroke($g->img,$scale);
$t->Set("Bar\nPlot",$l+4*$w+2*$wp,$r,$wp,$h); $t->Stroke($g->img,$scale);
$t->Set("Scatter\nPlot",$l+4*$w+3*$wp,$r,$wp,$h); $t->Stroke($g->img,$scale);

// Show application top
$r -= 2.5$h=2
$t->SetFillColor('blue');
$t->SetFontColor('white');
$t->SetFont(FF_ARIAL,FS_BOLD,20);
$t->Set("PHP Application",$l,$r,$width,$h); $t->Stroke($g->img,$scale);

// Stroke title
$r 0.5;
$tt->SetFontColor('black');
$tt->SetFont(FF_TIMES,FS_BOLD,28);
$tt->Set("JpGraph Architecture Overview",$l,$r,$width,1); 
$tt->Stroke($g->img,$scale);

// Stroke footer
$tt->SetFont(FF_VERDANA,FS_NORMAL,10);
$tt->Set("Generated: ".date("ymd H:m",time()),0.1,$ymax*0.95); 
$tt->Stroke($g->img,$scale);

// .. and stream it all back
$g->Stroke();

?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/canvasex01.html b/html/includes/jpgraph/docs/html/exframes/canvasex01.html new file mode 100644 index 0000000000..8ae2722768 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/canvasex01.html @@ -0,0 +1,3 @@ + +<?php
// $Id: canvasex01.php,v 1.3 2002/10/23 08:17:23 aditus Exp $
include "../jpgraph.php";
include 
"../jpgraph_canvas.php";

// Setup a basic canvas we can work 
$g = new CanvasGraph(400,300,'auto');
$g->SetMargin(5,11,6,11);
$g->SetShadow();
$g->SetMarginColor("teal");

// We need to stroke the plotarea and margin before we add the
// text since we otherwise would overwrite the text.
$g->InitFrame();

// Draw a text box in the middle
$txt="This\nis\na TEXT!!!";
$t = new Text($txt,200,10);
$t->SetFont(FF_ARIAL,FS_BOLD,40);

// How should the text box interpret the coordinates?
$t->Align('center','top');

// How should the paragraph be aligned?
$t->ParagraphAlign('center');

// Add a box around the text, white fill, black border and gray shadow
$t->SetBox("white","black","gray");

// Stroke the text
$t->Stroke($g->img);

// Stroke the graph
$g->Stroke();

?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/canvasex02.html b/html/includes/jpgraph/docs/html/exframes/canvasex02.html new file mode 100644 index 0000000000..a6efdc6a18 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/canvasex02.html @@ -0,0 +1,3 @@ + +<?php
// $Id: canvasex02.php,v 1.1 2002/08/27 20:08:57 aditus Exp $
include "../jpgraph.php";
include 
"../jpgraph_canvas.php";

// Setup a basic canvas we can work 
$g = new CanvasGraph(400,200,'auto');
$g->SetMargin(5,11,6,11);
$g->SetShadow();
$g->SetMarginColor("teal");

// We need to stroke the plotarea and margin before we add the
// text since we otherwise would overwrite the text.
$g->InitFrame();

// Add a black line
$g->img->SetColor('black');
$g->img->Line(0,0,100,100);

// .. and a circle (x,y,diameter)
$g->img->Circle(100,100,50);

// .. and a filled circle (x,y,diameter)
$g->img->SetColor('red');
$g->img->FilledCircle(200,100,50);

// .. add a rectangle
$g->img->SetColor('green');
$g->img->FilledRectangle(10,10,50,50);

// .. add a filled rounded rectangle
$g->img->SetColor('green');
$g->img->FilledRoundedRectangle(300,30,350,80,10);
// .. with a darker border
$g->img->SetColor('darkgreen');
$g->img->RoundedRectangle(300,30,350,80,10);

// Stroke the graph
$g->Stroke();

?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/canvasex03.html b/html/includes/jpgraph/docs/html/exframes/canvasex03.html new file mode 100644 index 0000000000..ee9b211e3a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/canvasex03.html @@ -0,0 +1,3 @@ + +<?php
// $Id: canvasex03.php,v 1.1 2002/08/27 20:08:57 aditus Exp $
include "../jpgraph.php";
include 
"../jpgraph_canvas.php";
include 
"../jpgraph_canvtools.php";

// Define work space
$xmax=20;
$ymax=20;

// Setup a basic canvas we can work 
$g = new CanvasGraph(400,200,'auto');
$g->SetMargin(5,11,6,11);
$g->SetShadow();
$g->SetMarginColor("teal");

// We need to stroke the plotarea and margin before we add the
// text since we otherwise would overwrite the text.
$g->InitFrame();

// Create a new scale
$scale = new CanvasScale($g);
$scale->Set(0,$xmax,0,$ymax);

// The shape class is wrapper around the Imgae class which translates
// the coordinates for us
$shape = new Shape($g,$scale);
$shape->SetColor('black');


// Add a black line
$shape->SetColor('black');
$shape->Line(0,0,20,20);

// .. and a circle (x,y,diameter)
$shape->Circle(5,14,2);

// .. and a filled circle (x,y,diameter)
$shape->SetColor('red');
$shape->FilledCircle(11,8,3);

// .. add a rectangle
$shape->SetColor('green');
$shape->FilledRectangle(15,8,19,14);

// .. add a filled rounded rectangle
$shape->SetColor('green');
$shape->FilledRoundedRectangle(2,3,8,6);
// .. with a darker border
$shape->SetColor('darkgreen');
$shape->RoundedRectangle(2,3,8,6);


// Stroke the graph
$g->Stroke();

?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/canvasex04.html b/html/includes/jpgraph/docs/html/exframes/canvasex04.html new file mode 100644 index 0000000000..254419de12 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/canvasex04.html @@ -0,0 +1,3 @@ + +<?php
// $Id: canvasex04.php,v 1.1 2002/08/27 20:08:57 aditus Exp $
include "../jpgraph.php";
include 
"../jpgraph_canvas.php";
include 
"../jpgraph_canvtools.php";

// Define work space
$xmax=20;
$ymax=20;

// Setup a basic canvas we can work 
$g = new CanvasGraph(200,100,'auto');
$g->SetMargin(5,11,6,11);
$g->SetShadow();
$g->SetMarginColor("teal");

// We need to stroke the plotarea and margin before we add the
// text since we otherwise would overwrite the text.
$g->InitFrame();

// Create a new scale
$scale = new CanvasScale($g);
$scale->Set(0,$xmax,0,$ymax);

// The shape class is wrapper around the Imgae class which translates
// the coordinates for us
$shape = new Shape($g,$scale);
$shape->SetColor('black');


// Add a black line
$shape->SetColor('black');
$shape->Line(0,0,20,20);

// .. and a circle (x,y,diameter)
$shape->Circle(5,14,2);

// .. and a filled circle (x,y,diameter)
$shape->SetColor('red');
$shape->FilledCircle(11,8,3);

// .. add a rectangle
$shape->SetColor('green');
$shape->FilledRectangle(15,8,19,14);

// .. add a filled rounded rectangle
$shape->SetColor('green');
$shape->FilledRoundedRectangle(2,3,8,6);
// .. with a darker border
$shape->SetColor('darkgreen');
$shape->RoundedRectangle(2,3,8,6);


// Stroke the graph
$g->Stroke();

?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/canvasex05.html b/html/includes/jpgraph/docs/html/exframes/canvasex05.html new file mode 100644 index 0000000000..c740c3889c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/canvasex05.html @@ -0,0 +1,3 @@ + +<?php
// $Id: canvasex05.php,v 1.1 2002/08/27 20:08:57 aditus Exp $
include "../jpgraph.php";
include 
"../jpgraph_canvas.php";
include 
"../jpgraph_canvtools.php";

// Define work space
$xmax=40;
$ymax=40;

// Setup a basic canvas we can work 
$g = new CanvasGraph(400,200,'auto');
$g->SetMargin(5,11,6,11);
$g->SetShadow();
$g->SetMarginColor("teal");

// We need to stroke the plotarea and margin before we add the
// text since we otherwise would overwrite the text.
$g->InitFrame();

// Create a new scale
$scale = new CanvasScale($g);
$scale->Set(0,$xmax,0,$ymax);

// The shape class is wrapper around the Imgae class which translates
// the coordinates for us
$shape = new Shape($g,$scale);
$shape->SetColor('black');


// Add a black line
$shape->SetColor('black');
$shape->Line(0,0,20,20);

// .. and a circle (x,y,diameter)
$shape->Circle(5,14,2);

// .. and a filled circle (x,y,diameter)
$shape->SetColor('red');
$shape->FilledCircle(11,8,3);

// .. add a rectangle
$shape->SetColor('green');
$shape->FilledRectangle(15,8,19,14);

// .. add a filled rounded rectangle
$shape->SetColor('green');
$shape->FilledRoundedRectangle(2,3,8,6);
// .. with a darker border
$shape->SetColor('darkgreen');
$shape->RoundedRectangle(2,3,8,6);


// Stroke the graph
$g->Stroke();

?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/canvasex06.html b/html/includes/jpgraph/docs/html/exframes/canvasex06.html new file mode 100644 index 0000000000..7faf171f7d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/canvasex06.html @@ -0,0 +1,3 @@ + +<?php
// $Id: canvasex06.php,v 1.1 2002/08/27 20:08:57 aditus Exp $
include "../jpgraph.php";
include 
"../jpgraph_canvas.php";
include 
"../jpgraph_canvtools.php";

// Define work space
$xmax=40;
$ymax=40;

// Setup a basic canvas we can work 
$g = new CanvasGraph(400,200,'auto');
$g->SetMargin(5,11,6,11);
$g->SetShadow();
$g->SetMarginColor("teal");

// We need to stroke the plotarea and margin before we add the
// text since we otherwise would overwrite the text.
$g->InitFrame();

// Create a new scale
$scale = new CanvasScale($g);
$scale->Set(0,$xmax,0,$ymax);

// The shape class is wrapper around the Imgae class which translates
// the coordinates for us
$shape = new Shape($g,$scale);
$shape->SetColor('black');

$shape->IndentedRectangle(1,2,15,15,8,8,CORNER_TOPLEFT,'khaki');

$shape->IndentedRectangle(1,20,15,15,8,8,CORNER_BOTTOMLEFT,'khaki');

$shape->IndentedRectangle(20,2,15,15,8,8,CORNER_TOPRIGHT,'khaki');

$shape->IndentedRectangle(20,20,15,15,8,8,CORNER_BOTTOMRIGHT,'khaki');

// Stroke the graph
$g->Stroke();

?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/color_chart01.html b/html/includes/jpgraph/docs/html/exframes/color_chart01.html new file mode 100644 index 0000000000..014d1242c6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/color_chart01.html @@ -0,0 +1,4 @@ +
+Warning: highlight_file(color_chart01.php): failed to open stream: No such file or directory in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
+
+Warning: highlight_file(): Failed opening 'color_chart01.php' for highlighting in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
diff --git a/html/includes/jpgraph/docs/html/exframes/color_chart02.html b/html/includes/jpgraph/docs/html/exframes/color_chart02.html new file mode 100644 index 0000000000..c25c8e6888 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/color_chart02.html @@ -0,0 +1,4 @@ +
+Warning: highlight_file(color_chart02.php): failed to open stream: No such file or directory in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
+
+Warning: highlight_file(): Failed opening 'color_chart02.php' for highlighting in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
diff --git a/html/includes/jpgraph/docs/html/exframes/color_chart03.html b/html/includes/jpgraph/docs/html/exframes/color_chart03.html new file mode 100644 index 0000000000..80e71870b7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/color_chart03.html @@ -0,0 +1,4 @@ +
+Warning: highlight_file(color_chart03.php): failed to open stream: No such file or directory in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
+
+Warning: highlight_file(): Failed opening 'color_chart03.php' for highlighting in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
diff --git a/html/includes/jpgraph/docs/html/exframes/color_chart04.html b/html/includes/jpgraph/docs/html/exframes/color_chart04.html new file mode 100644 index 0000000000..c501fbe5a2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/color_chart04.html @@ -0,0 +1,4 @@ +
+Warning: highlight_file(color_chart04.php): failed to open stream: No such file or directory in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
+
+Warning: highlight_file(): Failed opening 'color_chart04.php' for highlighting in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
diff --git a/html/includes/jpgraph/docs/html/exframes/dateaxisex1.html b/html/includes/jpgraph/docs/html/exframes/dateaxisex1.html new file mode 100644 index 0000000000..f267e6c0fb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/dateaxisex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

// The callback that converts timestamp to minutes and seconds
function TimeCallback($aVal) {
    return 
Date('H:i:s',$aVal);
}

// Fake some suitable random data
$now time();
$datax = array($now);
for( 
$i=0$i 360$i += 10 ) {
    
$datax[] = $now $i;
}
$n count($datax);
$datay=array();
for( 
$i=0$i $n; ++$i ) {
    
$datay[] = rand(30,150);
}

// Setup the basic graph
$graph = new Graph(324,250);
$graph->SetMargin(40,40,30,70);    
$graph->title->Set('Date: '.date('Y-m-d',$now));
$graph->SetAlphaBlending();

// Setup a manual x-scale (We leave the sentinels for the
// Y-axis at 0 which will then autoscale the Y-axis.)
// We could also use autoscaling for the x-axis but then it
// probably will start a little bit earlier than the first value
// to make the first value an even number as it sees the timestamp
// as an normal integer value.
$graph->SetScale("intlin",0,200,$now,$datax[$n-1]);

// Setup the x-axis with a format callback to convert the timestamp
// to a user readable time
$graph->xaxis->SetLabelFormatCallback('TimeCallback');
$graph->xaxis->SetLabelAngle(90);

// Create the line
$p1 = new LinePlot($datay,$datax);
$p1->SetColor("blue");

// Set the fill color partly transparent
$p1->SetFillColor("blue@0.4");

// Add lineplot to the graph
$graph->Add($p1);

// Output line
$graph->Stroke();
?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/dateaxisex2.html b/html/includes/jpgraph/docs/html/exframes/dateaxisex2.html new file mode 100644 index 0000000000..78c12afae2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/dateaxisex2.html @@ -0,0 +1,4 @@ + +<?php
require_once("../jpgraph.php");
require_once(
"../jpgraph_line.php");
require_once(
"../jpgraph_date.php");

// Create a data set in range (50,70) and X-positions
DEFINE('NDATAPOINTS',360);
DEFINE('SAMPLERATE',240); 
$start time();
$end $start+NDATAPOINTS*SAMPLERATE;
$data = array();
$xdata = array();
for( 
$i=0$i NDATAPOINTS; ++$i ) {
    
$data[$i] = rand(50,70);
    
$xdata[$i] = $start $i SAMPLERATE;
}


// Create the new graph
$graph = new Graph(540,300);

// Slightly larger than normal margins at the bottom to have room for
// the x-axis labels
$graph->SetMargin(40,40,30,130);

// Fix the Y-scale to go between [0,100] and use date for the x-axis
$graph->SetScale('datlin',0,100);
$graph->title->Set("Example on Date scale");

// Set the angle for the labels to 90 degrees
$graph->xaxis->SetLabelAngle(90);

$line = new LinePlot($data,$xdata);
$line->SetLegend('Year 2005');
$line->SetFillColor('lightblue@0.5');
$graph->Add($line);
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/dateaxisex4.html b/html/includes/jpgraph/docs/html/exframes/dateaxisex4.html new file mode 100644 index 0000000000..6aef1c937b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/dateaxisex4.html @@ -0,0 +1,4 @@ + +<?php
require_once("../jpgraph.php");
require_once(
"../jpgraph_line.php");
require_once(
"../jpgraph_date.php");

// Create a data set in range (50,70) and X-positions
DEFINE('NDATAPOINTS',360);
DEFINE('SAMPLERATE',240); 
$start time();
$end $start+NDATAPOINTS*SAMPLERATE;
$data = array();
$xdata = array();
for( 
$i=0$i NDATAPOINTS; ++$i ) {
    
$data[$i] = rand(50,70);
    
$xdata[$i] = $start $i SAMPLERATE;
}


// Create the new graph
$graph = new Graph(540,300);

// Slightly larger than normal margins at the bottom to have room for
// the x-axis labels
$graph->SetMargin(40,40,30,130);

// Fix the Y-scale to go between [0,100] and use date for the x-axis
$graph->SetScale('datlin',0,100);
$graph->title->Set("Example on Date scale");

// Set the angle for the labels to 90 degrees
$graph->xaxis->SetLabelAngle(90);

// The automatic format string for dates can be overridden
$graph->xaxis->scale->SetDateFormat('H:i');

// Adjust the start/end to a specific alignment
$graph->xaxis->scale->SetTimeAlign(MINADJ_10);

$line = new LinePlot($data,$xdata);
$line->SetLegend('Year 2005');
$line->SetFillColor('lightblue@0.5');
$graph->Add($line);
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/dbschemaex1.html b/html/includes/jpgraph/docs/html/exframes/dbschemaex1.html new file mode 100644 index 0000000000..30feb4925e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/dbschemaex1.html @@ -0,0 +1,3 @@ + +<?php
/*=======================================================================
// File:     DBSCHEMAEX1.PHP
// Description:    Draw a DB schema of the DDDA architecture
// Created:     2002-08-25
// Author:    Johan Persson (johanp@aditus.nu)
// Ver:        $Id: dbschemaex1.php,v 1.1 2002/08/27 20:08:57 aditus Exp $
//
// License:     This code is released under QPL
//              Copyright (C) 2001,2002 Johan Persson
// Note:        The actual drawing of the tables are semi-automatically
//              but you can easily adjust the individual tables position
//              with the 'tblposadj' array. 
//
//========================================================================
*/
include "../jpgraph.php";
include 
"../jpgraph_canvas.php";
include 
"../jpgraph_canvtools.php";
include 
"../utils/misc/imgdbschema.inc";
include 
"../utils/jpdocgen/jpdb.php";


// Global callback to format the table header names
function FormatTblName($aName) {
    
// We want to replace any specifi references to the
    // 'JpGraph' project with the generic '<project>'
    
return str_replace('JpGraph','<project>'$aName);
}

// Global callback to format each field name in the table
function FormatFldName($aName,$aTable) {
    return 
$aName;
}


class 
Driver {

    var 
$ig$img$iscale$ishape;
    var 
$iymax,$ixmax;
    var 
$iwidth,$iheight;

    function 
Driver() {

    
// Define Image size and coordinate grid space to work within
    
$this->iwidth 600;
    
$this->iheight750;
    
$this->iymax  50;
    
$this->ixmax  55;

    
// Setup a basic canvas
    
$this->ig = new CanvasGraph($this->iwidth,$this->iheight,'auto');
    
$this->img $this->ig->img;

    
// Define the scale to be used
    
$this->iscale = new CanvasScale($this->ig);
    
$this->iscale->Set(0,$this->ixmax,0,$this->iymax);
    
$this->ishape = new Shape($this->ig,$this->iscale);

    
// A small frame around the canvas
    
$this->ig->SetMargin(2,3,2,3);
    
$this->ig->SetMarginColor("teal");
    
$this->ig->InitFrame();

    }

    function 
Run() {

    
$leftm=1.5;    // Left margin (for table schemes) 
    
$topm=5;    // Top margin (for table schemes) 
    
$tblwidth=15;    // Individual table width
    
$tlo=1;        // Offset for top line

    // Add the background color for the project specific tables
    
$this->ishape->IndentedRectangle($leftm,$topm-1,3*$tblwidth+$tlo+6,45,
                     
$tlo+2*$tblwidth+2,30,CORNER_BOTTOMLEFT,
                     
'lightblue');

    
// Stroke the tables (series of x,y offsets, If =-1 then use the
    // automtic positioning
    
$tblposadj=array($tlo,0,$tblwidth+$tlo+2,0,2*$tblwidth+$tlo+4,
             
0,-1,16,-1,16);
    
$dbschema = new ImgDBSchema('jpgraph_doc','FormatTblName','FormatFldName');
    
$dbschema->SetMargin($leftm,$topm);
    
$dbschema->SetTableWidth($tblwidth);
    
$dbschema->Stroke($this->img,$this->iscale,$tblposadj);

    
$tt = new CanvasRectangleText();
    
$tt->SetFillColor('');
    
$tt->SetColor('');
    
$tt->SetFontColor('navy');

    
// Add explanation
    
$tt->SetFont(FF_ARIAL,FS_NORMAL,12);
    
$tt->Set('Project specific tables',$tblwidth+$leftm+3,16,15);
    
$tt->Stroke($this->img,$this->iscale);

    
// Add title
    
$tt->SetColor('');
    
$tt->SetFont(FF_VERDANA,FS_BOLD,26);
    
$tt->Set('DDDA - DB Schema',9,0.5,30);
    
$tt->Stroke($this->img,$this->iscale);

    
// Add a version and date
    
$tt->SetFillColor('yellow');
    
$tt->SetFont(FF_FONT1,FS_NORMAL,10);
    
$tt->Set("Generated: ".date("ymd H:i",time()),1,$this->iymax*0.96,15); 
    
$tt->Stroke($this->img,$this->iscale);

    
$this->ig->Stroke();
    }
}

$driver = new Driver();
$driver->Run();

?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example0.html b/html/includes/jpgraph/docs/html/exframes/example0.html new file mode 100644 index 0000000000..2c8e330116 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example0.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

// Some data
$ydata = array(11,3,8,12,5,1,9,13,5,7);

// Create the graph. These two calls are always required
$graph = new Graph(350,250,"auto");    
$graph->SetScale("textlin");

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->SetColor("blue");

// Add the plot to the graph
$graph->Add($lineplot);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example11.html b/html/includes/jpgraph/docs/html/exframes/example11.html new file mode 100644 index 0000000000..d0bf65960d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example11.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);
$ydata2 = array(1,19,15,7,22,14,5,9,21,13);

$gJpgBrandTiming=true;

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Create the linear plot
$lineplot=new LinePlot($ydata);

$lineplot2=new LinePlot($ydata2);

// Add the plot to the graph
$graph->Add($lineplot);
$graph->Add($lineplot2);

$graph->img->SetMargin(40,20,20,40);
$graph->title->Set("Timing a graph");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);

$lineplot2->SetColor("orange");
$lineplot2->SetWeight(2);

$graph->yaxis->SetColor("red");
$graph->yaxis->SetWeight(2);
$graph->SetShadow();

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example13.html b/html/includes/jpgraph/docs/html/exframes/example13.html new file mode 100644 index 0000000000..e774c5e418 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example13.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_error.php");

$errdatay = array(11,9,2,4,19,26,13,19,7,12);


// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

$graph->img->SetMargin(40,30,20,40);
$graph->SetShadow();

// Create the error plot
$errplot=new ErrorPlot($errdatay);
$errplot->SetColor("red");
$errplot->SetWeight(2);

// Add the plot to the graph
$graph->Add($errplot);

$graph->title->Set("Simple error plot");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$datax $gDateLocale->GetShortMonth();
$graph->xaxis->SetTickLabels($datax);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example14.html b/html/includes/jpgraph/docs/html/exframes/example14.html new file mode 100644 index 0000000000..5e08e04b54 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example14.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_error.php");

$errdatay = array(11,9,2,4,19,26,13,19,7,12);


// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

$graph->img->SetMargin(40,30,20,40);
$graph->SetShadow();

// Create the error plot
$errplot=new ErrorPlot($errdatay);
$errplot->SetColor("red");
$errplot->SetWeight(2);
$errplot->SetCenter();

// Add the plot to the graph
$graph->Add($errplot);

$graph->title->Set("Simple error plot");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$datax $gDateLocale->GetShortMonth();
$graph->xaxis->SetTickLabels($datax);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example15.html b/html/includes/jpgraph/docs/html/exframes/example15.html new file mode 100644 index 0000000000..94a61376b6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example15.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_error.php");

$errdatay = array(11,9,2,4,19,26,13,19,7,12);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

$graph->img->SetMargin(40,30,20,40);
$graph->SetShadow();

// Create the linear plot
$errplot=new ErrorLinePlot($errdatay);
$errplot->SetColor("red");
$errplot->SetWeight(2);
$errplot->SetCenter();
$errplot->line->SetWeight(2);
$errplot->line->SetColor("blue");

// Add the plot to the graph
$graph->Add($errplot);

$graph->title->Set("Linear error plot");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$datax $gDateLocale->GetShortMonth();
$graph->xaxis->SetTickLabels($datax);


// Display the graph
$graph->Stroke();
?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example16.1.html b/html/includes/jpgraph/docs/html/exframes/example16.1.html new file mode 100644 index 0000000000..479cda61df --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example16.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_error.php");
include (
"../jpgraph_bar.php");

$l1datay = array(11,9,2,4,3,13,17);
$l2datay = array(23,12,5,19,17,10,15);
$datax=array("Jan","Feb","Mar","Apr","May");

// Create the graph. 
$graph = new Graph(400,200,"auto");    
$graph->SetScale("textlin");

$graph->img->SetMargin(40,130,20,40);
$graph->SetShadow();

// Create the linear error plot
$l1plot=new LinePlot($l1datay);
$l1plot->SetColor("red");
$l1plot->SetWeight(2);
$l1plot->SetLegend("Prediction");

// Create the bar plot
$l2plot = new LinePlot($l2datay);
$l2plot->SetFillColor("orange");
$l2plot->SetLegend("Result");

// Add the plots to the graph
$graph->Add($l2plot);
$graph->Add($l1plot);

$graph->title->Set("Mixing line and filled line");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

//$graph->xaxis->SetTickLabels($datax);
//$graph->xaxis->SetTextTickInterval(2);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example16.2.html b/html/includes/jpgraph/docs/html/exframes/example16.2.html new file mode 100644 index 0000000000..e27c3fccfb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example16.2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_bar.php");

$l1datay = array(11,9,2,4,3,13,17);
$l2datay = array(23,12,5,19,17,10,15);
$datax=array("Jan","Feb","Mar","Apr","May");

// Create the graph. 
$graph = new Graph(400,200,"auto");    
$graph->SetScale("textlin");

$graph->img->SetMargin(40,130,20,40);
$graph->SetShadow();

// Create the linear error plot
$l1plot=new LinePlot($l1datay);
$l1plot->SetColor("red");
$l1plot->SetWeight(2);
$l1plot->SetLegend("Prediction");

// Create the bar plot
$bplot = new BarPlot($l2datay);
$bplot->SetFillColor("orange");
$bplot->SetLegend("Result");

// Add the plots to t'he graph
$graph->Add($l1plot);
$graph->Add($bplot);


$graph->title->Set("Adding a line plot to a bar graph v1");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

//$graph->xaxis->SetTickLabels($datax);
//$graph->xaxis->SetTextTickInterval(2);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example16.3.html b/html/includes/jpgraph/docs/html/exframes/example16.3.html new file mode 100644 index 0000000000..232541c454 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example16.3.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_bar.php");

$l1datay = array(11,9,2,4,3,13,17);
$l2datay = array(23,12,5,19,17,10,15);
$datax=array("Jan","Feb","Mar","Apr","May");

// Create the graph. 
$graph = new Graph(400,200,"auto");    
$graph->SetScale("textlin");

$graph->img->SetMargin(40,130,20,40);
$graph->SetShadow();

// Create the linear error plot
$l1plot=new LinePlot($l1datay);
$l1plot->SetColor("red");
$l1plot->SetWeight(2);
$l1plot->SetLegend("Prediction");


// Create the bar plot
$bplot = new BarPlot($l2datay);
$bplot->SetFillColor("orange");
$bplot->SetLegend("Result");

// Add the plots to t'he graph
$graph->Add($bplot);
$graph->Add($l1plot);


$graph->title->Set("Adding a line plot to a bar graph v1");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

//$graph->xaxis->SetTickLabels($datax);
//$graph->xaxis->SetTextTickInterval(2);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example16.4.html b/html/includes/jpgraph/docs/html/exframes/example16.4.html new file mode 100644 index 0000000000..328f6824e8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example16.4.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_bar.php");

$l1datay = array(11,9,2,4,3,13,17);
$l2datay = array(23,12,5,19,17,10,15);

// Create the graph. 
$graph = new Graph(400,200,"auto");    
$graph->SetScale("intlin");

$graph->img->SetMargin(40,130,20,40);
$graph->SetShadow();

// Create the linear error plot
$l1plot=new LinePlot($l1datay);
$l1plot->SetColor("red");
$l1plot->SetWeight(2);
$l1plot->SetLegend("Prediction");

// Create the bar plot
$bplot = new BarPlot($l2datay);
$bplot->SetFillColor("orange");
$bplot->SetLegend("Result");

// Add the plots to t'he graph
$graph->Add($bplot);
$graph->Add($l1plot);

$graph->title->Set("Adding a line plot to a bar graph v3");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$datax $gDateLocale->GetShortMonth();
$graph->xaxis->SetTickLabels($datax);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example16.6.html b/html/includes/jpgraph/docs/html/exframes/example16.6.html new file mode 100644 index 0000000000..46788dde83 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example16.6.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_scatter.php");
include (
"../jpgraph_line.php");

// Create some "fake" regression data
$datay = array();
$datay2 = array();
$datax = array();
$a=rand(-3,3);
$b=rand(-5,5);
for(
$x=0$x<20; ++$x) {
    
$datay[] = $a*$x $b;
    
$datay2[] = $a*$x $b rand(-30,30);
    
$datax[] = $x;
}
 
// Create the graph
$graph = new Graph(300,200,'auto');
$graph->SetScale("linlin");

// Setup title
$graph->title->Set("Example of linear regression");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// make sure that the X-axis is always at the
// bottom at the plot and not just at Y=0 which is
// the default position
$graph->xaxis->SetPos('min');

// Create the scatter plot with some nice colors
$sp1 = new ScatterPlot($datay2,$datax);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
$sp1->mark->SetFillColor("red");
$sp1->SetColor("blue");
$sp1->SetWeight(3);
$sp1->mark->SetWidth(4);

// Create the regression line
$lplot = new LinePlot($datay);
$lplot->SetWeight(2);
$lplot->SetColor('navy');

// Add the pltos to the line
$graph->Add($sp1);
$graph->Add($lplot);

// ... and stroke
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example16.html b/html/includes/jpgraph/docs/html/exframes/example16.html new file mode 100644 index 0000000000..d40ff74f11 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example16.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_error.php");

$errdatay = array(11,9,2,4,19,26,13,19,7,12);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

$graph->img->SetMargin(40,30,20,40);
$graph->SetShadow();

// Create the linear plot
$errplot=new ErrorLinePlot($errdatay);
$errplot->SetColor("red");
$errplot->SetWeight(2);
$errplot->SetCenter();
$errplot->line->SetWeight(2);
$errplot->line->SetColor("blue");

// Setup the legends
$errplot->SetLegend("Min/Max");
$errplot->line->SetLegend("Average");

// Add the plot to the graph
$graph->Add($errplot);

$graph->title->Set("Linear error plot");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$datax $gDateLocale->GetShortMonth();
$graph->xaxis->SetTickLabels($datax);


// Display the graph
$graph->Stroke();
?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example17.html b/html/includes/jpgraph/docs/html/exframes/example17.html new file mode 100644 index 0000000000..a51dac0ade --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example17.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$datay1 =         array(11,7,5,8,3,5,5,4,8,6,5,5,3,2,5,1,2,0);
$datay2 =     array( 4,5,4,5,6,5,7,4,7,4,4,3,2,4,1,2,2,1);
$datay3 =         array(4,5,7,10,13,15,15,22,26,26,30,34,40,43,47,55,60,62);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->img->SetMargin(40,30,20,40);

// Create the linear plots for each category
$dplot[] = new LinePLot($datay1);
$dplot[] = new LinePLot($datay2);
$dplot[] = new LinePLot($datay3);

$dplot[0]->SetFillColor("red");
$dplot[1]->SetFillColor("blue");
$dplot[2]->SetFillColor("green");

// Create the accumulated graph
$accplot = new AccLinePlot($dplot);

// Add the plot to the graph
$graph->Add($accplot);

$graph->xaxis->SetTextTickInterval(2);
$graph->title->Set("Example 17");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example18.html b/html/includes/jpgraph/docs/html/exframes/example18.html new file mode 100644 index 0000000000..55bb253723 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example18.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);
$graph->Add($bplot);

// Setup the titles
$graph->title->Set("A simple bar graph");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example19.1.html b/html/includes/jpgraph/docs/html/exframes/example19.1.html new file mode 100644 index 0000000000..95e7e98160 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example19.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(260,100,"auto");    
$graph->SetScale("linlin");

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);

// Adjust fill color
$bplot->SetFillColor('orange');
$graph->Add($bplot);

// Setup the titles
$graph->title->Set("Bar graph, linear scale");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example19.html b/html/includes/jpgraph/docs/html/exframes/example19.html new file mode 100644 index 0000000000..92e9a12877 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example19.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);

// Adjust fill color
$bplot->SetFillColor('orange');
$graph->Add($bplot);

// Setup the titles
$graph->title->Set("A simple bar graph");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example2.html b/html/includes/jpgraph/docs/html/exframes/example2.html new file mode 100644 index 0000000000..1ad2af19fc --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,10,5,1,9,13,5,7);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Setup margin and titles
$graph->img->SetMargin(40,20,20,40);
$graph->title->Set("Example 2");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

// Create the linear plot
$lineplot=new LinePlot($ydata);

// Add the plot to the graph
$graph->Add($lineplot);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example20.1.html b/html/includes/jpgraph/docs/html/exframes/example20.1.html new file mode 100644 index 0000000000..4327f7c912 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example20.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);

// Adjust fill color
$bplot->SetFillColor('orange');
$bplot->value->Show();
$graph->Add($bplot);

// Setup the titles
$graph->title->Set("Bar graph");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example20.2.html b/html/includes/jpgraph/docs/html/exframes/example20.2.html new file mode 100644 index 0000000000..ee5734d8ff --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example20.2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");
$graph->yaxis->scale->SetGrace(20);

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);

// Adjust fill color
$bplot->SetFillColor('orange');
$bplot->value->Show();
$graph->Add($bplot);

// Setup the titles
$graph->title->Set("Bar graph with Y-scale grace");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example20.3.html b/html/includes/jpgraph/docs/html/exframes/example20.3.html new file mode 100644 index 0000000000..0422805e7f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example20.3.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");
$graph->yaxis->scale->SetGrace(20);

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);

// Adjust fill color
$bplot->SetFillColor('orange');
$bplot->value->Show();
$bplot->value->SetFont(FF_ARIAL,FS_BOLD,10);
$bplot->value->SetAngle(45);
$bplot->value->SetFormat('%0.1f');
$graph->Add($bplot);

// Setup the titles
$graph->title->Set("Bar graph with Y-scale grace");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example20.4.html b/html/includes/jpgraph/docs/html/exframes/example20.4.html new file mode 100644 index 0000000000..54fcdf30f8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example20.4.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");
$graph->yaxis->scale->SetGrace(20);

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);

// Adjust fill color
$bplot->SetFillColor('orange');
$bplot->SetShadow();
$bplot->value->Show();
$bplot->value->SetFont(FF_ARIAL,FS_BOLD,10);
$bplot->value->SetAngle(45);
$bplot->value->SetFormat('%0.1f');
$graph->Add($bplot);

// Setup the titles
$graph->title->Set("Bar graph with drop shadow");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example20.5.html b/html/includes/jpgraph/docs/html/exframes/example20.5.html new file mode 100644 index 0000000000..8b4d3e4f7f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example20.5.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);

// Adjust fill color
$bplot->SetFillColor('orange');

// Setup values
$bplot->value->Show();
$bplot->value->SetFormat('%d');
$bplot->value->SetFont(FF_FONT1,FS_BOLD);

// Center the values in the bar
$bplot->SetValuePos('center');

// Make the bar a little bit wider
$bplot->SetWidth(0.7);

$graph->Add($bplot);

// Setup the titles
$graph->title->Set("Centered values for bars");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example20.html b/html/includes/jpgraph/docs/html/exframes/example20.html new file mode 100644 index 0000000000..04ca2066d3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example20.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);

// Adjust fill color
$bplot->SetFillColor('orange');
$bplot->SetWidth(1.0);
$graph->Add($bplot);

// Setup the titles
$graph->title->Set("Bar graph");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example21.html b/html/includes/jpgraph/docs/html/exframes/example21.html new file mode 100644 index 0000000000..ba7cb9d63a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example21.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$data1y=array(12,8,19,3,10,5);
$data2y=array(8,2,11,7,14,4);

// Create the graph. These two calls are always required
$graph = new Graph(310,200,"auto");    
$graph->SetScale("textlin");

$graph->SetShadow();
$graph->img->SetMargin(40,30,20,40);

// Create the bar plots
$b1plot = new BarPlot($data1y);
$b1plot->SetFillColor("orange");
$b2plot = new BarPlot($data2y);
$b2plot->SetFillColor("blue");

// Create the grouped bar plot
$gbplot = new GroupBarPlot(array($b1plot,$b2plot));

// ...and add it to the graPH
$graph->Add($gbplot);

$graph->title->Set("Example 21");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example22.html b/html/includes/jpgraph/docs/html/exframes/example22.html new file mode 100644 index 0000000000..e4ea4c39da --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example22.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$data1y=array(12,8,19,3,10,5);
$data2y=array(8,2,11,7,14,4);

// Create the graph. These two calls are always required
$graph = new Graph(310,200,"auto");    
$graph->SetScale("textlin");
$graph->SetShadow();

$graph->img->SetMargin(40,30,20,40);

// Create the bar plots
$b1plot = new BarPlot($data1y);
$b1plot->SetFillColor("orange");
$b2plot = new BarPlot($data2y);
$b2plot->SetFillColor("blue");

// Create the grouped bar plot
$gbplot = new GroupBarPlot(array($b1plot,$b2plot));
$gbplot->SetWidth(0.9);

// ...and add it to the graPH
$graph->Add($gbplot);

$graph->title->Set("Adjusting the width");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example23.html b/html/includes/jpgraph/docs/html/exframes/example23.html new file mode 100644 index 0000000000..9d994bb25b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example23.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

setlocale (LC_ALL'et_EE.ISO-8859-1');

$data1y=array(12,8,19,3,10,5);
$data2y=array(8,2,11,7,14,4);

// Create the graph. These two calls are always required
$graph = new Graph(310,200,"auto");    
$graph->SetScale("textlin");

$graph->SetShadow();
$graph->img->SetMargin(40,30,20,40);

// Create the bar plots
$b1plot = new BarPlot($data1y);
$b1plot->SetFillColor("orange");
$b2plot = new BarPlot($data2y);
$b2plot->SetFillColor("blue");

// Create the grouped bar plot
$gbplot = new AccBarPlot(array($b1plot,$b2plot));

// ...and add it to the graPH
$graph->Add($gbplot);

$graph->title->Set("Accumulated bar plots");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example24.html b/html/includes/jpgraph/docs/html/exframes/example24.html new file mode 100644 index 0000000000..3d38277aae --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example24.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$data1y=array(12,8,19,3,10,5);
$data2y=array(8,2,11,7,14,4);
$data3y=array(3,9,2,7,5,8);
$data4y=array(1,5,11,2,14,4);

// Create the graph. These two calls are always required
$graph = new Graph(310,200,"auto");    
$graph->SetScale("textlin");

$graph->SetShadow();
$graph->img->SetMargin(40,30,20,40);

$b1plot = new BarPlot($data1y);
$b1plot->SetFillColor("orange");
$b2plot = new BarPlot($data2y);
$b2plot->SetFillColor("blue");
$b3plot = new BarPlot($data3y);
$b3plot->SetFillColor("green");
$b4plot = new BarPlot($data4y);
$b4plot->SetFillColor("brown");

// Create the accumulated bar plots
$ab1plot = new AccBarPlot(array($b1plot,$b2plot));
$ab2plot = new AccBarPlot(array($b3plot,$b4plot));

// Create the grouped bar plot
$gbplot = new GroupBarPlot(array($ab1plot,$ab2plot));

// ...and add it to the graph
$graph->Add($gbplot);

$graph->title->Set("Grouped Accumulated bar plots");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example25.1.html b/html/includes/jpgraph/docs/html/exframes/example25.1.html new file mode 100644 index 0000000000..b0500568e9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example25.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);
$graph->Add($bplot);

// Create and add a new text
$txt=new Text("This is a text");
$txt->Pos(10,25);
$txt->SetFont(FF_FONT1,FS_BOLD);
$txt->SetBox('yellow','navy','gray');
$txt->SetColor("red");
$graph->AddText($txt);


// Setup the titles
$graph->title->Set("A simple bar graph");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example25.2.html b/html/includes/jpgraph/docs/html/exframes/example25.2.html new file mode 100644 index 0000000000..dddba05744 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example25.2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);
$graph->Add($bplot);

// Create and add a new text
$txt=new Text("This is a text\nwith many\nand even\nmore\nlines of text");
$txt->Pos(0.5,0.5,"center","center");
$txt->SetFont(FF_FONT2,FS_BOLD);
$txt->ParagraphAlign('cenetered');
$txt->SetBox('yellow','navy','gray');
$txt->SetColor("red");
$graph->AddText($txt);


// Setup the titles
$graph->title->Set("A simple bar graph");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example25.html b/html/includes/jpgraph/docs/html/exframes/example25.html new file mode 100644 index 0000000000..60c012a35c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example25.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,8,19,3,10,5);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($datay);
$graph->Add($bplot);

// Create and add a new text
$txt=new Text("This is a text");
$txt->Pos(0,0);
$txt->SetColor("red");
$graph->AddText($txt);


// Setup the titles
$graph->title->Set("A simple bar graph");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example26.1.html b/html/includes/jpgraph/docs/html/exframes/example26.1.html new file mode 100644 index 0000000000..75e175451b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example26.1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

$data = array(40,60,21,33);

$graph = new PieGraph(300,200,"auto");
$graph->SetShadow();

$graph->title->Set("A simple Pie plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new PiePlot($data);
$p1->SetLegends($gDateLocale->GetShortMonth());
$p1->SetCenter(0.4);

$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example26.html b/html/includes/jpgraph/docs/html/exframes/example26.html new file mode 100644 index 0000000000..970fe5d74c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example26.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

$data = array(40,60,21,33);

$graph = new PieGraph(300,200,"auto");
$graph->SetShadow();

$graph->title->Set("A simple Pie plot");

$p1 = new PiePlot($data);
$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example27.1.html b/html/includes/jpgraph/docs/html/exframes/example27.1.html new file mode 100644 index 0000000000..11b845944b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example27.1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");
include (
"../jpgraph_pie3d.php");

$data = array(40,60,21,33);

$graph = new PieGraph(300,200,"auto");
$graph->SetShadow();

$graph->title->Set("A simple Pie plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new PiePlot3D($data);
$p1->SetAngle(20);
$p1->SetSize(0.5);
$p1->SetCenter(0.45);
$p1->SetLegends($gDateLocale->GetShortMonth());

$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example27.2.html b/html/includes/jpgraph/docs/html/exframes/example27.2.html new file mode 100644 index 0000000000..af0b90a03d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example27.2.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");
include (
"../jpgraph_pie3d.php");

$data = array(40,60,21,33);

$graph = new PieGraph(300,200,"auto");
$graph->SetShadow();

$graph->title->Set("A simple Pie plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new PiePlot($data);
$p1->ExplodeSlice(1);
$p1->SetCenter(0.45);
$p1->SetLegends($gDateLocale->GetShortMonth());

$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example27.3.html b/html/includes/jpgraph/docs/html/exframes/example27.3.html new file mode 100644 index 0000000000..640d8c838d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example27.3.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");
include (
"../jpgraph_pie3d.php");

$data = array(40,60,21,33);

$graph = new PieGraph(330,200,"auto");
$graph->SetShadow();

$graph->title->Set("A simple 3D Pie plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new PiePlot3D($data);
$p1->ExplodeSlice(1);
$p1->SetCenter(0.45);
$p1->SetLegends($gDateLocale->GetShortMonth());

$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example27.html b/html/includes/jpgraph/docs/html/exframes/example27.html new file mode 100644 index 0000000000..1c104dd3a2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example27.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");
include (
"../jpgraph_pie3d.php");

$data = array(40,60,21,33);

$graph = new PieGraph(300,200,"auto");
$graph->SetShadow();

$graph->title->Set("A simple Pie plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new PiePlot3D($data);
$p1->SetSize(0.5);
$p1->SetCenter(0.45);
$p1->SetLegends($gDateLocale->GetShortMonth());

$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example28.1.html b/html/includes/jpgraph/docs/html/exframes/example28.1.html new file mode 100644 index 0000000000..817468bd9c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example28.1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

$data = array(40,60,21,33,12,33);

$graph = new PieGraph(150,150,"auto");
$graph->SetShadow();

$graph->title->Set("'earth' Theme");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new PiePlot($data);
$p1->SetTheme("earth");
$p1->SetCenter(0.5,0.55);
$p1->value->Show(false);
$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example28.2.html b/html/includes/jpgraph/docs/html/exframes/example28.2.html new file mode 100644 index 0000000000..d9dfcd0796 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example28.2.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

$data = array(40,60,21,33,12,33);

$graph = new PieGraph(150,150,"auto");
$graph->SetShadow();

$graph->title->Set("'pastel' Theme");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new PiePlot($data);
$p1->SetTheme("pastel");
$p1->SetCenter(0.5,0.55);
$p1->value->Show(false);
$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example28.3.html b/html/includes/jpgraph/docs/html/exframes/example28.3.html new file mode 100644 index 0000000000..2336fdd0e3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example28.3.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

$data = array(40,60,21,33,12,33);

$graph = new PieGraph(150,150,"auto");
$graph->SetShadow();

$graph->title->Set("'water' Theme");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new PiePlot($data);
$p1->SetTheme("water");
$p1->SetCenter(0.5,0.55);
$p1->value->Show(false);
$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example28.html b/html/includes/jpgraph/docs/html/exframes/example28.html new file mode 100644 index 0000000000..99a896b67a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example28.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

$data = array(40,60,21,33,12,33);

$graph = new PieGraph(150,150,"auto");
$graph->SetShadow();

$graph->title->Set("'sand' Theme");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new PiePlot($data);
$p1->SetTheme("sand");
$p1->SetCenter(0.5,0.55);
$p1->value->Show(false);
$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example3.1.html b/html/includes/jpgraph/docs/html/exframes/example3.1.html new file mode 100644 index 0000000000..6ebe3f2f6f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example3.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->mark->SetType(MARK_UTRIANGLE);

// Add the plot to the graph
$graph->Add($lineplot);

$graph->img->SetMargin(40,20,20,40);
$graph->title->Set("Example 3.1");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);
$graph->yaxis->SetColor("red");
$graph->yaxis->SetWeight(2);
$graph->SetShadow();

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example3.2.1.html b/html/includes/jpgraph/docs/html/exframes/example3.2.1.html new file mode 100644 index 0000000000..f2470da26c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example3.2.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,15,5,7);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");
$graph->yaxis->scale->SetGrace(10,10);

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->mark->SetType(MARK_CIRCLE);

// Add the plot to the graph
$graph->Add($lineplot);

$graph->img->SetMargin(40,20,20,40);
$graph->title->Set("Grace value, version 1");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);
$graph->yaxis->SetWeight(2);
$graph->SetShadow();

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example3.2.2.html b/html/includes/jpgraph/docs/html/exframes/example3.2.2.html new file mode 100644 index 0000000000..27df44ffc5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example3.2.2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,15,5,7);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");
$graph->yaxis->scale->SetGrace(10,10);

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->mark->SetType(MARK_CIRCLE);

// Add the plot to the graph
$graph->Add($lineplot);

$graph->img->SetMargin(40,20,20,40);
$graph->title->Set("Grace value version 2");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->xaxis->SetPos('min');

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);
$graph->yaxis->SetWeight(2);
$graph->SetShadow();

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example3.2.html b/html/includes/jpgraph/docs/html/exframes/example3.2.html new file mode 100644 index 0000000000..65135e3569 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example3.2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,15,5,7);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->mark->SetType(MARK_CIRCLE);

// Add the plot to the graph
$graph->Add($lineplot);

$graph->img->SetMargin(40,20,20,40);
$graph->title->Set("Example 3.2");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);
$graph->yaxis->SetWeight(2);
$graph->SetShadow();

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example3.3.html b/html/includes/jpgraph/docs/html/exframes/example3.3.html new file mode 100644 index 0000000000..2ca495aea8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example3.3.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Adjust the margin
$graph->img->SetMargin(40,20,20,40);
$graph->SetShadow();

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->mark->SetType(MARK_UTRIANGLE);
$lineplot->value->show();

// Add the plot to the graph
$graph->Add($lineplot);

$graph->title->Set("Displaying the values");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);


// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example3.4.html b/html/includes/jpgraph/docs/html/exframes/example3.4.html new file mode 100644 index 0000000000..201a25a15d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example3.4.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Adjust the margin
$graph->img->SetMargin(40,20,20,40);
$graph->SetShadow();

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->mark->SetType(MARK_UTRIANGLE);
$lineplot->value->show();
$lineplot->value->SetColor('darkred');
$lineplot->value->SetFont(FF_FONT1,FS_BOLD);
$lineplot->value->SetFormat('$%0.1f');


// Add the plot to the graph
$graph->Add($lineplot);

$graph->title->Set("Displaying the values");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);


// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example3.html b/html/includes/jpgraph/docs/html/exframes/example3.html new file mode 100644 index 0000000000..7181c569b5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example3.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Create the linear plot
$lineplot=new LinePlot($ydata);


// Add the plot to the graph
$graph->Add($lineplot);

$graph->img->SetMargin(40,20,20,40);
$graph->title->Set("Example 3");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);
$graph->yaxis->SetColor("red");
$graph->yaxis->SetWeight(2);
$graph->SetShadow();

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example4.html b/html/includes/jpgraph/docs/html/exframes/example4.html new file mode 100644 index 0000000000..01f8132097 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example4.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);
$ydata2 = array(1,19,15,7,22,14,5,9,21,13);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->SetScale("textlin");

// Create the linear plot
$lineplot=new LinePlot($ydata);

$lineplot2=new LinePlot($ydata2);

// Add the plot to the graph
$graph->Add($lineplot);
$graph->Add($lineplot2);

$graph->img->SetMargin(40,20,20,40);
$graph->title->Set("Example 4");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);

$lineplot2->SetColor("orange");
$lineplot2->SetWeight(2);

$graph->yaxis->SetColor("red");
$graph->yaxis->SetWeight(2);
$graph->SetShadow();

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example5.1.html b/html/includes/jpgraph/docs/html/exframes/example5.1.html new file mode 100644 index 0000000000..b7870a1106 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example5.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);
$y2data = array(354,200,265,99,111,91,198,225,293,251);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->img->SetMargin(40,40,20,40);
$graph->SetScale("textlin");
$graph->SetY2Scale("lin");
$graph->SetShadow();

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot2=new LinePlot($y2data);

// Add the plot to the graph
$graph->Add($lineplot);
$graph->AddY2($lineplot2);
$lineplot2->SetColor("orange");
$lineplot2->SetWeight(2);
$graph->y2axis->SetColor("orange");

$graph->title->Set("Example 5");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);

$lineplot2->SetColor("orange");
$lineplot2->SetWeight(2);

$graph->yaxis->SetColor("blue");

$lineplot->SetLegend("Plot 1");
$lineplot2->SetLegend("Plot 2");

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example5.html b/html/includes/jpgraph/docs/html/exframes/example5.html new file mode 100644 index 0000000000..ba2c5b7716 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example5.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);
$y2data = array(354,200,265,99,111,91,198,225,293,251);

// Create the graph. These two calls are always required
$graph = new Graph(300,200,"auto");    
$graph->img->SetMargin(40,40,20,40);
$graph->SetScale("textlin");
$graph->SetY2Scale("lin");
$graph->SetShadow();

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot2=new LinePlot($y2data);

// Add the plot to the graph
$graph->Add($lineplot);
$graph->AddY2($lineplot2);
$lineplot2->SetColor("orange");
$lineplot2->SetWeight(2);
$graph->y2axis->SetColor("orange");

$graph->title->Set("Example 5");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);

$lineplot2->SetColor("orange");
$lineplot2->SetWeight(2);

$graph->yaxis->SetColor("blue");

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example6.1.html b/html/includes/jpgraph/docs/html/exframes/example6.1.html new file mode 100644 index 0000000000..d938f8bd5a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example6.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);
$y2data = array(354,200,265,99,111,91,198,225,293,251);

// Create the graph and specify the scale for both Y-axis
$graph = new Graph(300,240,"auto");    
$graph->SetScale("textlin");
$graph->SetY2Scale("lin");
$graph->SetShadow();

// Adjust the margin
$graph->img->SetMargin(40,40,20,70);

// Create the two linear plot
$lineplot=new LinePlot($ydata);
$lineplot2=new LinePlot($y2data);

// Add the plot to the graph
$graph->Add($lineplot);
$graph->AddY2($lineplot2);
$lineplot2->SetColor("orange");
$lineplot2->SetWeight(2);

// Adjust the axis color
$graph->y2axis->SetColor("orange");
$graph->yaxis->SetColor("blue");

$graph->title->Set("Example 6.1");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Set the colors for the plots 
$lineplot->SetColor("blue");
$lineplot->SetWeight(2);
$lineplot2->SetColor("orange");
$lineplot2->SetWeight(2);

// Set the legends for the plots
$lineplot->SetLegend("Plot 1");
$lineplot2->SetLegend("Plot 2");

// Adjust the legend position
$graph->legend->SetLayout(LEGEND_HOR);
$graph->legend->Pos(0.4,0.95,"center","bottom");

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example6.2.html b/html/includes/jpgraph/docs/html/exframes/example6.2.html new file mode 100644 index 0000000000..815201e2c4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example6.2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);
$y2data = array(354,200,265,99,111,91,198,225,293,251);

// Create the graph and specify the scale for both Y-axis
$graph = new Graph(300,240,"auto");    
$graph->SetScale("textlin");
$graph->SetShadow();

// Adjust the margin
$graph->img->SetMargin(40,40,20,70);

// Create the two linear plot
$lineplot=new LinePlot($ydata);
$lineplot->SetStepStyle();

// Adjust the axis color
$graph->yaxis->SetColor("blue");

$graph->title->Set("Example 6.2");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Set the colors for the plots 
$lineplot->SetColor("blue");
$lineplot->SetWeight(2);

// Set the legends for the plots
$lineplot->SetLegend("Plot 1");

// Add the plot to the graph
$graph->Add($lineplot);

// Adjust the legend position
$graph->legend->SetLayout(LEGEND_HOR);
$graph->legend->Pos(0.4,0.95,"center","bottom");

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example6.html b/html/includes/jpgraph/docs/html/exframes/example6.html new file mode 100644 index 0000000000..dd70cd0cf8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example6.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);
$y2data = array(354,200,265,99,111,91,198,225,293,251);

// Create the graph and specify the scale for both Y-axis
$graph = new Graph(400,200,"auto");    
$graph->SetScale("textlin");
$graph->SetY2Scale("lin");
$graph->SetShadow();

// Adjust the margin
$graph->img->SetMargin(40,140,20,40);

// Create the two linear plot
$lineplot=new LinePlot($ydata);
$lineplot2=new LinePlot($y2data);

// Add the plot to the graph
$graph->Add($lineplot);
$graph->AddY2($lineplot2);
$lineplot2->SetColor("orange");
$lineplot2->SetWeight(2);

// Adjust the axis color
$graph->y2axis->SetColor("orange");
$graph->yaxis->SetColor("blue");

$graph->title->Set("Example 6");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Set the colors for the plots 
$lineplot->SetColor("blue");
$lineplot->SetWeight(2);
$lineplot2->SetColor("orange");
$lineplot2->SetWeight(2);

// Set the legends for the plots
$lineplot->SetLegend("Plot 1");
$lineplot2->SetLegend("Plot 2");

// Adjust the legend position
$graph->legend->Pos(0.05,0.5,"right","center");

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example7.html b/html/includes/jpgraph/docs/html/exframes/example7.html new file mode 100644 index 0000000000..37b03bfa23 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example7.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_log.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);
$y2data = array(354,70,265,29,111,91,198,225,593,251);

// Create the graph.
$graph = new Graph(350,200,"auto");    
$graph->SetScale("textlin");
$graph->SetY2Scale("log");
$graph->SetShadow();
$graph->img->SetMargin(40,110,20,40);

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot2=new LinePlot($y2data);

// Add the plot to the graph
$graph->Add($lineplot);
$graph->AddY2($lineplot2);
$graph->yaxis->SetColor('blue');

$graph->title->Set("Example 7");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);
$lineplot2->SetWeight(2);

$lineplot->SetLegend("Plot 1");
$lineplot2->SetLegend("Plot 2");

$graph->legend->Pos(0.05,0.5,"right","center");

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example8.html b/html/includes/jpgraph/docs/html/exframes/example8.html new file mode 100644 index 0000000000..8044f3f50d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example8.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_log.php");
include (
"../jpgraph_line.php");

$ydata = array(11,3,8,12,5,1,9,13,5,7);
$y2data = array(354,200,265,99,111,91,198,225,293,251);

// Create the graph. These two calls are always required
$graph = new Graph(350,200,"auto");    
$graph->SetScale("textlog");
$graph->SetShadow();
$graph->img->SetMargin(40,110,20,40);

// Show the gridlines
$graph->ygrid->Show(true,true);
$graph->xgrid->Show(true,false);

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot2=new LinePlot($y2data);

// Add the plot to the graph
$graph->Add($lineplot);

$graph->title->Set("Example 8");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);

// Adjust the color of the Y axis
$graph->yaxis->SetColor("blue");

// Specifya a legend
$lineplot->SetLegend("Plot 1");

// Adjust the position of the grid box
$graph->legend->Pos(0.05,0.5,"right","center");

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example9.1.html b/html/includes/jpgraph/docs/html/exframes/example9.1.html new file mode 100644 index 0000000000..5b8b7ba61d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example9.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_log.php");
include (
"../jpgraph_line.php");


$ydata = array(11,3,8,42,5,1,9,13,5,7);
$datax = array("Jan","Feb","Mar","Apr","Maj","Jun","Jul","aug","Sep","Oct");

// Create the graph. These two calls are always required
$graph = new Graph(350,200,"auto");
$graph->SetScale("textlog");

$graph->img->SetMargin(40,110,20,40);
$graph->SetShadow();

$graph->ygrid->Show(true,true);
$graph->xgrid->Show(true,false);

// Specify the tick labels
$a $gDateLocale->GetShortMonth();
$graph->xaxis->SetTickLabels($a);
$graph->xaxis->SetTextLabelInterval(2);

// Create the linear plot
$lineplot=new LinePlot($ydata);

// Add the plot to the graph
$graph->Add($lineplot);

$graph->title->Set("Examples 9");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);

$graph->yaxis->SetColor("blue");

$lineplot->SetLegend("Plot 1");

$graph->legend->Pos(0.05,0.5,"right","center");

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example9.2.html b/html/includes/jpgraph/docs/html/exframes/example9.2.html new file mode 100644 index 0000000000..93ba719992 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example9.2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_log.php");
include (
"../jpgraph_line.php");


$ydata = array(11,3,8,42,5,1,9,13,5,7);
$datax = array("Jan","Feb","Mar","Apr","Maj","Jun","Jul","aug","Sep","Oct");

// Create the graph. These two calls are always required
$graph = new Graph(350,200,"auto");
$graph->SetScale("textlog");

$graph->img->SetMargin(40,110,20,50);
$graph->SetShadow();

$graph->ygrid->Show(true,true);
$graph->xgrid->Show(true,false);

// Specify the tick labels
$a $gDateLocale->GetShortMonth();
$graph->xaxis->SetTickLabels($a);
//$graph->xaxis->SetTextLabelInterval(2);
$graph->xaxis->SetLabelAngle(90);


// Create the linear plot
$lineplot=new LinePlot($ydata);

// Add the plot to the graph
$graph->Add($lineplot);

$graph->title->Set("Examples 9");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);

$graph->yaxis->SetColor("blue");

$lineplot->SetLegend("Plot 1");

$graph->legend->Pos(0.05,0.5,"right","center");

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/example9.html b/html/includes/jpgraph/docs/html/exframes/example9.html new file mode 100644 index 0000000000..2f37f1a344 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/example9.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_log.php");
include (
"../jpgraph_line.php");


$ydata = array(11,3,8,42,5,1,9,13,5,7);
$datax = array("Jan","Feb","Mar","Apr","Maj","Jun","Jul","aug","Sep","Oct");

// Create the graph. These two calls are always required
$graph = new Graph(350,200,"auto");
$graph->SetScale("textlog");

$graph->img->SetMargin(40,110,20,40);
$graph->SetShadow();

$graph->ygrid->Show(true,true);
$graph->xgrid->Show(true,false);

// Specify the tick labels
$a $gDateLocale->GetShortMonth();
$graph->xaxis->SetTickLabels($a);

// Create the linear plot
$lineplot=new LinePlot($ydata);

// Add the plot to the graph
$graph->Add($lineplot);

$graph->title->Set("Examples 9");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$lineplot->SetColor("blue");
$lineplot->SetWeight(2);

$graph->yaxis->SetColor("blue");

$lineplot->SetLegend("Plot 1");

$graph->legend->Pos(0.05,0.5,"right","center");

// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/fieldscatterex1.html b/html/includes/jpgraph/docs/html/exframes/fieldscatterex1.html new file mode 100644 index 0000000000..9423d73c19 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/fieldscatterex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_scatter.php");

$polex 6;
$poley 40;

function 
FldCallback($x,$y,$a) {
    GLOBAL 
$polex$poley;
    
$maxr 3000;

    
// Size and arrow size is constant
    
$size="";
    
$arrowsize="";

    
// Since we have different scales we need the data points
    // to be of the same magnitude to give it a distance
    // interpretation.
    
$x *= 10

    
// Colors gets colder the further out we go from the center
    
$r = ($x-$polex*10)*($x-$polex*10)+($y-$poley)*($y-$poley);
    
$f $r/$maxr;
    if( 
$f $f=1;
    
$red floor((1-$f)*255);
    
$blue floor($f*255);
    
$color = array($red,0,$blue);
    
//echo "x=$x, y=$y, blue=$blue, red=$red<br>";
    
return array($color,$size,$arrowsize);
}

// Create data for a simulated pseudo-magnetic radient field
$datax = array();
$datay = array();
$angle = array();
for(
$x=1$x 10; ++$x ) {
    for(
$y=10$y<100$y += 10) {
    
$a = -1;
    if( 
$x==$polex && $y==$poley ) continue;
    if( 
$x==$polex ) {
        if( 
$y $poley $a=90;
        else 
$a 270;
    }
    if( 
$y==$poley ) {
        if( 
$x  $polex $a=0;
        else  
$a=180;        
    }
    if( 
$a == -) {
        
$d1 $y-$poley;
        
$d2 = ($polex-$x)*20;
        if( 
$y $poley $d2 *= -1;
        
$h sqrt($d1*$d1+$d2*$d2);
        
$t = -$d2/$h;
        
$ac acos($t);
        if( 
$y $poley $ac += M_PI;
        
$a $ac 180/M_PI;
    }
    
$datax[] = $x;
    
$datay[] = $y;
    
$angle[] = $a;
    }
}

// Setup the graph
$graph = new Graph(300,200);
$graph->SetScale("intlin",0,100,0,10);
$graph->SetMarginColor('lightblue');


// ..and titles
$graph->title->Set("Field plot");

// Setup the field plot
$fp = new FieldPlot($datay,$datax,$angle);

// Setup formatting callback
$fp->SetCallback('FldCallback');

// First size argument is length (in pixels of arrow) 
// Second size argument is roughly size of arrow. Arrow size is specified as
// an integer in the range [0,9]
$fp->arrow->SetSize(20,2);
$fp->arrow->SetColor('navy');

$graph->Add($fp);

// .. and output
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/filledgridex1.html b/html/includes/jpgraph/docs/html/exframes/filledgridex1.html new file mode 100644 index 0000000000..7593aecfa3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/filledgridex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$datay1 = array(20,15,23,15);
$datay2 = array(12,9,42,8);
$datay3 = array(5,17,32,24);

// Setup the graph
$graph = new Graph(300,200);
$graph->SetMarginColor('white');
$graph->SetScale("textlin");
$graph->SetFrame(false);
$graph->SetMargin(30,50,30,30);

$graph->title->Set('Filled Y-grid');


$graph->yaxis->HideZeroLabel();
$graph->ygrid->SetFill(true,'#EFEFEF@0.5','#BBCCFF@0.5');
$graph->xgrid->Show();

$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());

// Create the first line
$p1 = new LinePlot($datay1);
$p1->SetColor("navy");
$p1->SetLegend('Line 1');
$graph->Add($p1);

// Create the second line
$p2 = new LinePlot($datay2);
$p2->SetColor("red");
$p2->SetLegend('Line 2');
$graph->Add($p2);

// Create the third line
$p3 = new LinePlot($datay3);
$p3->SetColor("orange");
$p3->SetLegend('Line 3');
$graph->Add($p3);

$graph->legend->SetShadow('gray@0.4',5);
$graph->legend->SetPos(0.1,0.1,'right','top');
// Output line
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/filledlineex01.1.html b/html/includes/jpgraph/docs/html/exframes/filledlineex01.1.html new file mode 100644 index 0000000000..36e74c366a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/filledlineex01.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$datay = array(1.23,1.9,1.6,3.1,3.4,2.8,2.1,1.9);
$graph = new Graph(300,200,"auto");
$graph->SetScale("textlin");

$graph->img->SetMargin(40,40,40,40);    
$graph->SetShadow();
$graph->SetGridDepth(DEPTH_FRONT);

$graph->title->Set("Example of filled line plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new LinePlot($datay);
$p1->SetFillColor("orange");
$p1->mark->SetType(MARK_FILLEDCIRCLE);
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);
$graph->Add($p1);

$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/filledlineex01.html b/html/includes/jpgraph/docs/html/exframes/filledlineex01.html new file mode 100644 index 0000000000..8a34a141a4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/filledlineex01.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$datay = array(1.23,1.9,1.6,3.1,3.4,2.8,2.1,1.9);
$graph = new Graph(300,200,"auto");
$graph->SetScale("textlin");

$graph->img->SetMargin(40,40,40,40);    
$graph->SetShadow();

$graph->title->Set("Example of filled line plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$p1 = new LinePlot($datay);
$p1->SetFillColor("orange");
$p1->mark->SetType(MARK_FILLEDCIRCLE);
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);
$graph->Add($p1);

$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/frame_JpGraph_Logo.html b/html/includes/jpgraph/docs/html/exframes/frame_JpGraph_Logo.html new file mode 100644 index 0000000000..67fed7d83f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_JpGraph_Logo.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_alphabarex1.html b/html/includes/jpgraph/docs/html/exframes/frame_alphabarex1.html new file mode 100644 index 0000000000..563c33b800 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_alphabarex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_antispamex01.html b/html/includes/jpgraph/docs/html/exframes/frame_antispamex01.html new file mode 100644 index 0000000000..70fd15d12f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_antispamex01.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_backgroundex03.html b/html/includes/jpgraph/docs/html/exframes/frame_backgroundex03.html new file mode 100644 index 0000000000..06dd7bf9d0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_backgroundex03.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_balloonex1.html b/html/includes/jpgraph/docs/html/exframes/frame_balloonex1.html new file mode 100644 index 0000000000..2fe4c2ba60 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_balloonex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bar_csimex1.html b/html/includes/jpgraph/docs/html/exframes/frame_bar_csimex1.html new file mode 100644 index 0000000000..7fcae39178 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bar_csimex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bar_csimex2.html b/html/includes/jpgraph/docs/html/exframes/frame_bar_csimex2.html new file mode 100644 index 0000000000..2d0a0729e1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bar_csimex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bar_csimex3.html b/html/includes/jpgraph/docs/html/exframes/frame_bar_csimex3.html new file mode 100644 index 0000000000..35ffcdc1c2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bar_csimex3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex1.html b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex1.html new file mode 100644 index 0000000000..4c4e9d10bb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex2.html b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex2.html new file mode 100644 index 0000000000..23249a0823 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex3.html b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex3.html new file mode 100644 index 0000000000..b95ce73dd3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex4.html b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex4.html new file mode 100644 index 0000000000..9bea58376f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex5.html b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex5.html new file mode 100644 index 0000000000..20d6c4b1b9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex5.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex6.html b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex6.html new file mode 100644 index 0000000000..ee84e6c67f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex6.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex7.html b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex7.html new file mode 100644 index 0000000000..e12702928f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex7.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex8.html b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex8.html new file mode 100644 index 0000000000..3e3ede43e4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bargradsmallex8.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_barline_csimex1.html b/html/includes/jpgraph/docs/html/exframes/frame_barline_csimex1.html new file mode 100644 index 0000000000..74eea8fe27 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_barline_csimex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_barlinefreq_csimex1.html b/html/includes/jpgraph/docs/html/exframes/frame_barlinefreq_csimex1.html new file mode 100644 index 0000000000..69ba2519c4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_barlinefreq_csimex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bartutex1.html b/html/includes/jpgraph/docs/html/exframes/frame_bartutex1.html new file mode 100644 index 0000000000..56abe05bea --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bartutex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bartutex2.html b/html/includes/jpgraph/docs/html/exframes/frame_bartutex2.html new file mode 100644 index 0000000000..571458ca60 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bartutex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bartutex3.html b/html/includes/jpgraph/docs/html/exframes/frame_bartutex3.html new file mode 100644 index 0000000000..98519035d1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bartutex3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bartutex4.html b/html/includes/jpgraph/docs/html/exframes/frame_bartutex4.html new file mode 100644 index 0000000000..8ef111e28f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bartutex4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bartutex5.html b/html/includes/jpgraph/docs/html/exframes/frame_bartutex5.html new file mode 100644 index 0000000000..852456722c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bartutex5.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_bartutex6.html b/html/includes/jpgraph/docs/html/exframes/frame_bartutex6.html new file mode 100644 index 0000000000..8e4043f883 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_bartutex6.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_boxstockcsimex1.html b/html/includes/jpgraph/docs/html/exframes/frame_boxstockcsimex1.html new file mode 100644 index 0000000000..d694139b33 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_boxstockcsimex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_boxstockex1.html b/html/includes/jpgraph/docs/html/exframes/frame_boxstockex1.html new file mode 100644 index 0000000000..462394a334 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_boxstockex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_builtinplotmarksex1.html b/html/includes/jpgraph/docs/html/exframes/frame_builtinplotmarksex1.html new file mode 100644 index 0000000000..c7fb3bfbbf --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_builtinplotmarksex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_canvas_jpgarchex.html b/html/includes/jpgraph/docs/html/exframes/frame_canvas_jpgarchex.html new file mode 100644 index 0000000000..38fec349f5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_canvas_jpgarchex.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_canvasex01.html b/html/includes/jpgraph/docs/html/exframes/frame_canvasex01.html new file mode 100644 index 0000000000..1dfdf91ee6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_canvasex01.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_canvasex02.html b/html/includes/jpgraph/docs/html/exframes/frame_canvasex02.html new file mode 100644 index 0000000000..6a3c352e74 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_canvasex02.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_canvasex03.html b/html/includes/jpgraph/docs/html/exframes/frame_canvasex03.html new file mode 100644 index 0000000000..ef2a6eb37c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_canvasex03.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_canvasex04.html b/html/includes/jpgraph/docs/html/exframes/frame_canvasex04.html new file mode 100644 index 0000000000..1dace9dfcb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_canvasex04.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_canvasex05.html b/html/includes/jpgraph/docs/html/exframes/frame_canvasex05.html new file mode 100644 index 0000000000..8fe74d93f1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_canvasex05.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_canvasex06.html b/html/includes/jpgraph/docs/html/exframes/frame_canvasex06.html new file mode 100644 index 0000000000..9f6907f959 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_canvasex06.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_color_chart01.html b/html/includes/jpgraph/docs/html/exframes/frame_color_chart01.html new file mode 100644 index 0000000000..a0f63aad8b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_color_chart01.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_color_chart02.html b/html/includes/jpgraph/docs/html/exframes/frame_color_chart02.html new file mode 100644 index 0000000000..fbd949eed3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_color_chart02.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_color_chart03.html b/html/includes/jpgraph/docs/html/exframes/frame_color_chart03.html new file mode 100644 index 0000000000..9e96fa1fee --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_color_chart03.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_color_chart04.html b/html/includes/jpgraph/docs/html/exframes/frame_color_chart04.html new file mode 100644 index 0000000000..a5d213ce4b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_color_chart04.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_dateaxisex1.html b/html/includes/jpgraph/docs/html/exframes/frame_dateaxisex1.html new file mode 100644 index 0000000000..a37fef38ee --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_dateaxisex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_dateaxisex2.html b/html/includes/jpgraph/docs/html/exframes/frame_dateaxisex2.html new file mode 100644 index 0000000000..bb62ee68ce --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_dateaxisex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_dateaxisex4.html b/html/includes/jpgraph/docs/html/exframes/frame_dateaxisex4.html new file mode 100644 index 0000000000..6979d9a293 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_dateaxisex4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_dbschemaex1.html b/html/includes/jpgraph/docs/html/exframes/frame_dbschemaex1.html new file mode 100644 index 0000000000..e80b159989 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_dbschemaex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example0.html b/html/includes/jpgraph/docs/html/exframes/frame_example0.html new file mode 100644 index 0000000000..0d3f85a15d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example0.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example11.html b/html/includes/jpgraph/docs/html/exframes/frame_example11.html new file mode 100644 index 0000000000..30ec8df07b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example11.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example13.html b/html/includes/jpgraph/docs/html/exframes/frame_example13.html new file mode 100644 index 0000000000..1220360d4a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example13.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example14.html b/html/includes/jpgraph/docs/html/exframes/frame_example14.html new file mode 100644 index 0000000000..963ce05ed8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example14.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example15.html b/html/includes/jpgraph/docs/html/exframes/frame_example15.html new file mode 100644 index 0000000000..e28993f768 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example15.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example16.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example16.1.html new file mode 100644 index 0000000000..09803aac8f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example16.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example16.2.html b/html/includes/jpgraph/docs/html/exframes/frame_example16.2.html new file mode 100644 index 0000000000..16cfa4eeab --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example16.2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example16.3.html b/html/includes/jpgraph/docs/html/exframes/frame_example16.3.html new file mode 100644 index 0000000000..617e279ca8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example16.3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example16.4.html b/html/includes/jpgraph/docs/html/exframes/frame_example16.4.html new file mode 100644 index 0000000000..3439ece37c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example16.4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example16.6.html b/html/includes/jpgraph/docs/html/exframes/frame_example16.6.html new file mode 100644 index 0000000000..88e5b7e0b8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example16.6.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example16.html b/html/includes/jpgraph/docs/html/exframes/frame_example16.html new file mode 100644 index 0000000000..8a14f18e7f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example16.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example17.html b/html/includes/jpgraph/docs/html/exframes/frame_example17.html new file mode 100644 index 0000000000..6fd3e53fcd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example17.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example18.html b/html/includes/jpgraph/docs/html/exframes/frame_example18.html new file mode 100644 index 0000000000..4b403a8021 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example18.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example19.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example19.1.html new file mode 100644 index 0000000000..f48c308ddd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example19.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example19.html b/html/includes/jpgraph/docs/html/exframes/frame_example19.html new file mode 100644 index 0000000000..f557dacbb5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example19.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example2.html b/html/includes/jpgraph/docs/html/exframes/frame_example2.html new file mode 100644 index 0000000000..0458bf7418 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example20.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example20.1.html new file mode 100644 index 0000000000..e329ba9925 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example20.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example20.2.html b/html/includes/jpgraph/docs/html/exframes/frame_example20.2.html new file mode 100644 index 0000000000..ec4aace674 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example20.2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example20.3.html b/html/includes/jpgraph/docs/html/exframes/frame_example20.3.html new file mode 100644 index 0000000000..549112ee4d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example20.3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example20.4.html b/html/includes/jpgraph/docs/html/exframes/frame_example20.4.html new file mode 100644 index 0000000000..62ab1d0995 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example20.4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example20.5.html b/html/includes/jpgraph/docs/html/exframes/frame_example20.5.html new file mode 100644 index 0000000000..d3b4b4c5d3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example20.5.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example20.html b/html/includes/jpgraph/docs/html/exframes/frame_example20.html new file mode 100644 index 0000000000..876d2d3acb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example20.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example21.html b/html/includes/jpgraph/docs/html/exframes/frame_example21.html new file mode 100644 index 0000000000..2565318178 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example21.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example22.html b/html/includes/jpgraph/docs/html/exframes/frame_example22.html new file mode 100644 index 0000000000..dfd3543a54 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example22.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example23.html b/html/includes/jpgraph/docs/html/exframes/frame_example23.html new file mode 100644 index 0000000000..ad09befe93 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example23.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example24.html b/html/includes/jpgraph/docs/html/exframes/frame_example24.html new file mode 100644 index 0000000000..416c01e5f3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example24.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example25.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example25.1.html new file mode 100644 index 0000000000..5daeabba78 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example25.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example25.2.html b/html/includes/jpgraph/docs/html/exframes/frame_example25.2.html new file mode 100644 index 0000000000..f33e1fd35f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example25.2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example25.html b/html/includes/jpgraph/docs/html/exframes/frame_example25.html new file mode 100644 index 0000000000..2b0a6fad6e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example25.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example26.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example26.1.html new file mode 100644 index 0000000000..00e90f1bdc --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example26.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example26.html b/html/includes/jpgraph/docs/html/exframes/frame_example26.html new file mode 100644 index 0000000000..fe3768bd7b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example26.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example27.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example27.1.html new file mode 100644 index 0000000000..618c4dc796 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example27.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example27.2.html b/html/includes/jpgraph/docs/html/exframes/frame_example27.2.html new file mode 100644 index 0000000000..b5afc73d2a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example27.2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example27.3.html b/html/includes/jpgraph/docs/html/exframes/frame_example27.3.html new file mode 100644 index 0000000000..ca939bbc60 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example27.3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example27.html b/html/includes/jpgraph/docs/html/exframes/frame_example27.html new file mode 100644 index 0000000000..ff1c0425d3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example27.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example28.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example28.1.html new file mode 100644 index 0000000000..84ccf0e4ce --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example28.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example28.2.html b/html/includes/jpgraph/docs/html/exframes/frame_example28.2.html new file mode 100644 index 0000000000..11a09cf43a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example28.2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example28.3.html b/html/includes/jpgraph/docs/html/exframes/frame_example28.3.html new file mode 100644 index 0000000000..2261445d7b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example28.3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example28.html b/html/includes/jpgraph/docs/html/exframes/frame_example28.html new file mode 100644 index 0000000000..ae7a9b6419 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example28.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example3.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example3.1.html new file mode 100644 index 0000000000..5147abf643 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example3.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example3.2.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example3.2.1.html new file mode 100644 index 0000000000..631e195533 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example3.2.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example3.2.2.html b/html/includes/jpgraph/docs/html/exframes/frame_example3.2.2.html new file mode 100644 index 0000000000..cc8e12ab7d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example3.2.2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example3.2.html b/html/includes/jpgraph/docs/html/exframes/frame_example3.2.html new file mode 100644 index 0000000000..d9e43085c7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example3.2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example3.3.html b/html/includes/jpgraph/docs/html/exframes/frame_example3.3.html new file mode 100644 index 0000000000..e82bb3e594 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example3.3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example3.4.html b/html/includes/jpgraph/docs/html/exframes/frame_example3.4.html new file mode 100644 index 0000000000..c5f4f94f83 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example3.4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example3.html b/html/includes/jpgraph/docs/html/exframes/frame_example3.html new file mode 100644 index 0000000000..db8e0aad75 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example4.html b/html/includes/jpgraph/docs/html/exframes/frame_example4.html new file mode 100644 index 0000000000..957b2f93ab --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example5.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example5.1.html new file mode 100644 index 0000000000..f8f84c7218 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example5.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example5.html b/html/includes/jpgraph/docs/html/exframes/frame_example5.html new file mode 100644 index 0000000000..005a3dcaff --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example5.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example6.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example6.1.html new file mode 100644 index 0000000000..869dfd8526 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example6.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example6.2.html b/html/includes/jpgraph/docs/html/exframes/frame_example6.2.html new file mode 100644 index 0000000000..b7dc04cc7b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example6.2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example6.html b/html/includes/jpgraph/docs/html/exframes/frame_example6.html new file mode 100644 index 0000000000..3b3e81e7a3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example6.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example7.html b/html/includes/jpgraph/docs/html/exframes/frame_example7.html new file mode 100644 index 0000000000..8c9386a374 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example7.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example8.html b/html/includes/jpgraph/docs/html/exframes/frame_example8.html new file mode 100644 index 0000000000..24e2c4b1e9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example8.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example9.1.html b/html/includes/jpgraph/docs/html/exframes/frame_example9.1.html new file mode 100644 index 0000000000..a53e429681 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example9.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example9.2.html b/html/includes/jpgraph/docs/html/exframes/frame_example9.2.html new file mode 100644 index 0000000000..af370353f5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example9.2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_example9.html b/html/includes/jpgraph/docs/html/exframes/frame_example9.html new file mode 100644 index 0000000000..a7d1f1d345 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_example9.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_fieldscatterex1.html b/html/includes/jpgraph/docs/html/exframes/frame_fieldscatterex1.html new file mode 100644 index 0000000000..79deb202a8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_fieldscatterex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_filledgridex1.html b/html/includes/jpgraph/docs/html/exframes/frame_filledgridex1.html new file mode 100644 index 0000000000..d30041d291 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_filledgridex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_filledlineex01.1.html b/html/includes/jpgraph/docs/html/exframes/frame_filledlineex01.1.html new file mode 100644 index 0000000000..d73bac129a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_filledlineex01.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_filledlineex01.html b/html/includes/jpgraph/docs/html/exframes/frame_filledlineex01.html new file mode 100644 index 0000000000..341beca9e2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_filledlineex01.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_funcex1.html b/html/includes/jpgraph/docs/html/exframes/frame_funcex1.html new file mode 100644 index 0000000000..664937fc1e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_funcex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttconstrainex0.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttconstrainex0.html new file mode 100644 index 0000000000..04c8fa503b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttconstrainex0.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttconstrainex1.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttconstrainex1.html new file mode 100644 index 0000000000..41b2d03a84 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttconstrainex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttcsimex01.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttcsimex01.html new file mode 100644 index 0000000000..909ec9c685 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttcsimex01.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttcsimex02.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttcsimex02.html new file mode 100644 index 0000000000..ebcb1fab7c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttcsimex02.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex00.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex00.html new file mode 100644 index 0000000000..1ca1d229b6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex00.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex01.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex01.html new file mode 100644 index 0000000000..64c08f449f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex01.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex02.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex02.html new file mode 100644 index 0000000000..dcab4b9483 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex02.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex03.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex03.html new file mode 100644 index 0000000000..83f3678b47 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex03.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex04.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex04.html new file mode 100644 index 0000000000..99095ab5e5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex04.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex05.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex05.html new file mode 100644 index 0000000000..75d410d9f6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex05.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex06.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex06.html new file mode 100644 index 0000000000..b79cf846ef --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex06.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex07.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex07.html new file mode 100644 index 0000000000..cc6c9cbc27 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex07.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex08.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex08.html new file mode 100644 index 0000000000..e436f258dd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex08.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex09.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex09.html new file mode 100644 index 0000000000..9822733d95 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex09.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex10.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex10.html new file mode 100644 index 0000000000..ef42a6bc69 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex10.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex11.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex11.html new file mode 100644 index 0000000000..a664ac1500 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex11.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex12.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex12.html new file mode 100644 index 0000000000..eca0254bba --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex12.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex13.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex13.html new file mode 100644 index 0000000000..6dbe44e93f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex13.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex14.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex14.html new file mode 100644 index 0000000000..cb7a13eb51 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex14.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex15.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex15.html new file mode 100644 index 0000000000..397458f30a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex15.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex16.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex16.html new file mode 100644 index 0000000000..4323183401 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex16.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex17.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex17.html new file mode 100644 index 0000000000..721c3cffe0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex17.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex18.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex18.html new file mode 100644 index 0000000000..836e9a7009 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex18.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttex19.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttex19.html new file mode 100644 index 0000000000..30d4c9c5dd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttex19.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_gantthgridex1.html b/html/includes/jpgraph/docs/html/exframes/frame_gantthgridex1.html new file mode 100644 index 0000000000..2c018f2410 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_gantthgridex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_gantthourex1.html b/html/includes/jpgraph/docs/html/exframes/frame_gantthourex1.html new file mode 100644 index 0000000000..ef3e629471 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_gantthourex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_gantthourminex1.html b/html/includes/jpgraph/docs/html/exframes/frame_gantthourminex1.html new file mode 100644 index 0000000000..0056101962 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_gantthourminex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_gantticonex1.html b/html/includes/jpgraph/docs/html/exframes/frame_gantticonex1.html new file mode 100644 index 0000000000..6a3cd53878 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_gantticonex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_ganttsimpleex1.html b/html/includes/jpgraph/docs/html/exframes/frame_ganttsimpleex1.html new file mode 100644 index 0000000000..806eb1764f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_ganttsimpleex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_gradbkgex1.html b/html/includes/jpgraph/docs/html/exframes/frame_gradbkgex1.html new file mode 100644 index 0000000000..090086a2f3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_gradbkgex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_horizbarex1.html b/html/includes/jpgraph/docs/html/exframes/frame_horizbarex1.html new file mode 100644 index 0000000000..bb5f1d5c8f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_horizbarex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_horizbarex2.html b/html/includes/jpgraph/docs/html/exframes/frame_horizbarex2.html new file mode 100644 index 0000000000..86ffc10621 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_horizbarex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_horizbarex3.html b/html/includes/jpgraph/docs/html/exframes/frame_horizbarex3.html new file mode 100644 index 0000000000..b4b863285d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_horizbarex3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_horizbarex4.html b/html/includes/jpgraph/docs/html/exframes/frame_horizbarex4.html new file mode 100644 index 0000000000..378ffcda7f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_horizbarex4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_imgmarkercsimex1.html b/html/includes/jpgraph/docs/html/exframes/frame_imgmarkercsimex1.html new file mode 100644 index 0000000000..90c6aa866d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_imgmarkercsimex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_imgmarkerex1.html b/html/includes/jpgraph/docs/html/exframes/frame_imgmarkerex1.html new file mode 100644 index 0000000000..e40c12410c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_imgmarkerex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_impulsex1.html b/html/includes/jpgraph/docs/html/exframes/frame_impulsex1.html new file mode 100644 index 0000000000..33c1f61b48 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_impulsex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_impulsex2.html b/html/includes/jpgraph/docs/html/exframes/frame_impulsex2.html new file mode 100644 index 0000000000..b793c401d3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_impulsex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_impulsex3.html b/html/includes/jpgraph/docs/html/exframes/frame_impulsex3.html new file mode 100644 index 0000000000..42f2e07470 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_impulsex3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_impulsex4.html b/html/includes/jpgraph/docs/html/exframes/frame_impulsex4.html new file mode 100644 index 0000000000..7cd309960f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_impulsex4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_inyaxisex2.html b/html/includes/jpgraph/docs/html/exframes/frame_inyaxisex2.html new file mode 100644 index 0000000000..8c97db8169 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_inyaxisex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_linebarcentex1.html b/html/includes/jpgraph/docs/html/exframes/frame_linebarcentex1.html new file mode 100644 index 0000000000..89d2c6d34a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_linebarcentex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_lineiconex1.html b/html/includes/jpgraph/docs/html/exframes/frame_lineiconex1.html new file mode 100644 index 0000000000..d85bbfcafd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_lineiconex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_lineiconex2.html b/html/includes/jpgraph/docs/html/exframes/frame_lineiconex2.html new file mode 100644 index 0000000000..fb43638751 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_lineiconex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_listfontsex1.html b/html/includes/jpgraph/docs/html/exframes/frame_listfontsex1.html new file mode 100644 index 0000000000..7f3e433db6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_listfontsex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_logbarex1.html b/html/includes/jpgraph/docs/html/exframes/frame_logbarex1.html new file mode 100644 index 0000000000..6ac15fa474 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_logbarex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_loglogex1.html b/html/includes/jpgraph/docs/html/exframes/frame_loglogex1.html new file mode 100644 index 0000000000..bb11d8faf7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_loglogex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_manscaleex1.html b/html/includes/jpgraph/docs/html/exframes/frame_manscaleex1.html new file mode 100644 index 0000000000..e81452cf25 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_manscaleex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_manscaleex2.html b/html/includes/jpgraph/docs/html/exframes/frame_manscaleex2.html new file mode 100644 index 0000000000..6599470afd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_manscaleex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_manscaleex3.html b/html/includes/jpgraph/docs/html/exframes/frame_manscaleex3.html new file mode 100644 index 0000000000..7d9201f6b3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_manscaleex3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_manscaleex4.html b/html/includes/jpgraph/docs/html/exframes/frame_manscaleex4.html new file mode 100644 index 0000000000..1d1f172a3d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_manscaleex4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_markflagex1.html b/html/includes/jpgraph/docs/html/exframes/frame_markflagex1.html new file mode 100644 index 0000000000..b4d3f9b039 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_markflagex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_nullvalueex01.html b/html/includes/jpgraph/docs/html/exframes/frame_nullvalueex01.html new file mode 100644 index 0000000000..86f2799d8f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_nullvalueex01.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_partiallyfilledlineex1.html b/html/includes/jpgraph/docs/html/exframes/frame_partiallyfilledlineex1.html new file mode 100644 index 0000000000..0bc03485e3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_partiallyfilledlineex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_penguin.html b/html/includes/jpgraph/docs/html/exframes/frame_penguin.html new file mode 100644 index 0000000000..37b4a2e8d0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_penguin.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_pie3d_csimex1.html b/html/includes/jpgraph/docs/html/exframes/frame_pie3d_csimex1.html new file mode 100644 index 0000000000..3fd827bf31 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_pie3d_csimex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_pie_csimex1.html b/html/includes/jpgraph/docs/html/exframes/frame_pie_csimex1.html new file mode 100644 index 0000000000..c99e507493 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_pie_csimex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_piec_csimex1.html b/html/includes/jpgraph/docs/html/exframes/frame_piec_csimex1.html new file mode 100644 index 0000000000..e0146d0e21 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_piec_csimex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_piecex1.html b/html/includes/jpgraph/docs/html/exframes/frame_piecex1.html new file mode 100644 index 0000000000..20455c5894 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_piecex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_piecex2.html b/html/includes/jpgraph/docs/html/exframes/frame_piecex2.html new file mode 100644 index 0000000000..552e805962 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_piecex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_pieex3.html b/html/includes/jpgraph/docs/html/exframes/frame_pieex3.html new file mode 100644 index 0000000000..210f1978eb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_pieex3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_pieex8.html b/html/includes/jpgraph/docs/html/exframes/frame_pieex8.html new file mode 100644 index 0000000000..cb498764f2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_pieex8.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_pieex9.html b/html/includes/jpgraph/docs/html/exframes/frame_pieex9.html new file mode 100644 index 0000000000..4f36ec2fb2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_pieex9.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_pielabelsex1.html b/html/includes/jpgraph/docs/html/exframes/frame_pielabelsex1.html new file mode 100644 index 0000000000..c53fa0d638 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_pielabelsex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_pielabelsex2.html b/html/includes/jpgraph/docs/html/exframes/frame_pielabelsex2.html new file mode 100644 index 0000000000..85e4798d30 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_pielabelsex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_pielabelsex4.html b/html/includes/jpgraph/docs/html/exframes/frame_pielabelsex4.html new file mode 100644 index 0000000000..1a333bec57 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_pielabelsex4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_polarex0-180.html b/html/includes/jpgraph/docs/html/exframes/frame_polarex0-180.html new file mode 100644 index 0000000000..22873387b8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_polarex0-180.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_polarex0.html b/html/includes/jpgraph/docs/html/exframes/frame_polarex0.html new file mode 100644 index 0000000000..fbad3b63ae --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_polarex0.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_polarex3-lin.html b/html/includes/jpgraph/docs/html/exframes/frame_polarex3-lin.html new file mode 100644 index 0000000000..90a96c2133 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_polarex3-lin.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_polarex3.html b/html/includes/jpgraph/docs/html/exframes/frame_polarex3.html new file mode 100644 index 0000000000..e1f2b58f4a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_polarex3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_polarex4.html b/html/includes/jpgraph/docs/html/exframes/frame_polarex4.html new file mode 100644 index 0000000000..330de97c7e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_polarex4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_polarex5.html b/html/includes/jpgraph/docs/html/exframes/frame_polarex5.html new file mode 100644 index 0000000000..8a9ced1d3d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_polarex5.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_polarex7-2.html b/html/includes/jpgraph/docs/html/exframes/frame_polarex7-2.html new file mode 100644 index 0000000000..5b28aa8ca7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_polarex7-2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_polarex9.html b/html/includes/jpgraph/docs/html/exframes/frame_polarex9.html new file mode 100644 index 0000000000..19a7806637 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_polarex9.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_radarex1.html b/html/includes/jpgraph/docs/html/exframes/frame_radarex1.html new file mode 100644 index 0000000000..1f2f0036a3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_radarex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_radarex2.html b/html/includes/jpgraph/docs/html/exframes/frame_radarex2.html new file mode 100644 index 0000000000..45677514ea --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_radarex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_radarex4.html b/html/includes/jpgraph/docs/html/exframes/frame_radarex4.html new file mode 100644 index 0000000000..5173d860d0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_radarex4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_radarex6.1.html b/html/includes/jpgraph/docs/html/exframes/frame_radarex6.1.html new file mode 100644 index 0000000000..eb02e8cdbf --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_radarex6.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_radarex6.html b/html/includes/jpgraph/docs/html/exframes/frame_radarex6.html new file mode 100644 index 0000000000..4ed273f732 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_radarex6.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_radarex7.html b/html/includes/jpgraph/docs/html/exframes/frame_radarex7.html new file mode 100644 index 0000000000..614a75a631 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_radarex7.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_radarex8.1.html b/html/includes/jpgraph/docs/html/exframes/frame_radarex8.1.html new file mode 100644 index 0000000000..460c64bc1a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_radarex8.1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_radarex8.html b/html/includes/jpgraph/docs/html/exframes/frame_radarex8.html new file mode 100644 index 0000000000..20fcb20b31 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_radarex8.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_radarmarkex1.html b/html/includes/jpgraph/docs/html/exframes/frame_radarmarkex1.html new file mode 100644 index 0000000000..0aa3379b44 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_radarmarkex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_rotex0.html b/html/includes/jpgraph/docs/html/exframes/frame_rotex0.html new file mode 100644 index 0000000000..1940cf6817 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_rotex0.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_rotex1.html b/html/includes/jpgraph/docs/html/exframes/frame_rotex1.html new file mode 100644 index 0000000000..8d41a95a16 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_rotex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_rotex2.html b/html/includes/jpgraph/docs/html/exframes/frame_rotex2.html new file mode 100644 index 0000000000..5dec757628 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_rotex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_rotex3.html b/html/includes/jpgraph/docs/html/exframes/frame_rotex3.html new file mode 100644 index 0000000000..fc52b81652 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_rotex3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_rotex4.html b/html/includes/jpgraph/docs/html/exframes/frame_rotex4.html new file mode 100644 index 0000000000..a1d9c9bc35 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_rotex4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_rotex5.html b/html/includes/jpgraph/docs/html/exframes/frame_rotex5.html new file mode 100644 index 0000000000..28f00df83c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_rotex5.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_scatter_csimex1.html b/html/includes/jpgraph/docs/html/exframes/frame_scatter_csimex1.html new file mode 100644 index 0000000000..fc3b9cf344 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_scatter_csimex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_scatterex1.html b/html/includes/jpgraph/docs/html/exframes/frame_scatterex1.html new file mode 100644 index 0000000000..cf61e111ff --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_scatterex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_scatterex2.html b/html/includes/jpgraph/docs/html/exframes/frame_scatterex2.html new file mode 100644 index 0000000000..876987065f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_scatterex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex1.html b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex1.html new file mode 100644 index 0000000000..c5eb5f8a8c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex10.html b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex10.html new file mode 100644 index 0000000000..03f55151c2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex10.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex2.html b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex2.html new file mode 100644 index 0000000000..ae83bfc14d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex2.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex3.html b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex3.html new file mode 100644 index 0000000000..d5b9a80a30 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex3.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex4.html b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex4.html new file mode 100644 index 0000000000..819691b363 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex4.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex5.html b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex5.html new file mode 100644 index 0000000000..bbf050c04b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex5.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex6.html b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex6.html new file mode 100644 index 0000000000..da1728e2d4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex6.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex7.html b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex7.html new file mode 100644 index 0000000000..a6f4616a88 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex7.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex8.html b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex8.html new file mode 100644 index 0000000000..be945eae7e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex8.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex9.html b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex9.html new file mode 100644 index 0000000000..dbc7bf4a49 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_smallstaticbandsex9.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_splineex1.html b/html/includes/jpgraph/docs/html/exframes/frame_splineex1.html new file mode 100644 index 0000000000..2510bf83d4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_splineex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_staticbandbarex7.html b/html/includes/jpgraph/docs/html/exframes/frame_staticbandbarex7.html new file mode 100644 index 0000000000..3a225eda53 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_staticbandbarex7.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_stockex1.html b/html/includes/jpgraph/docs/html/exframes/frame_stockex1.html new file mode 100644 index 0000000000..6968ae69ac --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_stockex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_tabtitleex1.html b/html/includes/jpgraph/docs/html/exframes/frame_tabtitleex1.html new file mode 100644 index 0000000000..6dc032294c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_tabtitleex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_textalignex1.html b/html/includes/jpgraph/docs/html/exframes/frame_textalignex1.html new file mode 100644 index 0000000000..eced480c19 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_textalignex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_titlecsimex01.html b/html/includes/jpgraph/docs/html/exframes/frame_titlecsimex01.html new file mode 100644 index 0000000000..45389bbc45 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_titlecsimex01.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/frame_topxaxisex1.html b/html/includes/jpgraph/docs/html/exframes/frame_topxaxisex1.html new file mode 100644 index 0000000000..c9ac06d2a6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/frame_topxaxisex1.html @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/docs/html/exframes/funcex1.html b/html/includes/jpgraph/docs/html/exframes/funcex1.html new file mode 100644 index 0000000000..02f7e94d68 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/funcex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_utils.inc");

$f = new FuncGenerator('cos($x)*$x');
list(
$xdata,$ydata) = $f->E(-1.2*M_PI,1.2*M_PI);

$f = new FuncGenerator('$x*$x');
list(
$x2data,$y2data) = $f->E(-2,2);

// Setup the basic graph
$graph = new Graph(450,350,"auto");
$graph->SetScale("linlin");
$graph->SetShadow();
$graph->img->SetMargin(50,50,60,40);    
$graph->SetBox(true,'black',2);    
$graph->SetMarginColor('white');
$graph->SetColor('lightyellow');

// ... and titles
$graph->title->Set('Example of Function plot');
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->subtitle->Set("(With some more advanced axis formatting\nHiding first and last label)");
$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL);
$graph->xgrid->Show();

$graph->yaxis->SetPos(0);
$graph->yaxis->SetWeight(2);
$graph->yaxis->HideZeroLabel();
$graph->yaxis->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->SetColor('black','darkblue');
$graph->yaxis->HideTicks(true,false);
$graph->yaxis->HideFirstLastLabel();

$graph->xaxis->SetWeight(2);
$graph->xaxis->HideZeroLabel();
$graph->xaxis->HideFirstLastLabel();
$graph->xaxis->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->SetColor('black','darkblue');

$lp1 = new LinePlot($ydata,$xdata);
$lp1->SetColor('blue');
$lp1->SetWeight(2);

$lp2 = new LinePlot($y2data,$x2data);
list(
$xm,$ym)=$lp2->Max();
$lp2->SetColor('red');
$lp2->SetWeight(2);


$graph->Add($lp1);
$graph->Add($lp2);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttconstrainex0.html b/html/includes/jpgraph/docs/html/exframes/ganttconstrainex0.html new file mode 100644 index 0000000000..ae5cba7d5b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttconstrainex0.html @@ -0,0 +1,3 @@ + +<?php
// Gantt example
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

// 
// The data for the graphs
//
$data = array(
  array(
0,ACTYPE_GROUP,    "Phase 1",        "2001-10-26","2001-11-23",''),
  array(
1,ACTYPE_NORMAL,   "  Label 2",      "2001-10-26","2001-11-16",''),
  array(
2,ACTYPE_NORMAL,   "  Label 3",      "2001-11-20","2001-11-22",''),
  array(
3,ACTYPE_MILESTONE,"  Phase 1 Done""2001-11-23",'M2') );

// The constrains between the activities
//$constrains = array(array(1,2,CONSTRAIN_ENDSTART),
//            array(2,3,CONSTRAIN_STARTSTART));
$constrains = array();

$progress = array(array(1,0.4));

// Create the basic graph
$graph = new GanttGraph();
$graph->title->Set("Example with grouping and constrains");

// Setup scale
$graph->ShowHeaders(GANTT_HYEAR GANTT_HMONTH GANTT_HDAY GANTT_HWEEK);
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR);

// Add the specified activities
$graph->CreateSimple($data,$constrains,$progress);

// .. and stroke the graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttconstrainex1.html b/html/includes/jpgraph/docs/html/exframes/ganttconstrainex1.html new file mode 100644 index 0000000000..c72b01e24c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttconstrainex1.html @@ -0,0 +1,3 @@ + +<?php
// Gantt example
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

// 
// The data for the graphs
//
$data = array(
  array(
0,ACTYPE_GROUP,    "Phase 1",        "2001-10-26","2001-11-23",''),
  array(
1,ACTYPE_NORMAL,   "  Label 1",      "2001-10-26","2001-11-18",''),
  array(
2,ACTYPE_NORMAL,   "  Label 2",      "2001-10-26","2001-11-16",''),
  array(
3,ACTYPE_NORMAL,   "  Label 3",      "2001-11-20","2001-11-22",''),
  array(
4,ACTYPE_MILESTONE,"  Phase 1 Done""2001-11-23",'M2') );

// The constrains between the activities
$constrains = array(array(1,2,CONSTRAIN_ENDSTART),
            array(
1,3,CONSTRAIN_STARTSTART),
            array(
3,4,CONSTRAIN_STARTSTART));

$progress = array(array(1,0.4));

// Create the basic graph
$graph = new GanttGraph();
$graph->title->Set("Example with grouping and constrains");

// Setup scale
$graph->ShowHeaders(GANTT_HYEAR GANTT_HMONTH GANTT_HDAY GANTT_HWEEK);
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR);

// Add the specified activities
$graph->CreateSimple($data,$constrains,$progress);

// .. and stroke the graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttcsimex01.html b/html/includes/jpgraph/docs/html/exframes/ganttcsimex01.html new file mode 100644 index 0000000000..93452688a9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttcsimex01.html @@ -0,0 +1,3 @@ + +<?php
// Gantt example to create CSIM

include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$bar1 = new GanttBar(0,"Activity 1","2001-12-21","2002-01-20");
$bar1->SetCSIMTarget('#','Go back 1');
$bar1->title->SetCSIMTarget('#','Go back 1 (title)');
$bar2 = new GanttBar(1,"Activity 2","2002-01-03","2002-01-25");
$bar2->SetCSIMTarget('#','Go back 2');
$bar2->title->SetCSIMTarget('#','Go back 2 (title)');

$graph = new GanttGraph(500);
$graph->title->Set("Example with image map");
$graph->ShowHeaders(GANTT_HYEAR GANTT_HMONTH GANTT_HDAY GANTT_HWEEK);
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);
$graph->scale->week->SetFont(FF_FONT1);

$graph->Add(array($bar1,$bar2));

// And stroke
$graph->StrokeCSIM('ganttcsimex01.php');


?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttcsimex02.html b/html/includes/jpgraph/docs/html/exframes/ganttcsimex02.html new file mode 100644 index 0000000000..8661169fb7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttcsimex02.html @@ -0,0 +1,3 @@ + +<?php
// Gantt example to create CSIM using CreateSimple()

include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$data = array(
  array(
0,ACTYPE_GROUP,    "Phase 1",        "2001-10-26","2001-11-23",'',
    
'#1','Go home'),
  array(
1,ACTYPE_NORMAL,   "  Label 2",      "2001-10-26","2001-11-16",'ab,cd',
    
'#2','Go home'),
  array(
2,ACTYPE_NORMAL,   "  Label 3",      "2001-11-20","2001-11-22",'ek',
    
'#3','Go home'),
  array(
3,ACTYPE_MILESTONE,"  Phase 1 Done""2001-11-23",'M2',
    
'#4','Go home') );

// The constrains between the activities
$constrains = array(array(1,2,CONSTRAIN_ENDSTART),
            array(
2,3,CONSTRAIN_STARTSTART));

$progress = array(array(1,0.4));

$graph = new GanttGraph(500);
$graph->title->Set("Example with image map");
$graph->ShowHeaders(GANTT_HYEAR GANTT_HMONTH GANTT_HDAY GANTT_HWEEK);
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);
$graph->scale->week->SetFont(FF_FONT1);

$graph->CreateSimple($data,$constrains,$progress);

// Add the specified activities
//SetupSimpleGantt($graph,$data,$constrains,$progress);

// And stroke
$graph->StrokeCSIM('ganttcsimex02.php');


?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex00.html b/html/includes/jpgraph/docs/html/exframes/ganttex00.html new file mode 100644 index 0000000000..970edb2e95 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex00.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

// A new graph with automatic size
$graph = new GanttGraph(0,0,"auto");

//  A new activity on row '0'
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20");
$graph->Add($activity);

// Display the Gantt chart
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex01.html b/html/includes/jpgraph/docs/html/exframes/ganttex01.html new file mode 100644 index 0000000000..331d90afa9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex01.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("A nice main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(Draft version)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2);

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Finally add the bar to the graph
$graph->Add($activity);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex02.html b/html/includes/jpgraph/docs/html/exframes/ganttex02.html new file mode 100644 index 0000000000..7f09eaef65 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex02.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("Main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);

// Show day, week and month scale
//$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH);
$graph->ShowHeaders(GANTT_HWEEK );

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_WNBR);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-02-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Finally add the bar to the graph
$graph->Add($activity);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex03.html b/html/includes/jpgraph/docs/html/exframes/ganttex03.html new file mode 100644 index 0000000000..73b1093b3e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex03.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("A nice main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(Draft version)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(7,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Finally add the bar to the graph
$graph->Add($activity);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex04.html b/html/includes/jpgraph/docs/html/exframes/ganttex04.html new file mode 100644 index 0000000000..a2f998edc6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex04.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("A nice main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(Draft version)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Finally add the bar to the graph
$graph->Add($activity);

// Create a miletone
$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15");
$graph->Add($milestone);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex05.html b/html/includes/jpgraph/docs/html/exframes/ganttex05.html new file mode 100644 index 0000000000..3226e4f0e5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex05.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("A nice main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(Draft version)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Finally add the bar to the graph
$graph->Add($activity);

// Create a miletone
$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15");
$milestone->title->SetColor("black");
$milestone->title->SetFont(FF_FONT1,FS_BOLD);
$graph->Add($milestone);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex06.html b/html/includes/jpgraph/docs/html/exframes/ganttex06.html new file mode 100644 index 0000000000..7e651fdcb1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex06.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("A nice main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(Draft version)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Finally add the bar to the graph
$graph->Add($activity);

// Create a miletone
$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15");
$milestone->title->SetColor("black");
$milestone->title->SetFont(FF_FONT1,FS_BOLD);
$graph->Add($milestone);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex07.html b/html/includes/jpgraph/docs/html/exframes/ganttex07.html new file mode 100644 index 0000000000..aa0b7e1770 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex07.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("A nice main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(Draft version)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Finally add the bar to the graph
$graph->Add($activity);

// Create a miletone
$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15");
$milestone->title->SetColor("black");
$milestone->title->SetFont(FF_FONT1,FS_BOLD);
$graph->Add($milestone);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex08.html b/html/includes/jpgraph/docs/html/exframes/ganttex08.html new file mode 100644 index 0000000000..14103256dd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex08.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("A nice main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(Draft version)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Add a right marker
$activity->rightMark->Show();    
$activity->rightMark->SetType(MARK_FILLEDCIRCLE);
$activity->rightMark->SetWidth(13);
$activity->rightMark->SetColor("red");
$activity->rightMark->SetFillColor("red");
$activity->rightMark->title->Set("M5");
$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12);
$activity->rightMark->title->SetColor("white");

// Finally add the bar to the graph
$graph->Add($activity);

// Create a miletone
$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15");
$milestone->title->SetColor("black");
$milestone->title->SetFont(FF_FONT1,FS_BOLD);
$graph->Add($milestone);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex09.html b/html/includes/jpgraph/docs/html/exframes/ganttex09.html new file mode 100644 index 0000000000..6522a7017d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex09.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("A nice main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(Draft version)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Add a right marker
$activity->rightMark->Show();    
$activity->rightMark->SetType(MARK_FILLEDCIRCLE);
$activity->rightMark->SetWidth(13);
$activity->rightMark->SetColor("red");
$activity->rightMark->SetFillColor("red");
$activity->rightMark->title->Set("M5");
$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12);
$activity->rightMark->title->SetColor("white");

// Set absolute height
$activity->SetHeight(8);

// Finally add the bar to the graph
$graph->Add($activity);

// Create a miletone
$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15");
$milestone->title->SetColor("black");
$milestone->title->SetFont(FF_FONT1,FS_BOLD);
$graph->Add($milestone);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex10.html b/html/includes/jpgraph/docs/html/exframes/ganttex10.html new file mode 100644 index 0000000000..8fb725ee20 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex10.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("A nice main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(Draft version)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Add a right marker
$activity->rightMark->Show();    
$activity->rightMark->SetType(MARK_FILLEDCIRCLE);
$activity->rightMark->SetWidth(13);
$activity->rightMark->SetColor("red");
$activity->rightMark->SetFillColor("red");
$activity->rightMark->title->Set("M5");
$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12);
$activity->rightMark->title->SetColor("white");

// Set absolute height
$activity->SetHeight(1);


// Format the bar for the second activity
// ($row,$title,$startdate,$enddate)
$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity2->SetPattern(BAND_RDIAG,"yellow");
$activity2->SetFillColor("red");

// Add a right marker
$activity2->rightMark->Show();    
$activity2->rightMark->SetType(MARK_FILLEDCIRCLE);
$activity2->rightMark->SetWidth(13);
$activity2->rightMark->SetColor("red");
$activity2->rightMark->SetFillColor("red");
$activity2->rightMark->title->Set("M5");
$activity2->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12);
$activity2->rightMark->title->SetColor("white");

// Set absolute height
$activity2->SetHeight(1);


// Finally add the bar to the graph
$graph->Add($activity);
$graph->Add($activity2);

// Create a miletone
$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15");
$milestone->title->SetColor("black");
$milestone->title->SetFont(FF_FONT1,FS_BOLD);
$graph->Add($milestone);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
//$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex11.html b/html/includes/jpgraph/docs/html/exframes/ganttex11.html new file mode 100644 index 0000000000..1908528834 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex11.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("A nice main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(Draft version)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Add a right marker
$activity->rightMark->Show();    
$activity->rightMark->SetType(MARK_FILLEDCIRCLE);
$activity->rightMark->SetWidth(13);
$activity->rightMark->SetColor("red");
$activity->rightMark->SetFillColor("red");
$activity->rightMark->title->Set("M5");
$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12);
$activity->rightMark->title->SetColor("white");

// Set absolute height
$activity->SetHeight(10);


// Format the bar for the second activity
// ($row,$title,$startdate,$enddate)
$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity2->SetPattern(BAND_RDIAG,"yellow");
$activity2->SetFillColor("red");

// Add a right marker
$activity2->rightMark->Show();    
$activity2->rightMark->SetType(MARK_FILLEDCIRCLE);
$activity2->rightMark->SetWidth(13);
$activity2->rightMark->SetColor("red");
$activity2->rightMark->SetFillColor("red");
$activity2->rightMark->title->Set("M5");
$activity2->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12);
$activity2->rightMark->title->SetColor("white");

// Set absolute height
$activity2->SetHeight(10);

// Finally add the bar to the graph
$graph->Add($activity);
$graph->Add($activity2);

// Create a miletone
$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15");
$milestone->title->SetColor("black");
$milestone->title->SetFont(FF_FONT1,FS_BOLD);
$graph->Add($milestone);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
//$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex12.html b/html/includes/jpgraph/docs/html/exframes/ganttex12.html new file mode 100644 index 0000000000..5f8110fb87 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex12.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetBox();
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("A nice main title");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(Draft version)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// 0 % vertical label margin
$graph->SetLabelVMarginFactor(0);

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Add a right marker
$activity->rightMark->Show();    
$activity->rightMark->SetType(MARK_FILLEDCIRCLE);
$activity->rightMark->SetWidth(13);
$activity->rightMark->SetColor("red");
$activity->rightMark->SetFillColor("red");
$activity->rightMark->title->Set("M5");
$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12);
$activity->rightMark->title->SetColor("white");

// Set absolute height
$activity->SetHeight(10);


// Format the bar for the second activity
// ($row,$title,$startdate,$enddate)
$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-20");

// Yellow diagonal line pattern on a red background
$activity2->SetPattern(BAND_RDIAG,"yellow");
$activity2->SetFillColor("red");

// Add a right marker
$activity2->rightMark->Show();    
$activity2->rightMark->SetType(MARK_FILLEDCIRCLE);
$activity2->rightMark->SetWidth(13);
$activity2->rightMark->SetColor("red");
$activity2->rightMark->SetFillColor("red");
$activity2->rightMark->title->Set("M5");
$activity2->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12);
$activity2->rightMark->title->SetColor("white");

// Set absolute height
$activity2->SetHeight(10);

// Finally add the bar to the graph
$graph->Add($activity);
$graph->Add($activity2);

// Create a miletone
$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15");
$milestone->title->SetColor("black");
$milestone->title->SetFont(FF_FONT1,FS_BOLD);
$graph->Add($milestone);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
//$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex13.html b/html/includes/jpgraph/docs/html/exframes/ganttex13.html new file mode 100644 index 0000000000..060421b853 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex13.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetBox();
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("Example of captions");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(ganttex13.php)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Instead of week number show the date for the first day in the week
// on the week scale
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Make the week scale font smaller than the default
$graph->scale->week->SetFont(FF_FONT0);

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// 0 % vertical label margin
$graph->SetLabelVMarginFactor(1);

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[ER,TR]");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Set absolute height
$activity->SetHeight(10);


// Format the bar for the second activity
// ($row,$title,$startdate,$enddate)
$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[BO,SW,JC]");

// ADjust font for caption
$activity2->caption->SetFont(FF_ARIAL,FS_BOLD);
$activity2->caption->SetColor("darkred");

// Yellow diagonal line pattern on a red background
$activity2->SetPattern(BAND_RDIAG,"yellow");
$activity2->SetFillColor("red");

// Set absolute height
$activity2->SetHeight(10);

// Finally add the bar to the graph
$graph->Add($activity);
$graph->Add($activity2);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
//$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex14.html b/html/includes/jpgraph/docs/html/exframes/ganttex14.html new file mode 100644 index 0000000000..718f805ad0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex14.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetBox();
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("Example of captions");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(ganttex14.php)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);


// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// 0 % vertical label margin
$graph->SetLabelVMarginFactor(1);

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Set absolute height
$activity->SetHeight(10);

// Specify progress to 60%
$activity->progress->Set(0.6);

// Format the bar for the second activity
// ($row,$title,$startdate,$enddate)
$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]");

// Yellow diagonal line pattern on a red background
$activity2->SetPattern(BAND_RDIAG,"yellow");
$activity2->SetFillColor("red");

// Set absolute height
$activity2->SetHeight(10);

// Specify progress to 30%
$activity2->progress->Set(0.3);


// Finally add the bar to the graph
$graph->Add($activity);
$graph->Add($activity2);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
//$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex15.html b/html/includes/jpgraph/docs/html/exframes/ganttex15.html new file mode 100644 index 0000000000..4f890add12 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex15.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetBox();
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("Example of captions");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(ganttex15.php)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);


// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// 0 % vertical label margin
$graph->SetLabelVMarginFactor(1);

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Set absolute height
$activity->SetHeight(10);

// Specify progress to 60%
$activity->progress->Set(0.6);
$activity->progress->SetPattern(BAND_HVCROSS,"blue");

// Format the bar for the second activity
// ($row,$title,$startdate,$enddate)
$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]");

// Yellow diagonal line pattern on a red background
$activity2->SetPattern(BAND_RDIAG,"yellow");
$activity2->SetFillColor("red");

// Set absolute height
$activity2->SetHeight(10);

// Specify progress to 30%
$activity2->progress->Set(0.3);
$activity2->progress->SetPattern(BAND_HVCROSS,"blue");

// Finally add the bar to the graph
$graph->Add($activity);
$graph->Add($activity2);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
//$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex16.html b/html/includes/jpgraph/docs/html/exframes/ganttex16.html new file mode 100644 index 0000000000..53a013f0c6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex16.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetBox();
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("Example of captions");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(ganttex16.php)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Set table title
$graph->scale->tableTitle->Set("(Rev: 1.22)");
$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD);
$graph->scale->SetTableTitleBackground("silver");
$graph->scale->tableTitle->Show();

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// 0 % vertical label margin
$graph->SetLabelVMarginFactor(1);

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Set absolute height
$activity->SetHeight(10);

// Specify progress to 60%
$activity->progress->Set(0.6);
$activity->progress->SetPattern(BAND_HVCROSS,"blue");

// Format the bar for the second activity
// ($row,$title,$startdate,$enddate)
$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]");

// Yellow diagonal line pattern on a red background
$activity2->SetPattern(BAND_RDIAG,"yellow");
$activity2->SetFillColor("red");

// Set absolute height
$activity2->SetHeight(10);

// Specify progress to 30%
$activity2->progress->Set(0.3);
$activity2->progress->SetPattern(BAND_HVCROSS,"blue");

// Finally add the bar to the graph
$graph->Add($activity);
$graph->Add($activity2);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
//$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex17.html b/html/includes/jpgraph/docs/html/exframes/ganttex17.html new file mode 100644 index 0000000000..bbca8cfdbb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex17.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetBox();
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("Example of captions");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(ganttex17.php)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Set table title
$graph->scale->tableTitle->Set("(Rev: 1.22)");
$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD);
$graph->scale->SetTableTitleBackground("silver");

// Modify the appearance of the dividing lines 
$graph->scale->divider->SetWeight(3);
$graph->scale->divider->SetColor("navy");
$graph->scale->dividerh->SetWeight(3);
$graph->scale->dividerh->SetColor("navy");

// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// 0 % vertical label margin
$graph->SetLabelVMarginFactor(1);

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Set absolute height
$activity->SetHeight(10);

// Specify progress to 60%
$activity->progress->Set(0.6);
$activity->progress->SetPattern(BAND_HVCROSS,"blue");

// Format the bar for the second activity
// ($row,$title,$startdate,$enddate)
$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]");

// Yellow diagonal line pattern on a red background
$activity2->SetPattern(BAND_RDIAG,"yellow");
$activity2->SetFillColor("red");

// Set absolute height
$activity2->SetHeight(10);

// Specify progress to 30%
$activity2->progress->Set(0.3);
$activity2->progress->SetPattern(BAND_HVCROSS,"blue");

// Finally add the bar to the graph
$graph->Add($activity);
$graph->Add($activity2);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
//$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex18.html b/html/includes/jpgraph/docs/html/exframes/ganttex18.html new file mode 100644 index 0000000000..e0b2e0d74b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex18.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetBox();
$graph->SetShadow();

// Add title and subtitle
$graph->title->Set("Example of captions");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(ganttex18.php)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Set table title
$graph->scale->tableTitle->Set("(Rev: 1.22)");
$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD);
$graph->scale->SetTableTitleBackground("silver");

// Modify the appearance of the dividing lines 
$graph->scale->divider->SetWeight(3);
$graph->scale->divider->SetColor("navy");

$graph->scale->dividerh->SetWeight(3);
$graph->scale->dividerh->SetColor("navy");

$graph->SetBox(true,"navy",3);


// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// 0 % vertical label margin
$graph->SetLabelVMarginFactor(1);

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Set absolute height
$activity->SetHeight(10);

// Specify progress to 60%
$activity->progress->Set(0.6);
$activity->progress->SetPattern(BAND_HVCROSS,"blue");

// Format the bar for the second activity
// ($row,$title,$startdate,$enddate)
$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]");

// Yellow diagonal line pattern on a red background
$activity2->SetPattern(BAND_RDIAG,"yellow");
$activity2->SetFillColor("red");

// Set absolute height
$activity2->SetHeight(10);

// Specify progress to 30%
$activity2->progress->Set(0.3);
$activity2->progress->SetPattern(BAND_HVCROSS,"blue");

// Finally add the bar to the graph
$graph->Add($activity);
$graph->Add($activity2);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
//$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttex19.html b/html/includes/jpgraph/docs/html/exframes/ganttex19.html new file mode 100644 index 0000000000..64054009fb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttex19.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph(0,0,"auto");
$graph->SetBox();
$graph->SetShadow();

// Use swedish locale
$graph->scale->SetDateLocale("sv_SE");

// Add title and subtitle
$graph->title->Set("Example of captions");
$graph->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->subtitle->Set("(ganttex19.php)");

// Show day, week and month scale
$graph->ShowHeaders(GANTT_HDAY GANTT_HWEEK GANTT_HMONTH);

// Set table title
$graph->scale->tableTitle->Set("(Rev: 1.22)");
$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD);
$graph->scale->SetTableTitleBackground("silver");
$graph->scale->tableTitle->Show();

$graph->scale->divider->SetStyle('solid');
$graph->scale->divider->SetWeight(2);
$graph->scale->divider->SetColor('black');


$graph->SetBox(true,"navy",2);


// Use the short name of the month together with a 2 digit year
// on the month scale
$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2);
$graph->scale->month->SetFontColor("white");
$graph->scale->month->SetBackgroundColor("blue");

// 0 % vertical label margin
$graph->SetLabelVMarginFactor(1);

// Format the bar for the first activity
// ($row,$title,$startdate,$enddate)
$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]");

// Yellow diagonal line pattern on a red background
$activity->SetPattern(BAND_RDIAG,"yellow");
$activity->SetFillColor("red");

// Set absolute height
$activity->SetHeight(10);

// Specify progress to 60%
$activity->progress->Set(0.6);
$activity->progress->SetPattern(BAND_HVCROSS,"blue");

// Format the bar for the second activity
// ($row,$title,$startdate,$enddate)
$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]");

// Yellow diagonal line pattern on a red background
$activity2->SetPattern(BAND_RDIAG,"yellow");
$activity2->SetFillColor("red");

// Set absolute height
$activity2->SetHeight(10);

// Specify progress to 30%
$activity2->progress->Set(0.3);
$activity2->progress->SetPattern(BAND_HVCROSS,"blue");

// Finally add the bar to the graph
$graph->Add($activity);
$graph->Add($activity2);

// Add a vertical line
$vline = new GanttVLine("2001-12-24","Phase 1");
$vline->SetDayOffset(0.5);
//$graph->Add($vline);

// ... and display it
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/gantthgridex1.html b/html/includes/jpgraph/docs/html/exframes/gantthgridex1.html new file mode 100644 index 0000000000..c2cda1db18 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/gantthgridex1.html @@ -0,0 +1,3 @@ + +<?php
// Gantt horizontal grid example
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");


// Some dummy data for some activities
$data = array(
    array(
0,"Group 1  Johan""2001-10-23","2001-11-06",FF_FONT1,FS_BOLD,8),
    array(
1,"  Label 2""2001-10-26","2001-11-04"),
    array(
3,"Group 2""2001-11-20","2001-11-28",FF_FONT1,FS_BOLD,8),
    array(
4,"  Label 1""2001-11-20","2001-12-1"));

// New Gantt Graph
$graph = new GanttGraph(500);

// Setup a title
$graph->title->Set("Grid example");
$graph->subtitle->Set("(Horizontal grid)");
$graph->title->SetFont(FF_VERDANA,FS_NORMAL,14);

// Specify what headers to show
$graph->ShowHeaders(GANTT_HMONTH|GANTT_HDAY );
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);
$graph->scale->week->SetFont(FF_FONT0);

// Setup a horizontal grid
$graph->hgrid->Show();
$graph->hgrid->SetRowFillColor('darkblue@0.9');


for(
$i=0$i<count($data); ++$i) {
    
$bar = new GanttBar($data[$i][0],$data[$i][1],$data[$i][2],$data[$i][3],"[5%]",10);
    if( 
count($data[$i]) > )
    
$bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]);
    
$bar->SetPattern(BAND_RDIAG,"yellow");
    
$bar->SetFillColor("red");
    
$graph->Add($bar);
}

// Setup a vertical marker line 
$vline = new GanttVLine("2001-11-01");
$vline->SetDayOffset(0.5);
$vline->title->Set("2001-11-01");
$vline->title->SetFont(FF_FONT1,FS_BOLD,10);
$graph->Add($vline);

// Setup a milestone
$ms = new MileStone(6,"M5","2001-11-28","28/12");
$ms->title->SetFont(FF_FONT1,FS_BOLD);
$graph->Add($ms);

// And to show that you can also add an icon we add "Tux"
$icon = new IconPlot('penguin.png',0.01,0.95,1,15);
$icon->SetAnchor('left','bottom');
$graph->Add($icon);

// .. and finally send it back to the browser
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/gantthourex1.html b/html/includes/jpgraph/docs/html/exframes/gantthourex1.html new file mode 100644 index 0000000000..6e1fa8d3f7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/gantthourex1.html @@ -0,0 +1,3 @@ + +<?php
// Gantt hour example
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

$graph = new GanttGraph();
$graph->SetMarginColor('blue:1.7');
$graph->SetColor('white');

$graph->SetBackgroundGradient('navy','white',GRAD_HOR,BGRAD_MARGIN);
$graph->scale->hour->SetBackgroundColor('lightyellow:1.5');
$graph->scale->hour->SetFont(FF_FONT1);
$graph->scale->day->SetBackgroundColor('lightyellow:1.5');
$graph->scale->day->SetFont(FF_FONT1,FS_BOLD);

$graph->title->Set("Example of hours in scale");
$graph->title->SetColor('white');
$graph->title->SetFont(FF_VERDANA,FS_BOLD,14);

$graph->ShowHeaders(GANTT_HDAY GANTT_HHOUR);

$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);
$graph->scale->week->SetFont(FF_FONT1);
$graph->scale->hour->SetIntervall(4);

$graph->scale->hour->SetStyle(HOURSTYLE_HM24);
$graph->scale->day->SetStyle(DAYSTYLE_SHORTDAYDATE3);

$data = array(
    array(
0,"  Label 1""2001-01-26 04:00","2001-01-26 14:00"),
    array(
1,"  Label 2""2001-01-26 10:00","2001-01-26 18:00"),
    array(
2,"  Label 3""2001-01-26","2001-01-27 10:00")
);


for(
$i=0$i<count($data); ++$i) {
    
$bar = new GanttBar($data[$i][0],$data[$i][1],$data[$i][2],$data[$i][3],"[5%]",10);
    if( 
count($data[$i])>)
        
$bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]);
    
$bar->SetPattern(BAND_RDIAG,"yellow");
    
$bar->SetFillColor("red");
    
$graph->Add($bar);
}

$graph->Stroke();



?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/gantthourminex1.html b/html/includes/jpgraph/docs/html/exframes/gantthourminex1.html new file mode 100644 index 0000000000..08c24d241c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/gantthourminex1.html @@ -0,0 +1,3 @@ + +<?php
// Gantt hour + minute example
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

// Some sample Gantt data
$data = array(
    array(
0,array("Group 1","345 days","2004-03-01","2004-05-05"), "2001-11-27 10:00","2001-11-27 14:00",FF_FONT2,FS_NORMAL,0),
    array(
1,array("  Label one",' 122,5 days',' 2004-03-01',' 2003-05-05','MJ'), "2001-11-27 16:00","2001-11-27 18:00"),
    array(
2,"  Label two""2001-11-27","2001-11-27 10:00"),
    array(
3,"  Label three""2001-11-27","2001-11-27 08:00")
);


// Basic graph parameters
$graph = new GanttGraph();
$graph->SetMarginColor('darkgreen@0.8');
$graph->SetColor('white');

// We want to display day, hour and minute scales
$graph->ShowHeaders(GANTT_HDAY GANTT_HHOUR GANTT_HMIN);

// We want to have the following titles in our columns
// describing each activity
$graph->scale->actinfo->SetColTitles(
    array(
'Act','Duration','Start','Finish','Resp'));//,array(100,70,70,70));

// Uncomment the following line if you don't want the 3D look
// in the columns headers
//$graph->scale->actinfo->SetStyle(ACTINFO_2D);

$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10);

//These are the default values for use in the columns
//$graph->scale->actinfo->SetFontColor('black');
//$graph->scale->actinfo->SetBackgroundColor('lightgray');
//$graph->scale->actinfo->vgrid->SetStyle('solid');

$graph->scale->actinfo->vgrid->SetColor('gray');
$graph->scale->actinfo->SetColor('darkgray');

// Setup day format
$graph->scale->day->SetBackgroundColor('lightyellow:1.5');
$graph->scale->day->SetFont(FF_ARIAL);
$graph->scale->day->SetStyle(DAYSTYLE_SHORTDAYDATE1);

// Setup hour format
$graph->scale->hour->SetIntervall(1);
$graph->scale->hour->SetBackgroundColor('lightyellow:1.5');
$graph->scale->hour->SetFont(FF_FONT0);
$graph->scale->hour->SetStyle(HOURSTYLE_H24);
$graph->scale->hour->grid->SetColor('gray:0.8');

// Setup minute format
$graph->scale->minute->SetIntervall(30);
$graph->scale->minute->SetBackgroundColor('lightyellow:1.5');
$graph->scale->minute->SetFont(FF_FONT0);
$graph->scale->minute->SetStyle(MINUTESTYLE_MM);
$graph->scale->minute->grid->SetColor('lightgray');

$graph->scale->tableTitle->Set('Phase 1');
$graph->scale->tableTitle->SetFont(FF_ARIAL,FS_NORMAL,12);
$graph->scale->SetTableTitleBackground('darkgreen@0.6');
$graph->scale->tableTitle->Show(true);

$graph->title->Set("Example of hours & mins scale");
$graph->title->SetColor('darkgray');
$graph->title->SetFont(FF_VERDANA,FS_BOLD,14);


for(
$i=0$i<count($data); ++$i) {
    
$bar = new GanttBar($data[$i][0],$data[$i][1],$data[$i][2],$data[$i][3]);
    if( 
count($data[$i])>)
    
$bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]);
    
$bar->SetPattern(BAND_RDIAG,"yellow");
    
$bar->SetFillColor("gray");
    
$graph->Add($bar);
}


$vline = new GanttVLine("2001-11-27 13:00");
$vline->title->Set("27/11 13:00");
$vline->title->SetFont(FF_FONT1,FS_BOLD,10);
$graph->Add($vline);

$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/gantticonex1.html b/html/includes/jpgraph/docs/html/exframes/gantticonex1.html new file mode 100644 index 0000000000..4f9a08832c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/gantticonex1.html @@ -0,0 +1,3 @@ + +<?php
// Gantt example
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

// Basic Gantt graph
$graph = new GanttGraph();
$graph->title->Set("Using the builtin icons");

// Explicitely set the date range 
// (Autoscaling will of course also work)
$graph->SetDateRange('2001-10-06','2002-4-10');


// 1.5 line spacing to make more room
$graph->SetVMarginFactor(1.5);

// Setup some nonstandard colors
$graph->SetMarginColor('lightgreen@0.8');
$graph->SetBox(true,'yellow:0.6',2);
$graph->SetFrame(true,'darkgreen',4);
$graph->scale->divider->SetColor('yellow:0.6');
$graph->scale->dividerh->SetColor('yellow:0.6');

// Display month and year scale with the gridlines
$graph->ShowHeaders(GANTT_HMONTH GANTT_HYEAR);
$graph->scale->month->grid->SetColor('gray');
$graph->scale->month->grid->Show(true);
$graph->scale->year->grid->SetColor('gray');
$graph->scale->year->grid->Show(true);

// For the titles we also add a minimum width of 100 pixels for the Task name column
$graph->scale->actinfo->SetColTitles(
    array(
'Note','Task','Duration','Start','Finish'),array(30,100));
$graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5');
$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10);
$graph->scale->actinfo->vgrid->SetStyle('solid');
$graph->scale->actinfo->vgrid->SetColor('gray');

// Uncomment this to keep the columns but show no headers
//$graph->scale->actinfo->Show(false);

// Setup the icons we want to use
$erricon = new IconImage(GICON_FOLDER,0.6);
$startconicon = new IconImage(GICON_FOLDEROPEN,0.6);
$endconicon = new IconImage(GICON_TEXTIMPORTANT,0.5);

// Store the icons in the first column and use plain text in the others
$data = array(
    array(
0,array($erricon,"Pre-study","102 days","23 Nov '01","1 Mar '02")
          , 
"2001-11-23","2002-03-1",FF_ARIAL,FS_NORMAL,8),
    array(
1,array($startconicon,"Prototype","21 days","26 Oct '01","16 Nov '01"),
          
"2001-10-26","2001-11-16",FF_ARIAL,FS_NORMAL,8),
    array(
2,array($endconicon,"Report","12 days","1 Mar '02","13 Mar '02"),
          
"2002-03-01","2002-03-13",FF_ARIAL,FS_NORMAL,8)
);
    
// Create the bars and add them to the gantt chart
for($i=0$i<count($data); ++$i) {
    
$bar = new GanttBar($data[$i][0],$data[$i][1],$data[$i][2],$data[$i][3],"[50%]",10);
    if( 
count($data[$i])>)
        
$bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]);
    
$bar->SetPattern(BAND_RDIAG,"yellow");
    
$bar->SetFillColor("gray");
    
$bar->progress->Set(0.5);
    
$bar->progress->SetPattern(GANTT_SOLID,"darkgreen");
    
$bar->title->SetCSIMTarget(array('#1'.$i,'#2'.$i,'#3'.$i,'#4'.$i,'#5'.$i),array('11'.$i,'22'.$i,'33'.$i));
    
$graph->Add($bar);
}

// Output the chart
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/ganttsimpleex1.html b/html/includes/jpgraph/docs/html/exframes/ganttsimpleex1.html new file mode 100644 index 0000000000..8702c10a73 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/ganttsimpleex1.html @@ -0,0 +1,3 @@ + +<?php
// Gantt example
include ("../jpgraph.php");
include (
"../jpgraph_gantt.php");

// 
// The data for the graphs
//
$data = array(
  array(
0,ACTYPE_GROUP,    "Phase 1",        "2001-10-26","2001-11-23",''),
  array(
1,ACTYPE_NORMAL,   "  Label 2",      "2001-10-26","2001-11-13",'[KJ]'),
  array(
2,ACTYPE_NORMAL,   "  Label 3",      "2001-11-20","2001-11-22",'[EP]'),
  array(
3,ACTYPE_MILESTONE,"  Phase 1 Done""2001-11-23",'M2') );

// Create the basic graph
$graph = new GanttGraph();
$graph->title->Set("Gantt Graph using CreateSimple()");

// Setup scale
$graph->ShowHeaders(GANTT_HYEAR GANTT_HMONTH GANTT_HDAY GANTT_HWEEK);
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);

// Add the specified activities
$graph->CreateSimple($data);

// .. and stroke the graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/gradbkgex1.html b/html/includes/jpgraph/docs/html/exframes/gradbkgex1.html new file mode 100644 index 0000000000..e03fbb55cb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/gradbkgex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$datay1 = array(4,26,12,18,8,22);
$datay2 = array(12,9,42,8,20,19);

// Setup the graph
$graph = new Graph(300,200);
$graph->SetMarginColor('white');
$graph->SetScale("textlin",0,50);
$graph->SetMargin(30,50,30,30);

// We must have the frame enabled to get the gradient
// However, we don't want the frame line so we set it to
// white color which makes it invisible.
$graph->SetFrame(true,'white');

// Setup a background gradient image
$graph->SetBackgroundGradient('blue','navy:0.5',GRAD_HOR,BGRAD_PLOT);

// Setup the tab title
$graph->tabtitle->Set(' 3rd Division ' );
$graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,13);

// Setup x,Y grid
$graph->xgrid->Show();
$graph->xgrid->SetColor('gray@0.5');
$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());
$graph->ygrid->SetColor('gray@0.5');

// Setup color for axis and labels on axis
$graph->xaxis->SetColor('orange','black');
$graph->yaxis->SetColor('orange','black');

// Ticks on the outsid
$graph->xaxis->SetTickSide(SIDE_DOWN);
$graph->yaxis->SetTickSide(SIDE_LEFT);

// Setup the legend box colors and font
$graph->legend->SetColor('white','navy');
$graph->legend->SetFillColor('navy@0.25');
$graph->legend->SetFont(FF_ARIAL,FS_BOLD,8);
$graph->legend->SetShadow('darkgray@0.4',3);
$graph->legend->SetPos(0.05,0.05,'right','top');

// Create the first line
$p1 = new LinePlot($datay1);
$p1->SetColor("red");
$p1->SetWeight(2);
$p1->SetLegend('2002');
$graph->Add($p1);

// Create the second line
$p2 = new LinePlot($datay2);
$p2->SetColor("lightyellow");
$p2->SetLegend('2001');
$p2->SetWeight(2);
$graph->Add($p2);

// Output line
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/horizbarex1.html b/html/includes/jpgraph/docs/html/exframes/horizbarex1.html new file mode 100644 index 0000000000..78e5502c17 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/horizbarex1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(2,3,5,8,12,6,3);
$datax=array("Jan","Feb","Mar","Apr","May","Jun","Jul");

// Size of graph
$width=400
$height=500;

// Set the basic parameters of the graph 
$graph = new Graph($width,$height,'auto');
$graph->SetScale("textlin");

// Rotate graph 90 degrees and set margin
$graph->Set90AndMargin(50,20,50,30);

// Nice shadow
$graph->SetShadow();

// Setup title
$graph->title->Set("Horizontal bar graph ex 1");
$graph->title->SetFont(FF_VERDANA,FS_BOLD,14);
$graph->subtitle->Set("(No Y-axis)");

// Setup X-axis
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,12);

// Some extra margin looks nicer
$graph->xaxis->SetLabelMargin(10);

// Label align for X-axis
$graph->xaxis->SetLabelAlign('right','center');

// Add some grace to y-axis so the bars doesn't go
// all the way to the end of the plot area
$graph->yaxis->scale->SetGrace(20);

// We don't want to display Y-axis
$graph->yaxis->Hide();

// Now create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("orange");
$bplot->SetShadow();

//You can change the width of the bars if you like
//$bplot->SetWidth(0.5);

// We want to display the value of each bar at the top
$bplot->value->Show();
$bplot->value->SetFont(FF_ARIAL,FS_BOLD,12);
$bplot->value->SetAlign('left','center');
$bplot->value->SetColor("black","darkred");
$bplot->value->SetFormat('%.1f mkr');

// Add the bar to the graph
$graph->Add($bplot);

// .. and stroke the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/horizbarex2.html b/html/includes/jpgraph/docs/html/exframes/horizbarex2.html new file mode 100644 index 0000000000..c0c14953e0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/horizbarex2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(2,3,5,8,12,6,3);
$datax=array("Jan","Feb","Mar","Apr","May","Jun","Jul");

$width=400
$height=500;

// Set the basic parameters of the graph 
$graph = new Graph($width,$height,'auto');
$graph->SetScale("textlin");

$top 80;
$bottom 30;
$left 50;
$right 30;
$graph->Set90AndMargin($left,$right,$top,$bottom);

// Nice shadow
$graph->SetShadow();

// Setup title
$graph->title->Set("Horizontal bar graph ex 2");
$graph->title->SetFont(FF_VERDANA,FS_BOLD,14);
$graph->subtitle->Set("(Axis at top)");

// Setup X-axis
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,12);

// Some extra margin looks nicer
$graph->xaxis->SetLabelMargin(5);

// Label align for X-axis
$graph->xaxis->SetLabelAlign('right','center');

// Add some grace to y-axis so the bars doesn't go
// all the way to the end of the plot area
$graph->yaxis->scale->SetGrace(20);
$graph->yaxis->SetLabelAlign('center','bottom');
$graph->yaxis->SetLabelAngle(45);
$graph->yaxis->SetLabelFormat('%d');
$graph->yaxis->SetFont(FF_VERDANA,FS_NORMAL,12);

// We don't want to display Y-axis
//$graph->yaxis->Hide();

// Now create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("orange");
$bplot->SetShadow();

//You can change the width of the bars if you like
//$bplot->SetWidth(0.5);

// We want to display the value of each bar at the top
$bplot->value->Show();
$bplot->value->SetFont(FF_ARIAL,FS_BOLD,12);
$bplot->value->SetAlign('left','center');
$bplot->value->SetColor("black","darkred");
$bplot->value->SetFormat('%.1f mkr');

// Add the bar to the graph
$graph->Add($bplot);


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/horizbarex3.html b/html/includes/jpgraph/docs/html/exframes/horizbarex3.html new file mode 100644 index 0000000000..3e9126454e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/horizbarex3.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(2,3,-5,8,12,6,3);
$datax=array("Jan","Feb","Mar","Apr","May","Jun","Jul");

// Size of graph
$width=400
$height=500;

// Set the basic parameters of the graph 
$graph = new Graph($width,$height,'auto');
$graph->SetScale("textlin");

$top 50;
$bottom 80;
$left 50;
$right 20;
$graph->Set90AndMargin($left,$right,$top,$bottom);

$graph->xaxis->SetPos('min');

// Nice shadow
$graph->SetShadow();

// Setup title
$graph->title->Set("Horizontal bar graph ex 3");
$graph->title->SetFont(FF_VERDANA,FS_BOLD,14);
$graph->subtitle->Set("(Axis at bottom)");

// Setup X-axis
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetFont(FF_FONT2,FS_BOLD,12);

// Some extra margin looks nicer
$graph->xaxis->SetLabelMargin(5);

// Label align for X-axis
$graph->xaxis->SetLabelAlign('right','center');

// Add some grace to y-axis so the bars doesn't go
// all the way to the end of the plot area
$graph->yaxis->scale->SetGrace(20);

// Setup the Y-axis to be displayed in the bottom of the 
// graph. We also finetune the exact layout of the title,
// ticks and labels to make them look nice.
$graph->yaxis->SetPos('max');

// First make the labels look right
$graph->yaxis->SetLabelAlign('center','top');
$graph->yaxis->SetLabelFormat('%d');
$graph->yaxis->SetLabelSide(SIDE_RIGHT);

// The fix the tick marks
$graph->yaxis->SetTickSide(SIDE_LEFT);

// Finally setup the title
$graph->yaxis->SetTitleSide(SIDE_RIGHT);
$graph->yaxis->SetTitleMargin(35);

// To align the title to the right use :
$graph->yaxis->SetTitle('Turnaround 2002','high');
$graph->yaxis->title->Align('right');

// To center the title use :
//$graph->yaxis->SetTitle('Turnaround 2002','center');
//$graph->yaxis->title->Align('center');

$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,12);
$graph->yaxis->title->SetAngle(0);

$graph->yaxis->SetFont(FF_FONT2,FS_NORMAL);
// If you want the labels at an angle other than 0 or 90
// you need to use TTF fonts
//$graph->yaxis->SetLabelAngle(0);

// Now create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("orange");
$bplot->SetShadow();

//You can change the width of the bars if you like
//$bplot->SetWidth(0.5);

// We want to display the value of each bar at the top
$bplot->value->Show();
$bplot->value->SetFont(FF_ARIAL,FS_BOLD,12);
$bplot->value->SetAlign('left','center');
$bplot->value->SetColor("black","darkred");
$bplot->value->SetFormat('%.1f mkr');

// Add the bar to the graph
$graph->Add($bplot);


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/horizbarex4.html b/html/includes/jpgraph/docs/html/exframes/horizbarex4.html new file mode 100644 index 0000000000..2e003278a4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/horizbarex4.html @@ -0,0 +1,4 @@ + +<?php
// $Id: horizbarex4.php,v 1.4 2002/11/17 23:59:27 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(1992,1993,1995,1996,1997,1998,2001);

// Size of graph
$width=400
$height=500;

// Set the basic parameters of the graph 
$graph = new Graph($width,$height,'auto');
$graph->SetScale("textlin");

$top 60;
$bottom 30;
$left 80;
$right 30;
$graph->Set90AndMargin($left,$right,$top,$bottom);

// Nice shadow
$graph->SetShadow();

// Setup labels
$lbl = array("Andrew\nTait","Thomas\nAnderssen","Kevin\nSpacey","Nick\nDavidsson",
"David\nLindquist","Jason\nTait","Lorin\nPersson");
$graph->xaxis->SetTickLabels($lbl);

// Label align for X-axis
$graph->xaxis->SetLabelAlign('right','center','right');

// Label align for Y-axis
$graph->yaxis->SetLabelAlign('center','bottom');

// Titles
$graph->title->Set('Year Married');

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("orange");
$bplot->SetWidth(0.5);
$bplot->SetYMin(1990);

$graph->Add($bplot);

$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/image_JpGraph_Logo.html b/html/includes/jpgraph/docs/html/exframes/image_JpGraph_Logo.html new file mode 100644 index 0000000000..3058d7e112 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_JpGraph_Logo.html @@ -0,0 +1 @@ +

JpGraph_Logo.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_alphabarex1.html b/html/includes/jpgraph/docs/html/exframes/image_alphabarex1.html new file mode 100644 index 0000000000..cff02502e0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_alphabarex1.html @@ -0,0 +1 @@ +

alphabarex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_antispamex01.html b/html/includes/jpgraph/docs/html/exframes/image_antispamex01.html new file mode 100644 index 0000000000..91a189fc01 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_antispamex01.html @@ -0,0 +1 @@ +

antispamex01.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_backgroundex03.html b/html/includes/jpgraph/docs/html/exframes/image_backgroundex03.html new file mode 100644 index 0000000000..2e73047240 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_backgroundex03.html @@ -0,0 +1 @@ +

backgroundex03.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_balloonex1.html b/html/includes/jpgraph/docs/html/exframes/image_balloonex1.html new file mode 100644 index 0000000000..ba69cdbae1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_balloonex1.html @@ -0,0 +1 @@ +

balloonex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bar_csimex1.html b/html/includes/jpgraph/docs/html/exframes/image_bar_csimex1.html new file mode 100644 index 0000000000..307d494d12 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bar_csimex1.html @@ -0,0 +1 @@ +

bar_csimex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bar_csimex2.html b/html/includes/jpgraph/docs/html/exframes/image_bar_csimex2.html new file mode 100644 index 0000000000..68cf93e186 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bar_csimex2.html @@ -0,0 +1 @@ +

bar_csimex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bar_csimex3.html b/html/includes/jpgraph/docs/html/exframes/image_bar_csimex3.html new file mode 100644 index 0000000000..f35c5b8ff7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bar_csimex3.html @@ -0,0 +1 @@ +

bar_csimex3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex1.html b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex1.html new file mode 100644 index 0000000000..84fb68cdd9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex1.html @@ -0,0 +1 @@ +

bargradsmallex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex2.html b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex2.html new file mode 100644 index 0000000000..d540b81f27 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex2.html @@ -0,0 +1 @@ +

bargradsmallex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex3.html b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex3.html new file mode 100644 index 0000000000..cb152c19b4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex3.html @@ -0,0 +1 @@ +

bargradsmallex3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex4.html b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex4.html new file mode 100644 index 0000000000..d33e10dc4e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex4.html @@ -0,0 +1 @@ +

bargradsmallex4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex5.html b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex5.html new file mode 100644 index 0000000000..7290c824a2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex5.html @@ -0,0 +1 @@ +

bargradsmallex5.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex6.html b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex6.html new file mode 100644 index 0000000000..9edc894ec9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex6.html @@ -0,0 +1 @@ +

bargradsmallex6.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex7.html b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex7.html new file mode 100644 index 0000000000..ce076671ef --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex7.html @@ -0,0 +1 @@ +

bargradsmallex7.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex8.html b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex8.html new file mode 100644 index 0000000000..273cef06a0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bargradsmallex8.html @@ -0,0 +1 @@ +

bargradsmallex8.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_barline_csimex1.html b/html/includes/jpgraph/docs/html/exframes/image_barline_csimex1.html new file mode 100644 index 0000000000..369087998f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_barline_csimex1.html @@ -0,0 +1 @@ +

barline_csimex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_barlinefreq_csimex1.html b/html/includes/jpgraph/docs/html/exframes/image_barlinefreq_csimex1.html new file mode 100644 index 0000000000..e5ae173446 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_barlinefreq_csimex1.html @@ -0,0 +1 @@ +

barlinefreq_csimex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bartutex1.html b/html/includes/jpgraph/docs/html/exframes/image_bartutex1.html new file mode 100644 index 0000000000..90aeb25e20 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bartutex1.html @@ -0,0 +1 @@ +

bartutex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bartutex2.html b/html/includes/jpgraph/docs/html/exframes/image_bartutex2.html new file mode 100644 index 0000000000..683d004d04 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bartutex2.html @@ -0,0 +1 @@ +

bartutex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bartutex3.html b/html/includes/jpgraph/docs/html/exframes/image_bartutex3.html new file mode 100644 index 0000000000..aa89b957c6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bartutex3.html @@ -0,0 +1 @@ +

bartutex3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bartutex4.html b/html/includes/jpgraph/docs/html/exframes/image_bartutex4.html new file mode 100644 index 0000000000..3b9f281c9f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bartutex4.html @@ -0,0 +1 @@ +

bartutex4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bartutex5.html b/html/includes/jpgraph/docs/html/exframes/image_bartutex5.html new file mode 100644 index 0000000000..919372382b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bartutex5.html @@ -0,0 +1 @@ +

bartutex5.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_bartutex6.html b/html/includes/jpgraph/docs/html/exframes/image_bartutex6.html new file mode 100644 index 0000000000..672a768635 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_bartutex6.html @@ -0,0 +1 @@ +

bartutex6.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_boxstockcsimex1.html b/html/includes/jpgraph/docs/html/exframes/image_boxstockcsimex1.html new file mode 100644 index 0000000000..02da9f1681 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_boxstockcsimex1.html @@ -0,0 +1 @@ +

boxstockcsimex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_boxstockex1.html b/html/includes/jpgraph/docs/html/exframes/image_boxstockex1.html new file mode 100644 index 0000000000..f9dba61128 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_boxstockex1.html @@ -0,0 +1 @@ +

boxstockex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_builtinplotmarksex1.html b/html/includes/jpgraph/docs/html/exframes/image_builtinplotmarksex1.html new file mode 100644 index 0000000000..5ec00cce6f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_builtinplotmarksex1.html @@ -0,0 +1 @@ +

builtinplotmarksex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_canvas_jpgarchex.html b/html/includes/jpgraph/docs/html/exframes/image_canvas_jpgarchex.html new file mode 100644 index 0000000000..2b767f5bd2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_canvas_jpgarchex.html @@ -0,0 +1 @@ +

canvas_jpgarchex.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_canvasex01.html b/html/includes/jpgraph/docs/html/exframes/image_canvasex01.html new file mode 100644 index 0000000000..5034bac466 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_canvasex01.html @@ -0,0 +1 @@ +

canvasex01.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_canvasex02.html b/html/includes/jpgraph/docs/html/exframes/image_canvasex02.html new file mode 100644 index 0000000000..54b5b519f8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_canvasex02.html @@ -0,0 +1 @@ +

canvasex02.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_canvasex03.html b/html/includes/jpgraph/docs/html/exframes/image_canvasex03.html new file mode 100644 index 0000000000..b79fb66500 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_canvasex03.html @@ -0,0 +1 @@ +

canvasex03.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_canvasex04.html b/html/includes/jpgraph/docs/html/exframes/image_canvasex04.html new file mode 100644 index 0000000000..545e863c91 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_canvasex04.html @@ -0,0 +1 @@ +

canvasex04.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_canvasex05.html b/html/includes/jpgraph/docs/html/exframes/image_canvasex05.html new file mode 100644 index 0000000000..c50c20427d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_canvasex05.html @@ -0,0 +1 @@ +

canvasex05.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_canvasex06.html b/html/includes/jpgraph/docs/html/exframes/image_canvasex06.html new file mode 100644 index 0000000000..0223cb6731 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_canvasex06.html @@ -0,0 +1 @@ +

canvasex06.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_color_chart01.html b/html/includes/jpgraph/docs/html/exframes/image_color_chart01.html new file mode 100644 index 0000000000..d969ca5359 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_color_chart01.html @@ -0,0 +1 @@ +

color_chart01.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_color_chart02.html b/html/includes/jpgraph/docs/html/exframes/image_color_chart02.html new file mode 100644 index 0000000000..9e10e9ed62 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_color_chart02.html @@ -0,0 +1 @@ +

color_chart02.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_color_chart03.html b/html/includes/jpgraph/docs/html/exframes/image_color_chart03.html new file mode 100644 index 0000000000..8424637292 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_color_chart03.html @@ -0,0 +1 @@ +

color_chart03.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_color_chart04.html b/html/includes/jpgraph/docs/html/exframes/image_color_chart04.html new file mode 100644 index 0000000000..5737af519a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_color_chart04.html @@ -0,0 +1 @@ +

color_chart04.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_dateaxisex1.html b/html/includes/jpgraph/docs/html/exframes/image_dateaxisex1.html new file mode 100644 index 0000000000..da86fd10b7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_dateaxisex1.html @@ -0,0 +1 @@ +

dateaxisex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_dateaxisex2.html b/html/includes/jpgraph/docs/html/exframes/image_dateaxisex2.html new file mode 100644 index 0000000000..67efef4e1a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_dateaxisex2.html @@ -0,0 +1 @@ +

dateaxisex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_dateaxisex4.html b/html/includes/jpgraph/docs/html/exframes/image_dateaxisex4.html new file mode 100644 index 0000000000..b596bc90e5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_dateaxisex4.html @@ -0,0 +1 @@ +

dateaxisex4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_dbschemaex1.html b/html/includes/jpgraph/docs/html/exframes/image_dbschemaex1.html new file mode 100644 index 0000000000..7ee33c18b7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_dbschemaex1.html @@ -0,0 +1 @@ +

dbschemaex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example0.html b/html/includes/jpgraph/docs/html/exframes/image_example0.html new file mode 100644 index 0000000000..f5e1f92fd5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example0.html @@ -0,0 +1 @@ +

example0.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example11.html b/html/includes/jpgraph/docs/html/exframes/image_example11.html new file mode 100644 index 0000000000..5d18ccbe94 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example11.html @@ -0,0 +1 @@ +

example11.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example13.html b/html/includes/jpgraph/docs/html/exframes/image_example13.html new file mode 100644 index 0000000000..2320099bd4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example13.html @@ -0,0 +1 @@ +

example13.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example14.html b/html/includes/jpgraph/docs/html/exframes/image_example14.html new file mode 100644 index 0000000000..9d338a8fad --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example14.html @@ -0,0 +1 @@ +

example14.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example15.html b/html/includes/jpgraph/docs/html/exframes/image_example15.html new file mode 100644 index 0000000000..9c70f3ed34 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example15.html @@ -0,0 +1 @@ +

example15.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example16.1.html b/html/includes/jpgraph/docs/html/exframes/image_example16.1.html new file mode 100644 index 0000000000..a749443b01 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example16.1.html @@ -0,0 +1 @@ +

example16.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example16.2.html b/html/includes/jpgraph/docs/html/exframes/image_example16.2.html new file mode 100644 index 0000000000..29d3ee001e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example16.2.html @@ -0,0 +1 @@ +

example16.2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example16.3.html b/html/includes/jpgraph/docs/html/exframes/image_example16.3.html new file mode 100644 index 0000000000..b4ea595ac7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example16.3.html @@ -0,0 +1 @@ +

example16.3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example16.4.html b/html/includes/jpgraph/docs/html/exframes/image_example16.4.html new file mode 100644 index 0000000000..672c79d7de --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example16.4.html @@ -0,0 +1 @@ +

example16.4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example16.6.html b/html/includes/jpgraph/docs/html/exframes/image_example16.6.html new file mode 100644 index 0000000000..358fe0d47e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example16.6.html @@ -0,0 +1 @@ +

example16.6.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example16.html b/html/includes/jpgraph/docs/html/exframes/image_example16.html new file mode 100644 index 0000000000..7683775126 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example16.html @@ -0,0 +1 @@ +

example16.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example17.html b/html/includes/jpgraph/docs/html/exframes/image_example17.html new file mode 100644 index 0000000000..36e2665925 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example17.html @@ -0,0 +1 @@ +

example17.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example18.html b/html/includes/jpgraph/docs/html/exframes/image_example18.html new file mode 100644 index 0000000000..6ab52ddddb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example18.html @@ -0,0 +1 @@ +

example18.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example19.1.html b/html/includes/jpgraph/docs/html/exframes/image_example19.1.html new file mode 100644 index 0000000000..8364ecce56 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example19.1.html @@ -0,0 +1 @@ +

example19.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example19.html b/html/includes/jpgraph/docs/html/exframes/image_example19.html new file mode 100644 index 0000000000..e52a201bfc --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example19.html @@ -0,0 +1 @@ +

example19.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example2.html b/html/includes/jpgraph/docs/html/exframes/image_example2.html new file mode 100644 index 0000000000..f296ec270a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example2.html @@ -0,0 +1 @@ +

example2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example20.1.html b/html/includes/jpgraph/docs/html/exframes/image_example20.1.html new file mode 100644 index 0000000000..43d419ddb6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example20.1.html @@ -0,0 +1 @@ +

example20.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example20.2.html b/html/includes/jpgraph/docs/html/exframes/image_example20.2.html new file mode 100644 index 0000000000..cd7ae4d356 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example20.2.html @@ -0,0 +1 @@ +

example20.2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example20.3.html b/html/includes/jpgraph/docs/html/exframes/image_example20.3.html new file mode 100644 index 0000000000..2302e10c73 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example20.3.html @@ -0,0 +1 @@ +

example20.3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example20.4.html b/html/includes/jpgraph/docs/html/exframes/image_example20.4.html new file mode 100644 index 0000000000..edf1d3eb0e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example20.4.html @@ -0,0 +1 @@ +

example20.4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example20.5.html b/html/includes/jpgraph/docs/html/exframes/image_example20.5.html new file mode 100644 index 0000000000..26530a3c79 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example20.5.html @@ -0,0 +1 @@ +

example20.5.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example20.html b/html/includes/jpgraph/docs/html/exframes/image_example20.html new file mode 100644 index 0000000000..0133a0adbb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example20.html @@ -0,0 +1 @@ +

example20.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example21.html b/html/includes/jpgraph/docs/html/exframes/image_example21.html new file mode 100644 index 0000000000..8c72085ae1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example21.html @@ -0,0 +1 @@ +

example21.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example22.html b/html/includes/jpgraph/docs/html/exframes/image_example22.html new file mode 100644 index 0000000000..8561a59f69 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example22.html @@ -0,0 +1 @@ +

example22.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example23.html b/html/includes/jpgraph/docs/html/exframes/image_example23.html new file mode 100644 index 0000000000..2ca8a0d2dd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example23.html @@ -0,0 +1 @@ +

example23.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example24.html b/html/includes/jpgraph/docs/html/exframes/image_example24.html new file mode 100644 index 0000000000..2653ea3ec5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example24.html @@ -0,0 +1 @@ +

example24.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example25.1.html b/html/includes/jpgraph/docs/html/exframes/image_example25.1.html new file mode 100644 index 0000000000..800dbbcbca --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example25.1.html @@ -0,0 +1 @@ +

example25.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example25.2.html b/html/includes/jpgraph/docs/html/exframes/image_example25.2.html new file mode 100644 index 0000000000..ed2e5157e9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example25.2.html @@ -0,0 +1 @@ +

example25.2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example25.html b/html/includes/jpgraph/docs/html/exframes/image_example25.html new file mode 100644 index 0000000000..2065b1d614 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example25.html @@ -0,0 +1 @@ +

example25.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example26.1.html b/html/includes/jpgraph/docs/html/exframes/image_example26.1.html new file mode 100644 index 0000000000..0fdd5db079 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example26.1.html @@ -0,0 +1 @@ +

example26.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example26.html b/html/includes/jpgraph/docs/html/exframes/image_example26.html new file mode 100644 index 0000000000..412adf13db --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example26.html @@ -0,0 +1 @@ +

example26.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example27.1.html b/html/includes/jpgraph/docs/html/exframes/image_example27.1.html new file mode 100644 index 0000000000..03b122d304 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example27.1.html @@ -0,0 +1 @@ +

example27.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example27.2.html b/html/includes/jpgraph/docs/html/exframes/image_example27.2.html new file mode 100644 index 0000000000..b2f4b753b0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example27.2.html @@ -0,0 +1 @@ +

example27.2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example27.3.html b/html/includes/jpgraph/docs/html/exframes/image_example27.3.html new file mode 100644 index 0000000000..3e7fe8383a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example27.3.html @@ -0,0 +1 @@ +

example27.3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example27.html b/html/includes/jpgraph/docs/html/exframes/image_example27.html new file mode 100644 index 0000000000..75a1401f9a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example27.html @@ -0,0 +1 @@ +

example27.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example28.1.html b/html/includes/jpgraph/docs/html/exframes/image_example28.1.html new file mode 100644 index 0000000000..f1e1cc7c46 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example28.1.html @@ -0,0 +1 @@ +

example28.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example28.2.html b/html/includes/jpgraph/docs/html/exframes/image_example28.2.html new file mode 100644 index 0000000000..6df37b4804 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example28.2.html @@ -0,0 +1 @@ +

example28.2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example28.3.html b/html/includes/jpgraph/docs/html/exframes/image_example28.3.html new file mode 100644 index 0000000000..ec1b645984 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example28.3.html @@ -0,0 +1 @@ +

example28.3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example28.html b/html/includes/jpgraph/docs/html/exframes/image_example28.html new file mode 100644 index 0000000000..6c28a4208b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example28.html @@ -0,0 +1 @@ +

example28.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example3.1.html b/html/includes/jpgraph/docs/html/exframes/image_example3.1.html new file mode 100644 index 0000000000..cc97eebdc5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example3.1.html @@ -0,0 +1 @@ +

example3.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example3.2.1.html b/html/includes/jpgraph/docs/html/exframes/image_example3.2.1.html new file mode 100644 index 0000000000..450297ba8e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example3.2.1.html @@ -0,0 +1 @@ +

example3.2.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example3.2.2.html b/html/includes/jpgraph/docs/html/exframes/image_example3.2.2.html new file mode 100644 index 0000000000..be94d2ddb5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example3.2.2.html @@ -0,0 +1 @@ +

example3.2.2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example3.2.html b/html/includes/jpgraph/docs/html/exframes/image_example3.2.html new file mode 100644 index 0000000000..ab77136f2b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example3.2.html @@ -0,0 +1 @@ +

example3.2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example3.3.html b/html/includes/jpgraph/docs/html/exframes/image_example3.3.html new file mode 100644 index 0000000000..54f1dfc80c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example3.3.html @@ -0,0 +1 @@ +

example3.3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example3.4.html b/html/includes/jpgraph/docs/html/exframes/image_example3.4.html new file mode 100644 index 0000000000..db38fb5d2d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example3.4.html @@ -0,0 +1 @@ +

example3.4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example3.html b/html/includes/jpgraph/docs/html/exframes/image_example3.html new file mode 100644 index 0000000000..871218237f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example3.html @@ -0,0 +1 @@ +

example3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example4.html b/html/includes/jpgraph/docs/html/exframes/image_example4.html new file mode 100644 index 0000000000..024631b779 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example4.html @@ -0,0 +1 @@ +

example4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example5.1.html b/html/includes/jpgraph/docs/html/exframes/image_example5.1.html new file mode 100644 index 0000000000..a6cc8dc464 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example5.1.html @@ -0,0 +1 @@ +

example5.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example5.html b/html/includes/jpgraph/docs/html/exframes/image_example5.html new file mode 100644 index 0000000000..50266f5a8b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example5.html @@ -0,0 +1 @@ +

example5.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example6.1.html b/html/includes/jpgraph/docs/html/exframes/image_example6.1.html new file mode 100644 index 0000000000..98d609dcba --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example6.1.html @@ -0,0 +1 @@ +

example6.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example6.2.html b/html/includes/jpgraph/docs/html/exframes/image_example6.2.html new file mode 100644 index 0000000000..5cfafd3b37 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example6.2.html @@ -0,0 +1 @@ +

example6.2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example6.html b/html/includes/jpgraph/docs/html/exframes/image_example6.html new file mode 100644 index 0000000000..d58b123fcd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example6.html @@ -0,0 +1 @@ +

example6.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example7.html b/html/includes/jpgraph/docs/html/exframes/image_example7.html new file mode 100644 index 0000000000..2c2d42befc --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example7.html @@ -0,0 +1 @@ +

example7.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example8.html b/html/includes/jpgraph/docs/html/exframes/image_example8.html new file mode 100644 index 0000000000..a9be6a651a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example8.html @@ -0,0 +1 @@ +

example8.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example9.1.html b/html/includes/jpgraph/docs/html/exframes/image_example9.1.html new file mode 100644 index 0000000000..5e4db23275 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example9.1.html @@ -0,0 +1 @@ +

example9.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example9.2.html b/html/includes/jpgraph/docs/html/exframes/image_example9.2.html new file mode 100644 index 0000000000..84c1f9c0e4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example9.2.html @@ -0,0 +1 @@ +

example9.2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_example9.html b/html/includes/jpgraph/docs/html/exframes/image_example9.html new file mode 100644 index 0000000000..a89b2c0e27 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_example9.html @@ -0,0 +1 @@ +

example9.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_fieldscatterex1.html b/html/includes/jpgraph/docs/html/exframes/image_fieldscatterex1.html new file mode 100644 index 0000000000..46b6a4e4f4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_fieldscatterex1.html @@ -0,0 +1 @@ +

fieldscatterex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_filledgridex1.html b/html/includes/jpgraph/docs/html/exframes/image_filledgridex1.html new file mode 100644 index 0000000000..3aa3c5e3af --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_filledgridex1.html @@ -0,0 +1 @@ +

filledgridex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_filledlineex01.1.html b/html/includes/jpgraph/docs/html/exframes/image_filledlineex01.1.html new file mode 100644 index 0000000000..806303e47b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_filledlineex01.1.html @@ -0,0 +1 @@ +

filledlineex01.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_filledlineex01.html b/html/includes/jpgraph/docs/html/exframes/image_filledlineex01.html new file mode 100644 index 0000000000..e229e5a4cd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_filledlineex01.html @@ -0,0 +1 @@ +

filledlineex01.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_funcex1.html b/html/includes/jpgraph/docs/html/exframes/image_funcex1.html new file mode 100644 index 0000000000..af72b6cc4f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_funcex1.html @@ -0,0 +1 @@ +

funcex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttconstrainex0.html b/html/includes/jpgraph/docs/html/exframes/image_ganttconstrainex0.html new file mode 100644 index 0000000000..318445f74e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttconstrainex0.html @@ -0,0 +1 @@ +

ganttconstrainex0.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttconstrainex1.html b/html/includes/jpgraph/docs/html/exframes/image_ganttconstrainex1.html new file mode 100644 index 0000000000..cd211371fd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttconstrainex1.html @@ -0,0 +1 @@ +

ganttconstrainex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttcsimex01.html b/html/includes/jpgraph/docs/html/exframes/image_ganttcsimex01.html new file mode 100644 index 0000000000..c978bcf607 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttcsimex01.html @@ -0,0 +1 @@ +

ganttcsimex01.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttcsimex02.html b/html/includes/jpgraph/docs/html/exframes/image_ganttcsimex02.html new file mode 100644 index 0000000000..3e543c9ac1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttcsimex02.html @@ -0,0 +1 @@ +

ganttcsimex02.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex00.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex00.html new file mode 100644 index 0000000000..f0b5cf87d7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex00.html @@ -0,0 +1 @@ +

ganttex00.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex01.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex01.html new file mode 100644 index 0000000000..90c7c3ee7a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex01.html @@ -0,0 +1 @@ +

ganttex01.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex02.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex02.html new file mode 100644 index 0000000000..e9c28279d9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex02.html @@ -0,0 +1 @@ +

ganttex02.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex03.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex03.html new file mode 100644 index 0000000000..c91de47065 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex03.html @@ -0,0 +1 @@ +

ganttex03.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex04.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex04.html new file mode 100644 index 0000000000..6eec405100 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex04.html @@ -0,0 +1 @@ +

ganttex04.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex05.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex05.html new file mode 100644 index 0000000000..b144f45fbe --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex05.html @@ -0,0 +1 @@ +

ganttex05.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex06.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex06.html new file mode 100644 index 0000000000..7ed4441e06 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex06.html @@ -0,0 +1 @@ +

ganttex06.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex07.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex07.html new file mode 100644 index 0000000000..1cf720582d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex07.html @@ -0,0 +1 @@ +

ganttex07.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex08.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex08.html new file mode 100644 index 0000000000..7679f28ae4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex08.html @@ -0,0 +1 @@ +

ganttex08.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex09.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex09.html new file mode 100644 index 0000000000..8f5d76b6c1 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex09.html @@ -0,0 +1 @@ +

ganttex09.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex10.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex10.html new file mode 100644 index 0000000000..ab2f122561 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex10.html @@ -0,0 +1 @@ +

ganttex10.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex11.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex11.html new file mode 100644 index 0000000000..f38c52db4c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex11.html @@ -0,0 +1 @@ +

ganttex11.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex12.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex12.html new file mode 100644 index 0000000000..16814a6737 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex12.html @@ -0,0 +1 @@ +

ganttex12.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex13.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex13.html new file mode 100644 index 0000000000..29759f1300 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex13.html @@ -0,0 +1 @@ +

ganttex13.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex14.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex14.html new file mode 100644 index 0000000000..1198fe26f6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex14.html @@ -0,0 +1 @@ +

ganttex14.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex15.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex15.html new file mode 100644 index 0000000000..f5ba0db72d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex15.html @@ -0,0 +1 @@ +

ganttex15.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex16.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex16.html new file mode 100644 index 0000000000..58afc94e42 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex16.html @@ -0,0 +1 @@ +

ganttex16.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex17.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex17.html new file mode 100644 index 0000000000..e67149966d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex17.html @@ -0,0 +1 @@ +

ganttex17.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex18.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex18.html new file mode 100644 index 0000000000..1b76b78d22 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex18.html @@ -0,0 +1 @@ +

ganttex18.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttex19.html b/html/includes/jpgraph/docs/html/exframes/image_ganttex19.html new file mode 100644 index 0000000000..8c45a3be08 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttex19.html @@ -0,0 +1 @@ +

ganttex19.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_gantthgridex1.html b/html/includes/jpgraph/docs/html/exframes/image_gantthgridex1.html new file mode 100644 index 0000000000..feac78c7a3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_gantthgridex1.html @@ -0,0 +1 @@ +

gantthgridex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_gantthourex1.html b/html/includes/jpgraph/docs/html/exframes/image_gantthourex1.html new file mode 100644 index 0000000000..af9bf54431 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_gantthourex1.html @@ -0,0 +1 @@ +

gantthourex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_gantthourminex1.html b/html/includes/jpgraph/docs/html/exframes/image_gantthourminex1.html new file mode 100644 index 0000000000..4c10a0ce3b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_gantthourminex1.html @@ -0,0 +1 @@ +

gantthourminex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_gantticonex1.html b/html/includes/jpgraph/docs/html/exframes/image_gantticonex1.html new file mode 100644 index 0000000000..5448bb22fa --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_gantticonex1.html @@ -0,0 +1 @@ +

gantticonex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_ganttsimpleex1.html b/html/includes/jpgraph/docs/html/exframes/image_ganttsimpleex1.html new file mode 100644 index 0000000000..5920163676 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_ganttsimpleex1.html @@ -0,0 +1 @@ +

ganttsimpleex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_gradbkgex1.html b/html/includes/jpgraph/docs/html/exframes/image_gradbkgex1.html new file mode 100644 index 0000000000..514b06bdbd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_gradbkgex1.html @@ -0,0 +1 @@ +

gradbkgex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_horizbarex1.html b/html/includes/jpgraph/docs/html/exframes/image_horizbarex1.html new file mode 100644 index 0000000000..d8cebd889e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_horizbarex1.html @@ -0,0 +1 @@ +

horizbarex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_horizbarex2.html b/html/includes/jpgraph/docs/html/exframes/image_horizbarex2.html new file mode 100644 index 0000000000..d6d244f3bc --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_horizbarex2.html @@ -0,0 +1 @@ +

horizbarex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_horizbarex3.html b/html/includes/jpgraph/docs/html/exframes/image_horizbarex3.html new file mode 100644 index 0000000000..41583f234f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_horizbarex3.html @@ -0,0 +1 @@ +

horizbarex3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_horizbarex4.html b/html/includes/jpgraph/docs/html/exframes/image_horizbarex4.html new file mode 100644 index 0000000000..cfd30d7300 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_horizbarex4.html @@ -0,0 +1 @@ +

horizbarex4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_imgmarkercsimex1.html b/html/includes/jpgraph/docs/html/exframes/image_imgmarkercsimex1.html new file mode 100644 index 0000000000..f484dfb717 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_imgmarkercsimex1.html @@ -0,0 +1 @@ +

imgmarkercsimex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_imgmarkerex1.html b/html/includes/jpgraph/docs/html/exframes/image_imgmarkerex1.html new file mode 100644 index 0000000000..997ac0e75f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_imgmarkerex1.html @@ -0,0 +1 @@ +

imgmarkerex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_impulsex1.html b/html/includes/jpgraph/docs/html/exframes/image_impulsex1.html new file mode 100644 index 0000000000..a3ae5ad57c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_impulsex1.html @@ -0,0 +1 @@ +

impulsex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_impulsex2.html b/html/includes/jpgraph/docs/html/exframes/image_impulsex2.html new file mode 100644 index 0000000000..2c43ca7e18 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_impulsex2.html @@ -0,0 +1 @@ +

impulsex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_impulsex3.html b/html/includes/jpgraph/docs/html/exframes/image_impulsex3.html new file mode 100644 index 0000000000..6b0a41dab2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_impulsex3.html @@ -0,0 +1 @@ +

impulsex3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_impulsex4.html b/html/includes/jpgraph/docs/html/exframes/image_impulsex4.html new file mode 100644 index 0000000000..e5a654035d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_impulsex4.html @@ -0,0 +1 @@ +

impulsex4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_inyaxisex2.html b/html/includes/jpgraph/docs/html/exframes/image_inyaxisex2.html new file mode 100644 index 0000000000..5fb9325768 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_inyaxisex2.html @@ -0,0 +1 @@ +

inyaxisex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_linebarcentex1.html b/html/includes/jpgraph/docs/html/exframes/image_linebarcentex1.html new file mode 100644 index 0000000000..64aacf469a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_linebarcentex1.html @@ -0,0 +1 @@ +

linebarcentex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_lineiconex1.html b/html/includes/jpgraph/docs/html/exframes/image_lineiconex1.html new file mode 100644 index 0000000000..59d0141c43 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_lineiconex1.html @@ -0,0 +1 @@ +

lineiconex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_lineiconex2.html b/html/includes/jpgraph/docs/html/exframes/image_lineiconex2.html new file mode 100644 index 0000000000..3ab1c87304 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_lineiconex2.html @@ -0,0 +1 @@ +

lineiconex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_listfontsex1.html b/html/includes/jpgraph/docs/html/exframes/image_listfontsex1.html new file mode 100644 index 0000000000..8b1086c06e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_listfontsex1.html @@ -0,0 +1 @@ +

listfontsex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_logbarex1.html b/html/includes/jpgraph/docs/html/exframes/image_logbarex1.html new file mode 100644 index 0000000000..3366daf34b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_logbarex1.html @@ -0,0 +1 @@ +

logbarex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_loglogex1.html b/html/includes/jpgraph/docs/html/exframes/image_loglogex1.html new file mode 100644 index 0000000000..2ba88ae40a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_loglogex1.html @@ -0,0 +1 @@ +

loglogex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_manscaleex1.html b/html/includes/jpgraph/docs/html/exframes/image_manscaleex1.html new file mode 100644 index 0000000000..544fe4696f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_manscaleex1.html @@ -0,0 +1 @@ +

manscaleex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_manscaleex2.html b/html/includes/jpgraph/docs/html/exframes/image_manscaleex2.html new file mode 100644 index 0000000000..187e20ff7a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_manscaleex2.html @@ -0,0 +1 @@ +

manscaleex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_manscaleex3.html b/html/includes/jpgraph/docs/html/exframes/image_manscaleex3.html new file mode 100644 index 0000000000..2d8b6a480e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_manscaleex3.html @@ -0,0 +1 @@ +

manscaleex3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_manscaleex4.html b/html/includes/jpgraph/docs/html/exframes/image_manscaleex4.html new file mode 100644 index 0000000000..8ae1317c7f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_manscaleex4.html @@ -0,0 +1 @@ +

manscaleex4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_markflagex1.html b/html/includes/jpgraph/docs/html/exframes/image_markflagex1.html new file mode 100644 index 0000000000..8e9433ee87 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_markflagex1.html @@ -0,0 +1 @@ +

markflagex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_nullvalueex01.html b/html/includes/jpgraph/docs/html/exframes/image_nullvalueex01.html new file mode 100644 index 0000000000..654cfda320 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_nullvalueex01.html @@ -0,0 +1 @@ +

nullvalueex01.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_partiallyfilledlineex1.html b/html/includes/jpgraph/docs/html/exframes/image_partiallyfilledlineex1.html new file mode 100644 index 0000000000..91f19db9ce --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_partiallyfilledlineex1.html @@ -0,0 +1 @@ +

partiallyfilledlineex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_penguin.html b/html/includes/jpgraph/docs/html/exframes/image_penguin.html new file mode 100644 index 0000000000..3c78761b1f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_penguin.html @@ -0,0 +1 @@ +

penguin.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_pie3d_csimex1.html b/html/includes/jpgraph/docs/html/exframes/image_pie3d_csimex1.html new file mode 100644 index 0000000000..a6fbb984aa --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_pie3d_csimex1.html @@ -0,0 +1 @@ +

pie3d_csimex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_pie_csimex1.html b/html/includes/jpgraph/docs/html/exframes/image_pie_csimex1.html new file mode 100644 index 0000000000..01279eea93 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_pie_csimex1.html @@ -0,0 +1 @@ +

pie_csimex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_piec_csimex1.html b/html/includes/jpgraph/docs/html/exframes/image_piec_csimex1.html new file mode 100644 index 0000000000..a991902606 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_piec_csimex1.html @@ -0,0 +1 @@ +

piec_csimex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_piecex1.html b/html/includes/jpgraph/docs/html/exframes/image_piecex1.html new file mode 100644 index 0000000000..73d3a43d1f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_piecex1.html @@ -0,0 +1 @@ +

piecex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_piecex2.html b/html/includes/jpgraph/docs/html/exframes/image_piecex2.html new file mode 100644 index 0000000000..e595949373 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_piecex2.html @@ -0,0 +1 @@ +

piecex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_pieex3.html b/html/includes/jpgraph/docs/html/exframes/image_pieex3.html new file mode 100644 index 0000000000..d0092210ae --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_pieex3.html @@ -0,0 +1 @@ +

pieex3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_pieex8.html b/html/includes/jpgraph/docs/html/exframes/image_pieex8.html new file mode 100644 index 0000000000..6de5556ec2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_pieex8.html @@ -0,0 +1 @@ +

pieex8.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_pieex9.html b/html/includes/jpgraph/docs/html/exframes/image_pieex9.html new file mode 100644 index 0000000000..532aa2d4ae --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_pieex9.html @@ -0,0 +1 @@ +

pieex9.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_pielabelsex1.html b/html/includes/jpgraph/docs/html/exframes/image_pielabelsex1.html new file mode 100644 index 0000000000..8ce3cf7b11 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_pielabelsex1.html @@ -0,0 +1 @@ +

pielabelsex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_pielabelsex2.html b/html/includes/jpgraph/docs/html/exframes/image_pielabelsex2.html new file mode 100644 index 0000000000..92866d9a0f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_pielabelsex2.html @@ -0,0 +1 @@ +

pielabelsex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_pielabelsex4.html b/html/includes/jpgraph/docs/html/exframes/image_pielabelsex4.html new file mode 100644 index 0000000000..7fc65e5d8e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_pielabelsex4.html @@ -0,0 +1 @@ +

pielabelsex4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_polarex0-180.html b/html/includes/jpgraph/docs/html/exframes/image_polarex0-180.html new file mode 100644 index 0000000000..626d60137c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_polarex0-180.html @@ -0,0 +1 @@ +

polarex0-180.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_polarex0.html b/html/includes/jpgraph/docs/html/exframes/image_polarex0.html new file mode 100644 index 0000000000..85264f615e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_polarex0.html @@ -0,0 +1 @@ +

polarex0.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_polarex3-lin.html b/html/includes/jpgraph/docs/html/exframes/image_polarex3-lin.html new file mode 100644 index 0000000000..5e87e0695b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_polarex3-lin.html @@ -0,0 +1 @@ +

polarex3-lin.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_polarex3.html b/html/includes/jpgraph/docs/html/exframes/image_polarex3.html new file mode 100644 index 0000000000..e6d01110db --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_polarex3.html @@ -0,0 +1 @@ +

polarex3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_polarex4.html b/html/includes/jpgraph/docs/html/exframes/image_polarex4.html new file mode 100644 index 0000000000..96c0cc8af8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_polarex4.html @@ -0,0 +1 @@ +

polarex4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_polarex5.html b/html/includes/jpgraph/docs/html/exframes/image_polarex5.html new file mode 100644 index 0000000000..b1a03d2acc --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_polarex5.html @@ -0,0 +1 @@ +

polarex5.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_polarex7-2.html b/html/includes/jpgraph/docs/html/exframes/image_polarex7-2.html new file mode 100644 index 0000000000..8d9767fb0d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_polarex7-2.html @@ -0,0 +1 @@ +

polarex7-2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_polarex9.html b/html/includes/jpgraph/docs/html/exframes/image_polarex9.html new file mode 100644 index 0000000000..a247781d2e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_polarex9.html @@ -0,0 +1 @@ +

polarex9.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_radarex1.html b/html/includes/jpgraph/docs/html/exframes/image_radarex1.html new file mode 100644 index 0000000000..301d279aa0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_radarex1.html @@ -0,0 +1 @@ +

radarex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_radarex2.html b/html/includes/jpgraph/docs/html/exframes/image_radarex2.html new file mode 100644 index 0000000000..e127214958 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_radarex2.html @@ -0,0 +1 @@ +

radarex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_radarex4.html b/html/includes/jpgraph/docs/html/exframes/image_radarex4.html new file mode 100644 index 0000000000..5bc114be3c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_radarex4.html @@ -0,0 +1 @@ +

radarex4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_radarex6.1.html b/html/includes/jpgraph/docs/html/exframes/image_radarex6.1.html new file mode 100644 index 0000000000..ee34bc6db6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_radarex6.1.html @@ -0,0 +1 @@ +

radarex6.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_radarex6.html b/html/includes/jpgraph/docs/html/exframes/image_radarex6.html new file mode 100644 index 0000000000..832ceea40d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_radarex6.html @@ -0,0 +1 @@ +

radarex6.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_radarex7.html b/html/includes/jpgraph/docs/html/exframes/image_radarex7.html new file mode 100644 index 0000000000..dfe4b33fd2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_radarex7.html @@ -0,0 +1 @@ +

radarex7.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_radarex8.1.html b/html/includes/jpgraph/docs/html/exframes/image_radarex8.1.html new file mode 100644 index 0000000000..cccbc25320 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_radarex8.1.html @@ -0,0 +1 @@ +

radarex8.1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_radarex8.html b/html/includes/jpgraph/docs/html/exframes/image_radarex8.html new file mode 100644 index 0000000000..e06dbfdc84 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_radarex8.html @@ -0,0 +1 @@ +

radarex8.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_radarmarkex1.html b/html/includes/jpgraph/docs/html/exframes/image_radarmarkex1.html new file mode 100644 index 0000000000..900a25ed04 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_radarmarkex1.html @@ -0,0 +1 @@ +

radarmarkex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_rotex0.html b/html/includes/jpgraph/docs/html/exframes/image_rotex0.html new file mode 100644 index 0000000000..8f3900d64e --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_rotex0.html @@ -0,0 +1 @@ +

rotex0.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_rotex1.html b/html/includes/jpgraph/docs/html/exframes/image_rotex1.html new file mode 100644 index 0000000000..83a3ea5683 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_rotex1.html @@ -0,0 +1 @@ +

rotex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_rotex2.html b/html/includes/jpgraph/docs/html/exframes/image_rotex2.html new file mode 100644 index 0000000000..f39305c7e2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_rotex2.html @@ -0,0 +1 @@ +

rotex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_rotex3.html b/html/includes/jpgraph/docs/html/exframes/image_rotex3.html new file mode 100644 index 0000000000..7b80196d0a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_rotex3.html @@ -0,0 +1 @@ +

rotex3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_rotex4.html b/html/includes/jpgraph/docs/html/exframes/image_rotex4.html new file mode 100644 index 0000000000..0b9d73c679 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_rotex4.html @@ -0,0 +1 @@ +

rotex4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_rotex5.html b/html/includes/jpgraph/docs/html/exframes/image_rotex5.html new file mode 100644 index 0000000000..5b7f362cf9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_rotex5.html @@ -0,0 +1 @@ +

rotex5.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_scatter_csimex1.html b/html/includes/jpgraph/docs/html/exframes/image_scatter_csimex1.html new file mode 100644 index 0000000000..9dd99e1e38 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_scatter_csimex1.html @@ -0,0 +1 @@ +

scatter_csimex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_scatterex1.html b/html/includes/jpgraph/docs/html/exframes/image_scatterex1.html new file mode 100644 index 0000000000..220503ef1f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_scatterex1.html @@ -0,0 +1 @@ +

scatterex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_scatterex2.html b/html/includes/jpgraph/docs/html/exframes/image_scatterex2.html new file mode 100644 index 0000000000..0e78409459 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_scatterex2.html @@ -0,0 +1 @@ +

scatterex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex1.html b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex1.html new file mode 100644 index 0000000000..c0516f1659 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex1.html @@ -0,0 +1 @@ +

smallstaticbandsex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex10.html b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex10.html new file mode 100644 index 0000000000..7800866801 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex10.html @@ -0,0 +1 @@ +

smallstaticbandsex10.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex2.html b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex2.html new file mode 100644 index 0000000000..6e47983739 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex2.html @@ -0,0 +1 @@ +

smallstaticbandsex2.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex3.html b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex3.html new file mode 100644 index 0000000000..3cd9815c95 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex3.html @@ -0,0 +1 @@ +

smallstaticbandsex3.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex4.html b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex4.html new file mode 100644 index 0000000000..b267e76ad0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex4.html @@ -0,0 +1 @@ +

smallstaticbandsex4.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex5.html b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex5.html new file mode 100644 index 0000000000..0ec9600848 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex5.html @@ -0,0 +1 @@ +

smallstaticbandsex5.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex6.html b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex6.html new file mode 100644 index 0000000000..19687b22d9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex6.html @@ -0,0 +1 @@ +

smallstaticbandsex6.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex7.html b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex7.html new file mode 100644 index 0000000000..ec22b8277a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex7.html @@ -0,0 +1 @@ +

smallstaticbandsex7.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex8.html b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex8.html new file mode 100644 index 0000000000..f01442546c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex8.html @@ -0,0 +1 @@ +

smallstaticbandsex8.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex9.html b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex9.html new file mode 100644 index 0000000000..388dc9a284 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_smallstaticbandsex9.html @@ -0,0 +1 @@ +

smallstaticbandsex9.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_splineex1.html b/html/includes/jpgraph/docs/html/exframes/image_splineex1.html new file mode 100644 index 0000000000..ba57514af4 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_splineex1.html @@ -0,0 +1 @@ +

splineex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_staticbandbarex7.html b/html/includes/jpgraph/docs/html/exframes/image_staticbandbarex7.html new file mode 100644 index 0000000000..df88b18d12 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_staticbandbarex7.html @@ -0,0 +1 @@ +

staticbandbarex7.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_stockex1.html b/html/includes/jpgraph/docs/html/exframes/image_stockex1.html new file mode 100644 index 0000000000..faf024f631 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_stockex1.html @@ -0,0 +1 @@ +

stockex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_tabtitleex1.html b/html/includes/jpgraph/docs/html/exframes/image_tabtitleex1.html new file mode 100644 index 0000000000..6e36cf6970 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_tabtitleex1.html @@ -0,0 +1 @@ +

tabtitleex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_textalignex1.html b/html/includes/jpgraph/docs/html/exframes/image_textalignex1.html new file mode 100644 index 0000000000..0b06c328f5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_textalignex1.html @@ -0,0 +1 @@ +

textalignex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_titlecsimex01.html b/html/includes/jpgraph/docs/html/exframes/image_titlecsimex01.html new file mode 100644 index 0000000000..6bd177dbf6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_titlecsimex01.html @@ -0,0 +1 @@ +

titlecsimex01.php

diff --git a/html/includes/jpgraph/docs/html/exframes/image_topxaxisex1.html b/html/includes/jpgraph/docs/html/exframes/image_topxaxisex1.html new file mode 100644 index 0000000000..b9933cd1d9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/image_topxaxisex1.html @@ -0,0 +1 @@ +

topxaxisex1.php

diff --git a/html/includes/jpgraph/docs/html/exframes/imgmarkercsimex1.html b/html/includes/jpgraph/docs/html/exframes/imgmarkercsimex1.html new file mode 100644 index 0000000000..a7a169f60d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/imgmarkercsimex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_scatter.php");

$datay1 = array(4,26,15,44);

// Setup the graph
$graph = new Graph(300,200);
$graph->SetMarginColor('white');
$graph->SetScale("textlin");
$graph->SetFrame(false);
$graph->SetMargin(30,5,25,20);

// Setup the tab
$graph->tabtitle->Set(' Year 2003 ' );
$graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,13);
$graph->tabtitle->SetColor('darkred','#E1E1FF');

// Enable X-grid as well
$graph->xgrid->Show();

// Use months as X-labels
$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());

// Create the plot
$p1 = new LinePlot($datay1);
$p1->SetColor("navy");

$p1->SetCSIMTargets(array('#1','#2','#3','#4','#5'));

// Use an image of favourite car as 
$p1->mark->SetType(MARK_IMG,'saab_95.jpg',0.5);
//$p1->mark->SetType(MARK_SQUARE);

// Displayes value on top of marker image
$p1->value->SetFormat('%d mil');
$p1->value->Show();
$p1->value->SetColor('darkred');
$p1->value->SetFont(FF_ARIAL,FS_BOLD,10);
// Increase the margin so that the value is printed avove tje
// img marker
$p1->value->SetMargin(14);

// Incent the X-scale so the first and last point doesn't
// fall on the edges
$p1->SetCenter();

$graph->Add($p1);

$graph->StrokeCSIM('imgmarkercsimex1.php');

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/imgmarkerex1.html b/html/includes/jpgraph/docs/html/exframes/imgmarkerex1.html new file mode 100644 index 0000000000..bd070a7182 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/imgmarkerex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_scatter.php");

$datay1 = array(4,26,15,44);

// Setup the graph
$graph = new Graph(300,200);
$graph->SetMarginColor('white');
$graph->SetScale("textlin");
$graph->SetFrame(false);
$graph->SetMargin(30,5,25,20);

// Setup the tab
$graph->tabtitle->Set(' Year 2003 ' );
$graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,13);
$graph->tabtitle->SetColor('darkred','#E1E1FF');

// Enable X-grid as well
$graph->xgrid->Show();

// Use months as X-labels
$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());

// Create the plot
$p1 = new LinePlot($datay1);
$p1->SetColor("navy");

// Use an image of favourite car as marker
$p1->mark->SetType(MARK_IMG,'saab_95.jpg',0.5);

// Displayes value on top of marker image
$p1->value->SetFormat('%d mil');
$p1->value->Show();
$p1->value->SetColor('darkred');
$p1->value->SetFont(FF_ARIAL,FS_BOLD,10);
// Increase the margin so that the value is printed avove tje
// img marker
$p1->value->SetMargin(14);

// Incent the X-scale so the first and last point doesn't
// fall on the edges
$p1->SetCenter();

$graph->Add($p1);

$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/impulsex1.html b/html/includes/jpgraph/docs/html/exframes/impulsex1.html new file mode 100644 index 0000000000..075c0e9ff2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/impulsex1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_scatter.php");

$datay = array(20,22,12,13,17,20,16,19,30,31,40,43);

$graph = new Graph(300,200,"auto");
$graph->SetScale("textlin");

$graph->SetShadow();
$graph->img->SetMargin(40,40,40,40);        

$graph->title->Set("Simple mpuls plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$sp1 = new ScatterPlot($datay);
$sp1->mark->SetType(MARK_SQUARE);
$sp1->SetImpuls();

$graph->Add($sp1);
$graph->Stroke();

?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/impulsex2.html b/html/includes/jpgraph/docs/html/exframes/impulsex2.html new file mode 100644 index 0000000000..3fe23929d8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/impulsex2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_scatter.php");

$datay = array(20,22,12,13,17,20,16,19,30,31,40,43);

$graph = new Graph(300,200,"auto");
$graph->SetScale("textlin");

$graph->SetShadow();
$graph->img->SetMargin(40,40,40,40);        

$graph->title->Set("Impuls plot, variant 2");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->Set("Impuls respons");
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

$sp1 = new ScatterPlot($datay);//,$datax);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
$sp1->mark->SetFillColor("red");
$sp1->mark->SetWidth(4);
$sp1->SetImpuls();
$sp1->SetColor("blue");
$sp1->SetWeight(3);

$graph->Add($sp1);
$graph->Stroke();

?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/impulsex3.html b/html/includes/jpgraph/docs/html/exframes/impulsex3.html new file mode 100644 index 0000000000..b478d6da94 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/impulsex3.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_scatter.php");

$numpoints=50;
$k=0.05;

// Create some data points
for($i=0$i<$numpoints; ++$i) {
    
$datay[$i]=exp(-$k*$i)*cos(2*M_PI/10*$i);
}

// A format callbakc function
function mycallback($l) {
    return 
sprintf("%02.2f",$l);
}

// Setup the basic parameters for the graph
$graph = new Graph(400,200,"auto");
$graph->SetScale("intlin");
$graph->SetShadow();
$graph->SetBox();

$graph->title->Set("Impuls Example 3");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Set format callback for labels
$graph->yaxis->SetLabelFormatCallback("mycallback");

// Set X-axis at the minimum value of Y-axis (default will be at 0)
$graph->xaxis->SetPos("min");    // "min" will position the x-axis at the minimum value of the Y-axis

// Extend the margin for the labels on the Y-axis and reverse the direction
// of the ticks on the Y-axis
$graph->yaxis->SetLabelMargin(12);
$graph->xaxis->SetLabelMargin(6);
$graph->yaxis->SetTickSide(SIDE_LEFT);
$graph->xaxis->SetTickSide(SIDE_DOWN);

// Create a new impuls type scatter plot
$sp1 = new ScatterPlot($datay);
$sp1->mark->SetType(MARK_SQUARE);
$sp1->mark->SetFillColor("red");
$sp1->SetImpuls();
$sp1->SetColor("blue");
$sp1->SetWeight(1);
$sp1->mark->SetWidth(3);

$graph->Add($sp1);

$graph->Stroke();

?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/impulsex4.html b/html/includes/jpgraph/docs/html/exframes/impulsex4.html new file mode 100644 index 0000000000..57f8e4e331 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/impulsex4.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_scatter.php");
include (
"../jpgraph_line.php");

$numpoints=50;
$k=0.05;

// Create some data points
for($i=-$numpoints+1$i<0; ++$i) {
    
$datay[$i+$numpoints-1]=exp($k*$i)*cos(2*M_PI/10*$i)*14;
    
$datayenv[$i+$numpoints-1]=exp($k*$i)*14;
    
$datax[$i+$numpoints-1]=$i;
}

for(
$i=0$i<$numpoints; ++$i) {
    
$datay[$i+$numpoints-1]=exp(-$k*$i)*cos(2*M_PI/10*$i)*14;
    
$datayenv[$i+$numpoints-1]=exp(-$k*$i)*14;
    
$datax[$i+$numpoints-1]=$i;
}

// Setup the basic parameters for the graph
$graph = new Graph(500,250,"auto");
$graph->SetScale("intlin");

$graph->SetShadow();
$graph->SetBox();
$graph->title->Set("Impuls Example 4");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Set some other color then the boring default
$graph->SetColor("lightyellow");
$graph->SetMarginColor("khaki");

// Set legend box specification
$graph->legend->SetFillColor("white");
$graph->legend->SetLineWeight(2);

// Set X-axis at the minimum value of Y-axis (default will be at 0)
$graph->xaxis->SetPos("min");    // "min" will position the x-axis at the minimum value of the Y-axis

// Extend the margin for the labels on the Y-axis and reverse the direction
// of the ticks on the Y-axis
$graph->yaxis->SetLabelMargin(12);
$graph->xaxis->SetLabelMargin(6);
$graph->yaxis->SetTickSide(SIDE_LEFT);
$graph->xaxis->SetTickSide(SIDE_DOWN);

// Add mark graph with static lines
$line = new PlotLine(HORIZONTAL,0,"black",2);
$graph->AddLine($line);

// Create a new impuls type scatter plot
$sp1 = new ScatterPlot($datay,$datax);
$sp1->mark->SetType(MARK_SQUARE);
$sp1->mark->SetFillColor("red");
$sp1->mark->SetWidth(3);

$sp1->SetImpuls();
$sp1->SetColor("blue");
$sp1->SetWeight(1);
$sp1->SetLegend("Non-causal signal");

$graph->Add($sp1);

// Create the envelope plot
$ep1 = new LinePlot($datayenv,$datax);
$ep1->SetStyle("dotted");
$ep1->SetLegend("Positive envelope");

$graph->Add($ep1);

$graph->Stroke();

?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/inyaxisex2.html b/html/includes/jpgraph/docs/html/exframes/inyaxisex2.html new file mode 100644 index 0000000000..d2ac099318 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/inyaxisex2.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

// Callback to negate the argument
function _cb_negate($aVal) {
    return 
round(-$aVal);
}

// A fake depth curve
$ydata = array(0,1,4,5,8,9,10,14,16,16,16,18,20,20,20,22,22.5,22,19,19,15,15,15,15,10,10,10,6,5,5,5,4,4,2,1,0);

// Negate all data
$n count($ydata);
for(
$i=0$i<$n; ++$i) {
    
$ydata[$i] = round(-$ydata[$i]);
}

// Basic graph setup
$graph = new Graph(400,300,"auto");
$graph->SetScale("linlin");
$graph->img->SetMargin(50,50,60,40);    
$graph->SetMarginColor('darkblue');
$graph->SetColor('darkblue');
$graph->SetAxisStyle(AXSTYLE_BOXOUT);
$graph->SetBackgroundImage("blueblack400x300grad.png",1);
//$graph->SetBackgroundImage("lightbluedarkblue400x300grad.png",1);

$graph->title->Set("Depth curve. Dive #2");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->title->SetColor("white");

$graph->subtitle->Set("(Negated Y-axis)");
$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL);
$graph->subtitle->SetColor("white");

// Setup axis
$graph->yaxis->SetLabelFormatCallback("_cb_negate");
$graph->xaxis->SetColor("lightblue","white");
$graph->yaxis->SetColor("lightblue","white");
$graph->ygrid->SetColor("blue");


$lp1 = new LinePlot($ydata);
$lp1->SetColor("yellow");
$lp1->SetWeight(2);


$graph->Add($lp1);
$graph->Stroke();
?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/linebarcentex1.html b/html/includes/jpgraph/docs/html/exframes/linebarcentex1.html new file mode 100644 index 0000000000..35eb4d3433 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/linebarcentex1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_bar.php");

$l1datay = array(11,9,2,4,3,13,17);
$l2datay = array(23,12,5,19,17,10,15);

$datax=$gDateLocale->GetShortMonth();

// Create the graph. 
$graph = new Graph(400,200,"auto");    
$graph->SetScale("textlin");
$graph->SetMargin(40,130,20,40);
$graph->SetShadow();
$graph->xaxis->SetTickLabels($datax);

// Create the linear error plot
$l1plot=new LinePlot($l1datay);
$l1plot->SetColor("red");
$l1plot->SetWeight(2);
$l1plot->SetLegend("Prediction");

//Center the line plot in the center of the bars
$l1plot->SetBarCenter();


// Create the bar plot
$bplot = new BarPlot($l2datay);
$bplot->SetFillColor("orange");
$bplot->SetLegend("Result");

// Add the plots to t'he graph
$graph->Add($bplot);
$graph->Add($l1plot);


$graph->title->Set("Adding a line plot to a bar graph v1");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);


// Display the graph
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/lineiconex1.html b/html/includes/jpgraph/docs/html/exframes/lineiconex1.html new file mode 100644 index 0000000000..0b24addcd5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/lineiconex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_iconplot.php");


//$datay = array(20,15,23,15,17,35,22);
$datay = array(30,25,33,25,27,45,32);
$datay2 = array(3,25,10,15,50,5,18);
$datay3 = array(10,5,10,15,5,2,1);

// Setup the graph
$graph = new Graph(400,250);
$graph->SetMargin(40,40,20,30);    
$graph->SetScale("textlin");

$graph->title->Set('Adding an icon ("tux") in the background');
$graph->title->SetFont(FF_ARIAL,FS_NORMAL,12);

//$graph->SetBackgroundGradient('red','blue');

$graph->xaxis->SetPos('min');

$p1 = new LinePlot($datay);
$p1->SetColor("blue");
$p1->SetFillGradient('yellow@0.4','red@0.4');

$p2 = new LinePlot($datay2);
$p2->SetColor("black");
$p2->SetFillGradient('green@0.4','white');

$p3 = new LinePlot($datay3);
$p3->SetColor("blue");
$p3->SetFillGradient('navy@0.4','white@0.4');

$graph->Add($p1);
$graph->Add($p2);
$graph->Add($p3);

$icon = new IconPlot('penguin.png',0.2,0.3,1,30);
$icon->SetAnchor('center','center');
$graph->Add($icon);

// Output line
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/lineiconex2.html b/html/includes/jpgraph/docs/html/exframes/lineiconex2.html new file mode 100644 index 0000000000..dae7ad608b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/lineiconex2.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_flags.php");
include (
"../jpgraph_iconplot.php");

$datay = array(30,25,33,25,27,45,32);

// Setup the graph
$graph = new Graph(400,250);
$graph->SetMargin(40,40,20,30);    
$graph->SetScale("textlin");

$graph->title->Set('Adding a country flag as a an icon');

$p1 = new LinePlot($datay);
$p1->SetColor("blue");
$p1->SetFillGradient('yellow@0.4','red@0.4');

$graph->Add($p1);

$icon = new IconPlot();
$icon->SetCountryFlag('iceland',50,30,1.5,40,3);
$icon->SetAnchor('left','top');
$graph->Add($icon);

// Output line
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/listfontsex1.html b/html/includes/jpgraph/docs/html/exframes/listfontsex1.html new file mode 100644 index 0000000000..0760a3b546 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/listfontsex1.html @@ -0,0 +1,3 @@ + +<?php
// $Id: listfontsex1.php,v 1.3 2002/10/25 22:44:15 aditus Exp $
include "../jpgraph.php";
include 
"../jpgraph_canvas.php";
include 
"../jpgraph_canvtools.php";


$g = new CanvasGraph(550,450,'auto');
$scale = new CanvasScale($g);
$scale->Set(0,27,0,53);
$g->SetMargin(5,6,5,6);
$g->SetColor('white');
$g->SetMarginColor("teal");
$g->InitFrame();


$t = new CanvasRectangleText();
$t->SetFillColor('lightgreen');
$t->SetFontColor('navy');
$t->SetFont(FF_ARIAL,FS_NORMAL,16);
$t->Set("\n\n\n\n\n\n\n\n\n\n\nTTF Fonts",0.5,19,26,32);
$t->Stroke($g->img,$scale);


$t = new CanvasRectangleText();

$t->SetFillColor('');
$t->SetFontColor('black');
$t->SetColor('');
$t->SetShadow('');
$t->SetFont(FF_ARIAL,FS_BOLD,18);
$t->Set('Family',1,1,8);
$t->Stroke($g->img,$scale);

$t->Set('Italic style',9,1,8);
$t->Stroke($g->img,$scale);

$t->Set('Bold style',17.5,1,8);
$t->Stroke($g->img,$scale);


$t->SetFillColor('yellow');
$t->SetFontColor('black');
$t->SetColor('black');
$t->SetShadow('gray');

$r=6;$c=1;$w=7.5;$h=3.5;

$fonts=array(
    array(
"Font 0",FF_FONT0,FS_NORMAL),
    array(
"",FF_FONT0,FS_ITALIC),
    array(
"",FF_FONT0,FS_BOLD),

    array(
"Font 1",FF_FONT1,FS_NORMAL),
    array(
"",FF_FONT1,FS_ITALIC),
    array(
"Font 1 bold",FF_FONT1,FS_BOLD),

    array(
"Font 2",FF_FONT2,FS_NORMAL),
    array(
"",FF_FONT2,FS_ITALIC),
    array(
"Font 2 bold",FF_FONT2,FS_BOLD),

    array(
"Arial",FF_ARIAL,FS_NORMAL),
    array(
"Arial italic",FF_ARIAL,FS_ITALIC),
    array(
"Arial bold",FF_ARIAL,FS_BOLD),

    array(
"Verdana",FF_VERDANA,FS_NORMAL),
    array(
"Verdana italic",FF_VERDANA,FS_ITALIC),
    array(
"Verdana bold",FF_VERDANA,FS_BOLD),


    array(
"Trebuche",FF_TREBUCHE,FS_NORMAL),
    array(
"Trebuche italic",FF_TREBUCHE,FS_ITALIC),
    array(
"Trebuche bold",FF_TREBUCHE,FS_BOLD),

    array(
"Georgia",FF_GEORGIA,FS_NORMAL),
    array(
"Georgia italic",FF_GEORGIA,FS_ITALIC),
    array(
"Georgia bold",FF_GEORGIA,FS_BOLD),

    array(
"Comic",FF_COMIC,FS_NORMAL),
    array(
"",FF_COMIC,FS_ITALIC),
    array(
"Comic bold",FF_COMIC,FS_BOLD),

    array(
"Courier",FF_COURIER,FS_NORMAL),
    array(
"Courier italic",FF_COURIER,FS_ITALIC),
    array(
"Courier bold",FF_COURIER,FS_BOLD),


    array(
"Times normal",FF_TIMES,FS_NORMAL),
    array(
"Times italic",FF_TIMES,FS_ITALIC),
    array(
"Times bold italic",FF_TIMES,FS_BOLDITALIC),
    );


$n=count($fonts);

for( 
$i=0$i $n; ++$i ) {
    
    if( 
$i==$r += 3;

    if( 
$fonts[$i][0] ) {
    
$t->SetTxt($fonts[$i][0]);
    
$t->SetPos($c,$r,$w,$h);
    
$t->SetFont($fonts[$i][1],$fonts[$i][2],13);
    
$t->Stroke($g->img,$scale);
    }

    
$c += $w+1;
    if( 
$c 30-$w-) {
    
$c 1;
    
$r += 4;
    }

}

$g->Stroke();
?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/logbarex1.html b/html/includes/jpgraph/docs/html/exframes/logbarex1.html new file mode 100644 index 0000000000..42688c61bb --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/logbarex1.html @@ -0,0 +1,4 @@ + +<?php
// $Id: logbarex1.php,v 1.4 2003/05/30 20:12:43 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_log.php");
include (
"../jpgraph_bar.php");

$datay=array(4,13,30,28,12,45,30,12,55,3,0.5);
$datax=array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov");

// Create the graph. 
$graph = new Graph(400,220,'auto');    
//$graph->img->SetMargin(50,30,50,50);
$graph->SetScale("textlog");
//$graph->SetShadow();

// Setup titles for graph and axis
$graph->title->Set("Bar with logarithmic Y-scale");
$graph->title->SetFont(FF_VERDANA,FS_NORMAL,18);

$graph->xaxis->SetTitle("2002");
$graph->xaxis->title->SetFont(FF_ARIAL,FS_NORMAL,16);

$graph->yaxis->title->SetFont(FF_ARIAL,FS_NORMAL,16);
$graph->yaxis->SetTitle("Y-title",'center');
$graph->yaxis->SetTitleMargin(30);

// Setup month on X-scale
//$graph->xaxis->SetTickLabels($datax);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("orange");

//You can also set a manual base of the bars
//$bplot->SetYBase(0.001);

/*
$bplot->SetShadow();
$bplot->value->Show();
$bplot->value->SetFont(FF_ARIAL,FS_BOLD);
$bplot->value->SetAngle(45);
$bplot->value->SetColor("black","darkred");
*/

$graph->Add($bplot);

$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/loglogex1.html b/html/includes/jpgraph/docs/html/exframes/loglogex1.html new file mode 100644 index 0000000000..c3dd01982b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/loglogex1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_log.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_scatter.php");


$ab2  = array( 1.5,  2.0,  2.5,  3.0,  4.0,  5.0,  6.0,  8.010.0,
              
12.015.020.025.030.040.050.060.0 ,75.0,
              
100.125.150.);
$mn2  = array( 0.5,  0.5,  0.5,  0.5,  0.8,  0.8,  0.8,  0.8,  1.0,
               
1.0,  1.0,  1.0,  1.0,  2.0,  2.0,  2.0,  2.0,  2.0,
               
5.0,  5.0,  5.0);
$rhos = array(30.031.032.034.035.537.538.039.541.5,
              
43.041.042.042.545.049.053.558.066.5,
              
75.081.089.0);

// Create the graph.
$graph = new Graph(500,300,"auto");     
$graph->SetScale("loglog");              
$graph->SetY2Scale("lin");               
$graph->y2axis->SetColor("blue","blue"); 

$graph->img->SetMargin(50,70,40,50);     
$graph->title->Set("Geoelektrik");       
$graph->xaxis->title->Set("Auslage ab/2 [m]");  
$graph->yaxis->title->Set("rho_s [Ohm m]");     
$graph->y2axis->title->Set("mn/2 [m]");         
$graph->y2axis->title->SetColor("blue");
$graph->y2axis->SetTitleMargin(35);
$graph->title->SetFont(FF_FONT1,FS_BOLD);       
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); 
$graph->xgrid->Show(true,true);                  
$graph->ygrid->Show(true,true);                  

// Create the linear plot

$lineplot=new LinePlot($rhos,$ab2);       
$lineplot->SetWeight(1);
$lineplot->mark->SetType(MARK_FILLEDCIRCLE);
$lineplot->mark->SetWidth(2);

// Create scatter plot 

$scplot=new ScatterPlot($mn2,$ab2);
$scplot->mark->SetType(MARK_FILLEDCIRCLE);
$scplot->mark->SetColor("blue");
$scplot->mark->SetWidth(2);

// Add plots to the graph

$graph->AddY2($scplot);
$graph->Add($lineplot);

// Display the graph
$graph->Stroke();

?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/manscaleex1.html b/html/includes/jpgraph/docs/html/exframes/manscaleex1.html new file mode 100644 index 0000000000..4e3571a0d8 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/manscaleex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(12,17,22,19,5,15);

$graph = new Graph(220,200);
$graph->SetScale("textlin",3,35);
$graph->yscale->ticks->Set(7,2);

$graph->title->Set('Manual scale, manual ticks');
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$line = new LinePlot($ydata);
$graph->Add($line);

// Output graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/manscaleex2.html b/html/includes/jpgraph/docs/html/exframes/manscaleex2.html new file mode 100644 index 0000000000..7a5a2c082f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/manscaleex2.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(12,17,22,19,5,15);

$graph = new Graph(220,200);
$graph->SetScale("textlin",3,35);

$graph->title->Set('Manual scale, exact limits');
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$line = new LinePlot($ydata);
$graph->Add($line);

// Output graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/manscaleex3.html b/html/includes/jpgraph/docs/html/exframes/manscaleex3.html new file mode 100644 index 0000000000..b7f6720b00 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/manscaleex3.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(12,17,22,19,5,15);

$graph = new Graph(250,200);
$graph->SetScale("textlin",3,35);
$graph->SetTickDensity(TICKD_DENSE);
$graph->yscale->SetAutoTicks();

$graph->title->Set('Manual scale, auto ticks');
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$line = new LinePlot($ydata);
$graph->Add($line);

// Output graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/manscaleex4.html b/html/includes/jpgraph/docs/html/exframes/manscaleex4.html new file mode 100644 index 0000000000..dc4b4f3110 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/manscaleex4.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(12,17,22,19,5,15);

$graph = new Graph(220,200);
$graph->SetScale("textlin",3,35);
$graph->yscale->SetAutoTicks();

$graph->title->Set('Manual scale, allow adjustment');
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$line = new LinePlot($ydata);
$graph->Add($line);

// Output graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/markflagex1.html b/html/includes/jpgraph/docs/html/exframes/markflagex1.html new file mode 100644 index 0000000000..2bfd3883e6 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/markflagex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");
include (
"../jpgraph_scatter.php");

$datay = array(
    array(
4,26,15,44),
    array(
20,51,32,20));

// Setup the graph
$graph = new Graph(300,200);
$graph->SetMarginColor('white');
$graph->SetScale("textlin");
$graph->SetFrame(false);
$graph->SetMargin(30,5,25,20);

// Enable X-grid as well
$graph->xgrid->Show();

// Use months as X-labels
$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());

//------------------------
// Create the plots
//------------------------
$p1 = new LinePlot($datay[0]);
$p1->SetColor("navy");

// Use a flag
$p1->mark->SetType(MARK_FLAG1,'chin');

// Displayes value on top of marker image
$p1->value->SetFormat('%d mil');
$p1->value->Show();
$p1->value->SetColor('darkred');
$p1->value->SetFont(FF_ARIAL,FS_BOLD,10);
// Increase the margin so that the value is printed avove tje
// img marker
$p1->value->SetMargin(14);

// Incent the X-scale so the first and last point doesn't
// fall on the edges
$p1->SetCenter();

$graph->Add($p1);

//------------
// 2:nd plot
//------------
$p2 = new LinePlot($datay[1]);
$p2->SetColor("navy");

// Use a flag
$p2->mark->SetType(MARK_FLAG1,'united states');

// Displayes value on top of marker image
$p2->value->SetFormat('%d mil');
$p2->value->Show();
$p2->value->SetColor('darkred');
$p2->value->SetFont(FF_ARIAL,FS_BOLD,10);
// Increase the margin so that the value is printed avove tje
// img marker
$p2->value->SetMargin(14);

// Incent the X-scale so the first and last point doesn't
// fall on the edges
$p2->SetCenter();
$graph->Add($p2);

$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/nullvalueex01.html b/html/includes/jpgraph/docs/html/exframes/nullvalueex01.html new file mode 100644 index 0000000000..314069f8f9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/nullvalueex01.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

// Some data
$datax = array("2001-04-01","2001-04-02","2001-04-03","2001-04-04","2001-04-05","2001-04-06");
$datay = array(28,13,24,"",90,11);
$data2y = array(11,41,"-",33,"-",63);

// Setup graph
$graph = new Graph(400,250,"auto");
$graph->img->SetMargin(40,150,40,80);    
$graph->SetScale("textlin");
$graph->SetShadow();

//Setup title
$graph->title->Set("Line plot with null values");

// Use built in font
$graph->title->SetFont(FF_COMIC,FS_NORMAL,14);

// Slightly adjust the legend from it's default position
$graph->legend->Pos(0.03,0.5,"right","center");
$graph->legend->SetFont(FF_FONT1,FS_BOLD);

// Setup X-scale
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetFont(FF_ARIAL,FS_NORMAL,8);
$graph->xaxis->SetLabelAngle(45);

// Create the first line
$p1 = new LinePlot($datay);
$p1->mark->SetType(MARK_FILLEDCIRCLE);
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);
$p1->SetColor("blue");
$p1->SetCenter();
$p1->SetLegend("Undefined\nvariant 1");
$graph->Add($p1);

// ... and the second
$p2 = new LinePlot($data2y);
$p2->mark->SetType(MARK_STAR);
$p2->mark->SetFillColor("red");
$p2->mark->SetWidth(4);
$p2->SetColor("red");
$p2->SetCenter();
$p2->SetLegend("Undefined\nvariant 2");
$graph->Add($p2);

// Output line
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/partiallyfilledlineex1.html b/html/includes/jpgraph/docs/html/exframes/partiallyfilledlineex1.html new file mode 100644 index 0000000000..9e96b28411 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/partiallyfilledlineex1.html @@ -0,0 +1,4 @@ + +<?php

include("../jpgraph.php");
include(
"../jpgraph_line.php");

// Some data
$ydata = array(5,10,15,20,15,10,8,7,4,10,5);

// Create the graph
$graph= new Graph(400,300,"auto");
$graph->SetScale("textlin");
$graph->SetShadow(true);
$graph->SetMarginColor("lightblue");

// Setup format for legend
$graph->legend->SetFillColor("antiquewhite");
$graph->legend->SetShadow(true);

// Setup title
$graph->title->Set("Filled Area Example");
$graph->title->SetFont(FF_FONT2,FS_BOLD);

// Setup semi-filled line plot
$lineplot = new LinePlot($ydata);
$lineplot->SetLegend("Semi-filled\nLineplot");

// Set line color
$lineplot->SetColor("black");

// Setup the two areas to be filled
$lineplot->AddArea(2,5,LP_AREA_FILLED,"red");
$lineplot->AddArea(6,8,LP_AREA_FILLED,"green");

// Display the marks on the lines
$lineplot->mark->SetType(MARK_DIAMOND);
$lineplot->mark->SetSize(8);
$lineplot->mark->Show();

// add plot to the graph
$graph->Add($lineplot);

// display graph
$graph->Stroke();
?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/penguin.html b/html/includes/jpgraph/docs/html/exframes/penguin.html new file mode 100644 index 0000000000..9af41a39ad --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/penguin.html @@ -0,0 +1,4 @@ +
+Warning: highlight_file(penguin.php): failed to open stream: No such file or directory in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
+
+Warning: highlight_file(): Failed opening 'penguin.php' for highlighting in /home/ljp/dev/jpgraph/b1/src/Examples/show-source.php on line 1
diff --git a/html/includes/jpgraph/docs/html/exframes/pie3d_csimex1.html b/html/includes/jpgraph/docs/html/exframes/pie3d_csimex1.html new file mode 100644 index 0000000000..fa60ac97ae --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/pie3d_csimex1.html @@ -0,0 +1,3 @@ + +<?php
include_once ("../jpgraph.php");
include_once (
"../jpgraph_pie.php");
include_once (
"../jpgraph_pie3d.php");

//$gJpgBrandTiming=true;

// Some data
$data = array(40,21,17,27,23);

// Create the Pie Graph. 
$graph = new PieGraph(400,200,'auto');
$graph->SetShadow();

// Set A title for the plot
$graph->title->Set("3D Pie Client side image map");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Create
$p1 = new PiePlot3D($data);
$p1->SetLegends(array("Jan (%d)","Feb","Mar","Apr","May","Jun","Jul"));
$targ=array("pie3d_csimex1.php?v=1","pie3d_csimex1.php?v=2","pie3d_csimex1.php?v=3",
            
"pie3d_csimex1.php?v=4","pie3d_csimex1.php?v=5","pie3d_csimex1.php?v=6");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$p1->SetCSIMTargets($targ,$alts);

// Use absolute labels
$p1->SetLabelType(1);
$p1->value->SetFormat("%d kr");

// Move the pie slightly to the left
$p1->SetCenter(0.4,0.5);

$graph->Add($p1);


// Send back the HTML page which will call this script again
// to retrieve the image.
$graph->StrokeCSIM('pie3d_csimex1.php');

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/pie_csimex1.html b/html/includes/jpgraph/docs/html/exframes/pie_csimex1.html new file mode 100644 index 0000000000..8b0a2e8ddc --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/pie_csimex1.html @@ -0,0 +1,3 @@ + +<?php
include_once ("../jpgraph.php");
include_once (
"../jpgraph_pie.php");

// Some data
$data = array(40,21,17,14,23);

// Create the Pie Graph. 
$graph = new PieGraph(300,200,'auto');
$graph->SetShadow();

// Set A title for the plot
$graph->title->Set("Client side image map");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Create
$p1 = new PiePlot($data);
$p1->SetCenter(0.4,0.5);

$p1->SetLegends(array("Jan","Feb","Mar","Apr","May","Jun","Jul"));
$targ=array("pie_csimex1.php#1","pie_csimex1.php#2","pie_csimex1.php#3",
"pie_csimex1.php#4","pie_csimex1.php#5","pie_csimex1.php#6");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$p1->SetCSIMTargets($targ,$alts);

$graph->Add($p1);


// Send back the HTML page which will call this script again
// to retrieve the image.
$graph->StrokeCSIM('pie_csimex1.php');

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/piec_csimex1.html b/html/includes/jpgraph/docs/html/exframes/piec_csimex1.html new file mode 100644 index 0000000000..a270935bcd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/piec_csimex1.html @@ -0,0 +1,3 @@ + +<?php
// $Id: piec_csimex1.php,v 1.1.2.1 2003/10/09 21:05:39 aditus Exp $
// Example of pie with center circle
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

// Some data
$data = array(50,28,25,27,31,20);

// A new pie graph
$graph = new PieGraph(400,400);

// If you don't want any  border just uncomment this line
// $graph->SetFrame(false);

// Uncomment this line to add a drop shadow to the border
// $graph->SetShadow();

// Setup title
$graph->title->Set("CSIM Center Pie plot ex 1");
$graph->title->SetFont(FF_COMIC,FS_BOLD,18);
$graph->title->SetMargin(8); // Add a little bit more margin from the top

// Create the pie plot
$p1 = new PiePlotC($data);

// Set the radius of pie (as fraction of image size)
$p1->SetSize(0.32);

// Move the center of the pie slightly to the top of the image
$p1->SetCenter(0.5,0.45);

// Label font and color setup
$p1->value->SetFont(FF_ARIAL,FS_BOLD,12);
$p1->value->SetColor('white');

// Setup the title on the center circle
$p1->midtitle->Set("Test mid\nRow 1\nRow 2");
$p1->midtitle->SetFont(FF_ARIAL,FS_NORMAL,14);

// Set color for mid circle
$p1->SetMidColor('yellow');

// Use percentage values in the legends values (This is also the default)
$p1->SetLabelType(PIE_VALUE_PER);

// The label array values may have printf() formatting in them. The argument to the
// form,at string will be the value of the slice (either the percetage or absolute
// depending on what was specified in the SetLabelType() above.
$lbl = array("adam\n%.1f%%","bertil\n%.1f%%","johan\n%.1f%%",
         
"peter\n%.1f%%","daniel\n%.1f%%","erik\n%.1f%%");
$p1->SetLabels($lbl);

// Uncomment this line to remove the borders around the slices
// $p1->ShowBorder(false);

// Add drop shadow to slices
$p1->SetShadow();

// Explode all slices 15 pixels
$p1->ExplodeAll(15);

// Setup the CSIM targets
$targ=array("piec_csimex1.php#1","piec_csimex1.php#2","piec_csimex1.php#3",
        
"piec_csimex1.php#4","piec_csimex1.php#5","piec_csimex1.php#6");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$p1->SetCSIMTargets($targ,$alts);
$p1->SetMidCSIM("piec_csimex1.php#7","Center");


// Setup a small help text in the image
$txt = new Text("Note: This is an example of image map. Hold\nyour mouse over the slices to see the values.\nThe URL just points back to this page");
$txt->SetFont(FF_FONT1,FS_BOLD);
$txt->Pos(0.5,0.97,'center','bottom');
$txt->SetBox('yellow','black');
$txt->SetShadow();
$graph->AddText($txt);

// Add plot to pie graph
$graph->Add($p1);

// .. and send the image on it's marry way to the browser
$graph->StrokeCSIM('piec_csimex1.php');

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/piecex1.html b/html/includes/jpgraph/docs/html/exframes/piecex1.html new file mode 100644 index 0000000000..4a3da724a2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/piecex1.html @@ -0,0 +1,3 @@ + +<?php
// $Id
// Example of pie with center circle
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

// Some data
$data = array(50,28,25,27,31,20);

// A new pie graph
$graph = new PieGraph(300,300,'auto');

// Setup title
$graph->title->Set("Pie plot with center circle");
$graph->title->SetFont(FF_COMIC,FS_BOLD,14);
$graph->title->SetMargin(8); // Add a little bit more margin from the top

// Create the pie plot
$p1 = new PiePlotC($data);

// Set size of pie
$p1->SetSize(0.32);

// Label font and color setup
$p1->value->SetFont(FF_ARIAL,FS_BOLD,10);
$p1->value->SetColor('black');

// Setup the title on the center circle
$p1->midtitle->Set("Test mid\nRow 1\nRow 2");
$p1->midtitle->SetFont(FF_COMIC,FS_NORMAL,10);

// Set color for mid circle
$p1->SetMidColor('yellow');

// Use percentage values in the legends values (This is also the default)
$p1->SetLabelType(PIE_VALUE_PER);

// Add plot to pie graph
$graph->Add($p1);

// .. and send the image on it's marry way to the browser
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/piecex2.html b/html/includes/jpgraph/docs/html/exframes/piecex2.html new file mode 100644 index 0000000000..a1cd605263 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/piecex2.html @@ -0,0 +1,3 @@ + +<?php
// $Id: piecex2.php,v 1.3.2.1 2003/08/19 20:40:12 aditus Exp $
// Example of pie with center circle
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

// Some data
$data = array(50,28,25,27,31,20);

// A new pie graph
$graph = new PieGraph(400,400,'auto');

// Don't display the border
$graph->SetFrame(false);

// Uncomment this line to add a drop shadow to the border
// $graph->SetShadow();

// Setup title
$graph->title->Set("PiePlotC");
$graph->title->SetFont(FF_COMIC,FS_BOLD,18);
$graph->title->SetMargin(8); // Add a little bit more margin from the top

// Create the pie plot
$p1 = new PiePlotC($data);

// Set size of pie
$p1->SetSize(0.35);

// Label font and color setup
$p1->value->SetFont(FF_ARIAL,FS_BOLD,12);
$p1->value->SetColor('white');

$p1->value->Show();

// Setup the title on the center circle
$p1->midtitle->Set("Test mid\nRow 1\nRow 2");
$p1->midtitle->SetFont(FF_COMIC,FS_NORMAL,14);

// Set color for mid circle
$p1->SetMidColor('yellow');

// Use percentage values in the legends values (This is also the default)
$p1->SetLabelType(PIE_VALUE_PER);

// The label array values may have printf() formatting in them. The argument to the
// form,at string will be the value of the slice (either the percetage or absolute
// depending on what was specified in the SetLabelType() above.
$lbl = array("adam\n%.1f%%","bertil\n%.1f%%","johan\n%.1f%%",
         
"peter\n%.1f%%","daniel\n%.1f%%","erik\n%.1f%%");
$p1->SetLabels($lbl);

// Uncomment this line to remove the borders around the slices
// $p1->ShowBorder(false);

// Add drop shadow to slices
$p1->SetShadow();

// Explode all slices 15 pixels
$p1->ExplodeAll(15);

// Add plot to pie graph
$graph->Add($p1);

// .. and send the image on it's marry way to the browser
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/pieex3.html b/html/includes/jpgraph/docs/html/exframes/pieex3.html new file mode 100644 index 0000000000..044ebcd98c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/pieex3.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

// Some data
$data = array(40,21,17,14,23);

// Create the Pie Graph.
$graph = new PieGraph(350,300,"auto");
$graph->SetShadow();

// Set A title for the plot
$graph->title->Set("Multiple - Pie plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Create plots
$size=0.13;
$p1 = new PiePlot($data);
$p1->SetLegends(array("Jan","Feb","Mar","Apr","May"));
$p1->SetSize($size);
$p1->SetCenter(0.25,0.32);
$p1->value->SetFont(FF_FONT0);
$p1->title->Set("2001");

$p2 = new PiePlot($data);
$p2->SetSize($size);
$p2->SetCenter(0.65,0.32);
$p2->value->SetFont(FF_FONT0);
$p2->title->Set("2002");

$p3 = new PiePlot($data);
$p3->SetSize($size);
$p3->SetCenter(0.25,0.75);
$p3->value->SetFont(FF_FONT0);
$p3->title->Set("2003");

$p4 = new PiePlot($data);
$p4->SetSize($size);
$p4->SetCenter(0.65,0.75);
$p4->value->SetFont(FF_FONT0);
$p4->title->Set("2004");

$graph->Add($p1);
$graph->Add($p2);
$graph->Add($p3);
$graph->Add($p4);

$graph->Stroke();

?>



+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/pieex8.html b/html/includes/jpgraph/docs/html/exframes/pieex8.html new file mode 100644 index 0000000000..5580a0bb29 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/pieex8.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

$data = array(40,60,31,35);

// A new pie graph
$graph = new PieGraph(250,200,"auto");
$graph->SetShadow();

// Title setup
$graph->title->Set("Adjusting the label pos");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Setup the pie plot
$p1 = new PiePlot($data);

// Adjust size and position of plot
$p1->SetSize(0.4);
$p1->SetCenter(0.5,0.52);

// Setup slice labels and move them into the plot
$p1->value->SetFont(FF_FONT1,FS_BOLD);
$p1->value->SetColor("darkred");
$p1->SetLabelPos(0.6);

// Finally add the plot
$graph->Add($p1);

// ... and stroke it
$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/pieex9.html b/html/includes/jpgraph/docs/html/exframes/pieex9.html new file mode 100644 index 0000000000..74ad19c443 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/pieex9.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

$data = array(40,60,31,35);

// A new pie graph
$graph = new PieGraph(250,200,"auto");
$graph->SetShadow();

// Title setup
$graph->title->Set("Exploding all slices");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Setup the pie plot
$p1 = new PiePlot($data);

// Adjust size and position of plot
$p1->SetSize(0.35);
$p1->SetCenter(0.5,0.52);

// Setup slice labels and move them into the plot
$p1->value->SetFont(FF_FONT1,FS_BOLD);
$p1->value->SetColor("darkred");
$p1->SetLabelPos(0.65);

// Explode all slices
$p1->ExplodeAll(10);

// Add drop shadow
$p1->SetShadow();

// Finally add the plot
$graph->Add($p1);

// ... and stroke it
$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/pielabelsex1.html b/html/includes/jpgraph/docs/html/exframes/pielabelsex1.html new file mode 100644 index 0000000000..42ac0cac88 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/pielabelsex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

$data = array(19,12,4,3,3,12,3,3,5,6,7,8,8,1,7,2,2,4,6,8,21,23,2,2,12);

// Create the Pie Graph.
$graph = new PieGraph(300,350);

// Set A title for the plot
$graph->title->Set("Label guide lines");
$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); 
$graph->title->SetColor("darkblue");
$graph->legend->Pos(0.1,0.2);


// Create pie plot
$p1 = new PiePlot($data);
$p1->SetCenter(0.5,0.55);
$p1->SetSize(0.3);

// Enable and set policy for guide-lines
$p1->SetGuideLines();
$p1->SetGuideLinesAdjust(1.4);

// Setup the labels
$p1->SetLabelType(PIE_VALUE_PER);    
$p1->value->Show();            
$p1->value->SetFont(FF_ARIAL,FS_NORMAL,9);    
$p1->value->SetFormat('%2.1f%%');        

// Add and stroke
$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/pielabelsex2.html b/html/includes/jpgraph/docs/html/exframes/pielabelsex2.html new file mode 100644 index 0000000000..f1a5f82daf --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/pielabelsex2.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

$data = array(19,12,4,3,3,12,3,3,5,6,7,8,8,1,7,2,2,4,6,8,21,23,2,2,12);

// Create the Pie Graph.
$graph = new PieGraph(300,350);

// Set A title for the plot
$graph->title->Set("Label guide lines");
$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); 
$graph->title->SetColor("darkblue");
$graph->legend->Pos(0.1,0.2);


// Create pie plot
$p1 = new PiePlot($data);
$p1->SetCenter(0.5,0.55);
$p1->SetSize(0.3);

// Enable and set policy for guide-lines. Make labels line up vertically
$p1->SetGuideLines(true,false);
$p1->SetGuideLinesAdjust(1.5);

// Setup the labels
$p1->SetLabelType(PIE_VALUE_PER);    
$p1->value->Show();            
$p1->value->SetFont(FF_ARIAL,FS_NORMAL,9);    
$p1->value->SetFormat('%2.1f%%');        

// Add and stroke
$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/pielabelsex4.html b/html/includes/jpgraph/docs/html/exframes/pielabelsex4.html new file mode 100644 index 0000000000..849e21637f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/pielabelsex4.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_pie.php");

$data = array(19,12,4,3,3,12,3,3,5,6,7,8,8,1,7,2,2,4,6,8,21,23,2,2,12);

// Create the Pie Graph.
$graph = new PieGraph(300,350);

// Set A title for the plot
$graph->title->Set("Label guide lines");
$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); 
$graph->title->SetColor("darkblue");
$graph->legend->Pos(0.1,0.2);


// Create pie plot
$p1 = new PiePlot($data);
$p1->SetCenter(0.5,0.55);
$p1->SetSize(0.3);

// Enable and set policy for guide-lines. Make labels line up vertically
$p1->SetGuideLines(true,false);
$p1->SetGuideLinesAdjust(1.1);

// Setup the labels
$p1->SetLabelType(PIE_VALUE_PER);    
$p1->value->Show();            
$p1->value->SetFont(FF_ARIAL,FS_NORMAL,9);    
$p1->value->SetFormat('%2.1f%%');        

// Add and stroke
$graph->Add($p1);
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/polarex0-180.html b/html/includes/jpgraph/docs/html/exframes/polarex0-180.html new file mode 100644 index 0000000000..346819f281 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/polarex0-180.html @@ -0,0 +1,4 @@ + +<?php
// A simple Polar graph, example 0

include "../jpgraph.php";
include 
"../jpgraph_polar.php";


$data = array(0,1,10,2,30,25,40,60,
          
50,110,60,160,70,210,75,230,80,260,
          
85,270,90,280,
          
95,270,100,260,105,230,
          
110,210,120,160,130,110,140,60,
          
150,25,170,2,180,1);


$graph = new PolarGraph(250,250);
$graph->SetScale('lin');
$graph->SetMargin(35,35,25,25);
$graph->SetType(POLAR_180);

$p = new PolarPlot($data);
$p->SetFillColor('lightblue@0.5');
$graph->Add($p);

$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/polarex0.html b/html/includes/jpgraph/docs/html/exframes/polarex0.html new file mode 100644 index 0000000000..708956e72f --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/polarex0.html @@ -0,0 +1,4 @@ + +<?php
// A simple Polar graph, example 0

include "../jpgraph.php";
include 
"../jpgraph_polar.php";


$data = array(0,1,10,2,30,25,40,60,
          
50,110,60,160,70,210,75,230,80,260,
          
85,270,90,280,
          
95,270,100,260,105,230,
          
110,210,120,160,130,110,140,60,
          
150,25,170,2,180,1);


$graph = new PolarGraph(250,250);
$graph->SetScale('lin');
$graph->SetMargin(35,35,25,25);

$p = new PolarPlot($data);
$p->SetFillColor('lightblue@0.5');
$graph->Add($p);

$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/polarex3-lin.html b/html/includes/jpgraph/docs/html/exframes/polarex3-lin.html new file mode 100644 index 0000000000..160ade6cb7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/polarex3-lin.html @@ -0,0 +1,4 @@ + +<?php
// A simple Polar graph, example 2

include "../jpgraph.php";
include 
"../jpgraph_polar.php";


$data = array(0,1,10,2,30,25,40,60,
          
50,110,60,160,70,210,75,230,80,260,
          
85,270,90,280,
          
95,270,100,260,105,230,
          
110,210,120,160,130,110,140,60,
          
150,25,170,2,180,1);


$graph = new PolarGraph(300,300);
$graph->SetScale('lin',200);
$graph->SetType(POLAR_180);

$graph->title->Set('Polar plot #3');
$graph->title->SetFont(FF_FONT2,FS_BOLD);
$graph->title->SetColor('navy');

$graph->axis->ShowGrid(true,false);

$p = new PolarPlot($data);
$p->SetFillColor('lightred@0.5');

$graph->Add($p);

$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/polarex3.html b/html/includes/jpgraph/docs/html/exframes/polarex3.html new file mode 100644 index 0000000000..9965d49155 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/polarex3.html @@ -0,0 +1,4 @@ + +<?php
// A simple Polar graph, example 2

include "../jpgraph.php";
include 
"../jpgraph_polar.php";


$data = array(0,1,10,2,30,25,40,60,
          
50,110,60,160,70,210,75,230,80,260,
          
85,270,90,280,
          
95,270,100,260,105,230,
          
110,210,120,160,130,110,140,60,
          
150,25,170,2,180,1);


$graph = new PolarGraph(300,300);
$graph->SetScale('log',100);
$graph->SetType(POLAR_180);

$graph->title->Set('Polar plot #3');
$graph->title->SetFont(FF_FONT2,FS_BOLD);
$graph->title->SetColor('navy');

$graph->axis->ShowGrid(true,false);

$p = new PolarPlot($data);
$p->SetFillColor('lightred@0.5');

$graph->Add($p);

$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/polarex4.html b/html/includes/jpgraph/docs/html/exframes/polarex4.html new file mode 100644 index 0000000000..563bb0953a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/polarex4.html @@ -0,0 +1,4 @@ + +<?php
// A simple Polar graph, example 2

include "../jpgraph.php";
include 
"../jpgraph_polar.php";


$data = array(0,1,10,2,30,25,40,60,
          
50,110,60,160,70,210,75,230,80,260,
          
85,270,90,280,
          
95,270,100,260,105,230,
          
110,210,120,160,130,110,140,60,
          
150,25,170,2,180,1);


$graph = new PolarGraph(300,350);
$graph->SetScale('log');

$graph->title->Set('Polar plot #4');
$graph->title->SetFont(FF_FONT2,FS_BOLD);
$graph->title->SetColor('navy');

// Hide last labels on the Radius axis
// They intersect with the box otherwise
$graph->axis->HideLastTickLabel();

$p = new PolarPlot($data);
$p->SetFillColor('lightred@0.5');

$graph->Add($p);

$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/polarex5.html b/html/includes/jpgraph/docs/html/exframes/polarex5.html new file mode 100644 index 0000000000..5a95b260fd --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/polarex5.html @@ -0,0 +1,4 @@ + +<?php
// A simple Polar graph, example 2

include "../jpgraph.php";
include 
"../jpgraph_polar.php";


$data = array(0,1,10,2,30,25,40,60,
          
50,110,60,160,70,210,75,230,80,260,
          
85,270,90,280,
          
95,270,100,260,105,230,
          
110,210,120,160,130,110,140,60,
          
150,25,170,2,180,1);


$graph = new PolarGraph(300,350);
$graph->SetScale('log');

// Show both major and minor grid lines
$graph->axis->ShowGrid(true,true);

$graph->title->Set('Polar plot #5');
$graph->title->SetFont(FF_FONT2,FS_BOLD);
$graph->title->SetColor('navy');

// Hide last labels on the Radius axis
// They intersect with the box otherwise
$graph->axis->HideLastTickLabel();

$p = new PolarPlot($data);
$p->SetFillColor('lightred@0.5');

$graph->Add($p);

$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/polarex7-2.html b/html/includes/jpgraph/docs/html/exframes/polarex7-2.html new file mode 100644 index 0000000000..9abc98c389 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/polarex7-2.html @@ -0,0 +1,4 @@ + +<?php
// A simple Polar graph,

include "../jpgraph.php";
include 
"../jpgraph_polar.php";


$data = array(0,1,30,2,30,25,40,60,
          
50,110,60,160,70,210,75,230,80,260,85,370,
          
90,480,
          
95,370,100,260,105,230,
          
110,210,120,160,130,110,140,60,
          
150,25,150,2,180,1);

$n count($data);
for(
$i=0$i $n$i+=) {
    
$data[$n+$i] = 360-$data[$i];
    
$data[$n+$i+1] = $data[$i+1];
}


$graph = new PolarGraph(300,400);
$graph->SetScale('log',100);
$graph->SetType(POLAR_360);
$graph->SetPlotSize(220,300);

// Hide frame around graph (by setting width=0)
$graph->SetFrame(true,'white',1);

$graph->SetBackgroundGradient('blue:1.3','brown:1.4',GRAD_MIDHOR,BGRAD_PLOT);

// Set color for gradient lines
$graph->axis->SetGridColor('gray','gray','gray');

$graph->title->Set('Polar plot #7-2');
$graph->title->SetFont(FF_ARIAL,FS_BOLD,16);
$graph->title->SetColor('navy');

// Adjust legen box position and color
$graph->legend->SetColor('navy','darkgray');
$graph->legend->SetFillColor('white');
$graph->legend->SetShadow('darkgray@0.5',5);

$p = new PolarPlot($data);
$p->SetFillColor('yellow@0.6');
$p->mark->SetType(MARK_SQUARE);
$p->SetLegend("Mirophone #1\n(No amps)");

$graph->Add($p);

$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/polarex9.html b/html/includes/jpgraph/docs/html/exframes/polarex9.html new file mode 100644 index 0000000000..c52b1af3e9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/polarex9.html @@ -0,0 +1,4 @@ + +<?php
// A simple Polar graph,

include "../jpgraph.php";
include 
"../jpgraph_polar.php";

$data = array(0,1,10,2,30,25,40,60,
          
50,110,60,160,70,210,75,230,80,260,85,370,
          
90,480,
          
95,370,100,260,105,230,
          
110,210,120,160,130,110,140,60,
          
150,25,170,2,180,1);

$graph = new PolarGraph(350,320);
$graph->SetScale('log',100);
$graph->SetType(POLAR_180);

// Hide frame around graph (by setting width=0)
$graph->SetFrame(true,'white',1);

// Show both major and minor grid lines
$graph->axis->ShowGrid(true,true);

// Set color for gradient lines
$graph->axis->SetGridColor('lightblue:0.9','lightblue:0.9','lightblue:0.9');

// Set label and axis colors
$graph->axis->SetColor('black','navy','darkred');

// Draw the ticks on the bottom side of the radius axis
$graph->axis->SetTickSide(SIDE_DOWN);

// Increase the margin for the labels since we changed the
// side of the ticks.
$graph->axis->SetLabelMargin(6);

// Change fonts
$graph->axis->SetFont(FF_ARIAL,FS_NORMAL,8);
$graph->axis->SetAngleFont(FF_ARIAL,FS_NORMAL,8);

// Setup axis title
$graph->axis->SetTitle('Coverage (in meter)','middle');
$graph->axis->title->SetFont(FF_FONT1,FS_BOLD);

// Setup graph title
$graph->title->Set('Polar plot #9');
$graph->title->SetFont(FF_ARIAL,FS_BOLD,16);
$graph->title->SetColor('navy');

// Setup tab title
$graph->tabtitle->Set('Microphone #1');
$graph->tabtitle->SetColor('brown:0.5','lightyellow');


$p = new PolarPlot($data);
$p->SetFillColor('lightblue@0.5');
$p->mark->SetType(MARK_SQUARE);

$graph->Add($p);

$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/radarex1.html b/html/includes/jpgraph/docs/html/exframes/radarex1.html new file mode 100644 index 0000000000..89fe24e53d --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/radarex1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_radar.php");
    
// Some data to plot
$data = array(55,80,46,71,95);
    
// Create the graph and the plot
$graph = new RadarGraph(250,200,"auto");
$plot = new RadarPlot($data);

// Add the plot and display the graph
$graph->Add($plot);
$graph->Stroke();
?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/radarex2.html b/html/includes/jpgraph/docs/html/exframes/radarex2.html new file mode 100644 index 0000000000..edd100936b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/radarex2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_radar.php");
    
// Some data to plot
$data = array(55,80,46,71,95);
    
// Create the graph and the plot
$graph = new RadarGraph(300,200,"auto");

$graph->title->Set('Weekly goals');
$graph->subtitle->Set('Year 2003');

$plot = new RadarPlot($data);
$plot->SetFillColor('lightred');
$graph->SetSize(0.6);
$graph->SetPos(0.5,0.6);
// Add the plot and display the graph
$graph->Add($plot);
$graph->Stroke();
?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/radarex4.html b/html/includes/jpgraph/docs/html/exframes/radarex4.html new file mode 100644 index 0000000000..ae150cb6b3 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/radarex4.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_radar.php");
    
// Some data to plot
$data = array(55,80,26,31,95);
    
// Create the graph and the plot
$graph = new RadarGraph(250,200,"auto");

// Create the titles for the axis
$titles $gDateLocale->GetShortMonth();
$graph->SetTitles($titles);

// Add grid lines
$graph->grid->Show();
$graph->grid->SetLineStyle('dotted');

$plot = new RadarPlot($data);
$plot->SetFillColor('lightblue');

// Add the plot and display the graph
$graph->Add($plot);
$graph->Stroke();
?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/radarex6.1.html b/html/includes/jpgraph/docs/html/exframes/radarex6.1.html new file mode 100644 index 0000000000..b83e9f29e5 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/radarex6.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_radar.php");
    
// Some data to plot
$data = array(55,80,26,31,95);
$data2 = array(15,50,46,39,25);
    
// Create the graph and the plot
$graph = new RadarGraph(250,200,"auto");

// Add a drop shadow to the graph
$graph->SetShadow();

// Create the titles for the axis
$titles $gDateLocale->GetShortMonth();
$graph->SetTitles($titles);
$graph->SetColor('lightyellow');

// ADjust the position to make more room
// for the legend
$graph->SetCenter(0.4,0.55);
$graph->SetSize(0.6);

// Add grid lines
$graph->grid->Show();
$graph->grid->SetColor('darkred');
$graph->grid->SetLineStyle('dotted');

$plot = new RadarPlot($data);
$plot->SetFillColor('lightblue');
$plot->SetLegend("QA results");

$plot2 = new RadarPlot($data2);
$plot2->SetLegend("Target");
$plot2->SetColor('red');
$plot2->SetFill(false);
$plot2->SetLineWeight(2);


// Add the plot and display the graph
$graph->Add($plot);
$graph->Add($plot2);
$graph->Stroke();
?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/radarex6.html b/html/includes/jpgraph/docs/html/exframes/radarex6.html new file mode 100644 index 0000000000..900b20a5a9 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/radarex6.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_radar.php");
    
// Some data to plot
$data = array(55,80,26,31,95);
    
// Create the graph and the plot
$graph = new RadarGraph(250,200,"auto");

// Add a drop shadow to the graph
$graph->SetShadow();

// Create the titles for the axis
$titles $gDateLocale->GetShortMonth();
$graph->SetTitles($titles);
$graph->SetColor('lightyellow');

// ADjust the position to make more room
// for the legend
$graph->SetCenter(0.4,0.5);

// Add grid lines
$graph->grid->Show();
$graph->grid->SetColor('darkred');
$graph->grid->SetLineStyle('dotted');

$plot = new RadarPlot($data);
$plot->SetFillColor('lightblue');
$plot->SetLegend("QA results");

// Add the plot and display the graph
$graph->Add($plot);
$graph->Stroke();
?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/radarex7.html b/html/includes/jpgraph/docs/html/exframes/radarex7.html new file mode 100644 index 0000000000..f7adfab836 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/radarex7.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_radar.php");

// Create the basic rtadar graph
$graph = new RadarGraph(300,200,"auto");

// Set background color and shadow
$graph->SetColor("white");
$graph->SetShadow();

// Position the graph
$graph->SetCenter(0.4,0.55);

// Setup the axis formatting     
$graph->axis->SetFont(FF_FONT1,FS_BOLD);
$graph->axis->SetWeight(2);

// Setup the grid lines
$graph->grid->SetLineStyle("longdashed");
$graph->grid->SetColor("navy");
$graph->grid->Show();
$graph->HideTickMarks();
        
// Setup graph titles
$graph->title->Set("Quality result");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->SetTitles(array("One","Two","Three","Four","Five","Sex","Seven","Eight","Nine","Ten"));
// Create the first radar plot        
$plot = new RadarPlot(array(30,80,60,40,71,81,47));
$plot->SetLegend("Goal");
$plot->SetColor("red","lightred");
$plot->SetFill(false);
$plot->SetLineWeight(2);

// Create the second radar plot
$plot2 = new RadarPlot(array(70,40,30,80,31,51,14));
$plot2->SetLegend("Actual");
$plot2->SetColor("blue","lightred");

// Add the plots to the graph
$graph->Add($plot2);
$graph->Add($plot);

// And output the graph
$graph->Stroke();

?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/radarex8.1.html b/html/includes/jpgraph/docs/html/exframes/radarex8.1.html new file mode 100644 index 0000000000..42c4bddba2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/radarex8.1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_radar.php");

// Create the basic radar graph
$graph = new RadarGraph(300,200,"auto");
$graph->img->SetAntiAliasing();

// Set background color and shadow
$graph->SetColor("white");
$graph->SetShadow();

// Position the graph
$graph->SetCenter(0.4,0.55);

// Setup the axis formatting     
$graph->axis->SetFont(FF_FONT1,FS_BOLD);

// Setup the grid lines
$graph->grid->SetLineStyle("solid");
$graph->grid->SetColor("navy");
$graph->grid->Show();
$graph->HideTickMarks();
        
// Setup graph titles
$graph->title->Set("Quality result");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$graph->SetTitles($gDateLocale->GetShortMonth());

// Create the first radar plot        
$plot = new RadarPlot(array(70,80,60,90,71,81,47));
$plot->SetLegend("Goal");
$plot->SetColor("red","lightred");
$plot->SetFill(false);
$plot->SetLineWeight(2);

// Create the second radar plot
$plot2 = new RadarPlot(array(70,40,30,80,31,51,14));
$plot2->SetLegend("Actual");
$plot2->SetLineWeight(2);
$plot2->SetColor("blue");
$plot2->SetFill(false);

// Add the plots to the graph
$graph->Add($plot2);
$graph->Add($plot);

// And output the graph
$graph->Stroke();

?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/radarex8.html b/html/includes/jpgraph/docs/html/exframes/radarex8.html new file mode 100644 index 0000000000..daf7edce38 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/radarex8.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_radar.php");

// Create the basic radar graph
$graph = new RadarGraph(300,200,"auto");
//$graph->img->SetAntiAliasing();

// Set background color and shadow
$graph->SetColor("white");
$graph->SetShadow();

// Position the graph
$graph->SetCenter(0.4,0.55);

// Setup the axis formatting     
$graph->axis->SetFont(FF_FONT1,FS_BOLD);

// Setup the grid lines
$graph->grid->SetLineStyle("solid");
$graph->grid->SetColor("navy");
$graph->grid->Show();
$graph->HideTickMarks();
        
// Setup graph titles
$graph->title->Set("Quality result");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->SetTitles($gDateLocale->GetShortMonth());

// Create the first radar plot        
$plot = new RadarPlot(array(70,80,60,90,71,81,47));
$plot->SetLegend("Goal");
$plot->SetColor("red","lightred");
$plot->SetFill(false);
$plot->SetLineWeight(2);

// Create the second radar plot
$plot2 = new RadarPlot(array(70,40,30,80,31,51,14));
$plot2->SetLegend("Actual");
$plot2->SetLineWeight(2);
$plot2->SetColor("blue");
$plot2->SetFill(false);

// Add the plots to the graph
$graph->Add($plot2);
$graph->Add($plot);

// And output the graph
$graph->Stroke();

?> +
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/radarmarkex1.html b/html/includes/jpgraph/docs/html/exframes/radarmarkex1.html new file mode 100644 index 0000000000..1870fed573 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/radarmarkex1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php"); 
include (
"../jpgraph_radar.php");

$titles=array('Planning','Quality','Time','RR','CR','DR');
$data=array(1840709042,66);

$graph = new RadarGraph (300,280,"auto"); 

$graph->title->Set("Radar with marks");
$graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);

$graph->SetTitles($titles);
$graph->SetCenter(0.5,0.55);
$graph->HideTickMarks(); 
$graph->SetColor('lightgreen@0.7');
$graph->axis->SetColor('darkgray'); 
$graph->grid->SetColor('darkgray');
$graph->grid->Show();

$graph->axis->title->SetFont(FF_ARIAL,FS_NORMAL,12);
$graph->axis->title->SetMargin(5);
$graph->SetGridDepth(DEPTH_BACK);
$graph->SetSize(0.6);

$plot = new RadarPlot($data);
$plot->SetColor('red@0.2');
$plot->SetLineWeight(1);
$plot->SetFillColor('red@0.7');

$plot->mark->SetType(MARK_IMG_SBALL,'red');

$graph->Add($plot);
$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/rotex0.html b/html/includes/jpgraph/docs/html/exframes/rotex0.html new file mode 100644 index 0000000000..646ddb156c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/rotex0.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(12,17,22,19,5,15);

$graph = new Graph(270,170);
$graph->SetMargin(30,90,30,30);
$graph->SetScale("textlin");

$line = new LinePlot($ydata);
$line->SetLegend('2002');
$line->SetColor('darkred');
$line->SetWeight(2);
$graph->Add($line);

// Output graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/rotex1.html b/html/includes/jpgraph/docs/html/exframes/rotex1.html new file mode 100644 index 0000000000..f07a5c4a02 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/rotex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(12,17,22,19,5,15);

$graph = new Graph(270,170);
$graph->SetMargin(30,90,30,30);
$graph->SetScale("textlin");

$graph->img->SetAngle(45);

$line = new LinePlot($ydata);
$line->SetLegend('2002');
$line->SetColor('darkred');
$line->SetWeight(2);
$graph->Add($line);

// Output graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/rotex2.html b/html/includes/jpgraph/docs/html/exframes/rotex2.html new file mode 100644 index 0000000000..1d2c75375c --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/rotex2.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(12,17,22,19,5,15);

$graph = new Graph(270,170);
$graph->SetMargin(30,90,30,30);
$graph->SetScale("textlin");

$graph->img->SetAngle(90);

$line = new LinePlot($ydata);
$line->SetLegend('2002');
$line->SetColor('darkred');
$line->SetWeight(2);
$graph->Add($line);

// Output graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/rotex3.html b/html/includes/jpgraph/docs/html/exframes/rotex3.html new file mode 100644 index 0000000000..ba0e9388ed --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/rotex3.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(12,17,22,19,5,15);

$graph = new Graph(270,170);
$graph->SetMargin(30,90,30,30);
$graph->SetScale("textlin");

$graph->img->SetAngle(45);
$graph->img->SetCenter(floor(270/2),floor(170/2));

$line = new LinePlot($ydata);
$line->SetLegend('2002');
$line->SetColor('darkred');
$line->SetWeight(2);
$graph->Add($line);

// Output graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/rotex4.html b/html/includes/jpgraph/docs/html/exframes/rotex4.html new file mode 100644 index 0000000000..98b11d2314 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/rotex4.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(12,17,22,19,5,15);

$graph = new Graph(270,170);
$graph->SetMargin(30,90,30,30);
$graph->SetScale("textlin");

$graph->img->SetAngle(90);
$graph->img->SetCenter(floor(270/2),floor(170/2));

$line = new LinePlot($ydata);
$line->SetLegend('2002');
$line->SetColor('darkred');
$line->SetWeight(2);
$graph->Add($line);

// Output graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/rotex5.html b/html/includes/jpgraph/docs/html/exframes/rotex5.html new file mode 100644 index 0000000000..e5cd0ebaed --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/rotex5.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$ydata = array(12,17,22,19,5,15);

$graph = new Graph(270,170);
$graph->SetMargin(30,90,30,30);
$graph->SetScale("textlin");

$graph->img->SetAngle(-30);
$graph->img->SetCenter(30,170-30);

$line = new LinePlot($ydata);
$line->SetLegend('2002');
$line->SetColor('darkred');
$line->SetWeight(2);
$graph->Add($line);

// Output graph
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/scatter_csimex1.html b/html/includes/jpgraph/docs/html/exframes/scatter_csimex1.html new file mode 100644 index 0000000000..05404d2981 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/scatter_csimex1.html @@ -0,0 +1,4 @@ + +<?php
include_once ("../jpgraph.php");
include_once (
"../jpgraph_scatter.php");

// Some data for the points
$datax = array(3.5,13.7,3,4,6.2,6,3.5,8,14,8,11.1,13.7);
$datay = array(10,22,12,13,17,20,16,19,30,31,40,43);

// A new scatter graph
$graph = new Graph(300,200,'auto');
$graph->SetShadow();
$graph->SetScale("linlin");

//$graph->img->SetMargin(40,40,40,40);        

$graph->title->Set("Scatter plot with Image Map");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Client side image map targets
$targ=array("pie_csimex1.php#1","pie_csimex1.php#2","pie_csimex1.php#3",
"pie_csimex1.php#4","pie_csimex1.php#5","pie_csimex1.php#6",
"pie_csimex1.php#7","pie_csimex1.php#8","pie_csimex1.php#9" );

// Strings to put as "alts" (and "title" value)
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");

// Create a new scatter plot
$sp1 = new ScatterPlot($datay,$datax);

// Use diamonds as markerss
$sp1->mark->SetType(MARK_DIAMOND);
$sp1->mark->SetWidth(10);

// Set the scatter plot image map targets
$sp1->SetCSIMTargets($targ,$alts);

// Add the plot
$graph->Add($sp1);

// Send back the HTML page which will call this script again
// to retrieve the image.
$graph->StrokeCSIM('scatter_csimex1.php');

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/scatterex1.html b/html/includes/jpgraph/docs/html/exframes/scatterex1.html new file mode 100644 index 0000000000..7127694d4a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/scatterex1.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_scatter.php");

$datax = array(3.5,3.7,3,4,6.2,6,3.5,8,14,8,11.1,13.7);
$datay = array(20,22,12,13,17,20,16,19,30,31,40,43);

$graph = new Graph(300,200,"auto");
$graph->SetScale("linlin");

$graph->img->SetMargin(40,40,40,40);        
$graph->SetShadow();

$graph->title->Set("A simple scatter plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$sp1 = new ScatterPlot($datay,$datax);

$graph->Add($sp1);
$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/scatterex2.html b/html/includes/jpgraph/docs/html/exframes/scatterex2.html new file mode 100644 index 0000000000..aa3054259b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/scatterex2.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_scatter.php");

$datax = array(3.5,3.7,3,4,6.2,6,3.5,8,14,8,11.1,13.7);
$datay = array(20,22,12,13,17,20,16,19,30,31,40,43);

$graph = new Graph(300,200,"auto");
$graph->SetScale("linlin");

$graph->img->SetMargin(40,40,40,40);        
$graph->SetShadow();

$graph->title->Set("A simple scatter plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

$sp1 = new ScatterPlot($datay,$datax);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
$sp1->mark->SetFillColor("red");
$sp1->mark->SetWidth(8);

$graph->Add($sp1);
$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex1.html b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex1.html new file mode 100644 index 0000000000..de03393dce --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex1.html @@ -0,0 +1,4 @@ + +<?php
// Illustration of the different patterns for bands
// $Id: smallstaticbandsex1.php,v 1.1 2002/09/01 21:51:08 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(10,29,3,6);

// Create the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->SetMargin(25,10,20,20);

// Add 10% grace ("space") at top and botton of Y-scale. 
$graph->yscale->SetGrace(10);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("lightblue");

// Position the X-axis at the bottom of the plotare
$graph->xaxis->SetPos("min");

$graph->ygrid->Show(false);

// .. and add the plot to the graph
$graph->Add($bplot);

// Add band
$band = new PlotBand(HORIZONTAL,BAND_RDIAG,15,35,'khaki4');
$band->ShowFrame(false);
$graph->AddBand($band);

// Set title
$graph->title->SetFont(FF_ARIAL,FS_BOLD,10);
$graph->title->SetColor('darkred');
$graph->title->Set('BAND_RDIAG');


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex10.html b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex10.html new file mode 100644 index 0000000000..d7efb2f640 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex10.html @@ -0,0 +1,4 @@ + +<?php
// Illustration of the different patterns for bands
// $Id: smallstaticbandsex10.php,v 1.1 2002/09/01 21:51:08 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(10,29,3,6);

// Create the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->SetMargin(25,10,20,20);

// Add 10% grace ("space") at top and botton of Y-scale. 
$graph->yscale->SetGrace(10);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("lightblue");

// Position the X-axis at the bottom of the plotare
$graph->xaxis->SetPos("min");

$graph->ygrid->Show(false);

// .. and add the plot to the graph
$graph->Add($bplot);

// Add band
$band = new PlotBand(HORIZONTAL,BAND_DIAGCROSS,15,35,'khaki4');
$band->ShowFrame(false);
$graph->AddBand($band);

// Set title
$graph->title->SetFont(FF_ARIAL,FS_BOLD,10);
$graph->title->SetColor('darkred');
$graph->title->Set('BAND_DIAGCROSS');


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex2.html b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex2.html new file mode 100644 index 0000000000..569742fa3a --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex2.html @@ -0,0 +1,4 @@ + +<?php
// Illustration of the different patterns for bands
// $Id: smallstaticbandsex2.php,v 1.1 2002/09/01 21:51:08 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(10,29,3,6);

// Create the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->SetMargin(25,10,20,20);

// Add 10% grace ("space") at top and botton of Y-scale. 
$graph->yscale->SetGrace(10);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("lightblue");

// Position the X-axis at the bottom of the plotare
$graph->xaxis->SetPos("min");

$graph->ygrid->Show(false);

// .. and add the plot to the graph
$graph->Add($bplot);

// Add band
$band = new PlotBand(HORIZONTAL,BAND_LDIAG,15,35,'khaki4');
$band->ShowFrame(false);
$graph->AddBand($band);

// Set title
$graph->title->SetFont(FF_ARIAL,FS_BOLD,10);
$graph->title->SetColor('darkred');
$graph->title->Set('BAND_LDIAG');


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex3.html b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex3.html new file mode 100644 index 0000000000..ab90b86d60 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex3.html @@ -0,0 +1,4 @@ + +<?php
// Illustration of the different patterns for bands
// $Id: smallstaticbandsex3.php,v 1.1 2002/09/01 21:51:08 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(10,29,3,6);

// Create the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->SetMargin(25,10,20,20);

// Add 10% grace ("space") at top and botton of Y-scale. 
$graph->yscale->SetGrace(10);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("lightblue");

// Position the X-axis at the bottom of the plotare
$graph->xaxis->SetPos("min");

$graph->ygrid->Show(false);

// .. and add the plot to the graph
$graph->Add($bplot);

// Add band
$band = new PlotBand(HORIZONTAL,BAND_SOLID,15,35,'khaki4');
$band->ShowFrame(false);
$graph->AddBand($band);

// Set title
$graph->title->SetFont(FF_ARIAL,FS_BOLD,10);
$graph->title->SetColor('darkred');
$graph->title->Set('BAND_SOLID');


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex4.html b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex4.html new file mode 100644 index 0000000000..a0a1bdca68 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex4.html @@ -0,0 +1,4 @@ + +<?php
// Illustration of the different patterns for bands
// $Id: smallstaticbandsex4.php,v 1.1 2002/09/01 21:51:08 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(10,29,3,6);

// Create the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->SetMargin(25,10,20,20);

// Add 10% grace ("space") at top and botton of Y-scale. 
$graph->yscale->SetGrace(10);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("lightblue");

// Position the X-axis at the bottom of the plotare
$graph->xaxis->SetPos("min");

$graph->ygrid->Show(false);

// .. and add the plot to the graph
$graph->Add($bplot);

// Add band
$band = new PlotBand(HORIZONTAL,BAND_3DPLANE,15,35,'khaki4');
$band->SetDensity(60);
$band->ShowFrame(true);
$graph->AddBand($band);

// Set title
$graph->title->SetFont(FF_ARIAL,FS_BOLD,10);
$graph->title->SetColor('darkred');
$graph->title->Set('BAND_3DPLANE, Density=60');


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex5.html b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex5.html new file mode 100644 index 0000000000..7cd7cc0098 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex5.html @@ -0,0 +1,4 @@ + +<?php
// Illustration of the different patterns for bands
// $Id: smallstaticbandsex5.php,v 1.1 2002/09/01 21:51:08 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(10,29,3,6);

// Create the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->SetMargin(25,10,20,20);

// Add 10% grace ("space") at top and botton of Y-scale. 
$graph->yscale->SetGrace(10);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("lightblue");

// Position the X-axis at the bottom of the plotare
$graph->xaxis->SetPos("min");

$graph->ygrid->Show(false);

// .. and add the plot to the graph
$graph->Add($bplot);

// Add band
$band = new PlotBand(HORIZONTAL,BAND_HVCROSS,15,35,'khaki4');
$band->ShowFrame(true);
$band->SetOrder(DEPTH_FRONT);
$graph->AddBand($band);

// Set title
$graph->title->SetFont(FF_ARIAL,FS_BOLD,10);
$graph->title->SetColor('darkred');
$graph->title->Set('BAND_HVCROSS, In front');


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex6.html b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex6.html new file mode 100644 index 0000000000..9d73ef3908 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex6.html @@ -0,0 +1,4 @@ + +<?php
// Illustration of the different patterns for bands
// $Id: smallstaticbandsex6.php,v 1.1 2002/09/01 21:51:08 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(10,29,3,6);

// Create the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->SetMargin(25,10,20,20);

// Add 10% grace ("space") at top and botton of Y-scale. 
$graph->yscale->SetGrace(10);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("lightblue");

// Position the X-axis at the bottom of the plotare
$graph->xaxis->SetPos("min");

$graph->ygrid->Show(false);

// .. and add the plot to the graph
$graph->Add($bplot);

// Add band
$band = new PlotBand(HORIZONTAL,BAND_VLINE,15,35,'khaki4');
$band->ShowFrame(false);
$graph->AddBand($band);

// Set title
$graph->title->SetFont(FF_ARIAL,FS_BOLD,10);
$graph->title->SetColor('darkred');
$graph->title->Set('BAND_VLINE');


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex7.html b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex7.html new file mode 100644 index 0000000000..f07a0c11b2 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex7.html @@ -0,0 +1,4 @@ + +<?php
// Illustration of the different patterns for bands
// $Id: smallstaticbandsex7.php,v 1.1 2002/09/01 21:51:08 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(10,29,3,6);

// Create the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->SetMargin(25,10,20,20);

// Add 10% grace ("space") at top and botton of Y-scale. 
$graph->yscale->SetGrace(10);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("lightblue");

// Position the X-axis at the bottom of the plotare
$graph->xaxis->SetPos("min");

$graph->ygrid->Show(false);

// .. and add the plot to the graph
$graph->Add($bplot);

// Add band
$band = new PlotBand(HORIZONTAL,BAND_HLINE,15,35,'khaki4');
$band->ShowFrame(false);
$graph->AddBand($band);

// Set title
$graph->title->SetFont(FF_ARIAL,FS_BOLD,10);
$graph->title->SetColor('darkred');
$graph->title->Set('BAND_HLINE');


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex8.html b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex8.html new file mode 100644 index 0000000000..3d73197d39 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex8.html @@ -0,0 +1,4 @@ + +<?php
// Illustration of the different patterns for bands
// $Id: smallstaticbandsex8.php,v 1.1 2002/09/01 21:51:08 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(10,29,3,6);

// Create the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->SetMargin(25,10,20,20);

// Add 10% grace ("space") at top and botton of Y-scale. 
$graph->yscale->SetGrace(10);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("lightblue");

// Position the X-axis at the bottom of the plotare
$graph->xaxis->SetPos("min");

$graph->ygrid->Show(false);

// .. and add the plot to the graph
$graph->Add($bplot);

// Add band
$band = new PlotBand(HORIZONTAL,BAND_3DPLANE,15,35,'khaki4');
$band->ShowFrame(false);
$graph->AddBand($band);

// Set title
$graph->title->SetFont(FF_ARIAL,FS_BOLD,10);
$graph->title->SetColor('darkred');
$graph->title->Set('BAND_3DPLANE');


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex9.html b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex9.html new file mode 100644 index 0000000000..5272812a03 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/smallstaticbandsex9.html @@ -0,0 +1,4 @@ + +<?php
// Illustration of the different patterns for bands
// $Id: smallstaticbandsex9.php,v 1.1 2002/09/01 21:51:08 aditus Exp $
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(10,29,3,6);

// Create the graph. 
$graph = new Graph(200,150,"auto");    
$graph->SetScale("textlin");
$graph->SetMargin(25,10,20,20);

// Add 10% grace ("space") at top and botton of Y-scale. 
$graph->yscale->SetGrace(10);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("lightblue");

// Position the X-axis at the bottom of the plotare
$graph->xaxis->SetPos("min");

$graph->ygrid->Show(false);

// .. and add the plot to the graph
$graph->Add($bplot);

// Add band
$band = new PlotBand(HORIZONTAL,BAND_HVCROSS,15,35,'khaki4');
$band->ShowFrame(false);
$graph->AddBand($band);

// Set title
$graph->title->SetFont(FF_ARIAL,FS_BOLD,10);
$graph->title->SetColor('darkred');
$graph->title->Set('BAND_HVCROSS');


$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/splineex1.html b/html/includes/jpgraph/docs/html/exframes/splineex1.html new file mode 100644 index 0000000000..cc30324f15 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/splineex1.html @@ -0,0 +1,3 @@ + +<?php
include "../jpgraph.php";
include 
"../jpgraph_line.php";
include 
"../jpgraph_scatter.php";
include 
"../jpgraph_regstat.php";

// Original data points
$xdata = array(1,3,5,7,9,12,15,17.1);
$ydata = array(5,1,9,6,4,3,19,12);

// Get the interpolated values by creating
// a new Spline object.
$spline = new Spline($xdata,$ydata);

// For the new data set we want 40 points to
// get a smooth curve.
list($newx,$newy) = $spline->Get(50);

// Create the graph
$g = new Graph(300,200);
$g->SetMargin(30,20,40,30);
$g->title->Set("Natural cubic splines");
$g->title->SetFont(FF_ARIAL,FS_NORMAL,12);
$g->subtitle->Set('(Control points shown in red)');
$g->subtitle->SetColor('darkred');
$g->SetMarginColor('lightblue');

//$g->img->SetAntiAliasing();

// We need a linlin scale since we provide both
// x and y coordinates for the data points.
$g->SetScale('linlin');

// We want 1 decimal for the X-label
$g->xaxis->SetLabelFormat('%1.1f');

// We use a scatterplot to illustrate the original
// contro points.
$splot = new ScatterPlot($ydata,$xdata);

// 
$splot->mark->SetFillColor('red@0.3');
$splot->mark->SetColor('red@0.5');

// And a line plot to stroke the smooth curve we got
// from the original control points
$lplot = new LinePlot($newy,$newx);
$lplot->SetColor('navy');

// Add the plots to the graph and stroke
$g->Add($lplot);
$g->Add($splot);
$g->Stroke();

?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/staticbandbarex7.html b/html/includes/jpgraph/docs/html/exframes/staticbandbarex7.html new file mode 100644 index 0000000000..89d23b6906 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/staticbandbarex7.html @@ -0,0 +1,4 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_bar.php");

$datay=array(12,5,19,22,17,6);

// Create the graph. 
$graph = new Graph(400,300,"auto");    
$graph->img->SetMargin(60,30,50,40);
$graph->SetScale("textlin");
$graph->SetShadow();

$graph->title->SetFont(FF_ARIAL,FS_BOLD,15);
$graph->title->Set("Cash flow ");
$graph->subtitle->Set("Use of static line, 3D and solid band");

// Turn off Y-grid (it's on by default)
$graph->ygrid->Show(false);

// Add 10% grace ("space") at top of Y-scale. 
$graph->yscale->SetGrace(10);
$graph->yscale->SetAutoMin(-20);

// Turn the tick mark out from the plot area
$graph->xaxis->SetTickSide(SIDE_DOWN);
$graph->yaxis->SetTickSide(SIDE_LEFT);

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("orange");
$bplot->SetShadow("darkblue");

// Show the actual value for each bar on top/bottom
$bplot->value->Show(true);
$bplot->value->SetFormat("%02d kr");

// Position the X-axis at the bottom of the plotare
$graph->xaxis->SetPos("min");

// .. and add the plot to the graph
$graph->Add($bplot);

// Add upper and lower band and use no frames
$band[0]=new PlotBand(HORIZONTAL,BAND_3DPLANE,"min",0,"blue");
$band[0]->ShowFrame(false);
$band[0]->SetDensity(20);
$band[1]=new PlotBand(HORIZONTAL,BAND_SOLID,0,"max","steelblue");
$band[1]->ShowFrame(false);
$graph->Add($band);

$graph->Add(new PlotLine(HORIZONTAL,0,"black",2));

//$graph->title->Set("Test of bar gradient fill");
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,11);
$graph->xaxis->title->SetFont(FF_ARIAL,FS_BOLD,11);

$graph->Stroke();
?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/stockex1.html b/html/includes/jpgraph/docs/html/exframes/stockex1.html new file mode 100644 index 0000000000..ecd05853a0 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/stockex1.html @@ -0,0 +1,4 @@ + +<?php
// Example of a stock chart
include ("../jpgraph.php");
include (
"../jpgraph_stock.php");

// Data must be in the format : open,close,min,max
$datay = array(
    
34,42,27,45,
    
55,25,14,59,
    
15,40,12,47,
    
62,38,25,65,
    
38,49,32,64);

// Setup a simple graph
$graph = new Graph(300,200);
$graph->SetScale("textlin");
$graph->SetMarginColor('lightblue');
$graph->title->Set('Stockchart example');

// Create a new stock plot
$p1 = new StockPlot($datay);

// Width of the bars (in pixels)
$p1->SetWidth(9);

// Uncomment the following line to hide the horizontal end lines
//$p1->HideEndLines();

// Add the plot to the graph and send it back to the browser
$graph->Add($p1);
$graph->Stroke();

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/tabtitleex1.html b/html/includes/jpgraph/docs/html/exframes/tabtitleex1.html new file mode 100644 index 0000000000..b01374acbc --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/tabtitleex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$datay1 = array(20,15,23,15);
$datay2 = array(12,9,42,8);
$datay3 = array(5,17,32,24);

// Setup the graph
$graph = new Graph(300,200);
$graph->SetMarginColor('white');
$graph->SetScale("textlin");
$graph->SetFrame(false);
$graph->SetMargin(30,50,30,30);

$graph->tabtitle->Set(' Year 2003 ' );
$graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,13);


$graph->yaxis->HideZeroLabel();
$graph->ygrid->SetFill(true,'#EFEFEF@0.5','#BBCCFF@0.5');
$graph->xgrid->Show();

$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth());

// Create the first line
$p1 = new LinePlot($datay1);
$p1->SetColor("navy");
$p1->SetLegend('Line 1');
$graph->Add($p1);

// Create the second line
$p2 = new LinePlot($datay2);
$p2->SetColor("red");
$p2->SetLegend('Line 2');
$graph->Add($p2);

// Create the third line
$p3 = new LinePlot($datay3);
$p3->SetColor("orange");
$p3->SetLegend('Line 3');
$graph->Add($p3);

$graph->legend->SetShadow('gray@0.4',5);
$graph->legend->SetPos(0.1,0.1,'right','top');
// Output line
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/textalignex1.html b/html/includes/jpgraph/docs/html/exframes/textalignex1.html new file mode 100644 index 0000000000..2056242066 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/textalignex1.html @@ -0,0 +1,3 @@ + +<?php
// $Id: textalignex1.php,v 1.1 2002/10/19 17:42:53 aditus Exp $
require_once "../jpgraph.php";
require_once 
"../jpgraph_canvas.php";

if( empty(
$_GET['a']) ) {
    
$angle=40;
}
else {
    
$angle=$_GET['a'];
}

$caption "Demonstration of different anchor points for texts as specified with\nTextAlign(). The red cross marks the coordinate that was given to\nstroke each instance of the string.\n(The green box is the bounding rectangle for the text.)";
$txt="TextAlign()";


// Initial width and height since we need a "dummy" canvas to
// calculate the height of the text strings
$w=480;$h=50;
$xm=90;$ym=80;

$g = new CanvasGraph($w,$h);

$aImg $g->img;
$aImg->SetFont(FF_ARIAL,FS_NORMAL,16);
$tw=$aImg->GetBBoxWidth($txt,$angle);
$th=$aImg->GetBBoxHeight($txt,$angle);

$aImg->SetFont(FF_ARIAL,FS_NORMAL,11);
$ch=$aImg->GetBBoxHeight($caption);

// Calculate needed height for the image
$h 3*$th+2*$ym $ch;
$g = new CanvasGraph($w,$h);
$aImg $g->img;

$prof = array('left','top',
          
'center','top',
          
'right','top',
          
'left','center',
          
'center','center',
          
'right','center',
          
'left','bottom',
          
'center','bottom',
          
'right','bottom');
$n count($prof)/2;

for( 
$i=0,$r=0,$c=0$i $n; ++$i ) {
    
$x $c*($tw+$xm)+$xm/2;
    
$y $r*($th+$ym)+$ym/2-10;
    
$aImg->SetColor('blue');
    
$aImg->SetTextAlign($prof[$i*2],$prof[$i*2+1]);            
    
$aImg->SetFont(FF_ARIAL,FS_NORMAL,16);
    
$aImg->StrokeText($x,$y,$txt,$angle,"left",true);

    
$aImg->SetColor('black');
    
$aImg->SetFont(FF_FONT1,FS_BOLD);
    
$aImg->SetTextAlign('center','top');            
    
$align sprintf('("%s","%s")',$prof[$i*2],$prof[$i*2+1]);
    
$aImg->StrokeText($c*($tw/2+$xm)+$xm/2+$tw/2,$r*($th/2+$ym)+$th+$ym/2-4,$align);
    
$c++;
    if( 
$c==) {
    
$c=0;$r++;
    }
}

$aImg->SetTextAlign('center','bottom');            
$aImg->SetFont(FF_ARIAL,FS_ITALIC,11);
$aImg->StrokeText($w/2,$h-10,$caption,0,'left');

$aImg->SetColor('navy');
$aImg->Rectangle(0,0,$w-1,$h-1);

$g->Stroke();

?>

+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/titlecsimex01.html b/html/includes/jpgraph/docs/html/exframes/titlecsimex01.html new file mode 100644 index 0000000000..ce84f9049b --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/titlecsimex01.html @@ -0,0 +1,4 @@ + +<?php
include_once ("../jpgraph.php");
include_once (
"../jpgraph_bar.php");

$datay=array(12,26,9,17,31);

// Create the graph. 
$graph = new Graph(400,250);
$graph->SetScale("textlin");
$graph->SetMargin(50,80,20,40);
$graph->yaxis->SetTitleMargin(30);
$graph->yaxis->scale->SetGrace(30);
$graph->SetShadow();


// Create a bar pot
$bplot = new BarPlot($datay);

// Create targets for the bars image maps. One for each column
$targ=array("bar_clsmex1.php#1","bar_clsmex1.php#2","bar_clsmex1.php#3","bar_clsmex1.php#4","bar_clsmex1.php#5","bar_clsmex1.php#6");
$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d");
$bplot->SetCSIMTargets($targ,$alts);
$bplot->SetFillColor("orange");
$bplot->SetLegend('Year 2001 %%','#kalle ','%s');

// Display the values on top of each bar
$bplot->SetShadow();
$bplot->value->SetFormat(" $ %2.1f",70);
$bplot->value->SetFont(FF_ARIAL,FS_NORMAL,9);
$bplot->value->SetColor("blue");
$bplot->value->Show();

$graph->Add($bplot);

// Create a big "button" that has an image map action
$txt1 = new Text("A simple text with\ntwo rows");
$txt1->SetFont(FF_ARIAL);
$txt1->SetBox('lightblue','black','white@1',5);
$txt1->SetParagraphAlign('center');
$txt1->SetPos(40,50);
$txt1->SetCSIMTarget('#88','Text element');
$graph->Add($txt1);

// Add image map to the graph title as well (you can do this to the 
// sub- and subsub-title as well)
$graph->title->Set("Image maps barex1");
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->title->SetCSIMTarget('#45','Title for Bar');
$graph->xaxis->title->Set("X-title");
$graph->yaxis->title->Set("Y-title");

// Setup the axis title image map and font style
$graph->yaxis->title->SetFont(FF_FONT2,FS_BOLD);
$graph->yaxis->title->SetCSIMTarget('#55','Y-axis title');
$graph->xaxis->title->SetFont(FF_FONT2,FS_BOLD);
$graph->xaxis->title->SetCSIMTarget('#55','X-axis title');

// Send back the HTML page which will call this script again
// to retrieve the image.
$graph->StrokeCSIM('titlecsimex01.php');

?>
+
+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/exframes/topxaxisex1.html b/html/includes/jpgraph/docs/html/exframes/topxaxisex1.html new file mode 100644 index 0000000000..26c2778ce7 --- /dev/null +++ b/html/includes/jpgraph/docs/html/exframes/topxaxisex1.html @@ -0,0 +1,3 @@ + +<?php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

// Some data
$datay = array(25,29,29,39,55);

$graph = new Graph(400,200,'auto');
$graph->img->SetMargin(40,40,40,20);

$graph->SetScale("linlin");
$graph->SetShadow();
$graph->title->Set("Top X-axis");

// Start at 0
$graph->yscale->SetAutoMin(0);

// Add some air around the Y-scale
$graph->yscale->SetGrace(100);

// Use built in font
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Adjust the X-axis
$graph->xaxis->SetPos("max");
$graph->xaxis->SetLabelSide(SIDE_UP);
$graph->xaxis->SetTickSide(SIDE_DOWN);

// Create the line plot
$p1 = new LinePlot($datay);
$p1->SetColor("blue");

// Specify marks for the line plots
$p1->mark->SetType(MARK_FILLEDCIRCLE);
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);

// Show values
$p1->value->Show();

// Add lineplot to graph
$graph->Add($p1);

// Output line
$graph->Stroke();

?>


+
\ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/img/alphabarex1.png b/html/includes/jpgraph/docs/html/img/alphabarex1.png new file mode 100644 index 0000000000..39f4552d8a Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/alphabarex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/antispamex01.png b/html/includes/jpgraph/docs/html/img/antispamex01.png new file mode 100644 index 0000000000..e42568b5e4 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/antispamex01.png differ diff --git a/html/includes/jpgraph/docs/html/img/backgroundex03.png b/html/includes/jpgraph/docs/html/img/backgroundex03.png new file mode 100644 index 0000000000..50f70f5e9a Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/backgroundex03.png differ diff --git a/html/includes/jpgraph/docs/html/img/balloonex1.png b/html/includes/jpgraph/docs/html/img/balloonex1.png new file mode 100644 index 0000000000..13b0fbea28 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/balloonex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/bargradsmallex1.png b/html/includes/jpgraph/docs/html/img/bargradsmallex1.png new file mode 100644 index 0000000000..dca5ebd3ce Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bargradsmallex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/bargradsmallex2.png b/html/includes/jpgraph/docs/html/img/bargradsmallex2.png new file mode 100644 index 0000000000..3dc796d77e Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bargradsmallex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/bargradsmallex3.png b/html/includes/jpgraph/docs/html/img/bargradsmallex3.png new file mode 100644 index 0000000000..34dcfa3d49 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bargradsmallex3.png differ diff --git a/html/includes/jpgraph/docs/html/img/bargradsmallex4.png b/html/includes/jpgraph/docs/html/img/bargradsmallex4.png new file mode 100644 index 0000000000..af12eee3b6 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bargradsmallex4.png differ diff --git a/html/includes/jpgraph/docs/html/img/bargradsmallex5.png b/html/includes/jpgraph/docs/html/img/bargradsmallex5.png new file mode 100644 index 0000000000..fdea0ccfa0 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bargradsmallex5.png differ diff --git a/html/includes/jpgraph/docs/html/img/bargradsmallex6.png b/html/includes/jpgraph/docs/html/img/bargradsmallex6.png new file mode 100644 index 0000000000..7fbf619ece Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bargradsmallex6.png differ diff --git a/html/includes/jpgraph/docs/html/img/bargradsmallex7.png b/html/includes/jpgraph/docs/html/img/bargradsmallex7.png new file mode 100644 index 0000000000..b2c4908706 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bargradsmallex7.png differ diff --git a/html/includes/jpgraph/docs/html/img/bargradsmallex8.png b/html/includes/jpgraph/docs/html/img/bargradsmallex8.png new file mode 100644 index 0000000000..92f1b7ff83 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bargradsmallex8.png differ diff --git a/html/includes/jpgraph/docs/html/img/bartutex1.png b/html/includes/jpgraph/docs/html/img/bartutex1.png new file mode 100644 index 0000000000..cd01dc735e Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bartutex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/bartutex2.png b/html/includes/jpgraph/docs/html/img/bartutex2.png new file mode 100644 index 0000000000..8f621e60e8 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bartutex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/bartutex3.png b/html/includes/jpgraph/docs/html/img/bartutex3.png new file mode 100644 index 0000000000..e9238904d4 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bartutex3.png differ diff --git a/html/includes/jpgraph/docs/html/img/bartutex4.png b/html/includes/jpgraph/docs/html/img/bartutex4.png new file mode 100644 index 0000000000..05bd7cc486 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bartutex4.png differ diff --git a/html/includes/jpgraph/docs/html/img/bartutex5.png b/html/includes/jpgraph/docs/html/img/bartutex5.png new file mode 100644 index 0000000000..8581b5f185 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bartutex5.png differ diff --git a/html/includes/jpgraph/docs/html/img/bartutex6.png b/html/includes/jpgraph/docs/html/img/bartutex6.png new file mode 100644 index 0000000000..470b6589c0 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/bartutex6.png differ diff --git a/html/includes/jpgraph/docs/html/img/boxstockex1.png b/html/includes/jpgraph/docs/html/img/boxstockex1.png new file mode 100644 index 0000000000..a10eb363fb Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/boxstockex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/builtinplotmarksex1.png b/html/includes/jpgraph/docs/html/img/builtinplotmarksex1.png new file mode 100644 index 0000000000..f2f02c06f7 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/builtinplotmarksex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/canvas_jpgarchex.png b/html/includes/jpgraph/docs/html/img/canvas_jpgarchex.png new file mode 100644 index 0000000000..0b38633892 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/canvas_jpgarchex.png differ diff --git a/html/includes/jpgraph/docs/html/img/canvasex01.png b/html/includes/jpgraph/docs/html/img/canvasex01.png new file mode 100644 index 0000000000..f8eb438729 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/canvasex01.png differ diff --git a/html/includes/jpgraph/docs/html/img/canvasex02.png b/html/includes/jpgraph/docs/html/img/canvasex02.png new file mode 100644 index 0000000000..369b11f554 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/canvasex02.png differ diff --git a/html/includes/jpgraph/docs/html/img/canvasex03.png b/html/includes/jpgraph/docs/html/img/canvasex03.png new file mode 100644 index 0000000000..01e786e9b8 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/canvasex03.png differ diff --git a/html/includes/jpgraph/docs/html/img/canvasex04.png b/html/includes/jpgraph/docs/html/img/canvasex04.png new file mode 100644 index 0000000000..0f7a30c55d Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/canvasex04.png differ diff --git a/html/includes/jpgraph/docs/html/img/canvasex05.png b/html/includes/jpgraph/docs/html/img/canvasex05.png new file mode 100644 index 0000000000..1d5590303f Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/canvasex05.png differ diff --git a/html/includes/jpgraph/docs/html/img/canvasex06.png b/html/includes/jpgraph/docs/html/img/canvasex06.png new file mode 100644 index 0000000000..ed11c48313 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/canvasex06.png differ diff --git a/html/includes/jpgraph/docs/html/img/color_chart01.png b/html/includes/jpgraph/docs/html/img/color_chart01.png new file mode 100644 index 0000000000..62aa5aa998 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/color_chart01.png differ diff --git a/html/includes/jpgraph/docs/html/img/color_chart02.png b/html/includes/jpgraph/docs/html/img/color_chart02.png new file mode 100644 index 0000000000..1524911a50 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/color_chart02.png differ diff --git a/html/includes/jpgraph/docs/html/img/color_chart03.png b/html/includes/jpgraph/docs/html/img/color_chart03.png new file mode 100644 index 0000000000..e5c71d3686 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/color_chart03.png differ diff --git a/html/includes/jpgraph/docs/html/img/color_chart04.png b/html/includes/jpgraph/docs/html/img/color_chart04.png new file mode 100644 index 0000000000..b47a610cd9 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/color_chart04.png differ diff --git a/html/includes/jpgraph/docs/html/img/dateaxisex1.png b/html/includes/jpgraph/docs/html/img/dateaxisex1.png new file mode 100644 index 0000000000..76996b0a9b Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/dateaxisex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/dateaxisex2.png b/html/includes/jpgraph/docs/html/img/dateaxisex2.png new file mode 100644 index 0000000000..e5a691fa8e Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/dateaxisex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/dateaxisex4.png b/html/includes/jpgraph/docs/html/img/dateaxisex4.png new file mode 100644 index 0000000000..48eb2881af Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/dateaxisex4.png differ diff --git a/html/includes/jpgraph/docs/html/img/dbschemaex1.png b/html/includes/jpgraph/docs/html/img/dbschemaex1.png new file mode 100644 index 0000000000..185539aef3 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/dbschemaex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example0.png b/html/includes/jpgraph/docs/html/img/example0.png new file mode 100644 index 0000000000..6e08b33e7d Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example0.png differ diff --git a/html/includes/jpgraph/docs/html/img/example11.png b/html/includes/jpgraph/docs/html/img/example11.png new file mode 100644 index 0000000000..e281b30c4f Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example11.png differ diff --git a/html/includes/jpgraph/docs/html/img/example13.png b/html/includes/jpgraph/docs/html/img/example13.png new file mode 100644 index 0000000000..ff795689f4 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example13.png differ diff --git a/html/includes/jpgraph/docs/html/img/example14.png b/html/includes/jpgraph/docs/html/img/example14.png new file mode 100644 index 0000000000..bc7793e843 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example14.png differ diff --git a/html/includes/jpgraph/docs/html/img/example15.png b/html/includes/jpgraph/docs/html/img/example15.png new file mode 100644 index 0000000000..5d6d8f27d3 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example15.png differ diff --git a/html/includes/jpgraph/docs/html/img/example16.1.png b/html/includes/jpgraph/docs/html/img/example16.1.png new file mode 100644 index 0000000000..a112af8e82 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example16.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example16.2.png b/html/includes/jpgraph/docs/html/img/example16.2.png new file mode 100644 index 0000000000..0bd30ef368 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example16.2.png differ diff --git a/html/includes/jpgraph/docs/html/img/example16.3.png b/html/includes/jpgraph/docs/html/img/example16.3.png new file mode 100644 index 0000000000..65615c4d25 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example16.3.png differ diff --git a/html/includes/jpgraph/docs/html/img/example16.4.png b/html/includes/jpgraph/docs/html/img/example16.4.png new file mode 100644 index 0000000000..947cb518a4 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example16.4.png differ diff --git a/html/includes/jpgraph/docs/html/img/example16.6.png b/html/includes/jpgraph/docs/html/img/example16.6.png new file mode 100644 index 0000000000..12ef14c55d Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example16.6.png differ diff --git a/html/includes/jpgraph/docs/html/img/example16.png b/html/includes/jpgraph/docs/html/img/example16.png new file mode 100644 index 0000000000..b03ccbaca7 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example16.png differ diff --git a/html/includes/jpgraph/docs/html/img/example17.png b/html/includes/jpgraph/docs/html/img/example17.png new file mode 100644 index 0000000000..0af9f470f3 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example17.png differ diff --git a/html/includes/jpgraph/docs/html/img/example18.png b/html/includes/jpgraph/docs/html/img/example18.png new file mode 100644 index 0000000000..6aa531bbb5 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example18.png differ diff --git a/html/includes/jpgraph/docs/html/img/example19.1.png b/html/includes/jpgraph/docs/html/img/example19.1.png new file mode 100644 index 0000000000..aee9ccbd1a Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example19.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example19.png b/html/includes/jpgraph/docs/html/img/example19.png new file mode 100644 index 0000000000..3ad813b04f Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example19.png differ diff --git a/html/includes/jpgraph/docs/html/img/example2.png b/html/includes/jpgraph/docs/html/img/example2.png new file mode 100644 index 0000000000..b7abf36fb0 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example2.png differ diff --git a/html/includes/jpgraph/docs/html/img/example20.1.png b/html/includes/jpgraph/docs/html/img/example20.1.png new file mode 100644 index 0000000000..699b08a90d Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example20.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example20.2.png b/html/includes/jpgraph/docs/html/img/example20.2.png new file mode 100644 index 0000000000..1c50b89c2e Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example20.2.png differ diff --git a/html/includes/jpgraph/docs/html/img/example20.3.png b/html/includes/jpgraph/docs/html/img/example20.3.png new file mode 100644 index 0000000000..5fa5556ab3 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example20.3.png differ diff --git a/html/includes/jpgraph/docs/html/img/example20.4.png b/html/includes/jpgraph/docs/html/img/example20.4.png new file mode 100644 index 0000000000..250de655e5 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example20.4.png differ diff --git a/html/includes/jpgraph/docs/html/img/example20.5.png b/html/includes/jpgraph/docs/html/img/example20.5.png new file mode 100644 index 0000000000..00a457229b Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example20.5.png differ diff --git a/html/includes/jpgraph/docs/html/img/example20.png b/html/includes/jpgraph/docs/html/img/example20.png new file mode 100644 index 0000000000..515a5f6fcb Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example20.png differ diff --git a/html/includes/jpgraph/docs/html/img/example21.png b/html/includes/jpgraph/docs/html/img/example21.png new file mode 100644 index 0000000000..0ecf226011 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example21.png differ diff --git a/html/includes/jpgraph/docs/html/img/example22.png b/html/includes/jpgraph/docs/html/img/example22.png new file mode 100644 index 0000000000..1388325329 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example22.png differ diff --git a/html/includes/jpgraph/docs/html/img/example23.png b/html/includes/jpgraph/docs/html/img/example23.png new file mode 100644 index 0000000000..17b059df0c Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example23.png differ diff --git a/html/includes/jpgraph/docs/html/img/example24.png b/html/includes/jpgraph/docs/html/img/example24.png new file mode 100644 index 0000000000..07154b022c Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example24.png differ diff --git a/html/includes/jpgraph/docs/html/img/example25.1.png b/html/includes/jpgraph/docs/html/img/example25.1.png new file mode 100644 index 0000000000..9f82a96965 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example25.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example25.2.png b/html/includes/jpgraph/docs/html/img/example25.2.png new file mode 100644 index 0000000000..1ad79f8303 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example25.2.png differ diff --git a/html/includes/jpgraph/docs/html/img/example25.png b/html/includes/jpgraph/docs/html/img/example25.png new file mode 100644 index 0000000000..5cefe700a5 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example25.png differ diff --git a/html/includes/jpgraph/docs/html/img/example26.1.png b/html/includes/jpgraph/docs/html/img/example26.1.png new file mode 100644 index 0000000000..9b0a691b28 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example26.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example26.png b/html/includes/jpgraph/docs/html/img/example26.png new file mode 100644 index 0000000000..2ed5391b57 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example26.png differ diff --git a/html/includes/jpgraph/docs/html/img/example27.1.png b/html/includes/jpgraph/docs/html/img/example27.1.png new file mode 100644 index 0000000000..7c445c1284 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example27.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example27.2.png b/html/includes/jpgraph/docs/html/img/example27.2.png new file mode 100644 index 0000000000..9e86e3616a Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example27.2.png differ diff --git a/html/includes/jpgraph/docs/html/img/example27.3.png b/html/includes/jpgraph/docs/html/img/example27.3.png new file mode 100644 index 0000000000..b3ea981c2f Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example27.3.png differ diff --git a/html/includes/jpgraph/docs/html/img/example27.png b/html/includes/jpgraph/docs/html/img/example27.png new file mode 100644 index 0000000000..92efaea278 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example27.png differ diff --git a/html/includes/jpgraph/docs/html/img/example28.1.png b/html/includes/jpgraph/docs/html/img/example28.1.png new file mode 100644 index 0000000000..80dac44161 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example28.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example28.2.png b/html/includes/jpgraph/docs/html/img/example28.2.png new file mode 100644 index 0000000000..5b9589cd14 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example28.2.png differ diff --git a/html/includes/jpgraph/docs/html/img/example28.3.png b/html/includes/jpgraph/docs/html/img/example28.3.png new file mode 100644 index 0000000000..92434d0b67 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example28.3.png differ diff --git a/html/includes/jpgraph/docs/html/img/example28.png b/html/includes/jpgraph/docs/html/img/example28.png new file mode 100644 index 0000000000..1fc9b92f62 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example28.png differ diff --git a/html/includes/jpgraph/docs/html/img/example3.1.png b/html/includes/jpgraph/docs/html/img/example3.1.png new file mode 100644 index 0000000000..4c1ccee9a6 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example3.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example3.2.1.png b/html/includes/jpgraph/docs/html/img/example3.2.1.png new file mode 100644 index 0000000000..476cf85fb5 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example3.2.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example3.2.2.png b/html/includes/jpgraph/docs/html/img/example3.2.2.png new file mode 100644 index 0000000000..354a653bff Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example3.2.2.png differ diff --git a/html/includes/jpgraph/docs/html/img/example3.2.png b/html/includes/jpgraph/docs/html/img/example3.2.png new file mode 100644 index 0000000000..1812323bb5 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example3.2.png differ diff --git a/html/includes/jpgraph/docs/html/img/example3.3.png b/html/includes/jpgraph/docs/html/img/example3.3.png new file mode 100644 index 0000000000..8aa7ce1247 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example3.3.png differ diff --git a/html/includes/jpgraph/docs/html/img/example3.4.png b/html/includes/jpgraph/docs/html/img/example3.4.png new file mode 100644 index 0000000000..41650af0fc Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example3.4.png differ diff --git a/html/includes/jpgraph/docs/html/img/example3.png b/html/includes/jpgraph/docs/html/img/example3.png new file mode 100644 index 0000000000..94d0122aa0 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example3.png differ diff --git a/html/includes/jpgraph/docs/html/img/example4.png b/html/includes/jpgraph/docs/html/img/example4.png new file mode 100644 index 0000000000..4c1c175ced Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example4.png differ diff --git a/html/includes/jpgraph/docs/html/img/example5.1.png b/html/includes/jpgraph/docs/html/img/example5.1.png new file mode 100644 index 0000000000..d3b4a6bce5 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example5.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example5.png b/html/includes/jpgraph/docs/html/img/example5.png new file mode 100644 index 0000000000..ce8dbebb7a Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example5.png differ diff --git a/html/includes/jpgraph/docs/html/img/example6.1.png b/html/includes/jpgraph/docs/html/img/example6.1.png new file mode 100644 index 0000000000..04d9a9e515 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example6.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example6.2.png b/html/includes/jpgraph/docs/html/img/example6.2.png new file mode 100644 index 0000000000..d512867dfa Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example6.2.png differ diff --git a/html/includes/jpgraph/docs/html/img/example6.png b/html/includes/jpgraph/docs/html/img/example6.png new file mode 100644 index 0000000000..4ce0e3ed5c Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example6.png differ diff --git a/html/includes/jpgraph/docs/html/img/example7.png b/html/includes/jpgraph/docs/html/img/example7.png new file mode 100644 index 0000000000..e657320835 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example7.png differ diff --git a/html/includes/jpgraph/docs/html/img/example8.png b/html/includes/jpgraph/docs/html/img/example8.png new file mode 100644 index 0000000000..09cb26ab8b Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example8.png differ diff --git a/html/includes/jpgraph/docs/html/img/example9.1.png b/html/includes/jpgraph/docs/html/img/example9.1.png new file mode 100644 index 0000000000..e5808cd149 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example9.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/example9.2.png b/html/includes/jpgraph/docs/html/img/example9.2.png new file mode 100644 index 0000000000..659e6ddf42 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example9.2.png differ diff --git a/html/includes/jpgraph/docs/html/img/example9.png b/html/includes/jpgraph/docs/html/img/example9.png new file mode 100644 index 0000000000..9e659154a0 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/example9.png differ diff --git a/html/includes/jpgraph/docs/html/img/fieldscatterex1.png b/html/includes/jpgraph/docs/html/img/fieldscatterex1.png new file mode 100644 index 0000000000..41c495a6ee Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/fieldscatterex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/filledgridex1.png b/html/includes/jpgraph/docs/html/img/filledgridex1.png new file mode 100644 index 0000000000..5dc79f44c6 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/filledgridex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/filledlineex01.1.png b/html/includes/jpgraph/docs/html/img/filledlineex01.1.png new file mode 100644 index 0000000000..6eb5c67075 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/filledlineex01.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/filledlineex01.png b/html/includes/jpgraph/docs/html/img/filledlineex01.png new file mode 100644 index 0000000000..cc4ac2653d Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/filledlineex01.png differ diff --git a/html/includes/jpgraph/docs/html/img/funcex1.png b/html/includes/jpgraph/docs/html/img/funcex1.png new file mode 100644 index 0000000000..86b99caab5 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/funcex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttconstrainex0.png b/html/includes/jpgraph/docs/html/img/ganttconstrainex0.png new file mode 100644 index 0000000000..edbeccb8e3 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttconstrainex0.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttconstrainex1.png b/html/includes/jpgraph/docs/html/img/ganttconstrainex1.png new file mode 100644 index 0000000000..6edaa0fa60 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttconstrainex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex00.png b/html/includes/jpgraph/docs/html/img/ganttex00.png new file mode 100644 index 0000000000..88f899125f Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex00.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex01.png b/html/includes/jpgraph/docs/html/img/ganttex01.png new file mode 100644 index 0000000000..6f55a1ef88 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex01.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex02.png b/html/includes/jpgraph/docs/html/img/ganttex02.png new file mode 100644 index 0000000000..e6c36524dc Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex02.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex03.png b/html/includes/jpgraph/docs/html/img/ganttex03.png new file mode 100644 index 0000000000..98aa2400b4 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex03.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex04.png b/html/includes/jpgraph/docs/html/img/ganttex04.png new file mode 100644 index 0000000000..fbcf21c968 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex04.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex05.png b/html/includes/jpgraph/docs/html/img/ganttex05.png new file mode 100644 index 0000000000..7b1cf6d7d0 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex05.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex06.png b/html/includes/jpgraph/docs/html/img/ganttex06.png new file mode 100644 index 0000000000..517815bf4c Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex06.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex07.png b/html/includes/jpgraph/docs/html/img/ganttex07.png new file mode 100644 index 0000000000..63ec02ad05 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex07.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex08.png b/html/includes/jpgraph/docs/html/img/ganttex08.png new file mode 100644 index 0000000000..4fef391d6e Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex08.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex09.png b/html/includes/jpgraph/docs/html/img/ganttex09.png new file mode 100644 index 0000000000..233299cf37 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex09.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex10.png b/html/includes/jpgraph/docs/html/img/ganttex10.png new file mode 100644 index 0000000000..ddaf2c48c3 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex10.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex11.png b/html/includes/jpgraph/docs/html/img/ganttex11.png new file mode 100644 index 0000000000..839c730b37 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex11.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex12.png b/html/includes/jpgraph/docs/html/img/ganttex12.png new file mode 100644 index 0000000000..91f1d4b516 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex12.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex13.png b/html/includes/jpgraph/docs/html/img/ganttex13.png new file mode 100644 index 0000000000..4c473f363a Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex13.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex14.png b/html/includes/jpgraph/docs/html/img/ganttex14.png new file mode 100644 index 0000000000..b3ce84c6ab Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex14.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex15.png b/html/includes/jpgraph/docs/html/img/ganttex15.png new file mode 100644 index 0000000000..1d05b3a6d6 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex15.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex16.png b/html/includes/jpgraph/docs/html/img/ganttex16.png new file mode 100644 index 0000000000..d40b88ea45 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex16.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex17.png b/html/includes/jpgraph/docs/html/img/ganttex17.png new file mode 100644 index 0000000000..d108816eb6 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex17.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex18.png b/html/includes/jpgraph/docs/html/img/ganttex18.png new file mode 100644 index 0000000000..06bc561ed4 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex18.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttex19.png b/html/includes/jpgraph/docs/html/img/ganttex19.png new file mode 100644 index 0000000000..772f1fe723 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttex19.png differ diff --git a/html/includes/jpgraph/docs/html/img/gantthgridex1.png b/html/includes/jpgraph/docs/html/img/gantthgridex1.png new file mode 100644 index 0000000000..5a97839c0c Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/gantthgridex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/gantthourex1.png b/html/includes/jpgraph/docs/html/img/gantthourex1.png new file mode 100644 index 0000000000..b5b3931e78 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/gantthourex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/gantthourminex1.png b/html/includes/jpgraph/docs/html/img/gantthourminex1.png new file mode 100644 index 0000000000..7b524952a9 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/gantthourminex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/gantticonex1.png b/html/includes/jpgraph/docs/html/img/gantticonex1.png new file mode 100644 index 0000000000..e311fe64da Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/gantticonex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/ganttsimpleex1.png b/html/includes/jpgraph/docs/html/img/ganttsimpleex1.png new file mode 100644 index 0000000000..f995c20456 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/ganttsimpleex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/gradbkgex1.png b/html/includes/jpgraph/docs/html/img/gradbkgex1.png new file mode 100644 index 0000000000..cc4fccce7d Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/gradbkgex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/horizbarex1.png b/html/includes/jpgraph/docs/html/img/horizbarex1.png new file mode 100644 index 0000000000..cfe93a05a1 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/horizbarex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/horizbarex2.png b/html/includes/jpgraph/docs/html/img/horizbarex2.png new file mode 100644 index 0000000000..fef62c94bf Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/horizbarex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/horizbarex3.png b/html/includes/jpgraph/docs/html/img/horizbarex3.png new file mode 100644 index 0000000000..19434a8647 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/horizbarex3.png differ diff --git a/html/includes/jpgraph/docs/html/img/horizbarex4.png b/html/includes/jpgraph/docs/html/img/horizbarex4.png new file mode 100644 index 0000000000..601dd2b9fb Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/horizbarex4.png differ diff --git a/html/includes/jpgraph/docs/html/img/imgadj_b00c00sat-1.jpg b/html/includes/jpgraph/docs/html/img/imgadj_b00c00sat-1.jpg new file mode 100644 index 0000000000..6071541106 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/imgadj_b00c00sat-1.jpg differ diff --git a/html/includes/jpgraph/docs/html/img/imgadj_b03c-03sat0.jpg b/html/includes/jpgraph/docs/html/img/imgadj_b03c-03sat0.jpg new file mode 100644 index 0000000000..a24ca50ff0 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/imgadj_b03c-03sat0.jpg differ diff --git a/html/includes/jpgraph/docs/html/img/imgadj_b04c-07sat-1.jpg b/html/includes/jpgraph/docs/html/img/imgadj_b04c-07sat-1.jpg new file mode 100644 index 0000000000..2fc8ebb6a6 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/imgadj_b04c-07sat-1.jpg differ diff --git a/html/includes/jpgraph/docs/html/img/imgadj_b04c-07sat0.jpg b/html/includes/jpgraph/docs/html/img/imgadj_b04c-07sat0.jpg new file mode 100644 index 0000000000..6f7e5d40e3 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/imgadj_b04c-07sat0.jpg differ diff --git a/html/includes/jpgraph/docs/html/img/imgadj_b0c0sat1.jpg b/html/includes/jpgraph/docs/html/img/imgadj_b0c0sat1.jpg new file mode 100644 index 0000000000..114cef7137 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/imgadj_b0c0sat1.jpg differ diff --git a/html/includes/jpgraph/docs/html/img/imgadj_orig.jpg b/html/includes/jpgraph/docs/html/img/imgadj_orig.jpg new file mode 100644 index 0000000000..02651a74fe Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/imgadj_orig.jpg differ diff --git a/html/includes/jpgraph/docs/html/img/imgmarkerex1.png b/html/includes/jpgraph/docs/html/img/imgmarkerex1.png new file mode 100644 index 0000000000..18df525c07 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/imgmarkerex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/impulsex1.png b/html/includes/jpgraph/docs/html/img/impulsex1.png new file mode 100644 index 0000000000..e56a0cd1dd Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/impulsex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/impulsex2.png b/html/includes/jpgraph/docs/html/img/impulsex2.png new file mode 100644 index 0000000000..efb611fb92 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/impulsex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/impulsex3.png b/html/includes/jpgraph/docs/html/img/impulsex3.png new file mode 100644 index 0000000000..e2f129feaf Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/impulsex3.png differ diff --git a/html/includes/jpgraph/docs/html/img/impulsex4.png b/html/includes/jpgraph/docs/html/img/impulsex4.png new file mode 100644 index 0000000000..752f1658c5 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/impulsex4.png differ diff --git a/html/includes/jpgraph/docs/html/img/inyaxisex2.png b/html/includes/jpgraph/docs/html/img/inyaxisex2.png new file mode 100644 index 0000000000..cf8d09dc9d Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/inyaxisex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/linebarcentex1.png b/html/includes/jpgraph/docs/html/img/linebarcentex1.png new file mode 100644 index 0000000000..2862f9f5ec Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/linebarcentex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/lineiconex1.png b/html/includes/jpgraph/docs/html/img/lineiconex1.png new file mode 100644 index 0000000000..89c5518de0 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/lineiconex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/lineiconex2.png b/html/includes/jpgraph/docs/html/img/lineiconex2.png new file mode 100644 index 0000000000..5675c4554b Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/lineiconex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/listfontsex1.png b/html/includes/jpgraph/docs/html/img/listfontsex1.png new file mode 100644 index 0000000000..1fd5dbc08a Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/listfontsex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/logbarex1.png b/html/includes/jpgraph/docs/html/img/logbarex1.png new file mode 100644 index 0000000000..b9939e86ce Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/logbarex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/loglogex1.png b/html/includes/jpgraph/docs/html/img/loglogex1.png new file mode 100644 index 0000000000..041827de90 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/loglogex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/manscaleex1.png b/html/includes/jpgraph/docs/html/img/manscaleex1.png new file mode 100644 index 0000000000..68cd5eb9bb Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/manscaleex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/manscaleex2.png b/html/includes/jpgraph/docs/html/img/manscaleex2.png new file mode 100644 index 0000000000..644183774d Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/manscaleex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/manscaleex3.png b/html/includes/jpgraph/docs/html/img/manscaleex3.png new file mode 100644 index 0000000000..f8a9783cc8 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/manscaleex3.png differ diff --git a/html/includes/jpgraph/docs/html/img/manscaleex4.png b/html/includes/jpgraph/docs/html/img/manscaleex4.png new file mode 100644 index 0000000000..2ad8d2c6f4 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/manscaleex4.png differ diff --git a/html/includes/jpgraph/docs/html/img/markflagex1.png b/html/includes/jpgraph/docs/html/img/markflagex1.png new file mode 100644 index 0000000000..de13832be8 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/markflagex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/nullvalueex01.png b/html/includes/jpgraph/docs/html/img/nullvalueex01.png new file mode 100644 index 0000000000..a50583825c Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/nullvalueex01.png differ diff --git a/html/includes/jpgraph/docs/html/img/partiallyfilledlineex1.png b/html/includes/jpgraph/docs/html/img/partiallyfilledlineex1.png new file mode 100644 index 0000000000..868f0e7729 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/partiallyfilledlineex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/piecex1.png b/html/includes/jpgraph/docs/html/img/piecex1.png new file mode 100644 index 0000000000..3e151d810c Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/piecex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/piecex2.png b/html/includes/jpgraph/docs/html/img/piecex2.png new file mode 100644 index 0000000000..2423350b00 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/piecex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/pieex3.png b/html/includes/jpgraph/docs/html/img/pieex3.png new file mode 100644 index 0000000000..509f15751c Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/pieex3.png differ diff --git a/html/includes/jpgraph/docs/html/img/pieex8.png b/html/includes/jpgraph/docs/html/img/pieex8.png new file mode 100644 index 0000000000..de2d9f4af4 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/pieex8.png differ diff --git a/html/includes/jpgraph/docs/html/img/pieex9.png b/html/includes/jpgraph/docs/html/img/pieex9.png new file mode 100644 index 0000000000..92b101a2bc Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/pieex9.png differ diff --git a/html/includes/jpgraph/docs/html/img/pielabelsex1.png b/html/includes/jpgraph/docs/html/img/pielabelsex1.png new file mode 100644 index 0000000000..fcf4c7905d Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/pielabelsex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/pielabelsex2.png b/html/includes/jpgraph/docs/html/img/pielabelsex2.png new file mode 100644 index 0000000000..cc1d2193cb Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/pielabelsex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/pielabelsex4.png b/html/includes/jpgraph/docs/html/img/pielabelsex4.png new file mode 100644 index 0000000000..a6b89e4142 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/pielabelsex4.png differ diff --git a/html/includes/jpgraph/docs/html/img/polarex0-180.png b/html/includes/jpgraph/docs/html/img/polarex0-180.png new file mode 100644 index 0000000000..fc102f165f Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/polarex0-180.png differ diff --git a/html/includes/jpgraph/docs/html/img/polarex0.png b/html/includes/jpgraph/docs/html/img/polarex0.png new file mode 100644 index 0000000000..ac7f8bf161 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/polarex0.png differ diff --git a/html/includes/jpgraph/docs/html/img/polarex3-lin.png b/html/includes/jpgraph/docs/html/img/polarex3-lin.png new file mode 100644 index 0000000000..29cea29fbb Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/polarex3-lin.png differ diff --git a/html/includes/jpgraph/docs/html/img/polarex3.png b/html/includes/jpgraph/docs/html/img/polarex3.png new file mode 100644 index 0000000000..bf2fe0652f Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/polarex3.png differ diff --git a/html/includes/jpgraph/docs/html/img/polarex4.png b/html/includes/jpgraph/docs/html/img/polarex4.png new file mode 100644 index 0000000000..62ae5a4e03 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/polarex4.png differ diff --git a/html/includes/jpgraph/docs/html/img/polarex5.png b/html/includes/jpgraph/docs/html/img/polarex5.png new file mode 100644 index 0000000000..9a46816638 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/polarex5.png differ diff --git a/html/includes/jpgraph/docs/html/img/polarex7-2.png b/html/includes/jpgraph/docs/html/img/polarex7-2.png new file mode 100644 index 0000000000..b7bd0648af Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/polarex7-2.png differ diff --git a/html/includes/jpgraph/docs/html/img/polarex9.png b/html/includes/jpgraph/docs/html/img/polarex9.png new file mode 100644 index 0000000000..aeffaa89f6 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/polarex9.png differ diff --git a/html/includes/jpgraph/docs/html/img/radarex1.png b/html/includes/jpgraph/docs/html/img/radarex1.png new file mode 100644 index 0000000000..c9a7aa1325 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/radarex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/radarex2.png b/html/includes/jpgraph/docs/html/img/radarex2.png new file mode 100644 index 0000000000..8118cdbf38 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/radarex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/radarex4.png b/html/includes/jpgraph/docs/html/img/radarex4.png new file mode 100644 index 0000000000..ac4acaf0fc Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/radarex4.png differ diff --git a/html/includes/jpgraph/docs/html/img/radarex6.1.png b/html/includes/jpgraph/docs/html/img/radarex6.1.png new file mode 100644 index 0000000000..1e093188b5 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/radarex6.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/radarex6.png b/html/includes/jpgraph/docs/html/img/radarex6.png new file mode 100644 index 0000000000..ffece19f77 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/radarex6.png differ diff --git a/html/includes/jpgraph/docs/html/img/radarex7.png b/html/includes/jpgraph/docs/html/img/radarex7.png new file mode 100644 index 0000000000..fc76f93a39 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/radarex7.png differ diff --git a/html/includes/jpgraph/docs/html/img/radarex8.1.png b/html/includes/jpgraph/docs/html/img/radarex8.1.png new file mode 100644 index 0000000000..0d704c861b Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/radarex8.1.png differ diff --git a/html/includes/jpgraph/docs/html/img/radarex8.png b/html/includes/jpgraph/docs/html/img/radarex8.png new file mode 100644 index 0000000000..46b5dd2f9b Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/radarex8.png differ diff --git a/html/includes/jpgraph/docs/html/img/radarmarkex1.png b/html/includes/jpgraph/docs/html/img/radarmarkex1.png new file mode 100644 index 0000000000..de79ed6312 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/radarmarkex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/rotex0.png b/html/includes/jpgraph/docs/html/img/rotex0.png new file mode 100644 index 0000000000..6d6246ce36 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/rotex0.png differ diff --git a/html/includes/jpgraph/docs/html/img/rotex1.png b/html/includes/jpgraph/docs/html/img/rotex1.png new file mode 100644 index 0000000000..981d7889f4 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/rotex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/rotex2.png b/html/includes/jpgraph/docs/html/img/rotex2.png new file mode 100644 index 0000000000..cbe7c4cba9 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/rotex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/rotex3.png b/html/includes/jpgraph/docs/html/img/rotex3.png new file mode 100644 index 0000000000..2e24171eb1 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/rotex3.png differ diff --git a/html/includes/jpgraph/docs/html/img/rotex4.png b/html/includes/jpgraph/docs/html/img/rotex4.png new file mode 100644 index 0000000000..e4619c445a Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/rotex4.png differ diff --git a/html/includes/jpgraph/docs/html/img/rotex5.png b/html/includes/jpgraph/docs/html/img/rotex5.png new file mode 100644 index 0000000000..052eb315cd Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/rotex5.png differ diff --git a/html/includes/jpgraph/docs/html/img/scatterex1.png b/html/includes/jpgraph/docs/html/img/scatterex1.png new file mode 100644 index 0000000000..6b1efdf2ac Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/scatterex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/scatterex2.png b/html/includes/jpgraph/docs/html/img/scatterex2.png new file mode 100644 index 0000000000..c51579bafa Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/scatterex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/smallstaticbandsex1.png b/html/includes/jpgraph/docs/html/img/smallstaticbandsex1.png new file mode 100644 index 0000000000..d2f80cb500 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/smallstaticbandsex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/smallstaticbandsex10.png b/html/includes/jpgraph/docs/html/img/smallstaticbandsex10.png new file mode 100644 index 0000000000..abd1cfabba Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/smallstaticbandsex10.png differ diff --git a/html/includes/jpgraph/docs/html/img/smallstaticbandsex2.png b/html/includes/jpgraph/docs/html/img/smallstaticbandsex2.png new file mode 100644 index 0000000000..160ba68bca Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/smallstaticbandsex2.png differ diff --git a/html/includes/jpgraph/docs/html/img/smallstaticbandsex3.png b/html/includes/jpgraph/docs/html/img/smallstaticbandsex3.png new file mode 100644 index 0000000000..6e015e5276 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/smallstaticbandsex3.png differ diff --git a/html/includes/jpgraph/docs/html/img/smallstaticbandsex4.png b/html/includes/jpgraph/docs/html/img/smallstaticbandsex4.png new file mode 100644 index 0000000000..941070aefe Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/smallstaticbandsex4.png differ diff --git a/html/includes/jpgraph/docs/html/img/smallstaticbandsex5.png b/html/includes/jpgraph/docs/html/img/smallstaticbandsex5.png new file mode 100644 index 0000000000..cf67640d5e Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/smallstaticbandsex5.png differ diff --git a/html/includes/jpgraph/docs/html/img/smallstaticbandsex6.png b/html/includes/jpgraph/docs/html/img/smallstaticbandsex6.png new file mode 100644 index 0000000000..00ce901994 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/smallstaticbandsex6.png differ diff --git a/html/includes/jpgraph/docs/html/img/smallstaticbandsex7.png b/html/includes/jpgraph/docs/html/img/smallstaticbandsex7.png new file mode 100644 index 0000000000..a5bab99005 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/smallstaticbandsex7.png differ diff --git a/html/includes/jpgraph/docs/html/img/smallstaticbandsex8.png b/html/includes/jpgraph/docs/html/img/smallstaticbandsex8.png new file mode 100644 index 0000000000..31f8b23204 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/smallstaticbandsex8.png differ diff --git a/html/includes/jpgraph/docs/html/img/smallstaticbandsex9.png b/html/includes/jpgraph/docs/html/img/smallstaticbandsex9.png new file mode 100644 index 0000000000..80ca770fc7 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/smallstaticbandsex9.png differ diff --git a/html/includes/jpgraph/docs/html/img/splineex1.png b/html/includes/jpgraph/docs/html/img/splineex1.png new file mode 100644 index 0000000000..435f8223a0 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/splineex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/staticbandbarex7.png b/html/includes/jpgraph/docs/html/img/staticbandbarex7.png new file mode 100644 index 0000000000..7aa524f88a Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/staticbandbarex7.png differ diff --git a/html/includes/jpgraph/docs/html/img/stockex1.png b/html/includes/jpgraph/docs/html/img/stockex1.png new file mode 100644 index 0000000000..8d154e1395 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/stockex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/tabtitleex1.png b/html/includes/jpgraph/docs/html/img/tabtitleex1.png new file mode 100644 index 0000000000..c3930a6375 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/tabtitleex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/textalignex1.png b/html/includes/jpgraph/docs/html/img/textalignex1.png new file mode 100644 index 0000000000..68a65da107 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/textalignex1.png differ diff --git a/html/includes/jpgraph/docs/html/img/theme01.png b/html/includes/jpgraph/docs/html/img/theme01.png new file mode 100644 index 0000000000..18f8ea04a3 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/theme01.png differ diff --git a/html/includes/jpgraph/docs/html/img/theme02.png b/html/includes/jpgraph/docs/html/img/theme02.png new file mode 100644 index 0000000000..18f3919cff Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/theme02.png differ diff --git a/html/includes/jpgraph/docs/html/img/theme03.png b/html/includes/jpgraph/docs/html/img/theme03.png new file mode 100644 index 0000000000..aaad2758c4 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/theme03.png differ diff --git a/html/includes/jpgraph/docs/html/img/theme04.png b/html/includes/jpgraph/docs/html/img/theme04.png new file mode 100644 index 0000000000..24e4c91b62 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/theme04.png differ diff --git a/html/includes/jpgraph/docs/html/img/topxaxisex1.png b/html/includes/jpgraph/docs/html/img/topxaxisex1.png new file mode 100644 index 0000000000..32d1198bc4 Binary files /dev/null and b/html/includes/jpgraph/docs/html/img/topxaxisex1.png differ diff --git a/html/includes/jpgraph/docs/html/imgadj_b00c00sat-1.jpg b/html/includes/jpgraph/docs/html/imgadj_b00c00sat-1.jpg new file mode 100644 index 0000000000..6071541106 Binary files /dev/null and b/html/includes/jpgraph/docs/html/imgadj_b00c00sat-1.jpg differ diff --git a/html/includes/jpgraph/docs/html/imgadj_b03c-03sat0.jpg b/html/includes/jpgraph/docs/html/imgadj_b03c-03sat0.jpg new file mode 100644 index 0000000000..a24ca50ff0 Binary files /dev/null and b/html/includes/jpgraph/docs/html/imgadj_b03c-03sat0.jpg differ diff --git a/html/includes/jpgraph/docs/html/imgadj_b04c-07sat-1.jpg b/html/includes/jpgraph/docs/html/imgadj_b04c-07sat-1.jpg new file mode 100644 index 0000000000..2fc8ebb6a6 Binary files /dev/null and b/html/includes/jpgraph/docs/html/imgadj_b04c-07sat-1.jpg differ diff --git a/html/includes/jpgraph/docs/html/imgadj_b04c-07sat0.jpg b/html/includes/jpgraph/docs/html/imgadj_b04c-07sat0.jpg new file mode 100644 index 0000000000..6f7e5d40e3 Binary files /dev/null and b/html/includes/jpgraph/docs/html/imgadj_b04c-07sat0.jpg differ diff --git a/html/includes/jpgraph/docs/html/imgadj_b0c0sat1.jpg b/html/includes/jpgraph/docs/html/imgadj_b0c0sat1.jpg new file mode 100644 index 0000000000..114cef7137 Binary files /dev/null and b/html/includes/jpgraph/docs/html/imgadj_b0c0sat1.jpg differ diff --git a/html/includes/jpgraph/docs/html/imgadj_orig.jpg b/html/includes/jpgraph/docs/html/imgadj_orig.jpg new file mode 100644 index 0000000000..02651a74fe Binary files /dev/null and b/html/includes/jpgraph/docs/html/imgadj_orig.jpg differ diff --git a/html/includes/jpgraph/docs/html/index.html b/html/includes/jpgraph/docs/html/index.html new file mode 100644 index 0000000000..4fb4c1400a --- /dev/null +++ b/html/includes/jpgraph/docs/html/index.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+Table of Contents
+
+ + diff --git a/html/includes/jpgraph/docs/html/jpgmanual.css b/html/includes/jpgraph/docs/html/jpgmanual.css new file mode 100644 index 0000000000..cada8cc6dc --- /dev/null +++ b/html/includes/jpgraph/docs/html/jpgmanual.css @@ -0,0 +1,154 @@ +html { + background-color:white; +} + +body { + margin-top:10px; + margin-left:20px; + margin-right:20px; + width : 800px; + background-color:white; + border:black solid 1px; +} + +sub, sup { + font-size : smaller +} + +pre { + margin-left:6em; + font-family:monospace; + padding-left:10px; + border-left : black solid 3px; +} + +div.exscript { + background-color : #d3eae1 ; + font-family:monospace; + font-size:85%; + font-weight:bold; + padding:5px; + margin-left:7em; + margin-right:7em; +} + + +div.page { + margin-left:0.5em; + margin-right:2em; + margin-top:0px; + background-color:white; + width : 800px; + text-align:justify; + padding-left:1em; + padding-right:2em; + border-left:solid #101010 2px; + border-right:solid #101010 2px; + border-bottom:solid #101010 2px; +} + +.page p { + margin-left:5em; + margin-right:2em; + margin-top: 0; + margin-bottom: 0.4em; +} + +.page ul, .page ol { + margin-left:7em; + margin-right:5em; + margin-top: 0; + margin-bottom: 0.4em; +} + +.page h1 { + margin-left:0em; + font-family : sans-serif; + font-size:2em; +} + + +.page h2, .page h3 { + margin-left:0em; + font-family : sans-serif; + font-size:1.2em; +} + +div.caption { + font-style:italic; + font-family:sans-serif; + font-size:0.75em; + margin-top:2px; + margin-left:7em; + margin-right:7em; + margin-bottom:2em; + +} + +.capture b { + font-style:normal; +} + +div.abstract { + margin-left : 7em; + margin-right : 7em; + font-style: italic; + text-align: justify; + font-size:0.9em; + margin-bottom:3em; +} + +.abstract h3 { + font-family : sans-serif; + font-size:0.9em; + font-weight:bold; + text-align:center; + margin-bottom:0.2em; + margin-left : 3em; +} + +div.phpscript { + margin-left:7em; + margin-right:3em; + background-color:#E6E6E6; + font-family:monospace; + font-size:0.85em; + font-weight:bold; + padding-left:0.5em; +} + +div.note { + margin-left:7em; + margin-right:4em; + font-size:0.9em; + border-top: black solid 1px; + border-bottom: black solid 1px; + margin-top:1em; + margin-bottom:1em; +} + +div.note b { + font-weight: bold; + font-color:darkred; +} + +div.example { + text-align : center; + margin-left:10em; + margin-right:10em; + font-style: italic; + margin-bottom : 20px; +} + +table.codedefines { + margin-left : 5em; + border:black solid 1px; +} + +.codedefines th { + background-color: blue; + color:white; + font-style:bold; + font-family: arial; + font-size:1.2em; +} \ No newline at end of file diff --git a/html/includes/jpgraph/docs/html/manual_jpgraph.html b/html/includes/jpgraph/docs/html/manual_jpgraph.html new file mode 100644 index 0000000000..492013be01 --- /dev/null +++ b/html/includes/jpgraph/docs/html/manual_jpgraph.html @@ -0,0 +1,8893 @@ + + + + + + + + + +
+

1 About this manual

+

+

1.1 Version history

+

+

+ + + + +
VersionDateStatusWhoComment
R1.82005-12-28ReleasedJohan Persson +Additional info for JpGraph 1.20.1
+

1.2 How was this manual produced?

+

The bulk of the text was written directly in Emacs on a GNU/Linux + system in a mixture of PHP and HTML. A number of PHP functions were + used to automate the handling of formatting example code and figures.

+

To generate the images automatically in the img directory a custom + awk-script is used to extract all the used image script from the + manual. The script then uses the client version of PHP generate the + images from the scripts and stores them in the 'img' directory.

+

The final set of HTML files was then processes by HTMLDOC to + construct table of contents and chapter links.

+

2 Introduction

+

+

2.1 Version

+

This manual covers versions up to 1.20 of JpGraph. A 2D graph + plotting library for PHP.

+

Even though the library is known to work with version of PHP prior + to 4.3 the library is not tested nor is it recommended to run with any + older versions of PHP.

+

2.2 Software License

+

JpGraph is released under a dual license QPL 1.0 (Qt-License) for + non-commercial (including educational) use of the library and the + JpGraph Professional License for commercial use.

+

2.3 JpGraph Features

+

JpGraph library is an OO graph library which makes it easy to both + draw a "quick and dirty" graph with a minimum of code and quite complex + graphs which requires a very fine grain of control. The library tries + to assign sensible default values for most parameters hence making the + learning curve quite flat since for most of the time very few commands + is required to draw graphs with a pleasing esthetic look.

+

Some highlights of available features are

+
    +
  • Flexible scales, supports text-lin, text-log, lin-lin, lin-log, + log-lin and log-log and integer scales.
  • +
  • Supports both PNG, GIF and JPG graphic formats. Note that the + available formats are dependent on the specific PHP installation where + the library is used.
  • +
  • Supports caching of generated graphs to lessen burden of a HTTP + server.
  • +
  • Supports batch mode to only generate images to a file
  • +
  • Supports client side image maps which makes it easy to produce drill + down images.
  • +
  • Intelligent auto-scaling which gravitates towards esthetic values, + i.e. multiples of 2:s and 5:s
  • +
  • Fully supports manual scaling, with fine grain control of position + of ticks.
  • +
  • Supports background images with different formatting options
  • +
  • Supports color and brightness adjustments of images directly in PHP.
  • +
  • User specified grace for auto-scaling
  • +
  • Supports up to two different y-scale, it is possible to have + different left and right y-scale and add plots to both
  • +
  • Supports, line-plots, filled line-plots, accumulated line-plots, bar + plots, accumulated bar plots, grouped bar plots, error plots, line + error plots, scatter plots, gantt-charts, radar plots, 2D and 3D pie + charts.
  • +
  • Supports unlimited number of plots in each graph, makes it easy to + compose complex graph which consists of several plot types
  • +
  • User specified position of axis
  • +
  • Supports color gradient fill in seven styles
  • +
  • Designed as a flexible OO framework which makes it easy to add new + types of plots
  • +
  • Supports automatic legend generation
  • +
  • Supports both vertical and horizontal grids
  • +
  • Supports anti-aliasing of lines
  • +
  • Supports background images as well as unlimited number of icons in + the graph
  • +
  • Supports rotation of linear graphs
  • +
  • More then 400 named colors
  • +
  • Designed modularly - you don't have to include code which isn't used
  • +
  • ...and many many more features
  • +
+

In addition to these high level features the library has been + designed to be orthogonal and consistent in its' naming convention. For + example, to specify color each object (i.e. axis, grids, texts, titles + etc) within the graph implements the method SetColor() with the same + signature.

+

2.4 Getting the latest version

+

The latest version of jpgraph can always be found on +http://www.aditus.nu/jpgraph/

+

Information on version numbering schema

+
    +
  • 1.x -> 1.x.y, Bug fix release 'y' for version 1.x does not introduce + new features
  • +
  • 1.x -> 1.(x+1), Added functionality. Mostly keeping backwards + compatibility unless a very good reason not to.
  • +
  • 1.x -> 2.0, Support for PHP5
  • +
+

+

2.5 Planned future addition

+

For the latest update on planned future version see the web-site for + JpGraph at http://www.aditus.nu/jpgraph/

+

2.6 Known bugs and omissions

+

+
    +
  • Background images does not work as expected for rotated graphs
  • +
+

+

2.7 Acknowledgments

+

The idea for writing this library grew out of our own need for a + high quality graph drawing library for PHP. When evaluating potential + existing libraries we found (at that time circa 2001) these three

+
    +
  1. "chart 0.3" http://quimby.gnus.org/circus/chart/chart-0.3.tar.gz, + by Lars Magne Ingebrigtsen
  2. +
  3. "ykcee.php", http://ykcee.sourceforge.net
  4. +
  5. "phplot.php", http://www.phplot.com
  6. +
+

All these libraries implements some fine graphic features but + unfortunately none of those completely fulfilled our needs either for + available functionality (for example none of these supported both two + Y-scales, auto-scaling, and logarithmic scales), or general + flexibility. We especially needed the option of two Y-scales, which + none of the above packages supported. Our own preferences for design + was closest to "chart 0.3" so we started by fixing some bugs in that + package and adding some new features. However It was soon realized that + to add all the features and flexibility we needed to "chart 0.3" it + would require a complete rewrite since the original design wasn't + flexible enough, especially adding a second Y-scale would require a + more flexible OO architecture.

+

2.8 Reporting bugs and suggesting improvements

+

Defects or suggestion for new features can be entered using the +JpGraph BugTracker available at +http://www.aditus.nu/bugtraq/

+

Before reporting bugs or feature suggestions may we ask that the + following facts are considered.

+
    +
  • The 1.x version of the library does not work with PHP 5.x
  • +
  • The 1.x version of the library is only guaranteed to work with PHP + versions >= 4.3
  • +
  • The 2.x version of the library does not work with PHP 4.x
  • +
+

+

2.9 Getting support

+

Customers who have acquired the pro-version of the library are + entitled to prioritized e-mail support for a specific time after the + purchase. Support tickets may be created by first logging in to +http://www.aditus.nu/jpgraph/pro_login.php and then create a support + ticket.

+

For other users a public community forum is available at +http://jpgraph.intellit.nl/ where many common questions are answered + and discussed.

+

A collection of FAQ is available at +http://www.aditus.nu/jpgraph/jpgraphfaq.php

+

In addition there is a growing list of "HowTo" documents available + at +http://www.aditus.nu/jpgraph/jpgraphowto.php

+

Finally, we regret that we are unable to provide general support + regarding PHP/GD/TTF/Apache installation outside the specific scope of + the JpGraph library. Please see the corresponding documentation and + relevant FAQ for those products.

+

+

3 Installation

+

+

3.1 Preparation

+

In order to make use of the library it is necessary to ensure that + the script files can correctly access the library include files (as + described below) and that the PHP installation supports at least one + graphic format, i.e. it supports the "image" extension in PHP.

+

This is easiest verified by either checking the output of the + phpinfo() standard PHP function or by making sure the PHP + installation make the 'imagecreate()' function available.

+

This means that the installation + + must have a working GD-library together with PHP before the library + JpGraph can be used. Please make sure you have version 4.3.x or above + of PHP since JpGraph is not actively tested with + versions prior to PHP 4.3.x Ideally you should use at least PHP 4.3.8

+

Please note that the 1.x version of the library do not + support PHP 5.x

+

3.1.1 Verifying that you have the GD library + installed

+

In order to make sure that the GD installed the following example + would be run. The example creates a very simple image using just pure + GD calls and outputs an image in PNG format. This could be considered a + smoke-test to see that the GD library is available from PHP. Please + note that this is an absolute pre-requisite in order for the + JpGraph library to work at all.

+

Store the code snippet below somewhere in the document root and make + sure it runs correctly.

+  $im = @ +ImageCreate ( +150100) +
    or die (
+"Cannot create a new GD image."); +
$background_color  += ImageColorAllocate  +($im255 +255255); +
$text_color  += ImageColorAllocate  +($im233 +1491); +
ImageString  +($im1 +55,  "A Simple Text String"$text_color +); +
header ("Content-type: image/png"); +
ImagePng ($im); +

+

If the above script does not work or some error or warnings are + printed on the screen then it is necessary to correct those problems + before proceeding with the installation.

+

3.1.2 Verifying that you have GD2 installed

+

To access the more advanced features of JpGraph needs the GD 2.x + library. This will allow the use of features such as alpha-blending and + trucolor images.

+

The GD 2.x library is included in all standard PHP versions from + 4.2.x and above. To make sure that the GD 2.x library is installed the + following script must be working.

+  $im  +imagecreatetruecolor ( +300200);  +
$black imagecolorallocate ($im +000 +);  +
$white imagecolorallocate ($im +255255255 +);  +
+
imagefilledrectangle +($im,0, +0,399,99 +,$white);  +
imagerectangle +($im,20, +20,250,190 +,$black);  +
+
header ("Content-type: image/png" +);  +
imagepng ($im); +

+

After running this script you should now see a black rectangle in + your browser.

+

3.1.3 Preparing True Type Font Files

+

JpGraph contains as default a standard set of bitmap fonts which + only supports the standard ASCII 7-bit character set. In order to use + accented characters, UTF-8, Chinese, Japanese, etc You need to download + TTF fonts. Due to various legal issues no TTF fonts are supplied in the + JpGraph package. To enable TTF fonts there are three alternatives:

+
    +
  1. If you are on a Windows platform you can just point to the TTF + directory in JpGraph to the standard fonts directory (e.g + C:\windows\fonts\)
  2. +
  3. If you are on a Unix platform you can download and install the core + MS WEB-initiative fonts from +http://corefonts.sourceforge.net/
  4. +
  5. It is also possible to use the Vera Bitstream TTF fonts available + from http://www.gnome.org/fonts/ +
  6. +
+

It is also necessary to make sure that the PHP installation supports + TTF fonts (either through FreeType 1 or FreeType 2 libraries). I n + addition some suitable TTF font files must also be available. To make + the font files available for the library the directory path to the + location of the font files must be specified in the configuration file, + jpg-config.inc

+

JpGraph uses a standard naming convention for the TTF font files in + order to be able to find the correct font files. This naming convention + follows the standard naming of the available font files.

+

If the installation of the library is made on a computer running MS + Windows then it is recommended to use the already available font files + in Windows (usually located in C:\WINDOWS\FONTS).

+

If the installation is made on a UNIX derivate running X11 then the + font location can differ between versions and UNIX brands. One commonly + used path is "/usr/X11R6/lib/X11/fonts/truetype/".

+

Finally we note that it is possible to install additional fonts not + natively supported by the library. Since this requires augmenting the + library files this is considered advanced use and not further discussed + in this introduction.

+

3.1.4 Using non-latin based fonts with JpGraph

+

In addition to European font it is also possible to use non-latin + based fonts such as Cyrillic, Japanese and Chinese.

+

In all cases a suitable TTF font that supports the non-latin based + language must be available.

+

For Cyrillic support the define LANGUAGE_CYRILLIC in jpg-config.php + must be set to true. It is then possible to use a suitable Cyrillic + font as replacement for the ordinary fonts.

+

For Chinese character set JpGraph supports both BIG5 and GB2312 + encoding. For BIG5 encoding the PHP installation must have support for + the "iconv()" function. Furthermore the define CHINESE_TTF_FONT must be + set to the name of the Chinese BIG5 font that is to be used. By default + this is set to "bkai00mp.ttf". To use the Chinese BIG5 font in the + scripts one must then specify the font family as FF_CHINESE.

+

To use the alternative font files "simsun.ttc" and "simhei.ttf" + (which uses the GB2312 encoding) the only step needed is to install + those fonts in the normal TTF font directory and then specify the font + family as FF_SIMSUN, the "simhei.ttf" is used when the font style is + specified as FS_BOLD.

+

3.2 Customizing the installation

+

In order for JpGraph to work it is necessary to adjust the cache and + TTF directory to suit the specific installation. By default the TTF + directory is "/usr/X11R6/lib/X11/fonts/truetype/" and for the cache + "/tmp/jpgraph_cache/". These are defined as PHP defines at the top of + jpg-config.inc

+

Please make sure that PHP has write permissions to the cache + directory if the cache feature should be used. If this is not the case + a "Can't write file xxx.yyy" error will occur when a graph that uses + the cache feature are generate. More information regarding the cache + feature of JpGraph is available in the section Making sense of + caching system in JpGraph

+

3.3 Required files

+

This is the base library files, which you must have

+
    +
  • jpgraph.php, base library, always needed
  • +
  • jpg-config.inc, Configuration file
  • +
+

+

3.3.1 Plot extension modules

+

To add plots to the graph you will need one or more of the following + files plot extension files depending on what kind of graph you need to + create.

+
    +
  • jpgraph_log.php, Plot extension to support logarithmic X and Y + scales
  • +
  • jpgraph_line.php, Plot extension. Needed to draw various line plots
  • +
  • jpgraph_date.php, Plot extension to handle date scales.
  • +
  • jpgraph_bar.php, Plot extension. Needed to draw various bar plots
  • +
  • jpgraph_error.php, Plot extension. Needed to draw various error + plots
  • +
  • jpgraph_scatter.php, Plot extension. Needed to draw scatter and + impulse plots.
  • +
  • jpgraph_spider.php, Plot extension. Needed to draw spider plots.
  • +
  • jpgraph_pie.php, Plot extension. Needed to draw Pie plots
  • +
  • jpgraph_pie3d.php, Plot extension. Needed to draw 3D Pie plots
  • +
  • jpgraph_gantt.php, Plot extension. Needed to create gantt plots
  • +
  • jpgraph_radar.php, Plot extension. Needed for radar plots
  • +
  • jpgraph_polar.php, Plot extension. Needed for Polar plots
  • +
  • jpgraph_gantt.php, Plot extension. Needed for Gantt charts
  • +
  • jpgraph_regstat.php, Statistic extension. Needed to plot spline and + bezier curves
  • +
  • jpgraph_stock.php, Plot extension. Needed to plot stock charts
  • +
  • jpgraph_antispam.php, Special extension to generate anti-spam + images consisting of letters+images which are very hard to digitally + read with an OCR program
  • +
  • jpgraph_gradient.php, Internal module. Contains all color gradient
  • +
  • jpgraph_gb2312.php, Handling of gb2312 font encoding (used for some + Chinese fonts)
  • +
  • jpgraph_plotmark.inc, Handling of plotmarks in line and scatter + plot.
  • +
  • jpgraph_iconplot.php, Handling icons (small images) that can be + added to the plots
  • +
  • jpgraph_plotband.php, Handling of plotbands added to the graphs
  • +
  • jpgraph_flags.php, Handling of country flags used as plot marks or + as backgrounds.
  • +
  • jpgraph_utils.php, Various utility function
  • +
  • imgdata_*.inc, Encoded images for plotmarks
  • +
  • flags*.dat, Image data for flags. Pre-compiled data for country + flags.
  • +
  • jpgraph_canvas.php, Plot extension to make it possible to draw + arbitrary graphic on a canvas.
  • +
  • jpgraph_canvtools.php, Add on to the canvas graph to provide an + easier way to draw arbitrary shapes.
  • +
+

In the pro-version the following additional files are available

+
    +
  • jpgraph_windrose.php, Windrose plot extension
  • +
  • jpgraph_odo.php, Odometer plot extension
  • +
  • jpgraph_barcode.php, Linear barcode extension
  • +
  • jpgraph_pdf417.php, PDF417 2-Dimensional Barcode extension
  • +
+

+

3.4 Image formats and external image libraries

+

Per default the standard GD image library supports PNG graphic + formats. You will need to have that installed together with your PHP + module for this library to work at all. Please refer to PHP + documentation on specifics. Note that the newer versions of GD does not + support the GIF format due to copyright problems. Hence by default only + PNG is supported.

+

If you want JPEG support you will also need an additional library + for PHP, again please see PHP documentation for specifics. For most + practical purposes PNG is a better format since it normally achieves + better compression then GIF (typically by a factor of 2 for the types + of images generated by JpGraph). In comparison with JPEG format PNG is + also better for the type of images generated by this library. So, the + bottom line is, you should have a very good reason to choose any other + format then PNG.

+

By default the image format is set to "auto". This means that + JpGraph automatically chooses the best available graphic using the + preferred order "PNG", "GIF", "JPG".

+

+

3.5 Detailed steps to install JpGraph

+

+
    +
  1. If You are insatlling the 1.x branch then make sure the PHP version + used is at least 4.3.x (preferable 4.3.10 or higher) and that the PHP + version have compiled support for GD library. It is absolutely critical + that GD is fully working. Please see the earlier sections on how to + make sure. JpGraph supports both GD 1.x and GD 2.x However it is + strongly recommended to use GD 2.x since that will improve performance + and support true color images as well as alphablending. +

    If You are insatlling the 2.x branch then make sure the PHP version + used is at least 5.0.1 (preferable 5.0.5 or higher) and that the PHP + version have compiled support for GD 2.x library. Please note that the + 2.x branch will not work with PHP 4.x

    +
  2. +
  3. Unzip and copy the files to a directory of your choice.
  4. +
  5. Set up the directory paths in jpg-config.inc where the cache + directory should be and where your TTF directory is. Note that + Apache/PHP must have write permission in your cache directory.
  6. +
  7. Check that all rest of the DEFINE in the top of JpGraph.php is + setup to your preference. The default should be fine for most users. + (See also Note 5. below) Specifically check that the settings of + USE_GD2_LIBRARY reflects your installation, (should be true if you have + GD2 installed, false otherwise).
  8. +
  9. Make sure PHP have write privileges to your cache directory if you + plan on using the cache feature.
  10. +
  11. Some windows installations seems to have a problem with a PHP + script ending in a newline (This newline seems to be sent to the + browser and will cause a Header already sent error). If you have this + problem try remove all trailing newlines in the jpgraph* files
  12. +
  13. Read (really!) +the JpGraph FAQ.
  14. +
+

+

3.6 Troubleshooting your installation

+

For 99% of the users this library will work directly with a recent + installation of PHP without any problem.

+

Experience shows that most of the trouble are caused by either an + old buggy version of the free-type TTF library or using an old + antiquated version of the GD library. In order to narrow it down the + problem the following steps is helpful.

+
    +
  1. If no background images are displayed (instead a solid black box + are displayed) chances are that GD 2.x is available but the + jpg-config.inc has been changed so that true color images are disabled. + Correct this by enabling the USE_TRUECOLOR define.
  2. +
  3. If background images does not work make sure the settings of + USE_GD2_LIBRARY corresponds to the actual installation, i.e. If the GD2 + library is not available then this define must be false!
  4. +
  5. If you are running IIS and Win2k and get the error "Can't find + font" when trying to use TTF fonts then try to change the paths to UNIX + style, i.e. "/usr/local/fonts/ttf/". Remember that the path is absolute + and not relative to the htdocs catalogue.
  6. +
  7. If no images and no error messages gets sent back to the browser + then there is a big chance that HTTP-Server PHP module (e.g. + Apache-PHP) has crashed. This is often due to a broken PHP installation + and more than often a problem with the True Type libraries. The best + way to track these types of problem down is to investigate the + HTTP-Server logs or the general system logs for evidence of a PHP + crash. The other reasons is that in some rare cases the auto detection + of the GD library could fail. If only the GD1 library is available and + the JpGraph library mistakenly detects the GD2 this could in rare cases + cause PHP to crash. Please try re-run the example by setting the DEFINE + USE_GD2_LIBRARY to "false".
  8. +
  9. If the system is running IIS on Windows and some images which uses + TTF fonts just return an empty page then try to set the TTF_DIR path + manually (in jpg-config.php) to the directory where all the TTF fonts + are stored (normally c:/WINDOWS/fonts)
  10. +
  11. If the cache is enabled please make sure that the permissions are + correctly set for the cache directory so that the process running + Apache/PHP has write access to the cache directory.
  12. +
  13. If the TTF fonts only shows up as yellow then you have a buggy + installation of the freetype font library and the only thing to do is + to re-install and setup PHP+GD again.
  14. +
+

+

3.7 Compiling PHP 4

+

This is not meant to be a complete discussion about configuring + or compiling PHP. It is meant as an example of a configuration of PHP + that is known to work well with JpGraph.

+

Below is an example of a standard configuration that can be used to + configure and compile PHP for use with the JpGraph Library

+

Please note that depending on the specific installation requirements + other options might have to be specified, specifically the paths to + external libraries might need to be adjusted.

+
+./configure --prefix=/usr/share \
+--datadir=/usr/share/php \
+--with-apxs=/usr/sbin/apxs \
+--libdir=/usr/share \
+--includedir=/usr/include \
+--bindir=/usr/bin \
+--with-config-file-path=/etc \
+--enable-mbstring --enable-mbregex \
+--with-pdflib=/usr \
+--with-mysql  \
+--with-ttf-dir=/usr/lib \
+--with-freetype-dir=/usr/lib \
+--with-gd --enable-gd-imgstrttf --enable-gd-native-ttf \
+--with-zlib-dir=/usr/lib \
+--with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib --with-xpm-dir=/usr/X11R6 \
+--with-tiff-dir=/usr/lib \
+--enable-ftp \
+--enable-memory-limit --enable-safe-mode \
+--bindir=/usr/bin \
+--enable-bcmath -enable-calendar \
+--enable-ctype --with-ftp \
+--enable-magic-quotes \
+--enable-inline-optimization \
+--with-bz2 \
+--with-iconv
+
+

4 Quick Start: Dynamic Image Generation

+

The purpose of this chapter is to put dynamic image generation in + perspective and illustrate how HTML tags is used to call image + generating scripts. Even if You are familiar with PHP it is strongly + recommended to quickly browse through this chapter to make sure all + concepts are known.

+

If You fully understand and can explain the concept of MIME types, + HTTP streams and why the "Headers already sent error" error is very + common when generating dynamic images with PHP it is probably safe to + skip this chapter. Otherwise it might be wise to read through this + chapter once.

+

4.1 Scope of this chapter

+

+

4.1.1 What you will learn in this chapter

+

+
    +
  1. The principle of generating dynamic images in PHP
  2. +
  3. How to choose a specific image format (e.g. JPG, PNG, GIF)
  4. +
  5. Various ways of using the generated image, streaming it back to the + browser, sending it to a file or getting hold of the image handle for + further post processing
  6. +
  7. How to specify fonts (both bit-mapped and TTF) in JpGraph
  8. +
  9. How to extend JpGraph with your own fonts
  10. +
  11. How to work with Cyrillic fonts
  12. +
  13. How to specify colors in JpGraph
  14. +
  15. List all available named colors in JpGraph
  16. +
  17. How to effectively use the built in cache schema in JpGraph
  18. +
+

+

4.1.2 What you will NOT learn in this chapter

+

+
    +
  1. Any details on how to generate graphs with the JpGraph library
  2. +
+

+

4.2 How to generate images with PHP

+

As a general rule each PHP script which generates an image must be + specified in a separate file which is then called in an HTML <IMG> tag. + For example, the following HTML excerpt includes the image generated by + the PHP script in "fig1.php".

+

<img src="fig1.php"  +border=0 align=center width +=300 height=200> +

+

+

Strictly speaking the "align", "width" and "height" are not + necessary but helps the browser position the image correctly before the + image has been fully sent back to the browser.

+

The library will automatically generate the necessary headers to be + sent back to the browser so that it correctly recognize the data stream + received as an image of either PNG/GIF/JPEG format. The browser can + then correctly decode the image

+

Observe that you can't return anything else than an + image from the image script. By definition each HTML page (or more + correctly each HTTP stream) can only consist of one mime type which is + determined by the header for that particular stream.

+

A common mistake is to have a space in the beginning of the image + script which the HTTP server will send back to the browser. The browser + now assumes that the data coming back from this script is text since it + hasn't received an explicit header. When then the image headers get + sent back to the browser to forewarn the browser of the forthcoming + image the browser will not like that as it has already assumed the data + stream was a text stream. The browser will then give the infamous + "Headers already sent error".

+

To include several images together with text on a page you need to + have a parent page with several <IMG> tags which each refers to an + image script (or the same image script with GET/POST data).

+

4.2.1 Using the JpGraph library to send back images +

+

To get access to the JpGraph library you will need to include at + least two files, the base library and one or more of the plot + extensions. So for example to create a basic line plot the top of your + PHP file must have the lines:

+   +
include ( +'jpgraph.php'); +
include (
'jpgraph_line.php' +); +
... +
 
// Code that uses the jpgraph library +
...
+

+

+

Note: You might also use the PHP directive + require. The difference is subtle in that include will only include + the code if the include statement is actually executed. While require() + will always be replaced by the file specified. See PHP documentation + for further explanation. For most practical purposes they are + identical.

+

4.3 Using PHP directly

+

It is also possible to generate images directly using the command + line version of PHP. This works the same way as the normal "through the + browser" generation with the exception that no HTTP headers will be + generated. Only the binary image data.

+

Please make sure that you run the command line version of PHP (cli). + Using the CGI SAPI version will not work since then the HTTP headers + will be generated. Note: If the CGI version is used the generation of + headers may be suppressed by the '-q' option.

+

You can easily check the version installed by running

+
php --version
+

you should then get a response with something like

+
+PHP 4.3.8 (cli) (built: Aug 29 2004 22:48:10)
+Copyright (c) 1997-2004 The PHP Group
+Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
+
+

The important thing here is the

+
(cli)
+

marker. The JpGraph library check from what SAPI API it is invoked + from and adjusts the header generation accordingly.

+

If all the above requirements are met then images can be generated + directly on the command line and stored in a suitable file. For example + by

+
+$> php myimage.php > image.png
+
+

Please note that the file extension on the image file must match the + format in which the image is generated.

+

4.4 The basic principle of JpGraph and the creation of + images

+

The common pattern for creating graphs is

+
    +
  1. Create a script that constructs the image, type, colors size and so + on.
  2. +
  3. A wrapper script which contains one or more <IMG> tags to position + the graphs on the proper HTML page.
  4. +
+

Of course it is of perfectly possible to call the image script + directly in the browser to just display the generated image in the + browser.

+

You should remember that it is also possible to pass arguments to + the image script via the normal HTTP GET/POST arguments. For example

 <img src +="showgraph.php?a=1&b=2" +>

+

This could for example be used to control the appearance of the + image or perhaps send data to the image which will be displayed. Note + that this is probably not the best way to send large amount of data to + plot. Instead the only practical way, for large data sizes, is to get + all the data in the image script, perhaps from a DB. Another + alternative for large amount of data to be sent to the image script is + by creating a POST request to the image script.

+Note: Forcing the browser to update your image Some browser + may not send back a request to the web browser unless the user presses + "Refresh" (F5 - in most browsers). This can lead to problems that the + user is seeing old data. A simple trick is to add a dummy time argument + which is not used in the script. For example +
+echo '<img src="myimagescript.php?dummy='.now().'">';
+
+ It is also important to be aware of any internal caching the browser + might do. The general problem with dynamically generated images is that + the image generating script (file) remains the same. This makes the + browser believe that the data hasn't changed and if the browser already + has issues a previous GET request and has the data cached it will not + send a new GET if the timestamp on the file is the same since it then + believes it my use the old cached version.

+

When it comes to the structure of your imaging script they will + generally have the structure

+   +// ... Include necessary headers +
+
$graph  += new Graph($width, +$height, ...); +
+
+// ... code to construct the graph details +
+
$graph->Stroke(); +

+

JpGraph is completely Object oriented so all calls will be action on + specific instances of classes. One of the fundamental classes is the + Graph() class which represents the entire graph.

+

After the creation of the Graph() object all the code lines to + construct the details of the graph are added.

+

The final method called in an image script will most likely be the + Graph::Stroke() method. This will send the constructed image back + to the browser. A variation of this is used if the graph are supposed + to have image maps. In that case the final method will be + Graph::StrokeCSIM()

+

In addition to this standard usage pattern you can also choose to

+
    +
  • ... send the graph directly to a file
  • +
  • ... access the GD image handler for further image processing (also + needed to include the image in an PDF file)
  • +
  • ... make use of the builtin cache system to send back a previously + generated image
  • +
+

The cache system, which lessens the burden of the PHP server, works + by avoiding o run all the code that follows the initial Graph() call by + checking if the image has already been created and in that case + directly send back the previously created (and stored in a file) image + to the browser. When using the cache system a filename must be + specified in the initial Graph() call which is used to store the image + in the cache system and possibly also a timeout value to indicate how + long the image in the cache directory should be valid.

+

In many of the examples in this manual the following pattern will be + used

+ $graph = new  +Graph(300,200 +,"auto");

+

The two first parameters specify the width and height of the graph + and the third parameter the name of the image file in the cache + directory. The special name 'auto' indicates that the image file + will be given the same name as the image script but with the extension + changed to indicate the graphic format used, i.e '.jpg', '.png' and so + on.

+

Please note that the cache system by default is disabled and must be + enabled by setting the proper define in the file "jpg-config.inc"

+

4.5 Choosing the image format for JpGraph

+

By default JpGraph automatically chooses the image format to use in + the order PNG, JPEG and GIF. The exact format depends on what is + available on your system. There are two ways you can influence the way + the graphic format is chosen.

+
    +
  1. Change the default graphic format by changing the DEFINE
    +  DEFINE +("DEFAULT_GFORMAT" +,"auto");
    +

    +
  2. +
  3. Set the graphic format in your script by calling the method + SetImgFormat() For example, to force your script to use JPEG in one + specific image use
     $graph-> +img-> +SetImgFormat( +"jpeg") +
    +

    +
  4. +
+

+

4.6 Alternatives to streaming back the image

+

If you like to save the image directly to a file instead of + streaming it back to the browser then you just have to specify an + absolute filename in the final call to Graph::Stroke(), i.e.

+

+ $graph-> +Stroke( +"/usr/home/peter/images/result2002.png");

+

+

Please note that the user running as Apache/PHP must have write + access to the specified directory.

+

There are also two predefined filenames which have special meaning.

+
    +
  • "auto", This will create a file in the same directory as the script + with the same name as the script but with the correct image extension.
  • +
  • _IMG_HANDLER, (This is defined in jpgraph.php). Specifying this + filename will not create a an image to file or stram it back to the + browser. Instead it will instruct the Stroke() method to just return + the handle for the GD image. This is useful if you later want to + manipulate the image in ways that are not yet supported by Jpgraph. For + example include the image in generated PDF files. +
    Example:
     $handle  +$graph->Stroke(_IMG_HANDLER +);
    +

    +
  • +
+

+

4.7 Working with fonts in JpGraph

+

JpGraph supports both a set of built in bit-mapped fonts as well as + True Type Fonts. For scale values on axis it is strongly recommended + that you just use the built in bitmap fonts for the simple reason that + they are, for most people, easier to read (they are also quicker to + render). Try to use TTF only for headlines and perhaps the title for a + graph and it's axis. By default the TTF will be drawn with + anti-aliasing turned on.

+

In many of the example you can see examples of both TrueType and + Bitmap fonts.

+

There are a number of subtle differences in the way builtin fonts + and TrueType fonts are rendered to the screen. However, JpGraph, + abstracts away 99.9% of the differences so it will be, for the user, + completely transparent to switch between the different fonts.

+

4.7.1 Installing TrueType fonts

+

Since Internally TrueType fonts are rendered by locating a font + specification file you must install the accompanying TrueType fonts in + directory of your choice. You must then tell JpGraph where these fonts + may be found by specifying the font-path in the FONT_PATH define (in + jpg-config.inc). Please note that this must be the absolute file path + and not relative to the htdocs directory. By default the path is set to

+ DEFINE( +"TTF_DIR", +"/usr/local/fonts/ttf/"); +

+

Since JpGraph must be able to tell the difference between the italic + and bold versions of the same font family a standard naming convention + is used to name the files. The available fonts are also defined by + DEFINES and hence you can't just copy your own TTF files to the + directory and expect it to work. At the moment there is no "easy" way + to add new fonts but to make some (small) mods to the code. However + this is expected to change in future version of JpGraph.

+

4.7.2 Verifying that the TTF fonts work

+

In order to get TTF fonts working with JpGraph you should first + check that the following pure GD scripts work correctly. Please adjust + the font path according to your installation.

+  DEFINE +("TTF_DIR","/usr/X11R6/lib/X11/fonts/truetype/" +);  +
+
$im imagecreatetruecolor (400 +100);  +
$black imagecolorallocate ($im +000 +);  +
$white imagecolorallocate ($im +255255255 +);  +
+
imagerectangle +($im,0, +0,399,99 +,$black);  +
imagefilledrectangle +($im,0, +0,399,99 +,$white);  +
+
imagettftext  +($im30 +01040 +, $blackTTF_DIR. +"arial.ttf" +"Hello World!");  +
+
header ("Content-type: image/png" +);  +
imagepng ($im); +

+

The above script assumes you have the GD2 library and will create an + image with the classical "Hello World!" text printed in black.

+

4.7.3 Specifying fonts

+

All graph objects that uses text allows you to specify the font to + be used by calling the SetFont() method and specifying three parameters

+
    +
  1. Font family, Specified with a FF_ define
  2. +
  3. Font style, Specified with a FS_ define
  4. +
  5. Font size, Numeric value (only used for TTF fonts)
  6. +
+

For the builtin fonts the third, size, parameter is ignored since + the size is fixed for the three builtin fonts. The available font + families and the corresponding name (in JpGraph 1.7) are listed in the + table below.

+

+ + + + + + + + + + + + + + + + + + + +
Font familyTypeNote
FF_FONT0Builtin fontA very small font, only + one style
FF_FONT1Builtin fontA medium sized font
FF_FONT2Builtin fontThe largest bit mapped + font
FF_ARIALTTF fontArial font
FF_VERDANATTF fontVerdana font
FF_COURIERTTF fontFix pitched courier
FF_BOOKTTF fontBookman
FF_COMICTTF fontComic sans
FF_TIMESTTF fontTimes New Roman
FF_GEORGIATTF fontGeorgia
FF_TREBUCHETTF fontTrebuche
FF_VERATTF fontGnome Vera font, Available from + http://www.gnome.org/fonts/
FF_VERAMONOTTF fontGnome Vera Mono font, + Available from http://www.gnome.org/fonts/
FF_VERASERIFTTF fontGnome Vera Serif font, + Available from http://www.gnome.org/fonts/
FF_CHINESETTF fontInstalled chinese font
FF_SIMSUNTTF fontInstalled chinese font
FF_BIG5TTF fontInstalled Chinese BIG5 font + (needs iconv())
+

Please note that not all font families support all styles. The + figure below illustrates each of the available font families and what + styles you may use.

+
+
Figure 1: Illustration of some of the available fonts in + JpGraph [src] +  +

+

+

+

We finally show some example of valid font specifications

+  $graph +->title->SetFont( +FF_FONT2); +
$graph->title-> +SetFont( +FF_FONT2, +FS_BOLD); +
$graph->title-> +SetFont( +FF_ARIAL); +
$graph->title-> +SetFont( +FF_ARIAL, +FS_BOLD,24);
+

+

+

4.7.4 Adding additional fonts to JpGraph

+

Note: This information is only given here for very + advanced users. No free support will be given in the case you run into + difficulties trying to add new fonts. At the moment adding new fonts + require code modifications as outlined below.

+

In order to add you favorite fonts there are three steps you need to + follow :

+
    +
  1. Define a new "FF_" constant naming your font family with a suitable + high index number
  2. +
  3. Get the TTF file(s) and add it to your font directory. You need + separate files for each of the styles you want to support. You then + need to add the file names of the font as definitions in the class TTF. + Use the previous defined "FF_" name as index in the font specification + array.
  4. +
+

+

4.7.5 Understanding text alignment in JpGraph

+

For everyday use of JpGraph understanding of the alignment of text + strings in not necessary. However, if you like to add arbitrary strings + to the graph (with Graph::AddText()) or when working directly on a + canvas it will help understand this.

+

Text is added to a graph with the creation of a +Text() object. And the alignment is specified with +Text::Align() Text alignment might actually be a misguiding name. + What you specify is rather the anchor point for the text, i.e. when you + specify that a text should be positioned at position (x,y) how + is that coordinate to be interpretated.

+

The image below shows a text string aligned in the 9 possible + combinations. In the image the red crosses indicate what coordinate + that text string was positioned at. The alignment used for each of the + cases is shown below.

+
+
Figure 2: Specifying alignment (anchor-point) for text + strings [src] +  +

+

+

+

+

4.8 Specifying colors in JpGraph

+

Colors can be specified in three different ways

+
    +
  1. By using one of the, roughly, 400 pre-defined color names, e.g
    +  SetColor +("khaki");
    +

    A named color can also be modified by adding a adjustment factor. An + adjustment factor, 0 < f < 1, a smaller value will give a darker + version and a value of 0 or 1 will return the original color. A value > + 1 will make the color brighter. A few examples

    +  SetColor +("khaki:0.5" +); // A darker version of "khaki" +
    SetColor("yellow:1.2");  +// A slightly lighter version of "yellow" +

    +

    +
  2. +
  3. By specifying a RGB triple, e.g.
    +  SetColor(array(65, +100,176));
    +

    +
  4. +
  5. By specifying the color as a hex string value
    +  SetColor +("#A16BFF");
    +

    +
  6. +
+

+

4.8.1 Adjusting the transparency

+

From version 1.10 JpGraph also supports the use of Alpha Blending + together with GD2.x This lets you specify how much of the underlying + color should be visible. You specify the amount of transparency for a + color by adding an extra parameter to the color specification separated + by an '@' (at) character.

+

For example to specify a red color which is 40% transparent you + write

+ SetColor( +"red@0.4"); +

+

or to specify 90% transparancy you write

+  SetColor +("red@0.9");

+

Below is an example of how a bar graph with a background image can + make use of transparency

+
+
Figure 3: Using alpha blending in a bar graph [src]  +

+

+

+

4.8.2 Available named colors

+

The chart below shows all available named colors. +
+
+

+

4.8.3 Theme colors for pie's

+

For more on how to use the different themes to set the colors of Pie + plots please refer to "Working with 2D & 3D pie plots"

+

+
Theme 1: Earth

+

+
Theme 2: Pastel

+

+
Theme 3: Water

+

+
Theme 4: Sand

+

+

5 Understanding the JpGraph caching system

+

To reduce load on the web server JpGraph implements an advanced + caching system which avoids the burden of always having to run the full + image script.

+

Depending on the complexity of the image script (for example if it + is doing several DB lookups) this could significantly improve + performance.

+

The rationale behind this is of course performance, and the + observation that very few graphs are really real-time, i.e. needs to be + updated absolutely every time the graphing script is called.

+

+

5.1 Enabling the cache system

+

The enabling disabling of the cache system is controlled by two + defines (in jpg-config.php)

+

+ DEFINE( +"USE_CACHE", +true); +
DEFINE("READ_CACHE", +true)
+

+

+

The first of these, USE_CACHE, is the master-switch which must be + set to true to enable the caching system. The second switch READ_CACHE + very seldom needs to be changed.

+

This second switch basically tells whether or not JpGraph should + ever look in the cache. Setting this to false and the master-switch to + true would then always generate an new updated image file in the cache + and this new image would be send back to the browser. The main use for + this (admittedly) strange setting is if you like to have the side + effect of the script that a fresh image is always stored in the cache + directory.

+

Once you have enabled the cache you must also make sure that a valid + cache directory is setup. The cache directory is specified with the + define

+

+ DEFINE( +"CACHE_DIR", +"/tmp/jpgraph_cache/"); +

+

+

You can of course change the default directory to whatever directory + you fancy. But, you must remember one important thing. The + cache directory must be writable for the user running Apache/PHP +.

+

5.2 Using the cache in your script

+

To use caching in your script you must supply a suitable file name + which will be used to store the image in the cache. You can also supply + a timeout value indicating how many minutes the cached image should be + considered valid.

+

These parameters are supplied in the initial Graph() method call + which should be among the first in your script. Instead of manually + specifying a file name to be used you could often use the special name + "auto". If the filename is specified as "auto" the cashed image will + then be named the same as the image script but with the correct + extension depending on what image format have been chosen.

+

If you don't specify a file name no caching will be used no matter + the settings of USE_CACHE (without a file name it is impossible!)

+

The following call to Graph() shows a typical use of the cache.

+

+ $graph = new  +Graph(300,200 +,"auto",60) +

+

+

The above code will use the automatic filename and a make the cache + valid for 60 minutes.

+

So, how does this all work now?

+

The first time you call your script (no cached image) everything + will be as usual, the script will run and you will in the end send back + the image to the browser. However if you have the caching enabled + JpGraph will automatically have stored a copy of the generated image in + the cache directory.

+

The next time you call the script the first thing that happens in + the initial Graph() is that it will go and check in the cache directory + if the named image exists there. If this is the case it will also + checks that the image isn't too old (as compared to the specified + timeout value). If the image is valid then the image will be streamed + straight back from the image file to the browser and the script will + end it's execution.

+

Hence, if the image is found in the cache no code lines + after the initial Graph() call will be executed

+

The design decision behind this is that your image script code never + has to include anything special to make full use of the cache. It will + just automatically work.

+

5.3 Using the cache with Client Side Image Maps

+

You can also use the cache system for CSIM as well. The cache system + interface is slightly different in this case since the cache needs to + store both the cached image and the cached image-map. + It also needs to change due to the way CSIM HTML paradigm work. The two + major differences from the "standard" cache is

+
    +
  1. The cached version will not be stored in the + previous defined cache directory. See more below.
  2. +
  3. You must call an extra method, CheckCSIMCache(), to check the + cache, see more below.
  4. +
+

+

The performance benefits even for simple CSIM images is around 50% + if the cache can be used and can of course be several 1000% if + construction of the image requires DB calls and other complex + operations which can be avoided.

+

Before reading further you should have an understanding on how the + CSIM works by reading the section "sing Client side image maps".

+

Please remember that when using CSIM you must end your script with a + call to Graph::StrokeCSIM() method instead of the +Graph::Stroke() used for non-csim.

+

To use the cache with CSIM you have to call the +Graph::CheckCSIMCache(). As with the caching for non-CSIM you have + to supply a name to be used for the cached version as well as an + optional timeout value. The default timeout value if nothing else is + specified is 60 minutes.

+

The name argument requires some more explanations. You must specify + a relative name here. For example "myimage" or perhaps + "firstpage/image3". Depending on your installation of JpGraph this will + now end up in the directory specified in the CSIMCACHE_DIR define. This + must also be a directory accessible by the normal web server. By + default a directory called "csimcache" will be created in the same + directory as the image script itself.

+

This has the drawback that the directory from where the script is + executed must be writable by the process running PHP. Best practice for + this is to keep the number of writable directory for PHP down to a + minimum and re-use the same directory as is used for the standard + cache. This however, require that your system administrator setup that + cache directory so that it also accessible by the HTTP server from the + htdocs root.

+

The CheckCSIMCache() method checks the cache for an existing cached + version and if found it returns it and halts execution of the script. + So, this call should be the first call after the creation of the + Graph() and before any heavy work is done to create the image so that + you can minimize the execution of the script in the case a match is + found.

+

So, the general structure of a script that uses CSIM and the cache + is

+ $graph = new  +Graph(400,300 +); +
+
// Check cache, 10 min timeout +
$graph->CheckCSIMCache( +"image1",10); +
+
+// !! If cached version exists, execution halts here !! +
+
// +
// ... Construct the image with heavy DB calls etc, etc +
// +
+
$graph->StrokeCSIM(); +

+

Please note that you do not need to pass any + argument to the final call to StrokeCSIM() as you do when not using the + cache.

Note: The CSIM caching works by storing + two files in the cache directory. One file being the image and the + other file being the corresponding image map as a pure HTML file.

+

5.4 Some final comments

+

+
    +
  • If you want the timeout value to be "forever" then you can specify a + 0 as the timeout value (or leave the parameter blank). To regenerate + the image you will have to remove the image files from the cache. This + removal could for example be handled by a nightly cron-job
  • +
  • If you use images where you have enabled the anti-aliasing you + should strongly consider using caching since anti-aliasing is quite + time consuming compared to standard line drawings.
  • +
+

+

5.5 Common feature for all graphs

+

This is a summary of the available feature for all Graph based + charts, i.e. line plots, error plots, scatter plots, etc.

+

5.5.1 Clipping

+

By default all plots are clipped outside the plot area. This means + that if you manually specify a scale and then try to plot which has + values smaller/larger than the scale those values will not show.

+

The clipping algorithm is "perfect" in the sense that for example + line plots where the plot area cuts the line between two data points + the line will be drawn up to the edge of the plot area. The algorithm + used is O(1) in number of data points.

+

The disabling/enabling of clipping manually is controlled by +Graph::SetClipping()

+

5.5.2 Commonly used properties

+

+
    +
  1. Each graph can have three titles accessed through the properties + 'Graph::title', ''Graph::subtitle' and ''Graph::subsubtitle'
  2. +
  3. Each graph have a legend accessed through the 'Graph::legend' + property
  4. +
  5. Each graph can have a left, center and right footer accessed + through 'Graph::footer::left','Graph::footer::center' and + 'Graph::footer::right'
  6. +
  7. You access the axis through 'Graph::xaxis', 'Graph::yaxis' and + 'Graph::y2axis'
  8. +
  9. You access the grids through 'Graph::xgrid', 'Graph::ygrid' and + 'Graph::y2grid'
  10. +
+

+

5.5.3 Commonly used methods

+

+
    +
  1. You add plot objects (bar plots, pie plots, texts, bands, lines + etc) with the 'Graph::Add() method.
  2. +
  3. Each graph can have a specified margin set by 'Graph::SetMargin()'
  4. +
  5. Each graph can have a fill color in the plot area + 'Graph::SetColor()'
  6. +
  7. The plot areas may have a box around it 'Graph::SetBox()'
  8. +
  9. Each graph can have a specified margin color + 'Graph::SetMarginColor()'
  10. +
  11. Each graph can have a frame or not 'Graph::SetFrame()'
  12. +
  13. Each graph can have a specified drop shadow 'Graph::SetShadow()'
  14. +
  15. The grid lines can be either behind or in front of the plots + 'Graph::SetGridDepth()'
  16. +
  17. The plot can be rotated an arbitrary angle with 'Graph::SetAngle()'
  18. +
  19. You can add a background image with 'Graph::SetBackgroundImage'
  20. +
  21. You can change the overall appearance of the axis with + 'Graph::SetAxisStyle'
  22. +
+

+

6 Using image maps with JpGraph

+

Image maps, or client side image (CSIM) as they are known is fully + supported in JpGraph. It gives you the opportunity to create hot-spots + in the graphs which allows you to build a set of "drill-down" graphs.

+

In the following section is based on the assumption that the reader + is familiar with the basic concepts of client side image map in HTML.

+

To shortly recapitulate. Client side image maps consists of two + parts. The first part is the actual image and the second part is a + mapping that gives the coordinates for areas in the image which should + be marked as hot spots (i.e. click-able by the user). The library can + automatically generate these coordinate maps from a given graph.

+

Through out the manual areas of the graph that may be used as a + hotspot is given in conjuction with the general description of that + area.

+

6.1 The basic structure of an image map script

+

The standard structure for an HTML page using client side image maps + would be something along the lines of

+

+
+// Image map specification with name "mapname"
+<MAP NAME=...>
+... specification ...
+</MAP>
+
+// Image tag
+<img src="..." ISMAP USEMAP="mapname">
+
+

This poses an interesting question.

+

Since we normally call the graphing script directly in the <img> tag + how do we get hold of the image map (which is available only in the + image script) in this "HTML wrapper" script?

+

In JpGraph there is actually two ways of solving this.

+
    +
  1. Use the preferred "builtin" way using the modified Stroke() method + Graph::StrokeCSIM() instead of the standard Graph::Stroke() method.
  2. +
  3. Directly use the Graph::GetHTMLImageMap() which gives you fine + control at the expense of more complex coding.
  4. +
+

The first (and preferred) way modifies the stroke method so that + instead of returning an image (like the standard Stroke() method) + StrokeCSIM() actually returns an HTML page containing both the image + map specification and the correct <IMG> tag.

+

This of course means that it is necessary to treat an image map + returning image script differently from a non-CSIM image script, for + example you can't use it directly as the target for the "src" attribute + of the <IMG> tag since it sends back an actual HTML page containing + both an image tag together with an image map.

+

6.2 Specifying targets for image map plots

+

To turn a standard image script into a CSIM script the first thing + needed to do is to supply the appropriate URL targets for the hotspots + in the image.

+

What the hotspots represent depends on the type of plot you are + doing. The following plot types and graph areas support image maps.

+
    +
  • Line plots. Markers are hotspots.
  • +
  • Scatter plot. Markers are hotspots.
  • +
  • Pie Plots and 3D Pie plots. Each slice is a hotspot
  • +
  • All types of Bar graphs. Each bar is a hotspot
  • +
  • Legends
  • +
  • Text strings, for example titles and title of axis
  • +
+

To specify a link for each hotspot you have to use the + SetCSIMTargets() method for each plot (or specific area) in the + graph which should be a hotspot.

+

There are two arguments to this method

+
    +
  1. $aTargets, an array of valid URL targets. One URL per hot spot, for + example if you have a 10 values bar plot you need 10 URLs. If the + SetCSIMTarget() is applied to, for example, a text then of course only + one URL target should be specified.
  2. +
  3. $aAlts, an array of valid alt-texts. Many browsers (but not all) + will show this text string if the mouse hovers over a hotspot.
  4. +
+

+

6.3 Using StrokeCSIM()

+

The simplest way of creating a creating a CSIM image is with the + StrokeCSIM() method. As mentioned before this method actually returns a + (small) HTML page containing both the image-tag as well as the image + map specification. Hence it is not possible to use a script that + ends with this method in a standard image-tags src property.

+

There are two ways to create CSIM (or get hold of) the image maps

+
    +
  1. Use the CSIM image script as the target in a standard anchor + reference, for example +
    +<a href="mycsimscript.html">
    +
    +
    This has the drawback that the image page will only contain the + image and nothing else.
  2. +
  3. The other way will allow the image script to be included in an + arbitrary HTML page by just including the image script at the wanted + place in the HTML page using any of the standard "include" php + statement. For example +
    +<h2> This is an CSIM image </h2>
    +
    +<?php
    +include "mycsimscript.php"
    +?>
    +
    +
  4. +
+

Note: If there are several CSIM images on + the same page it is necessary to use "include_once" in the scripts for + the inclusion of "jpgraph.php" and the other jpgraph library files + since the files will be included multiple times on the same page and + one or more "Already defined error" will be displayed.

+

The process to replace Stroke() with StrokeCSIM() is strait forward. + Replace all existing calls to Stroke() with the equivalent calls to + StrokeCSIM().

+

The only difference is that it is necessary ti supply a minimum of + one file name in the StrokeCSIM() method. The first argument must be + the name of the actual image script file including the extension. So + for example if the image script is called "mycsimscript.php" it is + necessary to write +
 

+ $graph-> +StrokeCSIM( +'mycsimscript.php') +

+

+
However, it is possible to apply a small "trick" here. PHP maintain + a special variable called "__FILE__" which is always set to the current + file name. This means you could use the following construction:

+

+ $graph-> +StrokeCSIM( +basename( +__FILE__)) +

+

This is a better way since the script can now be renamed without + having to change any code in the file which otherwise would be needed.

Note: Why does the script name need to be used as + the first parameter? The reason is that in the creation of the HTML + page which is sent back we need to refer to the script in the image + tag. So why is it not possible to use the PHP_SELF reference? The + problem with PHP_SELF is that in the case where we include the + image-script in an HTML page and use the PHP_SELF we will get the name + of the HTML page and not the actual script in which the PHP_SELF is + used. We also can not use the __FILE__ trick in the library since in + the context __FILE__ is set to "jpgraph.php". Hence, this must be + specified by the client as shown above.

+

The other arguments to StrokeCSIM() are optional. Please note that + if several CSIM images are used in the same HTML page it is also + necessary to specify the image map name as the second parameter since + all image maps must be unique to properly match each image map against + each image. Please consult the class reference + StrokeCSIM() for more details.

+

6.4 Examples of Image maps

+

In the Example/ directory there are a number of examples of how to + setup the various types of image maps. The following examples are + currently available

+
    +
  • bar_csimex1.php
  • +
  • bar_csimex2.php
  • +
  • bar_csimex3.php
  • +
  • barline_csimex1.php
  • +
  • barlinefreq_csimex1.php
  • +
  • boxstockcsimex1.php
  • +
  • ganttcsimex01.php
  • +
  • ganttcsimex02.php
  • +
  • imgmarkercsimex1.php
  • +
  • pie3d_csimex1.php
  • +
  • piec_csimex1.php
  • +
  • pie_csimex1.php
  • +
  • scatter_csimex1.php
  • +
  • titlecsimex01.php
  • +
+

In order to easily access all of these examples it is possible to + call the testsuit.php example with an additional argument "t=2". + By following the link +testsuit.php?t=2 a separate window will open with all the possible + CSIM examples.

+

6.5 How does StrokeCSIM() work?

+

Knowledge of the exact technical details of the way StrokeCSIM() + works is probably not needed by many people but for completeness we + outline those details in this short section.

+

The fundamental issue we have to solve is that we must be able to + call the image script in two modes. When the user includes the image + script the StrokeCSIM() method should return the HTML page but when the + image script is later called directly in the image tag it must not + return an HTML page but rather the actual image.

+

The way this is solved is by using one HTTP argument which is passed + on automatically when we use the image script name in the image-tag.

+

If you look at the generated HTML you will see that the argument to + the src-property of the image tag is not simply the script name but the + script name with a additional argument.

+

In the JpGraph internal code this pre-defined argument is checked + for and if it exists the image is send back and not the HTML page.

+

The name of this argument is defined by a DEFINE() statement in + JpGraph. The define is _CSIM_DISPLAY.

+

6.6 Getting hold of the image map

+

In the case where you want to store the image on disk and later use + it in an img-tag you need to get hold of the image map. For this you + will have to use the function + Graph::GetHTMLImageMap()

+

An example of the use of this is shown below. With these lines the + image will be written to a file. The script then returns a HTML page + which contains the Client side image map and an img-tag which will + retrieve the previously stored file.

+  $graph->Stroke( +"/usr/local/httpd/htdocs/img/image001.png" +); +
echo 
$graph +->GetHTMLImageMap +("myimagemap001" +); +
echo 
+"<img src=\"img/image001.png\" ISMAP USEMAP=\"#myimagemap001\" border=0>" +;
+

+

+

+

6.7 Image maps and the cache system

+

For version 1.9 the cache system has been extended to include even + the CSIM maps. For each CSIM graph two files are stored in the cache, + the image file itself as well as the wrapper HTML with the actual image + map. For further information see the chapter on "Understanding the + Cache system"

+

7 Working with orthogonal X,Y-plots

+

The purpose of this chapter is to introduce the basic concepts of + creating scripts with JpGraph that will generate various types of basic + plots. Throughout the text it is possible to view the exact source for + all the graphs by clicking on the "[src]" link in the caption of the + image shown. This will open the image together with the source in a + separate window. This way it is easy to compare the actual image with + the script that generated the image.

+

7.1 Line plots

+

The first example draws a line graph consisting of 10 Y-values. In + this first example we show the full code. In the following examples we + will only show interesting piece of the code.

+(File: example0.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_line.php"); +
+
// Some data +
$ydata  += array(11,3, +8,12,5 +,1,9, +13,5,7 +); +
+
+// Create the graph. These two calls are always required +
$graph  += new Graph(350, +250,"auto");     +
$graph->SetScale( +"textlin"); +
+
// Create the linear plot +
$lineplot +=new LinePlot($ydata); +
$lineplot +->SetColor("blue"); +
+
// Add the plot to the graph +
$graph->Add( +$lineplot); +
+
// Display the graph +
$graph->Stroke(); +
?> +
+
+
Figure 4: A simple line graph [src]  +

+

+

+

You might note a few things

+
    +
  • Both the X and Y axis have been automatically scaled. We will later + on show how you might control the auto scaling how it determines the + number of ticks which is displayed.
  • +
  • By default the Y-grid is displayed in a "soft" color
  • +
  • By default the image is bordered and the margins are slightly gray.
  • +
  • By default the 0 label on the Y-axis is not displayed
  • +
+

This is a perfect fine graph but looks a little bit "sparse". To + make it more interesting we might want to add a few things like

+
    +
  • A title for the graph
  • +
  • Title for the axis
  • +
  • Increase the margins to account for the title of the axis
  • +
+

From looking at the previous example you can see that you access all + properties of JpGraph through the objects you create. Graph(), + LinePlot() and so on. In general all objects you can see in the graph + is accessed through a named instance.

+

For example the title of the graph is accessed through the + 'Graph::title' property. So to specify a title string you make a call + to the 'Set()' method on the title property as in:

+

+ $graph->title->Set +('Example 2');

+

So by adding just a few more lines to the previous code we get a + graph as shown below.

+
+
Figure 5: Same basic graph as in previous figure but with a + titles for graph and axis. +[src]  +

+

+

To achieve this we just needed to add a few more lines. (We only show + the part of example 1 we changed, to look at the full source just click + the [src] link in the caption. )

+   +// Setup margin and titles +
$graph->img-> +SetMargin(40,20 +,20,40); +
$graph->title-> +Set( +"Example 2"); +
$graph->xaxis-> +title->Set("X-title" +); +
$graph->yaxis-> +title->Set("Y-title" +); +

+

+

Again there are a couple of things you should note here

+
    +
  • A default font and size is used for the text
  • +
  • The default position for the title of the graph is to be centered at + the top
  • +
  • The default position for the title of the x-axis is the far right + and for the y-axis centered and rotated in a 900 angle.
  • +
+

+

A nice change would now be to have all the titles in a bold font and + the line plot a little bit thicker and in blue color. Let's do that by + adding the lines

 $graph-> +title->SetFont(FF_FONT1 +,FS_BOLD); +
$graph->yaxis-> +title->SetFont(FF_FONT1 +,FS_BOLD); +
$graph->xaxis-> +title->SetFont(FF_FONT1 +,FS_BOLD); +
$lineplot +->SetColor("blue"); +
$lineplot +->SetWeight(2);   +// Two pixel wide
+

+

Again please note the consistent interface. To change font you just + have to invoke the SetFont() method on the appropriate object. This + principle is true for most methods you will learn. The methods may be + applied to a variety of objects in JpGraph. So for example it might not + come as a big surprise that to have the Y-axis in red you have to say:

+ $graph->yaxis->SetColor +("red")

+

or perhaps we also want to make the Y-axis a bit wider by

+  $graph +->yaxis->SetWidth( +2) +

+

As a final touch let's add a frame and a drop shadow around the + image since this is by default turned off. This is done with

+  $graph +->SetShadow()

+

The result of all these modifications are shown below.

+
+
Figure 6: Making the image a little bit more interesting by + adding som colors and changing the fonts [src]  +

+

+

+

7.1.1 Adding plot marks to line-plots XXX

+

It might sometimes be desirable to highlight the data-points with + marks in the intersection between the given x and Y-coordinates. This + is accomplished by specifying the wanted plot mark type for the "mark" + property of the line graph. A full list of all available marks is given + in the class reference +PlotMarks

+

For now let's just add a triangle shape marker to our previous graph + by adding the line

 $lineplot-> +mark->SetType(MARK_UTRIANGLE +);

+

This will give the graph as shown below

+
+
Figure 7: Adding markers to the previous example [src]  +

+

+

+

If you like you can of course both change the size, fill-color and + frame color of the chosen plot mark.

+

The colors of the marks will, if you don't specify them explicitly, + follow the line color. Please note that if you want different colors + for the marks and the line the call to SetColor() for the marks must be + done after the call to the line since the marks color will always be + reset to the lines color when you set the line.

+

7.1.2 Displaying the values for each data point

+

As a final easy modification we can enable the display of the data + value above each data point. The value is represented by the 'value' + property in the plot. (You can read more about the possibilities of the + display value + in the class reference.)

+

To enable the display of the value you just need to call the Show() + method of the value as in

+  $lineplot->value-> +Show() +

+

Adding that line to the previous line plot would give the result + shown below.

+
+
Figure 8: Displaying the value for each data point [src]  +

+

+

We can of course change both color, font and format of the displayed + value. So for example if we wanted the display values to be dark red, + use a bold font and have a '$' in front we need to add the lines

+  $lineplot->value +->SetColor("darkred"); +
$lineplot +->value->SetFont( +FF_FONT1, +FS_BOLD); +
$lineplot +->value->SetFormat( +"$ %0.1f"); +

+

This would then result in the following image

+
+
Figure 9: Making the display values a little bit more + interesting +[src]  +

+

+

Note: You can achieve more advanced + formatting by using not just the printf() style format string by a + format callback function. This could allow you to change the displayed + value with more advanced formatting such as displaying money values + with "," to separate thousands.

+

7.1.3 Adding several plots to the same graph

+

What if we want to add a second plot to the graph we just produced? + Well, this is quite straightforward and just requires two simple step:

+
    +
  1. Create the second plot
  2. +
  3. Add it to the graph
  4. +
+

To create the second plot we need some data (we could of course use + the same data as for the first plot but then we wouldn't be able to see + the new plot!)

+

The following lines show how to create the new plot and add it to + the graph (we only show the new lines - not the full script)

+  $ydata2  += array(1,19, +15,7,22 +,14,5, +9,21,13 +); +
$lineplot2 +=new LinePlot($ydata2); +
$lineplot2 +->SetColor("orange"); +
$lineplot2 +->SetWeight(2); +
+
$graph->Add( +$lineplot2); +

+

Making these changes to the previous graph script would generate a + new graph as illustrated below.

+
+
Figure 10: Adding a second plot to the previous graph [src]  +

+

+

There is a few things worth noting here

+
    +
  • The Y-scale has changed to accommodate the larger range of Y-values + for the second graph.
  • +
  • If you add several plots to the same graph they should contain the + same number of data points. This is not a requirement (the graph will + be automatically scaled to accommodate the plot with the largest number + of points) but it will not look very good since one of the plot end in + the middle of the graph.
  • +
+

+

7.1.4 Adding a second Y-scale

+

As you saw in the preceding example you could add multiple plots to + the same graph and Y-axis. However what if the two plots you want to + display in the graph has very different ranges. One might for example + have Y-values like above but the other might have Y-values in the + 100:s. Even though it is perfectly possible to add them as above the + graph with the smallest values will have a very low dynamic range since + the scale must accomplish the bigger dynamic range of the second plot.

+

The solution to this is to use a second Y-axis with a different + scale and add the second plot to this Y-axis instead. Let's take a look + at how that is accomplished.

+

First we need to create a new data array with large values and + secondly we need to specify a scale for the Y2 axis. This is done by + the lines

+ $y2data = array( +354,200,265 +,99,111, +91,198,225 +,293,251); +
$graph->SetY2Scale( +"lin");
+

+

and finally we create a new line plot and add that to the second + Y-axis. Note that we here use a new method, AddY2(), since we want this + plot to be added to the second Y-axis. Note that JpGraph will only + support two different Y-axis. This is not considered a limitation since + using more than two scales in the same graph would make it very + difficult to interpret the meaning of the graph.

+

To make the graph a little bit more esthetic pleasing we use + different colors for the different plots and let the two different + Y-axis get the same colors as the plots.

+

The resulting graph is shown below. source)

+
+
Figure 11: Adding a second Y-scale plot to the same graph [src]  +

+

+

+

7.1.5 Adding a legend to the graph

+

With more than one plot on the same graph it is necessary to somehow + indicate which plot is which. This is normally done by adding a legend + to the graph.

+

You will see that each plot type has a 'SetLegend()' method which is + used to name that plot in the legend. SO to name the two plots in the + example we have been working with so far we need to add the lines

+  $lineplot->SetLegend +("Plot 1"); +
$lineplot2 +->SetLegend("Plot 2"); +

+

to the previous code. The resulting graph is shown below

+
+
Figure 12: Adding a legend to the graph [src]  +

+

+

As you can see the legend gets automatically sized depending on how + many plots there are that have legend texts to display. By default it + is placed with it's top right corner close to the upper right edge of + the image. Depending on the image you might want to adjust this or you + might want to add a larger margin which is big enough to accompany the + legend. Let's do both.

+

First we increase the right margin and then we place the legend so + that it is roughly centered. We will also enlarge the overall image so + the plot area doesn't get too squeezed.

+

To modify the legend you access the 'legend' property of the graph. + For a full reference on all the possibilities (changing colors, layout, + etc) see class legend in + the class reference

+

For this we use the legends 'SetPos()' method as in

+  $graph +->legend->Pos( +0.05,0.5,"right" +,"center");

+

+

Doing this small modification will give the result shown below

+
+
Figure 13: Adjusting the layout to give more rooms for the + legend [src]  +

+

+

The above method 'SetPos()' deserves some explanation since it might + not be obvious. You specify the position as a fraction of the overall + width and height of the entire image. This makes it possible for you to + resize the image within disturbing the relative position of the legend. + We will later see that the same method is just to place arbitrary text + in the image.

+

To give added flexibility one must also specify to what edge of the + legend the position given should be relative to. In the example above + we have specified "right" edge on the legend for the for the horizontal + positioning and "center" for the vertical position.

+

This means that the right edge of the legend should be position 5 % + of the image width from the right. If you had specified "left" the the + legends left edge would be positioned 5 % of the image width from the + image left side.

+

By default the legends in the legend box gets stacked on top of each + other. The other possibility is to have them sideways. To adjust this + you use the SetLayout() + method. Using a horizontal layout with the previous example give the + following result.

+
+
Figure 14: Using a horizontal layout for the legends [src]  +

+

+

+

7.1.5.1 Adjusting the layout of the legend

+

For more advanced fomatting of the legend it is possible to adjust

+
    +
  • The number of columns in the legend
  • +
  • Specify vertical / horizontal margins for legend columns
  • +
+

In order to adjust the number of columns used in the legend the + method Legend::SetColumns is used. So for example to have the + legend lined up using three columns the follwing lines have to be added + to teh script

+ $graph-> +legend-> +SetColumns(3);
+

+

+

7.1.6 Handling null-values in line plots

+

JpGraph offers two ways of handling null values (or discontinuities) + in the data. You can either have a "whole" in the data or the line may + be extended between the previous and next data point in the graph.

+

If the data value is null ("") or the special value "x" then the + data point will not be plotted and will leave a gap in the line.

+

If the data value is "-" then the line will be drawn between the + previous and next point in the data ignoring the "-" point.

+

The following example shows both these possibilities.

+

+
+
Figure 15: Handling null values in line graphs [src]  +

+

+

+

7.1.7 Using the step-style to render line plots

+

Step style refers to an alternate way of rendering line plots by not + drawing a direct line between two adjacent points but rather draw two + segments. The first segment being a horizontal line to the next X-value + and then a vertical line from that point to the correct Y-value. This + is perhaps easier demonstrated by an example as seen below.

+

You specify that you want the plot to be rendered with this style by + calling the method +SetStepStyle() on the lineplot.

+
+
Figure 16: Rendering a line plot with the step style [src]  +

+

+

+

7.1.8 Using logarithmic scale

+

Using a logarithmic scale requires you to include the logarithmic + add on module in "jpgraph_log.php". So you must have the line

+   +include("jpgraph_log.php" +);

+

on the top of your code. To Illustrate how to use a logarithmic scale + let's make the right Y scale in the previous example a logarithmic + scale. This is done by the line

+  $graph->SetY2Scale( +"log"); +

+

This will then give the following result

+
+
Figure 17: Using a logarithmic scale for both the Y2 axis [src]  +

+

+

+

You can of course also use a logarithmic X-scale as well. The + following example shows this.

+
+
Figure 18: Example of using log scale on both X and Y axis + together with a linear Y2 scale +[src]  +

+

+

Even though we have so far only shown line graphs logarithmic scale + can also be used for bar, error, scatter plots as well. Even radar + plots supports the use of logarithmic plots. The following example + shows how to use a logarithmic scale for a bar graph.

+

+
+
Figure 19: Example of using logarithmic scale togther with + bar plots [src] +  +

+

+

+

7.1.9 More on scales

+

As you saw in the previous example it is possible to use different + types of scales. In JpGraph you can use the following scales

+
    +
  • Linear scale, the standard "scale"
  • +
  • Logarithmic scale
  • +
  • Integer scale, very similar to linear scale but restricts the scale + values (and labels) to integer values.
  • +
  • Text scale, Similar to integer scale and used when only the + numbering of items is relevant. A text scale is almost exclusively used + for the X-axis. A typical example for this is the X-axis for a bar + plot. The labels for the text scale is usually replaced by user + supplied texts. Text scales can only be used for the X-axis (it doesn't + make sense for the Y-scale).
  • +
+

Any combination of these may be used. Linear and logarithmic scales + are pretty straightforward. The text scale might deserve some + explanation. The easiest way to think of the text scale is as a linear + scale consisting of only natural numbers, i.e. 0,1,2,3,4,... . This + scale is used when you just have a number of Y-values you want to plot + in a consecutive order and don't care about the X-values. For the above + example it will also work fine to use a linear X-scale (try it!). + However, the scale is now treated as consisting or real numbers so the + auto scaling, depending on the size of the image an the number of data + points, might decide to display other labels then the natural numbers., + i.e. a label might be 2.5 say. This is not going to happen if you use a + text scale.

+

The normal practice for text scale is to specify text strings as + labels instead as the default natural numbers. You can specify text + strings for the labels by calling the + SetTickLabels() method on the Axis.

+

To specify the scale you use the + SetScale() method. A few examples might help clarify this.

+
    +
  • "textlin", text-scale for X-axis, Linear scale for Y-axis
  • +
  • "linlin", linear-scale for X-axis, Linear scale for Y-axis
  • +
  • "linlog", linear-scale for X-axis, Logarithmic scale for Y-axis
  • +
  • "loglog", Logarithmic scale for X-axis, Logarithmic scale for + Y-axis
  • +
  • "textint", text-scale for X-axis, Integer scale for Y-axis
  • +
  • "textlog", Text scale for X-axis, Logarithmic scale for Y-axis
  • +
+

As you can see all your graphs will require at least one call to + SetScale() in the beginning of your script. Normally it will come right + after the creation of the Graph().

+

To specify the scale for the Y2 axis you use the + SetY2Scale() Since you only specify one axis you only specify + "half" of the string in the previous examples. So to set a logarithmic + Y2 scale you will call

+  $graph->SetY2Scale( +"log"); +

+

+

7.1.10 Adjusting the grid lines in the plot

+

By default only the Y-axis have grid lines and then only on major + ticks, i.e. ticks which have a label. It is of course possible to + change this. Both the X , Y and Y2 can have grid lines. It is also + possible to let the gridlines also be drawn on the minor tick marks, + i.e. ticks without a label. Lets see how we can apply this to the graph + above.

+

The grid is modified by accessing the xgrid (or ygrid) component of + the graph. So to display minor grid lines for the Y graph we make the + call

+ $graph->ygrid->Show +(true,true) +

+

The first parameter determines if the grid should be displayed at + all and the second parameter determines whether or not the minor grid + lines should be displayed.

+

If you also wanted the grid lines to be displayed for the Y2 axis + you would call

+ $graph-> +y2grid->Show(true +,true)

+

Note. In general it is not a good idea to display + both the Y and Y2 grid lines since the resulting image becomes + difficult to read for a viewer.

+

We can also enable the X-grid lines with the call

+  $graph +->xgrid->Show( +true) +

+

+

In the above line we will of course only just enable the major grid + lines.

+

To bring all this together we will display a graph with grid lines + for both Y and X axis enabled.

+
+
Figure 20: Enabling major and minor gridlines for Y-axis and + major grid lines for the X-axis +[src]  +

+

+

Note: If you think the first value of the + Y-axis is to close to the first label of the X-axis you have the option + of either increasing the margin (with a call to + SetLabelMargin() ) or to hide the first label (with a call to + HideFirstTickLabel() )

+

7.1.11 Using filled grid lines

+

Another option for the grid lines is the possibility to have the + area between the grid lines filled with alternating two colors. The + example below illustrates this.

+
+
Figure 21: Using two alternating colors between the gridlines + [src]  +

+

+

In the example above we have also made use of alpha-blending + (requires GD 2.x or higher). By default the filled grid lines are + disabled. To enable this style you have to call the +Grid::SetFill() method.

+

7.1.12 Specifying text labels for the X-axis

+

You might want to have specific labels you want to use for the + X-axis when this has been specified as a "text" scale. In the previous + example each Y-point might represent a specific measurement for each of + the first 10 month. We might then want to display the name of the + months as X-scale.

+

To specify the labels on the scale you make use of the + SetTickLabels() method.

+

To get a localized version of the name of the month you can use a + nice feature in JpGraph, the global '$gDateLocal' object which is an + instance of the + DateLocale

+

This class has a number of methods to get localized versions of + relevant names for dates, (months and weekdays).

+

So to specify the X-axis with the short form of the month names we + use the construction

+  $a  +$gDateLocale-> +GetShortMonth(); +
$graph->xaxis-> +SetTickLabels( +$a);
+

+

This will, now result in the image displayed below

+
+
Figure 22: Specifying text labels for the X-axis [src]  +

+

+

Note: It is also perfectly legal to override + the default labels for the Y (and Y2) axis in the same way, however + there is seldom need for that. Please note that the supplied labels + will be applied to each major tick label. If there are insufficient + number of supplied labels the non-existent positions will have empty + labels.

+

7.1.13 Adjusting the ticks on a text scale

+

As can be seen in the previous example the X-axis is slightly + cluttered with the labels very close to each other. We might rectify + this by either enlarging the image or just displaying fewer tick label + on the x-axis.

+

Specifying that we only want, for example, to print every second + label on the axis is done by a call to the method + SetTextLabelInterval() Which would result in the graph

+
+
Figure 23: Just printing every second label on the X-axis [src]  +

+

+

+

If the text labels are long (for example full dates) then another + way might be to adjust the angle of the text. We could for example + choose to rotate the labels on the X-axis by 90 degrees. With the help + of the SetLabelAngle() +

+

Which would then result in the image below

+
+
Figure 24: Rotating the X-labels 90 degrees [src]  +

+

+

Note: The internal fonts which we have been + using so only supports 0 or 90 degrees rotation. To use arbitrary + angles you must specify TTF fonts. More on fonts later.

+

7.1.14 Using filled line graphs

+

Using a filled line plot is not much different from using a normal + line plot, in fact the only difference is that you must call the method + SetFillColor() + on a normal line plot. This will then fill the area under the line + graph with the chosen color.

+

In the example below we have also, as an example, specified plot + marks (see previous sections).

+
+
Figure 25: Filled line graph with plot marks [src]  +

+

+

Note 1. If you add multiple filled line plots to + one graph make sure you add the one with the highest Y-values first + since it will otherwise overwrite the other plots and they will not be + visible. Plots are stroked in the order they are added to the graph, so + the graph you want front-most must be added last.

+

Note 2. When using legends with filled line plot + the legend will show the fill color and not the bounding line color.

+

Note 3. Filled line plots is only supposed to be + used with positive values. Filling line plots which have negative data + values will probably not have the appearance you expect.

+

As you can see from the graph above the grid lines are below the + filled line graph. If you want the grid lines in front of the graph you + can adjust the depth with call to + Graph::SetGridDepth() As the following example shows

+
+
Figure 26: Adjusting the depth of the gridlines [src]  +

+

+

+

7.1.15 Using accumulated line graphs

+

Accumulated line graphs are line graphs that are "stacked" on top of + each other. That is, the values in the supplied data for the Y-axis is + not the absolute value but rather the relative value from graph below. + For example if you have two line graphs with three points each, say + [3,7,5] and [6,9,7]. The first graph will be plotted on the absolute + Y-values [3,7,5] the second plot will be plotted at [3+6, 7+9, 5+7], + hence the values of the previous graphs will be used as offsets.

+

You may add any number of ordinary line graphs together. If you want + to use three line plots in an accumulated line plot graph you write the + following code

+

// First create the individual plots +
$p1 = new LinePlot( +$datay_1); +
$p2 = new LinePlot( +$datay_2); +
$p3 = new LinePlot( +$datay_3); +
+
+// Then add them together to form a accumulated plot +
$ap = new AccLinePlot(array($p1, +$p2,$p3)); +
+
+// Add the accumulated line plot to the graph +
$graph->Add( +$ap);
+

+

You might of course also fill each line plot by adding the lines

+  $p1 +->SetFillColor +("red"); +
$p2->SetFillColor( +"blue"); +
$p3->SetFillColor( +"green"); +

+

Using some appropriate data this might then give a graph perhaps + like the one showed in the figure below

+
+
Figure 27: Accumulated filled line graph [src]  +

+

+

+

7.1.16 Constructing smooth line plots with Cubic + Splines

+

If you only have access to a few data points but still want a smooth + curve between those data points JpGraph can help you achieving that by + letting you construct cubic splines. If you never have heard of cubic + splines before, don't worry. You only have to supply the data points + you know tell JpGraph how many interpolated points in total you want in + the graph. JpGraph will now take care of constructing a smooth curve + between all you data points. The new, smooth, curve will be made up of + exactly as many interpolated points as you have specified.

+

To construct a spline you need both the X and Y coordinates for the + known data points.

+

You start by constructing a new Spline instance. To + get access to the Spline class you must first remember to include the + file "jpgraph_regstat.php". You instantiate this class by calling it + with your two known data arrays (X and Y) as follows.

+  $spline  += new Spline($xdata, +$ydata); +

+

This call initializes the spline with the data points you have. These + data points are also known as Control points for the spline. + This helper class doesn't draw any line itself. Instead it is merely + used to get a new (larger) data array which have all the interpolated + values. You then use these new value in your plot. This way give you + great flexibility in how you want to use this interpolated data.

+

Continuing the above line we now use the Spline::Get() + method to get an interpolated array containing a specified number of + points. So for example the line

+  list( +$sdatax, +$sdatay) =  +$spline->Get(50 +);

+

Will construct the two new data arrays '$sdatax' and '$sdatay' which + contains 50 data points. These two arrays are constructed from the + control point we specified when we created the '$spline' object.

+

You would then use these two new data array in exactly the same way + as you would form ordinary data vectors.

+

The following example illustrates this

+
+
Figure 28: Using spline to get a smooth curve between the + control points. +[src]  +

+

+

In order to make the example more interesting we actually use two + plots. First a line plot to get the smooth curve and then a standard + scatter plot which is used to illustrate where the control points are.

+

7.1.17 Adding plot marks to a line plot

+

To emphasize the specific data points it is possible to add plot + marks at each data point. Plot marks can be either

+
    +
  • Simple shapes, (e.g. square, circle, cross, etc)
  • +
  • Arbitrary images loaded from a file
  • +
  • One of the built-in images
  • +
+

You access the plot mark through the "mark" instance variable in the + plot, as in

+ $lineplot-> +mark->SetColor("red" +);

+

To choose between the different plot marks you call the +PlotMark::SetType() method with the correct define to choose the + plot type you want to use.

+

The simple shape type of plot marks are

+
    +
  • MARK_SQUARE
  • +
  • MARK_UTRIANGLE
  • +
  • MARK_DTRIANGLE
  • +
  • MARK_DIAMOND
  • +
  • MARK_CIRCLE
  • +
  • MARK_FILLEDCIRCLE
  • +
  • MARK_CROSS
  • +
  • MARK_STAR
  • +
  • MARK_X
  • +
  • MARK_LEFTTRIANGLE
  • +
  • MARK_RIGHTTRIANGLE
  • +
  • MARK_FLASH
  • +
+

To specify an arbitrary image you use the special define

+
    +
  • MARK_IMG
  • +
+

In this case you must also specify a image file name and an optional + scaling constant. For example as in

+  $lineplot->mark-> +SetTYPE( +MARK_IMG, +"myimage.jpg", +1.5); +

+

+

If you want to use one of the built-in images the following images + are available. Please note that not all images are available in all + possible colors. The available colors for each image is listed below.

+

The following shape (the first class) plot marks are available

+
    +
  1. MARK_SQUARE, A filled square
  2. +
  3. MARK_UTRIANGLE, A triangle pointed upwards
  4. +
  5. MARK_DTRIANGLE, A triangle pointed downwards
  6. +
  7. MARK_DIAMOND, A diamond
  8. +
  9. MARK_CIRCLE, A circle
  10. +
  11. MARK_FILLEDCIRCLE, A filled circle
  12. +
  13. MARK_CROSS, A cross
  14. +
  15. MARK_STAR, A star
  16. +
  17. MARK_X, An 'X'
  18. +
  19. MARK_FLASH, A "flash" shape
  20. +
  21. MARK_IMAGE, Use the image specified with the filename and scale as + the second and third argument as the mark.
  22. +
+

+

For the second class (built-in images) the following table list the + different images as well as what color they are available in. For the + built-in images you specify the color with the second argument.

+

Note that some of the images are available in different sizes. The + reason is that even though you can scale them by the third argument + there is a visual degradation to scale an image larger than it's + original size since some pixels needs to be interpolated. Reducing the + size with a scale < 1.0 gives much better visual apperance.

+

The scaling works with both GD 1 and GD 2 but with GD 2 the quality + of the scaling is much better.

+

Built-in images and available colors:

+ + + + + + + + + + + + + + + +
TypeDescriptionColors
MARK_IMG_PUSHPIN, MARK_IMG_SPUSHPIN Push-pin image +'red','blue','green','pink','orange'
MARK_IMG_LPUSHPIN A larger Push-pin image +'red','blue','green','pink','orange'
MARK_IMG_BALL, MARK_IMAGE_SBALLA round 3D rendered ball +'bluegreen','cyan','darkgray','greengray', + 'gray','graypurple','green','greenblue','lightblue', + 'lightred','navy','orange','purple','red','yellow'
MARK_IMAGE_MBALLA medium sized round 3D rendered ball + 'blue','bluegreen','brown','cyan', + 'darkgray','greengray','gray','green', + 'greenblue','lightblue','lightred', 'purple','red','white','yellow'
MARK_IMAGE_LBALLA large sized round 3D rendered ball + 'blue','lightblue','brown','darkgreen', + 'green','purple','red','gray','yellow','silver','gray'
MARK_IMAGE_SQUAREA 3D rendered square +'bluegreen','blue','green', 'lightblue','orange','purple','red','yellow'
MARK_IMG_STARA 3D rendered star image +'bluegreen','lightblue','purple','blue','green','pink','red','yellow'
MARK_IMG_DIAMONDA 3D rendered diamond +'lightblue','darkblue','gray', 'blue','pink','purple','red','yellow'
MARK_IMG_BEVELA 3D rendered bevel style round ring +'green','purple','orange','red','yellow'
+ Below we give two examples of images using these features.
+
+
Figure 29: Using an arbitrary image as plot mark [src]  +

+
+

+

+
+
Figure 30: Using the built-in images [src]  +

+

+

+

7.2 Bar graphs

+

Jpgraph also supports 2D vertical bar plots. Before you can use any + bar plots you must make sure that you included the file + "jpgraph_bar.php" in your script.

+

Using bar plots is quite straightforward and works in much the same + way as line plots which you are already familiar with from the previous + examples. Assuming you have a data array consisting of the values + [12,8,19,3,10,5] and you want to display them as a bar plot. This is + the simplest way to do this:

+  $datay=array(12, +8,19,3 +,10,5); +
$bplot  += new BarPlot($datay); +
$graph->Add( +$bplot); +

+

If you compare this to the previous line examples you can see that + the only change necessary was that instead of creating a new line plot + (via the new LinePlot(...) call) we used the statement new + BarPplot().

+

The other change we should do is to make sure the X-axis have an + text-scale (it is perfectly fine to use a linear X-scale but in most + cases this is not the effect you want when you use a bar graph, see + more below). With this two simple change we will now get a bar graph as + displayed in the following image

+
+
Figure 31: A very simple bar graph [src]  +

+

+

You can of course modify the appearance of the bar graph. So for + example to change the fill color you would use the + BarPlot::SetFillColor() method. Making this small change to the + previous example would give the expected effect as can be seen in the + next example.

+
+
Figure 32: A very simple bar graph with changed fill color [src]  +

+

+

Note: You should note from the previous two + graphs that slight change in appearance for the X-scale. The bar graphs + gets automatically centered between the tick marks when using as text + x-scale. If you were to use a linear scale they would instead start at + the left edge of the X-axis and the X-axis would be labeled with a + linear scale. As is illustrated in the (small) example below.
+
+
Figure 33: A small example with a bar graph using a linear + X-scale [src] +  +

+

+

+

7.2.1 Adjusting the width of the bars

+

JpGraph allows you to easy customize the appearance of the bar + graph, for example to change the width of each bar. The width of each + bar can be specified either as a fraction of the width between each + major tick or as an absolute width (in pixels).

+

To set the width in fraction you use the method + SetWidth() and to set the width in pixels you use the + SetAbsWidth()

+

As an example let's take the previous example and set the width to + 100% of the distance between the ticks. The example will now become

+

+
+
Figure 34: Setting the width of the bars to 100% of the tick + width [src]  +

+

+

+

7.2.2 Displaying the value of each bar

+

You can easily choose to display the value (and it's format) on top + of each bar by accessing the bar's 'value' property. So for example by + just adding the line

+  $barplot->value-> +Show(); +

+

Will enable the values in it's simplest form and will give the + result

+
+
Figure 35: Showing the values for each bar [src]  +

+

+

You cane see a small nuisance in this graph. The auto scaling + algorithm chooses quite tight limits for the scale so that the bars + just fit. Adding the value on top of the bar makes it collide with the + top of the graph. To remedy this we tell the auto scaling algorithm to + allow for more "grace" space at the top of the scale by using the + method + SetGrace() which is used to tell the scale to add a percentage (of + the total scale span) more space to either one end or both ends of the + scale. In this case we add 20% more space at the top to make more room + for the values with the line

+  $graph->yaxis-> +scale-> +SetGrace(20);
+

+

+

This will then give the graph as shown below

+
+
Figure 36: Adding some grace space to the top of the Y-scale [src]  +

+

+

+

You can also adjust the general position of the value in respect to + the bar by using the + BarPlot::SetValuePos() method. You can set the position to either + 'top' (the default) , 'center' or 'bottom'. The graph below shows the + value being positioned in the center. In this example we have also + adjusted the format to just display the value as an integer without any + decimals.

+
+
Figure 37: Putting the values in the middle of the bar. [src]  +

+

+

It is also possible to specify a more fine grained control on how + you want the values presented. You can for example, rotate them, change + font, change color. It is also possible to adjust the actual value + displayed by either using a printf()-type format string or with the + more advanced technique of a format callback routine.

+

To show what you can do we just give another example for you to + examine without much further explanations. Just remember that to have + text at an angle other than 0 or 90 degrees we have to use TTF fonts. + Even though we haven't explained the SetFont() method it should be + fairly obvious.

+
+
Figure 38: Making the displayed values more interesting [src]  +

+

+

+

7.2.3 Adding a drop shadow to the bar

+

One simple way of making the bar graph more attracting is to add a + drop shadow to each bar. This is done by calling the + SetShadow() method. An example will clarify this.

+
+
Figure 39: Adding a drop shadow to each bar [src]  +

+

+

+

7.2.4 Adjusting the alignment of bars on a text + scale

+

As you have seen from the previous examples bar graphs are normally + centered between the trick marks on a text scale. However, you can + modify this behavior by calling the method + BarPlot::SetAlign()

+

7.2.5 Using grouped bar plots

+

These types of bar graph is used to easy group two or more bars + together around each tick (X-value). The bars will be placed + immediately beside each other and as a group centered on each tick + mark. A grouped bar is created by aggregating two or more ordinary bar + graphs and creating a + GroupBarPlot() From two ordinary bar graphs along the lines of

+   +// Create the bar plots +
$b1plot  += new BarPlot($data1y); +
$b1plot->SetFillColor( +"orange"); +
+
$b2plot  += new BarPlot($data2y); +
$b2plot->SetFillColor( +"blue"); +
+
// Create the grouped bar plot +
$gbplot  += new GroupBarPlot +(array($b1plot +,$b2plot)); +
+
// ...and add it to the graPH +
$graph->Add( +$gbplot); +

+

The following example illustrates this type of graph

+
+
Figure 40: A grouped bar plot [src]  +

+

+

There is no limit on the number of plots you may group together.

+

If you use the SetWidth() method on the GroupBarPlot() this will + affect the total width used by all the added plots. Each individual bar + width will be the same for all added bars. The default width for + grouped bar is 70%.

+

Setting the grouped with to 0.9 would result in the image below.

+
+
Figure 41: Adjusting the width for a gropued bar plot. [src]  +

+

+

+

7.2.6 Using accumulated bar plots

+

The final variety of group bars you can have are accumulated bars. + They work in much the same way as accumulated line plots described + above. Each plot is stacked on top of each other.

+

You create accumulated bar plots in the same way as grouped bar + plots by first creating a number of ordinary bar plots that are then + aggregated with a call to + AccBarPlot();

+

An example makes this clear. Let's use the same data as in the two + examples above but instead of grouping the bars we accumulate (or + stack) them. The code would be very similar (actually only one line has + to change)

+
+
Figure 42: Accumulated bar plots [src]  +

+

+

+

7.2.7 Using grouped accumulated bar graphs

+

It is perfectly possible to combine the previous bar types to have + grouped accumulated bar plots. This is done by just adding the + different accumulated plots to a group bar plot, for example the + following code would do that.

+   +// Create all the 4 bar plots +
$b1plot  += new BarPlot($data1y); +
$b1plot->SetFillColor( +"orange"); +
$b2plot  += new BarPlot($data2y); +
$b2plot->SetFillColor( +"blue"); +
$b3plot  += new BarPlot($data3y); +
$b3plot->SetFillColor( +"green"); +
$b4plot  += new BarPlot($data4y); +
$b4plot->SetFillColor( +"brown"); +
+
// Create the accumulated bar plots +
$ab1plot  += new AccBarPlot +(array($b1plot +,$b2plot)); +
$ab2plot  += new AccBarPlot +(array($b3plot +,$b4plot)); +
+
// Create the grouped bar plot +
$gbplot  += new GroupBarPlot +(array($ab1plot +,$ab2plot)); +
+
// ...and add it to the graph +
$graph->Add( +$gbplot); +

+

Putting this together in an example would then produce the graph as + shown below

+
+
Figure 43: Combining grouped and accumulated bar plots [src]  +

+

+

+

7.2.8 Horizontal bar graphs

+

It can often come in handy to have horizontal bar graphs especially + if you have a large number of values to display. Even though JpGraph + doesn't directly support horizontal bar graphs this is easy achieved by + constructing a normal vertical bar graph which is then rotated 90 + degrees.

+

The example below shows a simple example of this

+
+
Figure 44: A typical horizontal bar graph with the Y-axis at + the bottom +[src]  +

+

+

+

In order to achieve this effect you should study the above example + carefully and you might notice two things

+
    +
  • We don't simply rotate the graph we also specify that we want the + rotation center to be the middle of the entire image. The reason for + this is that by default (See the section on rotating plots) the pivot + point for rotation is the center of the plot area. + Since the center of the plot area is not necessary the center of the + entire image the rotation might be a little bit difficult to predict + since it will depend on the margins specified. <
  • +
  • The size of the plot area is determined from the original width and + height of the image taking the specified margin into account. When the + the plot area is rotated 90 degrees clockwise what was the left margin + now in effect become the upper margin and so on. This is a small nuance + since we conceptually want to specify the margins directly in the + rotated plot. +
    In order to more easily handle the margin with rotated images it is + recommended that the method "Set90AndMargin()" is used. This allows the + image to be rotated as well as specifying the margins in an obvious + way.
  • +
+

We finally show three more examples of horizontal bar plots. In the + first plot we have hidden the Y-axis and in the second we have + positioned the Y - axis at top as opposed to the bottom as the first + example shows.

+

+
+
Figure 45: Horizontal bar graph with hidden Y axis [src]  +

+

+

+
+
Figure 46: Horizontal bar graph with Y axis at the top [src]  +

+

+

+

In the final example which is almost similar to the two first we + illustrate the use of labels with more than one line.

+
+
Figure 47: Horizontal bar graph with manual integer scale as + well as multiple line labels +[src]  +

+

+

+

7.2.9 Using gradient fill for bar graphs

+

It is possible to use color gradient fill for the individual bars in + the bar graph.

+

Color gradient fill fills a rectangle with a smooth transition + between two colors. In what direction the transition goes (from left to + right, down and up, from the middle and out etc) is determined by the + style of the gradient fill. JpGraph currently supports 8 different + styles. All supported styles are displayed in the figure below.

+
+
Figure 48: +[src]  +

+

+

+
+
Figure 49: +[src]  +

+

+

+
+
Figure 50: +[src]  +

+

+

+
+
Figure 51: +[src]  +

+

+

+
+
Figure 52: +[src]  +

+

+

+
+
Figure 53: +[src]  +

+

+

+
+
Figure 54: +[src]  +

+

+

+
+
Figure 55: +[src]  +

+

+

+

To specify a gradient fill for the bar plots you make use of the + method + BarPlot::SetFillGradient() . See the class reference for details of + this function.

+

When using gradient fills there are a couple of caveats you should + be aware of:

+
    +
  • gradient filling is computational expensive. Large plots with + gradient fill will take in the order of 6 times longer to fill then for + a normal one-color fill. This might to some extent be helped by making + use of the cache feature of JpGraph so that the graph is only generated + a few times.
  • +
  • gradient filling will make use of much more colors (by definition) + this will make the color palette for the image bigger and hence make + the overall image larger. It might also have some severe effect on + using anti-aliased line in the same image as color gradient filling + since anti-aliased lines also have the possibility to make use of many + colors. Hence the color palette might not be big enough for all the + colors you need. So if you use gradient fills you should also be using + a true-color image since you otherwise run out of colors. +
    This problem is often seen as that for no apparent reason some + color you have specified in the image does appear as another color. + (This is not a bug in JpGraph!) This is something to especially watch + out for when enabling anti-aliasing since that also uses a lot of + colors. Since the numbers of colors used with anti-aliasing depends on + the angle on the lines it is impossible to foresee the number of colors + used for this.
  • +
+

+

7.2.10 Creating semi-filled bar graphs

+

Semi filled bar graphs are in principle the same as normal filled + bar graphs but with the additional feature that you can choose to only + fill a specified range (or ranges) of X-coordinates. The figure below + illustrates this

+

+
+ + +
Figure 56: Semi-filled line graph [src]  +

+

+

+

In this example we defined two areas along the X-axis to be filled. + You can add filled areas by using the method + AddArea() and specifying range and color for the filled area.

+

7.3 Error plots

+

Error plots are used to visually indicate uncertainty in data + points. This is done by for each X value by giving both a minimum and a + maximum Y-value.

+

Before you can use error plots you must remember to include the file + "jpgraph_error.php" in your script.

+

The following example illustrates a simple error bar. We will have 5 + points, so we need 10 Y-values. We also would like the error bars to be + red and 2 pixels wide. All this is accomplished by creating an + ErrorPlot() in much the same way as, for example, a normal line + plot. Doing this would now give the example shown below.

+

+
+
Figure 57: A simple error bar [src]  +

+

+

You might notice that there is one displeasing esthetic quality of + this graph. The X-scale is just wide enough to just accompany the + number of error bars and hence the first bar is drawn on the Y-axis and + the and last bar just at the edge of the plot area. To adjust this you + might call the SetCenter() + method which will adjust the X-scale so it does not use the full width + of the X-axis.

+

The following example illustrates the use of this feature by + applying this technique to the previous example

+
+
Figure 58: Adjusting the X-scale not to use the full width of + the X-axis. +[src]  +

+

+

+

7.3.1 Using line error plots

+

A line error plot is an error plot with the addition that a line is + drawn between the average value of each error pair. You use this type + of plot the exact same way you would use an error plot. The only change + is that you must instantiated an + ErrorLinePlot() instead and make sure you have included the + "jpgraph_line.php" since the line error plot makes use of the line plot + class to stroke the line.

+

To control the various properties of the line drawn the "line" + property of the error line plot may be accessed. So, for example, if + you want the line to be 2 pixels wide and blue you would have to add + the following two lines

+  $elplot->line-> +SetWeight(2); +
$elplot->line-> +SetColor( +"blue"); +

+

to generate the graph as shown below

+
+
Figure 59: Linear error plot [src]  +

+

+

You may of course add legends to none, one or both of the line types + in the above graph. So for example if we wanted the legend "Min/Max" + for the red error bars and a legend "Average" for the blue line you + would have to add the lines

+  $errplot->SetLegend( +"Min/Max"); +
$errplot->line-> +SetLegend( +"Average"); +

+

The resulting graph will now look like (note that we are using the + default placement of the legend box)

+
+
Figure 60: Addding a legend box to the line error plot. [src]  +

+

+

+

7.4 Scatter plots

+

Scatter plots are very simple; they plot a number of points + specified by their X- and Y-coordinate. Each point is stroked on the + image with a mark as with line plots. The stroked marks can also be + connected with an optional line.

Note: Even + though it is only scatter plot that was designed to be used with X,Y + plots it is perfectly possible to use use both X,Y coordinates for bar + and line plots as well.

+

Even though you would normally supply X-coordinates it is still + perfectly possible to use a text-scale for X-coordinates to just + enumerate the points. This is especially useful when using the + "Impulse" type of scatter plot as is shown below.

+

Scatter pots are created by including the jpgraph extension + "jpgraph_scatter.php" and then creating an instance of plot type of + ScatterPlot(). To specify the mark you want to use you access the mark + with the instance variable "mark" in the scatter plot. The default is + to use an unfilled small circle.

+

To create a scatter plot you will create an instance

+

A simple example using just default values will illustrate this

+

+
+
Figure 61: The simplest possible scatter plot [src]  +

+

+

We can easily adjust the size and colors for the markers to get + another effect as shown below

+
+
Figure 62: The simplest possible scatter plot with adjusted + marks [src] +  +

+

+

Another possible variant of scatter plot is impulse-scatter plots. + This is a variant of normal scatter plot where each mark have a line + from the mark to the Y=0 base line. To change a scatter plot into an + impulse scatter plot you have to call the method + SetImpuls() on the scatter plot.

+

This type of plots are often used to illustrate signals in + conjunction with digital signal processing. The following two examples + illustrates simple use of impulse plots.

+
+
Figure 63: A simple impuls plot [src]  +

+

+

The next example shows how to modify the color and width of the + impulse plot

+
+
Figure 64: A modified impuls plot [src]  +

+

+

Note: You may draw impulse graphs without + any mark by specifying the mark type as (-1) . That way only the + impulse lines will be drawn.

+

As a final touch we show two more advanced impulse graphs . In these + graphs we have used more advanced formatting for the Y-axis labels as + well as adjusted the position of the axis position.

+
+
Figure 65: In this imuplsplot we have adjusted the position + of the X-axis to the bottom and also added more decimals to the labels + on the Y-axis +[src]  +

+

+

+
+
Figure 66: In this impuls plot we have also added a lineplot + with a dotted line style. +[src]  +

+

+

+

7.5 Field plots

+

A variant of scatter plot is the so called Field Plots this + is basically a scatter plot where each scatter point is an arrow with a + direction between 0 to 359 degrees. This effectively allows the + visualization of 3 parameters at each point (x,y,angle). As an + additional bonus there is also possible to define a callback for each + scatter plot to also define the color for each point.

+

To create a field plot you create an instance of +FieldPlot in the same way as you created a normal scatter plot. The + arguments to this method are Y-coordinate, X-coordinate and angle. To + specify a callback you use +FieldPlot::SetCallback()

+

The following example (and code) illustrates the usage of the field + plot type.

+

+
+
Figure 67: Example of the Field plot type [src]  +

+

+

In addition to the parameters mentioned above you can also adjust + both the general size of the arrow and also the specific size of the + arrowhead. The arrow size is specified in pixels and the arrow head is + specified as an integers between 0 and 10. These sizes are specified + with a call to +FieldPlot::arrow::SetSize()

+

7.6 Box and Stock charts

+

JpGraph offers two variation on what is usually known as stock + charts, candle-charts or box plot.

+

7.6.1 Stock Charts

+

Stock charts is used to display data values where one is interested + in 4 different values for each data point. This could for example be + used to display a stocks open,close, min and max value during a + specific day. Hence the name Stock chart (or Stock plot).

+

The figure below illustrates a sample Stock chart plot

+
+
Figure 68: A simple stock plot [src]  +

+

+

For this type of plot the Y-data array must be consist of a number + of quadruples of data where each quadruple consists of + (open,close,min,max). The open and close values determine the min max + for the middle bar and the min,max determine the end points of the + "error-lines" at the top and bottom of of each bar.

+

Note that the data follows the following rules

+
    +
  • min < max
  • +
  • min < min(open.close)
  • +
  • max > max(open,close)
  • +
+

To separate the two cases where "open > close" or "open < close " + different colors are used. These colors are specified with the +SetColor() method. By default a positive bar (close > open) have a + fill color of white and for the negative case where (close < open) the + bars have a red color.

+

You can specify the width of the bar by setting the width (in + pixels) with a call to the method +SetWidth()

+

The final variation of stock plots you can have is to determine + whether or not the end point for the min,max lines should have the + horizontal line marking the end of the line or not. This can be + adjusted with a call to method +HideEndLine().

+

7.6.2 BoxPLots : Stock charts with a median line

+

A minor variation of stock charts is the "BoxPlot()" this is almost + the same as StockPlot() but with the very small difference that in + addition to the open,close,min, max values you also specify a median + value . The median lies between the open and close value and is + illustrated as a horizontal line within the bar.

+
+
Figure 69: A simple box type stock plot [src]  +

+

+

You may modify the median line color for positive and negative data + points / bars by using the +SetMedianColor() method.

+

7.6.3 Image maps for Box and Stock charts

+

In the same way as for other plots you may associate an image map + with these plots. The "hot" area for each plot is the mid "bar" + section. In the same way as other plot types you use the + SetCSIMTargets() to set the URLs you want to use.

+

These plot types, though normally used without explicit X-values, + can of course handle a supplied X-coordinate array without any problem.

+

7.7 Combining different graph types

+

It is perfectly legal to add several different plot types to the + same graph. It is therefore possible to mix line plots with (for + example) filled bar graphs. What you should keep in mind doing this is + the order in which these plots are stroked to the image since a later + stroke will overwrite a previous one. All plots are stroked in the + order you add them, i.e. the first plot added will be stroked first. + You can therefore control which plot is placed in the background and + which one is placed in the foreground by the order you add them to the + plot.

+

To start simple we just mix a filled line plot with a non-filled + line plot as the following example shows.

+

+
+
Figure 70: Mixing filled and non-filled line plots in the + same graph +[src]  +

+

+

+

Let's now go to something a little bit more complicated. How to mix + bar and line graphs. Let's just take one of our previous bar graphs and + add a line plot to it and see what happens.

+

+
+
Figure 71: Adding a line to a bar graph [src]  +

+

+

Not too bad. But we can't see the line so we change the order in + which we add the lines to the graph and sees what happens.

+
+
Figure 72: Adding a line to a bar graph, in different orderv2 + [src]  +

+

+

+

If you want the line points to be aligned in the center of the bars + you can accomplish this is two ways.

+

If you use a text scale then you need to call the + LinePlot::SetBarCenter()

+
+
Figure 73: Centering the line point in the middle of the bars + using LinePlot::SetBarCenter() [src]  +

+

+

+

You can also use an integer scale. This places both + the bar and the line points centered at the tick marks. As the + following example will show

+

+
+
Figure 74: Using a linear scale [src]  +

+

+

Note: In this example we also have + illustrated the fact that it is possible to add text labels to a linear + (or integer) scales as well.

+

As a final example we show how you can combine a scatter plot and a + line plot which could be used to illustrate a regression line fitting.

+
+
Figure 75: Combining a scatter plot and a line plot [src]  +

+

+

+

7.8 Specifying the scale manually

+

Normally the automatic scaling should be doing an adequate job in + most circumstances but there might be cases where you like to manually + set the scale. For example if you have several graphs where you like to + be able to easily compare them and therefore want them all to have the + same scale.

+

To specify a manual scale you have to add arguments to the standard Graph::SetScale() method. + So to specify that you want an Y-scale between 0 and 100 you need to + write

+ $graph-> +SetScale( +"textlin",0,100 +);

+

When you specify a scale manually there is one additional thing you + need to decide. How the tick marks should be positioned. You have three + choices

+
    +
  1. Let JpGraph decide suitable tick marks honoring the exact scale you + specified. This is the default behavior if you don't do anything + else.
  2. +
  3. Allow JpGraph to slightly adjust your specified min and max values. + With the default method, depending on the min and max values, the end + and start of the scale might not fall on an exact tick mark. For + esthetic reasons you might still want the last/first tick mark to fall + on the edges of the scale. By calling + LinearScale::SetAutoTicks() you tell JpGraph to make the smallest + necessary adjustment of the end/start points so that they fall on an + exact tick mark.
  4. +
  5. Manually specify the tick marks with a call to + LinearTicks::Set() For example
    +  $graph->SetScale( +"textlin",0,100 +); +
    $graph->yscale-> +ticks->Set(10 +,5);
    +

    Will set the major tick marks every at 0,10,20,.. And every minor + tick mark in between (0,5,10,15,20,25,...).

    +
  6. +
+

The three images below illustrates the difference between the + possibilities of ticks for a manual scale.

+
+
Figure 76: Manual scale, manual ticks major=7 minor=2 [src]  +

+

+

+

+
+
Figure 77: Manual scale, automatic ticks with exact limits [src]  +

+

+

+

+
+
Figure 78: Manual scale, automatic ticks where we allow + adjustments of the limits +[src]  +

+

+

+

7.9 Adjusting the automatic tick marks

+

You can adjust the automatic tick marks by telling JpGraph how dense + you want them to be. You use the + Graph::SetTickDensity() method. You can set the density setting in + four steps

+
    +
  • TICKD_VERYSPARSE, Very few ticks
  • +
  • TICKD_SPARSE, Few ticks
  • +
  • TICKD_NORMAL, Standard number of ticks
  • +
  • TICKD_DENSE, Large number of ticks
  • +
+

Taking the previous example with the manual scale but automatic + ticks and using a denser ticks setting gives the following result

+
+
Figure 79: Manual scale with automatic ticks but with a + denser tick settings. +[src]  +

+

+

+

7.10 Handling date/time scales

+

With date/time scale we refer to the plotting of data where the + independent variable (X-axis) de-nominates a time value. This could for + example be the temperature measured in intervals during a day.

+

From version 1.18 and onwards there are two principal ways of + handling date/time scales. The manual way and fully automatic using the + special "dat" scale. For most cases the automatic "dat" scale is the + preferred choice but in rare circumstances it might be more appropriate + to use the manual way since it gives slightly more control (but not + that much) of the overall handling of scales.

+

To be able to use a date/time scale at all we will assume that the + data points are represented by both an X coordinate (time-value) and a + Y-value (anything else wouldn't make sense).

+

We first start by describing the use of the "dat" scale.

+

7.10.1 Using the automatic date/time scale

+

The easiest way to get a date time scale for the X-axis is to use + the pre-defined "dat" scale. To be able to use that it is first + necessary to include the module "jpgraph_date.php" and the + specify the scale, for example as "datlin" in the call to SetScale() + as the following code snippet shows.

+  require_once("../jpgraph.php"); +
require_once(
"../jpgraph_line.php"); +
require_once(
"../jpgraph_date.php"); +
... +
$graph  += new Graph(540, +300); +
$graph->SetScale( +'datlin'); +
...

+

The above code snippet would create a date/linear scale for the + graph. We will first show a basic use of the date scale and then go on + to illustrate how it is possible to tailor the exact formatting of the + date axis.

+

When using the fully automatic formatting the library will use the + shortest possible string that uniquely identifieas a date/time. For + example if the entire intervall falls within the same day only the time + values will be displayed, if the intervall falls over several days then + also the date will be added to the label.

+

As usual it is also possible to manually force a certain label + formatting to be used this is illustrated below.

+

7.10.1.1 Specifying the input data

+

The first basic example below creates a data set that emulates a + sample rate every S second and falls over a total period of two days. + It is important to note that the input data on the X-axis must be a in + the form of timestamp data, i.e. the number of seconds from the system + epoch. In PHP the current timestamp value is returned by the function + time().

+

This means that it is always mandatory to specify two input vectors + for a plot. For example to specify a line plot

+  $line  += new LinePlot +($data,$xdata); +

+

The example below show this in practice

+
+
Figure 80: Using the special date X-axis with all default + values [src] +  +

+

+

Please review the script (by following the [src] link) that creates + this graph before continuing since we will base all further examples on + the above example.

+

7.10.1.2 Adjusting the start and end alignment

+

As can be seen from the above example the scale starts slightly + before the first data point. Why? This is of course by purpose in order + to make the first time label to start on an "even" value, in this case + on an hour. Depending on the entire interval of the graph the start + value will always be chosen to be the largest "even" time value, this + could for example be on an even minute, even 30min, even hour, even + day, even week and so on.

+

The alignment of the start (and end) vdate alignment can also be + adjusted manually by using the two methods

+
    +
  • SetTimeAlign($aStartAlign,$aEndAlign)
  • +
  • SetDateAlign($aStartAlign,$aEndAlign)
  • +
+

These method allow the alignment to be made by specifying one of the + following constants.

+

For the SetTimeAlign() the following symbolic constants can be used

+
    +
  1. Alignment on seconds +
      +
    • MINADJ_1, Align on a single second (This is the lowest resolution)
    • +
    • MINADJ_5, Align on the nearest 5 seconds
    • +
    • MINADJ_10, Align on the nearest 10 seconds
    • +
    • MINADJ_15, Align on the nearest 15 seconds
    • +
    • MINADJ_30, Align on the nearest 30 seconds
    • +
    +
  2. +
  3. Alignment on minutes +
      +
    • MINADJ_1, Align to the nearest minute
    • +
    • MINADJ_5, Align on the nearest 5 minutes
    • +
    • MINADJ_10, Align on the nearest 10 minutes
    • +
    • MINADJ_15, Align on the nearest 15 minutes
    • +
    • MINADJ_30, Align on the nearest 30 minutes
    • +
    +
  4. +
  5. Alignment on hours +
      +
    • HOURADJ_1, Align to the nearest hour
    • +
    • HOURADJ_2, Align to the nearest two hour
    • +
    • HOURADJ_3, Align to the nearest three hour
    • +
    • HOURADJ_4, Align to the nearest four hour
    • +
    • HOURADJ_6, Align to the nearest six hour
    • +
    • HOURADJ_12, Align to the nearest tolw hour
    • +
    +
  6. +
+

For the SetDateAlign() the following symbolic constants can + be used

+
    +
  1. Alignment on a day basis +
      +
    • DAYADJ_1, Align on the start of a day
    • +
    • DAYADJ_7, Align on the start of a week
    • +
    • DAYADJ_WEEK, Synonym to DAYADJ_7
    • +
    +
  2. +
  3. Alignment on a monthly basis +
      +
    • MONTHADJ_1, Align on a month start
    • +
    • MONTHADJ_6, Align on the start of halfyear
    • +
    +
  4. +
  5. Alignment on a yearly basis +
      +
    • YEARADJ_1, Align on a year
    • +
    • YEARADJ_2, Align on a bi-yearly basis
    • +
    • YEARADJ_5, Align on a 5 year basis
    • +
    +
  6. +
+

Some examples will calrify the use of these methods.

+

Example 1. We want the time adjustment to start on an even + quarter of an hour, i.e. an even 15 minute period.

+  $graph +->xaxis->scale-> +SetTimeAlign( +MINADJ_15); +

+

+

Example 2. We want the time to start on an even 2 hour

+  $graph +->xaxis->scale-> +SetTimeAlign( +HOURADJ_2); +

+

+

Example 3. We want the start to be on an even day

+  $graph +->xaxis->scale-> +SetDateAlign( +DAYADJ_1); +

+

+

7.10.1.3 Adjusting the label format

+

The default label format always tries to use the shortest possible + unique string. To manually set a manual scale the method + SetDateFormat() is used for example as in

+  $graph +->xaxis->scale-> +SetDateFormat( +'H:i'); +

+

The above example will force the labels to be displayed as hour (24h) + and minutes.

+
+
Figure 81: Using specific label format and align time axis to + start and end on an even 10min [src]  +

+

+

+

7.10.1.4 Adjusting the date scale density

+

As with the linear scale it is possible to indicate what density of + scale ticks is needed. This is specified as usual with a call to + Graph::SetTickDensity()

+  $graph->SetTickDensity( +TICKD_DENSE); +

+

+

7.10.2 Specifying a date/time scale with a manual + call-back

+

In the following we will assume that all data points are specified + by a tuple where the date/time is specified as a timestamp in second in + the same format as is returned by the PHP function time().

+

The trick here is to use a label formatting callback routine which + gets called to format each label on the scale.

+

What we do is that we specify that the X-scale should be an ordinary + "int" scale (remember that the data values are timestamps which are + integers). We then install our custom label callback (with a call to + SetLabelFormatCallback()) which given a timestamp formats it to a + suitable human readable form. In our example we will use the PHP + function Date() for this purpose.

+

The callback we use will be

+   +// The callback that converts timestamp to minutes and seconds +
function  +TimeCallback( +$aVal) { +
    return 
Date +('H:i:s',$aVal); +
}

+

Using some random data we can now generate the following graph

+
+
Figure 82: Example on how to format an axis to hold a + date/time scale using and integer scale and a callback routine [src]  +

+

+

In the above example we have specified the X-scale manually to make + sure that the min/max values on the X-axis exactly matches the min/max + x-data values.

+

SetLabelFormatCallback() will be called for each of the displayed + labels and the argument passed on to the supplied function is the + default label that the library is assigning that specific label.

+

This means that if the data to be displayed is based on, for + example, timestamps which are given in seconds the displayed value + might not be aligned to how time/date values normally should be + displayed.

+

Using integer scales this will not work very well since the library + determines label positions to be at even positions (e.g. every 2,5,10, + 20,50,100 etc) to suit the auto-scaling since the library will assume + that the data is integers and not timestamp values.

+

The best way to solve this is to use an integer X-scale together + with a a callback function with a manually specified scale. In order to + setup the scale a bit of manually work is needed. Depending on the data + to be displayed one should ensure that the scale starts and ends at + suitable times and that the tick interval chosen fits with an even + multiple of minutes, hours, days or what is best suited for the time + range that is to be displayed.

+

The following code example illustrates this. It creates some "fake" + data that is assumed to be sampled time based data and sets up some + suitable scales and tick interval. This script may be used as a basis + for more advanced handling of the time data.

+(File: timestampex01.php) +
<?php +
+// Example on how to treat and format timestamp as human readable labels +
require_once( +"../jpgraph.php"); +
require_once(
"../jpgraph_line.php"); +
+
// Number of "fake" data points +
DEFINE('NDATAPOINTS', +500); +
+
+// Assume data points are sample every 10th second +
DEFINE('SAMPLERATE', +10);  +
+
+// Callback formatting function for the X-scale to convert timestamps +
// to hour and minutes. +
function  +TimeCallback( +$aVal) { +
    return 
Date +('H:i'$aVal); +
} +
+
// Get start time +
$start time(); +
+// Set the start time to be on the closest minute just before the "start" timestamp +
$adjstart  += floor($start  +60); +
+
+// Create a data set in range (20,100) and X-positions +
+// We also apply a simple low pass filter on the data to make it less +
// random and a little smoother +
$data  += array(); +
$xdata  += array(); +
$data[0] =  +rand(20,100 +); +
$xdata[0] =  +$adjstart; +
for( 
$i=1 +$i  +NDATAPOINTS; ++ +$i ) { +
    
$data[$i] =  +rand(20,100 +)*0.2 $data[ +$i-1]*0.8 +; +
    
$xdata +[$i] = $adjstart  +$i  +SAMPLERATE; +
} +
+
+// Assume that the data points represents data that is sampled every 10s +
// when determing the end value on the scale. We also add some extra +
// length to end on an even label tick. +
$adjend $adjstart  + ( +NDATAPOINTS+10)*10 +; +
+
$graph  += new Graph(500, +250); +
$graph->SetMargin( +40,20,30 +,50); +
+
+// Now specify the X-scale explicit but let the Y-scale be auto-scaled +
$graph->SetScale( +"intlin",0,0 +,$adjstart,$adjend); +
$graph->title-> +Set( +"Example on TimeStamp Callback"); +
+
+// Setup the callback and adjust the angle of the labels +
$graph->xaxis-> +SetLabelFormatCallback( +'TimeCallback'); +
$graph->xaxis-> +SetLabelAngle( +90); +
+
+// Set the labels every 5min (i.e. 300seconds) and minor ticks every minute +
$graph->xaxis-> +scale->ticks->Set +(300,60); +
+
$line  += new LinePlot +($data,$xdata); +
$line->SetColor( +'lightblue'); +
$graph->Add( +$line); +
+
$graph->Stroke(); +
?> +

+

7.11 Adjusting labels on a text scale

+

In the following section we will work through an number of examples + on how to manipulate labels on a text scale. Primarily we will + investigate how to best handle the case where you have a large number + of values.

+

As a remainder; Text scale is meant to be used on the X-axis when + the X-axis doesn't have a numeric value, i.e you are only interested in + linear ordering of the data. If you don't specify the labels manually + they will be set automatically starting from 1 as the example below + shows.

+

+
+
Figure 83: A simple bar plot using an automatic text scale [src]  +

+

+

+

To specify the labels on the X-axis as suitable text strings you + call the method + Axis::SetTickLabels() with an array containing the text-labels. If + there are more data points than labels the non-specified labels will be + given their ordinal number. If we augment the previous example with the + name of the month we get the following new example

+

+
+
Figure 84: Manually specifying the text scale labels [src]  +

+

+

+

+
Tip: To get hold of localized version of + the month names (or weekdays) you can use the + DateLocal class available in the global variable $gDateLocale If no + locale has been specified the default locale for the installation will + be used. +
+

What happen now if we have a larger number of bars? Let's try with + 25 bars and see what result we get.

+

+
+
Figure 85: A larger data set [src]  +

+

+

+

Not all to impressive. The labels are to close and they overlap. + Hence it is not a good idea to display every label. To adjust what + labels are to be displayed you use the + SetTextLabelInterval() method. The argument to this method is the + interval between text labels. So to display only every 3 month you + would add the line

+

+ $graph->xaxis->SetTextLabelIntervall(3 +)

+

+

Which would give the result shown below

+
+
Figure 86: Displaying only every third label [src]  +

+

+

+

Much better, quite readable.

+

If we have an even larger data set it might not longer be meaningful + to display all the tick marks since they would simple become to close. + In JpGraph there is a possibility to specify that you only would like + every n:th tick mark to be visible ( + SetTextTickIntervall() ). For bar graphs using text scale however, + that might not be such a good idea since the tick marks are between the + bars and the labels centered under the bars. If we only were to + display, say, every 3 tick mark it wouldn't look to good. Not that we + can't do it, as the example below shows, but it just doesn't look very + good.

+
+
Figure 87: Displaying just every third tick mark. [src]  +

+

+

+

A better way to handle large data set is simply to hide the tick + marks all together. Tick marks may be hidden by calling the method + Axis::HideTicks(); If we hide all the ticks on the X-axis we will + get the result shown below

+
+
Figure 88: Hiding all tick mark. [src]  +

+

+

+

7.12 Adding arbitrary text strings to the graph

+

To add clarification or other information text strings to the graph + you can add arbitrary lines of text anywhere you like onto the graph. + The text might have multiple lines and you can choose the paragraph + alignment.

+

To add text you have to create one or more instances of the + Text() object and then add the text object to the graph with the + AddText() method.

+

The position of these text boxes are given as fraction of the width + and height of the graph. When you are positioning these text boxes you + might also choose what part of the text box should be considered the + anchor point for the position you specify.

+

By default the anchor point is the upper left corner of the bounding + box for the text.

+

To show some ways of positioning the text we use a very simple bar + graph not to distract from the text. We first just add a single text + line with most of the settings their default value by adding the + following lines to the graph

+  $txt=new Text( +"This is a text"); +
$txt->Pos( +0,0); +
$txt->SetColor( +"red"); +
$graph->AddText( +$txt);
+

+

The result is shown below.

+
+
Figure 89: Adding a single text string in the upper left + corner [src] +  +

+

+

Not too exiting. Let's make it more interesting by having a + background color, using larger fonts and framing the text box and + adding a drop shadow to the text box by using the methods + SetBox() and SetBox()

+
+
Figure 90: Making the text more interesting [src]  +

+

+

That's better. Now we get some attention. If you want to add a text + with several lines you just need to separate the lines with a newline + ('\n' character). The default paragraph alignment is left edge but you + can also use right and center alignment.

+

As an illustration let's add a couple of more lines to the previous + text, center the text box in the middle of the graph and also use + centered paragraph alignment for the text. To adjust the paragraph + alignment of the text you have to use the + Text::ParagraphAlign()

+
+
Figure 91: Text with multiple lines and centered paragraph + alignment +[src]  +

+

+

Of course there is no limit to the number of text string you can add + to the graph.

+

From version 1.12 it is also possible to add text strings to a graph + using the scale coordinates instead. This is accomplished by using the Text::SetScalePos() Which + is completely analog to SetPos() with the only difference that the + positions given are interpretated as scale values instead of fractions + of the width and height.

+

7.13 Adding titles and footers to the Graph

+

Each graph can have up to three different titles accessed by the + three properties

+
    +
  1. title
  2. +
  3. subtitle
  4. +
  5. subsubtitle
  6. +
+

All of these three properties is a standard text object which means + that you can have individual font, colors, margins and sizes of these + tree titles.

+

The only thing you need to think of is that you probably want to add + some extra margin to make room for the titles (using + Graph::SetMargin() )

+

The individual positioning of these titles are done automatically + and will adjust to the font size being used.

+

If you for, esthetic reasons, would like increase the distance from + the top where the title is positioned (or the intra distance between + title and sub title) you can use the + Text::SetMargin() method. For example the line

+

+ $graph->title->SetMargin +(20);

+

will set the distance between the top of the title string and the top + of the graph to 20 pixels. If you instead call the SetMargin() method + for the subtitle it will adjust the distance between the top of the + subtitle and the bottom of the title.

+

The titles will be positioned at the top and be centered in the + graph. Each of these titles may have multiple lines each separated by a + "\n" (newline) character. By default the paragraph alignment for each + title is centered but may of course be changed (using the + ParagraphAlign()) method.

+

Each graph can also have a footer. This footer is actually three + footers. Left, center and right. The 'left' footer is aligned to the + left, the 'center' at the bottom center and the right to the right.

+

Each of these three positions is a standard Text object which means + you can change color, font and size as you please individually on each + of these footer positions.

+

You access the footer through the Graph::footer property as the + following example shows

+

+ $graph-> +footer->left->Set +("(C) 2002 KXY" +); +
$graph->footer-> +center->Set("CONFIDENTIAL" +); +
$graph->footer-> +center-> +SetColor("red"); +
$graph->footer-> +center-> +SetFont( +FF_FONT2, +FS_BOLD); +
$graph->footer-> +right->Set("19 Aug 2002" +);

+

Note: If you enable the brand timing + argument you should leave the left footer empty.

+

7.14 Adding a tab title

+

A variant of the titles is the tab title. This is just + another option you have of putting a name on the graph. The appearance + of this type is a tab on top of the plot area with text inside.

+

You can access the tab using the 'tabtitle' property of the graph.

+

The following figure shows an example of how this can look.

+
+
Figure 92: Using the tabbed title style [src]  +

+

+

As usual you have full freedom to specify font and colors for this + type of title. Please see the class reference regarding +GraphTabTitle() for more information.

+

7.15 Using background images

+

Instead of having a single color background you can easily have an + arbitrary image as the background. The image may be in either PNG, JPG + or GIF format depending on what your installation supports.

+

+
+

A note on GD: If you are using GD 2.xx you must + make sure that the define USE_TRUECOLOR is set to true. This is also + the default. Failure to do so in combination with GD 2.xx will make the + background image just look like a solid black square.

+
+
+

To use a specific image as the background you just have to use the + method + Graph::SetBackgroundImage() The arguments specify file-name, how + the image should be positioned in the graph and finally the format of + the image (if it is in JPG, PNG or GIF) format. If the format is + specified as "auto" (the default) then the appropriate image format + will be determined from the extension of the image file.

+

The file name is of course obvious but the second argument might not + be. This arguments determine how the image should be copied onto the + graph image. You can specify three different variants here

+
    +
  1. BGIMG_ COPY This will just copy the image unchanged onto the graph + from the top left corner.
  2. +
  3. BGIMG_CENTER This will just copy the image unchanged onto the graph + but it will center the image in the graph.
  4. +
  5. BGIMG_FILLFRAME This will scale the image to exactly fit the whole + graph image.
  6. +
  7. BGIMG_FILLPLOT This will scale the image to exactly fit just the + plot area of the graph.
  8. +
+

+

+
The following section only applies to palette based images. + True color images can NOT be manipulated this way. Applying the + following sections to true-color images will have no affect. +
+

You might often find yourself wanting to use a background image as a + "waterstamp". This usually means taking the original image, import it + to some image editing program and then "bleaching" the color + saturation, reducing the contrast and so on. Finally you save the + modified image which you then use as a background image.

+

This whole process can be automatically accomplished in JpGraph by + using the method + Graph::AdjBackgroundImage() which allow you to adjust color + saturation, brightness and contrast of the background image.

+

+ $graph-> +AdjBackgroundImage(...) +

+

+

to achieve the "watercolor" effect to avoid the image being too + intrusive in the graph.

+
+
Figure 93: Example on using a watermark type background image + [src]  +

+

+

Note: The background image depicts a 1998 + Triumph Tiger. This bike is a 900cc off-road bike.

+

7.16 Using a background gradient

+

In addition to the background image you can also add a background + color gradient. This gradient can be covering the entire graph, just + the plot area or just the margins. This flexibility allows you to + combine a background image with a background color gradient. You can + for example use a background image in the plot area and a color + gradient out in the margins.

+

You specify a color gradient background by calling the + Graph::SetBackgroundGradient() method. All details are available in + the class reference (follow the link above). We finally give a quick + example on what kind of effect you can achieve using this feature.

+
+
Figure 94: Using a background color gradient with the + SetBackgroundGradient() method +[src]  +

+

+

+

Finally we like to mention that in the "/utils/misc/" directory you + will find a small utility script called "mkgrad.php". Running this + script presents you with a UI that makes it a breeze to create a + gradient image on it's own.

+

The UI for the utility is so obvious that we won't discuss it + further, we just show it below. The UI for the mkgrad.php utility The UI for the mkgrad.php utility

+

In the example below this utility is used to get a more interesting + plot area.

+

+
+
Figure 95: Example of the use of a gradient background [src]  +

+

+

+

7.17 Using callbacks for Plot marks

+

An interesting enhancement when using Plotmarks is the possibility + to add a callback function to control the size and color of the + plotmarks.

+

This callback function will get called with the current Y-value (for + the plotmark) as it's argument. As return value the callback function + must return an array containing three (possible null) values. The + values returned must be

+
    +
  1. Plot mark Weight
  2. +
  3. Plot mark Color
  4. +
  5. Plot mark Fill color
  6. +
+

The exact meaning of the parameters will of course depend on the + type of plot marks being used.

+

The callback must be a global function and is installed with a call + to + PlotMark::SetCallback()

+

So for example to install a callback that changes the fill color for + all marks with a (Y) value higher than 90 you could add the lines

+

function  +MarkCallback( +$aVal) { +
    if( 
$aVal  +> 90)  +
        
$fcolor +="red" +
    
else +
        
$fcolor +=""; +
    return array(
"" +,"",$fcolor); +
} +
... +
$plot->mark-> +SetCallback( +"MarkCallback"); +
...

+

+

As you can see in the above example we have left some of the return + values blank. Doing this will just ignore any change of these value and + use the global settings for the plotmarks.

+

If you also let the (Y) value affect the size of the plot marks you + can get what is sometimes known as a "balloon plot". The example below + is basically a scatter plot that uses filled circles to mark the + points. A format callback is then used to change the color and size + depending on the Y-value for each plot.

+

+
+
Figure 96: Creating a balloon plot by using plot mark + callback function +[src]  +

+

+

+

7.18 Rotating graphs 90 degrees

+

In section 10.2 you can read about + arbitrary rotation of the graphs. For most practical purposes rotation + of 90 degrees is most useful. This could for example be used to plot + horizontal bar graphs.

+

The slight complication with general rotation is that the margins + also rotates, this means that if you rotate a graph 90 degrees the left + margin in the image was originally the bottom margin. In additional by + default the center of the rotation is the center of the plot area and + not the entire image (if all the margins are symmetrical then they will + of course coincide). This means that depending on your margin the + center of the rotation will move. You can read more about this and how + to manually set the center for rotation in the section about rotation, 10.2

+

This is just a slight inconvenience which you have to take into + account when you need to set an explicit margin with a call to +Graph::SetMargin()

+

However, in order to make a rotation of 90 degrees much easier you + can easily rotate a graph 90 degrees and set the correct margin with a + call to +Graph::Set90AndMargin() The parameter to this method lets you + specify the margins as you will see them in the image without having to + think of what becomes what after the rotation.

+

So, the only thing you need to do is call this method and then the + graph will have been rotated 90 degrees.

+

7.19 Formatting the axis

+

To get the exact type of axis you want in your graph there are a + number of adjustments available for you. You may change, color, size, + position and general appearance.

+

+

7.19.1 Standard two axis graphs

+

Assuming we start with the traditional two axis graph, one X and one + Y axis. You may then change the position of each axis by calling + Axis::SetPos($aPosition) You have to remember that you need to + specify the position on the other axis. SO you need to specify the + world-coordinate for the position. By default the axis are each + positioned at the 0-point on the other axis, i.e. the axis will cross + at the 0,0 point in the graph.

+

In addition to the standard positioning you may also use the two + special position markers "min" and "max". This will position the axis + at the minimum (or maximum) position of the other axis.

+

For example, to make sure that the X-axis is always at the bottom of + the graph (at lowest possible Y-value) you would have to add the line

+

+ $graph->xaxis->SetPos +("min");

+

+

To change the color and width of the axis you have to make use of + the Axis::SetColor() and + Axis::SetWeight() + methods.

+
Invisible axis Even though JpGraph (1.7) + doesn't directly support "hidden" axis where the labels are still drawn + it is very easy to achieve this effect by setting the colors of the + axis to be the same as the background. See the example barintex2.php in + the Example directory. To completely hide an axis you can make use of + the Hide() +
+

You might also want to add titles to the axis. This is done through + the Axis::SetTitle() + method. This is actually just a shortcut for accessing the title + property direct. Axis::title::Set() which also allow you to set the + alignment in one call.

+

By default the position of the title is to the far right for the + X-axis and in the middle (and 90 degrees rotated) for the Y-axis.

+

You can adjust the position of the title with the help of the second + argument to the + Axis::SetTitle() method.

+

The possible positions are "high","middle" and "low" which refers to + the scale values on the axis.

+

One common modification you might want to do to the title is to + increase the margin between the axis and the actual title. This is + often necessary to do for the Y-axis if the values displayed are large. + You may adjust the distance (in pixels) between the axis and the title + by using the method + Axis::SetTitleMargin()

+

So for example to increase the margin on the Y-axis you might add + the line

+

+ $graph->yaxis->SetTitleMargin(40 +);

+

+

to your code.

+

Finally we mention something about the positioning of tick marks and + labels on the axis. You have the possibility to choose what side of the + axis the tick marks and the labels should be at. For the X-axis this + can be specified as either on the the top (inside the plot area) or at + bottom (outside of the plotarea). In the same way you can specify for + the Y-axis if the labels ( or ticks) should be on the left or right + side.

+

To adjust the label positioning you have to use the method + Axis::SetTitleSide() and to adjust the position of the tick mark + you have to use the method + SetTickSide()

Note: There is also an alias + for this method, SetTickDirection() which is deprecated from version + 1.7 but kept for backwards compatibility.
Valid arguments for + these methods are

+
    +
  • SIDE_UP
  • +
  • SIDE_DOWN
  • +
  • SIDE_LEFT
  • +
  • SIDE_RIGHT
  • +
+

For example, the following lines added to a script would change side + of the labels and tickmarks for the X-axis.

+

+ $graph->xaxis->SetLabelPos +(SIDE_UP); +
$graph->xaxis-> +SetTickSide( +SIDE_DOWN); +

+

+

This technique is for example used if you position the X-axis at the + top of the graph as the following example shows.

+
+
Figure 97: Example of both how to adjust the position of the + X-axis as well as adjusting the side for the tick and axis title [src]  +

+

+

+

7.19.2 Scientific style axis

+

In scientific style plots it is often common to duplicate each axis + so that all sides of the graph have a labeled axis. This is of course + also fully supported by JpGraph.

+

Before we continue we show a small example to illustrate this + feature

+

+
+
Figure 98: Example of scientific axis [src]  +

+

+

+

The example above shows the basic configuration. There are now + several modifications you may do to these axis like

+
    +
  • Choose if the labels should be inside or outside the plot area
  • +
  • Choose if the tickmarks should be inside or outside the plot area
  • +
+

The style of axis is determined by the method + Graph::SetAxisStyle() The available type of axis are

+
    +
  • AXSTYLE_SIMPLE, The standard two axis graph
  • +
  • AXSTYLE_BOXIN, Four axis scientific style with labels and tickmarks + on the inside
  • +
  • AXSTYLE_BOXOUT, Four axis scientific style with labels and + tickmarks on the outside
  • +
+

+

7.19.3 Adjusting the position of the scale labels +

+

How to adjust the actual labels are discussed elsewhere in this + manual (see ???,???). However we like to mention here that you can + adjust the label margin (distance between the axis and the labels) with + the method + Axis::SetLabelMargin()

+

to adjust the actual label format (like font, color, angle) you need + to access the Axis::SetFont() + and the Axis::SetColor() + methods. If you investigate the + Axis class you will discover more methods to adjust the many + aspects of the axis layout.

+

As a final note we also mention the methods + Axis::SetLabelAlign() and + Axis::SetLabelAngle() This first method is really only mentioned + here for completeness since it is mostly used for internal purposes. + However on some occasion you might want to adjust the alignment of the + labels. By default they are centered in respect to the tick mark. By + using the method you might override this positioning should you choose + to do so.

+

The second of these methods adjusts the angle of the label in + regards to the axis. This is very useful for X-axis that have long + labels.

+

7.19.4 Formatting the scale labels

+

In order to have full control over the way that the labels are + displayed it is possible to define a callback function that will be + applied to all labels. The callback function will be called with the + label as the only argument and should return the value that will be + displayed in the graph. This could for example be used to turn seconds + (used to position data points) into hour and minutes on the scale. For + further reference see the two methods: + Graph::SetLabelFormatCallback(); and + Graph::SetLabelFormat();

+

7.19.5 Inverting the Y-axis

+

One good way of illustrate the usefulness of label callbacks in a + slightly different context is to show how we can achieve the effect of + an inverted Y-scale.

+

An inverted Y-scale has the lowest number at the top and the scale + values increases downwards.

+

Even though JpGraph doesn't directly support this feature it is + quite easy to achieve with just a few extra lines of code in your image + script.

+

Before we continue we give an example of what we are referring to.

+

+
+
Figure 99: Inverted Y-axis [src]  +

+

+

+

Two achieve this effect there are two simple steps to take:

+
    +
  1. Negate all you Y-value in the data
  2. +
  3. Create a callback that negates the scale labels so they appear to + be positive.
  4. +
+

And that's it! We refer you to the code in the example above for the + details.

+

7.20 Adjusting the auto-scaling limits - grace value +

+

By default the auto-scaling algorithm tries to make best possible + use of screen estate by making the scale as large as possible, i.e. the + extreme values (min/max) will be on the top and bottom of the scale if + they happen to fall on a scale-tick. So for example doing a simple line + plot could look like the plot shown in the below.

+
+
Figure 100: A typical graph with autoscaling and grace=0 [src]  +

+

+

However you might sometime want to add some extra to the minimum and + maximum values so that there is some "air" in the graph between the end + of the scale values and the extreme points in the graphs. This can be + done by adding a "grace" percentage to the scale. So for example adding + 10% to the y-scale in the image above is done by calling the + SetGrace() method on the yscale as in

+

+ $graph->yaxis->scale +->SetGrace(10, +10); +

+

These lines add a minimum of 10% to the top and bottom values of the + scale. Note that we say "minimum" since depending on the specific tick + values choose this might be a little bit more to make the end of the + scale fall on an even tick mark.

+

Adding this line to the previous graph will result in the following + example

+

+
+
Figure 101: Adding 10% grace value to top and bottom of the + Y-scale [src] +  +

+

+

Since we haven't adjusted the position of the X-axis it will remain + at Y=0 which might not necessary be what we would like so we therefor + also add the line

+

+ $graph->xaxis->SetPos +("min");

+

+

So that the X-axis always will remain at the lowest possible + Y-value. Doing this will then result in the example below

+

+
+
Figure 102: Using grace but also adjusting the position of + the X-axis +[src]  +

+

+

+

7.21 Adding bands of pattern and color to graphs

+

As an additional way of emphasizing certain areas of the graph it is + possible to add bands (either vertical or horizontal) to any one of the + standard X-Y coordinate system based graphs. A band is a rectangular + area that stretches one entire axis. This means that if you define a + band between X-coordinates 3 and 5 the band area will occupy an area + between the X-coordinates and the entire Y-range.

+

In order to access this functionality you must first make sure that + you include the additional library file jpgraph_plotband.php

+

At the time of this writing (current as of JpGraph 1.8) the table + below illustrates the 8 basic types of patterns available. We will + shortly show you how you can customize these patterns, To keep these + examples clear we have only used one pattern in each figure.

+

+ + + + + +
+
+
Figure 103: +[src]  +

+
+

+
+
+
Figure 104: +[src]  +

+
+

+
+
+
Figure 105: +[src]  +

+
+

+
+
+
Figure 106: +[src]  +

+
+

+
+
+
Figure 107: +[src]  +

+
+

+
+
+
Figure 108: [src]  +

+
+

+
+
+
Figure 109: +[src]  +

+
+

+
+
+
Figure 110: +[src]  +

+
+

+
+

To add a one of these patterns to your graph you need to call the + method + PlotBand::PlotBand() The arguments is fairly easy to understand. + The pattern you would like to use is specified by using the correct + constant. You can see the name of the correct constants in the figures + above. You also need to specify if the band should stretch along the + vertical or horizontal axis as well as the min and max coordinates for + the band. As coordinates you may also use the special values "min" and + "max" which automatically sets the value to the minimum/maximum value + of the scale. The specified numeric value will be automatically + truncated to fit within the plot area.

+

We don't discuss the other arguments further here, instead we refer + you to the class reference.

+

7.21.1 Customizing the patterns

+

All patterns can be customized by

+
    +
  • ... altering the colors of the band +
     
  • +
  • ... altering the density of the patterns using the method + PlotBand::SetDensity() The density is specified as an integer in + range 1 to 100 where a higher number means a higher density (smaller + distance between the lines). For example setting the density of the 3D + plane above to 60 gives the result
    +
    +
    Figure 111: Increasing the desnity in a pattern [src]  +

    +
    +

    +
     

    +
  • +
  • ... enabling or disabling a frame around the pattern by using the + method + PlotBand::ShowFrame() The band will be given the same color as the + band. +
     
  • +
  • ... finally you can change whether the band should be drawn on top + of the plots or beneath, (by default the bands are under the plots), + using the + PlotBand::SetOrder() as the following example show
    +
    +
    Figure 112: Stroking the pattern on top of the plots [src]  +

    +
    +

    +
  • +
+

Note: 3D planes actually carry another + possible modification. You can specify the vanish point to change the + perspective used. You can't access the method to change the horizon + directly but you can access it through
+  $band +->prect->SetHorizon( +$aHorizon) +

+

+

assuming that the band is a 3D plane.

+

To finish this section we give one final, more creative, example on + how to use the bands.

+
+
Figure 113: Combining 3D plane, solid band and a sttaic line [src]  +

+

+

+

7.22 Adding static lines to the plot

+

In addition to the bands you can also add static lines to the graph. + An example of that is actually shown in figure 11 above. You create a + line as an instance of + class PlotLine . So for example the lines

+  $sline  += new PlotLine +(HORIZONTAL,0, +"black",2); +
$graph->Add( +$sline); +

+

will add a 2-pixel wide horizontal static line at Y-position zero.

+

8 Working with non X,Y-plots

+

Non X,Y plots includes

+
    +
  • Pie plots (2D and 3D)
  • +
  • Radar plots
  • +
  • Polar plots
  • +
  • Gantt charts
  • +
+

The fundamental difference is that these classes makes use of an + extended version of the basic Graph class. Therefor you can not mix X,Y + plots with non-X,Y plots. For example it is not possible to mix a line + graph with a Polar graph.

+
    +
  • To create 2d or 3d pie plots you must use the PieGraph class
  • +
  • To create radar plots you must use the RadarGraph() class
  • +
  • To create radar plots you must use the PolarGraph() class
  • +
  • To create gantt plots you must use the GanttGraph() class
  • +
+

+

8.1 Radar plots

+

Spider plots are most often used to display how a number of results + compare to some set targets. They make good use of the human ability to + spot symmetry (or rather un-symmetry) . the figure below show an + example of a spider (sometimes called a web-plot). Spiderplots are not + suitable if you want very accurate readings from the graph since, by + it's nature, it can be difficult to read out very detailed values.

+
+
Figure 114: A typical radar graph with two plots [src]  +

+

+

+
    +
  • There is one axis for each data point
  • +
  • Each axis may have an arbitrary title which is automatically + positioned
  • +
  • A spider plot may be filled or open
  • +
  • You can control color, weight of lines as you are already used to
  • +
  • A spider plot can, as usual, have a title and a legend
  • +
  • The first axis is always oriented vertical and is the only axis with + labels
  • +
  • Grids may be used (dashed in the figure above)
  • +
  • You may have ticks (although suppressed in the figure above
  • +
  • You can control the size and position within the frame of the graph
  • +
  • You may have several plots within the same graph
  • +
+

In the following section we show how to draw both simple and complex + radar graph. As we will show all the settings will follow the same + pattern as for the more standard linear graphs.

+

8.1.1 Simple radar plots

+

Let's start by creating a very simple radar plot based on 5 data + points using mostly default values.

+

As the first thing you must remember to include the extension module + that contains the radar plot. "jpgraph_radar.php".

+

A very simple radar plot is created by the code

+(File: radarex1.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_radar.php"); +
     +
// Some data to plot +
$data  += array(55,80, +46,71,95 +); +
     +
// Create the graph and the plot +
$graph  += new RadarGraph +(250,200, +"auto"); +
$plot  += new RadarPlot +($data); +
+
// Add the plot and display the graph +
$graph->Add( +$plot); +
$graph->Stroke(); +
?>

+

and would give the result

+
+
Figure 115: A first very simple radar plot using default + settings [src] +  +

+

+

To change the size and position of the radar graph is similar to the + pie plot and you do it by using the methods + SetSize() and + SetCenter()

+

If you want a filled radar plot you need to specify the fill color + with the method + SetFillColor() The following example shows these methods in action

+
+
Figure 116: Changing size, position and adding fill color to + the radar plot. +[src]  +

+

+

+

8.1.2 Specifying titles for the axis and legends for + the plots

+

We normally would like something more meaningful as description of + each axis than it's number. Specifying the titles are accomplished + through the use of the method SetTitles() of the graph. Let's say that + each axis corresponds to a month. We could then use the code

+  $titles  += $gDateLocale +->GetShortMonth +(); +
$graph->SetTitles( +$titles); +

+

As you can see the way radar plot is constructed will assign the + titles (and plot points) in a counter-clockwise direction. If you want + them in clock-wise order you will have to inverse your input data array + as well as the title array.

+

To specify a legend you (as with the other plot) make use of the + SetLegend(); method on each radar plot.

+

8.1.3 Adding grid line to the radar plot

+

Each major tick mark can also be connected together to create a + grid. The grid is accessed through the 'grid' property of the graph. To + enable the grid and set the line style to "dotted" you would have to + add the lines

+ $graph->grid->Show +(); +
$graph->grid-> +SetLineStyle( +"dotted"); +

+

and would result in the following graph

+
+
Figure 117: Adding dotted gridlines to the graph [src]  +

+

+

By design the plot is above the grid line but beneath the axis in + image depth, hence some part of the grid lines are hidden.

+

To have the grid lines more "visible" just change their color, say + to, dark red by invoking the SetColor() method on the grid lines which + would give the following result

+

Another simple change we could do would be to just change the + background color of the radar graph. This is (not surprisingly) done by + a call to the method SetColor() invoked on the graph object.

+
+
Figure 118: Changing the background color [src]  +

+

+

+

8.1.4 Adding several plots to the same radar graph +

+

You can easily create several radar plot which are added to the same + radar graph. The thing to remember is that if you use filled radar + plots and they overlap each other that the order which they are added + will be the order they are drawn.

+

A simple example of this is shown below

+
+
Figure 119: Several radar plots in one radar graph [src]  +

+

+

+

8.1.5 Adding plotmarks i radar graphs

+

In exactly the same way as for line graphs it is possible to add + plot marks in radar plots. The mark property is accessed through the + RadarPlot::mark The example below adds a red ball as a marker.

+
+
Figure 120: Adding plotmarks to a radar plot [src]  +

+

+

+

8.2 Pie plots

+

So far we have just show plots based on an X-Y coordinate system. + This is not the only types of graphs you can create with JpGraph. + Another common type is Pie plots. JpGraph supports both 2D and 3D pie + plots. For 2D pie plots there are also 2 versions, but more on that + later.

+

The main difference as compared to the X-Y plots is that to all pie + plots are added to the + PieGraph() instead of the Graph() object we used for the X-Y graphs + we have drawn so far. For this you must first include the + "jpgraph_pie.php" in your script (or "jpgraph_pie3d.php" if you want to + use 3-dimensional pies).

+

Below you cane see the code needed to create the simplest possible + pie graph just using the default settings.

+

include ( +"../jpgraph.php"); +
include (
"../jpgraph_pie.php"); +
+
$data  += array(40,60, +21,33); +
+
$graph  += new PieGraph +(300,200); +
$graph->SetShadow(); +
+
$graph->title-> +Set( +"A simple Pie plot"); +
+
$p1 = new PiePlot( +$data); +
$graph->Add( +$p1); +
$graph->Stroke(); +

+

The above code would give the following pie graph

+
+
Figure 121: The simplest possible pie graph [src]  +

+

+

There is a few things worth noting here

+
    +
  • By default all pie slices have the percentage shown just outside + the slice.
  • +
  • The colors are automatically assigned to the slices.
  • +
  • The pie have the edges marked by default
  • +
  • The first slice start at 0 degrees (3 o'clock)
  • +
+

You can change almost all aspects of appearance of the pie graphs. + For example you could change :

+ +

+

The next simplest addition we can do is to add a legend to the pie + graph. We do this by using the + SetLegends(); method. By adding the legends to the previous example + we get the following image

+
+
Figure 122: Adding a legend to the pie graph [src]  +

+

+

+

(In the figure above we also moved the center of the pie slightly to + the left to make more room for the legend box.)

+

The text for the legends can also contain printf() style format + strings to format a number. This number passed on into this string is + either the absolute value of the slice or the percentage value. How to + switch between the is describe further down in this chapter.

+

The next change you might want to change is the size and position of + the Pie plot. You can change the size with a call to + SetSize(); and the position of the center of the pie plot with a + call to SetCenter(); + The size can be specified as either an absolute size in pixels or as a + fraction of width/height (whatever is the smallest). The position of + the pie plot is specified as a fraction of the width and height.

+

To put the size and positioning API to use we will show how to put + several pie plots on the same pie graph. In the following example we + have also adjusted the legends of the slice values to use a smaller + font.

+

What we do in this example is quite simple, create 4 pie plots, make + them smaller and put them in the four corner of the graph. This will + give the result as shown in the following example.

+
+
Figure 123: Multiple pie plots in the same pie graph [src]  +

+

+

+

8.2.1 Adding guide lines to Pie Plots

+

For very busy Pie plots it can become too little space for the + labels to be printed just beside the pie slice. For this purpose it is + possible to use guide lines for the labels. The library will then draw + a line from the center edge of the slices to the label which will be + positioned further out from the Pie Plot.

+

There is one method that is primarily used to handle this, + PiePlot::SetGuideLines() the simplest usage of this would be

+  $pieplot +->SetGuideLines +();

+

An example of this could then be

+
+
Figure 124: Using guide lines for PiePlots [src]  +

+

+

The above example will give guide lines very similar as what is + produced by other programs, e.g. Excel. In addition to the above + variant it is also possible to instruct the library to line up the + labels vertically in a way that we think is easier to read. This is + achieved by specifying the second parameter to the SetGuideLines() to + 'false' as in

 $pieplot-> +SetGuideLines( +true,false);
+

+

The first parameter is to enable/disable the guide-lines. With the + same example as above this would then produce the image

+
+
Figure 125: Using guide lines for PiePlots with vertically + lined up labels. +[src]  +

+

+

It is also possible to configure the vertical distance between the + labels. By default the distance between the labels is roughly 40% of + the labels font height. By using the method + PiePlot::SetGuideLinesAdjust() it is possible to specify a + fractional value which is interpretated as the distance between the + bottom of one label to the bottom of the next. This means that + specifying a value of '1.0' the labels will have no space between them + and the bottom of one label will touch the top of another label. By + default this value is 1.4.

+

By increasing or decreasing this value it is possible to make the + labels become positioned more or less compact. Below we have taken the + above example and reduced the distance to '1.1' and as can be seen this + yields much more compact labeling.

+
+
Figure 126: Adjusting to a smaller vertical distance between + the labels +[src]  +

+

+

+

Note: Guide lines is only available in 2D Pie plots.

+

8.2.2 Creating 3D pie plots

+

So far we have only made use of 2D pie plots, creating 3D pie plots + is no more difficult. Instead of creating the plots with a call to + PiePlot() you create the plots with a call to + PiePlot3D() If we just take the first simple pie plot and replace + the call to PiePlot() with a call to PiePlot3D() we get the following + result.

+
+
Figure 127: A first example of a 3D pie plot [src]  +

+

+

3D Pie plots have the same possibilities as the normal pie plots + with the added twist of a 3:rd dimension. You can adjust the + perspective angle with the method + SetAngle() So for example to make the pie more "flat" you just set + it to a smaller angle. Setting the perspective angle to 20 degrees in + the previous example will give the following result.

+
+
Figure 128: Adjusting the perspective angle [src]  +

+

+

+

8.2.3 Exploding pie slices

+

One way to attract attention to some specific piece of information + in a pie chart is to "explode" one or more slices. Both 2D and 3D pies + support exploding one or several slices.

+

Exploding slices is accomplished by the methods + Explode() and + ExplodeSlice() The first method is used if you want to explode more + than one slices and the second is a shorthand to make it easy to just + explode one slice.

+

For example to explode one slice the default "explode" radius you + would just have to say

+  $pieplot->ExplodeSlice( +1) +

+

The above line would explode the second slice (slices are numbered + from 0 and upwards) the default amount. Doing this to the two previous + example would result in

+
+
Figure 129: Exploding one slice [src]  +

+

+

+

+
+
Figure 130: Exploding one 3D slice [src]  +

+

+

+

To explode all slices at once you can use the + PiePlot::ExplodeAll() method. If you want to explode several slices + you can use the + PiePlot::Explode() method and supply a suitable array argument.

+

8.2.4 Specifying and adjusting labels on pie plots +

+

By default the values shown just outside the pie for each slice are + the percentage value for each slice. If you instead wanted the absolute + value you would just have to use the + SetLabelType() method. So to use the absolute value you would call

+

+ $pieplot-> +SetLabelType( +"PIE_VALUE_ABS"); +

+

+

Furthermore you could enhance the formatting of the value by either + using a printf() style format string (using + SetFormat() ) or by providing a formatting function callback (using + + SetFormatCallback() ) for doing more advanced formatting.

+

You can also adjust the position of the labels by means of the + PiePlot::SetLabelPos() method. The argument to this method is + either the fraction of the radius or the string 'auto'. In the latter + case JpGraph automatically determines the best position and the the + first case The following example illustrates this

+
+
Figure 131: Example of adjusting the position of the labels + for the slices +[src]  +

+

+

+

If this formatting is not enough you can also "manually" specify the + labels for each slice individually. You do this by using the + PiePLot::SetLabels() method. This will let you specify individual + text strings for each label. In each specification you can also add a + printf() formatting specification for a number. The number passed on + will be either the absolute value for the slice or the percentage value + depending on what was specified in the call to + SetLabelType()

+

The SetLabels() method can also take a second parameter, the label + position parameter. This is just a shortcut to the SetLabelPos() as + described above. By default the position will be set to 'auto' if not + explicitely specified.

Note: The alignment of + the labels will be different depending on whether they are inside or + outside the pie. When inside the center of the strings will be aligned + with the center of the slice at the specified fraction of the radius. + When positioned outside the alignment will depend on the angle to avoid + that the labels inadvertely writes over the pie.

+

8.2.5 Specifying slice colors and using themes

+

Another typical change would be to change the colors of the slices. + There are two fundamental ways of doing this. You either manually + specify the colors for the slices as an array using the method + SetSliceColors() If you specify fewer colors than the number of + slices they will just wrap around.

+

Another way is to use one of the pre-defined color "themes". This is + just a predefined set of colors that will be used for the slices. You + choose what "theme" you like to use with the method ( + SetTheme() ) At the time of this writing the available themes are

+
    +
  • "earth"
  • +
  • "pastel"
  • +
  • "sand"
  • +
  • "water"
  • +
+

The following example shows the same pie using the different + "themes" in order.

+
+
Figure 132: +[src]  +

+

+

+
+
Figure 133: +[src]  +

+

+

+
+
Figure 134: +[src]  +

+

+

+
+
Figure 135: +[src]  +

+

+

+

A complete color chart of all available colors in the different + themes can be found here

+

Another simple change is to remove the border ( or change it's + colors ) that separates each slice. This can be done by a call to + ShowBorder()

+

8.2.6 Adding drop shadows to the slices

+

An additional visual enhancements can be made by adding a drop + shadow to the individual slices. This is accomplished by means of the PiePlot::SetShadow() + method. Adding a drop shadow is often more affective if the pie has one + or more slices exploded as the following example shows

+
+
Figure 136: Adding a drop hadow to the slices [src]  +

+

+

+

8.2.7 Another variant of 2D Pie plots

+

As mentioned in the beginning there are two versions of the 2D pie + plots. The normal pie plot created as an instance of + class PiePlot and a variant created as an instance of + class PiePlotC

+

This variant is an extension of the standard PiePlot in the sense + that it also have a filled circle in the center. The following example + illustrates this

+

+
+
Figure 137: Example of the variant of pie plot with a filled + center circle +[src]  +

+

+

+

Since the PiePlotC is an extension to the basic pie plot all the + normal formatting you can do for pie plots you can also do for the + PiePlotC .

+

The additional formatting only concerns the filled middle circle. + You have the option of adjusting size, fill color and all font + properties. You perform these operations with the methods

+

+ + + + + +
+PiePlotC::SetMidColor()Set fill color of mid circle
+PiePlotC::SetMidSize()Set size (fraction of radius)
+PiePlotC::SetMidTitle()Set title string (may be + multi-lined)
+PiePlotC::SetMid()Set all parameters in a single method + call
+

In addition to the normal CSIM for PiePlot:s the center area is also + a CSIM hotspot. You specify the target CSIM with a call to + PiePlotC::SetMidCSIM()

+

The next example shows an example with some more innovative + formatting. In this example we have :

+
    +
  • hidden the frame around the pie graph
  • +
  • exploded all the slices
  • +
  • added drop shadow to the individual slices (and the center filled + circle)
  • +
  • specified individual multi line labels.
  • +
  • changed the font for the title to a TTF font.
  • +
+

+
+
Figure 138: PiePlotC with some more innovative formatting to + make it more interesting. +[src]  +

+

+

+

+

8.3 Polar plots

+

+

8.3.1 Overview

+

Each data point in a polar plot is represented by a tuple consisting + of a radius and an angle. The polar plot itself can be either outlined + or filled. In addition each point may have a standard marker (the same + as for line and scatter plots).

+

The scale for the radius can be either linear or logarithmic.

+

A polar graph is created by creating an instance of +PolarGraph::PolarGraph(). The polar graph type inherits all the + capabilities of ordinary X-Y graphs, i.e they can have background + images, background gradients, tabbed titles and so on.

+

Polar graphs comes in two basic types, they can either show a full + 360 degree graph or a half 180 degree graph. The two examples below + show these two basic types of graphs.

+

+
+
Figure 139: A simple 360 degree polar graph [src]  +

+

+

+
+
Figure 140: The 180 degree variant polar plot. [src]  +

+

+

+

8.3.2 Adjusting the radius scale

+

The radius axis can be shown in either a linear or logarithmic + scale. This is controlled, as usual, by a call to +PolarGraph::SetScale() The two examples below show the same plot in + either linear or logarithmic scale

+

+
+
Figure 141: Using a logarithmic scale [src]  +

+

+

+

+
+
Figure 142: Using a linear scale [src]  +

+

+

+

Please note that the maximum values of the scales are different.

+

By default the scale will be auto scaled depending on the data. You + can also specify a manual scale by supplying an extra argument to the + SetScale() value. The only difference from the manual scaling with the + other X-Y-graphs is that for polar graph you only specify a manual + maximum. The minimum will always be 0 for the linear scale and a scaled + value of 10 (i.e 1, 0.1, 0.001 and so on) for the logarithmic scale.

+

The plot is clipped to the plot area so if you specify a smaller + scale then the maximum value that part of the plot that are outside the + plot area will be clipped.

+

8.3.3 Adjusting the grid lines

+

As usual you have full freedom to select what grid lines you like to + show (and what colors they should have). There are three different + types of grid lines you may adjust. The radius minor and major grid + lines and the angle grid lines.

+

You select what grid lines to show with a call to +PolarAxis::ShowGrid() The two example below shows a logarithmic plot + with either just major grid lines or both minor and major grid lines.

+

+
+
Figure 143: Using a logarithmic scale with just major + gridlines [src] +  +

+

+

+

+
+
Figure 144: Using a logarithmic scale with both minor and + major gridlines +[src]  +

+

+

The colors of the grid lines are specified with a call to + PolarAxis::SetGridColor()

+

For the angle grid lines it is possible to specify the angle + division between each grid line with the method + PolarAxis::SetAngleStep() You specify the step distance in degrees. + By default the step size is 15 degrees.

+

8.3.4 Adjusting the label fonts

+

You can individually specify different fonts and colors for the + angle and the radius labels. The radius font is specified with + PolarAxis::SetFont() and the angle font is specified with a call to + PolarAxis::SetAngleFont()

+

You can adjust the color with the method +PolarAxis::SetColor() ?>

+

The following example specifies different color for the labels. it + also shows that you can add both a radial axis title as well as a + tabbed title. In this example we have also chosen not to show the frame + around the edge of the plot.

+

+
+
Figure 145: Different colors for labels, specifying both a + tabbed title as well as a axis title [src]  +

+

+

+

8.3.5 Adjusting the labels

+

As can be seen from the previous examples the angle labels have a + small superscripted "o" after each label. You can select if you like to + show this degree mark or not with a call to the + PolarAxis::SetANgleDegreeMark() method by which you can enable or + disable that mark after the angels.

+

For the radius labels all standard formatting that can be done to + the X-Y axis such as format string or format callbacks are supported.

+

A common modification for polar plots is probably to disable the + display the last label when using a 360 degree plot since the last + label will "collide" with the plot box around the plot area. It is + possible to disable the last label with a call to +Axis::HideLastTickLabel() As you can see this has been used in some + of the examples in this chapter.

+

8.3.6 Image maps

+

If you have specified markers for the polar plot (by setting the + mark property of the plot) each marker can be a hot spot in a client + side image map. The target URL are as usual specified with the + SetCSIMTargets() as the following short code excerpt shows

+   +// Start by specifying the proper URL targets +
$targets  += array("#1","#2", ....... ); +
$polarplot  += new PoalrPlot +($data); +
$polarplot +->mark->SetType( +MARK_SQUARE); +
$polarplot +->SetCSIMTargets +(targets); +
$graph->Add( +$polarplot); +
$graph->StrokeCSIM(); +

+

+

8.3.7 A final example

+

As a final example we show a full 360 degree polar plot with square + markers as well as background color gradient and a legend for the plot.

+
+
Figure 146: A polar plot with both legend and background + gradient fill. +[src]  +

+

+

+

9 Gantt charts

+

+

9.1 Why use Gantt charts?

+

The cynical view: To explain why your project is over-due and + over-budget.

+

The pragmatic view: To keep management of our back and know what we + have forgotten

+

The common view: As a tool to help identify project issues and + highlight problem areas.

+

Basically, Gantt charts are used to show the state of a number of + activities (possible grouped) against time.

+

9.2 Capabilities in JpGraph Gantt module

+

+
    +
  • Both automatic and manual scaling of date
  • +
  • Full support for independent CSIM for both labels and activity bars
  • +
  • Extremely flexible scales, possibility to use both months, weeks, + days, hours and minutes as scales. Furthermore (unlike MS Project) you + can have as may scales displayed at the same time as you like.
  • +
  • Support for visualization of grouped activities
  • +
  • Gantt charts can be automatically sized according to the number of + bars and scale used. This means you don't have to supply a specific + size when creating a graph.
  • +
  • Unlimited number of activities
  • +
  • Supports platform independent Week number calculation according to + ISO:8601
  • +
  • Rich possibility to display a variety of scales or combination of + scales supports both day, week, month, year. Each scale header is + totally configurable in terms of font, size, color, background etc
  • +
  • User configurable date format in the scale headlines
  • +
  • Visualization of constrains between activities, start-to-start, + start-to-end, end-to-start and end-to-end
  • +
  • Scales have "intelligent" grids
  • +
  • Supports title and subtitle with user specified font, size and + color
  • +
  • Activity bars can have multiple patterns and colors
  • +
  • Activity bar may have shadows
  • +
  • Activity bars can have internal progress bars displayed to show how + much of a given task has been accomplished
  • +
  • Activity titles can have individual fonts, colors and backgrounds
  • +
  • Activity bars can have captions
  • +
  • Activity bars can have specified left- and right end markers
  • +
  • Bar heights can be specified in absolute pixels or in percent of + the activity line width
  • +
  • Supports milestones with many different marks
  • +
  • Supports vertical marker lines with text
  • +
  • Can easily be localized
  • +
  • Full support for CSIM (or drill down graphs)
  • +
  • Alternate row colors
  • +
  • ... and more
  • +
+

+

9.3 A simple Gantt chart

+

Time to show you an example of a Gantt chart and how easy it is to + make one. Lets make it the simplest possible Gantt chart. One activity, + named "Project", which lasts from "2001-11-01" to "2002-02-20".

+

All it takes to do this (using default values for everything) is the + following code.

(File: ganttex00.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_gantt.php"); +
+
// A new graph with automatic size +
$graph  += new GanttGraph +(0,0, +"auto"); +
+
//  A new activity on row '0' +
$activity  += new GanttBar +(0,"Project", +"2001-12-21", +"2002-01-20"); +
$graph->Add( +$activity); +
+
// Display the Gantt chart +
$graph->Stroke(); +
?> +

+

The resulting image is shown in Figure 147 below.

+
+
+
Figure 147: Your first simple Gantt chart. [src]  +

+
+

+

+

Let's note a few things with the above image and code:

+
    +
  • You always need to include both jpgraph.php and jpgraph_gantt.php
  • +
  • A bar is specified a minimum of four parameters, vertical position + (more about that in a second), a title, start and end date.
  • +
  • If you don't specify a size for the image it will be automatically + decided based on the min and max dates for the bars rounded to a full + week.
  • +
  • By default the week and day scale are displayed.
  • +
  • Weekend background are displayed default in a slightly gray color
  • +
  • Sundays are written in red.
  • +
  • Weeks are numbered according to ISO 8601
  • +
  • Activity bars are rendered as blue stripes on a white background by + default.
  • +
+

So, lets start making this graph a little bit more interesting. + First we are going to add a title, then we will add a month scale and + finally we will change the color of the bar.

+

All that is taken care of in the code below.

+(File: ganttex01.php) +
<?php +
include ( +"../jpgraph.php"); +
include (
"../jpgraph_gantt.php"); +
+
$graph  += new GanttGraph +(0,0, +"auto"); +
$graph->SetShadow(); +
+
// Add title and subtitle +
$graph->title-> +Set( +"A nice main title"); +
$graph->title-> +SetFont( +FF_ARIAL, +FS_BOLD,12); +
$graph->subtitle-> +Set( +"(Draft version)"); +
+
// Show day, week and month scale +
$graph->ShowHeaders( +GANTT_HDAY  +GANTT_HWEEK  +GANTT_HMONTH); +
+
+// Instead of week number show the date for the first day in the week +
// on the week scale +
$graph->scale-> +week->SetStyle(WEEKSTYLE_FIRSTDAY); +
+
+// Make the week scale font smaller than the default +
$graph->scale-> +week->SetFont(FF_FONT0 +); +
+
+// Use the short name of the month together with a 2 digit year +
// on the month scale +
$graph->scale-> +month-> +SetStyle( +MONTHSTYLE_SHORTNAMEYEAR2); +
+
+// Format the bar for the first activity +
// ($row,$title,$startdate,$enddate) +
$activity  += new GanttBar +(0,"Project", +"2001-12-21", +"2002-01-20"); +
+
+// Yellow diagonal line pattern on a red background +
$activity +->SetPattern(BAND_RDIAG, +"yellow"); +
$activity +->SetFillColor +("red"); +
+
// Finally add the bar to the graph +
$graph->Add( +$activity); +
+
// ... and display it +
$graph->Stroke(); +
?> +
The resulting image is shown in Figure + 148 below.
+
+
Figure 148: Making the Gantt chart a little bit more + interesting with title and more colors. [src]  +

+

+

From the above example you might note a few things

+
    +
  • The margins adjust automatically to the added title and subtitle
  • +
  • The height of the scale headers adjust automatically when you + change the font.
  • +
  • You have great flexibility in choosing what format the scale labels + will have. If you for example wanted the full 4 digit year in the month + header all you have to change is use the constant + MONTHSTYLE_SHORTNAMEYEAR2 in the code above to + MONTHSTYLE_SHORTNAMEYEAR4
  • +
  • You have full freedom of manipulating headers in terms of font, + color, background and size.
  • +
+

To show that this is really simple let's show the full year in the + month, and set the header style to be white text on a dark blue + background by adding the lines

+   +// Use the short name of the month together with a 4 digit year +
// on the month scale +
$graph->scale-> +month-> +SetStyle( +MONTHSTYLE_SHORTNAMEYEAR4); +
$graph->scale-> +month-> +SetTextColor( +"white"); +
$graph->scale-> +month-> +SetBackgroundColor( +"blue"); +

+

to the code above. The resulting image is shown in Figure 149

+
+
Figure 149: Enhancing the scale headers. [src]  +

+

+

+

9.4 The structure of a Gantt chart

+

A Gantt chart is made up of four distinct areas.

+
    +
  1. On the left side there is the activity title column.
  2. +
  3. On the top there is the scale headers (up to four headers may be + displayed)
  4. +
  5. The actual plot area where all the Gantt bars and markers go
  6. +
  7. The margin area, where for example the titles are shown
  8. +
+

Since a Gantt chart inherits all the usual properties of a JpGraph + Graph() you have the access to the same method to formatting the image + as before. For example to have a shadow around the image you call + Graph::SetShadow() and to set the margin color you can use + Graph::SetMarginColor(). Please refer to the reference documentation + for a full list of supported features.

+

To create a Gantt chart you add objects to it. As + of this writing you may add the following object by the use of the + GanttChart::Add() method

+
    +
  • Gantt bars (indicates the length of an activity)
  • +
  • Milestones, a single mark at a specific date
  • +
  • Vertical line, might be use to mark phases in projects
  • +
+

All these objects may be extensively modified in terms of + formatting. You can specify color (both fill- and frame color), size, + titles, style and patterns and so on. All these objects comes with (in + my mind) sensible default so you don't have to specify a lot of + parameters. But if you need a fine grain control or if you disagree + with my taste you can.

+

9.5 Creating a GanttChart

+

You create a new Gantt Chart with a call to GanttChart(). The + signature for GanttGraph is the same as for ordinary JpGraph graphs, + i.e

function  +GanttGraph( +$aWidth, +$aHeight, +$aCachedName, +$aTimeOut, +$aInline) +

+

The only real difference is that for GanttCharts you can specify one + or both of the dimension parameters (width and height) as -1 in which + case that dimension will be automatically sized determined by scale and + fonts chosen. The following examples shows some possible ways of + creating a new graph

+
    +
  • $graph=new GanttGraph() +
    The size of the graph will be determined automatically, no caching + will be used and the graph will be generated in-line.
  • +
  • $graph=new GanttGraph(-1,-1,"auto") +
    The size of the graph will be determined automatically, caching + will be used (the name will be based on the script name), no timeout + will be used and the graph will be generated in-line
  • +
  • $graph=new GanttGraph(450,-1,"auto",5) +
    Same as the previous entry but the width is fixed to 450 points and + the cached image will have a timeout of 5 min.
  • +
  • $graph=new GanttGraph(-1,-1,"auto",5,false) +
    The image will not be generated in-line, only the cache will be + updated if it has timed out, otherwise nothing will happen.
  • +
+

Since GanttGraph() inherits all the methods (that make sense for + GanttGraph) from Graph you can specify shadow, color etc of the general + frame.

+

9.6 Positioning objects in the Gantt plot

+

Bars and Milestones need both a vertical position and a horizontal + position. The horizontal start position is specified as a date, e.g. + "2001-06-23", and the vertical positions are specified as a number + [0,1,2,3,...]. This vertical number indicates the position from the top + where the object should be placed. To understand this you might imagine + a number of "invisible" horizontal bands with a certain height. If you + specify 0 as the vertical position the bar will be placed in the first + band, specify 3 and the bar will be placed in the fourth band and so + on.

+

It is perfectly legal, and perhaps even desirable to leave "gaps" + when laying out bands to group related activities. So, for example you + could have three activities/bars at positions 1,2,3 and then another 2 + bars at position 6,7 leaving band 0,4,5 empty.

+

All these "invisible bands" have the same height (equ-spaced). The + height of each band is automatically determined and depends on both the + method of layout ( as specified by (GanttChart::SetLayout()) and the + individual heights of the individual bars and titles. The rules are + quite simple:

+
    +
  • If you use layout=GANTT_FROMTOP (the default and most common) the + height will equal the height (+ a margin) of the highest gantt bar. The + height calculation of each bar takes into account both the actual bar, + the title, and any left- right-marks (more about that later) that may + be present. The name "fromtop" refers to that when you have explicitly + specified a height the bars will usually be added from band 0 and + onwards and hence being added from the top. (This might leave empty + space at the bottom of the plot area in the graph if the height of the + graph has been explicitly specified).
  • +
  • If you use layout=GANTT_EVEN the bars are evenly (hence the name) + spread out over the available height in the gantt chart and no + consideration is taken of the individual bars heights. Note that if you + use automatic sizing you cant use even layout. It just doesn't make + sense. Even layout is for those cases when you deliberately specify a + very large image and want the bars evenly distributed using the full + height.
  • +
+

+

9.7 Gantt bars

+

The most common of all object in a Gantt chart is of course the + activity bar (GanttBar()). In terms of formatting this object has a + very large flexibility. The full signature for the GanttBar constructor + is

function  +GanttBar( +$aVPos,$aTitle,$aStart +,$aEnd,$aCaption, +$aHeight) +

+

+

+ + + + + + + +
+ +  $aVPos  + The vertical position for the + bar, [0..n]
+ +  $aTitle  + Title for the activity
+ +  $aStart  + Start date for the activity given + as string, e.g "2001-09-22"
+ +  $aEnd  + End date for activity given as either + a date (a string) or as the duration (in days) of the activity, e.g + both "2001-10-15" and 20.5 are valid inputs
+ +  $aCaption  + Text string (caption) to appear + at the end (right side) of the bar
+ +  $aHeight  + Height of bar given as either + a value in range [0,1] in which case this is interpretated as what + fraction of the vertical position should the bar occupy. The height can + also be given in absolute pixels [1..200]
+

9.7.1 Specifying vertical position

+

As described above vertical positions are specified as a numeric + value [0..n] where 'n' is an arbitrary constant. (For practical + purposes n is most likely < 100)

+

Using our previous example we will illustrate this parameter by + changing the position of our 'Project' activity to position 7. Therefor + we change the call to GanttBar() to

+  $activity = new GanttBar( +7,"Project","2001-12-21" +,"2002-02-20" +);

+

and we then get the chart as shown below in Figure 150.

+

+
+
Figure 150: Changing the vertical position to 7 [src]  +

+

+

Note that the height of each position (vertical position) will + depend on the actual height of the bar.

+

9.7.2 Specifying start and end position for a bar +

+

Start of bars are given as a date string. The format depends on the + current locale. Examples of valid date strings are

+
    +
  • "2001-10-22"
  • +
  • "22 October 2001"
  • +
  • "22 Oct 2001"
  • +
+

Even if several format are supported it is recommended to use all + numeric dates, i.e in the form "2001-10-22".

+

Specifying the end position may be done in two different ways, + either by the end date in the same way as for the start date. The other + way is to specify the length of the activity in number of days + (and fractions thereof). Examples of valid end dates are:

+
    +
  • "2001-11-15"
  • +
  • "15 Nov 2001"
  • +
  • 22, (specifies duration of 22 days)
  • +
  • 22.7, (specifies duration of 22.7 days)
  • +
+

Please note that duration is specified as numerical values and + not strings.

+

9.7.3 Milestones

+

Milestones are similar to bars but have no end date since milestones + just apply to one single date. Milestones are created much the same way + as activities but using method MileStone() instead.

+

The full signature for milestones are

  +function MileStone +($aVPos,$aTitle, +$aDate, +$aCaption) +

+

+

+ + + + + +
+ +  $aVPos  + The vertical position for the + bar, [0..n]
+ +  $aTitle  + Title for the activity
+ +  $aDate  + Date for the milestone
+ +  $aCaption  + Text to the right of the + milestone
+

Valid milestones are for example

+
    +
  • + $milestone = new  +MileStone(3,"Code complete","2001-12-01" +);
    +

    +
  • +
  • + $milestone = new  +MileStone(3,"Code complete","2001-12-01" +,"(2001-12-01)" +);
    +

    +
  • +
+

By default milestones are rendered as a filled "Diamond" shape. This + may be optionally modified. The actual shape is specified by the 'mark' + property of milestone which is an instance of the PlotMark() class + (same class responsible for the marks in line graphs).

+

To change the shape of a milestone to, say a triangle, you use the + SetType() method as in

+  $milestone->mark-> +SetType( +MARK_DTRIANGLE) +

+

Let's put this into practice and add a milestone to our previous + example by adding the following two lines of code which result in + Figure 151 shown below.

+
+
Figure 151: Illustration of how to add a milestone to a gantt + chart [src]  +

+

+

+

You may note that by default the title color is red for milestones. + If you like to change this to be instead, say bold black, you would + invoke the SetColor() and SetFont() methods on the title property of + milestones as in

 $milestone-> +title->SetFont(FF_FONT1 +,FF_BOLD); +
$milestone +->title->SetColor( +"black"); +

+

and thew result would now (not surprisingly be)

+
+
Figure 152: Modifying the milestone title color and font [src]  +

+

+

To modify the caption you do exactly the same but act on property + 'caption' instead of 'title', i.e.

+  $milestone->caption-> +SetFont( +FF_FONT1, +FF_BOLD); +
$milestone +->caption->SetColor( +"black"); +

+

+

It is worth noting that you modify the bar title and caption the + exact same way by acting on the 'title' and 'caption' property for the + bars.

+

9.7.4 Vertical line

+

The final object you may add to a Gantt chart is simple, but quite + useful, a straight vertical line extending over the whole plot height. + This could for example be used to illustrate different phases in a + project. You create a line object by a call to GanttVLine()

+

The full signature for GanttVLine() is

  +function GanttVLine +($aDate,$aTitle, +$aColor, +$aWeight, +$aStyle) +

+

+

+ + + + + + +
+ +  $aDate  + Date for the milestone
+ +  $aTitle  + Title for the line. The title is + displayed at the bottom of the line
+ +  $aColor  + Color for the line
+ +  $aWeight  + Line width
+ +  $aStyle  + Line style,"dashed", "dotted" and + so on
+

Valid creations of lines are for example

+
    +
  • + $vline = new  +GanttVLine( +"2001-12-24"); +
    +

    +
  • +
  • + $vline = new  +GanttVLine( +"2001-12-24", +"Phase 1"); +
    +

    +
  • +
  • + $vline = new  +GanttVLine( +"2001-12-24", +"Phase 1", +"darkred"); +
    +

    +
  • +
  • + $vline = new  +GanttVLine( +"2001-12-24", +"Phase 1", +"darkred",5);
    +

    +
  • +
  • + $vline = new  +GanttVLine( +"2001-12-24", +"Phase 1", +"darkred",5,"dotted" +);
    +

    +
  • +
+

To add the line to the graph you just have to call GanttGraph::Add() + as with milestones and bars. Let's illustrate the use of vertical lines + by adding a line to the previous example.

 $vline  += new GanttVLine +("2001-12-24","Phase 1"); +
$graph->Add( +$vline); +

+

and the example (See 153) now becomes

+
+
Figure 153: Adding a vertical line with a title to the Gantt + chart [src]  +

+

+

From the above figure you can see that by default the line is drawn + at the beginning of the day of the specified date and in a 'dashed' + style. This can (of course!) be modified so that the line is + drawn/aligned anywhere in the specified day. You modify this by + invoking the method SetDayOffset() with an argument specifying the + fraction of the day where you want the line positioned.

+

If you, for example, want to display the line in the middle of the + day just add the line

+  $vline->SetDayOffset( +0.5); +

+

to the previous code and the result will be

+
+
Figure 154: Modifying the position of the line within the day + [src]  +

+

+

+

As usual you may modify the font, size and color by invoking the + appropriate method (SetFont(), SetColor()) on the 'title' property of + lines.

+

9.7.5 Adding markers to a gantt bar

+

You can easily add a variety of markers both to the start and end of + the gantt bar. They could for example be used as an alternate way to + illustrate important milestones or anticipated deliveries.

+

The left and right markers are accessed through the two properties + 'leftMark' and 'rightMark'. They are both instances of the general + 'PlotMark' class which is also used for the milestones (and in line + graphs). The 'PlotMark' class supports several different styles, for + example, diamond (the default for milestones), filled and unfilled + circles, squares, stares, and so on. Please refer to the reference + section for a complete listing.

+

Let's illustrate this by adding a right marker to the previous + example. We will use a style of a filled (red) circle with a white + title, say, "M5". In order to accomplish this we must augment the + previous example with the following lines:

 $activity +->rightMark->Show();     +
$activity +->rightMark->title-> +Set("M5"); +
$activity +->rightMark->SetType( +MARK_FILLEDCIRCLE); +
$activity +->rightMark->SetWidth( +10); +
$activity +->rightMark->SetColor( +"red"); +
$activity +->rightMark->SetFillColor( +"red"); +
$activity +->rightMark->title-> +SetFont( +FF_ARIAL, +FS_BOLD,12); +
$activity +->rightMark->title-> +SetColor( +"white"); +

+

This might seem like a lot of lines but this is as complicated as it + possible can get. As an illustration in the example belwo more or less + everything that is changeable has been changed, the default font, + font-color, fill-color, frame-color and width of marker. The two lines + only really necessary are the first two, showing the mark and setting a + title. One could still get a good result by using default values for + the rest of the properties.

+

The resulting image can be seen in Figure 155 below.

+
+
Figure 155: Adding a right marker to a bar. [src]  +

+

+

We have deliberately introduced a "strangeness" here. If the + previous two examples are compared it can bee seen that the last + example is larger than the previous one. Why?

+

The explanation is trivial once we recall that the height of bars + are sized relative to the horizontal spacing. The horizontal spacing + are based on the highest single bar including title size and, here come + the explanation, marker size. The horizontal spacing has grown since + the minimum height is now based on 10 points(=the height of the mark). + The bar still occupy the same percentage of the height so it seems to + have grown.

+

If this behavior is unwanted it is always possible to specify an + absolute size for the bar heigh, say 8 pixels, with a call

+  $activity->SetHeight +(8);

+

and achieve the result in Figure 156 below.

+
+
Figure 156: Specifying an absolute size for the height of the + bar. [src]  +

+

+

It is worth noting that the height reserved for each bar is still + the same since we haven't changed the height of the marker and the + reserved space is the maximum height used by any bar.

+

9.7.6 Adjusting the minimum distance between bars +

+

Let's see what happens if we set the height of each bar to be 100% + of the reserved height by adding another activity/bar below the first + one and set the height of each bar to 100% by adding the lines (We omit + the added lines to add another bar since they are just a copy of the + first bar)

+ $activity-> +SetHeight(1.0); +
$activity2 +->SetHeight(1.0); +

+

to the previous example. (Note that a value in the range [0..1] is + interpretated as the fraction of the reserved height while a value > 1 + is interpretated as the absolute size in pixels.)

+
+
Figure 157: Setting the height for each bar to 100% [src]  +

+

+

Aha.. What we are trying to do doesn't really make sense. Since we + have specified that the bar will always occupy 100% of the available + reserved with there will be no distance between the bars. So what if we + specify the bar as 10 pixel absolute by changing the lines to

+  $activity->SetHeight +(10); +
$activity2 +->SetHeight(10); +

+

we instead get

+
+
Figure 158: Setting both bars height to 10 pixels [src]  +

+

+

So what can we actually do? Well if you remember the reserved height + for each bar is the maximum height of all bars including titles. This + guarantees that no two bars will ever overlap. To guarantee that titles + don't end up too close together there is a Vertical Label Margin + which basically specifies some extra "air" in between the titles. The + amount of air is specified in percent of the title height. To set the + margin you use

+ GanttGraph:: +SetLabelVMarginFactor( +$aMargin) +

+

As an example let's set that margin in the previous example to 0 and + see what happens.

+
+
Figure 159: Setting the vertical label margin to 0% [src]  +

+

+

As you would perhaps expect the two bars just barely touches now + since there are no extra margin added. If the two bars hadn't had the + extra right marker it would have looked very compressed.

+

By default the vertical margin is set to 40%.

+

9.8 Formatting the scale headers

+

The scale headers allow you to view up to four different scales at + the same time. The four basic scales are:

+
    +
  • Day scale
  • +
  • Week scale
  • +
  • Month scale
  • +
  • Year scale
  • +
+

You can choose what scale to include and exclude by using the + SetScale() method. For example, for a detailed gantt you might choose + to display days and weeks by specifying

 $graph +->ShowHeaders +( GANTT_HWEEK  +| GANTT_DAY );

+

If you instead wanted "the big picture" it might be enough to show + year and months by specifying

+  $graph->ShowHeaders +GANTT_YEAR  +GANTT_MONTH ); +

+

You can choose freely the combination of scales that you want, but a + chart must at least have one scale of course.

+

Once you have decided what level of details you need you can then + fine tune the exact layout/formatting of each of the enabled scales as + described below.

+

These scale header are all accessed through the graph instance + variables 'scale' as in

+  $graph->scale-> +week

+

or

+ $graph->scale->day
+

+

. All these headers share the following properties.

+
    +
  • + Show() +
    +

    Determine if the scale should be shown or not

    +
  • +
  • + SetFont() +
    +

    Font for text in header

    +
  • +
  • + SetFontColor() +
    +

    Specify the color of the header text

    +
  • +
  • + SetStyle() +
    +

    Specify what date format should be used, for example in the week + scale it is possible to show either week number, the start date of the + week and so on.

    +
  • +
  • + SetBackgroundColor() +
    +

    As it says, the background color for the header

    +
  • +
  • + SetFrameWeight() +
    +

    The line weight of the box around the scale

    +
  • +
  • + SetFrameColor() +
    +

    The line color for the frame

    +
  • +
  • + SetTitleVertMargin() +
    +

    The margin, in percent, below and above the title text

    +
  • +
+

In addition to these methods each scale also has the property 'grid' + which determines the appearance of grid lines for that specific scale. + You may modify the appearance of grid lines by the "normal" line + methods, i.e. SetColor(),SetWeight() SetStyle() and Show(). So for + example to set the week grid line red you would use

+  $graph +->scale->week-> +grid->SetColor("red" +);

+

Each of the scales also have some specific formatting possibilities + as described below.

+

9.8.1 Minute scale

+

Minute scale is the lowest resolution you can use. It is often + convenient to use Minute scale with "GanttScale::SetINtervall()" since + by default the increment will be 1 minute. The style of minute scale + can be further adjusted by the use style parameters which can be + one of

+
    +
  1. "MINUTESTYLE_MM", This will display minutes as a two digit number + with a leading zero if necessary
  2. +
  3. "MINUTESTYLE_CUSTOM", This will let you specify you own custom + minute style by making a call to HeaderProperty:: SetFormatString() +
  4. +
+

Minute scale is enabled by adding the GANTT_HMIN in the + GanttGraph::ShowHeaders() call. For example as in

+  $graph +->ShowHeaders(GANTT_HDAY  +GANTT_HHOUR  +GANTT_HMIN); +

+

The code snippet below shows how to set up a minute scale with 30 + min interval and some custom colors.

+  $graph->scale-> +minute-> +SetIntervall( +30); +
$graph->scale-> +minute-> +SetBackgroundColor( +'lightyellow:1.5'); +
$graph->scale-> +minute-> +SetFont( +FF_FONT0); +
$graph->scale-> +minute-> +SetStyle( +MINUTESTYLE_MM); +
$graph->scale-> +minute->grid->SetColor +('lightgray');

+

+

9.8.2 Hour scale

+

The hour scale has more builtin formatting possibilities. The + following formatting options are available

+
    +
  1. "HOURSTYLE_HM24", Will display the only the hour in military time + 0-24 , for example 13:00
  2. +
  3. "HOURSTYLE_H24", Will display the hour with both hour and minute in + military time 0-24, for example 13
  4. +
  5. "HOURSTYLE_HMAMPM", Will display the hour and minutes with a + suitable am/pm postfix, for example 1:30pm
  6. +
  7. "HOURSTYLE_HAMPM", Will display only the hour with a suitable am/pm + postfix, for example 1pm
  8. +
  9. "HOURSTYLE_CUSTOM", Custom defined format as specified with a call + to HeaderProperty::SetFormatString()
  10. +
+

For hours it is possible to specify the interval in either of two + ways. With an integer, e.g. 6, or as time interval, e.g. "1:30" which + makes the interval one and a half hour. The only restriction is that + the interval must be even dividable for 24 hours since one day is the + smallest possible interval to show. This means that it is allowed to + use, for example 2,4,6,"1:30" or "0:45" as intervals but not 7, "2:45".

+

The code snippet below shows hot to set up a hour scale to with 45 + minutes interval and some custom colors

 $graph +->scale->hour-> +SetBackgroundColor( +'lightyellow:1.5'); +
$graph->scale-> +hour->SetFont(FF_FONT1 +); +
$graph->scale-> +hour->SetStyle(HOURSTYLE_HMAMPM); +
$graph->scale-> +hour-> +SetIntervall( +"0:45"); +

+

The example below shows a gantt chart with the day and hour scale + enabled

+
+
Figure 160: Using hour scale in the Gantt chart [src]  +

+

+

+

9.8.3 Day scale

+

By default the day scale show the first letter of the week day but + it is also posible to format the day scale in a number of different + ways. Days can have one of the following scale formats.

+
    +
  • DAYSTYLE_ONELETTER, On letter week day. Example "M"
  • +
  • DAYSTYLE_LONG, Full week day. Example "Monday"
  • +
  • DAYSTYLE_LONGDAYDATE1, Day with date. Example "Monday 23 Jun"
  • +
  • DAYSTYLE_LONGDAYDATE2, Day with date+year. Example "Monday 23 Jun + 2003"
  • +
  • DAYSTYLE_SHORT, Short date. Example "Mon"
  • +
  • DAYSTYLE_SHORTDAYDATE1, Short date+date. Example "Mon 23/6"
  • +
  • DAYSTYLE_SHORTDAYDATE2, Short date+date. Example "Mon 23 Jun"
  • +
  • DAYSTYLE_SHORTDAYDATE3,Short date+date. Example "Mon 23"
  • +
  • DAYSTYLE_SHORTDATE1, Short date. Example "23/6"
  • +
  • DAYSTYLE_SHORTDATE2, Short date. Example "23 Jun"
  • +
  • DAYSTYLE_SHORTDATE3, Short date. Example "Mon 23"
  • +
  • DAYSTYLE_SHORTDATE4, Short date. Example "23"
  • +
  • DAYSTYLE_CUSTOM, Custom specified formatting string. Example "M"
  • +
+

The formatting is specified by using the SetStyle() method as in

+  $graph +->scale->day-> +SetStyle( +DAYSTYLE_LONG); +

+

The graphical formatting possibilities for days allow the + possibility to specify a different color for the weekend background and + also for the Sunday.

+
    +
  • + SetWeekendColor() +
    +

    Set the background color for weekends. (Defaults to light gray)

    +
  • +
  • + SetSundayFontColor() +
    +

    The Sunday font color. (Defaults to red)

    +
  • +
+

In addition to this there is also a possibility to choose whether or + not the weekend background should be extended vertically down over the + plot area. (the default). Since that is a property more of the whole + plot this behavior is modified with a call to the method

+  UseWeekendBackground()
+

+

of the scale, e.g. +
 

+ $graph->scale->UseWeekendBackground(false +);

+

+

9.8.4 Week scale

+

Week scales, if enabled, by default shows the week number in range 1 + to 53 (as defined by ISO-8601, see the reference section).

+

It might be worth pointing out here that the week number calculation + is carried out within JpGraph and does not rely on the underlying OS + date libraries. This makes the behavior consistent over several OS:s + (at least M$ Windows does not comply to ISO-8601 or supply any + way of doing this through the normal libraries, e.g. strftime())

+

You may modify the week behavior in three ways. You can specify + (with SetStyle()) a different date format using the constants

+
    +
  • + WEEKSTYLE_WNBR
    +

    Show week number To further modify the formatting of the actual week + number you can optionally supply a format string with a call to

    +  SetLabelFormatString()
    +

    +

    The format of the string should be a standard sprintf() syntax + expecting an integer (the week number). By default a 'W' is prefixed to + the number.

    +
  • +
  • + WEEKSTYLE_FIRSTDAY
    +

    Show date of first day in week.

    +
  • +
  • + WEEKSTYLE_FIRSTDAY2
    +

    Show date of first day in week and short month

    +
  • +
  • + WEEKSTYLE_FIRSTDAYWNBR
    +

    Show weeknumber of first day in week.

    +
  • +
  • + WEEKSTYLE_FIRSTDAY2WNBR
    +

    Show weeknumber of first day in week and month

    +
  • +
+

+

9.8.5 Month scale

+

For month scale you can use the SetStyle() method to choose between + a variety of formats.

+
    +
  • + MONTHSTYLE_SHORTNAME
    +

    Display the month name in its locale specific short form, i.e Jan, + Feb etc

    +
  • +
  • + MONTHSTYLE_SHORTNAMEYEAR2
    +

    Display the month name in its locale specific short form together + with a 2 digit year , i.e Jan '01, Feb '01 etc

    +
  • +
  • + MONTHSTYLE_SHORTNAMEYEAR4
    +

    Display the month name in its locale specific short form together + with a 4 digit year , i.e Jan 2001, Feb 2001 etc

    +
  • +
  • + MONTHSTYLE_LONGNAME
    +

    Display the month name in its locale specific long name, i.e. + January, February

    +
  • +
  • + MONTHSTYLE_LONGNAMEYEAR2
    +

    Display the month name in its locale specific long name together with + a 2 digit year , i.e January '01, February '01 etc

    +
  • +
  • + MONTHSTYLE_LONGNAMEYEAR4
    +

    Display the month name in its locale specific long name together with + a 4 digit year , i.e January 2001, February 2001 etc

    +
  • +
  • + MONTHSTYLE_FIRSTLETTER
    +

    The first letter of the month name

    +
  • +
+

+

9.8.6 Year scale

+

Year scale has no extra formatting possibilities.

+

9.9 More formatting for bars

+

This section shows some further modification you might do to + activity bars.

+

9.9.1 Adding caption to bars

+

Caption for bars are placed at the far right side of the bars. They + can for example be used to indicate the resources assigned to a task, + the duration of the task or the progress of the activity.

+

Caption text for a bar is specified either when creating a bar or + later by accessing the 'caption' property of bars. So the two lines

+  $activity = new GanttBar +(0,"Activity 1", +"2001-11-21", +"2001-12-20", +"[BS,ER]") +

+

and

+ $activity-> +caption->Set("[BS,ER]" +);

+

are both ways of specifying the caption "[BS,ER]" for the activity. + Since activity is a standard JpGraph text object you can easily modify + font, color and size with calls to SetFont() and SetColor(), (e.g.

+  $activity->caption +->SetFont(FF_ARIAL, +FF_BOLD,9);
+

+

+

The figure below illustrates the use of caption

+
+
Figure 161: Illustration of the use of captions [src]  +

+

+

+

9.9.2 Adding progress indicators to bars

+

To indicate the progress of a specific activity it is also possible + to add a progress indicator to each bar. This progress indicator + consists of a smaller bar within the bar. By default this progress bar + is black and 70% of the height of the bar. These parameter can (of + course) all be changed.

+

The properties for the progress indicator are accessed through the + 'progress' property and it's methods.

+

To set the progress for a specific activity you only specify the + percent as a fraction. As in

+  $activity->progress-> +Set(0.4)
+

+

In Figure 162 the previous example is modified to indicate the + progress of each activity by the default progress indicator. A solid + bar. To make it clearer we have also modified the caption to reflect + the displayed progress. (At the same time we also modified the scale + headers just to illustrate some more formatting options).

+
+
Figure 162: Adding progress indicators. [src]  +

+

+

To specify a different format for the progress you use the + SetPattern() method as in

+  $activity->progress-> +SetPattern( +BAND_RDIAG, +"blue"); +

+

In the reference section you can see the exact parameters and all + available methods.

+
+
Figure 163: Changing the style of the progress indicators. [src]  +

+

+

+

9.10 Grouping activities

+

It is common to group activities. We have used this feature in the + examples of constrains. There is no special type for activity bars that + are used to illustrate grouping. The common way of illustrating this + (as have been used above) is to add "half" a triangle marker at both + ends of the bar. The special provision that JpGraph does is that if you + add a left or right marker of type MARK_LEFTTRIANGLE or + MARK_RIGHTTRIANGLE those triangles will be drawn under the bars to give + the effect as show in the examples above. In the example above we also + have made the grouping bars have slightly less heigh since the end + triangles will visually "grow" the bar.

+

So to get the effect we want for a group bar we have to use the two + lines:

+ $groupbar-> +leftMark-> +SetType( +"MARK_LEFTTRIANGLE"); +
$groupbar +->rightMark->SetType( +"MARK_RIGHTTRIANGLE") +

+

+

As of the current version There is not yet any formatting support to + accomplish the effect of indentation for the titles so this is + accomplished by using a fixed width font and adding spaces in front of + the title.

+

9.11 Using multiple columns as titles

+

It is often of interest not only to show one title for a gantt bar + but often one wants to show, title, start date, end date, duration or + effort and so on. Up until now we have, to keep things simple only + shown a single title for each activity. We will now show you how you + can specify an arbitrary number of columns as titles for a Gantt chart + as well as adding icons in the graph columns.

+

First out is an example to help visualize what we will achieve

+
+
Figure 164: A Gantt chart with multiple columns [src]  +

+

+

To use multiple columns there is two steps. First you need to set + the titles (name, color, fonts etc). Thereafter you need to add the + title columns for each individual bar.

+

To set the columns you will have to work with the Activity + information property of the scale. The following code excerpt show + this

+ $graph->scale->actinfo +->SetColTitles +( +
    array(
'Note' +,'Task','Duration', +'Start', +'Finish'),array( +30,100));
+

+

You will notice two things. We fist specify the titles using an + array. We have also specified a second array with the numbers 30 and + 100. This is an optional array that specifies the minimum width of, in + this case, the first two columns. By default the columns will be wide + enough to hold the widest text string in the column. However for + esthetic reasons you might sometimes want to increase the minium width. + This is what we have done here for the first two columns.

+

Furthermore you can also adjust the background colors and the style + and colors of the vertical dividing grid lines. In the previous image + we used the lines

 $graph-> +scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +
$graph->scale-> +actinfo-> +SetFont( +FF_ARIAL, +FS_NORMAL,10); +
$graph->scale-> +actinfo->vgrid->SetStyle +('solid'); +
$graph->scale-> +actinfo->vgrid->SetColor +('gray');

+

The style for the grid lines can also be "dashed", "dotted" or + "longdashed" as in other line formatting contexts within the library. + You can also adjust if you would like the small "3D" effect in the + titles. By default this is enabled. You can easily turn this of with a + call to

+ $graph->scale->actinfo +->SetStyle(ACTINFO_2D); +

+

To adjust the colors of the vertical dividing lines in the title the + method SetColor() is used as in + "$graph->scale->actinfo->SetColor('navy');".

+

The second thins is to actually populate the columns. This is done + (of course) as you add the activity bars to the graph. Previous we just + used a string as the title when we wasn't using columns. By simply + replacing this string with an array we specify the content of the + columns.

+

For example to specify two column titles we just create a + hypothetical Gantt bar as In the full example above we put all this in + arrays to make for better coding practice since we create several bars.

+

In addition to ordinary text you can also add an image or any of the + predefined icons available. In order to add that in a column you first + create an instance of IconImage() and then specify that instance + instead of the text. So in the previous code snippet if we wanted a + "open folder" image in the first column we would change the lines to

+ $iconopen = new  +IconImage( +GICON_FOLDEROPEN, +0.6); +
$title2=""; +
$bar  += new GanttBar +(0,array($iconopen, +$title2), +"2003-11-23", +"2003-12-05"); +

+

The available builtin icons are

+
    +
  • GICON_WARNINGRED
  • +
  • GICON_TEXT
  • +
  • GICON_ENDCONS
  • +
  • GICON_MAIL
  • +
  • GICON_STARTCONS
  • +
  • GICON_CALC
  • +
  • GICON_MAGNIFIER
  • +
  • GICON_LOCK
  • +
  • GICON_STOP
  • +
  • GICON_WARNINGYELLOW
  • +
  • GICON_FOLDEROPEN
  • +
  • GICON_FOLDER
  • +
  • GICON_TEXTIMPORTANT
  • +
+

In addition you can also use any of you own images if you specify + the argument as a string, for example

+  $myicon IconImage( +'myicon.png'); +

+

If you wonder, the second argument in the IconImage() call is + an optional scaling factor which you can use to adjust the size of the + image.

+

9.11.1 Adding a title for the columns

+

Precisely as before you can also have a title spanning all the + columns. This title is specified with the property tableTitle of + the scale. Specifying a table title will automatically adjust the + height of the column titles to fit the table title. The small code + snippet below shows how to add a title.

 $graph +->scale->tableTitle-> +Set('Phase 1'); +
$graph->scale-> +tableTitle-> +SetFont( +FF_ARIAL, +FS_NORMAL,12); +
$graph->scale-> +SetTableTitleBackground( +'darkgreen@0.6'); +
$graph->scale-> +tableTitle-> +Show(true);
+

+

A full example of this is shown below

+
+
Figure 165: Adding a column titles stratching all title + columns. +[src]  +

+

+

+

9.11.2 Specifying CSIM entries for column titles +

+

In exactly the same way as for a single title it is possible to + specify individual CSIM targets for each of the title columns. This is + accomplished by specifying an array for both the target and the alt + text instead of a single string as arguments for SetCSIMTarget() + The following code snippet shows how to specify that.

+  $bar +->title->SetCSIMTarget(array('sometarget1.html','sometarget1.html'), +
array(
'alttext1' +,'alttext2'));

+

+

9.12 More general Gantt formatting

+

In this section we will show a few more way by which you may + customize the gantt chart itself. This includes

+
    +
  • Adding a table title (not to be confused with the graph title)
  • +
  • Adjusting appearance of the various lines in the bar chart
  • +
+

+

9.12.1 Adding a table title

+

The (default) white area in the top left of the gantt table may have + a title. This is accessed by the 'tableTitle' property of the gantt + scale. Using this is straightforward as the following lines show.

+  $graph +->scale->tableTitle-> +Set( +"(Rev: 1.22)"); +
$graph->scale-> +tableTitle-> +SetFont( +FF_FONT1, +FS_BOLD); +
$graph->scale-> +SetTableTitleBackground( +"silver"); +
$graph->scale-> +tableTitle-> +Show();
+

+

The example lines above also changes the default white background to + silver. Adding these lines to the previous example gives the following + result:

+
+
Figure 166: Adding a table title. [src]  +

+

+

From the above example you might notice that the width of the left + column (which holds all the titles) have automatically adjusted itself + to make the table title fit.

+

9.12.2 Modifying the divider lines

+

The vertical and horizontal lines between the titles and the bars + can be modified by accessing the 'divider' and 'dividerh' properties of + the scale. Again, this is straightforward as the following example + shows:

+ $graph->scale->divider +->SetWeight(3); +
$graph->scale-> +divider-> +SetColor( +"navy"); +
$graph->scale-> +dividerh-> +SetWeight(3); +
$graph->scale-> +dividerh-> +SetColor( +"navy"); +

+

The effect of this is shown in Figure 167 below

+
+
Figure 167: Modifying the dividing line [src]  +

+

+

+

9.12.3 Modifying the box around the plot

+

In a similar manner to the other plots in JpGraph you modify the Box + round the plot with the standard graph method 'SetBox()' as in

+  $graph +->SetBox(true, +"navy",3)
+

+

which will result in a thicker plot box around the area as shown + below

+
+
Figure 168: Modifying the box around the plotarea [src]  +

+

+

Note: You might notice the slight + discrepancy in design that here you use a method and in the previous + cases accessed a property which you modified. This is the unfortunate + affect of the evolving design and development of this library once it + was realised that the original design could be improved upon.

+

9.12.4 Horizontal grids and alternating line colors +

+

In order to make large charts easier to read it is possible to + specify alternating an horizontal grid and optional alternating line + colors in the background for Gantt charts. The horizontal grid is + accessed through the Graph::hgrid property and the line (used in + the grid) is accessed through the Graph::hgrid::line + sub-property

+

In order to specify the alternating line colors the + SetRowFillColor() method is used. For example, to use alternating + blue background with blue grid line the following lines would have to + be added to the graph script

+   +// Setup a horizontal grid +
$graph->hgrid-> +Show(); +
$graph->hgrid-> +line->SetColor('lightblue' +); +
$graph->hgrid-> +SetRowFillColor( +'darkblue@0.9'); +

+

Below is an example of a Gantt graph using this formatting

+
+
Figure 169: Adding a horizontal grid to the graph [src]  +

+

+

+

9.12.5 Adding icons to Gantt graphs

+ As is illustrated in the image above it is also possible (just like for + normal Graph) to add small images (or icons) to a Gantt graph by + creating an IconPlot() instance and then adding it to the graph. In the + image above the following lines were used to add the small image of + "tux" in the left lower corner
+  $icon = new IconPlot( +'penguin.png', +0.01,0.95,1 +,15); +
$icon->SetAnchor( +'left', +'bottom'); +
$graph->Add( +$icon);
+
+

+

9.12.6 Adjusting the margins with auto-sizing

+ As of version 1.17 it is possible to use Graph::SetMargin() to specify + the margin for a Gantt graph even when the vertical height is + determined automatically. For example to generate a graph with no left, + right or bottom margin the following lines would be needed
+  $graph  += new GanttGraph +(500); +
$graph->SetMargin( +0,0,30 +,0);
+

+

9.13 Simplifying the drawing of Gantt graphs

+

As we have shown in the previous examples constructing a Gantt chart + consists of a number of repetitive tasks; Create the individual + activity bars and add them to the graph.

+

Now when you have a basic understanding of how this works you are + ready to appreciate a small helper method. +GanttGraph::CreateSimple(). This method takes a few arrays of data + which specifies you Gantt chart and then constructs this chart. By + using this method you sacrifices a few adjustment possibilities for + simplicity. This method is nothing magical it just takes the data for + the activities,(start and end date, titles, progress, any constrains + and so on) and constructs the activities and adds them to the graph.

+

The activities are specified in data array which for each activity + have the following fields

+
    +
  • What row the activity should be on
  • +
  • Activity type, controls the appearance. Can be one of +
      +
    1. ACTYPE_NORMAL, A standard activty bar
    2. +
    3. ACTYPE_GROUP, A Grouping bar
    4. +
    5. ACTYPE_MILESTONE, A milestone
    6. +
    7. +
    +

    +
  • +
  • Title text
  • +
  • Start date
  • +
  • End date (NOT FOR Milestones!)
  • +
  • Caption
  • +
+

+

So for example to create a Gantt chart consisting of two activities + which are grouped and a milestone one would have to use something + similar to the following code

+

+ $data = array( +
  array(
0,ACTYPE_GROUP,    "Phase 1",        "2001-10-26", +"2001-11-23", +""), +
  array(
1,ACTYPE_NORMAL,   "  Label 2",      "2001-10-26", +"2001-11-13", +"[KJ]"), +
  array(
2,ACTYPE_NORMAL,   "  Label 3",      "2001-11-20", +"2001-11-22", +"[EP]"), +
  array(
3,ACTYPE_MILESTONE,"  Phase 1 Done""2001-11-23", +"M2") ); +
+
// Create the basic graph +
$graph  += new GanttGraph +(); +
$graph->title-> +Set( +"Gantt Graph using CreateSimple()"); +
+
// Setup scale +
$graph->ShowHeaders( +GANTT_HYEAR  +GANTT_HMONTH  +GANTT_HDAY  +GANTT_HWEEK); +
$graph->scale-> +week->SetStyle(WEEKSTYLE_FIRSTDAY); +
+
// Add the specified activities +
$graph->CreateSimple( +$data); +
+
// .. and stroke the graph +
$graph->Stroke(); +

+

This will then show up as

+
+
Figure 170: Using the simplified way via CreateSimple() + method +[src]  +

+

+

You may (slightly) modify the appearance of the simple Gantt charts + by means of the methods GanttGraph::SetSimpleFont() and GanttGraph::SetSimpleStyle() But not anything else, remember + that the purpose with this way of constructing graphs is to be simple. + If you need full advanced control you have to construct all the + activities in the "normal" way.

+

You can also specify constrains and progress for each bar by + supplying additional data arrays to GanttGraph::CreateSimple().

+

9.14 Adding CSIM (Client side Image Maps) to Gantt + charts

+

Gantt charts can have independent (different targets) hot spots in + both the activities and in the associated labels for each activity.

+

You specify the target and the associated "Alt" text for an activity + bar by calling the + GanttBar::SetCSIMTarget() and + GanttBar::SetCSIMAlt()

+

In a similar way you set the target and Alt texts for the activity + title as the following code extract shows.

 $bar +->SetCSIMTarget +("http://localhost/abc/" +); +
$bar->SetCSIMAlt( +"Alt Text for the bar"); +
$bar->title-> +SetCSIMTarget( +"http://localhost/abc"); +
$bar->title-> +SetCSIMAlt( +"Alt Text for the title"); +

+

The above code assumes that your activity is available in the + variable 'bar'. In the example directory there is a complete example of + how to use CSIM together with Gantt charts in the "ganttcsimex1.php" + file. (Please note that this example makes use of the simplified Gantt + chart specification using the CreateSimple() method.

+

9.15 Adding constrains between your activities

+

With Gantt charts there is often the need to illustrate constrains + between one or several activities. One of the most common constrain is + that on activity can't start before an other activity finish.

+

JpGraph support visualizing the following types of constrains

+
    +
  • Start to End
  • +
  • Start to Start
  • +
  • End to Start
  • +
  • End to End
  • +
+

An example will clarify how to specify a constrain between two + activities.

+

Assume that we start with the Gantt schema as illustrated below

+
+
Figure 171: The original Gantt schema we wich to add + constrains to +[src]  +

+

+

We would now like to add the constrains that the activity "Label 3" + cant start before activity "Label 2" has finished and that the + milestone "Phase 1 done" is depending on when activity "Label 3" is + done.

+

The principle of adding constrains is that you for each activity you + want to have a constrain you have to tell to what other activity this + constrain should be to. That other activity is specified by telling on + what row that activity lies. Depending on what type of constrain, e.g. + Start-to-End, an arrow will now connect the two activities in correct + way.

+

The way to do this is to call the + SetConstrain() method on the activity. In this method you specify + the type of constrain as well as to what other activity this constrain + should be to. If you read the class reference you can also see that you + can specify the type and size of arrow used. For now we will just use + the default sizes and type.

+

So for example to add an End-To-Start constrain between "Label 2" + and "Label 3" you could write

+  $bar2-> +SetConstrain(2,CONSTRAIN_ENDSTART)
+

+

The first parameter in the call above "2" is the row of the target + activity (i.e. the row where "Label 3") activity is. In the example + below we have added the constrains we wanted.

+
+
Figure 172: Adding constrains to a gantt chart [src]  +

+

+

A note: The actual path followed by the arrow is controlled by some + heuristics to make it clear what the constrain is. It has been a design + decision that in order to keep the API simple the user has no further + detailed controlled on the actual path followed. However, in future + version the heuristics may be extended and provide some + user-controllable parameters.

+

9.16 Advanced formatting

+

+

9.16.1 Showing only part of the graph

+

You can choose to only display a vertical slice of the overall Gantt + chart by explicitly specifying a date range with the method + GanttGraph::SetDateRange(). This will cap any bars to only be displayed + in between the start and end date given as parameters. For example + specifying

+ $graph-> +SetDateRange( +"2001-12-20", +"2002-01-20"); +

+

will show the part of the Gantt chart between the 20 Dec 2001 and 20 + of January 2002. Please note that the format depends on the locale + setting.

+

9.16.2 Specifying start day of week

+

You can set the week start day with a call to + GanttScale::SetWeekStart(). This method takes an integer [0,6] as input + which represents the start day of the week, 0 means Sunday, 1 Monday, 2 + Tuesday and so on. The default is to start the week on Monday.

+

9.17 Localizing

+

Depending on your installation of PHP you might have support for + several locales. By default the locale is set up to use the default + locale on the server.

+

To specifically set a locale you specify the wanted locale with a + locale string (ala standard PHP), for example American English is + specified with the string 'EN_US', British English with 'EN_UK' 'nl_NL' + for Dutch and so on. If your current installation does not support the + specified locale an error message will be given.

+  $graph +->scale->SetDateLocale( +"se_SE"); +

+

The result is displayed below.

+
+
Figure 173: Using swedish locale. (Can you spot the + difference from English?) +[src]  +

+

+

+

9.18 Anti-aliasing in JpGraph

+

From version 1.2 JpGraph supports drawing of anti-aliased lines. + There are a few caveats in order to use this which is discussed in this + section.

+

Note: Note that anti-aliasing will not be + used for either horizontal, vertical or 45 degree lines since they are + by their nature are sampled at adequate rate.

+

9.18.1 Enabling anti-aliased lines

+

Anti-aliased lines are enabled by calling the method + SetAntiAliasing() in the + Image class in the script where you want to use anti-aliasing.

+

The anti-aliasing for lines works by "smoothing" out the edges on + the line by using a progressive scale of colors interpolated between + the background color and the line color.

+

Note: The algorithm used for anti-aliasing + of lines is quite simple. It would be possible to achieve even better + result by doing some real 2D signal processing. However, doing real + time 2D signal processing on a HTTP server would be foolish so the + design is deliberately kept simple. To achieve best visual result + always use a dark line color on a light background.

+

An example will show that this, quite simple algorithm, gives a + reasonable good result. The figures below shows a radar plot with and + without anti-aliasing.

+

+
+
Figure 174: Spiderplot without anti-aliasing [src]  +

+

+

+

+
+
Figure 175: Spiderplot with anti-aliasing [src]  +

+

+

+

One thing you need to keep in mind when deciding to use + anti-aliasing is that it could have potentially a dramatic effect on + the time it takes to generate the image. Line drawing with + anti-aliasing turned on is roughly 8 times slower than the normal line + drawing so treat this feature wisely.

+

Furthermore there are a couple of "gotchas" you should be aware of + when using anti-aliasing.

+
    +
  1. Anti-aliased lines uses up more of the available color-palette. The + exact number of colors used is dependent on the line-angle, a near + horizontal or near vertical line uses more colors (number of lines with + different angles uses more colors). Hence it might not be possible to + use anti-aliasing with color-gradient fill since the number of + available colors in the palette might not be enough. A normal palette + can keep around 256 colors. This means that you are advised to use a + true-color image when using anti-aliasing.
  2. +
  3. Anti-aliasing does not work very well together with background + images since it assumes a the same solid color on each side of the + line. Doing a more advanced anti-aliasing algorithm would simple take + to much processing power.
  4. +
  5. Anti-aliased lines will ignore the line width specified. They will + always have a width of roughly 1.
  6. +
+

+

9.19 Rotating the graphs

+

JpGraph provide the possibility for you to rotate the generated + graph an arbitrary angle. This will only affect the actual graph (axis, + axis titles, labels and so on) and not fixed elements on the graph like + title or footer.

+

Rotation is probably most used to rotate a graph 90 degrees, for + example a bar graph to get the effect of horizontal bars.

+

+
+

Performance note: Adding a rotation transformation + will make the graph generation slightly slower since each point of the + graph as to go through a transformation step before being stroked on to + the image. JpGraph optimizes this by using a pre-calculated + transformation matric and also optimizes the special case 90 degrees.

+
+
+

By default the center of the rotation will be the center of the plot + area, which may or may not coincide with the center of the entire + image.

+

To control the rotation you use the two methods

+ +

For example

+ $graph->image->SetAngle +(45);

+

+

There is actually a third method that you could use, adding a + translation to the graph after the rotation. Since + this probably a very little used method we don't discuss it further but + refer the reader to the class reference instead + Graph:image::SetTranslation()

+

When you rotate an image you should be aware of that the individual + labels on the axis are not rotated. The design decision behind this is +
a) Bit mapped font can't be rotated +
b) Maintain readability

+

Please remember that you may still rotate the labels by calling the Axis::SetLabelAngle() + method.

+

Since the anchor point for labels is by default the optimum for + graph at 0 degree you might want to adjust the anchor point and + alignment for the labels on the axis to get a better visual appearance + on you rotated graph. This is accomplished by the method + Axis::SetLabelAlign() For a detailed discussion on how to do this + please see the section on horizontal bar graphs, ( +Working with bar plots )

+

The table below shows some examples on different kinds of rotation + to give you an idea of how changing the angle and rotation center may + be used to generate different effects. The top left graph is the + original image. The point of rotation has been marked with a red-cross + in each of the images.

+

+
+
Figure 176: Original image [src]  +

+

+

+
+
Figure 177: Rotated 45 degrees around center of plot area [src]  +

+

+

+
+
Figure 178: Rotated 90 degrees around center of plot area [src]  +

+

+

+
+
Figure 179: Rotated 45 degrees around center of the image [src]  +

+

+

+
+
Figure 180: Rotated 90 degrees around center of the image [src]  +

+

+

+
+
Figure 181: Rotated -30 degrees around the lower left point + of the plot area +[src]  +

+

+

+

As you can see from the images above if you rotate about any other + point than the center of the plot area the plot can be placed outside + the image after rotation.

+

Since the rotation, by design, only affects the plot area it is + often most effective to use when the color of the margin is the same as + the background color.

+

9.20 Adjusting brightness and contrast for images and + backgrounds

+

The following section only applies to palette images. This + means it wont work on true-color images.

+

It is often desirable to have a background image look a little bit + "washed" out so it doesn't take the concentration away from the actual + graph. There are basically two ways of accomplish this

+
    +
  1. Prepare the image with an external images editor to adjust the + level of brightness and contrasty to a desirable level
  2. +
  3. Use JpGraph:s built in adjustment for contrast, brightness and + color saturation.
  4. +
+

To adjust the background image call The levels for both brightness + and contrast are real numbers in the range [-1, 1] You can choose to + adjust for example just the background image or you might also choose + to adjust the whole image. To change the background image just use the + method + Graph::AdjBackgroundImage() to specify a suitable value. Let's show + some example on what we can do with this. The following example have + been generated by using the small utility "adjimg.php" which you can + find in the "utils/" directory.

+

+
Brightness=0, contrast=0, saturation = -1 (Original image)

+

+
Brightness=0, contrast=0, saturation = -1 (Black & White image)

+

+
Brightness=0.3, contrast=-0.3, saturation=0

+

+
Brightness=0.4, contrast=-0.7, saturation=0

+

+
Brightness=0.4, contrast=-0.7, saturation=-1

+

+
Brightness=0, contrast=0, saturation=1

+

9.21 Timing the generation of graphs

+

During development and optimization it can be very handy to have the + actual time it took to generate the image as a footnote. The following + example shows the usage of this feature

+
+
Figure 182: Timing of a graph [src]  +

+

+

To enable this feature you can proceed in two ways.

+
    +
  1. You can either set the global define BRAND_TIMING (in jpgraph.php) + to true. This will add the timing string to all graphs generated.
  2. +
  3. .. or you can enable it for a specific graph by setting the global + variable $gJpgBrandTiming as in
    +  $gJpgBrandTiming=true; +
    +

    in the beginning of the script.

    +
  4. +
+

If you like you might also change the way the timing is formatted by + setting the string defined by BRAND_TIMING_FORMAT (in jpgraph.php). + This string represents a standard printf() format string.

+Note: JpGraph contains a utility class called JpgTimer which you + can use yourself should you need ms timing of part of your own code. + The API is really simple. The class supports multiple running timers + and you start a timer simply by calling the Push() method. This will + start a new timer and put it on the top of the timer stack. To stop the + timer, pop it from the stack and return the timing value simply call + Pop().

+

9.22 Using country flags in various context

+

JpGraph has built-in support for over 200 country flags, i.e. they + are available to be used in graphs without any external image + definitions.

+

Country flags can be used in primarily two settings

+
    +
  1. As image markers in line and scatter graphs
  2. +
  3. As background images for graphs
  4. +
  5. As a special type of icons (using the IconPlot()) which can be + added to the graph in any arbitrary position. See next section
  6. +
+

In order to make it easy to find the appropriate country flags they + can be specified with either full or partial name or as an numeric + index. The routines in JpGraph are "smart" enough to figure out which + way you are trying to specify a particular flag.

+

To specify a country flag as a marker you have to specify the + special mark type as one of MARK_FLAG1,MARK_FLAG2,MARK_FLAG3 or + MARK_FLAG4

+

Flags are internally stored in 4 different sizes which is indicated + by the number in the mark types. Flags may also be arbitrary scaled + when displayed. Since this is partially overlapping functionality you + might very well ask why the flags are stored in four different basic + sizes. The reason is of course performance. It you only want a very + small flag it takes processing time to scale down a large image to, + say, a small icon size. At the same time for large flags to be used as + background a small original flag might not have enough details to be + scaled up to a large size. Hence the reason for storing the flags in 4 + different sizes.

+

The example below shows how to use country flags as markers

+
+
Figure 183: Using country flags as line plot markers [src]  +

+

+

To use country flags as background one has to use the method + Graph::SetBackgroundCountryFlag(). With this method you can specify + both how much of the image should be filled as well as how much of the + flag should be mixed into the background.

+

To see a list of all supported country flags you can run the script + "listallcountryflags.php" in the Example directory. This will show you + a table with all flags.

+

9.23 Adding icons onto the graph

+

In addition to the standard background image you can also add an + arbitrary number of icons onto the background of the graph. These icons + are created with a call to the special Plot class IconPlot.

+

The image from icons are taken from a file or as one of the builtin + country flags.

+

You may control how much of the icon should be blended into the + background by specifying a percentage (1-100). The example below shows + how to mix in the picture of "Tux" into the background of a filled line + graph. Note: This example uses alpha blending and will therefore + require GD2.

+
+
Figure 184: Adding an icon into the background [src]  +

+

+

To specify any of the roughly 200 country flags as an icon you first + create an empty Icon and then call the IconPlot::SetCountryFlag() with + the appropriate parameters. (See the class reference). This is + illustrated below by adding the Icelandic flag into the background as + an icon

+
+
Figure 185: Adding an icon flag into the background [src]  +

+

+

Note: Some older versions of PHP pre-4.3.3 + using the builtin GD have problems rendering blended images. If you + have this problem then you need to upgrade to a more recent version of + PHP.

+

10 Working with canvas graphs

+

Canvas graphing is an advanced feature that comes in handy where you + need to draw some more arbitrary graphics. To give you a flavor of what + you can do the following example shows an architecture overview of + JpGraph which was drawn using a canvas.

+
+
Figure 186: Example of what you can draw on a canvas [src]  +

+

+

Working with canvas requires more understanding of JpGraph as well + as more programming and fine tuning.

+

10.1 Introduction

+

Canvas graph is really not a graph. It a blank sheet of paper which + you can use to draw arbitrary shapes and still have access to some of + the convenient features of JpGraph.

+

You can work with a canvas in different levels of complexity. You + can for example work directly with the Image class which provides a + large number of primitives for drawing but requires that you use + absolute pixel coordinates.

+

You can also make life a little bit easier by using a canvas scale. + This lets you define your own scale on the canvas which often makes it + easier by letting you work on a grid you have specified yourself. It + also makes it very easy to re-scale you image automatically by just + changing your scale. For example to half the size of you drawing you + just make the scale twice as large.

+

To give you some help in working with different canvas you should + include the "jpgraph_canvtools.php" file when working on canvases. This + is not strictly necessary but it will give you some nice abstraction to + help you create your masterpieces.

+

As another (concrete) example on the use of a canvas the figure + below is a listing of font styles available with JpGraph.

+
+
Figure 187: Another example of using a canvas to draw a + number of text boxes +[src]  +

+

+

+

10.2 Creating a simple canvas

+

In order to create a canvas graph you need to include the file + "jpgraph_canvas.php" in addition to the standard "jpgraph.php" file. + You might also want to include the "jpgraph_canvtools.php" to get + access to some supporting classes that may (or not) come in handy.

+

Creating a canvas gives you the opportunity draw arbitrary shapes on + a "white" piece of paper. Let's first show a simple example were we + just draw a text box. We first show you the code which we will walk + through

(File: canvasex01.php) +
<?php +
+// $Id: canvasex01.php,v 1.3 2002/10/23 08:17:23 aditus Exp $ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
+
// Setup a basic canvas we can work  +
$g = new CanvasGraph( +400,300,'auto' +); +
$g->SetMargin( +5,11,6 +,11); +
$g->SetShadow(); +
$g->SetMarginColor( +"teal"); +
+
+// We need to stroke the plotarea and margin before we add the +
// text since we otherwise would overwrite the text. +
$g->InitFrame(); +
+
// Draw a text box in the middle +
$txt="This\nis\na TEXT!!!"; +
$t = new Text( +$txt,200,10 +); +
$t->SetFont( +FF_ARIAL, +FS_BOLD,40); +
+
+// How should the text box interpret the coordinates? +
$t->Align( +'center','top'); +
+
// How should the paragraph be aligned? +
$t->ParagraphAlign( +'center'); +
+
+// Add a box around the text, white fill, black border and gray shadow +
$t->SetBox( +"white", +"black","gray"); +
+
// Stroke the text +
$t->Stroke( +$g->img); +
+
// Stroke the graph +
$g->Stroke(); +
+
?> +
+

+

The example above starts by creating a (400x200) sized image. We set + the margins to get a nice frame around the image. For canvases the + margins has no effect in the way you enter coordinates. Top left is + (0,0) and bottom right (including any potential margin and shadow) is + the maximum. In this case the coordinates are X:0-399, and Y:0-199

+

We then call the + InitFrame() method which actually strokes the margin and plotarea + to the graph. Since everything is stroked in the order you issue the + commands you must make sure that the graphical objects you want on top + is stroked last. This is different from the way you normally work with + JpGraph since it queues up all you addition and then makes sure they + are stroked in the correct order.

+

We then create a Text object, + setup it's properties, including the absolute screen position where we + want the text, and then stroke it. Her it might be a need for a closer + explanation of the, perhaps misnamed, method +Text::Align() This method states how the text coordinates + should be interpreted , i.e when we specify (200,10) as the + coordinates for the text paragraph should that be interpreted as the + top left corner, bottom-left corner or something else (of the bounding + box)? In the code above we have chosen to interpret the X-coordinate as + being the center of the bounding box and the Y-coordinate as the top. + Hence the text will be aligned so that the (200,100) point in the graph + is aligned with the middle of the top line of the paragraphs bounding + box.

+

We also specify that the lines within the paragraph should be + centered with a call to + Text::ParagraphAlign() Since we also choose to have a box around + the text we have to make use of the method + Text::SetBox() which is used to specify the fill color, the border + color and the shadow color (if you leave out shadow color or set it to + '', no shadow will be used).

+

Now we are ready to stroke the text onto the canvas. In order to do + so we must specify the basic Image drawing class we want to use. + Without discussing this further we just state that a suitable image + class can always be found as the img property of the + Graph class.

+

Finally we are ready to stroke the entire graph, which in effect + sends the canvas back to the browser. Below you can see the effect of + all this code

+

+
+
Figure 188: A simple canvas drawing with a text box in the + middle [src] +  +

+

+

+

10.3 Adding lines and rectangles to a canvas

+

A canvas also makes a good background for using standard graphic + primitives, for example circles and lines. What you first have to + remember is that you are (so far) working with absolute screen + coordinates and secondly all drawing primitives are found in the + Image Class accessible as a property of the Graph class. So for + example to draw a line between coordinate (0,0) and (100,100) you would + have to add the line

+  $graph->img-> +Line(0,0 +,100,100); +

+

+

To your code. The following example shows some of the graphic + primitives you have access to in the Image class

+(File: canvasex02.php) +
<?php +
+// $Id: canvasex02.php,v 1.1 2002/08/27 20:08:57 aditus Exp $ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
+
// Setup a basic canvas we can work  +
$g = new CanvasGraph( +400,200,'auto' +); +
$g->SetMargin( +5,11,6 +,11); +
$g->SetShadow(); +
$g->SetMarginColor( +"teal"); +
+
+// We need to stroke the plotarea and margin before we add the +
// text since we otherwise would overwrite the text. +
$g->InitFrame(); +
+
// Add a black line +
$g->img-> +SetColor( +'black'); +
$g->img-> +Line(0,0 +,100,100); +
+
// .. and a circle (x,y,diameter) +
$g->img-> +Circle(100,100 +,50); +
+
+// .. and a filled circle (x,y,diameter) +
$g->img-> +SetColor('red'); +
$g->img-> +FilledCircle( +200,100,50 +); +
+
// .. add a rectangle +
$g->img-> +SetColor( +'green'); +
$g->img-> +FilledRectangle( +10,10,50 +,50); +
+
// .. add a filled rounded rectangle +
$g->img-> +SetColor( +'green'); +
$g->img-> +FilledRoundedRectangle( +300,30,350 +,80,10); +
// .. with a darker border +
$g->img-> +SetColor( +'darkgreen'); +
$g->img-> +RoundedRectangle( +300,30,350 +,80,10); +
+
// Stroke the graph +
$g->Stroke(); +
+
?> +
+

+

Pleas note the way to access these routines through the img property + of the Graph class. Please also keep in mind that the coordinates are + absolute.

+

+
+
Figure 189: Example of graphic primitives [src]  +

+

+

+

+
+

A note on GD For those of you using GD 1.xx you + might notice that the large "filled circle" isn't completely filled. + This is because in GD 1.xx there are no low level primitives to fill an + ellipse or circle so JpGraph tries to make the best out of a bad + situation and manually fake a filled circle. For interest of speed + JpGraph does not contain a complete (for example) Bresenham-circle fill + but cheats by using some existing GD routines. This is not a perfect + solution and for large filled circles like this you get some + moire-patterns in the circle. If you upgrade to GD 2.x JpGraph will be + able to make full use of those new existing methods and the fill will + be perfect.

+
+
+

We refer you to the class reference to find out what other graphic + primitives are available for use.

+

10.4 Using a canvas scale

+

The previous method using absolute coordinates works. But nothing + more. It doesn't give you any chance to easily scale the image (unless + you manually recalculate all used coordinates) , it gets tedious to + work with pixel level resolution. Especially if you just like to draw a + few basic shapes.

+

To help with this you can use a scale for the canvas. This lets you + define a "work-space" of your choice. You can for example set the + coordinates to be between X:0-10, Y:0-10. This makes it easier to + position objects on the canvas. This also has two additional + advantages:

+
    +
  • If you increase the size of the canvas all objects will be + automatically scale to keep their proportions without any changes.
  • +
  • You can shrink/enlarge your drawing (not the image) by just using + another scale. For example if you originally draw the image using a + (0:10, 0:10) scale and then change the scale to (0:20, 0:20) then the + effect will be that you drawings will "shrink" to half their size.
  • +
+

+

To use this type of scaling you must make sure you include the file + "jpgraph_canvtools.php" . In addition to the scaling class their are + also a couple of other utility classes that may come in handy, + especially the Shape class.

+

Using the scale is quite simple. You first instantiate a scale + object passing the graph as a parameter and then specify the scale you + want to use. This means you need to add the lines

+  $scale  += new CanvasScale +($g); +
$scale->Set( +0,$xmax,0 +,$ymax);

+

+

to your code. You can then use one of the translation methods (for + example +CanvasScale::Translate()) in the canvas scale class to translate + between your world coordinates and the absolute screen coordinates. + This means you could take the code in the example above and just add + the lines, for example,

+  list( +$x1,$y1) = $this +->scale->Translate( +$x1,$y1); +
list(
$x2,$y2) =  +$this->scale->Translate +($x2,$y2); +
$g->img-> +Line($x1,$y1 +,$x2,$y2); +

+

Since this pattern has to be repeated for every object that has to + be drawn it makes good sense to encapsulate this in a separate class. + This is exactly why the canvas tools file also have a utility class + called Shape This class is + mainly a wrapper around the most commonly used methods in the basic + Image class (with one important exception) and does all these the + translation for you. Please see the class reference for a complete list + of the available methods To set up the Shape class you instantiate it + with the graphic context and the scale you want to use as argument as + in

+

+ $shape = new  +Shape($g,$scale +);

+

+

You are then ready to use all the methods in the shape class. Using + a scale and imitating the previous example we would get the source + shown below.

(File: canvasex03.php) +
<?php +
+// $Id: canvasex03.php,v 1.1 2002/08/27 20:08:57 aditus Exp $ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
include 
"../jpgraph_canvtools.php"; +
+
// Define work space +
$xmax=20; +
$ymax=20; +
+
// Setup a basic canvas we can work  +
$g = new CanvasGraph( +400,200,'auto' +); +
$g->SetMargin( +5,11,6 +,11); +
$g->SetShadow(); +
$g->SetMarginColor( +"teal"); +
+
+// We need to stroke the plotarea and margin before we add the +
// text since we otherwise would overwrite the text. +
$g->InitFrame(); +
+
// Create a new scale +
$scale  += new CanvasScale +($g); +
$scale->Set( +0,$xmax,0 +,$ymax); +
+
+// The shape class is wrapper around the Imgae class which translates +
// the coordinates for us +
$shape  += new Shape($g, +$scale); +
$shape->SetColor( +'black'); +
+
+
// Add a black line +
$shape->SetColor( +'black'); +
$shape->Line( +0,0,20 +,20); +
+
// .. and a circle (x,y,diameter) +
$shape->Circle( +5,14,2 +); +
+
+// .. and a filled circle (x,y,diameter) +
$shape->SetColor( +'red'); +
$shape->FilledCircle( +11,8,3 +); +
+
// .. add a rectangle +
$shape->SetColor( +'green'); +
$shape->FilledRectangle(15, +8,19,14 +); +
+
// .. add a filled rounded rectangle +
$shape->SetColor( +'green'); +
$shape->FilledRoundedRectangle(2, +3,8,6 +); +
// .. with a darker border +
$shape->SetColor( +'darkgreen'); +
$shape->RoundedRectangle(2, +3,8,6 +); +
+
+
// Stroke the graph +
$g->Stroke(); +
+
?> +
+
The source above gives the following result
+
+
Figure 190: Drawing shapes on a canvas using a scale. [src]  +

+

+

If we like to make a smaller image we could just change the image + size and everything will be rescaled without any further code changes. + SO for example making the image half the size would give the result

+
+
Figure 191: Shrinking the image to half the size is easy + since the scaling will maintain the relative position of the objects [src]  +

+

+

If we instead wanted to keep the image size but shrink the shapes we + could just make the scale twice as large which would result in

+
+
Figure 192: Shrinking hte graphic object by making the scale + twice as large +[src]  +

+

+

+

We previously mentioned that the Shape class was a wrapper around + the image class with one exception. So what is the exception? Well, + glad you asked. The exception is that it contain an additional method + which draws an "indented rectangle". An indented rectangle is a + rectangle where one of it's four corners have been moved into the + rectangle. You create an indented rectangle by calling either + Shape::IndentedRectangle() or A few examples illustrates what this + shape looks like.

+
+
Figure 193: Examples of filled indented rectangles [src]  +

+

+

+

As a final note we mention the class + CanvasRectangleText Which can be used to add a text with a rounded + rectangle (possibly filled) onto the canvas. The previous example where + all the available fonts were drawn were using this class. We don't + describe it further but refer the interested reader to the class + reference and the 'listfontsex1.php' example file.

+

10.5 Sample application: Drawing DB schema

+

As a final example we shortly discuss how the canvas type of graph + was used to generate the DB schema for the DDDA architecture.

+

The library php file "utils/misc/imgdbschema.php" included in the + distribution contains some utility classes to make the drawing of table + schemes easier. It contains two basic classes, Class ImgDBTable and + Class ImgDBSchema. The first class understand how to draw an image + illustrating a single table. The second class is responsible for + automatically extract all the relevant information from a DB to draw a + complete DB Schema.

+

Before going into this a little bit more we show what an example of + this might look like.

+
+
Figure 194: Example of using the canvas graph style together + with the imgdbschema.php library to semi-automatically generate a DB + schema [src] +  +

+

+

+

Before going on it should be noted that the ImgDBSchema assumes that + the DB can be accessed through a DB abstraction layer modeled after the + abstraction layer available in the 'jpdb.php' file in the DDDA + architecture. This abstraction layer assumes a MySQL database in the + bottom. This specific dependency of this particular abstraction layer + is the reason why these classes is not included in the generic canvas + tools file.

+

The second thing to note is that this library does not contain a + complete automatic-layout engine but rather a very simple automatic + system which, if nothing else is specified, just puts the table in a + rectangular grid. A complete graph layout engine would simple be to + much to write in this context. This is also a very difficult + optimization problem and sofar not even any of the available research + programs that tries this can achieve a satisfactory layout without + manual intervention.

+

The critical lines in the code to generate the above graph is

+  $tblposadj=array($tlo +,0,$tblwidth+ +$tlo+2,0 +,2*$tblwidth+ +$tlo+4,0 +,-1,16,- +1,16); +
$dbschema  += new ImgDBSchema +("jpgraph_doc" +,"FormatTblName" +,"FormatFldName" +); +
$dbschema +->SetMargin($leftm, +$topm); +
$dbschema +->SetTableWidth +($tblwidth); +
$dbschema +->Stroke($this-> +img,$this->iscale +,$tblposadj);

+

+

The rest of the code in the file is just to setup the canvas, add an + indented rectangle to group some tables and generate a footer with the + date and time this image was generated.

+

The first line instantiates a new ImgDBSCheme layout engine asking + it to draw an image for the database 'jpgraph_doc'. The following two + arguments specify two callback functions for formatting the text for + header and each field in a table.

+

The next line specify the top left margin where the drawing of the + tables should be started.

+

The third line specify the width of a single table. The final lines + starts the engine and draws all tables in the database to the canvas. + The final argument requires some further explanation. This is an offset + (x,y) from the top left corner how each individual table should be + positioned. If the value is -1 indicates that the default value should + be used. If this array is not specified then the tables will simple + arranged line by line.

+

The full source code for drawing this DB schema example is shown + below.

+

(File: dbschemaex1.php) +
<?php +
+/*======================================================================= +
// File:     DBSCHEMAEX1.PHP +
// Description:    Draw a DB schema of the DDDA architecture +
// Created:     2002-08-25 +
// Author:    Johan Persson (johanp@aditus.nu) +
+// Ver:        $Id: dbschemaex1.php,v 1.1 2002/08/27 20:08:57 aditus Exp $ +
// +
// License:     This code is released under QPL +
//              Copyright (C) 2001,2002 Johan Persson +
+// Note:        The actual drawing of the tables are semi-automatically +
+//              but you can easily adjust the individual tables position +
//              with the 'tblposadj' array.  +
// +
+//======================================================================== +
*/ +
include  +"../jpgraph.php"; +
include 
"../jpgraph_canvas.php"; +
include 
"../jpgraph_canvtools.php"; +
include 
"../utils/misc/imgdbschema.inc"; +
include 
"../utils/jpdocgen/jpdb.php"; +
+
+
+// Global callback to format the table header names +
function  +FormatTblName( +$aName) { +
    
+// We want to replace any specifi references to the +
    // 'JpGraph' project with the generic '<project>' +
    
return  +str_replace( +'JpGraph', +'<project>' +$aName); +
} +
+
+// Global callback to format each field name in the table +
function  +FormatFldName( +$aName,$aTable) { +
    return 
$aName +; +
} +
+
+
class 
Driver  +{ +
+
    var 
$ig +, $img$iscale +$ishape; +
    var 
$iymax +,$ixmax; +
    var 
$iwidth +,$iheight; +
+
    function 
Driver +() { +
+
    
+// Define Image size and coordinate grid space to work within +
    
$this +->iwidth 600; +
    
$this +->iheight750; +
    
$this +->iymax  50; +
    
$this +->ixmax  55; +
+
    
// Setup a basic canvas +
    
$this +->ig = new CanvasGraph( +$this->iwidth,$this +->iheight,'auto'); +
    
$this +->img $this-> +ig->img; +
+
    
// Define the scale to be used +
    
$this +->iscale  += new CanvasScale +($this->ig); +
    
$this +->iscale->Set( +0,$this->ixmax +,0,$this-> +iymax); +
    
$this +->ishape  += new Shape($this-> +ig,$this->iscale +); +
+
    
// A small frame around the canvas +
    
$this +->ig->SetMargin( +2,3,2 +,3); +
    
$this +->ig->SetMarginColor( +"teal"); +
    
$this +->ig->InitFrame(); +
+
    } +
+
    function 
Run +() { +
+
    
$leftm +=1.5;    // Left margin (for table schemes)  +
    
$topm=5;     +// Top margin (for table schemes)  +
    
$tblwidth +=15;    // Individual table width +
    
$tlo=1;         +// Offset for top line +
+
    // Add the background color for the project specific tables +
    
$this +->ishape->IndentedRectangle($leftm, +$topm-1,3 +*$tblwidth+$tlo+ +6,45, +
                     
$tlo ++2*$tblwidth+ +2,30,CORNER_BOTTOMLEFT, +
                     
'lightblue'); +
+
    
+// Stroke the tables (series of x,y offsets, If =-1 then use the +
    // automtic positioning +
    
$tblposadj +=array($tlo,0, +$tblwidth+$tlo+2 +,0,2* +$tblwidth+$tlo+4 +, +
             
0 +,-1,16,- +1,16); +
    
$dbschema  += new ImgDBSchema +('jpgraph_doc' +,'FormatTblName' +,'FormatFldName' +); +
    
$dbschema +->SetMargin($leftm, +$topm); +
    
$dbschema +->SetTableWidth +($tblwidth); +
    
$dbschema +->Stroke($this-> +img,$this->iscale +,$tblposadj); +
+
    
$tt  += new CanvasRectangleText +(); +
    
$tt->SetFillColor( +''); +
    
$tt->SetColor( +''); +
    
$tt->SetFontColor( +'navy'); +
+
    
// Add explanation +
    
$tt->SetFont( +FF_ARIAL, +FS_NORMAL,12); +
    
$tt->Set( +'Project specific tables', +$tblwidth+ +$leftm+3,16 +,15); +
    
$tt->Stroke( +$this->img,$this +->iscale); +
+
    
// Add title +
    
$tt->SetColor( +''); +
    
$tt->SetFont( +FF_VERDANA, +FS_BOLD,26); +
    
$tt->Set( +'DDDA - DB Schema', +9,0.5,30 +); +
    
$tt->Stroke( +$this->img,$this +->iscale); +
+
    
// Add a version and date +
    
$tt->SetFillColor( +'yellow'); +
    
$tt->SetFont( +FF_FONT1, +FS_NORMAL,10); +
    
$tt->Set( +"Generated: ". +date("ymd H:i",time +()),1,$this-> +iymax*0.96,15 +);  +
    
$tt->Stroke( +$this->img,$this +->iscale); +
+
    
$this +->ig->Stroke(); +
    } +
} +
+
$driver  += new Driver +(); +
$driver->Run(); +
+
?> +
+

+

11 Anti-Spam Challenges

+

JpGraph includes a module to easily generate Anti-Spam challenges. + With this we mean an image consisting of numbers and letters which are + very hard to read for an OCR program. This is often used to secure sign + up for bulletin boards, on-line mail system or mailing lists since this + very effectively prevent automatic sign up by robots (spam-bots).

+

The module in JpGraph responsible for this is + jpgraph_antispam.php and behaves as a simplified plot module.

+

The example below illustrates how such an image can look like

+
+
Figure 195: Simple illustration of spam challenge image [src]  +

+

+

Anti spam images have less functionality then the usual images + generated with JpGraph in order to keep this utility reasonable small. + The primary limitation is that there are now additional formatting + options for the images and the image generated will always use the + JPEG image format. Hence it is not possible to change this to use, + for example, PNG.

+

11.1 Generating Anti-Spam challenge

+

There are two basic alternatives on how to generate the content of + the anti-spam image

+
    +
  1. Submit a string that should be used
  2. +
  3. Automatically generate a random string. If this alternative is + chosen then the user of the library should save the created string and + compare it to what the user enters.
  4. +
+

In order to write a script to generate a new challenge there are + four steps to be completed.

+

First include the library file jpgraph_antispam.php. + Note that there is no need to include the "jpgraph.php" library since + all functionality is included in this library file.

+   +require_once "jpgraph_antispam.php";
+

+

Secondly a new instance of the class AntiSpam must be + created

+ $spam = new  +AntiSpam(); +

+

Thirdly the string to be used in the challenge must be + specified. To automatically generate a suitable string use

+   +// The argument determines the length of the generated string +
$chars $spam-> +Rand(5);
+

+

If instead the string to be used should be specified this string + should be specified in the initial creation of the AntiSpam() or by + calling the Set() method as in

+  $spam-> +Set("aui8k");
+

+

Please note that in order to minimize the risk for confusion the + letters 'O' and the number '0' (zero) is not allowed since they are too + alike and can be mistaken for each other.

+

The final and fourth step is to output the image with a call + the method Stroke() on the created instance of the AntiSpam + class.

if( $spam->Stroke +() === false  +) { +
    die(
"Illegal or no data to plot"); +
}

+

Note that we have put a guard around the output since in the case of + an error this method will result a boolean false value. As with the + other graph types it is possible to write the generated image to a file + by submitting a file name as an argument to Stroke().

+

12 Code defines in JpGraph

+

Various settings in JpGraph are controlled by overall DEFINEs in the + configuration file "jpg-config.inc". Most of these defines have default + values that should be valid for most usage.

+

In the rest of this chapter all constants are described with default + value and usage.

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Define, default valueComment
"CACHE_DIR", "/tmp/jpgraph_cache/"The full + absolute name of directory to be used as a cache. This directory + must be readable and writable for PHP. Must end with '/'
"TTF_DIR", "/usr/local/fonts/ttf/" +Directory for JpGraph TTF fonts. Must end with '/' The fonts must follow + the naming conventions as used by the supplied TTF fonts in JpGraph.
"CSIMCACHE_DIR", "csimcache/"Directory for + cache directory for CSIM graphs. Must end with '/' Cache directory + specification for use with CSIM graphs that are using the cache. The + directory must be the filesystem name as seen by PHP and the 'http' + version must be the same directory but as seen by the HTTP server + relative to the 'htdocs' directory. If a relative path is specified it + is taken to be relative from where the image script is executed. Note: + The default setting is to create a subdirectory in the directory from + where the image script is executed and store all files there. As usual + this directory must be writable by the PHP process.
"CSIMCACHE_HTTP_DIR", "csimcache"Directory + for JpGraph TTF fonts. Must end with '/' Cache directory specification + for use with CSIM graphs that are using the cache. The directory must + be the filesystem name as seen by PHP and the 'http' version must be + the same directory but as seen by the HTTP server relative to the + 'htdocs' directory. If a relative path is specified it is taken to be + relative from where the image script is executed. Note: The default + setting is to create a subdirectory in the directory from where the + image script is executed and store all files there. As usual this + directory must be writable by the PHP process.
"CHINESE_TTF_FONT", "bkai00mp.ttf" Actual + name of the TTF file used together with FF_CHINESE aka FF_BIG5 This is + the TTF file being used when the font family is specified as either + FF_CHINESE or FF_BIG5
"LANGUAGE_CYRILLIC", false Special unicode + Cyrillic language support.
"CYRILLIC_FROM_WINDOWS", false If you are + setting this config to true the conversion will assume that the input + text is windows 1251, if false it will assume koi8-r
'MINCHO_TTF_FONT', 'ipam.ttf' Japanese + TrueType font used with FF_MINCHO
'PMINCHO_TTF_FONT', 'ipamp.ttf' Japanese + TrueType font used with FF_PMINCHO
'GOTHIC_TTF_FONT', 'ipag.ttf' Japanese + TrueType font used with FF_GOTHIC
'PGOTHIC_TTF_FONT', 'ipagp.ttf' Japanese + TrueType font used with FF_PGOTHIC
"INSTALL_PHP_ERR_HANDLER", false Determine + if the library should also setup the default PHP error handler to + generate a graphic error message. This is useful during development to + be able to see the error message as an image instead as a "red-cross" + in a page where an image is expected.
"CATCH_PHPERRMSG", true Should the library + examine the global php_errmsg string and convert any error in it to a + graphical representation. This is handy for the occasions when, for + example, header files cannot be found and this results in the graph not + being created and just a "red-cross" image would be seen. This should + be turned off for a production site.
"USE_LIBRARY_GD2",falseSpecify if we + should use GD 2.x or GD 1.x If you have GD 2.x installed it is + recommended that you use it since it will give a slightly, slightly + better visual appearance for arcs. If you don't have GD2 installed this + must be set to false!
'USE_TRUECOLOR',trueShould the image be a + truecolor image? Note 1: Can only be used with GD 2.0.2 and above. Note + 2: GD 2.0.1 + PHP 4.0.6 on Win32 crashes when trying to use truecolor. + Truecolor support is to be considered alpha since GD 2.x is still not + considered stable (especially on Win32). Note 3: MUST be enabled to get + background images working with GD2 Note 4: If enabled then truetype + fonts will look very ugly => You can't have both background images and + truetype fonts in the same image until these bugs has been fixed in GD + 2.01
"USE_CACHE",falseShould the cache be used + at all? By setting this to false no files will be generated in the + cache directory. The difference from READ_CACHE being that setting + READ_CACHE to false will still create the image in the cache directory + just not use it. By setting USE_CACHE=false no files will even be + generated in the cache directory.
"READ_CACHE",trueShould we try to find an + image in the cache before generating it? Set this define to false to + bypass the reading of the cache and always regenerate the image. Note + that even if reading the cache is disabled the cached will still be + updated with the newly generated image. Set also "USE_CACHE" below.
"DEFAULT_GFORMAT","auto"Default graphic + format set to "auto" which will automatically choose the best available + format in the order png,gif,jpg (The supported format depends on what + your PHP installation supports)
"USE_IMAGE_ERROR_HANDLER",true Determine + if the error handler should be image based or purely text based. Image + based makes it easier since the script will always return an image even + in case of errors.
"USE_APPROX_COLORS",trueIf the color + palette is full should JpGraph try to allocate the closest match? If + you plan on using background image or gradient fills it might be a good + idea to enable this. If not you will otherwise get an error saying that + the color palette is exhausted. The drawback of using approximations is + that the colors might not be exactly what you specified. Note1: This + does only apply to a palette image, not true color images since they + don't have the limitations of maximum number of colors.
"ERR_DEPRECATED",falseShould usage of + deprecated functions and parameters give a fatal error? (Useful to + check if code is future proof.)
"BRAND_TIMING",falseShould the time taken + to generate each picture be branded to the lower left in corner in each + generated image? Useful for performance measurements generating graphs
"BRAND_TIME_FORMAT","Generated in: %01.3fs" +What format should be used for the timing string?
+

The following defines should very rarely need to be changed

+

+ + + + + + + +
Define, default valueComment
"CACHE_FILE_GROUP","wwwadmin"What group + should the cached file belong to (Set to "" will give the default group + for the "PHP-user") Please note that the Apache user must be a member + of the specified group since otherwise it is impossible for Apache to + set the specified group.
"CACHE_FILE_MOD",0664What permissions + should the cached file have (Set to "" will give the default + permissions for the "PHP-user")
"USE_BRESENHAM",falseDecide if we should + use the Bresenham circle algorithm or the built in Arc(). Bresenham + gives better visual appearance of circles but is more CPU intensive and + slower then the built in Arc() function in GD. Turned off by default + for speed
"_CSIM_SPECIALFILE","_csim_special_" +Special file name to indicate that we only want to calc the image map in + the call to Graph::Stroke() used internally from the GetHTMLCSIM() + method.
"_CSIM_DISPLAY","_jpg_csimd"HTTP GET + argument that is used with image map to indicate to the script to just + generate the image and not the full CSIM HTML page.
+   +

 

+

&nbsp

+
+ diff --git a/html/includes/jpgraph/docs/html/toc.html b/html/includes/jpgraph/docs/html/toc.html new file mode 100644 index 0000000000..3248c0b327 --- /dev/null +++ b/html/includes/jpgraph/docs/html/toc.html @@ -0,0 +1,502 @@ + + + + + + + + + +

JpGraph Manual

+
+
1 About this manual + +2 Introduction + +3 Installation + +4 Quick Start: + Dynamic Image Generation + +5 Localizing error messages + + +6 +Understanding the JpGraph caching system + +7 Using image maps with + JpGraph + +8 Working with + orthogonal X,Y-plots + +9 Working with non X,Y-plots + + +10 Gantt charts + +11 Working with canvas + graphs + +12 Anti-Spam Challenges + +13 Generating + LED-like digits with JpGraph + +14 Code defines in JpGraph +
+ + diff --git a/html/includes/jpgraph/docs/index.html b/html/includes/jpgraph/docs/index.html new file mode 100644 index 0000000000..9324cf4fa5 --- /dev/null +++ b/html/includes/jpgraph/docs/index.html @@ -0,0 +1,113 @@ + + +JpGraph Documentation + + + + + + +
+ + + + + + + + + + + + + + + + +© 2001-2007 Aditus Consulting + +
+ + + + + + diff --git a/html/includes/jpgraph/docs/manual.png b/html/includes/jpgraph/docs/manual.png new file mode 100644 index 0000000000..a440215862 Binary files /dev/null and b/html/includes/jpgraph/docs/manual.png differ diff --git a/html/includes/jpgraph/docs/ref/AccBarPlot.html b/html/includes/jpgraph/docs/ref/AccBarPlot.html new file mode 100644 index 0000000000..3c43466eee --- /dev/null +++ b/html/includes/jpgraph/docs/ref/AccBarPlot.html @@ -0,0 +1,72 @@ +
CLASS AccBarPlot EXTENDS BarPlot
+(Defined in: jpgraph_bar.php : 642)
 AccBarPlot  BarPlot  
 AccBarPlot() 
Max() 
Min() 
+
 
 

Class usage and Overview
Accumulated bar plot.
+Used to create bars where the data series are stacked on top of each other. +

+Features: +

    +
  1. Can be combined with Image maps for each series. +
  2. Values for each series can be displayed when the pointer is hovering over the corresponding part of the bar +
  3. Unlimited number of series +
+

+Examples: +

  +

See also related classes:
BarPlot, GroupBarPlot and AccLinePlot

 


Class Methods

+

 

 

+function AccBarPlot($plots) +
+ +Construct a new accumulated bar graph

+ + + + +
ArgumentDefaultDescription
+$plots + + Array of bar plots
+ +

Description
Create a new accumulated bar plot based on the given array of ordinary bar plots. 
+  
See also
BarPlot::BarPlot +

Example

+$b1 = new BarPlot($y1data);
$b2 = new BarPlot($y2data);
$accbar = new AccBarPlot(array($b1,$b2));

+

+

+

 

 

+function Max() +
+ +Return the maximum value of the bars

+
+ +

Description
Return the maximum value of the bars 
+ +

Example

+list($xmin,$ymin) = $accbar->Max(); +
+

+

 

 

+function Min() +
+ +Return minimum data values for the bars

+
+ +

Description
Return minimum data values for the bars 
+ +

Example

+list($xmin,$ymin) = $accbar->Min(); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/AccLinePlot.html b/html/includes/jpgraph/docs/ref/AccLinePlot.html new file mode 100644 index 0000000000..7674b1d575 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/AccLinePlot.html @@ -0,0 +1,90 @@ +


CLASS AccLinePlot EXTENDS Plot
+(Defined in: jpgraph_line.php : 421)
 AccLinePlot  Plot  
 AccLinePlot() 
Max() 
Min() 
SetInterpolateMode() 
+
 
 

Class usage and Overview
Accumulated bar plot.
+Used to create a line plot where each individual data point is the sum of the individual series data points. +

+Features: +

    +
  1. Unlimited number of series +
+

  +

See also related classes:
AccBarPlot and LinePlot

 


Class Methods

+

 

 

+function AccLinePlot($plots) +
+ +Constructor

+ + + + +
ArgumentDefaultDescription
+$plots + + Array of line plots to use
+ +

Description
Creates a new accumulated line plot from a number of line plots. 
+  
See also
LinePlot::LinePlot +

Example

+$line1 = new LinePlot($datay1);
$line2 = new LinePlot($datay2);
$aline = array($line1,$line2);
$acclineplot = new AccLinePlot($aline);
+

+

+

 

 

+function Max() +
+ +Return the max value of data points in plot.

+
+ +

Description
Takes into account all series and returns the maximum Y and X values for all the data series. Used internally to determine the autoscaling. 
+  
See also
Plot::Max +

Example

+list($xmax,$ymax) = $acclineplot->Max(); +
+

+

 

 

+function Min() +
+ +Return the min value of all data points in plot.

+
+ +

Description
Takes into account all series and returns the minimum Y and X value. Used internally to determine autoscaling. 
+  
See also
BarPlot::Min and Plot::Min +

Example

+list($xmin,$ymin) = $acclineplot->Min()
+

+

+

 

 

+function SetInterpolateMode($aIntMode) +
+ +Enable interpolate mode

+ + + + +
ArgumentDefaultDescription
+$aIntMode + + TRUE=Enable interpolation
+ +

Description
When plotting accumulated line plots which have NULL values as data (i.e. '-') they will distort the accumulated plot since they will in effect be interpretated as having value 0. This means that there will be a drop in the plot. The only way to avoid this is to calculate the intermediate value. + +This can be achieved by calculating a linear interpoaltion for the missing value(s). Calling this method will replace all '-' values with an interpolated value. + 
+ +

Example

+$accline->SetInterpolateMode() +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/AntiSpam.html b/html/includes/jpgraph/docs/ref/AntiSpam.html new file mode 100644 index 0000000000..ca48212ba3 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/AntiSpam.html @@ -0,0 +1,100 @@ +


CLASS AntiSpam
+(Defined in: jpgraph_antispam.php : 545)
 AntiSpam 
 AntiSpam() 
Rand() 
Set() 
Stroke() 
+
 

Class usage and Overview
This module is used to create AntiSpam challenges that can be used to prevent automatic signup by robots on WEB-pages.

  +


Class Methods

+

 

 

+function AntiSpam($aData) +
+ +Create a new ANtiSpam challenge image

+ + + + +
ArgumentDefaultDescription
+$aData + + +'' +Data to be displayed
+ +

Description
This method creates a new instance of the AntiSpam challenge. When the anti-spam imga eis created it is possible to directly use a supplied data string that should be displayed. + +The data can also be added afterwards with a call to Set() 
+  
See also
AntiSpam::Set and AntiSpam::Rand +

Example

+$spam = new AntiSpam(); +
+

+

 

 

+function Rand($aLen) +
+ +Generate a random spam challenge string

+ + + + +
ArgumentDefaultDescription
+$aLen + + Sets the length of the generated string
+ +

Description
Instead of specifying the string manually that should be used as a challenge the string can be automatically generated. This is done witha call to the Rand() method.  
+ +

Example

+$antispam = new AntiSpam();
$rval = $antispam->Rand();
...
+

+

+

 

 

+function Set($aData) +
+ +Set the spam challenge string

+ + + + +
ArgumentDefaultDescription
+$aData + + Spam challenge
+ +

Description
This is an alternative way of specifying the AntiSpam string. This can also be specified in the initial creation of the ANtiSpam object ro be automatically generated with a call to the Rand() method 
+  
See also
AntiSpam::Rand +

Example

+$antispam = new AntiSpam();
...
$antispam->Set($mySpamVal);
+

+

+

 

 

+function Stroke($aStrokeFileName) +
+ +Send the antispam image back to the browser

+ + + + +
ArgumentDefaultDescription
+$aStrokeFileName + + +"" +An optional file name
+ +

Description
This sends the antispam image back to the browser or to an optional file named as the first and only argument. 
+  
See also
AntiSpam::AntiSpam and AntiSpam::Rand +

Example

+$antispam = new AntiSpam();
$rval = $antispam->Rand();
...
$antispam->Stroke()
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Axis.html b/html/includes/jpgraph/docs/ref/Axis.html new file mode 100644 index 0000000000..060d03d0e1 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Axis.html @@ -0,0 +1,881 @@ +


CLASS Axis
+(Defined in: jpgraph.php : 3483)
 Axis 
 Hide() 
HideFirstLastLabel() 
HideFirstTickLabel() 
HideLabels() 
HideLastTickLabel() 
HideLine() 
HideTicks() 
HideZeroLabel() 
SetColor() 
SetFont() 
SetLabelAlign() 
SetLabelAngle() 
SetLabelFormat() 
SetLabelFormatCallback() 
SetLabelFormatString() 
SetLabelMargin() 
SetLabelPos() 
SetLabelSide() 
SetMajTickPositions() 
SetPos() 
SetPosAbsDelta() 
SetTextLabelInterval() 
SetTextTickInterval() 
SetTextTicks() 
SetTickDirection() 
SetTickLabelMargin() 
SetTickLabels() 
SetTickPositions() 
SetTickSide() 
SetTitle() 
SetTitleMargin() 
SetTitleSide() 
SetWeight() 
+
 

Class usage and Overview
The Axis class represents either the X or Y axis in a graph. This class is noramlly accessed through the instance variables graph->xaxis, $graph->yaxis, or $graph->y2axis + +Public properties: + + + + + + + +
Name Type Description
title Text Axis title text
scale LinearScale/LogScale Scale used for axis

  +

See also related classes:
LinearScale, LogScale and Text

 


Class Methods

+

 

 

+function Hide($aHide) +
+ +Hide the axis

+ + + + +
ArgumentDefaultDescription
+$aHide + + +true +Flag.
+ +

Description
This method is used to hide the axis. 
+ +

Example

+$graph->xaxis->Hide(); // Hide xaxis
$graph->yaxis->Hide(); // Hide y-axis
+

+

+

 

 

+function HideFirstLastLabel() +
+ +Hide the first and last label on the scale.

+
+ +

Description
Hide the first and last label on the scale. Usefull whe you are using Axis Type of AXSTYLE_BOXIN or AXSTYLE_BOXOUT to avoid the labels to owerwrite a box around the plot. 
+  
See also
Axis::HideFirstTickLabel and Axis::HideLastTickLabel +

Example

+//...
$graph->SetAxisStyle(AXSTYLE_BOXOUT);
$graph->SetBox();
$graph->xaxis->HideFirstLastLabel();
$graph->yaxis->HideFirstLastLabel();
//...
+

+

+

 

 

+function HideFirstTickLabel($aShow) +
+ +Hide the first label

+ + + + +
ArgumentDefaultDescription
+$aShow + + +false +Flag.
+ +

Description
Calling this method will hide the first label on the axis. This is usefull when the y axis have negative values and a value on the x-axis would be partially obscured by the values on the y-axis. +This gets automatically called in this case. +

+This is probably of less use for the end user of the library. 
+ +

Example

+$graph->xaxis->HideFirstTicklabel() +
+

+

 

 

+function HideLabels($aHide) +
+ +Hide all labels on the axis

+ + + + +
ArgumentDefaultDescription
+$aHide + + +true +true=Hide all labels
+ +

Description
Hide all labels on the axis but keep tick marks and axis line. 
+  
See also
Axis::Hide, Axis::HideLine and Axis::HideTicks +

Example

+$graph->xaxis->HideLabels() +
+

+

 

 

+function HideLastTickLabel($aShow) +
+ +Hide the last tick label on the axis.

+ + + + +
ArgumentDefaultDescription
+$aShow + + +false +Flag
+ +

Description
The mirror of HideFirstTickLabel() 
+  
See also
Axis::HideFirstTickLabel and Axis::HideFirstLastLabel +

Example

+$graph->xaxis->HideLastTickLabel(); +
+

+

 

 

+function HideLine($aHide) +
+ +// Hide the actual axis-line, but still print the labels

+ + + + +
ArgumentDefaultDescription
+$aHide + + +true +True=Hide axis line
+ +

Description
Hide the line of the axis. This only hides the axis-line but will keep the tick marks and labels. If you want to hide the tick marks you should call HideTicks(). To hide the axis completely, line, ticks and labels use Hide(). 
+  
See also
Axis::HideTicks and Axis::Hide +

Example

+// Hide line and tick marks
$graph->yaxis->HideLine();
$graph->yaxis->HideTicks();
+

+

+

 

 

+function HideTicks($aHideMinor,$aHideMajor) +
+ +Hide minor or major tick marks.

+ + + + + + +
ArgumentDefaultDescription
+$aHideMinor + + +true +True = Hide minor tick marks
+$aHideMajor + + +true +True = Hide major tick marks
+ +

Description
Hide major or minor tick makrs on the axis. 
+ +

Example

+// Only display major tick marks
$graph->yaxis->HideTicks(true,false);
+

+

+

 

 

+function HideZeroLabel($aFlag) +
+ +Hide zero label

+ + + + +
ArgumentDefaultDescription
+$aFlag + + +true +Flag.
+ +

Description
Hide the zero label. Usefull if the axis cross at zero and the label would owerwrite the other axis scale. + 
+  
See also
Axis::HideFirstTickLabel +

Example

+$graph->yaxis->HideZeroLabel();
+

+

+

 

 

+function SetColor($aColor,$aLabelColor) +
+ +Specify color of Axis and it's labels

+ + + + + + +
ArgumentDefaultDescription
+$aColor + + Color for axis
+$aLabelColor + + +false +Color for labels on axis
+ +

Description
Specifies the color of the axis line as well as the labels on the axis. If the label color is not specified it will be the same as the axis color. 
+ +

Example

+$graph->xaxis->SetColor('blue');
$graph->yaxis->SetColor('blue','black');
+

+

+

 

 

+function SetFont($aFamily,$aStyle,$aSize) +
+ +Set the font for labels on the axis

+ + + + + + + + +
ArgumentDefaultDescription
+$aFamily + + Font family
+$aStyle + + +FS_NORMAL +Font style
+$aSize + + +10 +Font size
+ +

Description
Specify font for labels on axis. Please note that if you need labels to be rotated an angle other than 0 or 90 you must use TTF fonts and not the builtin fonts (i.e. FF_FONT1, FF_FONT2, FF_FONT3) + + 
+  
See also
Axis::SetLabelPos and Axis::SetLabelAngle +

Example

+$graph->xaxis->SetFont(FF_ARIAL); +
+

+

 

 

+function SetLabelAlign($aHAlign,$aVAlign,$aParagraphAlign) +
+ +Specify horizontal and vertical alignment for labels

+ + + + + + + + +
ArgumentDefaultDescription
+$aHAlign + + Horizontal alignment
+$aVAlign + + +"top" +Vertical alignment
+$aParagraphAlign + + +'left' +paragraph align for multi-line texts
+ +

Description
Specifies the horizontal and vertical alignment for the labels on the axis. The alignment specifies how the labels is adjusted relative to the tickmark. +

+Note that this is handled automatically but on some occasion there is a genuine need to override the automtic values. For example if the graph is rotated it might be necessary to adjust the alignment to get a visual acceptable label alignment. +

+Possible horizontal alignment are: 'left', 'center', 'right'
+Possible vertical alignment are: 'top', 'center', 'bottom'
+

+See horizbarex1.php, horizbarex2.php for real life examples. + 
+ +

Example

+$graph->xaxis->SetLabelAlign('right','center'); +
+

+

 

 

+function SetLabelAngle($aAngle) +
+ +Specify the angle for the tick labels

+ + + + +
ArgumentDefaultDescription
+$aAngle + + Angle in degrees
+ +

Description
Specify the rotation angle for the labels on the axis. +

+Note:
+If you want to use any angles other than 0 and 90 degrees you must make sure that the labels are using TTF fonts. Internal fonts only support vertical and horizontal angles. 
+  

See also
Axis::SetFont +

Example

+$graph->xaxis->SetFont(FF_ARIAL,FS_NORMAL,11);
$graph->xaxis->SetLabelAngle(45); // 45 degrees angle
+

+

+

 

 

+function SetLabelFormat($aFormStr) +
+ +Specify printf() format string for labels

+ + + + +
ArgumentDefaultDescription
+$aFormStr + + Format string
+ +

Description
Specify a printf() format string for the axis labels. if you need more advanced control of the formatting you can install a label format callbacl routine with Axis::SetLabelFormatCallback() 
+  
See also
Axis::SetLabelFormatCallback +

Example

+$graph->xaxis->SetLabelFormat('%0.1f%%'); +
+

+

 

 

+function SetLabelFormatCallback($aFuncName) +
+ +Specify callback function for labels on axis

+ + + + +
ArgumentDefaultDescription
+$aFuncName + + Callback function
+ +

Description
This can be used when more advance formatting of the axis labels are required. For example this could be used to format numbers with space or commas betwen the '1000. +

+The callback routine is called with one argument, the current number to be displayed and should return the number to be displayed. +

+For simple formatting use SetlabelFormat() to specify a printf() style formatting string. +

+The callback function specified should can either be a +global function or a class method, for example + +

+$SomeClass = new SomeClass(...); 
+... 
+$g->SetXLabelFormatCallback(array($SomeClass,'xLabelCallback'));
+
+

+There is, however, one caution. Any $this data used within LabelFormatCallbackInDerivedClass MUST BE SET BEFORE SetLabelFormatCallback is invoked! it appears that $this is bound/copied when SetLabelFormatCallback is invoked. Only $this data defined at that time is available within the callback function! Likewise, modifications to $this data AFTER SetLabelFormatCallback have no effect since the $this object used by the callback function has already been bound/copied. +

+The same issues obtain when the callback function is in a seperate class! +

+For a full example see barscalecallbackex1.php + 
+  

See also
Axis::SetLabelFormat +

Example

+function yLabelFormat($aLabel) {
    // Format '1000 english style
    return number_format($aLabel)
    // Format '1000 french style
    // return number_format($aLabel, 2, ',', ' ');
}

$graph->yaxis->SetLabelFormatCallback('yLabelFormat');

+

+

+

 

 

+function SetLabelFormatString($aFormStr,$aDate) +
+ +Specify a printf()-style format string for labels.

+ + + + + + +
ArgumentDefaultDescription
+$aFormStr + + Format string
+$aDate + + +false +No description available
+ +

Description
Synonym for SetLabelFormat(). +Will be deprecated in a future release. Use SetLabelFormat() instead. 
+  
See also
Axis::SetLabelFormat +

Example

+$graph->xaxis->SetLabelFormatString('%0.1f%%'); +
+

+

 

 

+function SetLabelMargin($aMargin) +
+ +Specify margin between labels and tick marks

+ + + + +
ArgumentDefaultDescription
+$aMargin + + Margin in pixels
+ +

Description
Specify margin between labels and tick marks. 
+ +

Example

+$graph->xaxis->SetLabelMargin(15);
+

+

+

 

 

+function SetLabelPos($aSidePos) +
+ +Specify what side of the axis labels should be on.

+ + + + +
ArgumentDefaultDescription
+$aSidePos + + Position
+ +

Description
Specify which side the labels should go on. For horizontal axis valid arguments are SIDE_UP, SIDE_DOWN and for vertical axis it is SIDE_LEFT, SIDE_RIGHT. +

+See topaxisex1.php for an example when this is usefull. +

+Note: Synonym to SetLabelSide() 
+  

See also
Axis::SetTickSide and Axis::SetLabelSide +

Example

+$graph->xaxis->SetLabelPos(SIDE_TOP); +
+

+

 

 

+function SetLabelSide($aSidePos) +
+ +Specify what side of the axis labels should be on.

+ + + + +
ArgumentDefaultDescription
+$aSidePos + + Which side of the axis the labels should be on
+ +

Description
Specify which side the labels should go on. For horizontal axis valid arguments are SIDE_UP, SIDE_DOWN and for vertical axis it is SIDE_LEFT, SIDE_RIGHT. +

+See topaxisex1.php for an example when this is usefull. +

+Note: Synonym to SetLabelPos() + 
+  

See also
Axis::SetLabelPos +

Example

+$graph->xaxis->SetLabelSide(SIDE_UP); +
+

+

 

 

+function SetMajTickPositions($aMajPos,$aLabels) +
+ +// Manually specify major tick positions and optional labels

+ + + + + + +
ArgumentDefaultDescription
+$aMajPos + + No description available
+$aLabels + + +NULL +No description available
+ +

Description
No description available.

+

 

 

+function SetPos($aPosOnOtherScale) +
+ +Position for axis line on the "other" scale

+ + + + +
ArgumentDefaultDescription
+$aPosOnOtherScale + + Position in world-coordinate
+ +

Description
Specifies the position of the axis on the other axis. This can be specified as either a numeric value (which gives the absolute position on the other scale). OIt can also be specified as a string value as either 'min' or 'max' which sould position the axis either at the beginning or the end of the opposite axis scale. +

+See topaxisex1.php for a real life example. 
+ +

Example

+$graph->xaxis->SetPos('max'); // Locate x-axis at the top +
+

+

 

 

+function SetPosAbsDelta($aDelta) +
+ +Position the multiple Y-axis

+ + + + +
ArgumentDefaultDescription
+$aDelta + + Delta in pixels
+ +

Description
Set the position of the Y-axis to be X-pixels delta to the right of the max X-position (used to position the multiple Y-axis) 
+

+

 

 

+function SetTextLabelInterval($aStep,$aStart) +
+ +Specify interval for for test labels

+ + + + + + +
ArgumentDefaultDescription
+$aStep + + Intervall
+$aStart + + +0 +No description available
+ +

Description
Specify that every $step tick mark should have a label + 
+  
See also
Axis::SetTickLabels +

Example

+// Only draw labels on every 2nd tick mark
$graph->xaxis->SetTextLabelInterval(2);
+

+

+

 

 

+function SetTextTickInterval($aStep,$aStart) +
+ +Specify what ticks should be displayed

+ + + + + + +
ArgumentDefaultDescription
+$aStep + + Intervall between ticks
+$aStart + + +0 +Start tick
+ +

Description
Specify that every $step of the ticks should be displayed starting at $start. + 
+  
See also
Axis::SetTextLabelInterval and Axis::SetTextTicks +

Example

+$graph->SetTextTickInterval(1,2); +
+

+

 

 

+function SetTextTicks($step,$start) +
+ +Specify intervall for ticks on a text scale

+ + + + + + +
ArgumentDefaultDescription
+$step + + Intervall
+$start + + +0 +Start
+ +

Description
DEPRECATED FUNCTION: USE SetTextTickInterval() INSTEAD 
+  
See also
Axis::SetTextTickInterval +

Example

+NA +
+

+

 

 

+function SetTickDirection($aDir) +
+ +Specify what side of the axis ticks should be at

+ + + + +
ArgumentDefaultDescription
+$aDir + + Direction
+ +

Description
Specify which side of the axis the tick marks should be on. Valid positions for a horizontal axis are SIDE_TOP, SIDE_BOTTOM and for verticla axis SIDE_LEFT and SIDE_RIGHT. +

+This is a shortform for accessing the tick method directly via the scale in the axis. +

+See topaxisex1.php for real life example. 
+  

See also
Axis::SetLabelSide and Ticks::SetDirection +

Example

+$graph->xaxis->SetTickDirection(SIDE_TOP); +
+

+

 

 

+function SetTickLabelMargin($aMargin) +
+ +How far from the axis should the labels be drawn

+ + + + +
ArgumentDefaultDescription
+$aMargin + + Margin in pixels
+ +

Description
Specify the margin (in pixels) between the axis and the label 
+ +

Example

+$graph->xaxis->SetTicklabelmargin(50); +
+

+

 

 

+function SetTickLabels($aLabelArray,$aLabelColorArray) +
+ +Specify text labels for the ticks. One label for each data point

+ + + + + + +
ArgumentDefaultDescription
+$aLabelArray + + Array with labels
+$aLabelColorArray + + +null +Individual colors for each label
+ +

Description
Specify the labels for a text axis. This is used to manually set labels for the x-axis when a text scale has been specified. +

+If fewer labels than data points are specified then the missing labels will be set to the data points ordinal numbers. +

+The color argment is an array that can be used to specify individual colors for each of the labels. If fewer colors than labels are specified then the colors will wrap around. + + 
+  

See also
Axis::SetTextLabelInterval and Axis::SetTickLabelMargin +

Example

+// Set the x-axel to the month of the years using the
// gloablly available $gDateLocale

$a = $gDateLocale->GetShortMonth();
$graph->xaxis->SetTickLabels($a);
$graph->xaxis->SetFont(FF_FONT2);
+

+

+

 

 

+function SetTickPositions($aMajPos,$aMinPos,$aLabels) +
+ +// Manually specify the major and (optional) minor tick position and labels

+ + + + + + + + +
ArgumentDefaultDescription
+$aMajPos + + No description available
+$aMinPos + + +NULL +No description available
+$aLabels + + +NULL +No description available
+ +

Description
No description available.

+

 

 

+function SetTickSide($aDir) +
+ +Specify what side of the axis the ticks should be at

+ + + + +
ArgumentDefaultDescription
+$aDir + + Specify side
+ +

Description
Specify which side of the axis the tick marks should be on. Valid positions for a horizontal axis are SIDE_TOP, SIDE_BOTTOM and for verticla axis SIDE_LEFT and SIDE_RIGHT. +

+This is a shortform for accessing the tick method directly via the scale in the axis. +

+See topaxisex1.php for real life example. + 
+  

See also
Axis::SetTickDirection +

Example

+$graph->xaxis->SetTickSide(SIDE_TOP); +
+

+

 

 

+function SetTitle($aTitle,$aAdjustAlign) +
+ +Title for axis

+ + + + + + +
ArgumentDefaultDescription
+$aTitle + + Title string
+$aAdjustAlign + + +"high" +Alignment of title along the axis
+ +

Description
Set the title for the axis. You can specify the alignment as being either "high", "middle" and "low". To adjust the titles font and color you have to access the label instance variable. For example, $graph->xaxis->title->SetFont(FF_FONT2,FS_BOLD) 
+ +

Example

+$graph->xaxis->SetTitle('Values for 2002','middle');
+

+

+

 

 

+function SetTitleMargin($aMargin) +
+ +Specify distance from the axis

+ + + + +
ArgumentDefaultDescription
+$aMargin + + Margin in pixels
+ +

Description
Specify the distance between the axis and the title. 
+  
See also
Axis::SetTitle +

Example

+$graph->SetTitlemargin(50); +
+

+

 

 

+function SetTitleSide($aSideOfAxis) +
+ +Specify what side of the axis the title should be at

+ + + + +
ArgumentDefaultDescription
+$aSideOfAxis + + Side
+ +

Description
For horizontal axis the side can be either SIDE_TOP or SIDE_BOTTOM and for vertical axis the position can be either SIDE_LEF or SIDE_RIGHT. +

+By default x-axis have the title below the axis and y-axis have it on the left and y2 on the right. +

+See topaxisex1.php for real life example 
+  

See also
Axis::SetLabelSide and Axis::SetTickSide +

Example

+$graph->xaxis->SetTitleSide(SIDE_TOP);
+

+

+

 

 

+function SetWeight($aWeight) +
+ +Weight of axis

+ + + + +
ArgumentDefaultDescription
+$aWeight + + Weight in pixels
+ +

Description
Specify the thickness of the axis in pixels 
+ +

Example

+$graph->SetWeight(3); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/BarPlot.html b/html/includes/jpgraph/docs/ref/BarPlot.html new file mode 100644 index 0000000000..281fcfb9e1 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/BarPlot.html @@ -0,0 +1,354 @@ +


CLASS BarPlot EXTENDS Plot
+(Defined in: jpgraph_bar.php : 30)
 BarPlot  Plot  
 BarPlot() 
SetAbsWidth() 
SetAlign() 
SetFillColor() 
SetFillGradient() 
SetNoFill() 
SetPattern() 
SetShadow() 
SetValuePos() 
SetWidth() 
SetYBase() 
SetYMin() 
+
 
 

Class usage and Overview
Concrete class which implements the standard vertical bar plot functionality.

+To show horizontal plots you can rotate the graph 90 degrees by $graph->Angle(90); +

  +

See also related classes:
AccBarPlot and GroupBarPlot

 


Class Methods

+

 

 

+function BarPlot(&$datay,$datax) +
+ +Create a new bar plot

+ + + + + + +
ArgumentDefaultDescription
+&$datay + + Data serie
+$datax + + +false +X-positions
+ +

Description
Create a new bar plot 
+ +

Example

+$bar = new BarPlot($ydata);
+

+

+

 

 

+function SetAbsWidth($aWidth) +
+ +Specify width in absolute pixels.

+ + + + +
ArgumentDefaultDescription
+$aWidth + + Width in pixels
+ +

Description
Specify width in absolute pixels. If specified this overrides any calls to SetWidth() 
+  
See also
BarPlot::SetWidth +

Example

+$barplot->SetAbsWidth(20);
+

+

+

 

 

+function SetAlign($aAlign) +
+ +Set the alignment between the major tick marks doe the bars.

+ + + + +
ArgumentDefaultDescription
+$aAlign + + String to specify alignment
+ +

Description
Bars can be aligned when using a text scale. Valid arguments for align are 'left', 'center' and 'right'. +

+Default is to center the bars. 
+ +

Example

+$graph->SetScale("textlin");

// ...

$barplot = new BarPlot($ydata,$xdata);
$barplot->SetAlign("center");

// ...
+

+

+

 

 

+function SetFillColor($aColor) +
+ +Specify fill color for bars.

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color specification
+ +

Description
Set fill color for the bars. The color for the frame around the bar is specified with BarPlot::SetColor() method. + +By specifying an array as argument you can assign individual colors to each of the bars. If there are more bars than colors the colros will wrap around. + 
+  
See also
Plot::SetColor +

Example

+// All bars will have the same color
$barplot->SetFillColor('#E234A9');

// The bars will haev individual colors
$barplot->SetFillColor(array('red','blue','green'));
+

+

+

 

 

+function SetFillGradient($aFromColor,$aToColor,$aStyle) +
+ +Specify a gradient fill for the bars.

+ + + + + + + + +
ArgumentDefaultDescription
+$aFromColor + + No description available
+$aToColor + + +null +No description available
+$aStyle + + +null +No description available
+ +

Description
Gradient fill provides a smooth transition from the 'start' color to the 'end' color. The type of gradient fill can be + + + +Since gradient fills make use of many colors and bitmapped images which doesn't use truecolor is limited to 256 colors you might find yourself out of colors if using to many different gadient fills in your graph. +

+You should also be observant that gradient fills makes use of more CPU time than solid fills. + 
+  

See also
Graph::StrokeBackgroundGrad +

Example

+$barplot->SetFillgradient('orange','darkred',GRAD_VER);
+

+

+

 

 

+function SetNoFill() +
+ +Dont's paint the interior of the bars with any color.

+
+ +

Description
Bar plots are filled by default. Calling this method disable the fill of barplots. + +This is usefull when you have a background in the image that you want to be shown underneth the bars. 
+  
See also
BarPlot::SetFillColor +

Example

+$barplot->SetNoFill();
+

+

+

 

 

+function SetPattern($aPattern,$aColor) +
+ +Add one of the line patterns to the bar

+ + + + + + +
ArgumentDefaultDescription
+$aPattern + + Pattern
+$aColor + + +'black' +Color of pattern
+ +

Description
Add one of the line patterns as fill effect to the bar. Available patterns are: +
    +
  1. 'PATTERN_DIAG1' +
  2. 'PATTERN_DIAG2' +
  3. 'PATTERN_DIAG3' +
  4. 'PATTERN_DIAG4' +
  5. 'PATTERN_CROSS1' +
  6. 'PATTERN_CROSS2' +
  7. 'PATTERN_CROSS3' +
  8. 'PATTERN_CROSS4' +
  9. 'PATTERN_STRIPE1' +
  10. 'PATTERN_STRIPE2' +

+ +

Example

+$barplot->SetPattern('PATTERN_CROSS2');
+

+

+

 

 

+function SetShadow($color,$hsize,$vsize,$show) +
+ +Set a drop shadow for the bar (or rather an "up-right" shadow)

+ + + + + + + + + + +
ArgumentDefaultDescription
+$color + + +"black" +Shadow color
+$hsize + + +3 +Horizontal size in pixels
+$vsize + + +3 +Vertical size in pixels
+$show + + +true +TRUE=Display shadow
+ +

Description
Set a drop shadow for the bar (or rather an "up-right" shadow) 
+ +

Example

+$barplot->SetShadow();
+

+

+

 

 

+function SetValuePos($aPos) +
+ +Specify position for displayed values on bars

+ + + + +
ArgumentDefaultDescription
+$aPos + + Postision
+ +

Description
Specify position for the values on the bar. Teh position can either be +
+ +

Example

+// Put the values in the middle of the bars
$barplot->SetValuePos('center');
+

+

+

 

 

+function SetWidth($aWidth) +
+ +Specify width as fractions of the major step size

+ + + + +
ArgumentDefaultDescription
+$aWidth + + No description available
+ +

Description
Specify width as fractions of the major step size when the scale used is a text scale (which is the normal scale to use for bars). + +If the X-axis scale is a linear scale (i.e. lin, int or date) then the width must be specified in absolute pixels. 
+  
See also
BarPlot::SetAbsWidth +

Example

+// Specify fractions for a text scale
$barplot->SetWidth(0.4);

// Specify absolute width 25 pixels
$barplot->SetWidth(25);
+

+

+

 

 

+function SetYBase($aYStartValue) +
+ +Specify the base value for the bars

+ + + + +
ArgumentDefaultDescription
+$aYStartValue + + Strta Y-value for bars.
+ +

Description
Specify the start plot for bars, (minimum Y-value). By default the base uses the value 0 as base. 
+ +

Example

+$barplot->SetYBase(100);
+

+

+

 

 

+function SetYMin($aYStartValue) +
+ +DEPRECATED use SetYBase instead

+ + + + +
ArgumentDefaultDescription
+$aYStartValue + + Y-Value for base of bars
+ +

Description
DEPRECATED use SetYBase() instead 
+ +

Example

+DEPRECATED use SetYBase() instead +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Bezier.html b/html/includes/jpgraph/docs/ref/Bezier.html new file mode 100644 index 0000000000..77c56e3434 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Bezier.html @@ -0,0 +1,91 @@ +


CLASS Bezier
+(Defined in: jpgraph_regstat.php : 112)
 Bezier 
 Bezier() 
Get() 
+
 

Class usage and Overview
Utility class to help construct an interpolated data points given an arbitrary number of data points. +

+This class doesn't draw any graphs by itself it is only used to generate a new set of data points representing the smooth line from the input which are the control lines for a bezier interpolated curve. +

+The principle of using this class is that you first create an instance of this class and giving it the X,Y values for your control points. +

+You can then get back an interpolated smooth dataset by calling the Get() method. This method takeas as argument how many data points you want the interpolated graph to have. +

+In order to use this method the file jpgraph_regstat.php must be included. +

+Technical note: The control points for a bezier curve does not necessary lie on the curve. Using the alternative method of spline interpolation guarantees that the specified control point lie on the generated curve. +

+Technical note 2: An alternmative Bezier curve is also availabe in the Canvas tools (jpgraph_canvtools.php). The difference is that that method will not return any data points it will directly draw an interpolate bezier curve on the canvas. +

  +

See also related classes:
Spline and Shape

 


Class Methods

+

 

 

+function Bezier($datax,$datay,$attraction_factor,,) +
+ +Create a new bezier object

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$datax + + X-coordinates for control points
+$datay + + Y-coordinates for control points
+$attraction_factor + + Attraction factor
+ + + No description available
+ + + +1 +No description available
+ +

Description
Creates a new Bezier interpoaltion object. The arguments specifies the X, and Y coordinate sof the control points to be used. + +The attraction factor is an integer >1 and determines how much "gracity" each control point should have. A higher value makes the resulting curve bend much more sharper against the control points. The default value is 1. 
+ +

Example

+// Control points
$xdata = array(1,3,12,15);
$ydata = array(5,15,2,19);

// Get the interpolated values by creating
// a new bezier object.
$bez = new Bezier($xdata,$ydata);

// For the new data set we want 50 points to
// get a smooth curve.
list($newx,$newy) = $bez->Get(50);
+

+

+

 

 

+function Get($steps) +
+ +Return two arrays of X and Y coordinates that represents the curve

+ + + + +
ArgumentDefaultDescription
+$steps + + Number of data points
+ +

Description
Return a data set representing the interpolated smooth curve passing through all the specified control points. 
+
+
Returns
array($datax,$datay)
+ +

Example

+// Control points for bezier curve
$xdata = array(1,3,12,15);
$ydata = array(5,15,2,19);

// Get the interpolated values by creating
// a new Spline object.
$bez = new Bezier($xdata,$ydata);

// For the new data set we want 50 points to
// get a smooth curve.
list($newx,$newy) = $bez->Get(50);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/BoxPlot.html b/html/includes/jpgraph/docs/ref/BoxPlot.html new file mode 100644 index 0000000000..f1bf939f22 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/BoxPlot.html @@ -0,0 +1,68 @@ +


CLASS BoxPlot EXTENDS StockPlot
+(Defined in: jpgraph_stock.php : 158)
 BoxPlot  StockPlot  
 BoxPlot() 
SetMedianColor() 
+
 
 

Class usage and Overview
Create a box plot. This is the same as a stock plot but with the added feature of a median line. For each X-value 5 Y values must be specified: +(open,close,min,max,median) +

  +

See also related classes:
StockPlot

 


Class Methods

+

 

 

+function BoxPlot($datay,$datax) +
+ +Create a new Box plot

+ + + + + + +
ArgumentDefaultDescription
+$datay + + Y-tuples
+$datax + + +false +If specified, X-positions
+ +

Description
Create a new Box plot. Each data point in a box plotconsists of 5 values; (open,close,min,max,median) + + 
+  
See also
StockPlot::StockPlot +

Example

+$bplot = new BoxPlot($ydata); +
+

+

 

 

+function SetMedianColor($aPos,$aNeg) +
+ +Specify color for median line

+ + + + + + +
ArgumentDefaultDescription
+$aPos + + Positive color
+$aNeg + + Negative color
+ +

Description
Specify color for median line.  
+ +

Example

+$bplot->SetMedianColor('black','white'); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/CanvasGraph.html b/html/includes/jpgraph/docs/ref/CanvasGraph.html new file mode 100644 index 0000000000..42b95dfac0 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/CanvasGraph.html @@ -0,0 +1,103 @@ +


CLASS CanvasGraph EXTENDS Graph
+(Defined in: jpgraph_canvas.php : 20)
 CanvasGraph  Graph  
 CanvasGraph() 
InitFrame() 
Stroke() 
+
 
 

Class usage and Overview
If you for some reason just want plain canvas to draw on using the direct drawing method you can create a new canvas with this class. +

+The canvas is meant to be manipulated through the Image class which can be found as an instance variable ($graph->img) in the canvas class. +

+Please remeber taht using the drawing methods in the Image class assumes screen (pixels) coordinates. +

  +

See also related classes:
Graph

 


Class Methods

+

 

 

+function CanvasGraph($aWidth,$aHeight,$aCachedName,$timeout,$inline) +
+ +Construct a new Cnavas graph

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aWidth + + +300 +Width of graph
+$aHeight + + +200 +Height of graph
+$aCachedName + + +"" +Cache file name
+$timeout + + +0 +Cache timeout
+$inline + + +1 +Inline or not
+ +

Description
See Graph::Graph() for description, this method is identical. 
+  
See also
Graph::Graph +

Example

+// Create a new canvas and draw a line from top left to
// bottom right
$canvas = new CanvasGraph(300,200);
$canvas->img->SetColor('black*);
$canvas->img->Line(0,0,300,200);
$canvas->Stroke();
+

+

+

 

 

+function InitFrame() +
+ +Strokes plot area and margin

+
+ +

Description
Calling this method will fill the margin (with the margin color) and fill the plot area with the plot color. You should call this method before stroking anything else to the canvas as otherwise what you have stroken will be overwritten. 
+ +

Example

+// Setup a basic canvas we can work 
$g = new CanvasGraph(400,200,'auto');
$g->SetMargin(5,11,6,11);
$g->SetShadow();
$g->SetMarginColor("teal");

// We need to stroke the plotarea and margin before we add the
// text since we otherwise would overwrite the text.
$g->InitFrame();

// Draw a text box in the middle
$txt="This\nis\na TEXT!!!";
$t = new Text($txt,200,10);
$t->SetFont(FF_ARIAL,FS_BOLD,40);

// Stroke the text
$t->Stroke($g->img);

// Stroke the graph
$g->Stroke();
+

+

+

 

 

+function Stroke($aStrokeFileName) +
+ +Stroke graph to browser or file

+ + + + +
ArgumentDefaultDescription
+$aStrokeFileName + + +"" +Filename to stroke to
+ +

Description
Stroke a file to browser or file. See Graph::Stroke() for more details. 
+  
See also
Graph::Stroke +

Example

+$canvas->Stroke(); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/CanvasRectangleText.html b/html/includes/jpgraph/docs/ref/CanvasRectangleText.html new file mode 100644 index 0000000000..87da93e116 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/CanvasRectangleText.html @@ -0,0 +1,432 @@ +


CLASS CanvasRectangleText
+(Defined in: jpgraph_canvtools.php : 375)
 CanvasRectangleText 
 CanvasRectangleText() 
ParagraphAlign() 
Pos() 
Set() 
SetAutoMargin() 
SetColor() 
SetCornerRadius() 
SetFillColor() 
SetFont() 
SetFontColor() 
SetPos() 
SetShadow() 
SetTxt() 
Stroke() 
+
 

Class usage and Overview
YOu can use this class to convieniently draw a text on canvas. The text may have multiple lines wher each line is separated by a "\n" (newline) character. +

+The text may also be enclosed in a rounded (possibly filled) rectangle. +

  +

See also related classes:
CanvasGraph and CanvasScale

 


Class Methods

+

 

 

+function CanvasRectangleText($aTxt,$xl,$yt,$w,$h) +
+ +Draws a text paragraph inside a rounded, possibly filled, rectangle

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aTxt + + +'' +Text
+$xl + + +0 +Top left X
+$yt + + +0 +Top left Y
+$w + + +0 +Width
+$h + + +0 +Height
+ +

Description
Draws a text paragraph inside a rounded, possible filled, rectangle. 
+ +

Example

+
$t = new CanvasRectangleText();
$t->SetFillColor('lightgreen');
$t->SetFontColor('navy');
$t->SetFont(FF_ARIAL,FS_NORMAL,16);
$t->Set("\n\n\n\n\n\n\n\n\n\n\nTTF Fonts",0.5,19,26,32);
$t->Stroke($g->img,$scale);
+

+

+

 

 

+function ParagraphAlign($aParaAlign) +
+ +Specify paragraph alignment for the text

+ + + + +
ArgumentDefaultDescription
+$aParaAlign + + Alignment
+ +

Description
Specify paragraph alignment for the text. Alignments can be: + + 
+ +

Example

+
$g = new CanvasGraph(550,450);
$scale = new CanvasScale($g);
$scale->Set(0,27,0,53);
//
$t = new CanvasRectangleText();
$t->SetFillColor('lightgreen');
$t->SetFontColor('navy');
$t->SetFont(FF_ARIAL,FS_NORMAL,16);
$t->ParagraphAlign('center');
$t->Set("First line\nSecond line",0.5,19,26,32);
$t->Stroke($g->img,$scale);
+

+

+

 

 

+function Pos($xl,$yt,$w,$h) +
+ +Specify position for text

+ + + + + + + + + + +
ArgumentDefaultDescription
+$xl + + +0 +Top left X
+$yt + + +0 +Top left Y
+$w + + +0 +Width
+$h + + +0 +Height
+ +

Description
Set position for text. All coordinates will be translaed according to the current scale used. + 
+

+

 

 

+function Set($aTxt,$xl,$yt,$w,$h) +
+ +Specify the text and position

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aTxt + + Text
+$xl + + Top left X
+$yt + + Top left Y
+$w + + +0 +Width
+$h + + +0 +Height
+ +

Description
Specify the text and position. All coordinates will be translated using the specified scale when stroked. 
+ +

Example

+$t->SetShadow('');
$t->SetFont(FF_ARIAL,FS_BOLD,18);
$t->Set('Family',1,1,8);
$t->Stroke($g->img,$scale);
+

+

+

 

 

+function SetAutoMargin($aMargin) +
+ +Specify auto margin when no specific size is specified

+ + + + +
ArgumentDefaultDescription
+$aMargin + + Margin in pixels
+ +

Description
Specify auto margin when no specific size is specified. This margin is used to add extra space around the text and the border around the text. 
+

+

 

 

+function SetColor($aColor) +
+ +Set border color for rectangle

+ + + + +
ArgumentDefaultDescription
+$aColor + + Border color
+ +

Description
Set border color for rectangle 
+  
See also
CanvasRectangleText::SetFontColor and CanvasRectangleText::SetFillColor +

Example

+$t->SetColor('navy'); +
+

+

 

 

+function SetCornerRadius($aRad) +
+ +Set radius for corners

+ + + + +
ArgumentDefaultDescription
+$aRad + + +5 +Radius in pixels
+ +

Description
Specify the radius for the rounded corners. Specifying the value as 0 will give normal square corners. + + 
+ +

Example

+$t->SetCornerRadius(15); +
+

+

 

 

+function SetFillColor($aFillColor) +
+ +Specify fill color for rectangle

+ + + + +
ArgumentDefaultDescription
+$aFillColor + + Color
+ +

Description
Specify fill color for rectangle 
+ +

Example

+$t->SetFillColor('#12A73C');

+

+

+

 

 

+function SetFont($FontFam,$aFontStyle,$aFontSize) +
+ +Specify font

+ + + + + + + + +
ArgumentDefaultDescription
+$FontFam + + Font family
+$aFontStyle + + Font style
+$aFontSize + + +12 +Font size
+ +

Description
Specify font 
+ +

Example

+$t->SetFont(FF_ARIAL,FS_BOLD,24); +
+

+

 

 

+function SetFontColor($aColor) +
+ +Specify text (font) color

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color specification
+ +

Description
Set color for text. Use SetColor() to specify border colro and SetFillColor() to set fill color. 
+  
See also
CanvasRectangleText::SetColor and CanvasRectangleText::SetFillColor +

Example

+$t->SetFontCOlor('black') +
+

+

 

 

+function SetPos($xl,$yt,$w,$h) +
+ +Specify position

+ + + + + + + + + + +
ArgumentDefaultDescription
+$xl + + +0 +Top left X
+$yt + + +0 +Top left Y
+$w + + +0 +Width
+$h + + +0 +Height
+ +

Description
Specify position. All coordinates will be transalted with the specified scale when stroked. 
+

+

 

 

+function SetShadow($aColor,$aWidth) +
+ +Add a drop shadow

+ + + + + + +
ArgumentDefaultDescription
+$aColor + + +'gray' +Color of shadow
+$aWidth + + +3 +Width of shadow
+ +

Description
Add a drop shadow to the rounded reactangle surranding the text 
+ +

Example

+$t->SetShadow();  // Use default values
+

+

+

 

 

+function SetTxt($aTxt) +
+ +Specify text string

+ + + + +
ArgumentDefaultDescription
+$aTxt + + Textt
+ +

Description
Set text string to be displayed. The text string may have multiple lines separated by a newline character "\n" 
+ +

Example

+$t->Set("This is a text!");
+

+

+

 

 

+function Stroke($aImg,$scale) +
+ +Stroke text to canvas

+ + + + + + +
ArgumentDefaultDescription
+$aImg + + Image context
+$scale + + Scale
+ +

Description
Stroke text to canvas 
+  
See also
CanvasScale::CanvasScale +

Example

+$t->Stroke($graph->img,$scale);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/CanvasScale.html b/html/includes/jpgraph/docs/ref/CanvasScale.html new file mode 100644 index 0000000000..0c6493db81 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/CanvasScale.html @@ -0,0 +1,161 @@ +


CLASS CanvasScale
+(Defined in: jpgraph_canvtools.php : 24)
 CanvasScale 
 CanvasScale() 
Set() 
Translate() 
TranslateX() 
TranslateY() 
+
 

Class usage and Overview
This class defines a scale which is meant to be used with canvas graphs to make it possibles to pecify a more convinient scale compared to absoilute pixels coordinates. +
+This will also let you scale the canvas without any coordinate changes.

  +


Class Methods

+

 

 

+function CanvasScale(&$graph,$xmin,$xmax,$ymin,$ymax) +
+ +Define a scale for canvas graphs

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+&$graph + + Canvas graph
+$xmin + + +0 +Min X-value for scale
+$xmax + + +10 +Max X-value for scale
+$ymin + + +0 +Min Y-value for scale
+$ymax + + +10 +Max Y-value for scale
+ +

Description
Define a scale for canvas graphs. Note the scale values is optionally in this call. The may be later set witha call to the Set() method. 
+  
See also
CanvasScale::Set

+

 

 

+function Set($xmin,$xmax,$ymin,$ymax) +
+ +Specify scale to use

+ + + + + + + + + + +
ArgumentDefaultDescription
+$xmin + + +0 +Min X value
+$xmax + + +10 +Max X-value
+$ymin + + +0 +Min Y-value
+$ymax + + +10 +Max Y-value
+ +

Description
SPecify min/max values for scale. 
+ +

Example

+// Setup a basic canvas we can work 
$g = new CanvasGraph(400,200,'auto');
$g->SetMargin(5,11,6,11);
$g->SetShadow();
$g->SetMarginColor("teal");

// We need to stroke the plotarea and margin before we add the
// text since we otherwise would overwrite the text.
$g->InitFrame();

// Create a new scale
$scale = new CanvasScale($g);
$scale->Set(0,$xmax,0,$ymax);
+

+

+

 

 

+function Translate($x,$y) +
+ +Translate a point to absolute screen coordinates

+ + + + + + +
ArgumentDefaultDescription
+$x + + X-value
+$y + + Y-value
+ +

Description
Translate a point to absolute screen coordinates 
+  
See also
CanvasScale::TranslateX and CanvasScale::TranslateY +

Example

+list($xt,$yt) = $scale->Translate($x,$y);
$graph->img->Point($xt,$yt);
+

+

+

 

 

+function TranslateX($x) +
+ +Translate X-coordinate

+ + + + +
ArgumentDefaultDescription
+$x + + X-value
+ +

Description
Translate X-value into absolute screen coordinates 
+  
See also
CanvasScale::Translate

+

 

 

+function TranslateY($y) +
+ +Translate Y-value to absolute screen coordinates

+ + + + +
ArgumentDefaultDescription
+$y + + Y-value
+ +

Description
Translate Y-value to absolute screen coordinates 
+  
See also
CanvasScale::Translate


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/DateLocale.html b/html/includes/jpgraph/docs/ref/DateLocale.html new file mode 100644 index 0000000000..af81422002 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/DateLocale.html @@ -0,0 +1,543 @@ +


CLASS DateLocale
+(Defined in: jpgraph.php : 317)
 DateLocale 
 DateLocale() 
GetDayAbb() 
GetLongMonthName() 
GetMonth() 
GetShortDay() 
GetShortMonth() 
GetShortMonthName() 
Set() 
+
 

Class usage and Overview
This class is mainly used (so far) by the Gantt graphs to get localized names of weekdays and months. There is nothing that prevents you from using this to get hold of localized names in your script. +

+To help with this JpGraph instantiates the global variable $gDateLocale which can be used to access the methods. +

+A quick example could be to for example get hold of the shortform of the names of the month to use as labels. By default this is set to the dafult locale for the installation. +

+// Get localized array of short form of month names +$months = $gDateLocale->GetShortMonth();

  +


Class Methods

+

 

 

+function DateLocale() +
+ +Constructor

+
+ +

Description
Construct a new DateLocale. 
+ +

Example

+$dateLocale = new DateLocale();
// Use Swedish locale
$dateLocale->Set('sv_SE');
+

+

+

 

 

+function GetDayAbb() +
+ +Return array with day abbreviation in the current locale.

+
+ +

Description
Returns an array with the abbrevation for weekdays using the current locale. 
+  
See also
DateLocale::GetShortDay +

Example

+$weekdays = $gDateLocale->GetDayAbb(); +
+

+

 

 

+function GetLongMonthName($aNbr) +
+ +Get long month name for the specified month

+ + + + +
ArgumentDefaultDescription
+$aNbr + + Number of month [0-11]
+ +

Description
Get the full month name as specified by integer 0-11 
+  
See also
DateLocale::GetShortMonthName and DateLocale::GetShortMonth +

Example

+$jan = $gDateLocale->GetLongMonthName(0);
+

+

+

 

 

+function GetMonth() +
+ +Get array of all month names

+
+ +

Description
Return an array with all months of the year in their long form. 
+  
See also
DateLocale::GetShortMonth +

Example

+$allmonths = $gDateLocale->GetMonth();
$graph->xaxis->SetTickLabels($allmonths);
+

+

+

 

 

+function GetShortDay() +
+ +Return an array with all weekdays in the short form.

+
+ +

Description
Return an array with all weekdays in the short form according to the specified locale. + +For english locale this would return +array('Mon','Tue','Wed','Thu','Fri','Sat','Sun'); 
+ +

Example

+$alldays = $gDateLocale->GetShortDay(); +
+

+

 

 

+function GetShortMonth() +
+ +Short month description

+
+ +

Description
Return an array of the short names for all months 
+ +

Example

+$allmonths = $gDateLocale->GetShortMonth(); +
+

+

 

 

+function GetShortMonthName($aNbr) +
+ +Return the short month name for the specified month.

+ + + + +
ArgumentDefaultDescription
+$aNbr + + Number of month [0-11]
+ +

Description
Return the short month name for the specified month. 
+  
See also
DateLocale::GetLongMonthName +

Example

+$april = $gDateLocale->GetShortMonthName(3); +
+

+

 

 

+function Set($aLocale) +
+ +Set locale

+ + + + +
ArgumentDefaultDescription
+$aLocale + + Locale
+ +

Description
See PHP manual for more details. The argument should be a valid locale setting. For example 'EN_US' or 'EN_UK' + +The following table lists some commonly used locales. The exact locales available depends on the system + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
af_ZAar_AEar_AE.utf8
ar_BHar_BHar_BH.utf8ar_DZar_DZ.utf8
ar_EGar_EGar_EG.utf8ar_INar_IQ
ar_IQ.utf8ar_IQ.utf8ar_JOar_JO.utf8ar_KW
ar_KW.utf8ar_KW.utf8ar_LBar_LB.utf8ar_LY
ar_LY.utf8ar_LY.utf8ar_MAar_MA.utf8ar_OM
ar_OM.utf8ar_OM.utf8ar_QAar_QA.utf8ar_SA
ar_SA.utf8ar_SA.utf8ar_SDar_SD.utf8ar_SY
ar_SY.utf8ar_SY.utf8ar_TNar_TN.utf8ar_YE
ar_YE.utf8ar_YE.utf8be_BYbe_BY.utf8bg_BG
bg_BG.utf8bg_BG.utf8bokmalbokm?lbr_FR
bs_BAbs_BAca_ESca_ES.utf8ca_ES@euro
catalancatalancroatiancs_CZcs_CZ.utf8
cy_GBcy_GBczechda_DKda_DK.utf8
danishdanishdanskde_ATde_AT.utf8
de_AT@eurode_AT@eurode_BEde_BE@eurode_CH
de_CH.utf8de_CH.utf8de_DEde_DE.utf8de_DE@euro
de_LUde_LUde_LU.utf8de_LU@eurodeutsch
dutchdutcheestiel_GRel_GR.utf8
en_AUen_AUen_AU.utf8en_BEen_BE.utf8
en_BE@euroen_BE@euroen_BWen_CAen_CA.utf8
en_DKen_DKen_GBen_GB.utf8en_HK
en_IEen_IEen_IE.utf8en_IE@euroen_IN
en_NZen_NZen_NZ.utf8en_PHen_SG
en_USen_USen_US.utf8en_ZAen_ZA.utf8
en_ZWen_ZWes_ARes_AR.utf8es_BO
es_BO.utf8es_BO.utf8es_CLes_CL.utf8es_CO
es_CO.utf8es_CO.utf8es_CRes_CR.utf8es_DO
es_DO.utf8es_DO.utf8es_ECes_EC.utf8es_ES
es_ES.utf8es_ES.utf8es_ES@euroes_GTes_GT.utf8
es_HNes_HNes_HN.utf8es_MXes_MX.utf8
es_NIes_NIes_NI.utf8es_PAes_PA.utf8
es_PEes_PEes_PE.utf8es_PRes_PR.utf8
es_PYes_PYes_PY.utf8es_SVes_SV.utf8
es_USes_USes_UYes_UY.utf8es_VE
es_VE.utf8es_VE.utf8estonianet_EEet_EE.utf8
eu_ESeu_ESeu_ES@eurofa_IR.utf8fi_FI
fi_FI.utf8fi_FI.utf8fi_FI@eurofinnishfo_FO
fo_FO.utf8fo_FO.utf8fr_BEfr_BE.utf8fr_BE@euro
fr_CAfr_CAfr_CA.utf8fr_CHfr_CH.utf8
fr_FRfr_FRfr_FR.utf8fr_FR@eurofr_LU
fr_LU.utf8fr_LU.utf8fr_LU@eurofran?aisfrench
ga_IEga_IEga_IE.utf8ga_IE@eurogalego
galiciangaliciangermangl_ESgl_ES.utf8
gl_ES@eurogl_ES@eurogreekgv_GBhe_IL
he_IL.utf8he_IL.utf8hebrewhi_IN.utf8hr_HR
hr_HR.utf8hr_HR.utf8hrvatskihu_HUhu_HU.utf8
hungarianhungarianicelandicid_IDid_ID.utf8
is_ISis_ISis_IS.utf8it_CHit_CH.utf8
it_ITit_ITit_IT.utf8it_IT@euroitalian
iw_ILiw_ILja_JPja_JP.eucjpja_JP.sjis
ja_JP.ujisja_JP.ujisja_JP.utf8japanesejapanese.euc
japanese.sjisjapanese.sjiska_GEkl_GLkl_GL.utf8
ko_KRko_KRko_KR.euckrko_KR.utf8korean
korean.euckorean.euckw_GBlithuanianlt_LT
lt_LT.utf8lt_LT.utf8lv_LVlv_LV.utf8mi_NZ
mk_MKmk_MKmk_MK.utf8mr_IN.utf8ms_MY
mt_MTmt_MTnb_NOnb_NO.ISO-8859-1nl_BE
nl_BE.utf8nl_BE.utf8nl_BE@euronl_NLnl_NL.utf8
nl_NL@euronl_NL@euronn_NOno_NOno_NO.utf8
norwegiannorwegiannynorskoc_FRpl_PL
pl_PL.utf8pl_PL.utf8polishportuguesept_BR
pt_BR.utf8pt_BR.utf8pt_PTpt_PT.utf8pt_PT@euro
ro_ROro_ROro_RO.utf8romanianru_RU
ru_RU.koi8rru_RU.koi8rru_RU.utf8ru_UArussian
sh_YUsh_YUsh_YU.utf8sk_SKsk_SK.utf8
sl_SIsl_SIsl_SI.utf8slovakslovene
slovenianslovenianspanishsq_ALsq_AL.utf8
sr_YUsr_YUsr_YU.utf8sr_YU@cyrillicsv_FI
sv_FI.utf8sv_FI.utf8sv_FI@eurosv_SEsv_SE.utf8
swedishswedishta_INte_INtg_TJ
th_THth_THth_TH.utf8thaitl_PH
tr_TRtr_TRtr_TR.utf8turkishuk_UA
uk_UA.utf8uk_UA.utf8ur_PKuz_UZvi_VN
vi_VN.utf8vi_VN.utf8yi_USzh_CNzh_CN.gb18030
zh_CN.gbkzh_CN.gbkzh_CN.utf8zh_HKzh_HK.utf8
zh_TWzh_TWzh_TW.euctwzh_TW.utf8
 
+ +

Example

+$gDateLocale->Set('sv_SE'); // Set Swedish locale +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/DateScale.html b/html/includes/jpgraph/docs/ref/DateScale.html new file mode 100644 index 0000000000..4fefe8bef6 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/DateScale.html @@ -0,0 +1,154 @@ +


CLASS DateScale EXTENDS LinearScale
+(Defined in: jpgraph_date.php : 49)
 DateScale  LinearScale  
 AdjustForDST() 
SetDateAlign() 
SetDateFormat() 
SetTimeAlign() 
+
 
 

Class usage and Overview
Module used to create a date/time X-axis scale

  +


Class Methods

+

 

 

+function AdjustForDST($aFlg) +
+ +

+ + + + +
ArgumentDefaultDescription
+$aFlg + + +true +No description available
+ +

Description
No description available.

+

 

 

+function SetDateAlign($aStartAlign,$aEndAlign) +
+ +Specify start and end date alignment for the scale

+ + + + + + +
ArgumentDefaultDescription
+$aStartAlign + + Start alignment
+$aEndAlign + + +false +End alignment
+ +

Description
Specify start and end date alignment for the scale +Possible values are +
    +
  1. Alignment on a day basis +
      +
    • DAYADJ_1, Align on the start of a day +
    • DAYADJ_7, Align on the start of a week +
    • DAYADJ_WEEK, Synonym to DAYADJ_7 +
    + +
  2. Alignment on a monthly basis +
      +
    • MONTHADJ_1, Align on a month start +
    • MONTHADJ_6, Align on the start of halfyear +
    + +
  3. Alignment on a yearly basis +
      +
    • YEARADJ_1, Align on a year +
    • YEARADJ_2, Align on a bi-yearly basis +
    • YEARADJ_5, Align on a 5 year basis +
    +

+  
See also
DateScale::SetTimeAlign +

Example

+$graph->xaxis->scale->SetDateAlign(DAYADJ_1); +
+

+

 

 

+function SetDateFormat($aFormat) +
+ +// Overrides the automatic determined date format. Must be a valid date() format string

+ + + + +
ArgumentDefaultDescription
+$aFormat + + No description available
+ +

Description
No description available.

+

 

 

+function SetTimeAlign($aStartAlign,$aEndAlign) +
+ +Specify start and end date alignment for the scale

+ + + + + + +
ArgumentDefaultDescription
+$aStartAlign + + Start time alignment
+$aEndAlign + + +false +End time alignment
+ +

Description
Specify the start and end alignment with the time granularity. For date granularity see SetDateAlign(). Note that only one of SetDateAlign() and SetTimeAlign() can be used. + +For start and end alignment the following values are valid + +
    +
  1. Alignment on seconds +
      +
    • MINADJ_1, Align on a single second (This is the lowest resolution) +
    • MINADJ_5, Align on the nearest 5 seconds +
    • MINADJ_10, Align on the nearest 10 seconds +
    • MINADJ_15, Align on the nearest 15 seconds +
    • MINADJ_30, Align on the nearest 30 seconds +
    +
  2. Alignment on minutes +
      +
    • MINADJ_1, Align to the nearest minute +
    • MINADJ_5, Align on the nearest 5 minutes +
    • MINADJ_10, Align on the nearest 10 minutes +
    • MINADJ_15, Align on the nearest 15 minutes +
    • MINADJ_30, Align on the nearest 30 minutes +
    +
  3. Alignment on hours +
      +
    • HOURADJ_1, Align to the nearest hour +
    • HOURADJ_2, Align to the nearest two hour +
    • HOURADJ_3, Align to the nearest three hour +
    • HOURADJ_4, Align to the nearest four hour +
    • HOURADJ_6, Align to the nearest six hour +
    • HOURADJ_12, Align to the nearest tolw hour +
    +

+  
See also
DateScale::SetDateAlign +

Example

+$graph->xaxis->scale->SetTimeAlign(MINADJ_15); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/DigitalLED74.html b/html/includes/jpgraph/docs/ref/DigitalLED74.html new file mode 100644 index 0000000000..0fc4dca2e5 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/DigitalLED74.html @@ -0,0 +1,88 @@ +


CLASS DigitalLED74
+(Defined in: jpgraph_led.php : 24)
 DigitalLED74 
 DigitalLED74() 
SetSupersampling() 
StrokeNumber() 
+
 

Class usage and Overview

  +


Class Methods

+

 

 

+function DigitalLED74($aRadius,$aMargin) +
+ +Constructor for 4x7 module LED digits

+ + + + + + +
ArgumentDefaultDescription
+$aRadius + + Radius in pixel for each "led"
+$aMargin + + Margin around the "led"
+ +

Description
Instantiate a LED digit class that is used to genereta text which looks like LED digits 
+
+
Returns
An instance of the LED class
+  
See also
DigitalLED74::SetSupersampling and DigitalLED74::StrokeNumber +

Example

+$led = new DigitalLED74();
$led->StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_GREEN);
+

+

+

 

 

+function SetSupersampling($aSuperSampling) +
+ +Set level of supersampling used in the creation led digits

+ + + + +
ArgumentDefaultDescription
+$aSuperSampling + + Level of supersampling
+ +

Description
Specifies the amount of oversampling that sould be used to create a smoother looking image. A higher value will generate a smoother image. + +The value used for supersampling should be an integer in the range 2-4. A higher value could be used but the increase in CPU time will not generate any perceivable improvements in image quality. + +For each integer step increased supersampling the processor time needed is multipled by 2 
+
+
Returns
void
+ +

Example

+$led = new DigitalLED74(5);
$led->SetSupersampling(4);
$led->StrokeNumber('ABC123.',LEDC_RED); 
+

+

+

 

 

+function StrokeNumber($aValStr,$aColor) +
+ +// Margin in between "Led" dots

+ + + + + + +
ArgumentDefaultDescription
+$aValStr + + No description available
+$aColor + + +0 +No description available
+ +

Description
No description available.


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/DisplayValue.html b/html/includes/jpgraph/docs/ref/DisplayValue.html new file mode 100644 index 0000000000..d5131b5413 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/DisplayValue.html @@ -0,0 +1,251 @@ +


CLASS DisplayValue
+(Defined in: jpgraph.php : 5517)
 DisplayValue 
 HideZero() 
SetAlign() 
SetAngle() 
SetColor() 
SetFont() 
SetFormat() 
SetFormatCallback() 
SetMargin() 
Show() 
+
 

Class usage and Overview
Property class which is used to represent the display value for graphs. For line and bar graphs they represent the propertied of the value that can be displayed at each data point. For bars it represents the value of each bar that can be displayed at top of the bars. +

+This class should never be used directly instead this is an internal class which is accessed through it's instance variable, for example, +

+ +$lineplot = new LinePlot($datay); +// Access the instance of DisplayValue +$lineplot->value->Show();

  +

See also related classes:
LinePlot and BarPlot

 


Class Methods

+

 

 

+function HideZero($aFlag) +
+ +Hide zero values

+ + + + +
ArgumentDefaultDescription
+$aFlag + + +true +True=Hide zero values
+ +

Description
Hide labels that have zero value 
+  
See also
DisplayValue::SetFormat and DisplayValue::SetFormatCallback +

Example

+$pieplot->value->HideZero(); +
+

+

 

 

+function SetAlign($aHAlign,$aVAlign) +
+ +Specify horizontal and vertical alignment

+ + + + + + +
ArgumentDefaultDescription
+$aHAlign + + Horizontal alignment
+$aVAlign + + +'' +Vertical alignment
+ +

Description
Specify the alignment of the display value in relation to the data point. Possible values are 'left', 'right', 'center' 
+ +

Example

+$lineplot->value->SetAlign('center');
$lineplot->value->Show();
+

+

+

 

 

+function SetAngle($aAngle) +
+ +Rotate the value a specified angle

+ + + + +
ArgumentDefaultDescription
+$aAngle + + Angle in degrees
+ +

Description
Roates the text label a number of degrees. 0 degrees is horizontal. +

+Please rememberthat you must use TTF fonts if you need any angle other than 0 or 90 degrees (horizontal or vertical) 
+  

See also
DisplayValue::SetFont +

Example

+$bplot = new barPlot($datay);

// Setup the values that are displayed on top of each bar
$bplot->value->Show();

// Must use TTF fonts if we want text at an arbitrary angle
$bplot->value->SetFont(FF_ARIAL,FS_BOLD);
$bplot->value->SetAngle(45);

// Black color for positive values and darkred for negative values
$bplot->value->SetColor("black","darkred");
+

+

+

 

 

+function SetColor($aColor,$aNegcolor) +
+ +Specify color for values

+ + + + + + +
ArgumentDefaultDescription
+$aColor + + Color for positive values
+$aNegcolor + + +"" +Color for negative values
+ +

Description
Specify the value for the labels. You can have one color for positive and one color for negative values. If no negative color value is specified it will be the same as the positive color. 
+ +

Example

+// Black color for positive values and darkred for negative values
$bplot->value->SetColor("black","darkred");
+

+

+

 

 

+function SetFont($aFontFamily,$aFontStyle,$aFontSize) +
+ +Specify font for values

+ + + + + + + + +
ArgumentDefaultDescription
+$aFontFamily + + Font family
+$aFontStyle + + +FS_NORMAL +Font style
+$aFontSize + + +10 +Font size
+ +

Description
Specify font for display value 
+  
See also
DisplayValue::SetAngle +

Example

+// Must use TTF fonts if we want text at an arbitrary angle
$bplot->value->SetFont(FF_ARIAL,FS_BOLD);
+

+

+

 

 

+function SetFormat($aFormat,$aNegFormat) +
+ +Specify printf() format string.

+ + + + + + +
ArgumentDefaultDescription
+$aFormat + + Format for positive values
+$aNegFormat + + +"" +Format for negative values
+ +

Description
Specify the format string for positive and negative values. The format string follows the same riules as the standard printf() format. +

+Please remember that if you want to format a number with a '%' sign you must use double '%%' as escape format, e.g. '%01.2.f%%' will format a number with two decimal places and a following '%' sign. + + 
+ +

Example

+// Format label as floating point with 2 decimal points and
// a dollar sign in front, e.g. '$237.56'
$bplot->SetFormt('$%01.2f');
+

+

+

 

 

+function SetFormatCallback($aFunc) +
+ +Specify format callback function

+ + + + +
ArgumentDefaultDescription
+$aFunc + + Name of callback function
+ +

Description
Specify a function that get's called to format any value. 
+  
See also
DisplayValue::SetFormat +

Example

+function barValueFormat($aLabel) {
    // Format '1000 english style
    return number_format($aLabel)
    // Format '1000 french style
    // return number_format($aLabel, 2, ',', ' ');
}

$barplot->value->SetFormatCallback('barValueFormat');
+

+

+

 

 

+function SetMargin($aMargin) +
+ +Set nargin between value and anchor point in plot

+ + + + +
ArgumentDefaultDescription
+$aMargin + + Margin in pixels
+ +

Description
Specify the margin between the data point and the label. 
+ +

Example

+$bplot->value->SetMargin(50); +
+

+

 

 

+function Show($aFlag) +
+ +Show value

+ + + + +
ArgumentDefaultDescription
+$aFlag + + +true +True=show value
+ +

Description
Enable display of the label. If you want to display a value you must enable it since it is turned off by default. 
+ +

Example

+// Enable display of each slice value
$pieplot->value->Show();
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/ErrMsgText.html b/html/includes/jpgraph/docs/ref/ErrMsgText.html new file mode 100644 index 0000000000..363877251d --- /dev/null +++ b/html/includes/jpgraph/docs/ref/ErrMsgText.html @@ -0,0 +1,10 @@ +


CLASS ErrMsgText
+(Defined in: jpgraph.php : 225)
 ErrMsgText 
 

Class usage and Overview
Internal helper class to work extract localized error messages.

  +


Class Methods


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/ErrorLinePlot.html b/html/includes/jpgraph/docs/ref/ErrorLinePlot.html new file mode 100644 index 0000000000..8e7ec9b574 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/ErrorLinePlot.html @@ -0,0 +1,41 @@ +


CLASS ErrorLinePlot EXTENDS ErrorPlot
+(Defined in: jpgraph_error.php : 86)
 ErrorLinePlot  ErrorPlot  
 ErrorLinePlot() 
+
 
 

Class usage and Overview
The error line plot is much the same as the error plot with the addition of a line between the average value of each error plot pair. The properties of the line may be accessed through the ?line? property of the ErrLinePlot, so for example to draw a red line you issue the statement + +$errlineplot->line->SetColor(?red?);

  +

See also related classes:
LinePlot and ErrorPlot

 


Class Methods

+

 

 

+function ErrorLinePlot(&$datay,$datax) +
+ +//---------------// CONSTRUCTOR +

+ + + + + + +
ArgumentDefaultDescription
+&$datay + + Y-data values
+$datax + + +false +X-data value
+ +

Description
In the same way as for Error plots each data value is represnted by two y-values, a minimum and maximum value for each point. 
+  
See also
ErrorPlot::ErrorPlot +

Example

+$errlineplot = new ErrorLinePlot($ydata); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/ErrorPlot.html b/html/includes/jpgraph/docs/ref/ErrorPlot.html new file mode 100644 index 0000000000..b3b19ccb2e --- /dev/null +++ b/html/includes/jpgraph/docs/ref/ErrorPlot.html @@ -0,0 +1,41 @@ +


CLASS ErrorPlot EXTENDS Plot
+(Defined in: jpgraph_error.php : 17)
 ErrorPlot  Plot  
 ErrorPlot() 
+
 
 

Class usage and Overview
Concrete class which implements error plots. Error plots takes two y-values for each X-value, min and max. It then marks each pair of min/max values with a vertical bar.

  +


Class Methods

+

 

 

+function ErrorPlot(&$datay,$datax) +
+ +//---------------// CONSTRUCTOR +

+ + + + + + +
ArgumentDefaultDescription
+&$datay + + Y-data. 2 points for each value
+$datax + + +false +X-data
+ +

Description
Create a new error plot. Each data value is specified by two y-values, a minimum and maximum value. +

+The X-vector is optional. 
+ +

Example

+$errplot = new ErrorPlot($ydata);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/FieldArrow.html b/html/includes/jpgraph/docs/ref/FieldArrow.html new file mode 100644 index 0000000000..c611e5b95d --- /dev/null +++ b/html/includes/jpgraph/docs/ref/FieldArrow.html @@ -0,0 +1,61 @@ +


CLASS FieldArrow
+(Defined in: jpgraph_scatter.php : 17)
 FieldArrow 
 SetColor() 
SetSize() 
+
 

Class usage and Overview
Internal helper class which represents the arrow head of the arrow in the field plot. +

+Only accessed as FieldPlot::arrow

  +

See also related classes:
FieldPlot

 


Class Methods

+

 

 

+function SetColor($aColor) +
+ +Specify color for arrow head

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color specification
+ +

Description
Set color for arrow head 
+ +

Example

+$fieldplot->arrow->SetColor('red'); +
+

+

 

 

+function SetSize($aSize,$aArrowSize) +
+ +Specify arrow and arrow head size

+ + + + + + +
ArgumentDefaultDescription
+$aSize + + Arrow size in pixels
+$aArrowSize + + +2 +Arrow head size (and shape) as integer in range (0-9)
+ +

Description
Arrow size is specified in pixels (length of arrow including arrow head). The size of the arrow head is specified as an integer in the range (0,9) inclusive. 
+ +

Example

+// First size argument is length (in pixels of arrow) 
// Second size argument is roughly size of arrow. Arrow size is specified as
// an integer in the range [0,9]
$fp->arrow->SetSize(20,2);
$fp->arrow->SetColor('navy');
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/FieldPlot.html b/html/includes/jpgraph/docs/ref/FieldPlot.html new file mode 100644 index 0000000000..d084482074 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/FieldPlot.html @@ -0,0 +1,74 @@ +


CLASS FieldPlot EXTENDS Plot
+(Defined in: jpgraph_scatter.php : 63)
 FieldPlot  Plot  
 FieldPlot() 
SetCallback() 
+
 
 

Class usage and Overview
A variant of scatter plot is the so called Field Plots this is +basically a scatter plot where each scatter point is an arrow with a +direction between 0 to 359 degrees. This effectively allows the +visualization of 3 parameters at each point (x,y,angle). As an +additional bonus there is also possible to define a callback for each +scatter plot to also define the color for each point.

  +

See also related classes:
FieldArrow

 


Class Methods

+

 

 

+function FieldPlot($datay,$datax,$angles) +
+ +Create an instance of FieldPlot

+ + + + + + + + +
ArgumentDefaultDescription
+$datay + + Y-coordinate
+$datax + + X-coordinate
+$angles + + Angle
+ +

Description
Create a new instance of a field plot 
+ +

Example

+$fp = new FieldPlot($datay,$datax,$angle); +
+

+

 

 

+function SetCallback($aFunc) +
+ +Specify callback for each arrow in the field plot

+ + + + +
ArgumentDefaultDescription
+$aFunc + + Function name
+ +

Description
Specify a callback that gets clled for each arrow in the field plot +The callback should return an array with the elements +
    +
  1. Color +
  2. Size of arrow (in pixels) +
  3. Arrow head size (as integer between0 and 9) +

+ +

Example

+// Gradient. Make the arrows red at the pole and colder (blue)
// teh further we get from the pole
function FldCallback($x,$y,$a) {
    $polex=4;
    $poley=40;
    $maxr = 3000;

    // Size and arrow size is constant
    $size="";
    $arrowsize="";

    // Since we have different scales we need the data points
    // to be of the same magnitude to give it a distance
    // interpretation.
    $x *= 10; 

    // Colors gets colder the further out we go from the center
    $r = ($x-$polex*10)*($x-$polex*10)+($y-$poley)*($y-$poley);
    $f = $r/$maxr;
    if( $f > 1 ) $f=1;
    $red = floor((1-$f)*255);
    $blue = floor($f*255);
    $color = array($red,0,$blue);
    return array($color,$size,$arrowsize);
}

// Setup the field plot
$fp = new FieldPlot($datay,$datax,$angle);

// Setup formatting callback
$fp->SetCallback('FldCallback');
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Footer.html b/html/includes/jpgraph/docs/ref/Footer.html new file mode 100644 index 0000000000..82ea6c2e58 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Footer.html @@ -0,0 +1,15 @@ +


CLASS Footer
+(Defined in: jpgraph.php : 421)
 Footer 
 

Class usage and Overview
Represents the footer in all graphs. The footer consists of three fields accessed by properties "left", "center" and "right" representing. This lets you have footer text to the left, center and to the right. +

+For example +

+$graph->footer->left->Set("(C) 2002"); +

  +


Class Methods


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/FuncGenerator.html b/html/includes/jpgraph/docs/ref/FuncGenerator.html new file mode 100644 index 0000000000..5525c3bbc9 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/FuncGenerator.html @@ -0,0 +1,85 @@ +


CLASS FuncGenerator
+(Defined in: jpgraph.php : 676)
 FuncGenerator 
 E() 
FuncGenerator() 
+
 

Class usage and Overview
A utility class to help with function plots. This class supprots both ordinary one-variable plots with one dependent variable as well as polar plots. + +Basically you create an instance of this class with the function you want to plot as a string argument. The function should be created using 'x' as the independent variable. You then invoke its evaluation method 'E()' with the range for the independent variable and possibly a step size. The method then returns an array of X, and Y values that represents the plot. + +Please remember that the string should be specified with single quotes since otherwise PHP will try to interpret the variable in the string. + +For example, to specify a simple cos() plot you specify: + +$f = new FuncGenerator('cos($x)'; +

  +


Class Methods

+

 

 

+function E($aXMin,$aXMax,$aSteps) +
+ +Evaluate a X-Y function

+ + + + + + + + +
ArgumentDefaultDescription
+$aXMin + + Min x-value
+$aXMax + + Max x-value
+$aSteps + + +50 +Number of steps
+ +

Description
Evaluate the previous specified function between the specified values. The return two arrays representing the X and Y coordinates for the function. 
+ +

Example

+// Create a simple linear plot
$f = new FuncGenerator('cos($x) * sin($x)');
list($xdata,$ydata) = $f->E(-2*M_PI, 2*M_PI);

$lp1 = new LinePlot($ydata,$xdata);

// Create a simple polar plot (a circle)
$p = new FuncGenerator('cos($i)', 'sin($i)');
list($x2data,$y2data) = $f->E(-2*M_PI, 2*M_PI);

$lp2 = new LinePlot($y2data,$x2data);

//...
+

+

+

 

 

+function FuncGenerator($aFunc,$aXFunc) +
+ +Create a new function generator.

+ + + + + + +
ArgumentDefaultDescription
+$aFunc + + Function
+$aXFunc + + +'' +X-Function
+ +

Description
Creates a new funciton generator. You can create both a linear plot as well as polar plot. + +For linear, one-variable plots, you must use '$x' as the independent variable. + +For polar plots you should use the index '$i' for the generating functions. + 
+ +

Example

+// Create a simple linear plot
$f = new FuncGenerator('cos($x) * sin($x)');
list($xdata,$ydata) = $f->E(-2*M_PI, 2*M_PI);

$lp1 = new LinePlot($ydata,$xdata);

// Create a simple polar plot (a circle)
$p = new FuncGenerator('cos($i)', 'sin($i)');
list($x2data,$y2data) = $f->E(-2*M_PI, 2*M_PI);

$lp2 = new LinePlot($y2data,$x2data);

//...
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/GTextTable.html b/html/includes/jpgraph/docs/ref/GTextTable.html new file mode 100644 index 0000000000..66ccd9344d --- /dev/null +++ b/html/includes/jpgraph/docs/ref/GTextTable.html @@ -0,0 +1,1944 @@ +


CLASS GTextTable
+(Defined in: jpgraph_table.php : 438)
 GTextTable 
 GTextTable() 
Init() 
MergeCells() 
MergeCol() 
MergeRow() 
Set() 
SetAlign() 
SetAnchorPos() 
SetBorder() 
SetCellAlign() 
SetCellColor() 
SetCellCountryFlag() 
SetCellCSIMTarget() 
SetCellFillColor() 
SetCellFont() 
SetCellImage() 
SetCellImageConstrain() 
SetCellNumberFormat() 
SetCellPadding() 
SetColAlign() 
SetColColor() 
SetColFillColor() 
SetColFont() 
SetColGrid() 
SetColImage() 
SetColNumberFormat() 
SetColor() 
SetColPadding() 
SetCSIMTarget() 
SetFillColor() 
SetFont() 
SetGrid() 
SetImage() 
SetMinColWidth() 
SetMinRowHeight() 
SetNumberFormat() 
SetPadding() 
SetPos() 
SetRowAlign() 
SetRowColor() 
SetRowFillColor() 
SetRowFont() 
SetRowGrid() 
SetRowImage() 
SetRowNumberFormat() 
SetRowPadding() 
SetScalePos() 
toString() 
+
 

Class usage and Overview
When visualizing data it is often useful to have both a quick graphical view which can show high level trends and a detailed view with the exact figures. The pro-version of JpGraph now supports the creation of graphic tables in all available graph types. + +The specification of the tables data, position, fonts, alignment, colors, borders etc. is all fully flexible with an intuitive set of APIs to control the table. In this HowTo we will start by showing how to build basic tables which we will augment with more advanced formatting by introducing the formatting capabilities one by one. + +In addition to adding data tables to graphs it is also possible to create graphic tables on the fly all by its own. This has the advantage compared with HTML tables to allow users to make copies of the table while maintaining the exact formatting of the table. Figure 2. shows an example with just a graphical table

  +


Class Methods

+

 

 

+function GTextTable() +
+ +Create a new Graphic text table

+
+ +

Description
Create a new Graphic text table. The next call should either be to specify a value for the table (using GTextTable::Set() ) or a call to GTextTable::Init() to specify the size of table. 
+  
See also
GTextTable::Init and GTextTable::Set +

Example

+$table = new GTextTable();
$table->Set($tableData);
+

+

+

 

 

+function Init($aRows,$aCols,$aFillText) +
+ +Initialize the size for a newly created table

+ + + + + + + + +
ArgumentDefaultDescription
+$aRows + + +0 +Number of rows in table
+$aCols + + +0 +Number of columns in table
+$aFillText + + +'' +Deafult fill value for each cell
+ +

Description
After the table has been created the size of the table has to be established. This can either be done by a call to this method or by supplying a matrix in the call to Set(). +

+If You plan on specifying the cells by individual calls to Set($row,$col,$value) then this method must have been called after the creation of the table. +

+When You set the entire table content with a call to Set() with a full 2D-matrix as argument the size of the matrix will be used to determine the size of the table. 
+ +

Example

+$table = new GTextTable();
$table->Init(5,7);

+

+

+

 

 

+function MergeCells($aR1,$aC1,$aR2,$aC2,$aHAlign,$aVAlign) +
+ +Merge cells in the specified range

+ + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$aR1 + + Top left row
+$aC1 + + Top left column
+$aR2 + + Bottom right row
+$aC2 + + Bottom right column
+$aHAlign + + +'center' +Horizontal alignment
+$aVAlign + + +'center' +Vertical alignment
+ +

Description
Merge cells in the specified range. The alignment of the merged cells cab be set by the laet two optional arguments. + +Note: To merge all cells in a specific row or column use the alternative methods MergeCol() and MergeRow() 
+  
See also
GTextTable::MergeRow and GTextTable::MergeCol +

Example

+// Merge the top 2x2 cells
$table->MergeCells(0,0,1,1,"right");
+

+

+

 

 

+function MergeCol($aCol,$aHAlign,$aVAlign) +
+ +Merge all cells in one column

+ + + + + + + + +
ArgumentDefaultDescription
+$aCol + + Column index
+$aHAlign + + +'center' +Horizontal alignment
+$aVAlign + + +'center' +Vertical alignment
+ +

Description
Merge all cells in one column. + +Note: By default if no alignment is given the content in the merged cells will be centered both horixontally and vertically. 
+  
See also
GTextTable::MergeCells and GTextTable::MergeRow +

Example

+$table->MergeCol(3); +
+

+

 

 

+function MergeRow($aRow,$aHAlign,$aVAlign) +
+ +Merge all cells in one row.

+ + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aHAlign + + +'center' +Horizontal alignment
+$aVAlign + + +'center' +Vertical alignment
+ +

Description
Merge all cells in one row. + +Note: By default if no alignment is given the content in the merged cells will be centered both horixontally and vertically. 
+  
See also
GTextTable::MergeCells and GTextTable::MergeCol +

Example

+$table->MergeRow(2,"right","top"); +
+

+

 

 

+function Set($aArg1,$aArg2,$aArg3) +
+ +Set the value in cell or cells

+ + + + + + + + +
ArgumentDefaultDescription
+$aArg1 + + 2D-Array or Row index
+$aArg2 + + +NULL +[Oprional] Columns index
+$aArg3 + + +NULL +(Optional) Value for cell
+ +

Description
This method is used to put values in a cell or initialize the table using a 2D-matrix. The method is polymorphic and can be called in two ways +
    +
  1. Set($aTableMatrix), Specify the entire table by supplying a 2D-Matrix +
  2. Set($aRow,$aCol,$aValue), Set the value in a specific cell. Note that if You use this method then the size of the table muts have been previously specified with a call to Init() +
+ +Note: If the table is initialized with an 2D-matrix then there is no need to call the Init() method since the ovberall size of the table will be set to the same as the supplied matrix. + +Note: After the entire table have beedn specified with an initial 2D-array it is of course still possible to modify/set individual values with a call to the second version of the table. + 
+  
See also
GTextTable::Init +

Example

+// Create a new table from a 2D-array
$data = array(
   array("Jun",34,18,13), 
   array("Jul",15,9,12));
$table = new GTextTable();
$table->Set($data);
$table->SetAlign("right");
...


// Create a table by setting individual cells
$table = new GTextTable();
$table->Init(5,7); // 5 rows by 7 column sized table

for($i=0; $i < 5; ++$i) {
  for($j=0; $j < 7; ++$j) {
    $table->Set(0,0,$data[$i][$j]);
  }
}
...

$table->Set(0,0,$data1);


+

+

+

 

 

+function SetAlign($aR1HAlign,$aC1VAlign,$aR2,$aC2,$aHArg,$aVArg) +
+ +Set cell alignment for entire table or range of cells

+ + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$aR1HAlign + + +null +Top left row OR horizontal alignment
+$aC1VAlign + + +null +Top left column OR vertical alignment
+$aR2 + + +null +Bottom right row
+$aC2 + + +null +Bottom right column
+$aHArg + + +null +Horizontal alignment
+$aVArg + + +'center' +Vertical alignment
+ +

Description
Set cell alignment for entire table or range of cells. The alignment fcan be specifed both horizontally and vertically. + +The possible settings for horizontal alignment are +"left", "center", "right" + +Vertical alignment can be set as +"top","center","bottom" + +Note that the alignment options are specified as strings. + 
+  
See also
GTextTable::SetCellAlign, GTextTable::SetRowAlign and GTextTable::SetColAlign +

Example

+// Set the default alignment for the entire table
$table->SetAlign("right");

// The set the first column to use left alignment
$table->SetColAlign(0,"left");
+

+

+

 

 

+function SetAnchorPos($aXAnchor,$aYAnchor) +
+ +Specify where the anchor position of the table should be

+ + + + + + +
ArgumentDefaultDescription
+$aXAnchor + + Horizontal anchor
+$aYAnchor + + +'top' +Vertical anchor
+ +

Description
Specify where the anchor of the table should be. By default the anchor is top left corner so that the positoin you specify for the table is taken as the top left corner. + +This can be adjusted horixontally as +"left", "center" or "right" + +Vertically it can be adjusted as +"top","center","bottom" + 
+  
See also
GTextTable::SetPos and GTextTable::SetScalePos +

Example

+// Make the position refer to the center of the table
$table->SetAnchorPos('center','center');
+

+

+

 

 

+function SetBorder($aWeight,$aColor) +
+ +Set the color and weight on the border around the table-

+ + + + + + +
ArgumentDefaultDescription
+$aWeight + + +1 +Weight of border
+$aColor + + +'black' +Color of border
+ +

Description
Set the color and weight on the border around the table. By default the border is a 1 pixel black solid line. + +Note: Specify a weight of 0 to disable the border entirely. 
+  
See also
GTextTable::SetGrid +

Example

+...
$table->SetBorder(2,"navy");
...
+

+

+

 

 

+function SetCellAlign($aRow,$aCol,$aHorAlign,$aVertAlign) +
+ +Set cell alignment for a specified cell.

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aCol + + Column index
+$aHorAlign + + Horizontal alignment
+$aVertAlign + + +'bottom' +Vertical alignment
+ +

Description
Set cell alignment for a specified cell. The alignment can be specifed both horizontally and vertically. + +The possible settings for horizontal alignment are +"left", "center", "right" + +Vertical alignment can be set as +"top","center","bottom" + +Note that the alignment options are specified as strings. + 
+  
See also
GTextTable::SetAlign, GTextTable::SetColAlign and GTextTable::SetRowAlign +

Example

+$table->SetCellAlign(2,5,'left'); +
+

+

 

 

+function SetCellColor($aRow,$aCol,$aColor) +
+ +Set font color for a specific cell

+ + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aCol + + Column index
+$aColor + + Font color
+ +

Description
Set font color for a specific cell. + +Note: To set the default color for all cells use the SetColor() method. 
+  
See also
GTextTable::SetColor, GTextTable::SetRowColor and GTextTable::SetColColor +

Example

+$table->SetCellColor(3,1,'darkred'); +
+

+

 

 

+function SetCellCountryFlag($aRow,$aCol,$aFlag,$aScale,$aMix,$aStdSize) +
+ +Set a country flag in the background of the specified cell

+ + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aCol + + Column index
+$aFlag + + Flag specification partial name or index
+$aScale + + +1.0 +Scaling factor to be used
+$aMix + + +100 +Blending factor (0-100)
+$aStdSize + + +3 +Which original size of flag image to use
+ +

Description
Set a country flag in the background of the specified cell. + +Before this method can be used make sure that the file "jpgraph_flags.php" is included in the script. + +All supported countries can be specified by setting the '$aFlag" parameter to either +
    +
  1. Numeric index, (0-238) +
  2. Full or partial name, e.g. "norway" +
  3. The unique string index for the country +
+ +For a list of all available flags please run the file "listallflags.php" in the Example directory. +

+The parameter "$aMix" is a value between 0-100 and specifies the blend factor for the flag. +

+The paraneter $aStdSize specifes one of three orignal izes of flag where size can be one of +

    +
  1. FLAGSIZE1, corresponds to an original flag size of 35x35 pixels +
  2. FLAGSIZE2, corresponds to an original flag size of 60x60', +
  3. FLAGSIZE3, corresponds to an original flag size of 100x100', +
  4. FLAGSIZE4, corresponds to an original flag size of roughly 400x400 +
+ +For best result always use an original flag that is at least as big as the size that is wanted, i.e. even though the scaling factor can be used to arbitrary change the size of any of these original flags the result when up scaling is not optimal since there is a need to interpolate. By starting with a larger original image which is the downsampled the result is much better. +

+Note 1: In order to lock either the height or the width of the flag to a specific value use the SetImageConstrain() +method. + + + 
+  

See also
GTextTable::SetImage +

Example

+// Set one row with a number of country flags and constrain
// the height to be 20 pixels
$countries = array('united states','united kingdom','french republic','denmark','iceland','canada');
$n = count($countries);
for($i=0; $i < $n; ++$i ) {
    $table->SetCellCountryFlag(1,$i+1,$countries[$i]);
    $table->SetCellImageConstrain(1,$i+1,TIMG_HEIGHT,20);
}
+

+

+

 

 

+function SetCellCSIMTarget($aRow,$aCol,$aTarget,$aAlt) +
+ +Specify URL for CSIM target

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aCol + + Column index
+$aTarget + + Target URL
+$aAlt + + +null +ALT text
+ +

Description
Specify URL and optional ALT text for CSIM target for the specified cell. + 
+  
See also
GTextTable::SetCSIMTarget +

Example

+$table->SetCellCSIMTarget(3,0,'detail.php','View detailes'); +
+

+

 

 

+function SetCellFillColor($aRow,$aCol,$aColor) +
+ +Specify background color in a cell

+ + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aCol + + Column index
+$aColor + + background color
+ +

Description
Specify background color in a cell. + +Note: To set the default background fill color for all cells usde the SetFillColor() method. 
+  
See also
GTextTable::SetFillColor, GTextTable::SetRowFillColor and GTextTable::SetColFillColor +

Example

+// Highlight cell (7,0)
$table->SetCellFillColor(7,0,'yellow');
+

+

+

 

 

+function SetCellFont($aRow,$aCol,$aFF,$aFS,$aFSize) +
+ +Specify font family and style for a specific cell

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aCol + + Column index
+$aFF + + Font family
+$aFS + + Font style
+$aFSize + + +10 +Font size
+ +

Description
Specify font family and style for a specific cell. + +Note:To set the default font for all cells use the SetFont() method. 
+  
See also
GTextTable::SetFont, GTextTable::SetRowFont and GTextTable::SetColFont +

Example

+// Highlight cell (4,1) with red on yellow background
$table->SetCellFillColor(4,1,'yellow');
$table->SetCellColor(4,1,'darkred');
$table->SetCellFont(4,1,FF_ARIAL,FS_BOLD,12);
+

+

+

 

 

+function SetCellImage($aRow,$aCol,$aFile,$aScale,$aMix) +
+ +Set a background image in the specified cell

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aCol + + Column index
+$aFile + + Image file name
+$aScale + + +1.0 +Image scale factor
+$aMix + + +100 +Blending factor (0-100)
+ +

Description
Set a background image in the specified cell. The image is stored in the file with the name given as the third parameter. + +The image name must end with a valid image prefix, i.e. one of ".png", ".jpg" or possibly ".gif" + +Note: To set a default background image for all cells in the table use the SetImage() method. 
+  
See also
GTextTable::SetImage, GTextTable::SetRowImage and GTextTable::SetColImage +

Example

+// Put the image 'warning.jpg' in cell (3,6) and
// scale the image to half size
$table->SetCellImage(3,6,'warning.jpg',0.5);
+

+

+

 

 

+function SetCellImageConstrain($aRow,$aCol,$aType,$aVal) +
+ +Lock either the image height or width in a particular cell

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aCol + + Column index
+$aType + + Specify width or height constrain
+$aVal + + Value of constrain
+ +

Description
Use this method to locj either the width or height of the image ina a cell. The non-specified image width or height will be automatically determied so that the orignal propertion of the image is maintained. + +The $aType parameter is used to indicate if the value given should be interpretated as width or height constarin and is specifed as either +
    +
  1. TIMG_WIDTH, Interpret as width +
  2. TIMG_HEIGHT,Interpret as height +
 
+
+
Returns
VOID
+  
See also
GTextTable::SetCellImage +

Example

+// Make sure image in cell (3,1) is exactlyb 20 pixels 
// in height
$table->SetCellImageConstrain(3,1,TIMG_HEIGHT,20);
+

+

+

 

 

+function SetCellNumberFormat($aRow,$aCol,$aF) +
+ +Set number format in cell

+ + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aCol + + Column index
+$aF + + Format string
+ +

Description
Set number format in cell. The number format should be given in the style of printf() family format strings. A cell that contains non numeric data will not be affected in any way by this method. + +Note: It is the resposnibility of the client to make any necessary rounding of the numbers. 
+ +

Example

+// Use two decimals with leading 0 on numbers
$this->SetCellNumberFormat(3,1,'%0.2f');
+

+

+

 

 

+function SetCellPadding($aRow,$aCol,$aPad) +
+ +Set internal cell margin

+ + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aCol + + Column index
+$aPad + + Internal cell margin (in pixels)
+ +

Description
Set internal cell margins in pixels. + +By default the internal cell padding is 5 pixels. + +Note: To change the default cell padding for all cells in the table use the Setpadding() method. 
+ +

Example

+// Set 8 pixel cell padding for cell (1,3)
$table->SerCellPadding(3,1,8);
+

+

+

 

 

+function SetColAlign($aCol,$aHorAlign,$aVertAlign) +
+ +Set cell alignment for an entire column of cells.

+ + + + + + + + +
ArgumentDefaultDescription
+$aCol + + Column index
+$aHorAlign + + Horizontal alignment
+$aVertAlign + + +'bottom' +Vertical alignment
+ +

Description
Set cell alignment for an entire column of cells. The alignment can be specifed both horizontally and vertically. + +The possible settings for horizontal alignment are +"left", "center", "right" + +Vertical alignment can be set as +"top","center","bottom" + +Note that the alignment options are specified as strings. + +Note2: In order to set the default alignment for all cells in the table use the SetAlign() method. 
+  
See also
GTextTable::SetAlign, GTextTable::SetCellAlign and GTextTable::SetRowAlign +

Example

+$table->SetColAlign(3,'center'); +
+

+

 

 

+function SetColColor($aCol,$aColor) +
+ +Set font color for a entire column.

+ + + + + + +
ArgumentDefaultDescription
+$aCol + + Column index
+$aColor + + Font color
+ +

Description
Set font color for a entire column. + +Note: To set the default color for all cells use the SetColor() method. 
+  
See also
GTextTable::SetColor, GTextTable::SetCellColor and GTextTable::SetRowColor +

Example

+$table->SetColColor(2,'blue'); +
+

+

 

 

+function SetColFillColor($aCol,$aColor) +
+ +Specify background color in an entire column of cells

+ + + + + + +
ArgumentDefaultDescription
+$aCol + + Column index
+$aColor + + Background color
+ +

Description
Specify background color in an entire column of cells. + +Note: To set the default background fill color for all cells usde the SetFillColor() method. 
+
+
Returns
VOID
+  
See also
GTextTable::SetCellFillColor, GTextTable::SetFillColor and GTextTable::SetRowFillColor +

Example

+// Highlight column 3 with white text on gray bakground
$table->SetColFillColor(3,'darkgray');
$table->SetColColor(3,'white');
+

+

+

 

 

+function SetColFont($aCol,$aFF,$aFS,$aFSize) +
+ +Specify font family and style for an entire column of cells

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aCol + + Column index
+$aFF + + Font family
+$aFS + + Font style
+$aFSize + + +10 +Font size
+ +

Description
Specify font family and style for an entire column of cells + +Note:To set the default font for all cells use the SetFont() method. 
+  
See also
GTextTable::SetFont, GTextTable::SetRowFont and GTextTable::SetCellFont +

Example

+$table->SetColFont(0,FF_ARIAL,FS_NORMAL,12); +
+

+

 

 

+function SetColGrid($aCol,$aWeight,$aColor,$aStyle) +
+ +Set style, color and width of a specified vertical grid line

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aCol + + Grind line to specify
+$aWeight + + +1 +Width of line
+$aColor + + +'black' +Color of line
+$aStyle + + +TGRID_SINGLE +Grid line style (see below)
+ +

Description
Set style, color and width of a specified vertical grid line in the table. The grid lines are numbered from 1 to columns-1 and from left to right. The grid lines are defined as the internal lines in the table. The outer border of the table is controlled separately with the SetBorder() method. +

+The style for the grid lines can be one of the following three +

    +
  1. TGRID_SINGLE, Single solid line of the given color and weight +
  2. TGRID_DOUBLE, Two solid lines of the given color and weight. The distance between the lines is the same as the weight. +
  3. TGRID_DOUBLE2, Two solid lines of the given color. The first line has twice the weight as the second. This type of line is often used to mark a summation line in a table. +
+ +Note: In order to remove all grid lines in the table set the width to 0. + 
+ +

Example

+$table->SetColGrid(1,1,'black',TGRID_DOUBLE2);
+

+

+

 

 

+function SetColImage($aCol,$aFile,$aScale,$aMix) +
+ +Set background image for an entire column of cells

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aCol + + Column index
+$aFile + + Filename of image
+$aScale + + +1.0 +Scale of image
+$aMix + + +100 +Blend factor for image (0-100)
+ +

Description
Set background image for an entire column of cells. The should be stored in a file whos filename is given as the second parameter. The scdaling factor can be specifed as an arbitary floating point value between 0-1. +

+The Blend factor is specified as an integer between 0 and 100 where 100 is 100% blend factor. + 
+  

See also
GTextTable::SetImage, GTextTable::SetCellImage and GTextTable::SetRowImage +

Example

+$table->SetColImage(2,$imageFileNmae,0.7); +
+

+

 

 

+function SetColNumberFormat($aCol,$aF) +
+ +Set number format in an entire column of cells

+ + + + + + +
ArgumentDefaultDescription
+$aCol + + Column index
+$aF + + Format string
+ +

Description
Set number format in an entire column of cells. The number format should be given in the style of printf() family format strings. A cell that contains non numeric data will not be affected in any way by this method. + +Note: It is the resposnibility of the client to make any necessary rounding of the numbers. 
+  
See also
GTextTable::SetCellNumberFormat, GTextTable::SetNumberFormat and GTextTable::SetRowNumberFormat +

Example

+// Use two decimals with leading zero
$table->SetColNumberFormat(4,'%0.2f');
+

+

+

 

 

+function SetColor($aArgR1,$aC1,$aR2,$aC2,$aArg) +
+ +Set font color for the whole table or a range of cells.

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aArgR1 + + Top left row OR font color
+$aC1 + + +null +Top left column
+$aR2 + + +null +Bottom right row
+$aC2 + + +null +Bottom right column
+$aArg + + +null +Font color
+ +

Description
Set font color for the whol table or a range of cells. +Thie method is polymorphic an can be called in two ways +
+  
See also
GTextTable::SetCellColor, GTextTable::SetRowColor and GTextTable::SetColColor +

Example

+// Set the font color for the entire table
$table->SetColor('darkgray');

// Set the font color for the top left 2x2 cells
$table->SetColor(0,0,1,1,'blue');
+

+

+

 

 

+function SetColPadding($aCol,$aPad) +
+ +Set internal cell margins in pixels for all cells in the specified column.

+ + + + + + +
ArgumentDefaultDescription
+$aCol + + Column index
+$aPad + + Internal cell margin
+ +

Description
Set internal cell margins in pixels for all cells in the specified column. + +By default the internal cell padding is 5 pixels. + +Note: To change the default cell padding for all cells in the table use the Setpadding() method. 
+  
See also
GTextTable::SetCellPadding, GTextTable::SetPadding and GTextTable::SetRowPadding +

Example

+$table->SetColPadding(3,12): +
+

+

 

 

+function SetCSIMTarget($aTarget,$aAlt,$aAutoTarget) +
+ +Set URL CSIM target for all cells in the table

+ + + + + + + + +
ArgumentDefaultDescription
+$aTarget + + Target URL
+$aAlt + + +null +ALT etxt
+$aAutoTarget + + +false +TRUE=Append auto row and column argument
+ +

Description
Set URL CSIM target for all cells in the table. If the $aAutoTarget is set to TRUE then an additional GET method argument will be appended to the base URL. This makes it possible to spcify a base URL which will then be called with the two additional arguments "row" and "col". This can be used to determien from which cell the click was made. +

+An example will clarify this. +

+Assume that the base URL is "target.php". If we then setup the table with + +$table->SetCSIMTarget('target.php','Click for details',true); + +then if the user clicks the cell (1,1) the url called will be "target.php?row=1&col=1", for cell (2,3) the call would be "target.php?row=2&col=3" and so on. + 
+ +

Example

+// Assume that the base URL is "target.php". 
$table->SetCSIMTarget('taregt.php','Click for details',true);
+

+

+

 

 

+function SetFillColor($aArgR1,$aC1,$aR2,$aC2,$aArg) +
+ +Set background image for an entire range of cells or entire table

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aArgR1 + + Top left row OR color
+$aC1 + + +null +Top left column
+$aR2 + + +null +Bottom right row
+$aC2 + + +null +Bottom right column
+$aArg + + +null +Color for range
+ +

Description
Set background image for an entire range of cells or entire table. + +This method is polymorphic and can be called in two ways +
    +
  1. SetFillColor($aFillColor), Set fill color for all cells in the table +
  2. SetFillColor($aR1,$aC1,$aR2,$aC2,$aFillColor), Set fill color for a range of cells +

+  
See also
GTextTable::SetCellFillColor, GTextTable::SetColFillColor and GTextTable::SetRowFillColor +

Example

+// Set default fill color for entire table
$table->SetFillColor('lightgray');

// Highlight top left 2x2 cells
$table->SetFillColor(0,0,1,1,'yellow');
+

+

+

 

 

+function SetFont() +
+ +Set font for entire table or range of cells.

+
+ +

Description
Set font for entire table or range of cells. This si a polymorphic method and can be called in two ways- +
    +
  1. SetFont($aFF,$aFS,$aFSize), Set default font for entire table +
  2. SetFont($aR1,$aC1,$aR2,$aC2,$aFF,$aFS,$aFSize), Set default font for range of cells table +

+
+
Returns
VOID
+  
See also
GTextTable::SetCellFont, GTextTable::SetRowFont and GTextTable::SetColFont +

Example

+// Set default font for entire table
$table->SetFont(FF_TIMES,FS_NORMAL,11);

// Set font for the two top rows
$table->SetFont(0,0,1,5,FF_ARIAL,FS_BOLD,12);
+

+

+

 

 

+function SetGrid($aWeight,$aColor,$aStyle) +
+ +Set style, color and width of all table grid lines

+ + + + + + + + +
ArgumentDefaultDescription
+$aWeight + + +1 +Width of grid lines
+$aColor + + +'black' +Color of grid lines
+$aStyle + + +TGRID_SINGLE +Style of grid lines
+ +

Description
Set style, color and width of all table grid lines. The grid lines are defined as the internal lines in the table. The outer border of the table is controlled separately with the SetBorder() method. +

+The style for the grid lines can be one of the following three +

    +
  1. TGRID_SINGLE, Single solid line of the given color and weight +
  2. TGRID_DOUBLE, Two solid lines of the given color and weight. The distance between the lines is the same as the weight. +
  3. TGRID_DOUBLE2, Two solid lines of the given color. The first line has twice the weight as the second. This type of line is often used to mark a summation line in a table. +
+ +Note: In order to remove all grid lines in the table set the width to 0. + 
+  
See also
GTextTable::SetColGrid and GTextTable::SetRowGrid +

Example

+// Set the default grid lines for whole table
$table->SetGrid(1,'gray',TGRID_SOLID);
+

+

+

 

 

+function SetImage($aFileR1,$aScaleC1,$aMixR2,$aC2,$aFile,$aScale,$aMix) +
+ +Set background image for an entire range of cells or entire table

+ + + + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$aFileR1 + + Top left row OR file name
+$aScaleC1 + + +null +Top left column OR scale
+$aMixR2 + + +null +Bottom right row OR blend factor
+$aC2 + + +null +Bottom right column
+$aFile + + +null +Image filename
+$aScale + + +1.0 +Image scale
+$aMix + + +100 +Blend factor (0-100)
+ +

Description
Set background image for an entire rnage of cells or entire table. The should be stored in a file whos filename is given as the second parameter. The scdaling factor can be specifed as an arbitary floating point value between 0-1. +

+The Blend factor is specified as an integer between 0 and 100 where 100 is 100% blend factor. 
+  

See also
GTextTable::SetCellImage, GTextTable::SetRowImage and GTextTable::SetColImage +

Example

+// Set the same background image for all cells in the table
$table->SetImage($fileName,0.8);

// Set the background image for the top 2x2 cells
$table->SetImage(0,0,1,1,$fileName,0.8);
+

+

+

 

 

+function SetMinColWidth($aColWidth,$aWidth) +
+ +Specify minimum column width

+ + + + + + +
ArgumentDefaultDescription
+$aColWidth + + Width or column index
+$aWidth + + +null +Width
+ +

Description
Specify minimum column width of all columns or a specific column. The method is polymorphic and can be called in two different ways. +
    +
  1. SetMinColWidth($aWidth), Set the minimum width for all columns in the table +
  2. SetMinColWidth($aColIndex,$aWidth), Set the minimum width for the specified column +
+ +Note that the column width will always be wide enough to hold the widest text or image. This means that the table will never to adny clipping of data. 
+  
See also
GTextTable::SetMinRowHeight +

Example

+// Make all columns at least 50 pixels wide
$table->SetMinColWidth(50);
+

+

+

 

 

+function SetMinRowHeight($aRowHeight,$aHeight) +
+ +Specify minimum row height of all rows or a specific row.

+ + + + + + +
ArgumentDefaultDescription
+$aRowHeight + + Row index or height
+$aHeight + + +null +Height
+ +

Description
Specify minimum row height of all rows or a specific row. The method is polymorphic and can be called in two different ways. +
    +
  1. SetMinRowHeight($aWidth), Set the minimum height for all rows in the table +
  2. SetMinRowHeight($aRowIndex,$aWidth), Set the minimum height for the specified table row +
+ +Note that the row height will always be tall enough to hold the highest text or image. This means that the table will never to adny clipping of the data. 
+  
See also
GTextTable::SetMinColWidth +

Example

+// Make the top row at least 40 pixels in height
$table->SetMinRowHeight(0,40);
+

+

+

 

 

+function SetNumberFormat($aArgR1,$aC1,$aR2,$aC2,$aArg) +
+ +Set number format for entire table or a range of cells.

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aArgR1 + + Top left row OR format string
+$aC1 + + +null +Top left column
+$aR2 + + +null +Bottom right row
+$aC2 + + +null +Bottom right column
+$aArg + + +null +Format string
+ +

Description
Set number format for entire table or a range of cells. The number format should be given in the style of printf() family format strings. A cell that contains non numeric data will not be affected in any way by this method. + +The method is polymorphic and can be called in two ways +
    +
  1. SetNumberFormat($aFormat), Set the number format for the entire table +
  2. SetNumberFormat($aFormat), Set the number format for a range of cells +
+ +Note: It is the resposnibility of the client to make any necessary rounding of the numbers. 
+  
See also
GTextTable::SetCellNumberFormat, GTextTable::SetRowNumberFormat and GTextTable::SetColNumberFormat +

Example

+$table->SetNumberFormat('%0.2f'); +
+

+

 

 

+function SetPadding($aArgR1,$aC1,$aR2,$aC2,$aPad) +
+ +Set internal cell margins for all cells in the specified range or entire table

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aArgR1 + + Top left row OR cell padding
+$aC1 + + +null +Top left column
+$aR2 + + +null +Bottom right row
+$aC2 + + +null +Bottom right column
+$aPad + + +null +Cell padding
+ +

Description
Set internal cell margins for all cells in the specified range or entire table + +By default the internal cell padding is 5 pixels. + +This method is polymorphic and can be called in two ways +
    +
  1. SetPadding($aPadding), Set padding for all cells in the table +
  2. SetPadding($aR1,$aC1,$aR2,$aC2,$aPadding), Set padding for the specified range of cells +
+ + 
+  
See also
GTextTable::SetCellPadding, GTextTable::SetColPadding and GTextTable::SetRowPadding +

Example

+// First set the default padding for all cells
$table->SetPadding(8);

// Set the padding much larger in the top left 2x2 cells
$table->SetPadding(0,0,1,1,20);
+

+

+

 

 

+function SetPos($aX,$aY) +
+ +Set absolute pixel position the table

+ + + + + + +
ArgumentDefaultDescription
+$aX + + X Coordinate of top left corner
+$aY + + Y Coordinate of top left corner
+ +

Description
Set absolute pixel position for top left corner of the table. This is the simplest way of positioning a table in the graph area. +

+Note: The anchor position of the table can also be adjusted by the method SetAnchorPos(). By deagule the top left corner of the table is aligned with the specified coordinates. 
+  

See also
GTextTable::SetScalePos +

Example

+$table->SetPos(10,10); +
+

+

 

 

+function SetRowAlign($aRow,$aHorAlign,$aVertAlign) +
+ +Set cell alignment for an entire row of cells.

+ + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aHorAlign + + Horizontal alignment
+$aVertAlign + + +'bottom' +Vertical alignment
+ +

Description
Set cell alignment for an entire row of cells. The alignment can be specifed both horizontally and vertically. + +The possible settings for horizontal alignment are +"left", "center", "right" + +Vertical alignment can be set as +"top","center","bottom" + +Note that the alignment options are specified as strings. + +Note2: In order to set the default alignment for all cells in the table use the SetAlign() method. 
+  
See also
GTextTable::SetAlign, GTextTable::SetCellAlign and GTextTable::SetColAlign +

Example

+$table->SetRowAlign(6,'right'); +
+

+

 

 

+function SetRowColor($aRow,$aColor) +
+ +Set font color for an entire row.

+ + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aColor + + Font color
+ +

Description
Set font color for an entire row. + +Note: To set the default color for all cells use the SetColor() method. 
+  
See also
GTextTable::SetColor, GTextTable::SetCellColor and GTextTable::SetColColor +

Example

+$table->SetRowColor(5,'red'); +
+

+

 

 

+function SetRowFillColor($aRow,$aColor) +
+ +Specify background color in an entire row of cells.

+ + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aColor + + Background color
+ +

Description
Specify background color in an entire row of cells. + +Note: To set the default background fill color for all cells usde the SetFillColor() method. 
+  
See also
GTextTable::SetFillColor, GTextTable::SetCellFillColor and GTextTable::SetColFillColor +

Example

+// Highlight row 0 with white text on gray bakground
$table->SetRowFillColor(0,'darkgray');
$table->SetRowColor(0,'white');
+

+

+

 

 

+function SetRowFont($aRow,$aFF,$aFS,$aFSize) +
+ +Specify font family and style for an entire row of cells

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aFF + + Font family
+$aFS + + Font style
+$aFSize + + +10 +Font size
+ +

Description
Specify font family and style for an entire row of cells + +Note:To set the default font for all cells use the SetFont() method. 
+  
See also
GTextTable::SetFont, GTextTable::SetCellFont and GTextTable::SetColFont +

Example

+$table->SetRowFont(0,FF_ARIAL,FS_NORMAL,12); +
+

+

 

 

+function SetRowGrid($aRow,$aWeight,$aColor,$aStyle) +
+ +Set style, color and width of a specified horizontal grid line

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Grind line to specify
+$aWeight + + +1 +Width of line
+$aColor + + +'black' +Color of line
+$aStyle + + +TGRID_SINGLE +Grid line style (see below)
+ +

Description
Set style, color and width of a specified horizontal grid line in the table. The grid lines are numbered from 1 to columns-1 and from top to bottom. The grid lines are defined as the internal lines in the table. The outer border of the table is controlled separately with the SetBorder() method. +

+The style for the grid lines can be one of the following three +

    +
  1. TGRID_SINGLE, Single solid line of the given color and weight +
  2. TGRID_DOUBLE, Two solid lines of the given color and weight. The distance between the lines is the same as the weight. +
  3. TGRID_DOUBLE2, Two solid lines of the given color. The first line has twice the weight as the second. This type of line is often used to mark a summation line in a table. +
+ +Note: In order to remove a grid line in the table set the width to 0. + 
+  
See also
GTextTable::SetGrid and GTextTable::SetColGrid +

Example

+// Add a double line of width=2 to mark the summation row
// in a atable
$table->SetRowGrid(4,2,'black',TGRID_DOUBLE2);
+

+

+

 

 

+function SetRowImage($aRow,$aFile,$aScale,$aMix) +
+ +Set background image for an entire row of cells

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aFile + + Filename of image
+$aScale + + +1.0 +Scale of image
+$aMix + + +100 +Blend factor for image (0-100)
+ +

Description
Set background image for an entire row of cells. The should be stored in a file whos filename is given as the second parameter. The scdaling factor can be specifed as an arbitary floating point value between 0-1. +

+The Blend factor is specified as an integer between 0 and 100 where 100 is 100% blend factor. + 
+  

See also
GTextTable::SetImage, GTextTable::SetCellImage and GTextTable::SetColImage +

Example

+$table->SetRowImage(1,$fileName,0.5,60); +
+

+

 

 

+function SetRowNumberFormat($aRow,$aF) +
+ +Set number format in an entire row of cells.

+ + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aF + + Format string
+ +

Description
Set number format in an entire row of cells. The number format should be given in the style of printf() family format strings. A cell that contains non numeric data will not be affected in any way by this method. + +Note: It is the resposnibility of the client to make any necessary rounding of the numbers. 
+
+
Returns
VOID
+  
See also
GTextTable::SetNumberFormat, GTextTable::SetCellNumberFormat and GTextTable::SetCellNumberFormat +

Example

+// Use 2 decimals with leading zero
$table->SetRowNumberFormat('%0.2f');
+

+

+

 

 

+function SetRowPadding($aRow,$aPad) +
+ +Set internal cell margins in pixels for all cells in the specified row

+ + + + + + +
ArgumentDefaultDescription
+$aRow + + Row index
+$aPad + + Internal cell margin
+ +

Description
Set internal cell margins in pixels for all cells in the specified row. + +By default the internal cell padding is 5 pixels. + +Note: To change the default cell padding for all cells in the table use the Setpadding() method. 
+  
See also
GTextTable::SetCellPadding, GTextTable::SetPadding and GTextTable::SetColPadding +

Example

+$table->SetRowPadding(4,12); +
+

+

 

 

+function SetScalePos($aX,$aY) +
+ +Set position of the entire table on the graphn using the current X,Y sclae

+ + + + + + +
ArgumentDefaultDescription
+$aX + + X-position according to current scle
+$aY + + Y position according to curent scale
+ +

Description
This method makes it possible to place the table at specific scale coordinates within the plot area of the graph. This could for example be used to place a small table at each of the data points in a line graph (or some other type of plot) to show fyrther details. +

+Note: The anchor position of the table can also be adjusted by the method SetAnchorPos(). By deagule the top left corner of the table is aligned with the specified coordinates. 
+
+

Returns
VOID
+  
See also
GTextTable::SetPos and GTextTable::SetAnchorPos +

Example

+// Create the tables and position them at each data point
// In the line plot
// The data for each table is held in $tabledata[] array
// and the plot data is available in $datay[] array.

$n = count($datay);
$table=array();
for($i=0; $i < $n; ++$i ) {
    $table[$i] = new GTextTable();
    $table[$i]->Set($tabledata[$i]);
    $table[$i]->SetScalePos($i,$datay[$i]);
    $table[$i]->SetFillColor('lightyellow@0.5');
    // We center all tables on the data point
    $table[$i]->SetAnchorPos('center','middle');
    $graph->Add($table[$i]);
}
...
// Create the line
$l1 = new LinePlot($datay);
$l1->SetWeight(2);
$graph->Add($l1);
...
+

+

+

 

 

+function toString() +
+ +Return basic HTML version of the table

+
+ +

Description
Return basic HTML version of the table. Note that this is just a very basic representation of the table without any of the formatting applied the table. 
+ +

Example

+$str = $table->toString(); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/GanttActivityInfo.html b/html/includes/jpgraph/docs/ref/GanttActivityInfo.html new file mode 100644 index 0000000000..402f758fec --- /dev/null +++ b/html/includes/jpgraph/docs/ref/GanttActivityInfo.html @@ -0,0 +1,267 @@ +


CLASS GanttActivityInfo
+(Defined in: jpgraph_gantt.php : 142)
 GanttActivityInfo 
 Hide() 
SetBackgroundColor() 
SetColor() 
SetColTitles() 
SetColumnMargin() 
SetFont() 
SetFontColor() 
SetHeaderAlign() 
SetStyle() 
Show() 
+
 

Class usage and Overview
This class is responsible for handling the titles of the columns in the left section of the Gantt graph, i.e. the information columns for each activity. +

+It is instantiated in the scale and is accessed through the Gantt scale for example as in +

+ +$graph->scale->actinfo->SetColTitles( + array('Note','Name','Duration','Start','Finish'),array(30,100)); +$graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); +$graph->scale->actinfo->vgrid->SetStyle('solid'); +$graph->scale->actinfo->vgrid->SetColor('gray'); + +

+It is optional to use titles for the columns, so if you don't want to use titles you never have to add the above lines to a Gantt graph (but it sure looks nicer if you do ... ) +

  +


Class Methods

+

 

 

+function Hide($aF) +
+ +Hide titles

+ + + + +
ArgumentDefaultDescription
+$aF + + +true +TRUE=Hide titles
+ +

Description
Hide titles 
+ +

Example

+// Hide the titles
$graph->scale->actinfo->Hide();
+

+

+

 

 

+function SetBackgroundColor($aColor) +
+ +Specify backgound color for titles

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color specification
+ +

Description
Specify backgound color for titles 
+ +

Example

+$graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +
+

+

 

 

+function SetColor($aColor) +
+ +Specify color of vertical dividers between each title column

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color specification
+ +

Description
Specify color of vertical dividers between each title column 
+ +

Example

+$graph->scale->actinfo->SetColor('navy'); +
+

+

 

 

+function SetColTitles($aTitles,$aWidth) +
+ +Specify texts to be used as titles

+ + + + + + +
ArgumentDefaultDescription
+$aTitles + + Array of titles
+$aWidth + + +null +Optional width for each column
+ +

Description
Specify texts to be used as titles. The columns automatically becoms wide enough to hold the widest text in any columns. However you can also specify a specific width of each column by supplying an array of widths. However, the width can never be made smaller than the width of the texts, just larger. +

+It is perfectly legal to just specify the explicit width of the first few columns and have the rest of them become automatically sized. See eamplebelow. + 
+ +

Example

+// Specify some titles and explicitely set the size of the
// first two columns.
$graph->scale->actinfo->SetColTitles(
    array('Note','Name','Duration','Start','Finish'),array(30,100));
+

+

+

 

 

+function SetColumnMargin($aLeft,$aRight) +
+ +Specify extra margin to the left and right of the text in each column

+ + + + + + +
ArgumentDefaultDescription
+$aLeft + + Left margin (in pixels)
+$aRight + + Right margin (in pixels)
+ +

Description
Specify extra margin to the left and right of the text in each column 
+ +

Example

+$graph->scale->actinfo->SetColumnMargin(30,30);
+

+

+

 

 

+function SetFont($aFFamily,$aFStyle,$aFSize) +
+ +Specify title font

+ + + + + + + + +
ArgumentDefaultDescription
+$aFFamily + + Font family
+$aFStyle + + +FS_NORMAL +Font style
+$aFSize + + +10 +Font size
+ +

Description
Specify title font 
+ +

Example

+$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); +
+

+

 

 

+function SetFontColor($aFontColor) +
+ +Specify title font color

+ + + + +
ArgumentDefaultDescription
+$aFontColor + + Color specification
+ +

Description
Specify title font color 
+ +

Example

+$graph->scale->actinfo->SetFontColor('navy'); +
+

+

 

 

+function SetHeaderAlign($aAlign) +
+ +Adjust headers left, right or centered

+ + + + +
ArgumentDefaultDescription
+$aAlign + + Header alignment
+ +

Description
Adjust headers left, right or centered. By default headers are centered. 
+ +

Example

+$graph->scale->actinfo->SetHeaderAlign('left'); +
+

+

 

 

+function SetStyle($aStyle) +
+ +Enable 3D header style

+ + + + +
ArgumentDefaultDescription
+$aStyle + + 1=3D style
+ +

Description
Enable 3D header style. This is enabled by default. 
+ +

Example

+// No 3D style for titles
$graph->scale->actinfo->SetStyle(0);
+

+

+

 

 

+function Show($aF) +
+ +Show titles

+ + + + +
ArgumentDefaultDescription
+$aF + + +true +TRUE=Show headers
+ +

Description
Show titles. If you specify titles they are by default displayed. 
+  
See also
GanttActivityInfo::Hide +

Example

+// Hide the titles
$graph->scale->actinfo->Show(false);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/GanttBar.html b/html/includes/jpgraph/docs/ref/GanttBar.html new file mode 100644 index 0000000000..b1ec4f2b24 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/GanttBar.html @@ -0,0 +1,214 @@ +


CLASS GanttBar EXTENDS GanttPlotObject
+(Defined in: jpgraph_gantt.php : 3140)
 GanttBar  GanttPlotObject  
 GanttBar() 
SetColor() 
SetFillColor() 
SetHeight() 
SetPattern() 
SetShadow() 
+
 
 

Class usage and Overview
This class represents each activity bar. The activity bars can then be added to a GanttChart vi the GanttGraph::Add()

  +


Class Methods

+

 

 

+function GanttBar($aPos,$aLabel,$aStart,$aEnd,$aCaption,$aHeightFactor) +
+ +Create a new activity bar.

+ + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$aPos + + Vertical position (row)
+$aLabel + + Text label
+$aStart + + Start date
+$aEnd + + End date
+$aCaption + + +"" +Caption string for bar
+$aHeightFactor + + +0.6 +Height factor
+ +

Description
Create a new activity bar. An activity bar is created by specifyin : +
    +
  1. The row in gentt chart to draw the activity bar in +
  2. Specify a label(titel) for the activity. +
  3. A start date +
  4. An end date +
  5. A caption which is a string that gets stroked to the right of the activity bar. +
  6. Height as either an asbolute value or as a fraction of the available row height. +

+ +

Example

+$bar = new GanttBar(4,"Group 2", "2001-11-30","2001-12-22","[5%]",10); +
+

+

 

 

+function SetColor($aColor) +
+ +Specify frame color for the activity bar

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color for gantt bar
+ +

Description
Specify frame color for the activity bar. 
+ +

Example

+$bar->SetColor('orange');
+

+

+

 

 

+function SetFillColor($aColor) +
+ +Specify fill color for activity bar.

+ + + + +
ArgumentDefaultDescription
+$aColor + + Fill color
+ +

Description
Specify fill color for activity bar. +

+Note: It is perfectly possible to use both a background color as weel as a pattern. + 
+ +

Example

+$bar->SetPattern(BAND_RDIAG,"yellow");
$bar->SetFillColor("red");
+

+

+

 

 

+function SetHeight($aHeight) +
+ +Set height for the bar.

+ + + + +
ArgumentDefaultDescription
+$aHeight + + Height specification for bars
+ +

Description
Specify height of the activity bar. The height can be specified as either as fraction (0.0 to 1.0) or as an absolute value (1 to 200). In the first case the height is interpreted as the fraction of the row height and in the second case as an absolute height in pixels. 
+ +

Example

+$bar->SetHeight(0.6);
+

+

+

 

 

+function SetPattern($aPattern,$aColor,$aDensity) +
+ +Specify what pattern to use for the activity bars.

+ + + + + + + + +
ArgumentDefaultDescription
+$aPattern + + Pattern specification
+$aColor + + +"blue" +Pattern color
+$aDensity + + +95 +Density
+ +

Description
The following patterns are currently implemented: +
    +
  1. GANTT_RDIAG, Right diagonal lines +
  2. GANTT_LDIAG, Left diagonal lines +
  3. GANTT_SOLID, Solid one color +
  4. GANTT_LVERT, Vertical lines +
  5. GANTT_LHOR, Horizontal lines +
  6. GANTT_VLINE, Vertical lines +
  7. GANTT_HLINE, Horizontal lines +
  8. GANTT_3DPLANE, A 3D plane +
  9. GANTT_HVCROSS, Crosses +
  10. GANTT_DIAGCROSS, Diagonal crosses +

+  
See also
Progress::SetPattern +

Example

+$bar->SetPattern(BAND_RDIAG,"yellow");
$bar->SetFillColor("red");
+

+

+

 

 

+function SetShadow($aShadow,$aColor) +
+ +Add a drop shadow to the bar.

+ + + + + + +
ArgumentDefaultDescription
+$aShadow + + +true +True=Add drop shadow to bars
+$aColor + + +"gray" +Colro fo shadow
+ +

Description
Add a drop shadow to the bar. + 
+ +

Example

+$bar->SetShadow(); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/GanttGraph.html b/html/includes/jpgraph/docs/ref/GanttGraph.html new file mode 100644 index 0000000000..9535d4aa26 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/GanttGraph.html @@ -0,0 +1,357 @@ +


CLASS GanttGraph EXTENDS Graph
+(Defined in: jpgraph_gantt.php : 331)
 GanttGraph  Graph  
 Add() 
CreateSimple() 
GanttGraph() 
SetDateRange() 
SetLabelVMarginFactor() 
SetSimpleFont() 
SetSimpleStyle() 
SetVMarginFactor() 
ShowHeaders() 
Stroke() 
+
 
 

Class usage and Overview
Create a Gantt graph. The Gantt graph can then be built up by adding activity bars and milestones.

  +

See also related classes:
GanttBar, GanttVLine and MileStone

 


Class Methods

+

 

 

+function Add($aObject) +
+ +Add a new Gantt object

+ + + + +
ArgumentDefaultDescription
+$aObject + + Gantt plot object
+ +

Description
Add a gantt object to the graph. A gantt object is an instance of either: + 
+ +

Example

+$vline = new GanttVLine("2002-02-28");
$vline->title->Set("2002-02-28");
$vline->title->SetFont(FF_FONT1,FS_BOLD,10);
$graph->Add($vline);
+

+

+

 

 

+function CreateSimple($data,$constrains,$progress) +
+ +A utility function to help create the Gantt charts

+ + + + + + + + +
ArgumentDefaultDescription
+$data + + Gantt bar specification (See below)
+$constrains + + +array() +Constrain specification (see below)
+$progress + + +array() +Progress specification (see below)
+ +

Description
For a simple Gantt graphs this will simplify it's creation. The idea is that this method accepts a number of data arrays which specifies the activities in the Gantt graph. +

+Description of arguments
+

+ + 
+  
See also
GanttPlotObject::SetConstrain, Progress::Set, GanttGraph::SetSimpleFont and GanttGraph::SetSimpleStyle +

Example

+$data = array(
  array(0,ACTYPE_GROUP,    "Phase 1",  "2001-10-26","2001-11-23",''),
  array(1,ACTYPE_NORMAL,   "  Label 2",  "2001-10-26","2001-11-16",''),
  array(2,ACTYPE_NORMAL,   "  Label 3", "2001-11-20","2001-11-22",''),
  array(3,ACTYPE_MILESTONE,"  Phase 1 Done", "2001-11-23",'M2') );

// The constrains between the activities
$constrains = array(array(1,2,CONSTRAIN_ENDSTART),
            array(2,3,CONSTRAIN_STARTSTART));

$progress = array(array(1,0.4));

// Create the basic graph
$graph = new GanttGraph();
$graph->title->Set("Example with grouping and constrains");

// Setup scale
$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK);
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR);

// Add the specified activities
$graph->CreateSimple($data,$constrains,$progress);

// .. and stroke the graph
$graph->Stroke();
+

+

+

 

 

+function GanttGraph($aWidth,$aHeight,$aCachedName,$aTimeOut,$aInline) +
+ +Create a new GanttGraph

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aWidth + + +0 +Width of graph
+$aHeight + + +0 +Height of graph
+$aCachedName + + +"" +Filename to use if cache is enables
+$aTimeOut + + +0 +Timeout in minutes
+$aInline + + +true +True=Stream back to browser
+ +

Description
Construct a new GanttGraph. This differs slightly from the standard Graph or PlotGraph in that you are not required to specify width and height of the graph. Instead these can be left out and will be automatically be determined. +

+As a further refinement you can just specify width and have the height be automtically determined. + 
+  

See also
Graph::Graph +

Example

+// Setup Gantt graph
$graph = new GanttGraph();
$graph->SetShadow();
$graph->SetBox();

// Only show part of the Gantt
$graph->SetDateRange('2001-11-22','2002-1-24');
+

+

+

 

 

+function SetDateRange($aStart,$aEnd) +
+ +Specify date range for Gantt chart.

+ + + + + + +
ArgumentDefaultDescription
+$aStart + + Start date
+$aEnd + + End date
+ +

Description
Specify the date range for Gantt graphs. If this is not set it will be automtically determined from the input data. +

+All gantt chart objects, like bar activities, will be clipped to the spcified date range should they happen to be wider then the specified range. +

+The date is specified as a normal date string according to the chosen locale. + 
+ +

Example

+$graph->SetDateRange('2001-11-22','2002-1-24');
+

+

+

 

 

+function SetLabelVMarginFactor($aVal) +
+ +Set margin vertical factor.

+ + + + +
ArgumentDefaultDescription
+$aVal + + Margin factor
+ +

Description
Specify the fraction of the font height that should be added as vertical margin between the labels. 
+ +

Example

+$ganttgraph->SetLabelVMarginFactor(0.7); +
+

+

 

 

+function SetSimpleFont($aFont,$aSize) +
+ +Specify font for simplified Gantt graph

+ + + + + + +
ArgumentDefaultDescription
+$aFont + + Font family
+$aSize + + Font size
+ +

Description
Specify font for simplified Gantt graph constructed with CreateSimple 
+  
See also
GanttGraph::CreateSimple +

Example

+$ganttgraph->SetSimpleFont(FF_FONT2); +
+

+

 

 

+function SetSimpleStyle($aBand,$aColor,$aBkgColor) +
+ +Specify style parameters for graphs constructed with CreateSimple

+ + + + + + + + +
ArgumentDefaultDescription
+$aBand + + Patern style
+$aColor + + Pattern color
+$aBkgColor + + Pattern background color
+ +

Description
Specify looks for bars in Gantt graph when the gantt chart is created with CreateSimple. +

+The pattern style can be one of + +

    +
  1. GANTT_RDIAG, Right diagonal lines +
  2. GANTT_LDIAG, Left diagonal lines +
  3. GANTT_SOLID, Solid one color +
  4. GANTT_LVERT, Vertical lines +
  5. GANTT_LHOR, Horizontal lines +
  6. GANTT_VLINE, Vertical lines +
  7. GANTT_HLINE, Horizontal lines +
  8. GANTT_3DPLANE, A 3D plane +
  9. GANTT_HVCROSS, Crosses +
  10. GANTT_DIAGCROSS, Diagonal crosses +

+  
See also
GanttGraph::CreateSimple and GanttBar::SetPattern +

Example

+$ganttgraph->SetSimpleStyle(GANTT_SOLID,'orange','orange'); +
+

+

 

 

+function SetVMarginFactor($aVal) +
+ +Specify the margin factor for lines in the gantt graph

+ + + + +
ArgumentDefaultDescription
+$aVal + + Vertical margin factor
+ +

Description
Specify the margin factor for lines in the Gantt graph. A factor of 1 makes each line take just as much space as it needs. A factor of 1.5 makes it 1.5 linmes apart and a factor of 2 makes it double-line spacing and so on. +

+Hint: When using icon in titles it is usually a good idea to use a margin factor > 1 + 
+  

See also
GanttGraph::SetLabelVMarginFactor +

Example

+$graph->SetVMarginFactor(2); +
+

+

 

 

+function ShowHeaders($aFlg) +
+ +Determine what headers/scales to display.

+ + + + +
ArgumentDefaultDescription
+$aFlg + + Logic OR of flags to specify what headers should be displayed.
+ +

Description
Specify what headers should be displayed on the Gantt charts. Possible headers are: + +To specify multiple header you just bitwise OR the wanted number of headers together. + 
+ +

Example

+// Show all headers
$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK);
+

+

+

 

 

+function Stroke($aStrokeFileName) +
+ +Internal. Stroke the gantt chart.

+ + + + +
ArgumentDefaultDescription
+$aStrokeFileName + + +"" +Filename to stroke image to
+ +

Description
Internal. Stroke the gantt chart. If a filename is specified then the graph will be stroked to that file and will not be sent back to the browser. +

+This should as usual be the last method called in your script. + 
+  

See also
Graph::Stroke +

Example

+$ganttgraph->Stroke();
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/GanttPlotObject.html b/html/includes/jpgraph/docs/ref/GanttPlotObject.html new file mode 100644 index 0000000000..ecf64ca3bc --- /dev/null +++ b/html/includes/jpgraph/docs/ref/GanttPlotObject.html @@ -0,0 +1,176 @@ +


CLASS GanttPlotObject
+(Defined in: jpgraph_gantt.php : 2931)
 GanttPlotObject 
 SetCaptionMargin() 
SetConstrain() 
SetCSIMAlt() 
SetCSIMTarget() 
SetLabelLeftMargin() 
+
 

Class usage and Overview
Abstract base class to hold common properties for all objects that are drawn on the Gantt plot like activity bars, milestones, vertical markers. +

+Internal method that can't be instantiated directly. Used to capture the common properties of all objects that can be added to the Ganttgraph, i.e. GanttBar, MileStones GanttVLine. + +

  +

See also related classes:
GanttGraph, GanttBar, GanttVLine and MileStone

 


Class Methods

+

 

 

+function SetCaptionMargin($aMarg) +
+ +Specify margin (in pixels) between object and caption string

+ + + + +
ArgumentDefaultDescription
+$aMarg + + Margin in pixels
+ +

Description
Specify margin (in pixels) between object and caption string 
+ +

Example

+$ms->SetCaptionMargin(20);
+

+

+

 

 

+function SetConstrain($aRow,$aType,$aColor,$aArrowSize,$aArrowType) +
+ +Specify a constrain link between this object and another

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aRow + + Gantt row where tarhet for constrain is
+$aType + + Type of constrain
+$aColor + + +'black' +Color of constrain
+$aArrowSize + + +ARROW_S2 +Size of ending arrow
+$aArrowType + + +ARROWT_SOLID +Type of arrow
+ +

Description
Specify a constrain link between this object and another. The possible constrain types are + +

+The possible arrow sizes are +

+ +

+Type of arrow can be either of +

 
+ +

Example

+// Add a constrain from the end of this activity to 
// the start of the activity on row 2
$bar->SetConstrain(2,CONSTRAIN_ENDSTART);
+

+

+

 

 

+function SetCSIMAlt($aAlt) +
+ +Specify ALT-tag text for hotspot

+ + + + +
ArgumentDefaultDescription
+$aAlt + + Alt text
+ +

Description
The ALT text used in conjunction with image map is handled slightly diffrent between different browsers. Most browser show this text if you let the mouse pointer hoover over a hotspot in the image for 1 or 2 seconds. +

+Note: You must have specified a CSIM atrget for this to have any effect. 
+  

See also
GanttPlotObject::SetCSIMTarget +

Example

+$bar->SetCSIMAlt('Main activity'); +
+

+

 

 

+function SetCSIMTarget($aTarget,$aAlt) +
+ +Specify URL when object is used in a CSIM

+ + + + + + +
ArgumentDefaultDescription
+$aTarget + + Target URL
+$aAlt + + +'' +Alt texts
+ +

Description
Used to specify the target URL for for a hotspot 
+  
See also
GanttPlotObject::SetCSIMAlt +

Example

+$bar->SetCSIMTarget('http://localhost/show_details.php'); +
+

+

 

 

+function SetLabelLeftMargin($aOff) +
+ +Specify offset (in pixels) for the title of this object.

+ + + + +
ArgumentDefaultDescription
+$aOff + + Offset in pixels
+ +

Description
Specify offset (in pixels) for the title of this object 
+ +

Example

+$ms->SetLabelLeftMargin(20);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/GanttScale.html b/html/includes/jpgraph/docs/ref/GanttScale.html new file mode 100644 index 0000000000..fb4b8459a2 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/GanttScale.html @@ -0,0 +1,167 @@ +


CLASS GanttScale
+(Defined in: jpgraph_gantt.php : 1834)
 GanttScale 
 SetDateLocale() 
SetRange() 
SetTableTitleBackground() 
SetVertLayout() 
SetWeekStart() 
UseWeekendBackground() 
+
 

Class usage and Overview
Internal class to represent the scale used for Gantt graphs. + +The scale is accessible as GanttGraph::scale + +The following public available subobjects are available + +

  +

See also related classes:
GanttGraph, HeaderProperty, GanttActivityInfo and TextProperty

 


Class Methods

+

 

 

+function SetDateLocale($aLocale) +
+ +Specify locale to use for scale.

+ + + + +
ArgumentDefaultDescription
+$aLocale + + String to specify locale
+ +

Description
Specify locale to use for scale. If no locale is specified then the default locale for the installed system will be used. 
+  
See also
DateLocale::DateLocale +

Example

+$ganttgraph->scale->SetDateLocale('US_en'); +
+

+

 

 

+function SetRange($aMin,$aMax) +
+ +Specify date range for scale.

+ + + + + + +
ArgumentDefaultDescription
+$aMin + + Min date
+$aMax + + Max date
+ +

Description
Specify scale min and max date either as timestamp or as date strings. Always round to the nearest week boundary 
+ +

Example

+$ganttgraph->scale->SetRange("2002-11-23", "2003-03-31");
+

+

+

 

 

+function SetTableTitleBackground($aColor) +
+ +Specify background for the table title area.

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specify background for the table title area (upper left corner of the table). 
+ +

Example

+$ganttgraph->scale->SetTableTitleBackground('lightblue'); +
+

+

 

 

+function SetVertLayout($aLayout) +
+ +Specify the vertical layout fro rows.

+ + + + +
ArgumentDefaultDescription
+$aLayout + + Vertical layout parameter
+ +

Description
Should the layout be from top or even. Valid parameters are + + +Note that if you use auto-sizing of the Gantt chart these parameters have little effect since the total height of the image will always be so that all rows fit exactly. + 
+ +

Example

+$granntgraph->scale->SetVertLayout(GANTT_FROMTOP); +
+

+

 

 

+function SetWeekStart($aStartDay) +
+ +Specify which weekday should start the week

+ + + + +
ArgumentDefaultDescription
+$aStartDay + + Weekday, (0-6)
+ +

Description
Which day should the week start? +0==Sun, 1==Monday, 2==Tuesday etc + +By default weeks start on Mondays. 
+  
See also
GanttScale::SetRange +

Example

+$granttgraph->SetWeekStart(1); +
+

+

 

 

+function UseWeekendBackground($aShow) +
+ +Determine if the background color for weekends in the scale should extend down in the plot area.

+ + + + +
ArgumentDefaultDescription
+$aShow + + True=Use the weekend background color in the ganttgraph
+ +

Description
Determine if the background color for weekends in the scale should extend down in the plot area. 
+ +

Example

+$ganttgraph->scale->USeWeekendBackground();
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/GanttVLine.html b/html/includes/jpgraph/docs/ref/GanttVLine.html new file mode 100644 index 0000000000..df8c470b0b --- /dev/null +++ b/html/includes/jpgraph/docs/ref/GanttVLine.html @@ -0,0 +1,111 @@ +


CLASS GanttVLine EXTENDS GanttPlotObject
+(Defined in: jpgraph_gantt.php : 3474)
 GanttVLine  GanttPlotObject  
 GanttVLine() 
SetDayOffset() 
SetTitleMargin() 
+
 
 

Class usage and Overview
This class represents a vertical line on the gantt scale. It can for example be used to illustrate the boundaries between different phases in a project plan. + +To access the title property just use the 'title' property of the line, for example + +$line = new GantVLine(.....); +$line->title->SetFont(FF_FONT1, FS_BOLD); + +$ganttgraph->Add($line); +

  +

See also related classes:
GanttGraph, GanttBar and MileStone

 


Class Methods

+

 

 

+function GanttVLine($aDate,$aTitle,$aColor,$aWeight,$aStyle) +
+ +Create a new vertical line in the Gantt graph

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aDate + + Date where the line should be
+$aTitle + + +"" +Title of line
+$aColor + + +"black" +Color for line
+$aWeight + + +3 +Line weight
+$aStyle + + +"dashed" +Line style (dotted, slashed etc)
+ +

Description
Create a new verticla line according to specification that later on can be added to the gantt graph vis its Add() method. 
+  
See also
Image::SetLineStyle +

Example

+$line = new GanttVLine('2002-11-02','System test starts','darkblue',2,'solid');

$granttgraph->Add($line);

+

+

+

 

 

+function SetDayOffset($aOff) +
+ +Specify where in the single day the line sould be drawn.

+ + + + +
ArgumentDefaultDescription
+$aOff + + +0.5 +Fraction of day (0,1)
+ +

Description
Specify where in the single day the line sould be drawn.  
+ +

Example

+// Draw line in the middle of the day
$line->SetDayOffset(0.5);
+

+

+

 

 

+function SetTitleMargin($aMarg) +
+ +Set distance between end of line and title.

+ + + + +
ArgumentDefaultDescription
+$aMarg + + Margin in pixels
+ +

Description
Set distance between end of line and title. 
+ +

Example

+$line->SetTitleMargin(20); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Graph.html b/html/includes/jpgraph/docs/ref/Graph.html new file mode 100644 index 0000000000..0750ecf6ca --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Graph.html @@ -0,0 +1,1748 @@ +


CLASS Graph
+(Defined in: jpgraph.php : 457)
 Graph 
 Add() 
AddBand() 
AddLine() 
AddText() 
AddY() 
AddY2() 
CheckCSIMCache() 
GetHTMLImageMap() 
Graph() 
Set3DPerspective() 
Set90AndMargin() 
SetAlphaBlending() 
SetAngle() 
SetAxisLabelBackground() 
SetAxisStyle() 
SetBackgroundCFlag() 
SetBackgroundCountryFlag() 
SetBackgroundGradient() 
SetBackgroundImage() 
SetBackgroundImageMix() 
SetBox() 
SetClipping() 
SetColor() 
SetCSIMImgAlt() 
SetFrame() 
SetFrameBevel() 
SetGridDepth() 
SetIconDepth() 
SetImgFormat() 
SetMargin() 
SetMarginColor() 
SetScale() 
SetShadow() 
SetTextScaleAbsCenterOff() 
SetTickDensity() 
SetTitleBackground() 
SetTitleBackgroundFillStyle() 
SetY2OrderBack() 
SetY2Scale() 
SetYDeltaDist() 
SetYScale() 
Stroke() 
StrokeCSIM() 
StrokeFrameBackground() 
+
 

Class usage and Overview
The Graph class is the main container class for all x,y-axis based plots which controls the creation of the entire graph. You must always instantiate one instance to create a graph. Through this class one controls many overall settings of the image displayed. +

+Please note that to create Pie, Gantt, Canvas and Spider charts you have to use their respective creation classes. +

+Public properties: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
xaxisAxisX-axis
yaxisAxisY-axis
xgridGridGrid lines for X-axis
ygridGridGrid lines for Y-axis
legendLegendProperties for legend box
titleTextGraph main title
subtitleTextSub title
subsubtitleTextSub title
tabtitleGraphTabTitleOption Tab title for graph
imgRotImageThe image canvas
+

  +

See also related classes:
Axis, Grid, Text and Image

 


Class Methods

+

 

 

+function Add(&$aPlot) +
+ +Add any plot object to the graph

+ + + + +
ArgumentDefaultDescription
+&$aPlot + + Plot object
+ +

Description
Each plot that should be displayed within the graph has to be added to the graph. This is the main method to add object. You can use this method to add + + +This method will add a plopt for use with the ?Left? Y-scale, (the normal Y scale). To add a plot to the second Y scale you should use AddY2(). +

+Note that since the plot is added as a reference any changes you make to the original plot will also happen to the plot you have added to the graph. +

+Add() will always add plots to the first Y-scale. If you are using two Y-axis then you must use AddY2() to add plots to the second Y-scale. + 
+  

See also
Graph::AddY2 and Graph::SetScale +

Example

+$graph = new Graph(300,200,"auto");    
$graph->img->SetMargin(40,30,20,40);
$graph->SetScale("textlin");
$graph->SetShadow();

// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor("orange");
$graph->Add($bplot);

// Display the graph
$graph->Stroke();
+

+

+

 

 

+function AddBand(&$aBand,$aToY2) +
+ +Add vertical or horizontal band

+ + + + + + +
ArgumentDefaultDescription
+&$aBand + + Band object
+$aToY2 + + +false +Add object to Y2 axis
+ +

Description
A plot may have one or several filled horizontal or vertical "bands" to emphasise certain scale areas. +

+Each band is an instance of the PlotBand class. For types of plot band see the documentation of class PlotBand +

+Note: You can alos use the standard method Add() to add bands. 
+  

See also
PlotBand::PlotBand and Graph::Add +

Example

+$graph->AddBand(new PlotBand(HORIZONTAL,BAND_RDIAG,0, "max", "red", 2)); +
+

+

 

 

+function AddLine(&$aLine,$aToY2) +
+ +Add a line object (class PlotLine) to the graph

+ + + + + + +
ArgumentDefaultDescription
+&$aLine + + Line object to add
+$aToY2 + + +false +Add line to Y2 axis
+ +

Description
Add a vertical or horizontal line to the graph. The line will extend over the entire length of the plot. The plot object is an instance of the PlotLine class +

+Note: You can alos use the standard method Add() to add lines. 
+  

See also
PlotLine::PlotLine and Graph::Add +

Example

+// Add mark graph with static lines
$graph->AddLine(new PlotLine(HORIZONTAL,0,"black",2));
$graph->AddLine(new PlotLine(VERTICAL,3,"black",2));
+

+

+

 

 

+function AddText(&$aTxt,$aToY2) +
+ +Add text object to the graph

+ + + + + + +
ArgumentDefaultDescription
+&$aTxt + + Text object to add
+$aToY2 + + +false +Add text to Y2 axis
+ +

Description
Adds an instance of the Text class to the graph, allowing arbitrary text to be placed anywhere in the graph. +

+Note: You can alos use the standard method Add() to add bands. + 
+  

See also
Text::Text and Graph::Add +

Example

+// You can specify the position as fraction of the
// image width and height
$caption=new Text(?Figure 1. Temperature over time?,0.1,0.8);
$caption->SetFont(FONT1_BOLD);
$graph->AddText($caption);
+

+

+

 

 

+function AddY($aN,&$aPlot) +
+ +Add plot to second Y-axis n

+ + + + + + +
ArgumentDefaultDescription
+$aN + + Number of axis to add data to
+&$aPlot + + The plot to be added
+ +

Description
This method is used to add a plot in the case the graph has multiple Y-axis. The first argument should be the index of the Y-axis. 
+ +

Example

+php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$datay = array(5,3,7,2);
$datay2 = array(88,10,55,42);
$datay3 = array(255,35,745,244);
$datay4 = array(130,97,68,119);

// Setup the graph
$graph = new Graph(600,250);
$graph->SetMargin(30,200,20,20);
$graph->SetMarginColor('white');
$graph->SetColor('lightgray');

$graph->SetScale("intlin");

$graph->SetYScale(0,"lin");
$graph->SetYScale(1,"lin");
$graph->SetYScale(2,"lin");

$p1 = new LinePlot($datay);
$p1->SetColor('blue');
$graph->Add($p1);

$p2 = new LinePlot($datay2);
$p2->SetColor('darkred');
$graph->AddY(0,$p2);
$graph->ynaxis[0]->SetColor('darkred');

$p3 = new LinePlot($datay3);
$p3->SetColor('red');
$graph->AddY(1,$p3);
$graph->ynaxis[1]->SetColor('red');

$p4 = new LinePlot($datay4);
$p4->SetColor('blue');
$graph->AddY(2,$p4);
$graph->ynaxis[2]->SetColor('blue');

// Output line
$graph->Stroke();


+

+

+

 

 

+function AddY2(&$aPlot) +
+ +Add plot to second Y-axis

+ + + + +
ArgumentDefaultDescription
+&$aPlot + + Plot to add to the Y2 axis
+ +

Description
Works the same way as Add() but the plot is added for use with the Y2 scale (the right Y scale) instead. 
+  
See also
Graph::Add and Graph::SetY2Scale +

Example

+$graph = new Graph(300,200);
$graph->SetScale('linlin');
$graph->SetY2Scale('linlog');
$lineplot = new LinePlot($datay);
$graph->AddY2($lineplot);
+

+

+

 

 

+function CheckCSIMCache($aCacheName,$aTimeOut) +
+ +Check if cached CSIM graph exists

+ + + + + + +
ArgumentDefaultDescription
+$aCacheName + + Cache file name
+$aTimeOut + + +60 +Timeout (in minutes)
+ +

Description
This method is used to enable caching for graphs that use image maps (CSIM). It should be called as the first method after the creation of the Graph(). If the cached image and image map exists this will be directly sent back to the browser and script execution will stop. +

+This specifically means that no lines of code after this method will be executed in case the image/map is found in the cache. + 
+  

See also
Graph::StrokeCSIM +

Example

+$graph = Graph(300,200);
$graph->CheckCSIMCache('myimage01',10);

// .. Lopt of code to create the image

$graph->StrokeCSIM();
+

+

+

 

 

+function GetHTMLImageMap($aMapName) +
+ +Get a complete .. tag for the final image map

+ + + + +
ArgumentDefaultDescription
+$aMapName + + Image map name
+ +

Description
When you are using image maps for a plot then this routine is called in your script to get the resulting image map as a string for the graph. The image map is given the name specified as the first argument to the method. +

+Please note that due to the way client side image maps work you need to have both the image map and the image available in the script that is sent back to the browser. Since you can't do this at the same time you will have to create an image to disk and read the image map. The you have to stream the HTML page with an tag to load the previously generated image as well as the image map. + 
+ +

Example

+// The image must be stroked to find out the image maps
$graph->Stroke($myfile);

// Then read the image map
$imagemap = $graph->GetHTMLImageMap('MainMap');

echo $imagemap;
echo "<img src=$myfile>";
+

+

+

 

 

+function Graph($aWidth,$aHeight,$aCachedName,$aTimeOut,$aInline) +
+ +Creates a new graph.

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aWidth + + +300 +Width
+$aHeight + + +200 +Height
+$aCachedName + + +"" +Cache file name
+$aTimeOut + + +0 +Timeout value for cache
+$aInline + + +true +True=Stream the image back to the browser
+ +

Description
Creates a new graph. This is often the first call made to set-up a new graph. +
+If the cache name is specified (via the $aCachedname) argument then this method will first try to locate the named file in the cache directory (as specified by the DEFINE in jpgraph.php) rather then generating the graph on the fly. If the file is not there or if it is older then the specified timeout value ($aTimeOut) the graph will be generated and saved as the specified file. +

+If the cache name is specifed as 'auto' then the cache name will be based on the basename of the script with an extension indicating the image format used, i.e. JPG, GIF or PNG. +

+If the specified file is found in the cache directory then it will be streamed back to the browser directly. +

+If no cache name is specified then the graph will always be generated and the cache bypassed. The same is true if the DEFINE 'USE_CACHE' or 'READ_CACHE' is set to false. +

+Before any other operation is performed on the graph a call to SetScale() should be made to finish the initialisation of the graph. + 
+  

See also
Graph::Stroke +

Example

+// Example 1. use cache and automtic create the cache name
$graph = new Graph(400,200,"auto");    
$graph->img->SetMargin(60,20,30,50);
$graph->SetScale("textlin");
$graph->SetMarginColor("silver");
$graph->SetShadow();

// Example 2 . Don't use the cache
$graph = new Graph(400,200);    
$graph->SetScale("textint");
+

+

+

 

 

+function Set3DPerspective($aDir,$aHorizon,$aSkewDist,$aQuality,$aFillColor,$aBorder,$aMinSize,$aHorizonPos) +
+ +Enable image perspective transformation

+ + + + + + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$aDir + + +1 +Direction for 3D perspective
+$aHorizon + + +100 +Distance (in pixels) from the bottom of the image to the horizon
+$aSkewDist + + +120 +Skew distance (in pixels) on the horizon
+$aQuality + + +false +Boolean. High quality =
+$aFillColor + + +'#FFFFFF' +What fill color to use
+$aBorder + + +false +Boolean. Border around?
+$aMinSize + + +true +Boolean. Make the transformed image canvas as small as possible
+$aHorizonPos + + +0.5 +Distance from left on the horizon for the point of focus
+ +

Description
Enable final image perspective transformation before sending the image back to the browser. This makes a "skewing" tansformation of the image to emulate a 3D depth. + +

+Allowed argument for $aDir are +

    +
  1. 'SKEW3D_UP' +
  2. 'SKEW3D_DOWN' +
  3. 'SKEW3D_LEFT' +
  4. 'SKEW3D_RIGHT' +
+ +$aHorizon Determines how far away the horizon are from the bottom of the picture (in pixels) +

+aSkewDist How far to the right on the horizon is the +"skewing point", a large value gives a very strong for-shortening. +

+aQuality Use high quality (takes longer time) TRUE or FALSE +

+aFIllColor Fill background color in the image on places where the original image no longer cover the entire canvas. +

+aBorder Border around or not +

+aMinSize Just make the image as large as it has to be. TRUE or FALSE. If this argument is set to false then the original image size will be preserved. +

+aHorizonPosHow far, in fraction, should the point of focus be from the left edge of the image. 
+ +

Example

+$graph->Set3DPerspective(SKEW3D_UP,100,120,true); +
+

+

 

 

+function Set90AndMargin($lm,$rm,$tm,$bm) +
+ +Rotate the graph 90 degrees and set the margins

+ + + + + + + + + + +
ArgumentDefaultDescription
+$lm + + +0 +Left margin
+$rm + + +0 +Right Margin
+$tm + + +0 +Top margin
+$bm + + +0 +Bottom margin
+ +

Description
Rotates the graph 90 degrees and sets the margin as specified. +

+Remember that when rotating the graph it might be a good idea to adjust the axis so that the alignment of the labels for x and Y axis. For example by setting them as: + +

+$graph->xaxis->SetLabelAlign('right','center','right'); +
+$graph->yaxis->SetLabelAlign('center','bottom'); +

+Note: This is slightly different from using SetAngle() and SetMargin() in that this method automatically adjusts the margin so that width becomes height and vice versa due to the rotation. + + + 
+  

See also
Graph::SetAngle and Graph::SetMargin +

Example

+$graph = new Graph(300,200,"auto");
$graph->SetScale('linlin');

$graph->Set90AndMargin(40,40,40,40);        
$graph->SetShadow();

$graph->title->Set("A 90 degrees rotated scatter plot");
$graph->title->SetFont(FF_FONT1,FS_BOLD);

// Adjust the label align for X-axis so they look good rotated
$graph->xaxis->SetLabelAlign('right','center','right');

// Adjust the label align for Y-axis so they look good rotated
$graph->yaxis->SetLabelAlign('center','bottom');

$sp1 = new ScatterPlot($datay,$datax);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
$sp1->mark->SetFillColor("red");
$sp1->mark->SetWidth(5);

$graph->Add($sp1);
$graph->Stroke();
+

+

+

 

 

+function SetAlphaBlending($aFlg) +
+ +Eanble/disable alpha blending

+ + + + +
ArgumentDefaultDescription
+$aFlg + + +true +TRUE=Enable alpha blending
+ +

Description
Enable disable alpha blending. The transparency factor is specified in the color as transparency fraction. For example, to specify a red color which is 50% transparent you specify this as: +

+"red@0.5" (or "#FF0000@0.5") +

+can then use this color specification in all places where the color may be specified. If the alpha blending is not active then the alpha parameter will have no effect. +

+Note that the use of alpha blending requires GD 2.01 or higher. By default alpha blending is enabled. + 
+ +

Example

+$graph->SetAlphaBlending(); +
+

+

 

 

+function SetAngle($aAngle) +
+ +Specify graph angle 0-360 degrees.

+ + + + +
ArgumentDefaultDescription
+$aAngle + + Rotation angle for graph
+ +

Description
The graph can be rotated an arbitrary number of degrees. This will allow you to easily create, for example, horizontal bar graphs by rotating a normal bar graph 90 degrees. +

+See horizbarex1.php for a real life example. +

+Note: If you want a 90 degrees rotated graph consider using Graph::Set90AndMargin() which greatly simplifies this with just one call + 
+  

See also
Graph::Set90AndMargin +

Example

+$graph = new Graph(300,200);
$graph->SetScale('textlin');
$graph->SetAngle(90);
+

+

+

 

 

+function SetAxisLabelBackground($aType,$aXFColor,$aXColor,$aYFColor,$aYColor) +
+ +// Finally stream the generated picture

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aType + + No description available
+$aXFColor + + +'lightgray' +No description available
+$aXColor + + +'black' +No description available
+$aYFColor + + +'lightgray' +No description available
+$aYColor + + +'black' +No description available
+ +

Description
No description available.

+

 

 

+function SetAxisStyle($aStyle) +
+ +Specify axis style (boxed or single)

+ + + + +
ArgumentDefaultDescription
+$aStyle + + Style of axis
+ +

Description
The most common type of axis is two axis which crosses at a specified point. However for scientific plot it is often common to want to mirror the axis (and the scale) around the plot area. +This method controls which type to use + + + +See funcex1.php, funcex2.php and funcex3.php for real life examples. 
+ +

Example

+$graph->SetAxisStyle(AXSTYLE_BOXIN);
+

+

+

 

 

+function SetBackgroundCFlag($aName,$aBgType,$aMix) +
+ +Set a country flag in the background

+ + + + + + + + +
ArgumentDefaultDescription
+$aName + + Index or (partial) name of Country
+$aBgType + + +BGIMG_FILLPLOT +Background fill type
+$aMix + + +100 +Mix percentage
+ +

Description
[Synonym for SetBackgroundCountryFlag() ) +Set a country flag in the background. All supported countries can be specified by either +
    +
  1. Numeric index, (0-238) +
  2. Full or partial name, e.g. "norway" +
  3. The unique string index for the country +
+ +For a list of all available flags please run the file "listallflags.php" in the Example directory. +

+The final arcgument "aMix" is a value between 0-100 and specifies the blend factor for the flag. 
+

+

 

 

+function SetBackgroundCountryFlag($aName,$aBgType,$aMix) +
+ +Set a country flag in the graph background

+ + + + + + + + +
ArgumentDefaultDescription
+$aName + + Full or partial country name
+$aBgType + + +BGIMG_FILLPLOT +Normal background fill type
+$aMix + + +100 +Mix fraction
+ +

Description
Set a country flag in the background. All supported countries can be specified by either +
    +
  1. Numeric index, (0-238) +
  2. Full or partial name, e.g. "norway" +
  3. The unique string index for the country +
+ +For a list of all available flags please run the file "listallflags.php" in the Example directory. +

+The final arcgument "aMix" is a value between 0-100 and specifies the blend factor for the flag. + 
+

+

 

 

+function SetBackgroundGradient($aFrom,$aTo,$aGradType,$aStyle) +
+ +Set a color gradient as the background

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aFrom + + +'navy' +Color 1
+$aTo + + +'silver' +Color 2
+$aGradType + + +2 +Gradient type
+$aStyle + + +BGRAD_FRAME +Gardient layout style
+ +

Description
This method allows you to specify a color gradient as the background of the graph. The color gradient can either fill the entire graph, just the plopt area or just the margin. This is specified by the $aStyle argument by specifyin one of the following values: + + +The gradient type can be one of + + +Note: In order for the gradient to be visible the Frame must be enabled, i.e. graph->ShowFrame(false) will hide the gradient. If you like to hide the frame around the entire graph set the color to the margin color or set the weight of the frame line to 0. + 
+  
See also
Graph::SetBackgroundImage and Graph::SetFrame +

Example

+$graph->SetBackgroundGradient('blue','navy:0.5',GRAD_HOR,BGRAD_MARGIN); +
+

+

 

 

+function SetBackgroundImage($aFileName,$aBgType,$aImgFormat) +
+ +Specify a background image fro the plot

+ + + + + + + + +
ArgumentDefaultDescription
+$aFileName + + Filename for background image
+$aBgType + + +BGIMG_FILLPLOT +Style of background image
+$aImgFormat + + +"auto" +Image format ("jpeg", "gif", "png")
+ +

Description
A graph may have a background image. The image is loaded from a specified file and may be of type GIF, JPG or PNG. The image type may also be specified as "auto", in this case the image format is determined by the file ending. +

+The positioning and sizing of the background image can be controlled by the $aBgType parameter. Possible values are +

+ +If you want ot use a background image on a canvas graph you must be carefull. Since canvas graph use no buffering, i.e everythng is written directly in the order you specify the commands. For canvas graph the background image get's stroked when you call the Initframe() method. +SO, this call should eb among the very first. Every graph object after that will be stroked on top of the specified background image. + + 
+  
See also
Graph::SetBackgroundGradient +

Example

+// 
$graph->SetBackgroundImage("tiger_bkg.png",BGIMG_FILLFRAME);

// If you use a canvas graph, and only canvas graphs,
// you must manually call the InitFrame() method.
$graph->InitFrame();
+

+

+

 

 

+function SetBackgroundImageMix($aMix) +
+ +Specifes what how much the background image should be blendid in with the background

+ + + + +
ArgumentDefaultDescription
+$aMix + + Mix value (0-100)
+ +

Description
Specifes what how much the background image should be blendid in with the background. 
+

+

 

 

+function SetBox($aDrawPlotFrame,$aPlotFrameColor,$aPlotFrameWeight) +
+ +Set a frame around the plot area

+ + + + + + + + +
ArgumentDefaultDescription
+$aDrawPlotFrame + + +true +True=Draw the frame
+$aPlotFrameColor + + +array(0,0,0) +Frame color
+$aPlotFrameWeight + + +1 +Width fo frame line
+ +

Description
This is used to specify whether the plot-area should have a rectangle around it and the specifics of that rectangle. 
+  
See also
Graph::SetFrame +

Example

+$graph = new Graph(300,200);
$graph->SetScale('linlin');
$graph->Box();
+

+

+

 

 

+function SetClipping($aFlg) +
+ +Enable clipping of graph outside the plotarea

+ + + + +
ArgumentDefaultDescription
+$aFlg + + +true +Enable/disbale clipping
+ +

Description
Enable or disable clipping outside the plot area. If clipping is enabled then only the part of the graph exactly inside the plot area will be visible. +

+Clipping may come in handy when you for example set a manual scale and have data points outside the specified range. +

+By default clipping is disabled. +

+Note 1: Clipping is only supported for graphs at 0 or 90 degrees rotation and will generate an error message if enabled together with any other angle. +

+Note 2: The clipping is implemented with a O(1) algorithm in terns of data size. + 
+ +

Example

+$graph->SetClipping(); +
+

+

 

 

+function SetColor($aColor) +
+ +Specify color for the plotarea (not the margins)

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specify color for the plotarea (not the margins) 
+  
See also
Graph::SetFrame and Graph::SetMarginColor +

Example

+$graph->SetColor(?wheat?); +
+

+

 

 

+function SetCSIMImgAlt($aAlt) +
+ +Set the Alt text used for the IMG tag generated for CSIM

+ + + + +
ArgumentDefaultDescription
+$aAlt + + Alt text
+ +

Description
Set the ALt text used for the IMG tag generated for CSIM. Whne calling StrokeCSIM() a HTML page will be returned witha recusrive call to teh same script in an IMG tag. This method allows you to specify the Alt text to be used in the returned HTML page. 
+
+
Returns
void
+  
See also
Graph::StrokeCSIM +

Example

+$graph->SetCSIMImgAlt('Yearly values');
$graph->StrokeCSIM();
+

+

+

 

 

+function SetFrame($aDrawImgFrame,$aImgFrameColor,$aImgFrameWeight) +
+ +Set a frame around the entire image

+ + + + + + + + +
ArgumentDefaultDescription
+$aDrawImgFrame + + +true +True=Draw a frame around the entire image
+$aImgFrameColor + + +array(0,0,0) +Frame color
+$aImgFrameWeight + + +1 +Width of frame
+ +

Description
Sets a frame (rectangle) of the chosen color around the edges of the image. + +Note: For implementation reasons the frame must be enabled in order to for a specified gradient background to show up. + 
+  
See also
Graph::SetMarginColor +

Example

+$graph->SetFrame(true,'darkblue',2); +
+

+

 

 

+function SetFrameBevel($aDepth,$aBorder,$aBorderColor,$aColor1,$aColor2,$aFlg) +
+ +Specify a abevel frame around the entire graph

+ + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$aDepth + + +3 +Depth (Height) in pixels for bevel
+$aBorder + + +false +True=Add 1 pixel border around
+$aBorderColor + + +'black' +Border color
+$aColor1 + + +'white@0.4' +Right and bottom shadow
+$aColor2 + + +'darkgray@0.4' +Left and top shadow
+$aFlg + + +true +True=Show bevel frame
+ +

Description
Specify a a bevel frame around the entire graph. A Bevel frame will give the entire graph a "3D" uprised feel. 
+ +

Example

+$graph->SetFrameBevel(2,true,'black'); +
+

+

 

 

+function SetGridDepth($aDepth) +
+ +Should the grid be in front or back of the plot?

+ + + + +
ArgumentDefaultDescription
+$aDepth + + Grid depth
+ +

Description
Specify if the grid in the plot should be drawn under or on top of the actual plots. +

+Valid values for grid depth are +

+

+The default is to draw the grid lines under the plots. 
+ +

Example

+$graph->SetGridDepth(DEPTH_FRONT);
+

+

+

 

 

+function SetIconDepth($aDepth) +
+ +Determine if Icons should be under or over the plot

+ + + + +
ArgumentDefaultDescription
+$aDepth + + Depth of icons (see description)
+ +

Description
Determine if Icons should be under or over the plot. The argument is one of + + +By default the icons are drawn under the plots 
+ +

Example

+// Put the icons in front of the plot
$graph->SetIconDepth(DEPTH_FRONT);
+

+

+

 

 

+function SetImgFormat($aFormat,$aQuality) +
+ +Set Image format and optional quality

+ + + + + + +
ArgumentDefaultDescription
+$aFormat + + Format (see description)
+$aQuality + + +75 +Quality parameter for JPEG
+ +

Description
Specify what image format the generated image should use. By default the library will try to create PNG images and if the PNG libraries are not available then it will try to use foirst JPEG and finally GIF encoding. +

+The image format is specified as a string that can be one of +

+ +The PNG format gives in general best compression for ordinary data plots and is also a looseless format. +

+If the graph has complicated background images or 100s of colors then there is a good chance that JPEG will give better compression on the expense of image quality. +

+The quality parameter is a value between (0,100) inclusively. = gives best compression but worst quality and 100 give the best quality. Suitable ranges is 60-90. + 
+ +

Example

+// Set JPEG format with 60% quality
$graph->SetImgFormat('jpeg',60);
+

+

+

 

 

+function SetMargin($lm,$rm,$tm,$bm) +
+ +Specify side margins for graph

+ + + + + + + + + + +
ArgumentDefaultDescription
+$lm + + Left margin (in pixels)
+$rm + + Right margin (in pixels)
+$tm + + Top margin (in pixels)
+$bm + + Bottom margin (in pixels)
+ +

Description
Specify the margin around the actual plot area. This is actually just a shortcut for the Image::SetMargin() +

+Note: If you want to set the margin for a 90 degrees rotated graph please consider using Graph::Set90AndMargin() instead since this will automatically adjust for the rotated image and the swapped meaning of width and height. + 
+  

See also
Image::SetMargin +

Example

+$graph->SetMargin(40,20,60,20); +
+

+

 

 

+function SetMarginColor($aColor) +
+ +Specify color for the margins (all areas outside the plotarea)

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specifies the color of the area between the plot area and the edge of the image. 
+  
See also
Graph::SetColor and Graph::SetFrame +

Example

+$graph->SetMarginColor('silver'); +
+

+

 

 

+function SetScale($aAxisType,$aYMin,$aYMax,$aXMin,$aXMax) +
+ +Specify scale to use for X and Y axis

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aAxisType + + Type of axis
+$aYMin + + +1 +Y-min
+$aYMax + + +1 +Y-max
+$aXMin + + +1 +X-min
+$aXMax + + +1 +X-max
+ +

Description
Specifies what kind of scales should be used in the graph. The following combinations are allowed + + + +Any combination of these may be used. Linear and logarithmic scales are pretty straightforward. The text scale might deserve some explanation. The easiest way to think of the text scale is as a linear scale consisting of only natural numbers, i.e. 0,1,2,3,4,? . This scale is used when you just have a number of Y-values you want to plot in a consecutive order and don?t care about the X-values. It is also used when you need to have text labesl you specify (via $graph->xaxis->SetTickLabels($labels) ). +

+To specify which combination of X and Y scales you want to use the $axtype parameter is specified. In this parameter you specify, by a text string, the type of scale you want to use for both X and Y scale. +

+Possible values for each axis are:
+X: 'lin', 'text', 'log', 'int'
+Y: 'lin', 'log', 'int'
+

+Example of possible combination:
+

+It is normally recommended to use the auto-scaling feature since for most practical purposes it is good enough. However on rare occasions you might want to specify the limits yourself. This is then done by the rest of the parameters to the method. +

+Note: If you want to use a logarithmic scale you must make sure that the ?jpgraph_log.php? is included. +

+Note1: +Note that if you manually specify the scale you can also specify the tick distance with a call to Ticks::Set(). For example $graph->yaxis->scale->ticks->Set(10,5) If yiou don't ste it manually a suitable tick distance will be automatically choosen. + +Note2: +If you want to keep the autoscaling for Y-axis but specify the X-axis then just call the method with both min and max set to 0 (e.g. SetScale('linlin',0,0,0,50); ) + + 
+  

See also
Ticks::Set +

Example

+//----------------------
// EXAMPLE1: Using autoscaling
$graph->SetScale('textlin');

//----------------------
// EXAMPLE2: Using manual scale for Y-scale and only major ticks
$graph->SetScale('linlin',5,75);
$graph->yaxis->scale->ticks->Set(10); // Set major and minor tick to 10

//----------------------
// EXAMPLE3: Using manual scale for Y-scale 
$graph->SetScale('linlin',5,200);
// Set major tick dist to 40 and minor to 20 
$graph->yaxis->scale->ticks->Set(40,20); 

//----------------------
// EXAMPLE4: Using manual scale for both X and Y-scale 
$graph->SetScale('linlin',5,200,0,100);
// Set major tick dist to 40 and minor to 20 
$graph->yaxis->scale->ticks->Set(40,20);
// Set major and minor tick dist to 20 
$graph->xaxis->scale->ticks->Set(20); 

// Keeping the Autoscaling for Y-axis but fixing the X
// scale to an integer scale between [0,50]
$graph->SetScale('intlin',0,0,0,50);
+

+

+

 

 

+function SetShadow($aShowShadow,$aShadowWidth,$aShadowColor) +
+ +Add a drop shadow to the image

+ + + + + + + + +
ArgumentDefaultDescription
+$aShowShadow + + +true +True=add a drop shadow
+$aShadowWidth + + +5 +Width (in pixels of shadow)
+$aShadowColor + + +array(102,102,102) +Shadow color
+ +

Description
Sets a frame with a drop down shadow around the entire image 
+  
See also
Graph::SetFrame +

Example

+$graph->SetShadow(); +
+

+

 

 

+function SetTextScaleAbsCenterOff($aOff) +
+ +// Text width of bar to be centered in absolute pixels

+ + + + +
ArgumentDefaultDescription
+$aOff + + No description available
+ +

Description
No description available.

+

 

 

+function SetTickDensity($aYDensity,$aXDensity) +
+ +Specify how dense the ticks should be drawn

+ + + + + + +
ArgumentDefaultDescription
+$aYDensity + + +TICKD_NORMAL +Y-density
+$aXDensity + + +TICKD_NORMAL +X-density
+ +

Description
This method is used to hint how many ticks the auto-scaling should try to fit on each of the axis. +

+The following DEFINES may be used to hint to the auto-scaling how many ticks should be allocated + +

 
+ +

Example

+$graph->SetTickDensity(TICKD_DENSE); // Many Y-ticks +
+

+

 

 

+function SetTitleBackground($aBackColor,$aStyle,$aFrameStyle,$aFrameColor,$aFrameWeight,$aBevelHeight,$aEnable) +
+ +Specify background style for graph titles

+ + + + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$aBackColor + + +'gray' +Background color
+$aStyle + + +TITLEBKG_STYLE1 +Background size style, see description
+$aFrameStyle + + +TITLEBKG_FRAME_NONE +Frame style, see description
+$aFrameColor + + +'black' +Frame color
+$aFrameWeight + + +1 +Frame thickness (weight)
+$aBevelHeight + + +3 +Bevel height used for frame style bevel
+$aEnable + + +true +Enable/disable background
+ +

Description
Specify background style for graph titles, i.e. the background style for Graph::title, Graph::subtitle, Graph::subsubtitle. The actual background style is specified with the two arguments $aStyle and $aFrameStyle. +

+The first argument $aStyle determines the size the background should cover. The two possibilities are +

+ +The second style parameter specifies what type of frame should be drawn. The weight of the frame is adjustable by specifying the $aFrameweight argument. The possible options for frame styles are: + + +You can further adjust the style of the background fill by the SetTitleBackgroundFillStyle() method. + 
+  
See also
Image::Bevel and Graph::SetTitleBackgroundFillStyle +

Example

+$graph->SetTitleBackground('wheat2',TITLEBKG_STYLE1,TITLEBKG_FRAME_BOTTOM); +
+

+

 

 

+function SetTitleBackgroundFillStyle($aStyle,$aColor1,$aColor2) +
+ +Adjust the title background fill style

+ + + + + + + + +
ArgumentDefaultDescription
+$aStyle + + Fill style (see description)
+$aColor1 + + +'black' +Color 1
+$aColor2 + + +'white' +Color 2
+ +

Description
The background for the graph titles as set by SetTitleBackground() can be further adjusted with this method. The style can be sepcified as one of +
+ +

Example

+$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED,'darkgreen','black'); +
+

+

 

 

+function SetY2OrderBack($aBack) +
+ +Specify that plots on the Y2 axis should be under Y axis plots

+ + + + +
ArgumentDefaultDescription
+$aBack + + +true +TRUE=under Y axis, FALSE=above
+ +

Description
Set the depth for Y2 plots as compare to plots added to the Y axis 
+ +

Example

+$graph->SetY2OrderBack(); +
+

+

 

 

+function SetY2Scale($aAxisType,$aY2Min,$aY2Max) +
+ +Specify secondary Y scale

+ + + + + + + + +
ArgumentDefaultDescription
+$aAxisType + + +"lin" +Type of scale
+$aY2Min + + +1 +Y2Min value
+$aY2Max + + +1 +Y2Max value
+ +

Description
The graph allows two different Y-scales to be used and you can choose which one you want to use for a specific plot by the way you are adding the plot to the graph, either by Add() or by AddY2() method. +

+This method works in the exact same way for the Y2 axis as the SetScale() method previously described. +

+Allowed values for the $axtype are +

+ +Note: If you want to use a logarithmic scale you must make sure that the ?jpgraph_log.php? is included. + 
+  
See also
Graph::SetScale and Graph::AddY2 +

Example

+// Left Y scale linear and right Y-scale logarithmic
$graph = new Graph(300,200);
$graph->SetScale(?textlin?);
$graph->SetY2Scale(?log?);
+

+

+

 

 

+function SetYDeltaDist($aDist) +
+ +Set the delta position (in pixels) between the multiple Y-axis

+ + + + +
ArgumentDefaultDescription
+$aDist + + Distance in pixels
+ +

Description
Set the delta position (in pixels) between the multiple Y-axis 
+

+

 

 

+function SetYScale($aN,$aAxisType,$aYMin,$aYMax) +
+ +Specify scale for additional Y-axis

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aN + + Index of axis
+$aAxisType + + +"lin" +Scale type of axis
+$aYMin + + +1 +Optional min scale value
+$aYMax + + +1 +Optional max scale value
+ +

Description
Specify scale for additional Y-axis 
+ +

Example

+php
include ("../jpgraph.php");
include (
"../jpgraph_line.php");

$datay = array(5,3,7,2);
$datay2 = array(88,10,55,42);
$datay3 = array(255,35,745,244);
$datay4 = array(130,97,68,119);

// Setup the graph
$graph = new Graph(600,250);
$graph->SetMargin(30,200,20,20);
$graph->SetMarginColor('white');
$graph->SetColor('lightgray');

$graph->SetScale("intlin");

$graph->SetYScale(0,"lin");
$graph->SetYScale(1,"lin");
$graph->SetYScale(2,"lin");

$p1 = new LinePlot($datay);
$p1->SetColor('blue');
$graph->Add($p1);

$p2 = new LinePlot($datay2);
$p2->SetColor('darkred');
$graph->AddY(0,$p2);
$graph->ynaxis[0]->SetColor('darkred');

$p3 = new LinePlot($datay3);
$p3->SetColor('red');
$graph->AddY(1,$p3);
$graph->ynaxis[1]->SetColor('red');

$p4 = new LinePlot($datay4);
$p4->SetColor('blue');
$graph->AddY(2,$p4);
$graph->ynaxis[2]->SetColor('blue');

// Output line
$graph->Stroke();


+

+

+

 

 

+function Stroke($aStrokeFileName) +
+ +Stroke graph to browser or file

+ + + + +
ArgumentDefaultDescription
+$aStrokeFileName + + +"" +File name* (or special handle, see below)
+ +

Description
Should be the final method called in the script that generates a graph. This will generate the image and send it back to the browser. +

+If $aStrokeFileName != "" the image will be written to this file and NOT streamed back to the browser +

+If the file name is specified with the define __IMG_HANDLER (Note: Thre are 2 '_' in the beginning) then no image will be streamed to file or browser. Instead the Stroke() method will simply return the image handle used by the GD library. This can come in handy of you like to post manipulate the image or use the raw GD image in other context. Such as in creating dynamic PDF documents. +

+Note: If you want to use the image in a PDF file you can't take the handle directly since this is a GD handle. To use it in PDF you must first create an PDF image by calling pdf_open_memory_image() to get a proper PDF image handle. See example below. + +

+You may also specify the file name as "auto" in which case the filename will be created from the script name but with the extension changed to reflect the choosen image format. + 
+ +

Example

+// Example 1 : (Normal case) Stream back to browser
$graph->Stroke();

// Example 2 : Stream to the file with absolute file path
$graph->Stroke($fileName);

// Example 3
// Get the image handle. NOTE: No image will be 
// streamed to the browser in this case.
$ih = $graph->Stroke(__IMG_HANDLER);

// PDF example
//....
$im = $graph->Stroke(_IMG_HANDLER);
$pdf = pdf_new();
pdf_open_file($pdf, "");

$pimg = pdf_open_memory_image($pdf, $im);
pdf_begin_page($pdf, 595, 842);
pdf_add_outline($pdf, "Page 1");
pdf_place_image($pdf, $pimg, 0, 500, 1); 
pdf_close_image($pdf, $pimg); 
pdf_end_page($pdf);
pdf_close($pdf);
$buf = pdf_get_buffer($pdf);
$len = strlen($buf);
header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=jpimage.pdf");
echo $buf;
pdf_delete($pdf);




+

+

+

 

 

+function StrokeCSIM($aScriptName,$aCSIMName,$aBorder) +
+ +Stroke an image with a CSIM

+ + + + + + + + +
ArgumentDefaultDescription
+$aScriptName + + +'auto' +Name of the image generating script
+$aCSIMName + + +'' +Image map name
+$aBorder + + +0 +Should the image be bordered?
+ +

Description
To generate an CSIM you must use this method at the end of your script instead of the normal Graph::Stroke() method. This method does not send back an image to the browser but rather a HTML page which contains an image map and a "recursive call" back to the image script. See the full JpGraph manual for a detailed explanation on how this works. +

+Please note that it is abolutely imperative that you specify the image generating scripts name as the first argument. +

+Why that? Because it is impossible for JpGraph to find out the name of the script it is executed from in the case where it is included as oart of a "standard" HTML/PHP page. Using the PHP_SELF will only return the master document and not the actual script name. +

+If you use several image map images on the same HTML page you must also specify unique names of each of the image maps as the second argument for this function. +

+To specify targets for the image maps you must call the individual plots Pot::SetCSIMTargets() +

+Tip: You can easily specify the script name by using the construction +basename(__FILE__) as the first argument 
+  

See also
Plot::SetCSIMTargets +

Example

+...
$graph->StrokeCSIM(basename(__FILE__));
+

+

+

 

 

+function StrokeFrameBackground() +
+ +Stroke the frames background and border

+
+ +

Description
Semi Internal routine. Exclusively used together with canvas graphs where object are added directly to the canvas and we therefore must make sure that the background is stroked first. + 
+ +

Example

+e +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/GraphTabTitle.html b/html/includes/jpgraph/docs/ref/GraphTabTitle.html new file mode 100644 index 0000000000..191eb3a036 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/GraphTabTitle.html @@ -0,0 +1,202 @@ +


CLASS GraphTabTitle EXTENDS Text
+(Defined in: jpgraph.php : 3027)
 GraphTabTitle  Text 
 Set() 
SetColor() 
SetCorner() 
SetFillColor() 
SetPos() 
SetTabAlign() 
SetWidth() 
+
 Align() 
Center() 
GetFontHeight() 
GetTextHeight() 
GetWidth() 
Hide() 
ParagraphAlign() 
Pos() 
+Set() 
SetAlign() 
SetAngle() 
SetBox() 
+SetColor() 
SetCSIMTarget() 
SetFont() 
SetMargin() 
SetOrientation() 
SetParagraphAlign() 
+SetPos() 
SetScalePos() 
SetShadow() 
SetWordWrap() 
Show() 
Text() 
+
 

Class usage and Overview
Represents the tab that can be placed on top of the graph

  +


Class Methods

+

 

 

+function Set($t) +
+ +Specify text string for tabbed title

+ + + + +
ArgumentDefaultDescription
+$t + + Text
+ +

Description
Specify text string for tabbed title 
+ +

Example

+$graph->tabtitle->Set('First Quarter'); +
+

+

 

 

+function SetColor($aTxtColor,$aFillColor,$aBorderColor) +
+ +Specify color for tab

+ + + + + + + + +
ArgumentDefaultDescription
+$aTxtColor + + Text color
+$aFillColor + + +'lightyellow' +Background fill color
+$aBorderColor + + +'black' +Border color
+ +

Description
Specify all the possible colors for the tab 
+ +

Example

+$graph->tabtitle->SetColor('navy','lightyellow','navy'); +
+

+

 

 

+function SetCorner($aD) +
+ +Specify size (in pixels) of the cut in the upper left and right corner

+ + + + +
ArgumentDefaultDescription
+$aD + + Cut in pixels
+ +

Description
Specify size (in pixels) of the cut in the upper left and right corner 
+ +

Example

+$graph->tabtitle->SetCorner(8); +
+

+

 

 

+function SetFillColor($aFillColor) +
+ +Specify background color for tab title

+ + + + +
ArgumentDefaultDescription
+$aFillColor + + Fill color
+ +

Description
Specify background color for tab title 
+ +

Example

+$graph->tabtitle->SetFillColor('darkgreen'); +
+

+

 

 

+function SetPos($aAlign) +
+ +Specify position for tab title

+ + + + +
ArgumentDefaultDescription
+$aAlign + + 'left', 'center' or 'right' alignment
+ +

Description
Specify position for tab title, left, rigth or center. 
+ +

Example

+$graph->tabtitle->SetPos('center'); +
+

+

 

 

+function SetTabAlign($aAlign) +
+ +Specify position of the tab

+ + + + +
ArgumentDefaultDescription
+$aAlign + + Left right or center position
+ +

Description
Teh tab can be positioned at the left edge on top of the plot area, center or at the right. 
+ +

Example

+$graph->tabtitle->SetTabAlign('right'); +
+

+

 

 

+function SetWidth($aWidth) +
+ +Specify width for tab title

+ + + + +
ArgumentDefaultDescription
+$aWidth + + Width of tab (see below)
+ +

Description
The width of the tab title can be specified in either absolute pixels or as the two special values 'TABTITLE_WIDTHFIT' and 'TABTITLE_WIDTHFULL'. +

+The TABTITLE_WIDTHFIT will make the tab just wide enough to hold the text in the tab and the TABTITLE_WIDTHFULL will extend the tab across the entire plot area. +

+By default the tab will be formatted as it had been specified as TABTITLE_WIDTHFIT + + + 
+ +

Example

+// Specify the tab title width in absolute pixels
$graph->tabtitle->SetWidth(120);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Grid.html b/html/includes/jpgraph/docs/ref/Grid.html new file mode 100644 index 0000000000..ab62312dcd --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Grid.html @@ -0,0 +1,153 @@ +


CLASS Grid
+(Defined in: jpgraph.php : 3331)
 Grid 
 SetColor() 
SetFill() 
SetLineStyle() 
SetWeight() 
Show() 
+
 

Class usage and Overview
This class is used to hold all properties of the gridline for a specific axis. The grid setting is accessed through the xgrid and ygrid properties of graph. + +By default JpGraph has grid lines for Y-lines turned on and gridlines for X-axis turned off. + +

  +


Class Methods

+

 

 

+function SetColor($aMajColor,$aMinColor) +
+ +Set color of grid lines

+ + + + + + +
ArgumentDefaultDescription
+$aMajColor + + Major color
+$aMinColor + + +false +Minor color
+ +

Description
Set color of grid lines 
+ +

Example

+$graph->xgrid->SetColor('lightblue'); +
+

+

 

 

+function SetFill($aFlg,$aColor1,$aColor2) +
+ +Specify fill style for grid

+ + + + + + + + +
ArgumentDefaultDescription
+$aFlg + + +true +Flag, True=enable fill
+$aColor1 + + +'lightgray' +Fill color 1
+$aColor2 + + +'lightblue' +Fill color 2
+ +

Description
The area between the gridline can be filled with two alternating colors. This method specifies this style. See 'filledgridex1.php' for an example of this. By using this feature with alpha-blending you can achieve very nice layouts. + 
+ +

Example

+// Use 50% blending
$graph->ygrid->SetFill(true,'#EFEFEF@0.5','#BBCCFF@0.5');
$graph->ygrid->Show();
$graph->xgrid->Show();
+

+

+

 

 

+function SetLineStyle($aType) +
+ +Specify if grid line should be dashed, dotted or solid

+ + + + +
ArgumentDefaultDescription
+$aType + + String to specify line type
+ +

Description
Specify if grid should be dashed, dotted or solid. The type is specified with a string which can be either "solid", "dashed" or "dotted". + 
+  
See also
Image::SetLineStyle +

Example

+$graph->ygrid->SetLineStyle('dashed'); +
+

+

 

 

+function SetWeight($aWeight) +
+ +Set line weight for grid line

+ + + + +
ArgumentDefaultDescription
+$aWeight + + Line width in pixels
+ +

Description
Set line weight for grid line 
+ +

Example

+$graph->xgrid->SetWeight(2); +
+

+

 

 

+function Show($aShowMajor,$aShowMinor) +
+ +Specify if both major and minor grid should be displayed

+ + + + + + +
ArgumentDefaultDescription
+$aShowMajor + + +true +True=Show major grid lines
+$aShowMinor + + +false +True=Show minor grid lines
+ +

Description
Specify if both major and minor grid should be displayed 
+ +

Example

+$graph->ygrid->Show();
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/GroupBarPlot.html b/html/includes/jpgraph/docs/ref/GroupBarPlot.html new file mode 100644 index 0000000000..d61d4d3cf9 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/GroupBarPlot.html @@ -0,0 +1,45 @@ +


CLASS GroupBarPlot EXTENDS BarPlot
+(Defined in: jpgraph_bar.php : 552)
 GroupBarPlot  BarPlot  
 GroupBarPlot() 
+
 
 

Class usage and Overview
A group bar plot has several bars side by side for each X-label. The group bar is constructed from any number of ordinary bar graphs. + +For example: + +$b1 = new BarPlot(...); +$b2 = new BarPlot(...); + +$gb = new GroupBarPlot(array($b1,$b2)); +... +$graph->Add($gb); +... + + +Each individual bar can be either a BarPlor or an AccBarPlot. +

  +


Class Methods

+

 

 

+function GroupBarPlot($plots) +
+ +Create a new Group bar plot

+ + + + +
ArgumentDefaultDescription
+$plots + + Array of individual plots
+ +

Description
Create a new Group bar plot from a number of BarPlot or AccBarPlot plots. 
+  
See also
AccBarPlot::AccBarPlot and BarPlot::BarPlot +

Example

+$b1 = new BarPlot(...);
$b2 = new BarPlot(...);

$gb = new GroupBarPlot(array($b1,$b2));
...
$graph->Add($gb);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/HeaderProperty.html b/html/includes/jpgraph/docs/ref/HeaderProperty.html new file mode 100644 index 0000000000..4baa34ff70 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/HeaderProperty.html @@ -0,0 +1,343 @@ +


CLASS HeaderProperty
+(Defined in: jpgraph_gantt.php : 1730)
 HeaderProperty 
 SetBackgroundColor() 
SetFont() 
SetFontColor() 
SetFormatString() 
SetFrameColor() 
SetFrameWeight() 
SetIntervall() 
SetLabelFormatString() 
SetStyle() 
SetSundayFontColor() 
SetTitleVertMargin() 
SetWeekendColor() 
+
 

Class usage and Overview
Data encapsulating class to hold properties for each type of the scale headers of the Gantt chart. + +It is instantiated in (and accessible through) + + +$ganttgraph->scale->min +$ganttgraph->scale->hour +$ganttgraph->scale->day +$ganttgraph->scale->week +$ganttgraph->scale->month +$ganttgraph->scale->year + + +You use the methods on these object to specify how you want the scale to be displayed. For example specifying if the week view will show start date or week number.

  +


Class Methods

+

 

 

+function SetBackgroundColor($aColor) +
+ +Specify background color in scale

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specify background color in scale 
+ +

Example

+$ganttgraph->scale->week->SetBackgroundColor('lightblue'); +
+

+

 

 

+function SetFont($aFFamily,$aFStyle,$aFSize) +
+ +Specify font for scale

+ + + + + + + + +
ArgumentDefaultDescription
+$aFFamily + + Font family
+$aFStyle + + +FS_NORMAL +Font style
+$aFSize + + +10 +Font size
+ +

Description
Specify font for scale 
+ +

Example

+$ganttgraph->scale->week->SetFont(FF_FONT0); +
+

+

 

 

+function SetFontColor($aColor) +
+ +Specify font (text) color

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specify font (text) color 
+ +

Example

+$ganttgraph->scale->week->SetFontColor('darkred'); +
+

+

 

 

+function SetFormatString($aStr) +
+ +Specify format string for scales

+ + + + +
ArgumentDefaultDescription
+$aStr + + Format string
+ +

Description
Specify printf() style format string for scales 
+

+

 

 

+function SetFrameColor($aColor) +
+ +Set color of frame around scale

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Set color of frame around scale 
+ +

Example

+$ganttgraph->scale->year->SetFrameCOlor('darkblue');
+

+

+

 

 

+function SetFrameWeight($aWeight) +
+ +Specify width of frame around scale

+ + + + +
ArgumentDefaultDescription
+$aWeight + + Width in pixels
+ +

Description
Specify width of frame around scale 
+ +

Example

+$ganttgraph->scale->year->SetFrameWeight(2); +
+

+

 

 

+function SetIntervall($aInt) +
+ +Set scale interval

+ + + + +
ArgumentDefaultDescription
+$aInt + + Integer intervall
+ +

Description
Set scale interval. The exact behaviour depends on if this is evoked on a day, hour or minute scale. +

+For example if the scale is an hour scale then SetIntervall() will give number of hours between each scale interball. 
+ +

Example

+// Setup minute format
$graph->scale->minute->SetIntervall(30);
$graph->scale->minute->SetBackgroundColor('lightyellow:1.5');
$graph->scale->minute->SetFont(FF_FONT0);
$graph->scale->minute->SetStyle(MINUTESTYLE_MM);
$graph->scale->minute->grid->SetColor('lightgray');
+

+

+

 

 

+function SetLabelFormatString($aStr) +
+ +Specify format string for use in scale

+ + + + +
ArgumentDefaultDescription
+$aStr + + printf() style format string
+ +

Description
Specify format string for use in scale. 
+ +

Example

+$ganttgraph->scale->week->SetLabelFormatString('week %d'); +
+

+

 

 

+function SetStyle($aStyle) +
+ +Specify style of scale.

+ + + + +
ArgumentDefaultDescription
+$aStyle + + Scale style
+ +

Description
Specifies how the week, month, day, hour and minute scale should appear. For year scale this method has no meaning. + +For week scale: + + +For month scale: + + +For Day style + + +For hour style + + +Minute style + + + 
+ +

Example

+$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +
+

+

 

 

+function SetSundayFontColor($aColor) +
+ +Only used by day scale. Specify font color for sunday.

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Only used by day scale. Specify font color for sunday. The default is toi display Sundays in red color as per convention. 
+  
See also
GanttScale::UseWeekendBackground +

Example

+$ganttgraph->SetSundayFontColor('red'); +
+

+

 

 

+function SetTitleVertMargin($aMargin) +
+ +Specify margin above and below text in scale

+ + + + +
ArgumentDefaultDescription
+$aMargin + + Margin in pixels
+ +

Description
Specify margin above and below text in scale 
+ +

Example

+$ganttgraph->scale->year->SetTitleVertMargin(7);
+

+

+

 

 

+function SetWeekendColor($aColor) +
+ +Only valid if if used by day scale

+ + + + +
ArgumentDefaultDescription
+$aColor + + Background color for the weekend
+ +

Description
Specify the background color for weekends. +

+Tip: If you want the weekend background color to continue down the gantt chart theh use the GanttScale::UseWeekendBackground() method. +  
+  

See also
HeaderProperty::SetSundayFontColor and GanttScale::UseWeekendBackground +

Example

+$ganttgraph->scale->day->SetWeekendColor('lightgray');
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/HorizontalGridLine.html b/html/includes/jpgraph/docs/ref/HorizontalGridLine.html new file mode 100644 index 0000000000..75155160c5 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/HorizontalGridLine.html @@ -0,0 +1,80 @@ +


CLASS HorizontalGridLine
+(Defined in: jpgraph_gantt.php : 3061)
 HorizontalGridLine 
 SetRowFillColor() 
SetStart() 
Show() 
+
 

Class usage and Overview
Handles the alternating row colors in the Gantt chart

  +


Class Methods

+

 

 

+function SetRowFillColor($aColor1,$aColor2) +
+ +Specify alternating row fill color

+ + + + + + +
ArgumentDefaultDescription
+$aColor1 + + Color 1
+$aColor2 + + +'' +Color 2
+ +

Description
Specify alternating row fill color for the Gantt chart. + +See gantthgridex1.php for a full example. 
+ +

Example

+...
$graph->hgrid->Show();
$graph->hgrid->SetRowFillColor('darkblue@0.9');
+

+

+

 

 

+function SetStart($aStart) +
+ +Specify start row for alternating colors

+ + + + +
ArgumentDefaultDescription
+$aStart + + Start row
+ +

Description
Specify start row for alternating colors. By default it will start from row 0 (first row) 
+

+

 

 

+function Show($aShow) +
+ +Enable alternating row colors

+ + + + +
ArgumentDefaultDescription
+$aShow + + +true +TRUE/FALSE
+ +

Description
Enable alternating row colors 
+ +

Example

+$graph->hgrid->Show(); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/IconImage.html b/html/includes/jpgraph/docs/ref/IconImage.html new file mode 100644 index 0000000000..d0f4b3c4d1 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/IconImage.html @@ -0,0 +1,117 @@ +


CLASS IconImage
+(Defined in: jpgraph_gantt.php : 1434)
 IconImage 
 IconImage() 
SetAlign() 
+
 

Class usage and Overview
Icon object to be used in a title for a Gantt plot object, e.g. bar or milestones. +

+The icons are then used exactly as you would use text strings when specifying a title for the gantt object. For example: + +$icon = new IconImage(GICON_WARNING,0.7); +$titles = array($icon,'65 days','3 Aug','5 sep'); +$bar = new GanttBar(0,$titles,$startdat,$enddate); +... + +

+Hint: When using icons togehter with titles the height of each bar is not affected (by design!) of the icons height. If you are using icons in several rows it might therefore be usefull to increase the vertical margin factor between each row. This is done by a call to the method GanttGarph::SetVMarginFactor()

  +


Class Methods

+

 

 

+function IconImage($aIcon,$aScale) +
+ +Create a new icon for use in Gantt title columns

+ + + + + + +
ArgumentDefaultDescription
+$aIcon + + Icon specification. Either an image file or one of the builtin icons
+$aScale + + +1 +Scale of icon
+ +

Description
Create a new icon object to be used in a title for a Gantt plot object, e.g. bar or milestones. +

+An icon can either be created from an arbitrary image file (type is determined by the file extension) or it can also be one of the builtin icons. The builtin icons are: +

+

+A graphic illustration of the differenmt icons can be found in the manual. +

+The second argument specifies an optional scaling factor for the image/builtin icon. +

+The icons are then used exactly as you would use text strings when specifying a title for the gantt object. For example: + +$icon = new IconImage(GICON_WARNING,0.7); +$titles = array($icon,'65 days','3 Aug','5 sep'); +$bar = new GanttBar(0,$titles,$startdat,$enddate); +... + +

+Hint: When using icons togehter with titles the height of each bar is not affected (by design!) of the icons height. If you are using icons in several rows it might therefore be usefull to increase the vertical margin factor between each row. This is done by a call to the method GanttGarph::SetVMarginFactor() 
+  

See also
GanttGraph::SetVMarginFactor +

Example

+// Creating an icon from an image file and scaling it to 70%
// of original size
$icon = new IconImage("smiley.png",0.7);

// Using on of the bultin icons
$icon = new IconImage(GICON_TEXT,0.8);
+

+

+

 

 

+function SetAlign($aX,$aY) +
+ +Specify anchor point for icon

+ + + + + + +
ArgumentDefaultDescription
+$aX + + +'left' +Horizontal anchor point
+$aY + + +'center' +Vertical anchor point
+ +

Description
Specify where the anchor point for the icon should be. valid anchor points (for both hor and ver - directions) are: + +The anchor points determines what position on the icon shoudl be aligned with the specifed x,y position for the icon. + + 
+ +

Example

+$icon = new IconImage("../smiley.png",0.7);
$icon->SetAlign('center','center');
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/IconPlot.html b/html/includes/jpgraph/docs/ref/IconPlot.html new file mode 100644 index 0000000000..0e597aea84 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/IconPlot.html @@ -0,0 +1,227 @@ +


CLASS IconPlot
+(Defined in: jpgraph.php : 7792)
 IconPlot 
 IconPlot() 
SetAnchor() 
SetCountryFlag() 
SetMix() 
SetPos() 
SetScale() 
+
 

Class usage and Overview
Make it possible to add one or several images on top of the background in the graph. This is constructed in the same way as normal plots are created and the images are added as normal with the GRaph::Add() method. + +It is possoble to specify arbitrary positions as well as mix (blend) and scaling. + +Example: + +$icon = new IconPlot('myicon.png',0.5,0.5); +.. +$graph->Add($icon);

  +


Class Methods

+

 

 

+function IconPlot($aFile,$aX,$aY,$aScale,$aMix) +
+ +Create a new icon image to be added to the graph

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aFile + + +"" +File name of image
+$aX + + +0 +X-position
+$aY + + +0 +Y-position
+$aScale + + +1.0 +Scale
+$aMix + + +100 +Mixin value
+ +

Description
Create a new icon image to be added to the graph. The position can be specified as either absolute coordinates or as fractions of the width and height repsectively. + +Scale can be an arbitrary floating point number indicating the scaling of the image. + +The mix values specifies (in percent 1-100) how much of the image should be mixed in on top of the background. + 
+ +

Example

+$icon = new IconPlot('myfile.png',0.5,0.5,1,50);
+

+

+

 

 

+function SetAnchor($aXAnchor,$aYAnchor) +
+ +Specify anchor point for image

+ + + + + + +
ArgumentDefaultDescription
+$aXAnchor + + +'left' +Horizontal anchor
+$aYAnchor + + +'center' +Verticla anchor
+ +

Description
Specify anchor point for image. + +Horizontal anchor can be "left','center','right' and vertical anchor can be 'top','center','bottom' + +By default the anchor is the top left corner ('left','top') 
+ +

Example

+$icon->SetAnchor('center','center'); +
+

+

 

 

+function SetCountryFlag($aFlag,$aX,$aY,$aScale,$aMix,$aStdSize) +
+ +Use one of the country flags as icons

+ + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$aFlag + + Partial or full country name
+$aX + + X-position
+$aY + + Y-position
+$aScale + + Scaleing of image
+$aMix + + Blend factor (0-100)
+$aStdSize + + Which of the flag standard sizes should be used as the original image (1-4)
+ +

Description
Use one of the country flags as icons + 
+ +

Example

+$icon = new IconPlot();
$icon->SetCountryFlag('norway',0.1,0.1);
+

+

+

 

 

+function SetMix($aMix) +
+ +Specify mix value in percent (0-100) for image-

+ + + + +
ArgumentDefaultDescription
+$aMix + + Mix value (0-100)
+ +

Description
Specify mix value in percent (0-100) for image. The mix value can also be specified directly in the constructor IconPlot(). + 
+ +

Example

+$icon->SetMix(50); +
+

+

 

 

+function SetPos($aX,$aY) +
+ +Specify position for image

+ + + + + + +
ArgumentDefaultDescription
+$aX + + X-position
+$aY + + Y-position
+ +

Description
Specify position for image. Position can be specified as either absolute coordinates or as fractions of the width and height. + +The anchor point in the image can be adjusted with a call to SetAnchor(). By default the anchor point is the top left corner. + 
+  
See also
IconPlot::SetAnchor +

Example

+$icon->SetPos(0.5,0.5); +
+

+

 

 

+function SetScale($aScale) +
+ +Set scaling for image

+ + + + +
ArgumentDefaultDescription
+$aScale + + Scale value.
+ +

Description
Set scaling for image. This allows you to adjust the size of the image. 
+ +

Example

+$icon->SetScale(0.8); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Image.html b/html/includes/jpgraph/docs/ref/Image.html new file mode 100644 index 0000000000..2f90acb41d --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Image.html @@ -0,0 +1,278 @@ +


CLASS Image
+(Defined in: jpgraph.php : 5929)
 Image 
 RoundedRectangle() 
SetAlphaBlending() 
SetAntiAliasing() 
SetCanvasColor() 
SetExpired() 
SetImgFormat() 
SetMargin() 
SetQuality() 
SetTransparent() 
+
 

Class usage and Overview
The Image class encapsulates the very lowest layer in the jpgraph library. It encapsulates the GD library function and presents a coherent interface hiding som of the details in the setup and management of GD. +

+By replacing Image (and RotImage) it is possible to change the output driver for the whole library withou any further changes. +

+A very close related class is RotImage which builds directly on Image but in additoin provides a 2D rotation featire, i.e the image may be rotated around a given point and possible also translated. +

+The image gets instantiated through in the Graph::Img property, or more accurate the RotImage class gets instantiated. The only method in this class that any end user is likely to need (and use) is the SetMargin() method used to give the margins around between the end of the image and the actual plotarea. +

+Note that all coordinates in methods belonging to Image is given in direct screen coordinates. + + + +

  +

See also related classes:
RotImage, RGB and TTF

 


Class Methods

+

 

 

+function RoundedRectangle($xt,$yt,$xr,$yl,$r) +
+ +Draw a rectangle with rounded corners

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$xt + + Top left X
+$yt + + Top left Y
+$xr + + Bottom right X
+$yl + + Bottom right Y
+$r + + +5 +Corner radius
+ +

Description
Draw a rectangle with rounded corners. 
+ +

Example

+$img->RoundedRectangle(0,0,100,100,10); +
+

+

 

 

+function SetAlphaBlending($aFlg) +
+ +Enable alpha blending of colors

+ + + + +
ArgumentDefaultDescription
+$aFlg + + +true +True/false = Enable/Disable alpha blending
+ +

Description
Alpha blending for colors can only be used with GD 2.x and above. You specify the alpha channel by adding a '@[alpha-value]' to your normal color specification. The alpha value is specified as a fraction in the range [0, 1] and indicated how much of the background color should be visible. +

+Alphablending is enabled by default (when GD2 is used) but can be turned off by a call to this function with the argument false. 
+ +

Example

+$graph->img->SetAlphaBlending();
...
$lineplot->SetFillColor('orange@0.5');
+

+

+

 

 

+function SetAntiAliasing() +
+ +Specify if anti-aliasing should be used

+
+ +

Description
Specify if anti-aliasing should be used. + +Enabling anti-aliasing will greatly improve the visual apperance of certain graphs. For example spider graphs greatly benefit from this. + +Note: Using anti-aliasing makes line drawing roughly 8 time slower than normal lines !! So you image will take longer to construct. + 
+  
See also
Image::Line +

Example

+$graph->img->SetAntiAliasing();
+

+

+

 

 

+function SetCanvasColor($aColor) +
+ +Set canvas color

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Set canvas color. The canvas color is the fill color for the frame when it is first created. This is white by defult. If you specify a frame or plot area color this background color will never be visible. +

+The one time it matters is when you use a drop shadow on the graph. In the small area (top right and bottom left) where there is an empty are which is covered by neither the shadow nor the graph margin this area will have the canvas color. + 
+  

See also
Graph::SetMarginColor and Graph::SetColor +

Example

+$graph->SetCanvasColor('lightblue'); +
+

+

 

 

+function SetExpired($aFlg) +
+ +Turn on/off expired header

+ + + + +
ArgumentDefaultDescription
+$aFlg + + +true +True=Return expired header.
+ +

Description
Specify that the header returned should not only contain the image format but also the meta tags to force the browser not to cache and reload the image every time the script is called. +

+By default this is turned on. +

+Note: There is no reason as far as we can tell to turn this off. + 
+ +

Example

+$graph->img->SetExpired(false); +
+

+

 

 

+function SetImgFormat($aFormat,$aQuality) +
+ +Specify what image format to use

+ + + + + + +
ArgumentDefaultDescription
+$aFormat + + Image format
+$aQuality + + +75 +No description available
+ +

Description
Specify image format. Note depending on your installation of PHP not all formats may be supported. + +Supported formats are: +
+  
See also
Image::SetQuality +

Example

+$graph->img->SetImgFormat('jpeg'); +
+

+

 

 

+function SetMargin($lm,$rm,$tm,$bm) +
+ +Specify margin for the plot area

+ + + + + + + + + + +
ArgumentDefaultDescription
+$lm + + Left margin
+$rm + + Right margin
+$tm + + Top margin
+$bm + + Bottom margin
+ +

Description
Specify margin for the plot area. + 
+ +

Example

+$graph->img->SetMargin(20,20,40,20);
+

+

+

 

 

+function SetQuality($q) +
+ +Specify JPEG image quality

+ + + + +
ArgumentDefaultDescription
+$q + + Image quality paramer (0-100)
+ +

Description
Specify JPEG image quality. For this to have any effect the image format, as specified with SetImgFormat(), must have been set to "jpeg". + +The quality is specified as an integer in the range 0 (worst quality) to 100 (best quality) . By default the quality is set o 75. 
+  
See also
Image::SetImgFormat +

Example

+$graph->image->SetQuality(40); +
+

+

 

 

+function SetTransparent($color) +
+ +Specify transparent color

+ + + + +
ArgumentDefaultDescription
+$color + + Color
+ +

Description
Specify transparent color for image. 
+ +

Example

+$graph->img->SetTransparent("white");
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Legend.html b/html/includes/jpgraph/docs/ref/Legend.html new file mode 100644 index 0000000000..4f8b8a5c13 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Legend.html @@ -0,0 +1,519 @@ +


CLASS Legend
+(Defined in: jpgraph.php : 5147)
 Legend 
 Hide() 
Pos() 
SetAbsPos() 
SetColor() 
SetColumns() 
SetFillColor() 
SetFont() 
SetFrameWeight() 
SetHColMargin() 
SetLayout() 
SetLeftMargin() 
SetLineSpacing() 
SetLineWeight() 
SetMarkAbsHSize() 
SetMarkAbsSize() 
SetMarkAbsVSize() 
SetPos() 
SetReverse() 
SetShadow() 
SetVColMargin() 
+
 

Class usage and Overview
This class is responsible for drawing a legend at the specified position in the graph. Individual data series are added by calling it's Add() method. +

+This is all handled by the framework. Legend is instantiated in the graph as instance variable legend. When stroking individual plots this instance variable is used by the individual Legend() methods in the plot classes to add whatever the individual plots need to add. +

  +


Class Methods

+

 

 

+function Hide($aHide) +
+ +Hide legend box

+ + + + +
ArgumentDefaultDescription
+$aHide + + +true +True = hide
+ +

Description
Hides the legend. 
+ +

Example

+$graph->legend->Hide(); +
+

+

 

 

+function Pos($aX,$aY,$aHAlign,$aVAlign) +
+ +Specify the position for the legend box

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aX + + X coordinate
+$aY + + Y coordinate
+$aHAlign + + +"right" +Horizontal alignment
+$aVAlign + + +"top" +Vertical alignment
+ +

Description
Set the position of the legend box on the Graph. The alignment arguments determine how the position of the legend box should be interpretated, i.e from what position on the Graph should the fraction be counted. ('right' uses the right side and positoins the legend with its left side according to the specified fraction and so on). Possible alignemts are: +

+Horizontal: 'left','right','center'
+Vertical: 'bottom','top','center' +

+Please note that the X and Y positions should be give as fractions , i.e Pos(0.1,0.1) +

+If the alignment is not given the the default is 'right','top' 
+ +

Example

+$graph->legend->Pos(0.05,0.1); +
+

+

 

 

+function SetAbsPos($aX,$aY,$aHAlign,$aVAlign) +
+ +Specify X and Y coordinate for the legend box

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aX + + x Coordinate
+$aY + + y Coordinate
+$aHAlign + + +"right" +Horizontal anchor point
+$aVAlign + + +"top" +Vertical Anchor point
+ +

Description
Specify X and Y coordinate for the legend box 
+ +

Example

+// 10x10 pixels from the upper right corner
$graph->legend->SetAbsPos(10,10,'right','top')
+

+

+

 

 

+function SetColor($aFontColor,$aColor) +
+ +Set color on frame around box

+ + + + + + +
ArgumentDefaultDescription
+$aFontColor + + Font coor
+$aColor + + +'black' +Frame color
+ +

Description
Specify the color for both the frame around the legend box as well as the font color used for the legend texts. Please note that this does not affect the fill color of the legend box. 
+  
See also
Legend::SetFillColor +

Example

+$graph->legend->SetColor('blue'); +
+

+

 

 

+function SetColumns($aCols) +
+ +Specify the number of text columns to use

+ + + + +
ArgumentDefaultDescription
+$aCols + + Number of columns
+ +

Description
Specify the number of text columns to use in the legend text box. For graphs which have a large number of plots it might be necessary to specify 2 or more columns to avois that the legend box become to large. +

+By default i column us used. 
+ +

Example

+$graph->legend->SetColumns(2); +
+

+

 

 

+function SetFillColor($aColor) +
+ +Specify fill color for legend box

+ + + + +
ArgumentDefaultDescription
+$aColor + + Fill color
+ +

Description
Specify the background color for the legend box. The properties for the legend is noramlly accessed through the graph instance variable '$legend' 
+  
See also
Legend::SetColor +

Example

+$graph->legend->SetFillColor('lightblue'); +
+

+

 

 

+function SetFont($aFamily,$aStyle,$aSize) +
+ +Set font for texts in legend box.

+ + + + + + + + +
ArgumentDefaultDescription
+$aFamily + + Font family
+$aStyle + + +FS_NORMAL +Font style
+$aSize + + +10 +Font size
+ +

Description
Set font for texts in legend box. 
+ +

Example

+$graph->legend->SetFont(FF_FONT2,FS_NORMAL); +
+

+

 

 

+function SetFrameWeight($aWeight) +
+ +Specify the width of the frame around the Legend box

+ + + + +
ArgumentDefaultDescription
+$aWeight + + Width in pixels
+ +

Description
Specify the width of the frame around the Legend box 
+ +

Example

+$graph->legend->SetFrameWeight(2); +
+

+

 

 

+function SetHColMargin($aXMarg) +
+ +Specify margin between columns in te legend

+ + + + +
ArgumentDefaultDescription
+$aXMarg + + No description available
+ +

Description
Specify margin between columns in te legend 
+

+

 

 

+function SetLayout($aDirection) +
+ +Specify vertical or horizontal legend layout

+ + + + +
ArgumentDefaultDescription
+$aDirection + + +LEGEND_VERT +Layout for legend box
+ +

Description
The legend box can either have the legend stacke vertically or horizontally. The default is vertically stacked legends. +

+Allowed arguments: LEGEND_VERT,LEGEND_HOR +

+Please note that horizontal layout is only suitable for a few legends since it makes use of quite a lot of horizontal space. 
+ +

Example

+// Put a horizontal legend box at the bottom of the graph
$graph->legend->Pos(0.5,0.0.5,'left','bottom');
$graph->legend->SetLayout(LEGEND_HOR);
+

+

+

 

 

+function SetLeftMargin($aXMarg) +
+ +Specify marging between the left edge and the first column

+ + + + +
ArgumentDefaultDescription
+$aXMarg + + No description available
+ +

Description
Specify marging between the left edge and the first column 
+

+

 

 

+function SetLineSpacing($aSpacing) +
+ +Extra vertical spacing (in pixels) between rows

+ + + + +
ArgumentDefaultDescription
+$aSpacing + + Extra margin (in pixels)
+ +

Description
Extra vertical spacing (in pixels) between rows 
+ +

Example

+// Add 5 pixels extra margin between each legend row
$graph->legend->SetLineSpacing(5);
+

+

+

 

 

+function SetLineWeight($aWeight) +
+ +Set the line width for the indicators.

+ + + + +
ArgumentDefaultDescription
+$aWeight + + Line weight in pixels
+ +

Description
Specify the line width for the color boxes that are used as indicators. 
+ +

Example

+$graph->legend->SetLineWeight(2); +
+

+

 

 

+function SetMarkAbsHSize($aSize) +
+ +

+ + + + +
ArgumentDefaultDescription
+$aSize + + No description available
+ +

Description
No description available.

+

 

 

+function SetMarkAbsSize($aSize) +
+ +Specify the size of the marker in pixels

+ + + + +
ArgumentDefaultDescription
+$aSize + + Size in pixels
+ +

Description
Specify the size of the marker in pixels to be used in the legend. This is used for the plot marks, for example squares or circles, when you want to control what the size used in the legend should be. +

+It is often desirable to use a smaller size for the marks in the legend than in the graph itself. 
+ +

Example

+$graph->legend->SetMarkAbsSize(6); +
+

+

 

 

+function SetMarkAbsVSize($aSize) +
+ +

+ + + + +
ArgumentDefaultDescription
+$aSize + + No description available
+ +

Description
No description available.

+

 

 

+function SetPos($aX,$aY,$aHAlign,$aVAlign) +
+ +Alias for Pos. Specify Position for Legend

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aX + + X position
+$aY + + Y position
+$aHAlign + + +"right" +Horizontal anchor point
+$aVAlign + + +"top" +Vertical anchor point
+ +

Description
See Legend::Pos() 
+  
See also
Legend::Pos +

Example

+$graph->legend->SetPos(0.05,0.5,'right','center'); +
+

+

 

 

+function SetReverse($f) +
+ +Print the legend in reverse order

+ + + + +
ArgumentDefaultDescription
+$f + + +true +TRUE=In reverse order
+ +

Description
Print the legend in reverse order 
+ +

Example

+$graph->legend->SetReverse(); +
+

+

 

 

+function SetShadow($aShow,$aWidth) +
+ +Add a drop shadow to the legend box

+ + + + + + +
ArgumentDefaultDescription
+$aShow + + +'gray' +True = show drop shadow
+$aWidth + + +2 +Width of drop shadow in pixels
+ +

Description
Add a drop down shadow for the legend box. 
+ +

Example

+// Use a shadow width default width
$graph->legend->SetShadow();
+

+

+

 

 

+function SetVColMargin($aSpacing) +
+ +Specify the margin between rows in the legend

+ + + + +
ArgumentDefaultDescription
+$aSpacing + + No description available
+ +

Description
Specify the margin between rows in the legend 
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/LineErrorPlot.html b/html/includes/jpgraph/docs/ref/LineErrorPlot.html new file mode 100644 index 0000000000..77121ac26b --- /dev/null +++ b/html/includes/jpgraph/docs/ref/LineErrorPlot.html @@ -0,0 +1,40 @@ +


CLASS LineErrorPlot EXTENDS ErrorPlot
+(Defined in: jpgraph_error.php : 119)
 LineErrorPlot  ErrorPlot  
 LineErrorPlot() 
+
 
 

Class usage and Overview
A line error plot is in principle a line plot but with the added feature that each point also have a two error values. Low and high error. + +This means that data array must be an even number of three values.

  +

See also related classes:
LinePlot

 


Class Methods

+

 

 

+function LineErrorPlot(&$datay,$datax) +
+ +Constructor for a line plot with error bars

+ + + + + + +
ArgumentDefaultDescription
+&$datay + + Y-Data
+$datax + + +false +X-Data [optional]
+ +

Description
Same as a line plot but each data point has three values, the value, and error min, and error max. The error bars are then drawn as vertical lines at each data point. 
+ +

Example

+$leplot = new LineErrorPlot($ydata); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/LinePlot.html b/html/includes/jpgraph/docs/ref/LinePlot.html new file mode 100644 index 0000000000..a539740372 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/LinePlot.html @@ -0,0 +1,326 @@ +


CLASS LinePlot EXTENDS Plot
+(Defined in: jpgraph_line.php : 24)
 LinePlot  Plot 
 AddArea() 
LinePlot() 
SetBarCenter() 
SetColor() 
SetFastStroke() 
SetFillColor() 
SetFillFromYMin() 
SetFillGradient() 
SetStepStyle() 
SetStyle() 
+
 HideLegend() 
SetCenter() 
+SetColor() 
SetCSIMTargets() 
SetLegend() 
SetLineWeight() 
+
 

Class usage and Overview
This class is used to creat line graph plots. Line graph plots are used to draw standard lineplots where datapoints are connected by lines. Each data point can also be marked by a plotmark. +

+A line plot can only be added to a Graph() image. + +Public properties: + + + + PlotMark + + DisplayValue + + +
Name Type Description
mark Mark at each data point
value Determine if and hhow each data value should be displayed in the plot

  +

See also related classes:
AccLinePlot

 


Class Methods

+

 

 

+function AddArea($aMin,$aMax,$aFilled,$aColor,$aBorder) +
+ +Create a colored area under part of the lien graph.

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aMin + + +0 +Start X-value
+$aMax + + +0 +End X-value
+$aFilled + + +LP_AREA_NOT_FILLED +Fill area or not (true/false)
+$aColor + + +"gray9" +Color of fill
+$aBorder + + +LP_AREA_BORDER +Use a border (true/false)
+ +

Description
Create a vertical colored area under the line between two X-values and to the top of the line. +

+Predefined values for $aFilled are:
+LP_AREA_FILLED
+LP_AREA_NOT_FILLED

+ +

Example

+$lineplot->AddArea(2,5,LP_AREA_FILLED,"indianred1"); +
+

+

 

 

+function LinePlot(&$datay,$datax) +
+ +Public Constructor for LinePlot +

+ + + + + + +
ArgumentDefaultDescription
+&$datay + + Y-data
+$datax + + +false +X-data
+ +

Description
Create a new LinePlot which later can be added to the graph with the Graph::Add() or Graph::AddY2() method. +

+A plot can be specified with either only Y-values or both Y-and X-values. If both X and Y values are specified they should have the same number of elements. 
+  

See also
Graph::Add and Graph::AddY2 +

Example

+
$lineplot = new LinePlot($ydata);
+

+

+

 

 

+function SetBarCenter($aFlag) +
+ +Adjust the positioning of line plots when combined with a bar plot

+ + + + +
ArgumentDefaultDescription
+$aFlag + + +true +TRUE = Align line points to center of bars
+ +

Description
By default the lineplots gets aligned to the left side of the bars when using a text X-scale. By calling this method the line points instead gets aligned to the center of the bars. +

+This method is only to be used in the case where line and bar plots are combined. Any other use is undefined. 
+ +

Example

+$ydata = array(12,15,22,19,5);
$graph = new Graph(400,200);
$graph->SetScale("textlin");
$line = new LinePlot($ydata);
$line->SetBarCenter();
$bar = new BarPlot($ydata);
$graph->Add($bar);
$graph->Add($line);
+

+

+

 

 

+function SetColor($aColor) +
+ +Set color for the line plot.

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specify color for line. 
+ +

Example

+$lp = new LinePlot($ydata);

// Set full blue
$lp->SetColor('#0000FF');
+

+

+

 

 

+function SetFastStroke($aFlg) +
+ +Use Fast version of Stroke()

+ + + + +
ArgumentDefaultDescription
+$aFlg + + +true +TRUE=Use fast stroke
+ +

Description
Use Fast version of Stroke(). This is useful for line plots which have many thousand points. This method is a lot faster than the usual Stroke() but also have a lot less functionality and puts restriction on the complexity of the line. The lines can have no plotmarks, must be solid and have a line width of 1 
+ +

Example

+$lineplot->SetFastStroke() +
+

+

 

 

+function SetFillColor($aColor,$aFilled) +
+ +Specify fill color

+ + + + + + +
ArgumentDefaultDescription
+$aColor + + Color
+$aFilled + + +true +Flag. Filled or not
+ +

Description
Specify that a lineplot should be filled as well as the fill color. 
+  
See also
LinePlot::SetColor +

Example

+$lp->SetFillColor('green');
+

+

+

 

 

+function SetFillFromYMin($f) +
+ +Fill line not from 0 but from the minimum Y value

+ + + + +
ArgumentDefaultDescription
+$f + + +true +TRUE=fill from minimum
+ +

Description
Fill line not from 0 (as default) but from the minimum Y value. This is mostly usefull when a plot have the negative value and the X-axis is placed at the minimum Y-alue (at the bottom) 
+ +

Example

+$lineplot->SetFillFromYMin();
+

+

+

 

 

+function SetFillGradient($aFromColor,$aToColor,$aNumColors,$aFilled) +
+ +Specify a gradient fill for the line plot

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aFromColor + + Start color
+$aToColor + + End color
+$aNumColors + + +100 +Number of colors to use in transition
+$aFilled + + +true +TRUE=Enable gradient fill
+ +

Description
Specify a gradient fill for the line plot. Currently only vertical gradient fill is supported, i.e. the transiiton from color 1 to color 2 is vertical. + 
+ +

Example

+$p1 = new LinePlot($datay);
$p1->SetFillGradient('white','darkgreen');
+

+

+

 

 

+function SetStepStyle($aFlag) +
+ +Use step style for line graph.

+ + + + +
ArgumentDefaultDescription
+$aFlag + + +true +Flag. true to use step style.
+ +

Description
If the step style is enabled then each point will be connected not with a straight line between the points but with one horizontal and one vertical line. This makes the graph look like a stair where the next data point indicates if the stair is going up or down. + 
+ +

Example

+$lp->SetStepStyle();
+

+

+

 

 

+function SetStyle($aStyle) +
+ +Specify line style.

+ + + + +
ArgumentDefaultDescription
+$aStyle + + Text string to specify line
+ +

Description
Linestyle for lines. Valid linestyles are:
+'solid', 'dotted', 'dashed' +

+The default line style is 'solid' + 
+  

See also
Image::SetLineStyle +

Example

+$lp->SetStyle('dotted');
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/LineProperty.html b/html/includes/jpgraph/docs/ref/LineProperty.html new file mode 100644 index 0000000000..a145e128cf --- /dev/null +++ b/html/includes/jpgraph/docs/ref/LineProperty.html @@ -0,0 +1,99 @@ +


CLASS LineProperty
+(Defined in: jpgraph.php : 2735)
 LineProperty 
 SetColor() 
SetStyle() 
SetWeight() 
Show() 
+
 

Class usage and Overview
Property class to define properties for a line. Currently used only by Gantt chart to specify the grid line properties.

  +


Class Methods

+

 

 

+function SetColor($aColor) +
+ +Set line color

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Set line color 
+ +

Example

+$gantgraph->grid->SetColor('darkgrey'); +
+

+

 

 

+function SetStyle($aStyle) +
+ +Set line style

+ + + + +
ArgumentDefaultDescription
+$aStyle + + Line style
+ +

Description
Linestyle for lines. Valid linestyles are:
+'solid', 'dotted', 'dashed' +

+The default line style is 'solid' 
+  

See also
Image::SetLineStyle +

Example

+$gantgraph->grid->SetColor('darkgrey'); +
+

+

 

 

+function SetWeight($aWeight) +
+ +Specify weight of the line

+ + + + +
ArgumentDefaultDescription
+$aWeight + + Line width in pixels
+ +

Description
Set line width 
+ +

Example

+$gantgraph->grid->SetWeight(2); +
+

+

 

 

+function Show($aShow) +
+ +Determine if the line should be hidden or not

+ + + + +
ArgumentDefaultDescription
+$aShow + + +true +True=Display line
+ +

Description
Show line, default is to hide the line. 
+ +

Example

+$gantgraph->grid->Show(false); // Hide the grid +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/LinearScale.html b/html/includes/jpgraph/docs/ref/LinearScale.html new file mode 100644 index 0000000000..c3d7a8e661 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/LinearScale.html @@ -0,0 +1,126 @@ +


CLASS LinearScale
+(Defined in: jpgraph.php : 4429)
 LinearScale 
 SetAutoMax() 
SetAutoMin() 
SetAutoTicks() 
SetGrace() 
+
 

Class usage and Overview
This class is the main scale class and implements the linear and integer scale for the axis.

  +

See also related classes:
Axis and LogScale

 


Class Methods

+

 

 

+function SetAutoMax($aMax) +
+ +Fix the maximum value for a scale

+ + + + +
ArgumentDefaultDescription
+$aMax + + Maximum value
+ +

Description
Fix a maximum value for a scale eventhough autoscaling is used for the min value. 
+ +

Example

+// For a negative scale we might want to make sure it
// always start at the top from 0
$graph->y2scale->SetAutoMax(0);
+

+

+

 

 

+function SetAutoMin($aMin) +
+ +Set the minimum data value when the autoscaling is used.

+ + + + +
ArgumentDefaultDescription
+$aMin + + Min value
+ +

Description
Set the minimum data value when the autoscaling is used. Usefull if you want a fix minimum (like 0) but automtic maximum value. 
+ +

Example

+// Just let the maximum be autoscaled
$graph->yaxis->scale->SetAutoMin(0);
+

+

+

 

 

+function SetAutoTicks($aFlag) +
+ +Determine ticks automtically with manual scale

+ + + + +
ArgumentDefaultDescription
+$aFlag + + +true +TRUE = determine ticks automatically
+ +

Description
This is used in conjunction when a manual scale is specified. In normall cases one has also to specify major and minor tick steps. +

+For example:
+ +$graph->SetScale("textlin",0,70);
+$graph->yscale->ticks->Set(10,2); +

+However by instead using +

+$graph->SetScale("textlin",0,70);
+$graph->yscale->SetAutoTicks(); +

+The major and minor ticks are determined automatically. +

+The thing you have to be aware of is that the specified min and max values might be slightly modified so that the end/beginning of the scale will fall on a major tick step. +

+By default the auto ticks are off. + + + 
+  

See also
Graph::SetScale +

Example

+// Manually set Y-scale min=30, max=90
$graph->SetScale('textlin',30,90);

// Let JpGraph figure out suitable tick marks
$graph->yscale->SetAutoTicks();

+

+

+

 

 

+function SetGrace($aGraceTop,$aGraceBottom) +
+ +// Specify scale "grace" value (top and bottom)

+ + + + + + +
ArgumentDefaultDescription
+$aGraceTop + + Top grace value
+$aGraceBottom + + +0 +Bottom grace value
+ +

Description
By default the autoscaling determines the minimum and maximum as close to the plots min and max values as possible. Sometimes this might not be suitable and you need some more "air". For example if you plot a bar plot with values on top of the bar. If the bar reaces the max value (which is also the scale end point) the value on top of the bar might be out in the margin.) +

+By specifyin the grace you get added space. The value specified is interpretated as extra percentage of the total scale range. +

+For example if the scale range (without grace) is (0,100) and you add 10% top grace (with SetGrace(10)) the modified scale will be (0,110) and if you use a 100% top grace the scale will be (0,200) and so on. 
+ +

Example

+$graph->xaxis->scale->SetGrace(50); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/LinearTicks.html b/html/includes/jpgraph/docs/ref/LinearTicks.html new file mode 100644 index 0000000000..ad40322f83 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/LinearTicks.html @@ -0,0 +1,168 @@ +


CLASS LinearTicks EXTENDS Ticks
+(Defined in: jpgraph.php : 4075)
 LinearTicks  Ticks  
 AdjustForDST() 
GetMajor() 
GetMinor() 
Set() 
SetMajTickPositions() 
SetTextLabelStart() 
SetTickPositions() 
+
 
 

Class usage and Overview
Internal class that handles the drawing and formatting of the tick marks on each axis. This class is accessed through it'sinstance variable in the scale, e.g. +

+$graph->xaxis->scale->ticks->Set(20,10); +

+Note: When you manually specify a scale you must also specify the major/minor tick intervall.

  +

See also related classes:
LinearScale and LogScale

 


Class Methods

+

 

 

+function AdjustForDST($aFlg) +
+ +// For a normal linear type of scale the major ticks will always be multiples// of the minor ticks. In order to avoid any rounding issues the major ticks are// defined as every "step" minor ticks and not calculated separately

+ + + + +
ArgumentDefaultDescription
+$aFlg + + +true +No description available
+ +

Description
No description available.

+

 

 

+function GetMajor() +
+ +Return major step size in world coordinates

+
+ +

Description
Return major step size in world coordinates 
+ +

Example

+$majintervall = $graph->xaxis->scale->ticks->Getmajor(); +
+

+

 

 

+function GetMinor() +
+ +// Return minor step size in world coordinates

+
+ +

Description
Return minor step size in world coordinates. 
+ +

Example

+$majintervall = $graph->xaxis->scale->ticks->Getmajor(); +
+

+

 

 

+function Set($aMajStep,$aMinStep) +
+ +// Set Minor and Major ticks (in world coordinates)

+ + + + + + +
ArgumentDefaultDescription
+$aMajStep + + Distance between major tick marks
+$aMinStep + + +false +Distance between minor tick marks
+ +

Description
Set Minor and Major tick intervall (in world coordinates) 
+ +

Example

+$graph->yaxis->scale->ticks->Set(40,20); +
+

+

 

 

+function SetMajTickPositions($aMajPos,$aLabels) +
+ +//(" Minor or major step size is 0. Check that you haven't got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem."

+ + + + + + +
ArgumentDefaultDescription
+$aMajPos + + No description available
+$aLabels + + +NULL +No description available
+ +

Description
No description available.

+

 

 

+function SetTextLabelStart($aTextLabelOff) +
+ +Which tick label should we start with?

+ + + + +
ArgumentDefaultDescription
+$aTextLabelOff + + The number thaht the automatic textscale should start with.
+ +

Description
Normally text labels start at 0. However, automtic text labels can be started with an arbitrary number as specified with the argument to this method. + 
+ +

Example

+$graph->xaxis->scale->ticks->SetTextLabelStart(10);
+

+

+

 

 

+function SetTickPositions($aMajPos,$aMinPos,$aLabels) +
+ +Manually specify tick positions for the axis

+ + + + + + + + +
ArgumentDefaultDescription
+$aMajPos + + Array of major positions
+$aMinPos + + +NULL +Array of minor positions
+$aLabels + + +NULL +Array of major label strings
+ +

Description
Manually specify major and minor tick positions for the axis together with the optional label strings. If no label array is specified then the numerical values at the positions of the major tick marks will be used as label strings. 
+ +

Example

+$graph->xaxis->SetMajTickPositions($tickPositions,$tickLabels); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/LogScale.html b/html/includes/jpgraph/docs/ref/LogScale.html new file mode 100644 index 0000000000..49c623c964 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/LogScale.html @@ -0,0 +1,38 @@ +


CLASS LogScale EXTENDS LinearScale
+(Defined in: jpgraph_log.php : 20)
 LogScale  LinearScale  
 GetMaxVal() 
GetMinVal() 
+
 
 

Class usage and Overview
Implements a logarithmic scale. Normally accessed through the axis 'scale' property, for example $graph->xaxis->sclal

  +

See also related classes:
LinearScale and Axis

 


Class Methods

+

 

 

+function GetMaxVal() +
+ +Get max value for scale.

+
+ +

Description
Get max scale value for scale. 
+  
See also
LogScale::GetMinVal +

Example

+$max = $graph->yaxis->scale->GetMaxVal(); +
+

+

 

 

+function GetMinVal() +
+ +Get minimum scale value.

+
+ +

Description
Get minimum scale value. 
+  
See also
LogScale::GetMaxVal +

Example

+$max = $graph->yaxis->scale->GetMinVal(); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/LogTicks.html b/html/includes/jpgraph/docs/ref/LogTicks.html new file mode 100644 index 0000000000..fae5bf676f --- /dev/null +++ b/html/includes/jpgraph/docs/ref/LogTicks.html @@ -0,0 +1,52 @@ +


CLASS LogTicks EXTENDS Ticks
+(Defined in: jpgraph_log.php : 121)
 LogTicks  Ticks 
 SetLabelLogType() 
+
 Set() 
SetColor() 
SetFormatCallback() 
SetLabelFormat() 
SetSide() 
SetSize() 
SetWeight() 
SupressFirst() 
SupressLast() 
SupressMinorTickMarks() 
SupressTickMarks() 
SupressZeroLabel() 
+
 

Class usage and Overview
This class represents ticks on a logarithmic scale axis. It is responsible for drawing and positioning ticks.

  +

See also related classes:
LogScale and Axis

 


Class Methods

+

 

 

+function SetLabelLogType($aType) +
+ +Should the log labels be dispalyed with magnitudes ot plain numbers

+ + + + +
ArgumentDefaultDescription
+$aType + + Magnitude (10^x) or plain
+ +

Description
Specify how labels for log scales should be formatted as magnitude (scientific) or plain. +

+$aType can be either +

+ +By default log scale uses magnitude type of labels. + 
+ +

Example

+$graph->yaxis->scale->ticks->SetLabelLogType(LOGLABELS_PLAIN); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/MileStone.html b/html/includes/jpgraph/docs/ref/MileStone.html new file mode 100644 index 0000000000..a5427057b2 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/MileStone.html @@ -0,0 +1,49 @@ +


CLASS MileStone EXTENDS GanttPlotObject
+(Defined in: jpgraph_gantt.php : 3376)
 MileStone  GanttPlotObject  
 MileStone() 
+
 
 

Class usage and Overview
Represents a milestone in the GanttChart. A milstone is created by specifyin a date.

  +

See also related classes:
GanttGraph

 


Class Methods

+

 

 

+function MileStone($aVPos,$aLabel,$aDate,$aCaption) +
+ +Create a new milestone in a GanttGraph

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aVPos + + Row for milestone
+$aLabel + + Label
+$aDate + + Position on the date scale
+$aCaption + + +"" +Caption string
+ +

Description
A milestone is by default displayed as a "Diamond" mark at a specified row at a specified date. It can also have a caption to the right of the milestone mark. + 
+  
See also
GanttPlotObject::GanttPlotObject +

Example

+$graph = new GanttGraph();

// Setup the gantt graph...
...

$ms = new MileStone(7,"M5","2002-01-28","28/1");
$graph->Add($ms);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/PieGraph.html b/html/includes/jpgraph/docs/ref/PieGraph.html new file mode 100644 index 0000000000..8cf546bf3a --- /dev/null +++ b/html/includes/jpgraph/docs/ref/PieGraph.html @@ -0,0 +1,159 @@ +


CLASS PieGraph EXTENDS Graph
+(Defined in: jpgraph_pie.php : 1117)
 PieGraph  Graph  
 Add() 
PieGraph() 
SetAntiAliasing() 
SetColor() 
Stroke() 
+
 
 

Class usage and Overview
The canvas for use with PiePlots. You add pie plots by calling the Add() method. +

+You can add several PiePlots by adjusting their size and positioning each PiePlot so it doesn't overlap eachother. +

  +

See also related classes:
PiePlot and PiePlot3D

 


Class Methods

+

 

 

+function Add($aObj) +
+ +Add object to the pie graph

+ + + + +
ArgumentDefaultDescription
+$aObj + + Object to add
+ +

Description
Add a pieplots or text object to the pie graph. You can specify either a single object or an array. If you specify an array all object in the array must be of the same type.  
+ +

Example

+$piegraph = new PieGraph(300,400);
$pieplot = new PiePlot($ydata);
$piegraph->Add($pieplot);
+

+

+

 

 

+function PieGraph($width,$height,$cachedName,$timeout,$inline) +
+ +//---------------// CONSTRUCTOR +

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$width + + +300 +Width of graph
+$height + + +200 +Height of graph
+$cachedName + + +"" +Cache file name
+$timeout + + +0 +Cache timeout in s
+$inline + + +1 +Should the image be inline.
+ +

Description
See Graph::Graph() 
+  
See also
Graph::Graph +

Example

+$piegraph = new PieGraph(300,400);
+

+

+

 

 

+function SetAntiAliasing($aFlg) +
+ +Enable/disable anti-alias for Pie Graphs

+ + + + +
ArgumentDefaultDescription
+$aFlg + + +true +true=enable anti-aliasing
+ +

Description
Enable/disable anti-alias for Pie Graphs. This makes for much nicer looking PieGraphs. Please note that enabling anti-alias imposes some restrictions: +
+ +

Example

+$piegraph->SetAntiAlias(); +
+

+

 

 

+function SetColor($c) +
+ +Set the background color. Synonym to SetMarginColor()

+ + + + +
ArgumentDefaultDescription
+$c + + Color
+ +

Description
Set the background color. Synonym to SetMarginColor() 
+  
See also
Graph::Graph +

Example

+$piegraph->SetColor('gray');
+

+

+

 

 

+function Stroke($aStrokeFileName) +
+ +// Method description

+ + + + +
ArgumentDefaultDescription
+$aStrokeFileName + + +"" +Filename
+ +

Description
Stroke the piegraph to the browser or to a specified file if specified. Works exactly the same as Graph::Stroke() + 
+ +

Example

+...
$piegraph->Stroke()
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/PiePlot.html b/html/includes/jpgraph/docs/ref/PiePlot.html new file mode 100644 index 0000000000..b2e81eecfb --- /dev/null +++ b/html/includes/jpgraph/docs/ref/PiePlot.html @@ -0,0 +1,618 @@ +


CLASS PiePlot
+(Defined in: jpgraph_pie.php : 24)
 PiePlot 
 Explode() 
ExplodeAll() 
ExplodeSlice() 
PiePlot() 
SetCenter() 
SetColor() 
SetCSIMTargets() 
SetFont() 
SetFontColor() 
SetGuideLines() 
SetGuideLinesAdjust() 
SetLabelPos() 
SetLabels() 
SetLabelType() 
SetLegends() 
SetShadow() 
SetSize() 
SetSliceColors() 
SetStartAngle() 
SetTheme() 
SetValueType() 
ShowBorder() 
+
 

Class usage and Overview
Creates a new Pie plot from the supplied data.

+By default the value (if enabled through the $pie->label->show() ) close to each slice will have a label corresponding to the percentage of that slice. +

+Each plot may have an arbitrary title which can be accessed through the ?title? property in the PiePlot class. The title will be automatically centred on top of the PiePlot clear of any possible labels. To set the title use the Set() method , i.e. $plot->title->Set(?MyTitle?). +

+To format the slice labels use the SetFormat() method of the value class.

  +

See also related classes:
PieGraph and PiePlot3D

 


Class Methods

+

 

 

+function Explode($aExplodeArr) +
+ +Explode one or more slices as specified radius.

+ + + + +
ArgumentDefaultDescription
+$aExplodeArr + + Explode specification
+ +

Description
To emphasise a specific slice it can be exploded, i.e moved out fro the center of the pie plot. This method will allow you to specify what slices and to waht radius you want them exploded. +

+If you only want to explode a single slice you could also use the ExplodeSlice() method. + 
+  

See also
PiePlot::ExplodeSlice +

Example

+//To explode slice 0,2 to radius 100 you would call
$pieplot->Explode(array(100,0,100));
+

+

+

 

 

+function ExplodeAll($radius) +
+ +Explode all slices a specified amount

+ + + + +
ArgumentDefaultDescription
+$radius + + +20 +Explode radius
+ +

Description
Explode all slices a specified amount. If no radius is specified it will default to 20 pixels. 
+  
See also
PiePlot::ExplodeSlice and PiePlot::Explode +

Example

+$p1->ExplodeAll();
+

+

+

 

 

+function ExplodeSlice($e,$radius) +
+ +Explode a single slice a specified radius

+ + + + + + +
ArgumentDefaultDescription
+$e + + Which slice to explode
+$radius + + +20 +Radius to explode to
+ +

Description
Explode a single slice to a specific radius. 
+  
See also
PiePlot::Explode and PiePlot::ExplodeAll +

Example

+// Explode slice number 2 (the third slice) using the default
// explode radius.
$pieplot->ExplodeSlice(2);
+

+

+

 

 

+function PiePlot($data) +
+ +Constructor for PiePlots

+ + + + +
ArgumentDefaultDescription
+$data + + Data array for Pie
+ +

Description
Construct a new pie plot which later can be added to Piegraph 
+  
See also
PieGraph::Add +

Example

+$pieplot = new PiePlot($slicedata);
$piegraph->Add($pieplot);
+

+

+

 

 

+function SetCenter($x,$y) +
+ +//---------------// PUBLIC METHODS +

+ + + + + + +
ArgumentDefaultDescription
+$x + + X-position as fraction of width
+$y + + +0.5 +Y-position as fraction of height
+ +

Description
Set the center point for the PiePlot 
+  
See also
PiePlot::SetSize +

Example

+$pieplot->SetCenter(0.4,0.5);
+

+

+

 

 

+function SetColor($aColor) +
+ +Specify frame color for pie.

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color.
+ +

Description
Set the color of the border around each slice. 
+  
See also
PiePlot::SetSliceColors +

Example

+$pieplot->SetColor('red'); +
+

+

 

 

+function SetCSIMTargets($targets,$alts) +
+ +Specify URL targets for image maps

+ + + + + + +
ArgumentDefaultDescription
+$targets + + Array of URL targets
+$alts + + +null +Alt strings
+ +

Description
Specify list of targets for the image map for each slice. The target should be a fully qualified URL. +

+Each slice will aslo have it's own 'alt' tag. Depending on the browser this tag is usually showed when the mouse is hold over a poarticular area on the image map. When formatting the alt strings can be specified as a printf() format string. The value supplied to the string will be the value for each slice. 
+  

See also
PiePlot::GetCSIMareas +

Example

+$targets = array('godetail1.html', 'gotodetail2.html' 'gotodetail3.html');
$alts = array('Year %d', 'Year %d', 'Year %d');

$pieplot->SetCSIMTargets($targets,$alts);
+

+

+

 

 

+function SetFont($family,$style,$size) +
+ +Deprecated. Use $pieplot->value->SetFont() instead.

+ + + + + + + + +
ArgumentDefaultDescription
+$family + + Font family
+$style + + +FS_NORMAL +Font style
+$size + + +10 +Font size
+ +

Description
Deprecated. Use $pieplot->value->SetFont() instead. 
+ +

Example

+//Deprecated. Use $pieplot->value->SetFont() instead. +
+

+

 

 

+function SetFontColor($aColor) +
+ +Deprecated. Use $pieplot->value->SetFontColor() instead.

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Deprecated. Use $pieplot->value->SetFontColor() instead. 
+ +

Example

+//Deprecated. Use $pieplot->value->SetFontColor() instead. +
+

+

 

 

+function SetGuideLines($aFlg,$aCurved,$aAlways) +
+ +Enable guideline and set drawing policy

+ + + + + + + + +
ArgumentDefaultDescription
+$aFlg + + +true +TRUE=Enable guide lines
+$aCurved + + +true +Curve the labels around the pie
+$aAlways + + +false +Always use a guide line to the label
+ +

Description
Enable guideline and set drawing policy for guide lines and labels 
+ +

Example

+$pieplot->SetGuideLines(); +
+

+

 

 

+function SetGuideLinesAdjust($aVFactor,$aRFactor) +
+ +Adjuste the distance between labels and labels and pie

+ + + + + + +
ArgumentDefaultDescription
+$aVFactor + + Vertical fraction
+$aRFactor + + +0.8 +Radius factor
+ +

Description
Adjuste the distance between labels and labels and pie 
+ +

Example

+$graph->xaxis->scale->SetGuideLinesAdjust(1.7); +
+

+

 

 

+function SetLabelPos($aLblPosAdj) +
+ +Adjust the positoin of slice labels

+ + + + +
ArgumentDefaultDescription
+$aLblPosAdj + + Position as fraction of radius
+ +

Description
Specify the position of the labels for each slice as a fraction of the radius. +

+Note: The adjustment affect both manually speicfied labels with SetLabels() as well as automtic labels. + 
+  

See also
PiePlot::SetLabels +

Example

+$p1 = new PiePlot($data);
$p1->SetLabelPos(0.6);
$graph->Add($p1);
+

+

+

 

 

+function SetLabels($aLabels,$aLblPosAdj) +
+ +Specify individual text labels for all slices

+ + + + + + +
ArgumentDefaultDescription
+$aLabels + + Arrays of strings
+$aLblPosAdj + + +"auto" +Position as fraction of the radius
+ +

Description
Normally pie slice gets assigned a label which displays either the percentage or the absolute value of a slice. These automtically asigned labels are positioned in a ring around the pie. +
+However, you can also manually assign a label to each slice individually with this method. +
+Each label can contain format specification so for example the label +

+"May %.1f%%" +

+would display the in the pie "May 28.3%" assuming you had choosen to use percentage values (SetLabelType()) +

+The second parameter specifies where to position these labels. The position is specified as a fraction of the radius of the pie plot or as the special strine 'auto'. If you specify this string value JpGraph will automtically determine the best position for the labels inside the pie. This is the default if you don't explicitely specify the position. +

+If you specify a value > 1.0 then the labels will +just be move further out. For example if you specify the position as 1.5 then the labels will move out a further 50% of the current pie radius. +

+Note: The actual alignment of the labels are dependent on the position. If the labels are just outside the pie they will be individually positioned according to the angle. If the labels are positioned inside the pie then the point of gravity within the text will be aligned with the specified position in the pie. + + 
+  

See also
PiePlot::SetLabelType +

Example

+$p1->SetLabelType(PIE_VALUE_PER);
$lbl = array("adam\n%.1f%%","bertil\n%.1f%%","kalle\n%.1f%%","peter\n%.1f%%","daniel\n%.1f%%","erik\n%.1f%%");
$p1->SetLabels($lbl);
+

+

+

 

 

+function SetLabelType($t) +
+ +Should we display actual value or percentage?

+ + + + +
ArgumentDefaultDescription
+$t + + Set absolute or percentage value constant
+ +

Description
Specify if the value displayed by each slice (if the $pieplot->value->Show()) have been called shold be absolute or in percent. +

+The following values are allowed arguments: +

+The defauklt is to show percent. 
+ +

Example

+// Show absolute values
$pieplot->SetLabelType(PIE_VALUE_ABS);

// Display each label with postfix 'kr', e.g. each label will
// look like (for example) 23.5 kr
$pieplot->value->SetFormat('%d kr');
$pieplot->value->Show();
+

+

+

 

 

+function SetLegends($aLegend) +
+ +// Set label arrays

+ + + + +
ArgumentDefaultDescription
+$aLegend + + Array of strings
+ +

Description
Specify an array of text strings that should be used as legends for the slices. +

+Each text string can be formatted as a printf() format string since when printed they will be passed the value for that slice. +

+Tip: If you have many evry small slices then the labels close to the pie may be overwriting each other. In this case it is probably better to hide the labels by the slices and instead just show the values ion the legends. 
+ +

Example

+$legends = array('April (%d)','May (%d)','June (%d)');

$pieplot->SetLegends($legends);

+

+

+

 

 

+function SetShadow($aColor,$aDropWidth) +
+ +Add a drop shadow to the pie slices

+ + + + + + +
ArgumentDefaultDescription
+$aColor + + +'darkgray' +Shadow color
+$aDropWidth + + +4 +Drop distance for shadow
+ +

Description
Add a drop shadow to the pie slices. +

+This is often more affective if one or more slices are exploded. 
+ +

Example

+// Explode all slices
$p1->ExplodeAll(10);

// Add drop shadow
$p1->SetShadow();
+

+

+

 

 

+function SetSize($aSize) +
+ +// Size in percentage

+ + + + +
ArgumentDefaultDescription
+$aSize + + Size of radius
+ +

Description
If the value specified is between 0 and 1 then it is interpreted as a a fraction of either height or width, whatever is smallest, of the graph. +

+If the value is >1 then it is interpretated as an absolute size in pixels. + 
+  

See also
PiePlot::SetCenter +

Example

+$pieplot->SetSize(0.3); +
+

+

 

 

+function SetSliceColors($aColors) +
+ +Override theme coplros for slices

+ + + + +
ArgumentDefaultDescription
+$aColors + + Array of colors
+ +

Description
Normally the colors of the slices are set according to what color-theme you are using. You can however, override this by supplying an array of colors to be used for the slices. +

+If you supply fewer colors than pie-slices than the colors will be re-used from the beginning of the array. + 
+  

See also
PiePlot::SetTheme +

Example

+$p1->SetSliceColors(array('red','green','blue')); +
+

+

 

 

+function SetStartAngle($aStart) +
+ +Speciy start angel for first slice

+ + + + +
ArgumentDefaultDescription
+$aStart + + Start angle in degrees
+ +

Description
Normally the first slice is drawn at 0 degrees, i.e. 3'a clock. With this method you can adjust that to an arbitrary angle. Positive angle will rotate the slice clockwise and a negative angle will move the slice counter-clockwise. +

+The angle should be specified in degrees. + 
+ +

Example

+$pieplot->SetStartAngle(45); +
+

+

 

 

+function SetTheme($aTheme) +
+ +//Add the last point on the arc

+ + + + +
ArgumentDefaultDescription
+$aTheme + + Theme name
+ +

Description
Specify what color theme should be used for this pie. As of version 1.6.4 the following themes are available: + 
+ +

Example

+$pieplot->SetTheme('water');
+

+

+

 

 

+function SetValueType($aType) +
+ +DEPRECATED: See SetLabelType()

+ + + + +
ArgumentDefaultDescription
+$aType + + Value type
+ +

Description
See SetLabelType() 
+  
See also
PiePlot::SetLabelType +

Example

+NA +
+

+

 

 

+function ShowBorder($exterior,$interior) +
+ +// Should the circle around a pie plot be displayed

+ + + + + + +
ArgumentDefaultDescription
+$exterior + + +true +Display circle on the outer edge of pieplot
+$interior + + +true +Display the lines between each slice
+ +

Description
Show the lines between each slice and the border around the pie. 
+ +

Example

+// show both
$pieplot->ShowBorder();
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/PiePlot3D.html b/html/includes/jpgraph/docs/ref/PiePlot3D.html new file mode 100644 index 0000000000..4c55d68818 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/PiePlot3D.html @@ -0,0 +1,279 @@ +


CLASS PiePlot3D EXTENDS PiePlot
+(Defined in: jpgraph_pie3d.php : 17)
 PiePlot3D  PiePlot  
 PiePlot3d() 
SetAngle() 
SetCSIMTargets() 
SetEdge() 
SetHeight() 
SetLabelMargin() 
SetLabels() 
SetLegends() 
SetSliceColors() 
SetStartAngle() 
ShowBorder() 
+
 
 

Class usage and Overview
A 3D pie plot is much like a normal pie plot but in a 3D setting. You can control the apperance by specifying the angle of attack for the pie. A small angle show a very "flat" pie while a large angle shows almost a 2D pie. + +Please note that a 3D pie is much more CPU intensive to draw then the normal pie. To reduce the time you might want to keep the height of the pie as small as you think looks good. The height has a direct linear impact on how long it takes to draw a 3D pie. (See SetHeight()). + +To view a 3D pieplot you start by constructing a PieGraph() and then adding a numerb of constructed PiePlot3D to this graph. +

  +

See also related classes:
PieGraph and PiePlot

 


Class Methods

+

 

 

+function PiePlot3d(&$data) +
+ +Construct a new 3D pie plot

+ + + + +
ArgumentDefaultDescription
+&$data + + Data array for slices
+ +

Description
This creates a new pie plot using the data supplied. This plot can then be added to the pie graph. 
+ +

Example

+$pieplot3d = new PiePlot3d($ydata);

$piegraph->Add($pieplot3d);
+

+

+

 

 

+function SetAngle($a) +
+ +Specify projection angle for 3D in degrees.

+ + + + +
ArgumentDefaultDescription
+$a + + Projection angle in degrees
+ +

Description
Specify projection angle for 3D in degrees. Must be between 10 and 80 degrees. A small angle will make the pie very flat and a large angle will make it present much more of pie circle. 
+ +

Example

+$pieplot->SetAngle(45);
+

+

+

 

 

+function SetCSIMTargets($targets,$alts) +
+ +Specify URL for each slice for the image map

+ + + + + + +
ArgumentDefaultDescription
+$targets + + Array of URL targets
+$alts + + +null +Array of Alt texts
+ +

Description
Specify URL for each slice for the image map 
+ +

Example

+$targets = array('nextimage.php?1', 'nextimage.php?2', 'nextimage.php?3');
// Show the actual value in the alt text when user hovers the
// cursor over the slice
$alts = array('More details..(%.1f)', 'More details..(%.1f)', 'More details..(%.1f)' );
$pie->SetCSIMTargets($targets,$alts);
+

+

+

 

 

+function SetEdge($aColor,$aWeight) +
+ +Add a line around pie slices

+ + + + + + +
ArgumentDefaultDescription
+$aColor + + +'black' +Color for line
+$aWeight + + +1 +Width of line
+ +

Description
Specify if the slices should be separated by a line? If color is specified as "" no line will be used to separate pie slices. + +Default is to not show any lines. 
+ +

Example

+$pieplot3d->SetEdge('blue',1); +
+

+

 

 

+function SetHeight($aHeight) +
+ +Specify thickness of the 3D pie plot

+ + + + +
ArgumentDefaultDescription
+$aHeight + + Height in pixels
+ +

Description
Specify thickness of 3D pie plot. To minimize CPU usuage you should try to keep the thickness to the visual accepatble minimum. 
+ +

Example

+$pieplot->SetHeight(20); +
+

+

 

 

+function SetLabelMargin($m) +
+ +Specify the distance from the pie to the labels

+ + + + +
ArgumentDefaultDescription
+$m + + Margin in pixels
+ +

Description
Specify the distance from the pie to the labels 
+ +

Example

+$pieplot3d->SetLabelMargin(20); +
+

+

 

 

+function SetLabels($aLabels,$aLblPosAdj) +
+ +Specify slice labels for 3D pies

+ + + + + + +
ArgumentDefaultDescription
+$aLabels + + Label arrays
+$aLblPosAdj + + +"auto" +Label position [0.2- 1]
+ +

Description
Specify slice labels for 3D pies. Positoin specify the fraction of the radius wher the labels should be positoined. A values of 1 will position the labels outside the pie. +

+The labels may include an optional sprintf() formatting string. Before stroking the label to the graph it will be formatted with the actual value (absolute or percentage) depending on what has been specified with the SetLabelType() method. + 
+  

See also
PiePlot::SetLabelType +

Example

+// Specify explicit labels and position them outside the pie
$p1->SetLabels(array("Jan\n%.1f%%","Feb\n%.1f%%","Mar\n%.1f%%","Apr\n%.1f%%"),1);
+

+

+

 

 

+function SetLegends($aLegend) +
+ +Set legends for slices

+ + + + +
ArgumentDefaultDescription
+$aLegend + + Array of legends
+ +

Description
Set legends for slices 
+ +

Example

+$plot->SetLegends(array('Jan','Feb','Mar','Apr'); +
+

+

 

 

+function SetSliceColors($aColors) +
+ +Specify color of the individual slices

+ + + + +
ArgumentDefaultDescription
+$aColors + + Array of colors
+ +

Description
Specify color of the individual slices. If there are more slices than colors then the colors will wrap around. 
+ +

Example

+$pieplot->SetSliceColors(array('red','blue','green','navy','orange')); +
+

+

 

 

+function SetStartAngle($aStart) +
+ +Specify start angle for first slice in the Pie

+ + + + +
ArgumentDefaultDescription
+$aStart + + Start angle (in degrees)
+ +

Description
Specify the start angle in degrees for the first slice in the Pie. Angles are counted counter-clockwise starting at "3'clock". 
+ +

Example

+$pieplot->SetStartAngle(45); +
+

+

 

 

+function ShowBorder($exterior,$interior) +
+ +Select which borders on the pie should be displayed

+ + + + + + +
ArgumentDefaultDescription
+$exterior + + +true +Display interior borders
+$interior + + +true +Display exterior borders
+ +

Description
Select which borders should be displayed. Note that when anti-aliasing is enabled no borders can be shown. 
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/PiePlotC.html b/html/includes/jpgraph/docs/ref/PiePlotC.html new file mode 100644 index 0000000000..87f1f04611 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/PiePlotC.html @@ -0,0 +1,163 @@ +


CLASS PiePlotC EXTENDS PiePlot
+(Defined in: jpgraph_pie.php : 928)
 PiePlotC  PiePlot  
 PiePlotC() 
SetMid() 
SetMidColor() 
SetMidCSIM() 
SetMidSize() 
SetMidTitle() 
+
 
 

Class usage and Overview
The PiePlotC is an extesnion of the normal pie plot where there is a filled circle in the center of the pie. This filled circle can have it's own labels and CSIM.

  +

See also related classes:
PiePlot

 


Class Methods

+

 

 

+function PiePlotC($data,$aCenterTitle) +
+ +Create a Pie plot with a filled circle in the middle

+ + + + + + +
ArgumentDefaultDescription
+$data + + Data array
+$aCenterTitle + + +'' +Title for center circle
+ +

Description
Create a variant of the Pie plot with a filled circle in the middle. The title, color and size of the center circle ca be modified. 
+  
See also
PiePlotC::SetMidCSIM, PiePlotC::SetMid, PiePlotC::SetMidColor and PiePlotC::SetMidSize +

Example

+$piec = new PiePlotC($data); +
+

+

 

 

+function SetMid($aTitle,$aColor,$aSize) +
+ +Specify all parameters for the center circle

+ + + + + + + + +
ArgumentDefaultDescription
+$aTitle + + Title text for center circle
+$aColor + + +'white' +Fill color for center circle
+$aSize + + +0.5 +Size of center. Specified as fraction of radius
+ +

Description
Specify all parameters for the center circle 
+ +

Example

+$piec->SetMid('Halteberg','red:0.6',0.3); +
+

+

 

 

+function SetMidColor($aColor) +
+ +Specify fill color for center circle

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specify fill color for center circle.  
+  
See also
PiePlotC::SetMid +

Example

+$piec->SetMidColor('yellow:0.6');
+

+

+

 

 

+function SetMidCSIM($aTarget,$aAlt) +
+ +Specify URL target for filled middle circle

+ + + + + + +
ArgumentDefaultDescription
+$aTarget + + Target URL string
+$aAlt + + Alt text
+ +

Description
Specify URL target for filled middle circle. Use SetCSIMtargets() to specify the individual targets for the slices in the pie. + 
+  
See also
PiePlot::SetCSIMTargets +

Example

+$pie->SetMidCSIM('depth.php?t=32','Details');
+

+

+

 

 

+function SetMidSize($aSize) +
+ +Specify size for center circle

+ + + + +
ArgumentDefaultDescription
+$aSize + + Size in fraction of the radius
+ +

Description
Specify size for center circle as fraction of the radius. 
+ +

Example

+$piec->SetMidSize(0.5); +
+

+

 

 

+function SetMidTitle($aTitle) +
+ +Specify title for the center circle.

+ + + + +
ArgumentDefaultDescription
+$aTitle + + Title
+ +

Description
Specify title for the center circle. The title can also be set in the inital creation of the Pie as well as with the SetMidTitle() 
+  
See also
PiePlotC::SetMid and PiePlotC::PiePlotC +

Example

+$piec->SetMidTitle("Center title\nSecond line title"); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Plot.html b/html/includes/jpgraph/docs/ref/Plot.html new file mode 100644 index 0000000000..5d5f2d5a4d --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Plot.html @@ -0,0 +1,173 @@ +


CLASS Plot
+(Defined in: jpgraph.php : 5626)
 Plot 
 HideLegend() 
SetCenter() 
SetColor() 
SetCSIMTargets() 
SetLegend() 
SetLineWeight() 
+
 

Class usage and Overview
Abstract base class for all plots. This abstract base class defines the signature that all plots must adhere to. It also provides the default trivial implementation for these framework methods. + +Public properties: + + + + + +
Name Type Description
value DisplayValue Control the data value displayed at each data point
+

  +

See also related classes:
DisplayValue, LinePlot, ErrorPlot and ScatterPlot

 


Class Methods

+

 

 

+function HideLegend($f) +
+ +Hide legend for this plot

+ + + + +
ArgumentDefaultDescription
+$f + + +true +TRUE=Hide legend
+ +

Description
Hide legend for this plot even if it was specified (with SetLegend() )  
+ +

Example

+$bar = new GanttBar(...);
$bar->HideLegend();
+

+

+

 

 

+function SetCenter($aCenter) +
+ +Center the data pointr between tick labels

+ + + + +
ArgumentDefaultDescription
+$aCenter + + +true +True=Center each data point
+ +

Description
Used for text scales. Centers the data values between the ticvk marks instead if falling exactly on them. + 
+ +

Example

+$barplot->SetCenter(); +
+

+

 

 

+function SetColor($aColor) +
+ +Specify color for plot.

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specify color for plot. Each plot type is free to interpret it to its own choosing. 
+ +

Example

+$lineplot->SetColor('red');
+

+

+

 

 

+function SetCSIMTargets($aTargets,$aAlts) +
+ +Set URL targets for CSIM

+ + + + + + +
ArgumentDefaultDescription
+$aTargets + + Array of URL targets
+$aAlts + + +null +Alt texts for each CSIM point
+ +

Description
Set the URL links for the CSIM if the plot type support this. 
+ +

Example

+$url1 = "http://someotherurl.html"
$url2 = ..
...

$targetarray = array($url1, $url2, $url3, $url4);
$barplot->SetCSIMTargets($targetarray);
+

+

+

 

 

+function SetLegend($aLegend,$aCSIM,$aCSIMAlt) +
+ +Set legend string for this plot

+ + + + + + + + +
ArgumentDefaultDescription
+$aLegend + + Legend string
+$aCSIM + + +"" +URL for image map
+$aCSIMAlt + + +"" +Alt text for image map
+ +

Description
Set legend string for this plot. If the CSIM string is epscified then the legend will become an image map. To use image maps you need to use the StrokeCSIM() instead of the normal Stroke() 
+  
See also
Graph::StrokeCSIM +

Example

+$lineplot->SetLegend('Year 2002'); +
+

+

 

 

+function SetLineWeight($aWeight) +
+ +Specify line weight for plot

+ + + + +
ArgumentDefaultDescription
+$aWeight + + +1 +Line weight in pixels
+ +

Description
Specify line weight for plot 
+ +

Example

+$lineplot->SetWeight(2); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/PlotBand.html b/html/includes/jpgraph/docs/ref/PlotBand.html new file mode 100644 index 0000000000..5e50885eec --- /dev/null +++ b/html/includes/jpgraph/docs/ref/PlotBand.html @@ -0,0 +1,164 @@ +


CLASS PlotBand
+(Defined in: jpgraph_plotband.php : 541)
 PlotBand 
 PlotBand() 
SetDensity() 
SetOrder() 
ShowFrame() 
+
 

Class usage and Overview
A "Plotband" repesent a rectangualr area in the graph that can be given a specific pattern ranging from 3D grid to simple horizntal grid lines. +

+A Plot band is then added to the graph via the Graph::AddBand() method. +

  +

See also related classes:
Graph

 


Class Methods

+

 

 

+function PlotBand($aDir,$aPattern,$aMin,$aMax,$aColor,$aWeight,$aDepth) +
+ +Create a new Plot band of the specified type

+ + + + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$aDir + + Direction of plot band
+$aPattern + + Type of pattern
+$aMin + + Min value for plot area
+$aMax + + Max value for plot area
+$aColor + + +"black" +Color of pattern
+$aWeight + + +1 +Line weight
+$aDepth + + +DEPTH_BACK +Depth. Over or under the plot.
+ +

Description
Create a new Plot band that later on can be added to the graph. The following pattern types are supported + + + +A plotband extends completely along one of the axis in the graph. This axis is determined by the first argument, the direction. + +Valid directions are +
    +
  1. HORIZONTAL +
  2. VERTICAL +

+ +

Example

+$uband=new PlotBand(HORIZONTAL,BAND_RDIAG,0,"max","green");
$uband->ShowFrame(false);
$uband->SetDensity(50); // 50% line density
$lband=new PlotBand(HORIZONTAL,BAND_LDIAG,"min",0,"red");
$lband->ShowFrame(false);
$lband->SetDensity(20); // 20% line density

$graph->AddBand($uband);
$graph->AddBand($lband);
+

+

+

 

 

+function SetDensity($aDens) +
+ +Specify density for pattern

+ + + + +
ArgumentDefaultDescription
+$aDens + + Density [1,100]
+ +

Description
Specify density for pattern as an integer value between 1 and 100, 100 being very dense and 1 being very sparse. + 
+ +

Example

+$uband=new PlotBand(HORIZONTAL,BAND_RDIAG,0,"max","green");
$uband->ShowFrame(false);
$uband->SetDensity(50); // 50% line density
$lband=new PlotBand(HORIZONTAL,BAND_LDIAG,"min",0,"red");
$lband->ShowFrame(false);
$lband->SetDensity(20); // 20% line density

$graph->AddBand($uband);
$graph->AddBand($lband);
+

+

+

 

 

+function SetOrder($aDepth) +
+ +Specify z-order parameter for plot

+ + + + +
ArgumentDefaultDescription
+$aDepth + + Pattern Z-order parameter
+ +

Description
Specify if the pattern should be in front of plot or behind the plot. Valid parameters are + +
+ +

Example

+$band=new PlotBand(HORIZONTAL,BAND_RDIAG,0,"max","green");
$band->ShowFrame(false);
$band->SetOrder(DEPTH_BACK);
$graph->AddBand($band);
+

+

+

 

 

+function ShowFrame($aFlag) +
+ +Display frame around pattern

+ + + + +
ArgumentDefaultDescription
+$aFlag + + +true +True=Display border
+ +

Description
Display frame around pattern 
+ +

Example

+$band=new PlotBand(HORIZONTAL,BAND_RDIAG,0,"max","green");
$band->ShowFrame(false);
$band->SetOrder(DEPTH_BACK);
$graph->AddBand($band);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/PlotLine.html b/html/includes/jpgraph/docs/ref/PlotLine.html new file mode 100644 index 0000000000..4a448751e8 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/PlotLine.html @@ -0,0 +1,199 @@ +


CLASS PlotLine
+(Defined in: jpgraph.php : 5818)
 PlotLine 
 HideLegend() 
PlotLine() 
SetColor() 
SetDirection() 
SetLegend() 
SetPosition() 
SetWeight() 
+
 

Class usage and Overview
A plot line represents a horizontal or vertical line in the plot at an arbitrary position. A plot line can be added to all X-Y types of plots/graphs.

  +

See also related classes:
Graph

 


Class Methods

+

 

 

+function HideLegend($f) +
+ +Hide legend

+ + + + +
ArgumentDefaultDescription
+$f + + True/False
+ +

Description
Hide legend 
+

+

 

 

+function PlotLine($aDir,$aPos,$aColor,$aWeight) +
+ +Construct a new plot line

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aDir + + +HORIZONTAL +Direction, HORIZONTAL or VERTICAL
+$aPos + + +0 +Position
+$aColor + + +"black" +Color
+$aWeight + + +1 +Line weight
+ +

Description
Create a new horizontal or vertical line in the graph at a specific position. + +The graph can the be added to the graph with a call to the AddLine 
+ +

Example

+// Add mark graph with static lines
$line = new PlotLine(HORIZONTAL,0,"black",2);
$graph->AddLine($line);
+

+

+

 

 

+function SetColor($aColor) +
+ +Specify color of line

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Set color for line. + +Note. Colors can also be set in the creation of a PlotLine + 
+  
See also
PlotLine::PlotLine +

Example

+$plotline->SetColor('red');
+

+

+

 

 

+function SetDirection($aDir) +
+ +Specify direction of line

+ + + + +
ArgumentDefaultDescription
+$aDir + + Direction, horizontal or vertical line
+ +

Description
Specify direction of line. Valid arguments are: + + +Note: Direction can also be specified in the creation of a plot line. + 
+  
See also
PlotLine::PlotLine +

Example

+$plotline->SetDirection(VERTICAL);
$plotline->SetColor('red');
$graph->AddLine($plotline);
+

+

+

 

 

+function SetLegend($aLegend,$aCSIM,$aCSIMAlt) +
+ +Set legend text

+ + + + + + + + +
ArgumentDefaultDescription
+$aLegend + + Legend text
+$aCSIM + + CSIM target
+$aCSIMAlt + + CSIM Alt text
+ +

Description
Set legend text 
+

+

 

 

+function SetPosition($aScalePosition) +
+ +Specify position for plot line

+ + + + +
ArgumentDefaultDescription
+$aScalePosition + + Scale position
+ +

Description
Specify position for plot line. If the line is vertical the position is interpretated as the x-coordinate and if it is horizontal then the positoin is interpretatedas the Y-coordinate. + +Note: Position can also be specified in the creation of the line. 
+ +

Example

+$plotline->SetDirection(HORIZONTAL);
$plotline->SetPosition(25);
$graph->AddLine($plotline);
+

+

+

 

 

+function SetWeight($aWeight) +
+ +Specify line weight

+ + + + +
ArgumentDefaultDescription
+$aWeight + + Line weight in pixels
+ +

Description
Specify line weight. + +Note. Line weight can also be specified in the creation of the line. + 
+  
See also
PlotLine::PlotLine +

Example

+$plotline->SetColor('red');
$plotline->SetDirection(VERTICAL);
$plotline->SetPosition(35);
$plotline->SetWeight(2);

+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/PlotMark.html b/html/includes/jpgraph/docs/ref/PlotMark.html new file mode 100644 index 0000000000..607dd4b115 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/PlotMark.html @@ -0,0 +1,506 @@ +


CLASS PlotMark
+(Defined in: jpgraph_plotmark.inc : 73)
 PlotMark 
 Hide() 
SetCallback() 
SetCallbackYX() 
SetColor() 
SetDefaultWidth() 
SetFillColor() 
SetSize() 
SetType() 
SetWeight() 
SetWidth() 
Show() 
+
 

Class usage and Overview
In scatter plots and (possible) line plots each data point have a marker. This class implements these markers and the mtethod to modify it's apperance. +

+There are a number of possible marker, circle, filled circle, square, filled square, star, triangle and so on. +See PlotMark::PlotMark() below for details on how to specify what mark. +

+Marks are accessed thtough the 'mark' property in line and scatter plot, i.e LinePlot::mark and ScatterPlot::mark. Marks in line plot are by default turned off. To enable marks use the construction $lineplot->mark->Show(). +

+You can modify the type of plotmarks by calling the SetType() method. Possible plot marks are: + +

    +
  1. MARK_SQUARE, A filled square +
  2. MARK_UTRIANGLE, A triangle pointed upwards +
  3. MARK_DTRIANGLE, A triangle pointed downwards +
  4. MARK_DIAMOND, A diamond +
  5. MARK_CIRCLE, A circle +
  6. MARK_FILLEDCIRCLE, A filled circle +
  7. MARK_CROSS, A cross +
  8. MARK_STAR, A star +
  9. MARK_X, An 'X' +
  10. MARK_LEFTTRIANGLE, A half triangle, vertical line to left (used as group markers for Gantt charts) +
  11. MARK_RIGHTTRIANGLE, A half triangle, vertical line to right (used as group markers for Gantt charts) +
  12. MARK_FLASH, A Zig-Zag vertical flash +
+

  +

See also related classes:
LinePlot and ScatterPlot

 


Class Methods

+

 

 

+function Hide($aHide) +
+ +Hide plot mark

+ + + + +
ArgumentDefaultDescription
+$aHide + + +true +True=Hide plot mark
+ +

Description
Hide plot mark + 
+  
See also
PlotMark::Show +

Example

+$linerplot->mark->Hide(); +
+

+

 

 

+function SetCallback($aFunc) +
+ +Specify callback function for plotmark

+ + + + +
ArgumentDefaultDescription
+$aFunc + + Function name
+ +

Description
Callback for plotmarks is only really used in one circumstance. Scatter plot. The callback can be used to individually adjust, sixe and color of the plot marks. +

+The specified callback function gets called with the Y-value for the current plotmark. The callback function should return an array consisting of three elements +

    +
  1. Plot size +
  2. Color +
  3. Fill color +

+ +

Example

+function FCallback($aVal) {
// This callback will adjust the fill color and size of
// the datapoint according to the data value according to
    if( $aVal < 30 ) $c = "blue";
    elseif( $aVal < 70 ) $c = "green";
    else $c="red";
    return array(floor($aVal/3),"",$c);
}

...

// Specify the callback
$scatterplot->mark->SetCallback("FCallback");


+

+

+

 

 

+function SetCallbackYX($aFunc) +
+ +Specify callback function

+ + + + +
ArgumentDefaultDescription
+$aFunc + + Callback function
+ +

Description
Callback for plotmarks is only really used in one circumstance. Scatter plot. The callback can be used to individually adjust, sixe and color of the plot marks. +

+The specified callback function gets called with the Y-value for the current plotmark. The callback function should return an array consisting of three elements +

    +
  1. Plot size +
  2. Color +
  3. Fill color +
+The difference from the ordinary SetCallback() is that the callback function specified in SetCallbackYX() gets passed both the Y and X coordinate (note the order!) as arguments. + 
+ +

Example

+function FCallback($aYVal,$aXVal) {
    // Some code to the size and color
    return array( ... );
}

...

// Specify the callback
$scatterplot->mark->SetCallbackYX("FCallback");


+

+

+

 

 

+function SetColor($aColor) +
+ +Specify color for plot mark

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specify the line color for plot mark + 
+  
See also
PlotMark::SetFillColor +

Example

+$lineplot->mark->SetColor('navy');
+

+

+

 

 

+function SetDefaultWidth() +
+ +Restore default size of mark

+
+ +

Description
Restore default size of mark 
+ +

Example

+$lineplot->mark->SetDefaultWidth() +
+

+

 

 

+function SetFillColor($aFillColor) +
+ +Set fill color for mark

+ + + + +
ArgumentDefaultDescription
+$aFillColor + + Color
+ +

Description
Set fill color for mark 
+  
See also
PlotMark::SetColor +

Example

+$lineplot->mark->SetFillColor('blue');
+

+

+

 

 

+function SetSize($aWidth) +
+ +Set size of mark

+ + + + +
ArgumentDefaultDescription
+$aWidth + + WIdth of mark in pixels
+ +

Description
Synonym for SetWidth() 
+  
See also
PlotMark::SetWidth +

Example

+$lineplot->mark->SetSize(10); +
+

+

 

 

+function SetType($aType,$aFileName,$aScale) +
+ +Specify type of plot mark

+ + + + + + + + +
ArgumentDefaultDescription
+$aType + + Type of plotmark, shape or built-in image
+$aFileName + + +'' +Filename or country name depending on type of plotmark. See below.
+$aScale + + +1.0 +Scaling of image
+ +

Description
This method is used to specify what type of plotmarks should be be displayed. There are two classes of plotmarks. The first class is a number of different shapes and the second class is a number of built-in renderd images. +

+The following shape (the first class) plot marks are available + +

    +
  1. MARK_SQUARE, A filled square +
  2. MARK_UTRIANGLE, A triangle pointed upwards +
  3. MARK_DTRIANGLE, A triangle pointed downwards +
  4. MARK_DIAMOND, A diamond +
  5. MARK_CIRCLE, A circle +
  6. MARK_FILLEDCIRCLE, A filled circle +
  7. MARK_CROSS, A cross +
  8. MARK_STAR, A star +
  9. MARK_X, An 'X' +
  10. MARK_IMAGE, Use the image specified with the filename and scale as the second and third argument as the mark. +
  11. MARK_FLAG, Use one of MARK_FLAG1, MARK_FLAG2, MARK_FLAG3, MARK_FLAG4 to indicate that you want to display a country flag. The numbers indicate which original size of the flag you want to use. 1 is the smallest size and 4 is the largest flag size. You can of course also scale a flag by specifying the scale as the third argument. Which country flag you want is specified in the second argument as either the full country name, partial country name or by ordinal number as specified in the table below. Please note that if you specify a partial name then the first country in alphabetic order that matches the partial name will be used. +
+ +

+For the second class (built-in images) the following table list the different images as well as what color they are available in. For the built-in images you specify the color with the second argument. +

+Note that some of the images are available in different sizes. The reason is that even though you can scale them by the third argument there is a visual degradation to scale an image larger than it's original size since some pixels needs to be interpolated. Reducing the size with a scale < 1.0 gives much better visual apperance. +

+The scaling works with both GD 1 and GD 2 but with GD 2 the quality of the scaling is much better. +

+Built-in images and available colors: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescriptionColors
MARK_IMG_PUSHPIN, MARK_IMG_SPUSHPIN Push-pin image'red','blue','green','pink','orange'
MARK_IMG_LPUSHPIN A larger Push-pin image'red','blue','green','pink','orange'
MARK_IMG_BALL, MARK_IMAGE_SBALLA round 3D rendered ball'bluegreen','cyan','darkgray','greengray', + 'gray','graypurple','green','greenblue','lightblue', + 'lightred','navy','orange','purple','red','yellow'
MARK_IMAGE_MBALLA medium sized round 3D rendered ball +'blue','bluegreen','brown','cyan', +'darkgray','greengray','gray','green', +'greenblue','lightblue','lightred', +'purple','red','white','yellow' +
MARK_IMAGE_LBALLA large sized round 3D rendered ball +'blue','lightblue','brown','darkgreen', +'green','purple','red','gray','yellow','silver','gray' +
MARK_IMAGE_SQUAREA 3D rendered square'bluegreen','blue','green', +'lightblue','orange','purple','red','yellow'
MARK_IMG_STARA 3D rendered star image'bluegreen','lightblue','purple','blue','green','pink','red','yellow'
MARK_IMG_DIAMONDA 3D rendered diamond'lightblue','darkblue','gray', +'blue','pink','purple','red','yellow'
MARK_IMG_BEVELA 3D rendered bevel style round ring'green','purple','orange','red','yellow'
+

+In terms of the builtin flags 230 countries are supported. The following table lists all available flags: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1: 'Afghanistan' 2: 'Republic of Angola'
3: 'Republic of Albania' 4: 'Alderney'
5: 'Democratic and Popular Republic of Algeria' 6: 'Territory of American Samoa'
7: 'Principality of Andorra' 8: 'British Overseas Territory of Anguilla'
9: 'Antarctica' 10: 'Argentine Republic'
11: 'League of Arab States' 12: 'Republic of Armenia'
13: 'Aruba' 14: 'Commonwealth of Australia'
15: 'Republic of Austria' 16: 'Azerbaijani Republic'
17: 'British Antarctic Territory' 18: 'Kingdom of Belgium'
19: 'British Overseas Territory of Bermuda' 20: 'Commonwealth of the Bahamas'
21: 'Kingdom of Bahrain' 22: 'Republic of Belarus'
23: 'Republic of Bolivia' 24: 'Belize'
25: 'Republic of Benin' 26: 'Republic of Botswana'
27: 'Federative Republic of Brazil' 28: 'Barbados'
29: 'British Indian Ocean Territory' 30: 'Brunei Darussalam'
31: 'Republic of Burkina' 32: 'Republic of Bulgaria'
33: 'Republic of Burundi' 34: 'Overseas Territory of the British Virgin Islands'
35: 'Central African Republic' 36: 'Kingdom of Cambodia'
37: 'Republic of Cameroon' 38: 'Dominion of Canada'
39: 'Caribbean Community' 40: 'Republic of Cape Verde'
41: 'Republic of Chad' 42: 'Republic of Chile'
43: 'Territory of Christmas Island' 44: 'Commonwealth of Independent States'
45: 'Cook Islands' 46: 'Republic of Colombia'
47: 'Territory of Cocos Islands' 48: 'Commonwealth'
49: 'Union of the Comoros' 50: 'Republic of the Congo'
51: 'Republic of Costa Rica' 52: 'Republic of Croatia'
53: 'Republic of Cuba' 54: 'British Overseas Territory of the Cayman Islands'
55: 'Republic of Cyprus' 56: 'The Czech Republic'
57: 'Kingdom of Denmark' 58: 'Republic of Djibouti'
59: 'Commonwealth of Dominica' 60: 'Dominican Republic'
61: 'Republic of Ecuador' 62: 'Arab Republic of Egypt'
63: 'Republic of El Salvador' 64: 'England'
65: 'Republic of Equatorial Guinea' 66: 'State of Eritrea'
67: 'Republic of Estonia' 68: 'Ethiopia'
69: 'European Union' 70: 'British Overseas Territory of the Falkland Islands'
71: 'International Federation of Vexillological Associations' 72: 'Republic of Fiji'
73: 'Republic of Finland' 74: 'Territory of French Polynesia'
75: 'French Republic' 76: 'Overseas Department of French Guiana'
77: 'Gabonese Republic' 78: 'Republic of the Gambia'
79: 'Republic of Georgia' 80: 'Federal Republic of Germany'
81: 'Republic of Ghana' 82: 'Gibraltar'
83: 'Hellenic Republic' 84: 'State of Grenada'
85: 'Overseas Department of Guadeloupe' 86: 'Territory of Guam'
87: 'Republic of Guatemala' 88: 'The Bailiwick of Guernsey'
89: 'Republic of Guinea' 90: 'Republic of Haiti'
91: 'Hong Kong Special Administrative Region' 92: 'Republic of Honduras'
93: 'Republic of Hungary' 94: 'Republic of Iceland'
95: 'International Committee of the Red Cross' 96: 'Republic of India'
97: 'Republic of Indonesia' 98: 'Republic of Iraq'
99: 'Republic of Ireland' 100: 'Organization of the Islamic Conference'
101: 'Isle of Man' 102: 'State of Israel'
103: 'Italian Republic' 104: 'Jamaica'
105: 'Japan' 106: 'The Bailiwick of Jersey'
107: 'Hashemite Kingdom of Jordan' 108: 'Republic of Kazakhstan'
109: 'Republic of Kenya' 110: 'Republic of Kiribati'
111: 'State of Kuwait' 112: 'Kyrgyz Republic'
113: 'Republic of Latvia' 114: 'Lebanese Republic'
115: 'Kingdom of Lesotho' 116: 'Republic of Liberia'
117: 'Principality of Liechtenstein' 118: 'Republic of Lithuania'
119: 'Grand Duchy of Luxembourg' 120: 'Macao Special Administrative Region'
121: 'Republic of Macedonia' 122: 'Republic of Madagascar'
123: 'Republic of the Marshall Islands' 124: 'Republic of Mali'
125: 'Federation of Malaysia' 126: 'Republic of Malta'
127: 'Republic of Malawi' 128: 'Overseas Department of Martinique'
129: 'Islamic Republic of Mauritania' 130: 'Territorial Collectivity of Mayotte'
131: 'United Mexican States' 132: 'Federated States of Micronesia'
133: 'Midway Islands' 134: 'Republic of Moldova'
135: 'Principality of Monaco' 136: 'Republic of Mongolia'
137: 'British Overseas Territory of Montserrat' 138: 'Kingdom of Morocco'
139: 'Republic of Mozambique' 140: 'Republic of Mauritius'
141: 'Union of Myanmar' 142: 'Republic of Namibia'
143: 'North Atlantic Treaty Organization' 144: 'Republic of Nauru'
145: 'Turkish Republic of Northern Cyprus' 146: 'Netherlands Antilles'
147: 'Kingdom of Nepal' 148: 'Kingdom of the Netherlands'
149: 'Territory of Norfolk Island' 150: 'Federal Republic of Nigeria'
151: 'Republic of Nicaragua' 152: 'Republic of Niger'
153: 'Niue' 154: 'Commonwealth of the Northern Mariana Islands'
155: 'Province of Northern Ireland' 156: 'Nordic Council'
157: 'Kingdom of Norway' 158: 'Territory of New Caledonia and Dependencies'
159: 'New Zealand' 160: 'Organization of American States'
161: 'Organization of African Unity' 162: 'International Olympic Committee'
163: 'Sultanate of Oman' 164: 'Islamic Republic of Pakistan'
165: 'Republic of Palau' 166: 'Independent State of Papua New Guinea'
167: 'Republic of Paraguay' 168: 'Republic of the Philippines'
169: 'British Overseas Territory of the Pitcairn Islands' 170: 'Republic of Poland'
171: 'Republic of Portugal' 172: 'Commonwealth of Puerto Rico'
173: 'State of Qatar' 174: 'Russian Federation'
175: 'Republic of Rwanda' 176: 'Kingdom of Saudi Arabia'
177: 'Republic of San Marino' 178: 'Nordic Sami Conference'
179: 'Sark' 180: 'Scotland'
181: 'Principality of Seborga' 182: 'Republic of Sierra Leone'
183: 'Republic of Singapore' 184: 'Republic of Korea'
185: 'Republic of Slovenia' 186: 'Somali Republic'
187: 'Republic of Somaliland' 188: 'Republic of South Africa'
189: 'Solomon Islands' 190: 'Kingdom of Spain'
191: 'Secretariat of the Pacific Community' 192: 'Democratic Socialist Republic of Sri Lanka'
193: 'Saint Lucia' 194: 'Republic of the Sudan'
195: 'Republic of Suriname' 196: 'Slovak Republic'
197: 'Kingdom of Sweden' 198: 'Swiss Confederation'
199: 'Syrian Arab Republic' 200: 'Kingdom of Swaziland'
201: 'Republic of China' 202: 'Republic of Tajikistan'
203: 'United Republic of Tanzania' 204: 'Kingdom of Thailand'
205: 'Autonomous Region of Tibet' 206: 'Turkmenistan'
207: 'Togolese Republic' 208: 'Tokelau'
209: 'Kingdom of Tonga' 210: 'Tristan da Cunha'
211: 'Tromelin' 212: 'Republic of Tunisia'
213: 'Republic of Turkey' 214: 'Tuvalu'
215: 'United Arab Emirates' 216: 'Republic of Uganda'
217: 'Ukraine' 218: 'United Kingdom of Great Britain'
219: 'United Nations' 220: 'United States of America'
221: 'Oriental Republic of Uruguay' 222: 'Virgin Islands of the United States'
223: 'Republic of Uzbekistan' 224: 'State of the Vatican City'
225: 'Republic of Vanuatu' 226: 'Bolivarian Republic of Venezuela'
227: 'Republic of Yemen' 228: 'Democratic Republic of Congo'
229: 'Republic of Zimbabwe'
+ + 
+ +

Example

+// A standard shape
$lineplot->mark->SetType(MARK_FILLEDCIRCLE);
$lineplot->mark->Show();

// Use image in file 'mark.jpg' as mark., aslo scale it to
// half the size
$lineplot->mark->SetType(MARK_IMAGE,'mark.jpg',0.5);
$lineplot->mark->Show();

// Using the built-in image diamond in yellow color and 70% of originally size
$lineplot->mark->SetType(MARK_IMG_DIAMOND, 'yellow', 0.7);
$lineplot->mark->Show();

// Setting the plotmarks to a Swedish flag showing the three
// ways of doing it
....
$p1->mark->SetType(MARK_FLAG1,'sweden');
// OR
$p1->mark->SetType(MARK_FLAG1,197);
// OR
$p1->mark->SetType(MARK_FLAG1,'Kingdom of Sweden');

+

+

+

 

 

+function SetWeight($aWeight) +
+ +Specify line weight

+ + + + +
ArgumentDefaultDescription
+$aWeight + + Line weight
+ +

Description
Specify line weight 
+ +

Example

+$line->mark->SetWeight(2); +
+

+

 

 

+function SetWidth($aWidth) +
+ +Set width of plot mark

+ + + + +
ArgumentDefaultDescription
+$aWidth + + Width in pixels
+ +

Description
Set width of plot mark 
+ +

Example

+$lineplot->mark->SetWidth(10);
+

+

+

 

 

+function Show($aShow) +
+ +Enable or disable plotmarks

+ + + + +
ArgumentDefaultDescription
+$aShow + + +true +True=Show plot marks
+ +

Description
Enable or disable plotmarks. By default plot marks are not shown so if you want to display them you need to use this method. + 
+ +

Example

+$lineplot->mark->Show(); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/PolarAxis.html b/html/includes/jpgraph/docs/ref/PolarAxis.html new file mode 100644 index 0000000000..5c6bd138c1 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/PolarAxis.html @@ -0,0 +1,277 @@ +


CLASS PolarAxis EXTENDS Axis
+(Defined in: jpgraph_polar.php : 151)
 PolarAxis  Axis  
 HideTicks() 
SetAngleFont() 
SetAngleStep() 
SetColor() 
SetGridColor() 
SetTickColors() 
ShowAngleDegreeMark() 
ShowAngleLabel() 
ShowGrid() 
+
 
 

Class usage and Overview
Represents the different axis for a polar plot. This class holds the property both for the radius and the angle axis classes. It is accessed throught the 'axis' property in the PolarGraph class.

  +

See also related classes:
PolarGraph

 


Class Methods

+

 

 

+function HideTicks($aFlg,$aAngleFlg) +
+ +HIde ticks marks

+ + + + + + +
ArgumentDefaultDescription
+$aFlg + + +true +Hide radius tick marks
+$aAngleFlg + + +true +Hide angle tick marks
+ +

Description
HIde ticks marks 
+ +

Example

+// Hide just the angle tick marks
$polargraph->axis->HideTicks(false,true);
+

+

+

 

 

+function SetAngleFont($aFontFam,$aFontStyle,$aFontSize) +
+ +Set font for angles

+ + + + + + + + +
ArgumentDefaultDescription
+$aFontFam + + Font family
+$aFontStyle + + +FS_NORMAL +Font style
+$aFontSize + + +10 +Font size
+ +

Description
Set font for angle labels on the polar graph. 
+ +

Example

+$polargraph->axis->SetAngleFont(FF_ARIAL,FS_NORMAL,8); +
+

+

 

 

+function SetAngleStep($aStep) +
+ +Set angle step

+ + + + +
ArgumentDefaultDescription
+$aStep + + Step in degrees
+ +

Description
Specify the angle step, in degrees, between the angle markers. 
+ +

Example

+// Set 20 degrees between each marker
$polargraph->axis->SetAngleStep(20);
+

+

+

 

 

+function SetColor($aColor,$aRadColor,$aAngleColor) +
+ +Specify axis and label colors

+ + + + + + + + +
ArgumentDefaultDescription
+$aColor + + Color for radius axis
+$aRadColor + + +'' +Color for radius labels
+$aAngleColor + + +'' +Color for angle labels
+ +

Description
Specify axis and label colors. 
+  
See also
PolarAxis::SetGridColor +

Example

+$polargraph->axis->SetColor('black','navy','darkred'); +
+

+

 

 

+function SetGridColor($aMajorColor,$aMinorColor,$aAngleColor) +
+ +Set colors for the various grids

+ + + + + + + + +
ArgumentDefaultDescription
+$aMajorColor + + Major radius grid color
+$aMinorColor + + +'' +Minor radius grid color
+$aAngleColor + + +'' +Angle grid color
+ +

Description
Set colors for the various grids 
+ +

Example

+// Set "Soft" colors for the grid
$polargraph->axis->SetGridColor('lightgray','lightgray','lightgray');
+

+

+

 

 

+function SetTickColors($aRadColor,$aAngleColor) +
+ +Specify color for axis tick marks

+ + + + + + +
ArgumentDefaultDescription
+$aRadColor + + Radius axis colors
+$aAngleColor + + +'' +Angle axis colors
+ +

Description
Specify color for axis tick marks 
+ +

Example

+$polargraph->axis->SetTickColor('red'); +
+

+

 

 

+function ShowAngleDegreeMark($aFlg) +
+ +Add a degree mark after each angel label

+ + + + +
ArgumentDefaultDescription
+$aFlg + + +true +True=Add mark
+ +

Description
Add a degree mark after each angel label ( a small sperscripted 'o' ). This is enabled by default. 
+ +

Example

+$polargraph->axis->ShowAngleDegreeMark(true); +
+

+

 

 

+function ShowAngleLabel($aFlg) +
+ +Show angle labels

+ + + + +
ArgumentDefaultDescription
+$aFlg + + +true +True=show labels
+ +

Description
Show angle labels. This is on by default. 
+ +

Example

+// Enable angle labels
$polargraph->axis->ShowAngleLabel();
+

+

+

 

 

+function ShowGrid($aMajor,$aMinor,$aAngle) +
+ +Determine what grid lines should be visible

+ + + + + + + + +
ArgumentDefaultDescription
+$aMajor + + +true +Show major radius grid lines
+$aMinor + + +false +Show minor radius grid lines
+$aAngle + + +true +Show angle grid lines
+ +

Description
Determine what grid lines should be visible. 
+ +

Example

+// Just display major radius grid line and angles
$polargraph->axis->ShowGrid(true,false,true);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/PolarGraph.html b/html/includes/jpgraph/docs/ref/PolarGraph.html new file mode 100644 index 0000000000..b5b6b2c59f --- /dev/null +++ b/html/includes/jpgraph/docs/ref/PolarGraph.html @@ -0,0 +1,257 @@ +


CLASS PolarGraph EXTENDS Graph
+(Defined in: jpgraph_polar.php : 639)
 PolarGraph  Graph  
 PolarGraph() 
Set90AndMargin() 
SetDensity() 
SetPlotSize() 
SetScale() 
SetType() 
Stroke() 
+
 
 

Class usage and Overview
Represent a polar graph. Accessible properties are + +

  +

See also related classes:
PolarAxis

 


Class Methods

+

 

 

+function PolarGraph($aWidth,$aHeight,$aCachedName,$aTimeOut,$aInline) +
+ +Construct a new graph

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aWidth + + +300 +Width (in pixels)
+$aHeight + + +200 +Height (in pixels)
+$aCachedName + + +"" +Cache name
+$aTimeOut + + +0 +Cache timeout
+$aInline + + +true +Inline flag (DEPRECATED)
+ +

Description
Construct a new Polar Graph. This is completely analog to the standard Graph() creation and follows the exactly same pattern.  
+ +

Example

+$polargraph = new PolarGraph(300,500); +
+

+

 

 

+function Set90AndMargin($lm,$rm,$tm,$bm) +
+ +Rotate the polar graph 90 degrees

+ + + + + + + + + + +
ArgumentDefaultDescription
+$lm + + +0 +Left margin
+$rm + + +0 +Right Margin
+$tm + + +0 +Top margin
+$bm + + +0 +Bottom margin
+ +

Description
Rotate the polar graph 90 degrees 
+ +

Example

+$polargraph->Set90AndMargin(40,40,40,40); +
+

+

 

 

+function SetDensity($aDense) +
+ +Specify density for the radius axis

+ + + + +
ArgumentDefaultDescription
+$aDense + + Density
+ +

Description
This is analog to the density specification for the X, and Y-scale s for the standard X-Y-plots. +This specifies how close the autoscaling algorithm will place the tick marks to each other. + +The tick density can be one of + + + +By default the radius density os set to TICKD_DENSE + 
+ +

Example

+// Slightly fewer ticks than default
$polargraph->SetDensity(TICKD_NORMAL);
+

+

+

 

 

+function SetPlotSize($w,$h) +
+ +Alternative way to specify size of the plot area

+ + + + + + +
ArgumentDefaultDescription
+$w + + Width
+$h + + Height
+ +

Description
You can specify the plot area size an posiion in the graph in two ways. The frst is the standard way of specifying the margins on the sides with SetMargins() method. + +This method centers a plot area with the specified width and height inthe middle of the graph, it is basically a short form for + +SetMargins( +$graphwidth-($w/2),$graphwidth-($w/2), +$graphheight-($h/2),$graphheight-($h/2)); + 
+ +

Example

+$polargraph->SetPlotSize(200,250); +
+

+

 

 

+function SetScale($aScale,$rmax) +
+ +Specify scale type (linear or log)

+ + + + + + +
ArgumentDefaultDescription
+$aScale + + Linear "lin" or logarithmic "log" scale
+$rmax + + +0 +Manual maximum value
+ +

Description
Specify scale type (linear or log) for the radius scale. A linear scale is specified as 'lin' and a logarithmic scale is specified as 'log' 
+ +

Example

+// Specify a logarithmic scale for the radius
$polargraph->SetScale('log');
+

+

+

 

 

+function SetType($aType) +
+ +Specify if the graphs should be 360 or 180

+ + + + +
ArgumentDefaultDescription
+$aType + + Type
+ +

Description
Specify if the polargraph should be a full 360 degrees or just 180 degrees. The possible values for type are + + + +By default the graph is a full 260 degrees. 
+ +

Example

+$polargraph->SetType(POLAR_360);
+

+

+

 

 

+function Stroke($aStrokeFileName) +
+ +Send graph back to browser or file

+ + + + +
ArgumentDefaultDescription
+$aStrokeFileName + + +"" +File name
+ +

Description
Send a graph back to browser or to a file. This must be the last call in your script. + + 
+ +

Example

+$polargraph->Stroke(); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/PolarPlot.html b/html/includes/jpgraph/docs/ref/PolarPlot.html new file mode 100644 index 0000000000..85036293e9 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/PolarPlot.html @@ -0,0 +1,165 @@ +


CLASS PolarPlot
+(Defined in: jpgraph_polar.php : 36)
 PolarPlot 
 PolarPlot() 
SetColor() 
SetCSIMTargets() 
SetFillColor() 
SetLegend() 
SetWeight() 
+
 

Class usage and Overview
Represents a polar plot. A polar plot is a line plot that may have marks or be filled. + +Public properties are + +

  +

See also related classes:
PlotMark

 


Class Methods

+

 

 

+function PolarPlot($aData) +
+ +Constructor. Create a new Polar plot

+ + + + +
ArgumentDefaultDescription
+$aData + + Data array
+ +

Description
A polar plot is created form an array of (angle,radius) specification for each plot point.. 
+ +

Example

+$pdata = array(0,0,15,35,40,70,70,120);

$polarplot = new PolarPlot($pdata);
$polarplot->SetFillColor('lightblue@0.5');

$polargraph->Add($polarplot);

$polargraph->Stroke();
+

+

+

 

 

+function SetColor($aColor) +
+ +Specify line color for polar plot

+ + + + +
ArgumentDefaultDescription
+$aColor + + Line Color
+ +

Description
Specify line color for polar plot 
+ +

Example

+$polarplot->SetColor('navy'); +
+

+

 

 

+function SetCSIMTargets($aTargets,$aAlts) +
+ +Specify URL targets for markers

+ + + + + + +
ArgumentDefaultDescription
+$aTargets + + URL targets
+$aAlts + + +null +Alt texts
+ +

Description
Specify URL targets for markers on the polar plot. If you have specified a mark the polar plot you can add URL targets for each mark with this method. + +Remember that to create an image map graph you need to construct the graph with the Graph::StrokeCSIM() method instead of the ordinary Graph::Stroke() 
+  
See also
Graph::StrokeCSIM +

Example

+// Dummy targets
$t = array('#1','#2','#3','#4','#5','#6');

$polarplot->SetCSIMTargets($t);

+

+

+

 

 

+function SetFillColor($aColor) +
+ +Specify fill color for plot

+ + + + +
ArgumentDefaultDescription
+$aColor + + Fill color
+ +

Description
Specify fill color for plot. If the fill color is specified as '' then no fill will be used. 
+  
See also
PolarPlot::SetColor +

Example

+$polarplot->SetFillColor('orange'); +
+

+

 

 

+function SetLegend($aLegend,$aCSIM,$aCSIMAlt) +
+ +Specify legend text for the plot

+ + + + + + + + +
ArgumentDefaultDescription
+$aLegend + + Legend text
+$aCSIM + + +"" +URL target for this legend
+$aCSIMAlt + + +"" +ALT text for this legend
+ +

Description
Specify legend text for the plot. When image maps are used you can also specify a URL for this legend. 
+ +

Example

+$polarplot->SetLegend('Year 2002'); +
+

+

 

 

+function SetWeight($aWeight) +
+ +Sepcify line weight (in pixels)

+ + + + +
ArgumentDefaultDescription
+$aWeight + + Line weight
+ +

Description
Sepcify line weight for plot 
+ +

Example

+$polarplot->SetWeight(2); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Progress.html b/html/includes/jpgraph/docs/ref/Progress.html new file mode 100644 index 0000000000..2ad2c8fdea --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Progress.html @@ -0,0 +1,102 @@ +


CLASS Progress
+(Defined in: jpgraph_gantt.php : 3027)
 Progress 
 Set() 
SetFillColor() 
SetPattern() 
+
 

Class usage and Overview
Represents the progress bar inside the activity bar in Gantt Charts

  +

See also related classes:
GanttGraph and GanttBar

 


Class Methods

+

 

 

+function Set($aProg) +
+ +Specify progress of activity in percent.

+ + + + +
ArgumentDefaultDescription
+$aProg + + Progress in percent (0-1)
+ +

Description
Specify progress of activity in percent. The shape of the progress bar can be specified with Progress::SetPattern() 
+  
See also
Progress::SetPattern +

Example

+$bar->progress->Set(0.8); +
+

+

 

 

+function SetFillColor($aColor) +
+ +Set fill (background) color for progress bar

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Set fill (background) color for progress bar 
+ +

Example

+$bar->progress->SetFillColor('white'); +
+

+

 

 

+function SetPattern($aPattern,$aColor,$aDensity) +
+ +Specify pattern class to use for progress bar

+ + + + + + + + +
ArgumentDefaultDescription
+$aPattern + + Pattern
+$aColor + + +"blue" +Color
+$aDensity + + +98 +Density
+ +

Description
Specify pattern class to use for progress bar. Valid patterns for the first argument are: + + + + 
+  
See also
GanttBar::SetPattern +

Example

+$activity->Set(0.8);
$activity->progress->SetPattern(BAND_RDIAG,"blue");
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/RadarAxis.html b/html/includes/jpgraph/docs/ref/RadarAxis.html new file mode 100644 index 0000000000..5c6132c8f7 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/RadarAxis.html @@ -0,0 +1,10 @@ +


CLASS RadarAxis EXTENDS Axis
+(Defined in: jpgraph_radar.php : 163)
 RadarAxis  Axis  
 
 

Class usage and Overview
Represents the axis for a spider plot

  +


Class Methods


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/RadarGraph.html b/html/includes/jpgraph/docs/ref/RadarGraph.html new file mode 100644 index 0000000000..bd1e56561b --- /dev/null +++ b/html/includes/jpgraph/docs/ref/RadarGraph.html @@ -0,0 +1,385 @@ +


CLASS RadarGraph EXTENDS Graph
+(Defined in: jpgraph_radar.php : 434)
 RadarGraph  Graph  
 Add() 
HideTickMarks() 
RadarGraph() 
SetCenter() 
SetColor() 
SetPlotSize() 
SetPos() 
SetScale() 
SetSize() 
SetTickDensity() 
SetTitles() 
ShowMinorTickmarks() 
Stroke() 
SupressTickMarks() 
+
 
 

Class usage and Overview
Spider graph. This graph type can only be used together with spider plots.

  +


Class Methods

+

 

 

+function Add(&$splot) +
+ +Add a spider plot to the spider graph

+ + + + +
ArgumentDefaultDescription
+&$splot + + Plot to add (instance of SpiderPlot)
+ +

Description
Add a spider plot to the spider graph 
+ +

Example

+$spidergraph->Add($spiderplot1); +
+

+

 

 

+function HideTickMarks($aFlag) +
+ +Hide tick marks on spider axis

+ + + + +
ArgumentDefaultDescription
+$aFlag + + +true +True=Hide tick marks
+ +

Description
Hide tick marks on spider axis 
+ +

Example

+$spidergraph->HideTickMarks();
+

+

+

 

 

+function RadarGraph($width,$height,$cachedName,$timeout,$inline) +
+ +Construct a new radar graph

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$width + + +300 +Imaghe width
+$height + + +200 +Image Height
+$cachedName + + +"" +Cache file name
+$timeout + + +0 +Cache timout (in minutes)
+$inline + + +1 +Inline image
+ +

Description
See Graph::Graph(). + 
+  
See also
Graph::Graph +

Example

+$radargraph = new RadarGraph(300,300); +
+

+

 

 

+function SetCenter($px,$py) +
+ +Specify position for center of spider graph

+ + + + + + +
ArgumentDefaultDescription
+$px + + Fraction of width
+$py + + +0.5 +Fraction of height
+ +

Description
Specify the position for the center of the spider graph in fractions of the image width and height. 
+ +

Example

+$spidergraph->SetCenter(0.6, 0.5); +
+

+

 

 

+function SetColor($c) +
+ +Set background color for graph

+ + + + +
ArgumentDefaultDescription
+$c + + Color
+ +

Description
Set background color for graph 
+ +

Example

+$spidergraph->SetColor('lightyellow');
+

+

+

 

 

+function SetPlotSize($aSize) +
+ +Specify size of spider graph

+ + + + +
ArgumentDefaultDescription
+$aSize + + Fraction of image size
+ +

Description
DEPRECATED
+Use SetSize() instead +
+Specify the length of the axis of the spider plot as fraction of the min(height,width) 
+  
See also
RadarGraph::SetCenter and RadarGraph::SetSize +

Example

+$radargraph->SetPlotSize(0.7);
+

+

+

 

 

+function SetPos($px,$py) +
+ +Alias for Set Center. Specify position of the center of the graph

+ + + + + + +
ArgumentDefaultDescription
+$px + + Fraction of width
+$py + + +0.5 +Fraction of height
+ +

Description
Alias for SetCenter. Specify position for the center of the graph. 
+  
See also
RadarGraph::SetCenter +

Example

+$graph->SetPos(0.5,0.6); +
+

+

 

 

+function SetScale($axtype,$ymin,$ymax) +
+ +Specify manual scale for spider graph

+ + + + + + + + +
ArgumentDefaultDescription
+$axtype + + Axis type
+$ymin + + +1 +Min Y-value
+$ymax + + +1 +Max Y-value
+ +

Description
Specify axis type and min/max value for the scale. 
+ +

Example

+$spidergraph->SetScale('lin',0,50); +
+

+

 

 

+function SetSize($aSize) +
+ +Specify the length of the axis

+ + + + +
ArgumentDefaultDescription
+$aSize + + Fraction of image size
+ +

Description
pecify the length of the axis of the spider plot as fraction of the min(height,width) 
+ +

Example

+$radargraph->SetPlotSize(0.7); +
+

+

 

 

+function SetTickDensity($densy) +
+ +Specify tick density

+ + + + +
ArgumentDefaultDescription
+$densy + + +TICKD_NORMAL +Density
+ +

Description
Tick density can be specified as +
+ +

Example

+$spidergraph->SetTickDensity(TICKD_VERYSPARSE); +
+

+

 

 

+function SetTitles($title) +
+ +Specify titles for all the spider axis

+ + + + +
ArgumentDefaultDescription
+$title + + Array of titles
+ +

Description
Set the title for the axis in the spider graph. If no titles have been specified then they will be numbered from 1 to maximum number of axis. 
+ +

Example

+$spidergraph->SetTitles(array('Jan','Feb','March','Apr')); +
+

+

 

 

+function ShowMinorTickmarks($aFlag) +
+ +Show minor tick marks

+ + + + +
ArgumentDefaultDescription
+$aFlag + + +true +True=Show minor tick marks
+ +

Description
By default the minor tick marks are hidden. This method turns them on. 
+ +

Example

+$spidergraph->ShowMinorTickMArks();
+

+

+

 

 

+function Stroke($aStrokeFileName) +
+ +Stroke the Spider graph

+ + + + +
ArgumentDefaultDescription
+$aStrokeFileName + + +"" +Filename
+ +

Description
Stroke the spider graph and send it back to the browser or write it to a file if a filename have been specified. + +This is normally the last method call in your script. 
+  
See also
Graph::Stroke +

Example

+$spidergraph->Stroke();
+

+

+

 

 

+function SupressTickMarks($f) +
+ +Suppress all tick marks on the spider axis

+ + + + +
ArgumentDefaultDescription
+$f + + +true +True=Hide tick marks
+ +

Description
Suppress all tick marks on the spider axis 
+  
See also
RadarGraph::ShowMinorTickmarks +

Example

+$spidergraph->SupressTickMarks();
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/RadarGrid.html b/html/includes/jpgraph/docs/ref/RadarGrid.html new file mode 100644 index 0000000000..69aa9d6db5 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/RadarGrid.html @@ -0,0 +1,10 @@ +


CLASS RadarGrid EXTENDS Grid
+(Defined in: jpgraph_radar.php : 274)
 RadarGrid  Grid  
 
 

Class usage and Overview
Represents the grid for a spider plot

  +

See also related classes:
SpiderAxis and SpiderGraph

 


Class Methods


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/RadarLinearTicks.html b/html/includes/jpgraph/docs/ref/RadarLinearTicks.html new file mode 100644 index 0000000000..df7f607c46 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/RadarLinearTicks.html @@ -0,0 +1,10 @@ +


CLASS RadarLinearTicks EXTENDS LinearTicks
+(Defined in: jpgraph_radar.php : 89)
 RadarLinearTicks  LinearTicks  
 
 

Class usage and Overview
Handle linear ticks on a single spider axis

  +

See also related classes:
SpiderGraph and SpiderLogTicks

 


Class Methods


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/RadarLogTicks.html b/html/includes/jpgraph/docs/ref/RadarLogTicks.html new file mode 100644 index 0000000000..7f9fb8372e --- /dev/null +++ b/html/includes/jpgraph/docs/ref/RadarLogTicks.html @@ -0,0 +1,10 @@ +


CLASS RadarLogTicks EXTENDS Ticks
+(Defined in: jpgraph_radar.php : 14)
 RadarLogTicks  Ticks  
 
 

Class usage and Overview
Represent logarithmic ticks on a single spider axis

  +


Class Methods


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/RadarPlot.html b/html/includes/jpgraph/docs/ref/RadarPlot.html new file mode 100644 index 0000000000..15f1830f6b --- /dev/null +++ b/html/includes/jpgraph/docs/ref/RadarPlot.html @@ -0,0 +1,181 @@ +


CLASS RadarPlot
+(Defined in: jpgraph_radar.php : 314)
 RadarPlot 
 RadarPlot() 
SetColor() 
SetFill() 
SetFillColor() 
SetLegend() 
SetLineStyle() 
SetLineWeight() 
+
 

Class usage and Overview
Create a new spider plot. + +A spider plot can only be added to a SpiderGraph

  +

See also related classes:
SpiderGraph

 


Class Methods

+

 

 

+function RadarPlot($data) +
+ +Create a new Radar plot

+ + + + +
ArgumentDefaultDescription
+$data + + Data array
+ +

Description
Creates a new radar plot 
+ +

Example

+$radar = new RadarPlot($data); +
+

+

 

 

+function SetColor($aColor,$aFillColor) +
+ +Specify color for the plot

+ + + + + + +
ArgumentDefaultDescription
+$aColor + + Color for line
+$aFillColor + + +false +Fill color
+ +

Description
Set the color for the plot. Note that you can also use the method SetFillColor() to specify the fill color. This non-orthogonality is in place to make the API be more flexible. + + 
+  
See also
RadarPlot::SetFillColor +

Example

+$spideplot->SetColor('darkred','lightblue');
+

+

+

 

 

+function SetFill($f) +
+ +Deprecated. Turn filling on and off

+ + + + +
ArgumentDefaultDescription
+$f + + +true +True=Use fill color and fill plot
+ +

Description
Deprecated. Turn filling on and off. When the fill color is pecified with either SetFillColor() or SetColor() this will tuen on the filling of the plot. + +This method might be useful if you programatically have set the colro and later need to disable the fill. 
+ +

Example

+$spiderplot->SetFillColor('lightblue');

// ... some code

// Turn off the fill
if( $doNotFillSpiderPlot )
    $spiderplot->SetFill(false);

+

+

+

 

 

+function SetFillColor($aColor) +
+ +Specify fill color for plot

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specify fill color for plot. + +Note. You can also use SetColor() to specify both fill and line color. 
+  
See also
RadarPlot::SetColor +

Example

+$spiderplot->SetFillColor('lightblue'); +
+

+

 

 

+function SetLegend($legend) +
+ +Specify legend text for this plot

+ + + + +
ArgumentDefaultDescription
+$legend + + Legend string
+ +

Description
Specify legend text for this plot. 
+ +

Example

+$spiderplot->SetLegend('Stress level'); +
+

+

 

 

+function SetLineStyle($aStyle) +
+ +Specify line style for the plot lines

+ + + + +
ArgumentDefaultDescription
+$aStyle + + Line style
+ +

Description
The line style can be one of +
+ +

Example

+$radarplot->SetLineStyle('dotted'); +
+

+

 

 

+function SetLineWeight($w) +
+ +Set line weight

+ + + + +
ArgumentDefaultDescription
+$w + + Line weight in pixels
+ +

Description
Set line weight. 
+ +

Example

+$spiderplot->SetLineWeight(2); +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/RotImage.html b/html/includes/jpgraph/docs/ref/RotImage.html new file mode 100644 index 0000000000..abf791e964 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/RotImage.html @@ -0,0 +1,137 @@ +


CLASS RotImage EXTENDS Image
+(Defined in: jpgraph.php : 7530)
 RotImage  Image 
 SetAngle() 
SetCenter() 
SetMargin() 
SetTranslation() 
+
 RoundedRectangle() 
SetAlphaBlending() 
SetAntiAliasing() 
SetCanvasColor() 
SetExpired() 
SetImgFormat() 
+SetMargin() 
SetQuality() 
SetTransparent() 
+
 

Class usage and Overview
A subclass of Image class which implements a rotated version of all methods in the base Image class. + +The Image class used in JpGraph is actually not the class Image but rather this class as we want to have the rotating possibility. + +The rotation is accomplished by standard 2D rotation matrices.

  +

See also related classes:
Image

 


Class Methods

+

 

 

+function SetAngle($a) +
+ +Specify rotation angle

+ + + + +
ArgumentDefaultDescription
+$a + + Angle in degrees
+ +

Description
Specify the rotation angle for the other graphic primitives in this class. + +The rotation is performed around point (0,0). + 
+  
See also
RotImage::SetTranslation and RotImage::SetCenter +

Example

+$graph->img->SetAngle(45);
+

+

+

 

 

+function SetCenter($dx,$dy) +
+ +Set rotation center

+ + + + + + +
ArgumentDefaultDescription
+$dx + + Specify rotation center X
+$dy + + Specify rotation center Y
+ +

Description
Specify center of rotation. (0,0) is the upper left most point in the image. By default the rotation point is choosen as tjhe midpoint of the image when the RotImage class is initially created. + 
+  
See also
RotImage::SetTranslation and RotImage::SetAngle +

Example

+$width=600; $height=400;
$graph = new Graph($width,$height);
$graph->img->SetMargin($leftm,$rightm,$topm,$bottomm);
$graph->SetAngle(20);

// Rotate graph around the plots (0,0) point, i.e
// where the graph axis intersect.
$graph->img->SetCenter($leftm,$height-($topm+$bottomm));
+

+

+

 

 

+function SetMargin($lm,$rm,$tm,$bm) +
+ +Specify margin for plot

+ + + + + + + + + + +
ArgumentDefaultDescription
+$lm + + Left margin
+$rm + + Right margin
+$tm + + Top margin
+$bm + + Bottom margin
+ +

Description
Specify the margin, i.e. the area on the side of the actual plot which is used for titles, labels, legends ans so on. + 
+ +

Example

+$graph->img->SetMargin(30,30,50,20);
+

+

+

 

 

+function SetTranslation($dx,$dy) +
+ +Specify translation (in pixels)

+ + + + + + +
ArgumentDefaultDescription
+$dx + + Horizontal translation
+$dy + + Vertical translation
+ +

Description
The translation is applied after the rotation of the image. 
+  
See also
RotImage::SetCenter and RotImage::SetAngle +

Example

+$graph->img->SetTranslation(10,10) +
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/ScatterPlot.html b/html/includes/jpgraph/docs/ref/ScatterPlot.html new file mode 100644 index 0000000000..b20320a3c1 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/ScatterPlot.html @@ -0,0 +1,102 @@ +


CLASS ScatterPlot EXTENDS Plot
+(Defined in: jpgraph_scatter.php : 130)
 ScatterPlot  Plot  
 ScatterPlot() 
SetImpuls() 
SetLinkPoints() 
+
 
 

Class usage and Overview
A scatter plto is used to display a number of points specified by (x,y) coordinates. To specify the apperance of points the 'mark' property has to be set. See PlotMark class for further details. +

+The marks can also be connected with lines by calling the method SetLinkPoints()

  +

See also related classes:
LinePlot and PlotMark

 


Class Methods

+

 

 

+function ScatterPlot($datay,$datax) +
+ +Constructor

+ + + + + + +
ArgumentDefaultDescription
+$datay + + Y-data array
+$datax + + +false +X-data array
+ +

Description
Create a new scatter plot 
+ +

Example

+$datax = array( ... );
$datay = array( ... );
$scatter = new ScatterPlot($datay,$datax);
+

+

+

 

 

+function SetImpuls($f) +
+ +Specify impuls type of sctter plot

+ + + + +
ArgumentDefaultDescription
+$f + + +true +True=Use impuls type
+ +

Description
By specifying the impuls type each plot is linked to the X-axis by a line. + +This type of plots is often used to illustrate signals in discrete time signal processing. 
+ +

Example

+$scatterplot->SetImpuls();
+

+

+

 

 

+function SetLinkPoints($aFlag,$aColor,$aWeight) +
+ +Combine the scatter plot points with a line

+ + + + + + + + +
ArgumentDefaultDescription
+$aFlag + + +true +True=Link scatter points
+$aColor + + +"black" +Color of line
+$aWeight + + +1 +Line width
+ +

Description
Link scatter plots with a line of specified color and width. 
+ +

Example

+$scatterplot->SetLinkPoints();
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Shape.html b/html/includes/jpgraph/docs/ref/Shape.html new file mode 100644 index 0000000000..6facfadc2a --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Shape.html @@ -0,0 +1,562 @@ +


CLASS Shape
+(Defined in: jpgraph_canvtools.php : 69)
 Shape 
 Bezier() 
Circle() 
FilledCircle() 
FilledPolygon() 
FilledRectangle() 
FilledRoundedRectangle() 
IndentedRectangle() 
Line() 
Polygon() 
Rectangle() 
RoundedRectangle() 
SetColor() 
SetTextAlign() 
ShadowRectangle() 
Shape() 
+
 

Class usage and Overview
This is mainly awrapper class around thye current image class used. It is meant to make it easier to work with a Canvas graph and a Canvas scale. Basically the class uses the specified scale to trasnalte coordinates which is then passed on to the standard Image routines. +

  +

See also related classes:
CanvasScale

 


Class Methods

+

 

 

+function Bezier($p,$aSteps) +
+ +Draw a bezier curve

+ + + + + + +
ArgumentDefaultDescription
+$p + + Array with control points
+$aSteps + + +40 +Number of line segments in curve
+ +

Description
Draw a Bezier line with specified in the $p array. The points are specified according to the current scale. The positions in the array has the following meaning +

+(0,1) x0,y0 (First point on curver)
+(2,3) x,y, (Control point 1)
+(4,5) x,y, (Control point 2)
+(6,7) x,y, (End point of curve)
+

+See example in canvasbezierex1.php + + 
+ +

Example

+$p = array(3,6,6,9,5,3,7,4);

$shape->SetColor('black');
$shape->Bezier($p);
+

+

+

 

 

+function Circle($x1,$y1,$r) +
+ +Draw a circle

+ + + + + + + + +
ArgumentDefaultDescription
+$x1 + + Center X-coordinate
+$y1 + + Center Y-coordinate
+$r + + Radius
+ +

Description
Draw a circle onto the canvas + 
+  
See also
Image::Circle +

Example

+// The shape class is wrapper around the Imgae class which translates
// the coordinates for us
$shape = new Shape($g,$scale);
$shape->SetColor('black');


// .. and a circle (x,y,diameter)
$shape->Circle(5,14,2);

+

+

+

 

 

+function FilledCircle($x1,$y1,$r) +
+ +Draw a filled circle to a canvas

+ + + + + + + + +
ArgumentDefaultDescription
+$x1 + + Center X-coordinate
+$y1 + + Center Y-coordinate
+$r + + Radius
+ +

Description
Draw a filled circle on the canvas using the specified scale. +

+Note: If you are using GD1.xx you will see moire-patterns in large circles. This is due to the lack of a proper filled circle function in GD 1.xx. Using GD 2.xx will avoid this problem. + 
+  

See also
Image::FilledCircle +

Example

+// The shape class is wrapper around the Imgae class which translates
// the coordinates for us
$shape = new Shape($g,$scale);
$shape->SetColor('black');


// .. and a circle (x,y,diameter)
$shape->FilledCircle(5,14,2);

+

+

+

 

 

+function FilledPolygon($p) +
+ +Draw a filled polygon

+ + + + +
ArgumentDefaultDescription
+$p + + Polygon array
+ +

Description
Draw a filled polygon 
+

+

 

 

+function FilledRectangle($x1,$y1,$x2,$y2) +
+ +Draw a filled rectangle on the canvas

+ + + + + + + + + + +
ArgumentDefaultDescription
+$x1 + + Top left X
+$y1 + + Top left Y
+$x2 + + Bottom right X
+$y2 + + Bottom right Y
+ +

Description
Draw a filled rectangle on the canvas using the current sclae. + 
+ +

Example

+
// .. add a rectangle
$shape->SetColor('green');
$shape->FilledRectangle(15,8,19,14);
+

+

+

 

 

+function FilledRoundedRectangle($x1,$y1,$x2,$y2,$r) +
+ +Create a filled rectangle with rounded corners

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$x1 + + Top left X
+$y1 + + Top left Y
+$x2 + + Bottom right X
+$y2 + + Bottom right Y
+$r + + +null +Corner radius
+ +

Description
Create a filled rectangle with rounded corners 
+

+

 

 

+function IndentedRectangle($xt,$yt,$w,$h,$iw,$ih,$aCorner,$aFillColor,$r) +
+ +A filled rectangle with one corner 'indented'

+ + + + + + + + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$xt + + Top left X
+$yt + + Top left Y
+$w + + Width
+$h + + Height
+$iw + + +0 +Indented width
+$ih + + +0 +Indeted height
+$aCorner + + +3 +Corner to indent
+$aFillColor + + +"" +Fill color
+$r + + +4 +Corner radius
+ +

Description
A rounded rectangle where one of the corner has been moved "into" the rectangle. The indention is determined by the two argument +'iw' width and 'ih' height. +

+The corners (as used in the $aCorner) are numbered as +0=Top left, 1=top right, 2=bottom right, 3=bottom left + 
+

+

 

 

+function Line($x1,$y1,$x2,$y2) +
+ +Draw a line between

+ + + + + + + + + + +
ArgumentDefaultDescription
+$x1 + + X1
+$y1 + + Y1
+$x2 + + X2
+$y2 + + Y2
+ +

Description
Draw a line between two points in the canvas using the current scale. 
+  
See also
Image::Line +

Example

+
// Add a black line
$shape->SetColor('black');
$shape->Line(0,0,20,20);
+

+

+

 

 

+function Polygon($p,$aClosed) +
+ +Draw a closed polygon

+ + + + + + +
ArgumentDefaultDescription
+$p + + Array of points in polygon
+$aClosed + + +false +No description available
+ +

Description
Draw a closed polygon 
+ +

Example

+$p = array(3,6,6,9,5,3,7,4);
$shape->SetColor('blue:0.35');
$shape->Polygon($p);
+

+

+

 

 

+function Rectangle($x1,$y1,$x2,$y2) +
+ +Draw a rectangle on the canvas

+ + + + + + + + + + +
ArgumentDefaultDescription
+$x1 + + Top left X
+$y1 + + Top left Y
+$x2 + + Bottom right X
+$y2 + + Bottom right Y
+ +

Description
Draw a rectangle on the canvas using the current scale. 
+ +

Example

+// .. add a rectangle
$shape->SetColor('green');
$shape->Rectangle(15,8,19,14);
+

+

+

 

 

+function RoundedRectangle($x1,$y1,$x2,$y2,$r) +
+ +Draw a rectangle with rounded corners

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$x1 + + Top left X
+$y1 + + Top left Y
+$x2 + + Bottom right X
+$y2 + + Bottom right Y
+$r + + +null +Corner radius
+ +

Description
Draw a rectangle with rounded corners 
+

+

 

 

+function SetColor($aColor) +
+ +Specify color to use when drawing shapes

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color specification
+ +

Description
Specify color to use when drawing shapes 
+  
See also
RGB::Color +

Example

+// Add a black line
$shape->SetColor('black');
$shape->Line(0,0,20,20);
+

+

+

 

 

+function SetTextAlign($halign,$valign) +
+ +Specify bae point for StrokeText()

+ + + + + + +
ArgumentDefaultDescription
+$halign + + Horizontal position for basepoint
+$valign + + +"bottom" +Vertical position for base point
+ +

Description
Specifies how the coordinate for the text should be interpretated. Possible values for horizontal base-position are + + + +and for vertical + + +
+ +

Example

+// Interpret the text coordinate as beeing the
// top left corner of the bounding box for the text
$shape->SetTextAlign('left','top');

$shape->StrokeText(....)
+

+

+

 

 

+function ShadowRectangle($x1,$y1,$x2,$y2,$fcolor,$shadow_width,$shadow_color) +
+ +Draw a filled rectangle with a drop shadow

+ + + + + + + + + + + + + + + + +
ArgumentDefaultDescription
+$x1 + + Top left X
+$y1 + + Top left Y
+$x2 + + Bottom right X
+$y2 + + Bottom right Y
+$fcolor + + +false +Fill color
+$shadow_width + + +null +Shadow width
+$shadow_color + + +array(102,102,102) +Shadow color
+ +

Description
Draw a filled rectangle with a drop shadow 
+

+

 

 

+function Shape(&$aGraph,&$scale) +
+ +Methods to draw shapes on canvas

+ + + + + + +
ArgumentDefaultDescription
+&$aGraph + + Canvas graph
+&$scale + + Canvas scale
+ +

Description
Create a new shape class used to draw siple shape onto a canvas using the specified scale. 
+  
See also
CanvasGraph::CanvasGraph and CanvasScale::CanvasScale +

Example

+// Setup a basic canvas we can work 
$g = new CanvasGraph(400,200,'auto');
$g->SetMargin(5,11,6,11);
$g->SetShadow();
$g->SetMarginColor("teal");

// We need to stroke the plotarea and margin before we add the
// text since we otherwise would overwrite the text.
$g->InitFrame();

// Create a new scale
$scale = new CanvasScale($g);
$scale->Set(0,$xmax,0,$ymax);

// The shape class is wrapper around the Imgae class which translates
// the coordinates for us
$shape = new Shape($g,$scale);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Spline.html b/html/includes/jpgraph/docs/ref/Spline.html new file mode 100644 index 0000000000..21d98eb3f0 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Spline.html @@ -0,0 +1,70 @@ +


CLASS Spline
+(Defined in: jpgraph_regstat.php : 17)
 Spline 
 Get() 
Spline() 
+
 

Class usage and Overview
Utility class to help construct an interpolated data points given an arbitrary number of data points. +

+This class doesn't draw any graphs by itself it is only used to generate a new set of data points representing the smooth line from the input which are the control lines for the cubic spline. +

+The principle of using this class is that you first create an instance of this class and giving it the X,Y values for your control points. +

+You can then get back an interpolated smooth dataset by calling the Get() method. This method takeas as argument how many data points you want the interpolated graph to have. +

+Technical note: The spline is constructed with natural 2:nd derivates at the start and end points of the line. +

  +


Class Methods

+

 

 

+function Get($num) +
+ +Return the two new data vectors

+ + + + +
ArgumentDefaultDescription
+$num + + +50 +Number of data points
+ +

Description
Return a data set representing the interpolated smooth curve passing through all the specified control points. 
+ +

Example

+$spline = new Spline($xcontrol_points, $ycontrol_points);
list ($xdata, $ydata) = $spline->Get(100);
$lp = new LinePlot($ydata, $xdata);
+

+

+

 

 

+function Spline($xdata,$ydata) +
+ +Constructor. Create a new Spline object

+ + + + + + +
ArgumentDefaultDescription
+$xdata + + Control points. X-coordinates
+$ydata + + Control points. Y-coordinates
+ +

Description
Constructor. Create a new Spline object. The spline is determined by it's control points which are given with it's X and Y coordinates as arguments. +

+Technical note: The spline is constructed with natural 2:nd derivates at the start and end point. 
+ +

Example

+$spline = new Spline($xcontrol_points, $ycontrol_points);
list ($xdata, $ydata) = $spline->Get(100);
$lp = new LinePlot($ydata, $xdata);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/StockPlot.html b/html/includes/jpgraph/docs/ref/StockPlot.html new file mode 100644 index 0000000000..5c27b9e7a8 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/StockPlot.html @@ -0,0 +1,135 @@ +


CLASS StockPlot EXTENDS Plot
+(Defined in: jpgraph_stock.php : 15)
 StockPlot  Plot  
 HideEndLines() 
SetColor() 
SetWidth() 
StockPlot() 
+
 
 

Class usage and Overview
Create a stock chart graph, aka Candle-chart, aka Box-graph. +Each data point is represented by four values +(open,close,min,max) + +

  +


Class Methods

+

 

 

+function HideEndLines($aHide) +
+ +Show horizontal mark lines at the end of min/max lines

+ + + + +
ArgumentDefaultDescription
+$aHide + + +true +Flag true=show end lines
+ +

Description
Show horizontal mark lines at the end of min/max lines. This is enabled by default. 
+ +

Example

+$stock->HideEndLines(); +
+

+

 

 

+function SetColor($aColor,$aColor1,$aColor2,$aColor3) +
+ +Specify colors for the stock plot

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aColor + + Line color for positive bars
+$aColor1 + + +'white' +Fill color for positive bars
+$aColor2 + + +'darkred' +Line color for negative bars
+$aColor3 + + +'darkred' +Fill color for negative bars
+ +

Description
Specify the colros for a stock chart. A positive bar is defined as a bar where close > open. A negative bar is defined as a bar where close < open. + +The positive line color is always used for the min/max lines. + +By default positve colors are black and white. Negative colors are 'red' and 'red'. + 
+ +

Example

+$stockplot->SetColor('black','white','red','red'); +
+

+

 

 

+function SetWidth($aWidth) +
+ +Specify width for stock bars in pixels

+ + + + +
ArgumentDefaultDescription
+$aWidth + + Width in pixels
+ +

Description
Specify width for stock bars in pixels 
+ +

Example

+$stockplot->SetWidth(8); +
+

+

 

 

+function StockPlot(&$datay,$datax) +
+ +Constructor for Stock plots

+ + + + + + +
ArgumentDefaultDescription
+&$datay + + Y data array
+$datax + + +false +X data array
+ +

Description
Create a new Stock data plot. Each data value consists of 4 data points. (open,close,min,max) + +If the $ydata isn't an even number of data quadruples an error message will result. 
+ +

Example

+$ydata = array( .... )
$stockplot = new StockPlot($ydata);
+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/SuperScriptText.html b/html/includes/jpgraph/docs/ref/SuperScriptText.html new file mode 100644 index 0000000000..29204a012c --- /dev/null +++ b/html/includes/jpgraph/docs/ref/SuperScriptText.html @@ -0,0 +1,190 @@ +


CLASS SuperScriptText EXTENDS Text
+(Defined in: jpgraph.php : 3155)
 SuperScriptText  Text  
 FromReal() 
GetFontHeight() 
GetTextHeight() 
GetWidth() 
Set() 
SetSuperFont() 
SuperScriptText() 
+
 
 

Class usage and Overview
This class is responsible for formatting a text string which have a superscript at the end. This is used to generate scientific numbers. +

  +

See also related classes:
Text

 


Class Methods

+

 

 

+function FromReal($aVal,$aPrecision) +
+ +Create a scientific representation for a number

+ + + + + + +
ArgumentDefaultDescription
+$aVal + + Real value to be used
+$aPrecision + + +2 +Precision (number of digits) to be printed
+ +

Description
Initialized the class from a real value to be used to present a scientific text string. + 
+  
See also
SuperScriptText::Set +

Example

+$t = new SuperScriptText();
$t->FromReal(12341.56);

// Will print 1.23*10^4
+

+

+

 

 

+function GetFontHeight(&$aImg) +
+ +Hight of font (approximate the height of the text)

+ + + + +
ArgumentDefaultDescription
+&$aImg + + Image context
+ +

Description
Return height of text. 
+  
See also
SuperScriptText::GetTextHeight and SuperScriptText::GetWidth

+

 

 

+function GetTextHeight(&$aImg) +
+ +Hight of text

+ + + + +
ArgumentDefaultDescription
+&$aImg + + Image context
+ +

Description
Hight of text 
+

+

 

 

+function GetWidth(&$aImg) +
+ +Total width of text

+ + + + +
ArgumentDefaultDescription
+&$aImg + + Image context
+ +

Description
Total width of text 
+

+

 

 

+function Set($aTxt,$aSuper) +
+ +Convert a floating point number to scientific notation

+ + + + + + +
ArgumentDefaultDescription
+$aTxt + + Mantissa
+$aSuper + + +"" +Exponent
+ +

Description
Specify the string manuall by specifyin mantissa and exponent. 
+  
See also
SuperScriptText::FromReal +

Example

+$t = new SuperScriptText();
$t->Set("1.34 10","5");
// Will generate "1.34 10^5"
+

+

+

 

 

+function SetSuperFont($aFontFam,$aFontStyle,$aFontSize) +
+ +Manually set font to be used for superscript

+ + + + + + + + +
ArgumentDefaultDescription
+$aFontFam + + Font family
+$aFontStyle + + +FS_NORMAL +Font style
+$aFontSize + + +8 +Font size
+ +

Description
Used to manually specify font to be used for superscript. If not specified it will be detemined automatically based on the font used for the mantissa. The font for the superscript will be roughly 70% of the size of the base font.  
+

+

 

 

+function SuperScriptText($aTxt,$aSuper,$aXAbsPos,$aYAbsPos) +
+ +Constructor

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aTxt + + +"" +Mantissa text
+$aSuper + + +"" +Suoerscript text
+$aXAbsPos + + +0 +X-position (in pixels)
+$aYAbsPos + + +0 +Y-position (in pixels)
+ +

Description
Creates a new SUperSCriptClass 
+  
See also
Text::Text


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Text.html b/html/includes/jpgraph/docs/ref/Text.html new file mode 100644 index 0000000000..c7faa3cf4c --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Text.html @@ -0,0 +1,777 @@ +


CLASS Text
+(Defined in: jpgraph.php : 2778)
 Text 
 Align() 
Center() 
GetFontHeight() 
GetTextHeight() 
GetWidth() 
Hide() 
ParagraphAlign() 
Pos() 
Set() 
SetAlign() 
SetAngle() 
SetBox() 
SetColor() 
SetCSIMTarget() 
SetFont() 
SetMargin() 
SetOrientation() 
SetParagraphAlign() 
SetPos() 
SetScalePos() 
SetShadow() 
SetWordWrap() 
Show() 
Text() 
+
 

Class usage and Overview
All text that is to be draw onto any graph is handled by this class. You create each text you want printed as an instance of this class. + +It is possible to adjust both font, color, alignment and paragraph alignment. + +If the text contains multiple lines (separated by "\n") the paragraph alignment determines how each line is formatted (i.e. left,center or right) +

  +


Class Methods

+

 

 

+function Align($aHAlign,$aVAlign,$aParagraphAlign) +
+ +Specify alignment for the text in relation to the x,y position for text

+ + + + + + + + +
ArgumentDefaultDescription
+$aHAlign + + Horizontal alignment
+$aVAlign + + +"top" +Vertical alignment
+$aParagraphAlign + + +"" +Paragraph alignment
+ +

Description
This determines how the text's x,y position is to be interpretated. + +Valid horizontal alignments are + + +Valid vertical position are + + +Valid paragraph alignment +
+  
See also
Text::ParagraphAlign +

Example

+$text = new Text();
+

+

+

 

 

+function Center($aLeft,$aRight,$aYAbsPos) +
+ +Center the text between left and right coordinates

+ + + + + + + + +
ArgumentDefaultDescription
+$aLeft + + Left corner X-coordinate
+$aRight + + Right corner X-coordinate
+$aYAbsPos + + +false +The common Y-coodinate
+ +

Description
Center the text between left and right coordinates on the same Y-coordinate 
+  
See also
Text::Pos +

Example

+$txt->Center(50,150,75); +
+

+

 

 

+function GetFontHeight(&$aImg) +
+ +Height of font

+ + + + +
ArgumentDefaultDescription
+&$aImg + + No description available
+ +

Description
Return the height of the font used in the text. + +The difference between this method and the GetTextHeight() is that this method uses a predefined character to determine the height while GetTextHeight() uses the actual text in the string. + 
+  
See also
Text::GetTextHeight and Text::GetWidth +

Example

+$height = $txt->GetFontHeight($graph->img) +
+

+

 

 

+function GetTextHeight(&$aImg) +
+ +Return the height of the actual text in the text object

+ + + + +
ArgumentDefaultDescription
+&$aImg + + No description available
+ +

Description
Return the height of the text in this object. + +The difference between this method and the GetFontHeight() is that that method uses a predefined character to determine the height while GetTextHeight() uses the actual text in the string. 
+  
See also
Text::GetFontHeight and Text::GetWidth +

Example

+$height = $txt->GetTextHeight($graph->img);
+

+

+

 

 

+function GetWidth(&$aImg) +
+ +Get total width of text

+ + + + +
ArgumentDefaultDescription
+&$aImg + + No description available
+ +

Description
Get total width of text 
+  
See also
Text::GetTextHeight and Text::GetFontHeight +

Example

+$width = $txt->GetWidth($graph->img);
+

+

+

 

 

+function Hide($aHide) +
+ +Hide the text

+ + + + +
ArgumentDefaultDescription
+$aHide + + +true +True=Hide text
+ +

Description
The opposite of Show() 
+  
See also
Text::Show +

Example

+$txt->Hide(); +
+

+

 

 

+function ParagraphAlign($aAlign) +
+ +Specifies the alignment for a multi line text

+ + + + +
ArgumentDefaultDescription
+$aAlign + + Alignment for a multiline text
+ +

Description
Specify the paragraph alignment for a multi line text. Each text line is separated by a "\n" character. + +Valid alignments are: + 
+  
See also
Text::Align +

Example

+$txt->Set("The first line\nSec line\nThird line");
$txt->ParagraphAlign('center');

// Will give the result:
//
//  The first line
//     Sec line
//    Third line
+

+

+

 

 

+function Pos($aXAbsPos,$aYAbsPos,$aHAlign,$aVAlign) +
+ +Specify the position and alignment for the text object

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aXAbsPos + + +0 +X-position absolute position
+$aYAbsPos + + +0 +Y-position absolute position
+$aHAlign + + +"left" +Horizontal alignment
+$aVAlign + + +"top" +Vertical alignment
+ +

Description
Set the position text to be displayed. As a convinience the horizontal alignment may also be set in this call. + +If you need to specify vertical position you have to use the Align() method. 
+  
See also
Text::Align, Text::Set and Text::ParagraphAlign +

Example

+$txt->Pos(100,150,'center');
+

+

+

 

 

+function Set($aTxt) +
+ +Set text to be displayed

+ + + + +
ArgumentDefaultDescription
+$aTxt + + Text string
+ +

Description
Set text to be displayed 
+ +

Example

+$txt->Set('Hello world'); +
+

+

 

 

+function SetAlign($aHAlign,$aVAlign,$aParagraphAlign) +
+ +Alias for Align()

+ + + + + + + + +
ArgumentDefaultDescription
+$aHAlign + + Horizontal anchor point
+$aVAlign + + +"top" +Vertical anchor point
+$aParagraphAlign + + +"" +Paragraph alignment
+ +

Description
See Align 
+  
See also
Text::Align

+

 

 

+function SetAngle($aAngle) +
+ +Specify text angle

+ + + + +
ArgumentDefaultDescription
+$aAngle + + Angle in degrees
+ +

Description
Specify Orientation of text. If TTF fonts are used then the orientation can be a arbitrary angle. If the builtin fonts are used then only horizontal and vertical position can be used, i.e 0 or 90 degrees, 
+ +

Example

+$txt->SetAngle(45); +
+

+

 

 

+function SetBox($aFrameColor,$aBorderColor,$aShadowColor,$aCornerRadius,$aShadowWidth) +
+ +Set parameters for poossible frame around text

+ + + + + + + + + + + + +
ArgumentDefaultDescription
+$aFrameColor + + +array(255,255,255) +Color for text background
+$aBorderColor + + +array(0,0,0) +Color for border around text
+$aShadowColor + + +false +Color for shadow
+$aCornerRadius + + +4 +Corner radius for rectangle
+$aShadowWidth + + +3 +Drop shadow width
+ +

Description
Specify parameters for background color, border and possible text drop shadow. +
+If no shadow color is specified then no shadow will appear. +

+To use the old style of stright corners specify a corner radius of 0. + + 
+  

See also
Text::SetShadow +

Example

+$txt = new Text("Note: Simple textnote.\nWIth two lines");
$txt->SetFont(FF_FONT1,FS_BOLD);
$txt->Pos(0.5,0.97,'center','bottom');
$txt->SetBox('yellow','black');
$graph->AddText($txt);

+

+

+

 

 

+function SetColor($aColor) +
+ +Set text color

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specify color for text 
+ +

Example

+$txt->SetColor('darkblue'); +
+

+

 

 

+function SetCSIMTarget($aTarget,$aAlt) +
+ +Specify CSIM Target for text

+ + + + + + +
ArgumentDefaultDescription
+$aTarget + + Target URL
+$aAlt + + +null +Alt-tag text
+ +

Description
Specify Client Side Image Target for text 
+ +

Example

+$graph->title->SetCSIMTarget('mainpage.html','Go to main page');
+

+

+

 

 

+function SetFont($aFamily,$aStyle,$aSize) +
+ +Specify font

+ + + + + + + + +
ArgumentDefaultDescription
+$aFamily + + Font family
+$aStyle + + +FS_NORMAL +Font style
+$aSize + + +10 +Font size
+ +

Description
Specify font family, size and style. Two major types of font families can be used, builtin bitmnapped fonts or TTF fonts. The builtin fonts have a fixed size which can't be altered. + +Valid styles are + + +Valid values for the internal font families are + + +Note: FF_FONT0 only suppor font style FS_NORMAL + +The available TTF are by default +
+  
See also
Image::StrokeText +

Example

+$txt->SetFont(FF_ARIAL, FS_BOLD, 14); +
+

+

 

 

+function SetMargin($aMarg) +
+ +Set the contect sensiive margin

+ + + + +
ArgumentDefaultDescription
+$aMarg + + Margin in pixels
+ +

Description
Specify a context sensitive margin for the text. Depending on in which context the text is used the margin will be interpretated accordingly. 
+ +

Example

+// Start further away from the top of graph
$graph->title->SetMargin(15);
+

+

+

 

 

+function SetOrientation($aDirection) +
+ +Deprecated. Use SetAngle instead. Specify text angle

+ + + + +
ArgumentDefaultDescription
+$aDirection + + +0 +Orientation of text in degrees
+ +

Description
Deprecated. Use SetAngle() instead. +Specify Orientation of text. If TTF fonts are used then the orientation can be a arbitrary angle. If the builtin fonts are used then only horizontal and vertical position can be used, i.e 0 or 90 degrees, 
+ +

Example

+$txt->SetOrientation(90); // Vertical text +
+

+

 

 

+function SetParagraphAlign($aAlign) +
+ +Specifies the alignment for a multi line text

+ + + + +
ArgumentDefaultDescription
+$aAlign + + Horizontal alignment
+ +

Description
Determines how a multi-line text paragraph will be formatted. Each line in the paragraph will be treated individually. Allowed values are +
    +
  1. "center" +
  2. "left" +
  3. "right" +
+ +Note: Paragraph alignment is only applicable to horizontal text, i.e. angle = 0 . For paragraphs at an angle the alignbment will always be "left". + 
+ +

Example

+$graph->title->Set("Multi line\ntext !");
$graph->title->SetParagraphAlign('right');

// Default for title is "center"
+

+

+

 

 

+function SetPos($aXAbsPos,$aYAbsPos,$aHAlign,$aVAlign) +
+ +Alias for Pos()

+ + + + + + + + + + +
ArgumentDefaultDescription
+$aXAbsPos + + +0 +X position
+$aYAbsPos + + +0 +Y position
+$aHAlign + + +"left" +Horizontal align
+$aVAlign + + +"top" +Vertical align
+ +

Description
Alias for Pos() 
+  
See also
Text::Pos +

Example

+$txt->Pos(100,150,'center'); +
+

+

 

 

+function SetScalePos($aX,$aY) +
+ +Specify the position of the text using the plot scale positions

+ + + + + + +
ArgumentDefaultDescription
+$aX + + X-position
+$aY + + Y-position
+ +

Description
Specify the position of the text using the plot scale positions. The Y position is taken to be the Y axis. It is not possible to use Y2 scale to specify the position. 
+ +

Example

+$txt = new Text();
$txt->SetScalePos(27.3, 278.9);
+

+

+

 

 

+function SetShadow($aShadowColor,$aShadowWidth) +
+ +Add a drop shadow to boxed text

+ + + + + + +
ArgumentDefaultDescription
+$aShadowColor + + +'darkgray' +Shadow color
+$aShadowWidth + + +3 +Shadow width (in pixels)
+ +

Description
If the text has been boxed (by call to SetBox()) then you can easily add a drop shadow by just calling this method. +

+Note: You can also specify the shadow directly in the SetBox() call. This method was added to make Text more like other graph objects which have a SetShadow() method. 
+  

See also
Text::SetBox +

Example

+$txt = new Text("Note: Simple textnote.\nWIth two lines");
$txt->SetFont(FF_FONT1,FS_BOLD);
$txt->Pos(0.5,0.97,'center','bottom');
$txt->SetBox('yellow','black');
$txt->SetShadow();
$graph->AddText($txt);
+

+

+

 

 

+function SetWordWrap($aCol) +
+ +Specify a maximum line length

+ + + + +
ArgumentDefaultDescription
+$aCol + + Number of chars in column
+ +

Description
Specify a maximum line length. This method will insert suitable line breaks to ensure thateach line never exeeds the specified number of characters. The method will not break words. 
+ +

Example

+$txt = new Text('A suitable long text which will be broken');
$txt->SetWordWrap(15);
+

+

+

 

 

+function Show($aShow) +
+ +Show or hide the text string

+ + + + +
ArgumentDefaultDescription
+$aShow + + +true +True=Display text
+ +

Description
Show or hide the text string. By default the text string is turned off. So a call to Show() is becessary for the text string to be displayed in the graph. + 
+ +

Example

+$txt->Show();
+

+

+

 

 

+function Text($aTxt,$aXAbsPos,$aYAbsPos) +
+ +Constructor. Create new text at absolute pixel coordinates

+ + + + + + + + +
ArgumentDefaultDescription
+$aTxt + + +'' +Text string
+$aXAbsPos + + +0 +X-coordinate
+$aYAbsPos + + +0 +Y-coordinate
+ +

Description
Create a new object to repesent a text string that is to be displayed on the graph. + +If the position is not specified when the object is created it can later be specified with a call to the Pos() method. + +The default alignment is to interpret the x,y coordinate as being the lower left corner of the bounding box for the text string. + +Note. The texts are hidden by default and you must remember toi call Show() to make the text appear in the image. 
+  
See also
Text::Pos, Text::Set, Text::ParagraphAlign and Text::Show +

Example

+// Possible creations of text objects

// Case 1. Text and position is specified later
$txt = new Text();

// Case 2. Position is specified later
$txt = new Text('Hello world');

// Case 3. Full specification
$txt = new Text('Hello world',100,150);

// A more real life example
$txt = new Text("Note: Simple textnote.\nWIth two lines");
$txt->SetFont(FF_FONT1,FS_BOLD);
$txt->Pos(0.5,0.97,'center','bottom');
$txt->SetBox('yellow','black');
$graph->AddText($txt);



+

+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/TextProperty.html b/html/includes/jpgraph/docs/ref/TextProperty.html new file mode 100644 index 0000000000..f2fcbd8797 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/TextProperty.html @@ -0,0 +1,189 @@ +


CLASS TextProperty
+(Defined in: jpgraph_gantt.php : 1501)
 TextProperty 
 Align() 
Set() 
SetAlign() 
SetColor() 
SetFont() 
Show() 
+
 

Class usage and Overview
This is very similair to Text but this is only used as an internal helper class in Gantt chart. In comparison with text it has the added funtionality that it can handle tabs. + +In the next version of JpGraph the extra functionality that this class has should be added to the real class Text() to make the class more orthogonal. + +Since this is just an internal helper class it has its justified position though. This was oroginally considered a very experimental text class and it made sence to compartmetn thath functionlity in a separate class to the stnadard Text() class. +

  +

See also related classes:
Text

 


Class Methods

+

 

 

+function Align($aHAlign,$aVAlign) +
+ +Specify vertical and horizontal alignment

+ + + + + + +
ArgumentDefaultDescription
+$aHAlign + + Horizontal alignment
+$aVAlign + + +"bottom" +Vertical alignment
+ +

Description
Specify the anchor point fo the text. The anchor point determines how the texts x,y positions should be interpretated. + 
+

+

 

 

+function Set($aTxt) +
+ +Specify text string

+ + + + +
ArgumentDefaultDescription
+$aTxt + + Text string
+ +

Description
Specify text string 
+ +

Example

+$graph->title->Set("Overview for year 2002");
+

+

+

 

 

+function SetAlign($aHAlign,$aVAlign) +
+ +Specify alignment for text

+ + + + + + +
ArgumentDefaultDescription
+$aHAlign + + Horizontal alignment
+$aVAlign + + +"bottom" +Vertical alignment
+ +

Description
Specify alignment for text. Same as TextProperty::Align() 
+  
See also
TextProperty::Align

+

 

 

+function SetColor($aColor) +
+ +Set text color

+ + + + +
ArgumentDefaultDescription
+$aColor + + Color
+ +

Description
Specify text color 
+ +

Example

+SetColor('red:0.6'); +
+

+

 

 

+function SetFont($aFFamily,$aFStyle,$aFSize) +
+ +Specify font

+ + + + + + + + +
ArgumentDefaultDescription
+$aFFamily + + Font family
+$aFStyle + + +FS_NORMAL +Font style
+$aFSize + + +10 +Font size
+ +

Description
Specify font family, size and style. Two major types of font families can be used, builtin bitmnapped fonts or TTF fonts. The builtin fonts have a fixed size which can't be altered. + +Valid styles are + + +Valid values for the internal font families are + + +Note: FF_FONT0 only suppor font style FS_NORMAL + +The available TTF are by default +
+  
See also
Image::StrokeText +

Example

+SetFont(FF_ARIAL,FS_NORMAL,12) +
+

+

 

 

+function Show($aShow) +
+ +Unhide/hide the text

+ + + + +
ArgumentDefaultDescription
+$aShow + + +true +True=Show text
+ +

Description
Specify if the text should be displayed or hidden 
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/Ticks.html b/html/includes/jpgraph/docs/ref/Ticks.html new file mode 100644 index 0000000000..3855d6c170 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/Ticks.html @@ -0,0 +1,306 @@ +


CLASS Ticks
+(Defined in: jpgraph.php : 3942)
 Ticks 
 Set() 
SetColor() 
SetFormatCallback() 
SetLabelFormat() 
SetSide() 
SetSize() 
SetWeight() 
SupressFirst() 
SupressLast() 
SupressMinorTickMarks() 
SupressTickMarks() 
SupressZeroLabel() 
+
 

Class usage and Overview
This is the abstract base class for ticks. Specifying the common signature for both linear and logartihmic ticks. + +Ticks are normally a property of the scale and can be accessed via the $graph->scale->ticks property. +

  +


Class Methods

+

 

 

+function Set($aMaj,$aMin) +
+ +Set the distance between major and minor tick marks

+ + + + + + +
ArgumentDefaultDescription
+$aMaj + + Distance (world coordinates) for major tick marks
+$aMin + + Distance (world coordinates) for minor tick marks
+ +

Description
Set the distance between major and minor tick marks. Note that when the scale is specified manually then the tick marks must also be specified manually. 
+  
See also
Graph::SetScale +

Example

+$graph->yaxis->scale->ticks->Set(10,5);
+

+

+

 

 

+function SetColor($aMajorColor,$aMinorColor) +
+ +Set color for tick marks

+ + + + + + +
ArgumentDefaultDescription
+$aMajorColor + + Major tick mark color
+$aMinorColor + + +"" +Minor tick mark color
+ +

Description
Specify tick mark colors. If no minor tick mark color is specified then it will be the same as the major tick marks color. 
+ +

Example

+$graph->yaxis->scale->ticks->SetColor('red','black');
+

+

+

 

 

+function SetFormatCallback($aCallbackFuncName) +
+ +Specify a format callback function for labels

+ + + + +
ArgumentDefaultDescription
+$aCallbackFuncName + + name of function
+ +

Description
Specifies a callback function which will be called and given each tick label in turn as the argument. The callback function is supposed to return a proper formatted label to be displayed. + +Note: There is a shortcut to this method through the Axis::SetLabelFormatCallback. + +Note 2: The PHP function number_format() is often usefull in callback functions. + 
+  
See also
Axis::SetLabelFormatCallback +

Example

+// Callback function for Y-scale. Use money format with
// a ',' to separate 1000:s
function yScaleCallback($aVal) {
    return number_format($aVal);
}


// Short for $graph->yaxis->scale->ticks->SetFormatCallback()
$graph->yaxis->SetLabelFormatCallback('yScaleCallback');

+

+

+

 

 

+function SetLabelFormat($aFormatString,$aDate) +
+ +Set format string for automatic labels

+ + + + + + +
ArgumentDefaultDescription
+$aFormatString + + Specify a printf() style format string
+$aDate + + +FALSE +No description available
+ +

Description
Specify a printf() style format string. + +Note: Can also be called trough the shortcut Axis::SetLabelFormatString() + 
+  
See also
Ticks::SetFormatCallback +

Example

+$graph->yaxis->SetLabelFormatString("%-02.1f"); +
+

+

 

 

+function SetSide($aSide) +
+ +Specify side of axis for ticks

+ + + + +
ArgumentDefaultDescription
+$aSide + + Side
+ +

Description
Synonym for SetDirection(). +Specify what side of the axis the tick marks should be drawn on. For Y -axis the possible directions are + + + +and for X-axis the possible parameters are + + 
+  
See also
Axis::SetTickSide, Axis::SetLabelSide and Axis::SetTitleSide +

Example

+$graph->xaxis->scale->ticks->SetSide(SIDE_UP);
+

+

+

 

 

+function SetSize($aMajSize,$aMinSize) +
+ +Specify absolute size of tick marks in pixels

+ + + + + + +
ArgumentDefaultDescription
+$aMajSize + + Major tick size
+$aMinSize + + +3 +Minor tick size
+ +

Description
Specify absolute size of tick marks in pixels 
+ +

Example

+$graph->xaxis->scale->ticks->SetSize(8,3); +
+

+

 

 

+function SetWeight($aWeight) +
+ +Specify width of tick marks

+ + + + +
ArgumentDefaultDescription
+$aWeight + + Width (in pixels)
+ +

Description
Specify width of tick marks 
+ +

Example

+$graph->xaxis->scale->ticks->SetWeight(2); +
+

+

 

 

+function SupressFirst($aHide) +
+ +Hide the first tick mark

+ + + + +
ArgumentDefaultDescription
+$aHide + + +true +True=Hide the vbery first tick mark on the axis
+ +

Description
Hide the first tick mark on the axis. 
+  
See also
Ticks::SupressLast +

Example

+$graph->xaxis->scale->ticks->SupressFirst();
+

+

+

 

 

+function SupressLast($aHide) +
+ +Hide the last tick mark

+ + + + +
ArgumentDefaultDescription
+$aHide + + +true +True=Hide the last tick mark
+ +

Description
Hide the last tick mark on the axis 
+  
See also
Ticks::SupressFirst

+

 

 

+function SupressMinorTickMarks($aHide) +
+ +Hide all minor tick marks

+ + + + +
ArgumentDefaultDescription
+$aHide + + +true +True=Hide minor tick marks
+ +

Description
Hide all minor tick marks 
+

+

 

 

+function SupressTickMarks($aHide) +
+ +Hide major tick marks

+ + + + +
ArgumentDefaultDescription
+$aHide + + +true +True=Hide major tick marks
+ +

Description
Hide major tick marks 
+  
See also
Ticks::SupressMinorTickMarks

+

 

 

+function SupressZeroLabel($aFlag) +
+ +Don't display the first zero label

+ + + + +
ArgumentDefaultDescription
+$aFlag + + +true +True=Hide zero-label
+ +

Description
Hide any label with numeric value == 0.0 
+


\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/class_toc.html b/html/includes/jpgraph/docs/ref/class_toc.html new file mode 100644 index 0000000000..1ba80cd4e5 --- /dev/null +++ b/html/includes/jpgraph/docs/ref/class_toc.html @@ -0,0 +1,618 @@ +JpGraph

+
1. AccBarPlot
+    1.1 AccBarPlot
+    1.2 Max
+    1.3 Min
+2. AccLinePlot
+    2.1 AccLinePlot
+    2.2 Max
+    2.3 Min
+    2.4 SetInterpolateMode
+3. AntiSpam
+    3.1 AntiSpam
+    3.2 Rand
+    3.3 Set
+    3.4 Stroke
+4. Axis
+    4.1 Hide
+    4.2 HideFirstLastLabel
+    4.3 HideFirstTickLabel
+    4.4 HideLabels
+    4.5 HideLastTickLabel
+    4.6 HideLine
+    4.7 HideTicks
+    4.8 HideZeroLabel
+    4.9 SetColor
+    4.10 SetFont
+    4.11 SetLabelAlign
+    4.12 SetLabelAngle
+    4.13 SetLabelFormat
+    4.14 SetLabelFormatCallback
+    4.15 SetLabelFormatString
+    4.16 SetLabelMargin
+    4.17 SetLabelPos
+    4.18 SetLabelSide
+    4.19 SetMajTickPositions
+    4.20 SetPos
+    4.21 SetPosAbsDelta
+    4.22 SetTextLabelInterval
+    4.23 SetTextTickInterval
+    4.24 SetTextTicks
+    4.25 SetTickDirection
+    4.26 SetTickLabelMargin
+    4.27 SetTickLabels
+    4.28 SetTickPositions
+    4.29 SetTickSide
+    4.30 SetTitle
+    4.31 SetTitleMargin
+    4.32 SetTitleSide
+    4.33 SetWeight
+5. BarPlot
+    5.1 BarPlot
+    5.2 SetAbsWidth
+    5.3 SetAlign
+    5.4 SetFillColor
+    5.5 SetFillGradient
+    5.6 SetNoFill
+    5.7 SetPattern
+    5.8 SetShadow
+    5.9 SetValuePos
+    5.10 SetWidth
+    5.11 SetYBase
+    5.12 SetYMin
+6. Bezier
+    6.1 Bezier
+    6.2 Get
+7. BoxPlot
+    7.1 BoxPlot
+    7.2 SetMedianColor
+8. CanvasGraph
+    8.1 CanvasGraph
+    8.2 InitFrame
+    8.3 Stroke
+9. CanvasRectangleText
+    9.1 CanvasRectangleText
+    9.2 ParagraphAlign
+    9.3 Pos
+    9.4 Set
+    9.5 SetAutoMargin
+    9.6 SetColor
+    9.7 SetCornerRadius
+    9.8 SetFillColor
+    9.9 SetFont
+    9.10 SetFontColor
+    9.11 SetPos
+    9.12 SetShadow
+    9.13 SetTxt
+    9.14 Stroke
+10. CanvasScale
+    10.1 CanvasScale
+    10.2 Set
+    10.3 Translate
+    10.4 TranslateX
+    10.5 TranslateY
+11. DateLocale
+    11.1 DateLocale
+    11.2 GetDayAbb
+    11.3 GetLongMonthName
+    11.4 GetMonth
+    11.5 GetShortDay
+    11.6 GetShortMonth
+    11.7 GetShortMonthName
+    11.8 Set
+12. DateScale
+    12.1 AdjustForDST
+    12.2 SetDateAlign
+    12.3 SetDateFormat
+    12.4 SetTimeAlign
+13. DigitalLED74
+    13.1 DigitalLED74
+    13.2 SetSupersampling
+    13.3 StrokeNumber
+14. DisplayValue
+    14.1 HideZero
+    14.2 SetAlign
+    14.3 SetAngle
+    14.4 SetColor
+    14.5 SetFont
+    14.6 SetFormat
+    14.7 SetFormatCallback
+    14.8 SetMargin
+    14.9 Show
+15. ErrMsgText
+16. ErrorLinePlot
+    16.1 ErrorLinePlot
+17. ErrorPlot
+    17.1 ErrorPlot
+18. FieldArrow
+    18.1 SetColor
+    18.2 SetSize
+19. FieldPlot
+    19.1 FieldPlot
+    19.2 SetCallback
+20. Footer
+21. FuncGenerator
+    21.1 E
+    21.2 FuncGenerator
+22. GanttActivityInfo
+    22.1 Hide
+    22.2 SetBackgroundColor
+    22.3 SetColor
+    22.4 SetColTitles
+    22.5 SetColumnMargin
+    22.6 SetFont
+    22.7 SetFontColor
+    22.8 SetHeaderAlign
+    22.9 SetStyle
+    22.10 Show
+23. GanttBar
+    23.1 GanttBar
+    23.2 SetColor
+    23.3 SetFillColor
+    23.4 SetHeight
+    23.5 SetPattern
+    23.6 SetShadow
+24. GanttGraph
+    24.1 Add
+    24.2 CreateSimple
+    24.3 GanttGraph
+    24.4 SetDateRange
+    24.5 SetLabelVMarginFactor
+    24.6 SetSimpleFont
+    24.7 SetSimpleStyle
+    24.8 SetVMarginFactor
+    24.9 ShowHeaders
+    24.10 Stroke
+25. GanttPlotObject
+    25.1 SetCaptionMargin
+    25.2 SetConstrain
+    25.3 SetCSIMAlt
+    25.4 SetCSIMTarget
+    25.5 SetLabelLeftMargin
+26. GanttScale
+    26.1 SetDateLocale
+    26.2 SetRange
+    26.3 SetTableTitleBackground
+    26.4 SetVertLayout
+    26.5 SetWeekStart
+    26.6 UseWeekendBackground
+27. GanttVLine
+    27.1 GanttVLine
+    27.2 SetDayOffset
+    27.3 SetTitleMargin
+28. Graph
+    28.1 Add
+    28.2 AddBand
+    28.3 AddLine
+    28.4 AddText
+    28.5 AddY
+    28.6 AddY2
+    28.7 CheckCSIMCache
+    28.8 GetHTMLImageMap
+    28.9 Graph
+    28.10 Set3DPerspective
+    28.11 Set90AndMargin
+    28.12 SetAlphaBlending
+    28.13 SetAngle
+    28.14 SetAxisLabelBackground
+    28.15 SetAxisStyle
+    28.16 SetBackgroundCFlag
+    28.17 SetBackgroundCountryFlag
+    28.18 SetBackgroundGradient
+    28.19 SetBackgroundImage
+    28.20 SetBackgroundImageMix
+    28.21 SetBox
+    28.22 SetClipping
+    28.23 SetColor
+    28.24 SetCSIMImgAlt
+    28.25 SetFrame
+    28.26 SetFrameBevel
+    28.27 SetGridDepth
+    28.28 SetIconDepth
+    28.29 SetImgFormat
+    28.30 SetMargin
+    28.31 SetMarginColor
+    28.32 SetScale
+    28.33 SetShadow
+    28.34 SetTextScaleAbsCenterOff
+    28.35 SetTickDensity
+    28.36 SetTitleBackground
+    28.37 SetTitleBackgroundFillStyle
+    28.38 SetY2OrderBack
+    28.39 SetY2Scale
+    28.40 SetYDeltaDist
+    28.41 SetYScale
+    28.42 Stroke
+    28.43 StrokeCSIM
+    28.44 StrokeFrameBackground
+29. GraphTabTitle
+    29.1 Set
+    29.2 SetColor
+    29.3 SetCorner
+    29.4 SetFillColor
+    29.5 SetPos
+    29.6 SetTabAlign
+    29.7 SetWidth
+30. Grid
+    30.1 SetColor
+    30.2 SetFill
+    30.3 SetLineStyle
+    30.4 SetWeight
+    30.5 Show
+31. GroupBarPlot
+    31.1 GroupBarPlot
+32. GTextTable
+    32.1 GTextTable
+    32.2 Init
+    32.3 MergeCells
+    32.4 MergeCol
+    32.5 MergeRow
+    32.6 Set
+    32.7 SetAlign
+    32.8 SetAnchorPos
+    32.9 SetBorder
+    32.10 SetCellAlign
+    32.11 SetCellColor
+    32.12 SetCellCountryFlag
+    32.13 SetCellCSIMTarget
+    32.14 SetCellFillColor
+    32.15 SetCellFont
+    32.16 SetCellImage
+    32.17 SetCellImageConstrain
+    32.18 SetCellNumberFormat
+    32.19 SetCellPadding
+    32.20 SetColAlign
+    32.21 SetColColor
+    32.22 SetColFillColor
+    32.23 SetColFont
+    32.24 SetColGrid
+    32.25 SetColImage
+    32.26 SetColNumberFormat
+    32.27 SetColor
+    32.28 SetColPadding
+    32.29 SetCSIMTarget
+    32.30 SetFillColor
+    32.31 SetFont
+    32.32 SetGrid
+    32.33 SetImage
+    32.34 SetMinColWidth
+    32.35 SetMinRowHeight
+    32.36 SetNumberFormat
+    32.37 SetPadding
+    32.38 SetPos
+    32.39 SetRowAlign
+    32.40 SetRowColor
+    32.41 SetRowFillColor
+    32.42 SetRowFont
+    32.43 SetRowGrid
+    32.44 SetRowImage
+    32.45 SetRowNumberFormat
+    32.46 SetRowPadding
+    32.47 SetScalePos
+    32.48 toString
+33. HeaderProperty
+    33.1 SetBackgroundColor
+    33.2 SetFont
+    33.3 SetFontColor
+    33.4 SetFormatString
+    33.5 SetFrameColor
+    33.6 SetFrameWeight
+    33.7 SetIntervall
+    33.8 SetLabelFormatString
+    33.9 SetStyle
+    33.10 SetSundayFontColor
+    33.11 SetTitleVertMargin
+    33.12 SetWeekendColor
+34. HorizontalGridLine
+    34.1 SetRowFillColor
+    34.2 SetStart
+    34.3 Show
+35. IconImage
+    35.1 IconImage
+    35.2 SetAlign
+36. IconPlot
+    36.1 IconPlot
+    36.2 SetAnchor
+    36.3 SetCountryFlag
+    36.4 SetMix
+    36.5 SetPos
+    36.6 SetScale
+37. Image
+    37.1 RoundedRectangle
+    37.2 SetAlphaBlending
+    37.3 SetAntiAliasing
+    37.4 SetCanvasColor
+    37.5 SetExpired
+    37.6 SetImgFormat
+    37.7 SetMargin
+    37.8 SetQuality
+    37.9 SetTransparent
+38. Legend
+    38.1 Hide
+    38.2 Pos
+    38.3 SetAbsPos
+    38.4 SetColor
+    38.5 SetColumns
+    38.6 SetFillColor
+    38.7 SetFont
+    38.8 SetFrameWeight
+    38.9 SetHColMargin
+    38.10 SetLayout
+    38.11 SetLeftMargin
+    38.12 SetLineSpacing
+    38.13 SetLineWeight
+    38.14 SetMarkAbsHSize
+    38.15 SetMarkAbsSize
+    38.16 SetMarkAbsVSize
+    38.17 SetPos
+    38.18 SetReverse
+    38.19 SetShadow
+    38.20 SetVColMargin
+39. LinearScale
+    39.1 SetAutoMax
+    39.2 SetAutoMin
+    39.3 SetAutoTicks
+    39.4 SetGrace
+40. LinearTicks
+    40.1 AdjustForDST
+    40.2 GetMajor
+    40.3 GetMinor
+    40.4 Set
+    40.5 SetMajTickPositions
+    40.6 SetTextLabelStart
+    40.7 SetTickPositions
+41. LineErrorPlot
+    41.1 LineErrorPlot
+42. LinePlot
+    42.1 AddArea
+    42.2 LinePlot
+    42.3 SetBarCenter
+    42.4 SetColor
+    42.5 SetFastStroke
+    42.6 SetFillColor
+    42.7 SetFillFromYMin
+    42.8 SetFillGradient
+    42.9 SetStepStyle
+    42.10 SetStyle
+43. LineProperty
+    43.1 SetColor
+    43.2 SetStyle
+    43.3 SetWeight
+    43.4 Show
+44. LogScale
+    44.1 GetMaxVal
+    44.2 GetMinVal
+45. LogTicks
+    45.1 SetLabelLogType
+46. MileStone
+    46.1 MileStone
+47. PieGraph
+    47.1 Add
+    47.2 PieGraph
+    47.3 SetAntiAliasing
+    47.4 SetColor
+    47.5 Stroke
+48. PiePlot
+    48.1 Explode
+    48.2 ExplodeAll
+    48.3 ExplodeSlice
+    48.4 PiePlot
+    48.5 SetCenter
+    48.6 SetColor
+    48.7 SetCSIMTargets
+    48.8 SetFont
+    48.9 SetFontColor
+    48.10 SetGuideLines
+    48.11 SetGuideLinesAdjust
+    48.12 SetLabelPos
+    48.13 SetLabels
+    48.14 SetLabelType
+    48.15 SetLegends
+    48.16 SetShadow
+    48.17 SetSize
+    48.18 SetSliceColors
+    48.19 SetStartAngle
+    48.20 SetTheme
+    48.21 SetValueType
+    48.22 ShowBorder
+49. PiePlot3D
+    49.1 PiePlot3d
+    49.2 SetAngle
+    49.3 SetCSIMTargets
+    49.4 SetEdge
+    49.5 SetHeight
+    49.6 SetLabelMargin
+    49.7 SetLabels
+    49.8 SetLegends
+    49.9 SetSliceColors
+    49.10 SetStartAngle
+    49.11 ShowBorder
+50. PiePlotC
+    50.1 PiePlotC
+    50.2 SetMid
+    50.3 SetMidColor
+    50.4 SetMidCSIM
+    50.5 SetMidSize
+    50.6 SetMidTitle
+51. Plot
+    51.1 HideLegend
+    51.2 SetCenter
+    51.3 SetColor
+    51.4 SetCSIMTargets
+    51.5 SetLegend
+    51.6 SetLineWeight
+52. PlotBand
+    52.1 PlotBand
+    52.2 SetDensity
+    52.3 SetOrder
+    52.4 ShowFrame
+53. PlotLine
+    53.1 HideLegend
+    53.2 PlotLine
+    53.3 SetColor
+    53.4 SetDirection
+    53.5 SetLegend
+    53.6 SetPosition
+    53.7 SetWeight
+54. PlotMark
+    54.1 Hide
+    54.2 SetCallback
+    54.3 SetCallbackYX
+    54.4 SetColor
+    54.5 SetDefaultWidth
+    54.6 SetFillColor
+    54.7 SetSize
+    54.8 SetType
+    54.9 SetWeight
+    54.10 SetWidth
+    54.11 Show
+55. PolarAxis
+    55.1 HideTicks
+    55.2 SetAngleFont
+    55.3 SetAngleStep
+    55.4 SetColor
+    55.5 SetGridColor
+    55.6 SetTickColors
+    55.7 ShowAngleDegreeMark
+    55.8 ShowAngleLabel
+    55.9 ShowGrid
+56. PolarGraph
+    56.1 PolarGraph
+    56.2 Set90AndMargin
+    56.3 SetDensity
+    56.4 SetPlotSize
+    56.5 SetScale
+    56.6 SetType
+    56.7 Stroke
+57. PolarPlot
+    57.1 PolarPlot
+    57.2 SetColor
+    57.3 SetCSIMTargets
+    57.4 SetFillColor
+    57.5 SetLegend
+    57.6 SetWeight
+58. Progress
+    58.1 Set
+    58.2 SetFillColor
+    58.3 SetPattern
+59. RadarAxis
+60. RadarGraph
+    60.1 Add
+    60.2 HideTickMarks
+    60.3 RadarGraph
+    60.4 SetCenter
+    60.5 SetColor
+    60.6 SetPlotSize
+    60.7 SetPos
+    60.8 SetScale
+    60.9 SetSize
+    60.10 SetTickDensity
+    60.11 SetTitles
+    60.12 ShowMinorTickmarks
+    60.13 Stroke
+    60.14 SupressTickMarks
+61. RadarGrid
+62. RadarLinearTicks
+63. RadarLogTicks
+64. RadarPlot
+    64.1 RadarPlot
+    64.2 SetColor
+    64.3 SetFill
+    64.4 SetFillColor
+    64.5 SetLegend
+    64.6 SetLineStyle
+    64.7 SetLineWeight
+65. RotImage
+    65.1 SetAngle
+    65.2 SetCenter
+    65.3 SetMargin
+    65.4 SetTranslation
+66. ScatterPlot
+    66.1 ScatterPlot
+    66.2 SetImpuls
+    66.3 SetLinkPoints
+67. Shape
+    67.1 Bezier
+    67.2 Circle
+    67.3 FilledCircle
+    67.4 FilledPolygon
+    67.5 FilledRectangle
+    67.6 FilledRoundedRectangle
+    67.7 IndentedRectangle
+    67.8 Line
+    67.9 Polygon
+    67.10 Rectangle
+    67.11 RoundedRectangle
+    67.12 SetColor
+    67.13 SetTextAlign
+    67.14 ShadowRectangle
+    67.15 Shape
+68. Spline
+    68.1 Get
+    68.2 Spline
+69. StockPlot
+    69.1 HideEndLines
+    69.2 SetColor
+    69.3 SetWidth
+    69.4 StockPlot
+70. SuperScriptText
+    70.1 FromReal
+    70.2 GetFontHeight
+    70.3 GetTextHeight
+    70.4 GetWidth
+    70.5 Set
+    70.6 SetSuperFont
+    70.7 SuperScriptText
+71. Text
+    71.1 Align
+    71.2 Center
+    71.3 GetFontHeight
+    71.4 GetTextHeight
+    71.5 GetWidth
+    71.6 Hide
+    71.7 ParagraphAlign
+    71.8 Pos
+    71.9 Set
+    71.10 SetAlign
+    71.11 SetAngle
+    71.12 SetBox
+    71.13 SetColor
+    71.14 SetCSIMTarget
+    71.15 SetFont
+    71.16 SetMargin
+    71.17 SetOrientation
+    71.18 SetParagraphAlign
+    71.19 SetPos
+    71.20 SetScalePos
+    71.21 SetShadow
+    71.22 SetWordWrap
+    71.23 Show
+    71.24 Text
+72. TextProperty
+    72.1 Align
+    72.2 Set
+    72.3 SetAlign
+    72.4 SetColor
+    72.5 SetFont
+    72.6 Show
+73. Ticks
+    73.1 Set
+    73.2 SetColor
+    73.3 SetFormatCallback
+    73.4 SetLabelFormat
+    73.5 SetSide
+    73.6 SetSize
+    73.7 SetWeight
+    73.8 SupressFirst
+    73.9 SupressLast
+    73.10 SupressMinorTickMarks
+    73.11 SupressTickMarks
+    73.12 SupressZeroLabel
+

\ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/index.html b/html/includes/jpgraph/docs/ref/index.html new file mode 100644 index 0000000000..40b98a967d --- /dev/null +++ b/html/includes/jpgraph/docs/ref/index.html @@ -0,0 +1,10 @@ + + + + Project documentation + + + ; + + + \ No newline at end of file diff --git a/html/includes/jpgraph/docs/ref/projinfo.html b/html/includes/jpgraph/docs/ref/projinfo.html new file mode 100644 index 0000000000..88127dd5ab --- /dev/null +++ b/html/includes/jpgraph/docs/ref/projinfo.html @@ -0,0 +1,5 @@ +
JpGraph
+

Documentation status: 98%

Total number of Classes: 106, Methods: 1065

+This version does not include private methods & classes

Generated at 18 Mar 2007 at 13:32
+


+JpGraph is a fully OO graph drawing library for PHP.

This software library is released under QPL 1.0

© 2002 - 2005 Aditus Consulting. All rights reserved.

\ No newline at end of file diff --git a/html/includes/jpgraph/docs/reference.png b/html/includes/jpgraph/docs/reference.png new file mode 100644 index 0000000000..e23dfc099e Binary files /dev/null and b/html/includes/jpgraph/docs/reference.png differ diff --git a/html/includes/jpgraph/src/Examples/accbarex1.php b/html/includes/jpgraph/src/Examples/accbarex1.php new file mode 100644 index 0000000000..2af8062a3b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/accbarex1.php @@ -0,0 +1,40 @@ +SetScale("textlin"); + +$graph->SetShadow(); +$graph->img->SetMargin(40,30,20,40); + +// Create the bar plots +$b1plot = new BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$b1plot->value->Show(); +$b2plot = new BarPlot($data2y); +$b2plot->SetFillColor("blue"); +$b2plot->value->Show(); + +// Create the grouped bar plot +$gbplot = new AccBarPlot(array($b1plot,$b2plot)); + +// ...and add it to the graPH +$graph->Add($gbplot); + +$graph->title->Set("Accumulated bar plots"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/alphabarex1.php b/html/includes/jpgraph/src/Examples/alphabarex1.php new file mode 100644 index 0000000000..335b52a40e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/alphabarex1.php @@ -0,0 +1,75 @@ +SetScale("textlin"); +$graph->img->SetMargin(40,80,30,40); + +// Adjust the position of the legend box +$graph->legend->Pos(0.02,0.15); + +// Adjust the color for theshadow of the legend +$graph->legend->SetShadow('darkgray@0.5'); +$graph->legend->SetFillColor('lightblue@0.3'); + +// Get localised version of the month names +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +// Set a nice summer (in Stockholm) image +$graph->SetBackgroundImage('stship.jpg',BGIMG_COPY); + +// Set axis titles and fonts +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetColor('white'); + +$graph->xaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->SetColor('white'); + +$graph->yaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->SetColor('white'); + +//$graph->ygrid->Show(false); +$graph->ygrid->SetColor('white@0.5'); + +// Setup graph title +$graph->title->Set('Using alpha blending with a background'); +// Some extra margin (from the top) +$graph->title->SetMargin(3); +$graph->title->SetFont(FF_ARIAL,FS_NORMAL,12); + +// Create the three var series we will combine +$bplot1 = new BarPlot($datay1); +$bplot2 = new BarPlot($datay2); +$bplot3 = new BarPlot($datay3); + +// Setup the colors with 40% transparency (alpha channel) +$bplot1->SetFillColor('orange@0.4'); +$bplot2->SetFillColor('brown@0.4'); +$bplot3->SetFillColor('darkgreen@0.4'); + +// Setup legends +$bplot1->SetLegend('Label 1'); +$bplot2->SetLegend('Label 2'); +$bplot3->SetLegend('Label 3'); + +// Setup each bar with a shadow of 50% transparency +$bplot1->SetShadow('black@0.4'); +$bplot2->SetShadow('black@0.4'); +$bplot3->SetShadow('black@0.4'); + +$gbarplot = new GroupBarPlot(array($bplot1,$bplot2,$bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); +?> + diff --git a/html/includes/jpgraph/src/Examples/antispamex01.php b/html/includes/jpgraph/src/Examples/antispamex01.php new file mode 100644 index 0000000000..f34e52ccbe --- /dev/null +++ b/html/includes/jpgraph/src/Examples/antispamex01.php @@ -0,0 +1,18 @@ +Rand(5); + +// Stroke random cahllenge +if( $spam->Stroke() === false ) { + die('Illegal or no data to plot'); +} + +?> + diff --git a/html/includes/jpgraph/src/Examples/backgroundex01.php b/html/includes/jpgraph/src/Examples/backgroundex01.php new file mode 100644 index 0000000000..b2931720ca --- /dev/null +++ b/html/includes/jpgraph/src/Examples/backgroundex01.php @@ -0,0 +1,51 @@ +img->SetMargin(40,180,40,40); +$graph->SetBackgroundImage("tiger_bkg.png",BGIMG_FILLPLOT); + +$graph->img->SetAntiAliasing("white"); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Background image"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Slightly adjust the legend from it's default position in the +// top right corner. +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Create the first line +$p1 = new LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$p1->SetLegend("Triumph Tiger -98"); +$graph->Add($p1); + +// ... and the second +$p2 = new LinePlot($data2y); +$p2->mark->SetType(MARK_STAR); +$p2->mark->SetFillColor("red"); +$p2->mark->SetWidth(4); +$p2->SetColor("red"); +$p2->SetCenter(); +$p2->SetLegend("New tiger -99"); +$graph->Add($p2); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/backgroundex02.php b/html/includes/jpgraph/src/Examples/backgroundex02.php new file mode 100644 index 0000000000..e9077433b6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/backgroundex02.php @@ -0,0 +1,51 @@ +img->SetMargin(40,180,40,40); +$graph->SetBackgroundImage("tiger_bkg.png",BGIMG_FILLFRAME); + +$graph->img->SetAntiAliasing(); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Background image"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Slightly adjust the legend from it's default position in the +// top right corner. +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Create the first line +$p1 = new LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$p1->SetLegend("Triumph Tiger -98"); +$graph->Add($p1); + +// ... and the second +$p2 = new LinePlot($data2y); +$p2->mark->SetType(MARK_STAR); +$p2->mark->SetFillColor("red"); +$p2->mark->SetWidth(4); +$p2->SetColor("red"); +$p2->SetCenter(); +$p2->SetLegend("New tiger -99"); +$graph->Add($p2); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/backgroundex03.php b/html/includes/jpgraph/src/Examples/backgroundex03.php new file mode 100644 index 0000000000..587dbd359e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/backgroundex03.php @@ -0,0 +1,51 @@ +img->SetMargin(40,180,40,40); +$graph->SetBackgroundImage("tiger_bkg.png",BGIMG_COPY); + +$graph->img->SetAntiAliasing("white"); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Background image"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Slightly adjust the legend from it's default position in the +// top right corner. +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Create the first line +$p1 = new LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$p1->SetLegend("Triumph Tiger -98"); +$graph->Add($p1); + +// ... and the second +$p2 = new LinePlot($data2y); +$p2->mark->SetType(MARK_STAR); +$p2->mark->SetFillColor("red"); +$p2->mark->SetWidth(4); +$p2->SetColor("red"); +$p2->SetCenter(); +$p2->SetLegend("New tiger -99"); +$graph->Add($p2); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/balloonex1.php b/html/includes/jpgraph/src/Examples/balloonex1.php new file mode 100644 index 0000000000..76309921ae --- /dev/null +++ b/html/includes/jpgraph/src/Examples/balloonex1.php @@ -0,0 +1,56 @@ +SetScale("linlin"); +$graph->img->SetMargin(40,100,40,40); +$graph->SetShadow(); +$graph->title->Set("Example of ballon scatter plot"); +// Use a lot of grace to get large scales +$graph->yaxis->scale->SetGrace(50,10); + +// Make sure X-axis as at the bottom of the graph +$graph->xaxis->SetPos('min'); + +// Create the scatter plot +$sp1 = new ScatterPlot($datay,$datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); + +// Uncomment the following two lines to display the values +$sp1->value->Show(); +$sp1->value->SetFont(FF_FONT1,FS_BOLD); + +// Specify the callback +$sp1->mark->SetCallback("FCallback"); + +// Setup the legend for plot +$sp1->SetLegend('Year 2002'); + +// Add the scatter plot to the graph +$graph->Add($sp1); + +// ... and send to browser +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/balloonex2.php b/html/includes/jpgraph/src/Examples/balloonex2.php new file mode 100644 index 0000000000..642e62a65e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/balloonex2.php @@ -0,0 +1,78 @@ +SetScale("intlin"); +$graph->SetMargin(40,40,40,40); +$graph->SetMarginColor('wheat'); + +$graph->title->Set("Example of ballon scatter plot with X,Y callback"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->title->SetMargin(10); + +// Use a lot of grace to get large scales since the ballon have +// size and we don't want them to collide with the X-axis +$graph->yaxis->scale->SetGrace(50,10); +$graph->xaxis->scale->SetGrace(50,10); + +// Make sure X-axis as at the bottom of the graph and not at the default Y=0 +$graph->xaxis->SetPos('min'); + +// Set X-scale to start at 0 +$graph->xscale->SetAutoMin(0); + +// Create the scatter plot +$sp1 = new ScatterPlot($datay,$datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); + +// Uncomment the following two lines to display the values +$sp1->value->Show(); +$sp1->value->SetFont(FF_FONT1,FS_BOLD); + +// Specify the callback +$sp1->mark->SetCallbackYX("FCallback"); + +// Add the scatter plot to the graph +$graph->Add($sp1); + +// ... and send to browser +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/bar2scalesex1.php b/html/includes/jpgraph/src/Examples/bar2scalesex1.php new file mode 100644 index 0000000000..4f34b28c57 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bar2scalesex1.php @@ -0,0 +1,48 @@ +title->Set('Example with 2 scale bars'); + +// Setup Y and Y2 scales with some "grace" +$graph->SetScale("textlin"); +$graph->SetY2Scale("lin"); +$graph->yaxis->scale->SetGrace(30); +$graph->y2axis->scale->SetGrace(30); + +//$graph->ygrid->Show(true,true); +$graph->ygrid->SetColor('gray','lightgray@0.5'); + +// Setup graph colors +$graph->SetMarginColor('white'); +$graph->y2axis->SetColor('darkred'); + + +// Create the "dummy" 0 bplot +$bplotzero = new BarPlot($datazero); + +// Create the "Y" axis group +$ybplot1 = new BarPlot($datay); +$ybplot1->value->Show(); +$ybplot = new GroupBarPlot(array($ybplot1,$bplotzero)); + +// Create the "Y2" axis group +$ybplot2 = new BarPlot($datay2); +$ybplot2->value->Show(); +$ybplot2->value->SetColor('darkred'); +$ybplot2->SetFillColor('darkred'); +$y2bplot = new GroupBarPlot(array($bplotzero,$ybplot2)); + +// Add the grouped bar plots to the graph +$graph->Add($ybplot); +$graph->AddY2($y2bplot); + +// .. and finally stroke the image back to browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bar_csimex1.php b/html/includes/jpgraph/src/Examples/bar_csimex1.php new file mode 100644 index 0000000000..a212c0e414 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bar_csimex1.php @@ -0,0 +1,52 @@ +SetScale("textlin"); +$graph->img->SetMargin(60,30,20,40); +$graph->yaxis->SetTitleMargin(45); +$graph->yaxis->scale->SetGrace(30); +$graph->SetShadow(); + +// Turn the tickmarks +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new BarPlot($datay); + +// Create targets for the image maps. One for each column +$targ=array("bar_clsmex1.php#1","bar_clsmex1.php#2","bar_clsmex1.php#3","bar_clsmex1.php#4","bar_clsmex1.php#5","bar_clsmex1.php#6"); +$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d"); +$bplot->SetCSIMTargets($targ,$alts); +$bplot->SetFillColor("orange"); + +// Use a shadow on the bar graphs (just use the default settings) +$bplot->SetShadow(); +$bplot->value->SetFormat(" $ %2.1f",70); +$bplot->value->SetFont(FF_ARIAL,FS_NORMAL,9); +$bplot->value->SetColor("blue"); +$bplot->value->Show(); + +$graph->Add($bplot); + +$graph->title->Set("Image maps barex1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); + + +?> diff --git a/html/includes/jpgraph/src/Examples/bar_csimex2.php b/html/includes/jpgraph/src/Examples/bar_csimex2.php new file mode 100644 index 0000000000..2645900d88 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bar_csimex2.php @@ -0,0 +1,51 @@ +SetScale("textlin"); +$graph->img->SetMargin(40,30,20,40); +$graph->SetShadow(); + +// Create the bar plots +$b1plot = new BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$targ=array("bar_clsmex2.php#1","bar_clsmex2.php#2","bar_clsmex2.php#3", +"bar_clsmex2.php#4","bar_clsmex2.php#5","bar_clsmex2.php#6"); +$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d"); +$b1plot->SetCSIMTargets($targ,$alts); + +$b2plot = new BarPlot($data2y); +$b2plot->SetFillColor("blue"); +$targ=array("bar_clsmex2.php#7","bar_clsmex2.php#8","bar_clsmex2.php#9", +"bar_clsmex2.php#10","bar_clsmex2.php#11","bar_clsmex2.php#12"); +$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d"); +$b2plot->SetCSIMTargets($targ,$alts); + +// Create the grouped bar plot +$abplot = new AccBarPlot(array($b1plot,$b2plot)); + +$abplot->SetShadow(); +$abplot->value->Show(); + +// ...and add it to the graPH +$graph->Add($abplot); + +$graph->title->Set("Image map barex2"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); + +?> diff --git a/html/includes/jpgraph/src/Examples/bar_csimex3.php b/html/includes/jpgraph/src/Examples/bar_csimex3.php new file mode 100644 index 0000000000..9d2858e22c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bar_csimex3.php @@ -0,0 +1,88 @@ +SetAngle(90); +$graph->SetScale("textlin"); + +// The negative margins are necessary since we +// have rotated the image 90 degress and shifted the +// meaning of width, and height. This means that the +// left and right margins now becomes top and bottom +// calculated with the image width and not the height. +$graph->img->SetMargin(-80,-80,210,210); + +$graph->SetMarginColor('white'); + +// Setup title for graph +$graph->title->Set('Horizontal bar graph'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->subtitle->Set("With image map\nNote: The URL just points back to this image"); + +// Setup X-axis. +$graph->xaxis->SetTitle("X-title",'center'); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetAngle(90); +$graph->xaxis->SetTitleMargin(30); +$graph->xaxis->SetLabelMargin(15); +$graph->xaxis->SetLabelAlign('right','center'); + +// Setup Y-axis + +// First we want it at the bottom, i.e. the 'max' value of the +// x-axis +$graph->yaxis->SetPos('max'); + +// Arrange the title +$graph->yaxis->SetTitle("Turnaround (mkr)",'center'); +$graph->yaxis->SetTitleSide(SIDE_RIGHT); +$graph->yaxis->title->SetFont(FF_FONT2,FS_BOLD); +$graph->yaxis->title->SetAngle(0); +$graph->yaxis->title->Align('center','top'); +$graph->yaxis->SetTitleMargin(30); + +// Arrange the labels +$graph->yaxis->SetLabelSide(SIDE_RIGHT); +$graph->yaxis->SetLabelAlign('center','top'); + +// Create the bar plots with image maps +$b1plot = new BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$targ=array("bar_clsmex2.php#1","bar_clsmex2.php#2","bar_clsmex2.php#3", + "bar_clsmex2.php#4","bar_clsmex2.php#5","bar_clsmex2.php#6"); +$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d"); +$b1plot->SetCSIMTargets($targ,$alts); + +$b2plot = new BarPlot($data2y); +$b2plot->SetFillColor("blue"); +$targ=array("bar_clsmex2.php#7","bar_clsmex2.php#8","bar_clsmex2.php#9", + "bar_clsmex2.php#10","bar_clsmex2.php#11","bar_clsmex2.php#12"); +$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d"); +$b2plot->SetCSIMTargets($targ,$alts); + +// Create the accumulated bar plot +$abplot = new AccBarPlot(array($b1plot,$b2plot)); +$abplot->SetShadow(); + +// We want to display the value of each bar at the top +$abplot->value->Show(); +$abplot->value->SetFont(FF_FONT1,FS_NORMAL); +$abplot->value->SetAlign('left','center'); +$abplot->value->SetColor("black","darkred"); +$abplot->value->SetFormat('%.1f mkr'); + +// ...and add it to the graph +$graph->Add($abplot); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); + +?> diff --git a/html/includes/jpgraph/src/Examples/barformatcallbackex1.php b/html/includes/jpgraph/src/Examples/barformatcallbackex1.php new file mode 100644 index 0000000000..b1f136feb5 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/barformatcallbackex1.php @@ -0,0 +1,30 @@ +SetScale("textlin"); + +// Create a bar plots +$bar1 = new BarPlot($data); + +// Setup the callback function +$bar1->value->SetFormatCallback("cbFmtPercentage"); +$bar1->value->Show(); + +// Add the plot to the graph +$graph->Add($bar1); + +// .. and send the graph back to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradex1.php b/html/includes/jpgraph/src/Examples/bargradex1.php new file mode 100644 index 0000000000..eb5e880a7e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradex1.php @@ -0,0 +1,47 @@ +img->SetMargin(60,20,30,50); +$graph->SetScale("textlin"); +$graph->SetMarginColor("lightblue"); +$graph->SetShadow(); + +// Set up the title for the graph +$graph->title->Set("Bar gradient (Left reflection)"); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,12); +$graph->title->SetColor("darkred"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,10); +$graph->yaxis->SetFont(FF_VERDANA,FS_NORMAL,10); + +// Show 0 label on Y-axis (default is not to show) +$graph->yscale->ticks->SupressZeroLabel(false); + +// Setup X-axis labels +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetLabelAngle(50); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy","#EEEEEE",GRAD_LEFT_REFLECTION); + +// Set color for the frame of each bar +$bplot->SetColor("white"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradex2.php b/html/includes/jpgraph/src/Examples/bargradex2.php new file mode 100644 index 0000000000..49831927d6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradex2.php @@ -0,0 +1,48 @@ +img->SetMargin(60,20,30,50); +$graph->SetScale("textlin"); +$graph->SetMarginColor("silver"); +$graph->SetShadow(); + +// Set up the title for the graph +$graph->title->Set("Example negative bars"); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,18); +$graph->title->SetColor("darkred"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,12); +$graph->xaxis->SetColor("black","red"); +$graph->yaxis->SetFont(FF_VERDANA,FS_NORMAL,11); + +// Show 0 label on Y-axis (default is not to show) +$graph->yscale->ticks->SupressZeroLabel(false); + +// Setup X-axis labels +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetLabelAngle(50); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy","steelblue",GRAD_MIDVER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradex3.php b/html/includes/jpgraph/src/Examples/bargradex3.php new file mode 100644 index 0000000000..e6992ef439 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradex3.php @@ -0,0 +1,50 @@ +img->SetMargin(60,20,30,50); +$graph->SetScale("textlin"); +$graph->SetMarginColor("silver"); +$graph->SetShadow(); + +// Set up the title for the graph +$graph->title->Set("Example negative bars"); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,16); +$graph->title->SetColor("darkred"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,10); +$graph->yaxis->SetFont(FF_VERDANA,FS_NORMAL,10); + +// Show 0 label on Y-axis (default is not to show) +$graph->yscale->ticks->SupressZeroLabel(false); + +// Setup X-axis labels +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetLabelAngle(50); + +// Set X-axis at the minimum value of Y-axis (default will be at 0) +$graph->xaxis->SetPos("min"); // "min" will position the x-axis at the minimum value of the Y-axis + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy","steelblue",GRAD_MIDVER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradex4.php b/html/includes/jpgraph/src/Examples/bargradex4.php new file mode 100644 index 0000000000..1de0a9dd42 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradex4.php @@ -0,0 +1,47 @@ +img->SetMargin(60,30,30,40); +$graph->SetScale("textlin"); +$graph->SetMarginColor("teal"); +$graph->SetShadow(); + +// Set up the title for the graph +$graph->title->Set("Bargraph with small variations"); +$graph->title->SetColor("white"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); + +// Setup color for axis and labels +$graph->xaxis->SetColor("black","white"); +$graph->yaxis->SetColor("black","white"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,10); +$graph->yaxis->SetFont(FF_VERDANA,FS_NORMAL,10); + +// Setup X-axis title (color & font) +$graph->xaxis->title->Set("X-axis"); +$graph->xaxis->title->SetColor("white"); +$graph->xaxis->title->SetFont(FF_VERDANA,FS_BOLD,10); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$tcol=array(100,100,255); +$fcol=array(255,100,100); +$bplot->SetFillGradient($fcol,$tcol,GRAD_HOR); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradex5.php b/html/includes/jpgraph/src/Examples/bargradex5.php new file mode 100644 index 0000000000..8a21307cdb --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradex5.php @@ -0,0 +1,52 @@ +img->SetMargin(60,30,30,40); +$graph->SetScale("textlin"); +$graph->SetMarginColor("teal"); +$graph->SetShadow(); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// This is how you make the bar graph start from something other than 0 +$bplot->SetYMin(0.302); + +// Setup color for gradient fill style +$tcol=array(100,100,255); +$fcol=array(255,100,100); +$bplot->SetFillGradient($fcol,$tcol,GRAD_VERT); +$bplot->SetFillColor("orange"); +$graph->Add($bplot); + +// Set up the title for the graph +$graph->title->Set("Bargraph which doesn't start from y=0"); +$graph->title->SetColor("yellow"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); + +// Setup color for axis and labels +$graph->xaxis->SetColor("black","white"); +$graph->yaxis->SetColor("black","white"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,10); +$graph->yaxis->SetFont(FF_VERDANA,FS_NORMAL,10); + +// Setup X-axis title (color & font) +$graph->xaxis->title->Set("X-axis"); +$graph->xaxis->title->SetColor("white"); +$graph->xaxis->title->SetFont(FF_VERDANA,FS_BOLD,10); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradex6.php b/html/includes/jpgraph/src/Examples/bargradex6.php new file mode 100644 index 0000000000..b5556e7df3 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradex6.php @@ -0,0 +1,51 @@ +img->SetMargin(60,150,30,50); +$graph->SetScale("textlin"); +$graph->SetMarginColor("silver"); +$graph->SetShadow(); + +// Set up the title for the graph +$graph->title->Set("Example negative bars"); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,16); +$graph->title->SetColor("darkred"); + +// Setup font for axis +$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,10); +$graph->yaxis->SetFont(FF_VERDANA,FS_NORMAL,10); + +// Show 0 label on Y-axis (default is not to show) +$graph->yscale->ticks->SupressZeroLabel(false); + +// Setup X-axis labels +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetLabelAngle(50); + +// Set X-axis at the minimum value of Y-axis (default will be at 0) +$graph->xaxis->SetPos("min"); // "min" will position the x-axis at the minimum value of the Y-axis + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); +$bplot->SetLegend("Result 1999","blue"); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy","steelblue",GRAD_MIDVER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradsmallex1.php b/html/includes/jpgraph/src/Examples/bargradsmallex1.php new file mode 100644 index 0000000000..10b60beda3 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradsmallex1.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25,15,25,25); + +$graph->title->Set('"GRAD_MIDVER"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy","lightsteelblue",GRAD_MIDVER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradsmallex2.php b/html/includes/jpgraph/src/Examples/bargradsmallex2.php new file mode 100644 index 0000000000..5761008681 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradsmallex2.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25,15,25,25); + +$graph->title->Set('"GRAD_MIDHOR"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy","lightsteelblue",GRAD_MIDHOR); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradsmallex3.php b/html/includes/jpgraph/src/Examples/bargradsmallex3.php new file mode 100644 index 0000000000..c16eaa6ef3 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradsmallex3.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25,15,25,25); + +$graph->title->Set('"GRAD_HOR"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy","lightsteelblue",GRAD_HOR); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradsmallex4.php b/html/includes/jpgraph/src/Examples/bargradsmallex4.php new file mode 100644 index 0000000000..63bf0a70a6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradsmallex4.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25,15,25,25); + +$graph->title->Set('"GRAD_VER"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy","lightsteelblue",GRAD_VER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradsmallex5.php b/html/includes/jpgraph/src/Examples/bargradsmallex5.php new file mode 100644 index 0000000000..f9f738ba21 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradsmallex5.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25,15,25,25); + +$graph->title->Set('"GRAD_WIDE_MIDVER"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy","lightsteelblue",GRAD_WIDE_MIDVER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradsmallex6.php b/html/includes/jpgraph/src/Examples/bargradsmallex6.php new file mode 100644 index 0000000000..b762a87683 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradsmallex6.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25,15,25,25); + +$graph->title->Set('"GRAD_WIDE_MIDHOR"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy","lightsteelblue",GRAD_WIDE_MIDHOR); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradsmallex7.php b/html/includes/jpgraph/src/Examples/bargradsmallex7.php new file mode 100644 index 0000000000..cb18edc478 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradsmallex7.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25,15,25,25); + +$graph->title->Set('"GRAD_CENTER"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient("navy","lightsteelblue",GRAD_CENTER); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bargradsmallex8.php b/html/includes/jpgraph/src/Examples/bargradsmallex8.php new file mode 100644 index 0000000000..a1a0ea9ba5 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bargradsmallex8.php @@ -0,0 +1,34 @@ +SetScale("textlin"); +$graph->img->SetMargin(25,15,25,25); + +$graph->title->Set('"GRAD_RAISED_PANEL"'); +$graph->title->SetColor('darkred'); + +// Setup font for axis +$graph->xaxis->SetFont(FF_FONT1); +$graph->yaxis->SetFont(FF_FONT1); + +// Create the bar pot +$bplot = new BarPlot($datay); +$bplot->SetWidth(0.6); + +// Setup color for gradient fill style +$bplot->SetFillGradient('navy','orange',GRAD_RAISED_PANEL); + +// Set color for the frame of each bar +$bplot->SetColor("navy"); +$graph->Add($bplot); + +// Finally send the graph to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/barimgex1.php b/html/includes/jpgraph/src/Examples/barimgex1.php new file mode 100644 index 0000000000..324adda748 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/barimgex1.php @@ -0,0 +1,29 @@ +SetScale("textlin"); + +$graph->title->Set('Images on top of bars'); +$graph->title->SetFont(FF_VERA,FS_BOLD,13); + +$graph->SetTitleBackground('lightblue:1.1',TITLEBKG_STYLE1,TITLEBKG_FRAME_BEVEL); + +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetWidth(0.5); + +$lplot = new LinePlot($datay); +//$lplot->SetColor('white@1'); +$lplot->SetBarCenter(); +$lplot->mark->SetType(MARK_IMG_LBALL,'red'); + +$graph->Add($bplot); +$graph->Add($lplot); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/barintex1.php b/html/includes/jpgraph/src/Examples/barintex1.php new file mode 100644 index 0000000000..4c9b273604 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/barintex1.php @@ -0,0 +1,48 @@ +img->SetMargin(40,30,30,40); +$graph->SetScale("textint"); +$graph->SetShadow(); +$graph->SetFrame(false); // No border around the graph + +// Add some grace to the top so that the scale doesn't +// end exactly at the max value. +$graph->yaxis->scale->SetGrace(100); + +// Setup X-axis labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetFont(FF_FONT2); + +// Setup graph title ands fonts +$graph->title->Set("Example of integer Y-scale"); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->xaxis->title->Set("Year 2002"); +$graph->xaxis->title->SetFont(FF_FONT2,FS_BOLD); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetWidth(0.5); +$bplot->SetShadow(); + +// Setup the values that are displayed on top of each bar +$bplot->value->Show(); +// Must use TTF fonts if we want text at an arbitrary angle +$bplot->value->SetFont(FF_ARIAL,FS_BOLD); +$bplot->value->SetAngle(45); +// Black color for positive values and darkred for negative values +$bplot->value->SetColor("black","darkred"); +$graph->Add($bplot); + +// Finally stroke the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/barintex2.php b/html/includes/jpgraph/src/Examples/barintex2.php new file mode 100644 index 0000000000..acbbaac847 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/barintex2.php @@ -0,0 +1,58 @@ +img->SetMargin(40,30,40,40); +$graph->SetScale("textint"); +$graph->SetFrame(true,'blue',1); +$graph->SetColor('lightblue'); +$graph->SetMarginColor('lightblue'); + +// Add some grace to the top so that the scale doesn't +// end exactly at the max value. +$graph->yaxis->scale->SetGrace(20); + +// Setup X-axis labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetFont(FF_FONT1); +$graph->xaxis->SetColor('darkblue','black'); + +// Stup "hidden" y-axis by given it the same color +// as the background +$graph->yaxis->SetColor('lightblue','darkblue'); +$graph->ygrid->SetColor('white'); + +// Setup graph title ands fonts +$graph->title->Set('Example of integer Y-scale'); +$graph->subtitle->Set('(With "hidden" y-axis)'); + +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->xaxis->title->Set("Year 2002"); +$graph->xaxis->title->SetFont(FF_FONT2,FS_BOLD); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor('darkblue'); +$bplot->SetColor('darkblue'); +$bplot->SetWidth(0.5); +$bplot->SetShadow('darkgray'); + +// Setup the values that are displayed on top of each bar +$bplot->value->Show(); +// Must use TTF fonts if we want text at an arbitrary angle +$bplot->value->SetFont(FF_ARIAL,FS_NORMAL,8); +$bplot->value->SetFormat('$%d'); +// Black color for positive values and darkred for negative values +$bplot->value->SetColor("black","darkred"); +$graph->Add($bplot); + +// Finally stroke the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/barline_csimex1.php b/html/includes/jpgraph/src/Examples/barline_csimex1.php new file mode 100644 index 0000000000..895337d971 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/barline_csimex1.php @@ -0,0 +1,42 @@ +SetScale("textlin"); +$graph->img->SetMargin(40,20,30,40); +$graph->title->Set("CSIM example with bar and line"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Setup axis titles +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->mark->SetType(MARK_FILLEDCIRCLE); +$lineplot->mark->SetWidth(5); +$lineplot->mark->SetColor('black'); +$lineplot->mark->SetFillColor('red'); +$lineplot->SetCSIMTargets($targ,$alt); + +// Create line plot +$barplot=new barPlot($ydata2); +$barplot->SetCSIMTargets($targ,$alt); + +// Add the plots to the graph +$graph->Add($lineplot); +$graph->Add($barplot); + +$graph->StrokeCSIM(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/barlinealphaex1.php b/html/includes/jpgraph/src/Examples/barlinealphaex1.php new file mode 100644 index 0000000000..ec995c4c7f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/barlinealphaex1.php @@ -0,0 +1,74 @@ +GetShortMonth(); + +// Create the graph. +$graph = new Graph(300,200); +$graph->SetScale("textlin"); +$graph->SetMarginColor('white'); + +// Adjust the margin slightly so that we use the +// entire area (since we don't use a frame) +$graph->SetMargin(30,1,20,5); + +// Box around plotarea +$graph->SetBox(); + +// No frame around the image +$graph->SetFrame(false); + +// Setup the tab title +$graph->tabtitle->Set('Year 2003'); +$graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,10); + +// Setup the X and Y grid +$graph->ygrid->SetFill(true,'#DDDDDD@0.5','#BBBBBB@0.5'); +$graph->ygrid->SetLineStyle('dashed'); +$graph->ygrid->SetColor('gray'); +$graph->xgrid->Show(); +$graph->xgrid->SetLineStyle('dashed'); +$graph->xgrid->SetColor('gray'); + +// Setup month as labels on the X-axis +$graph->xaxis->SetTickLabels($months); +$graph->xaxis->SetFont(FF_ARIAL,FS_NORMAL,8); +$graph->xaxis->SetLabelAngle(45); + +// Create a bar pot +$bplot = new BarPlot($ydata); +$bplot->SetWidth(0.6); +$fcol='#440000'; +$tcol='#FF9090'; + +$bplot->SetFillGradient($fcol,$tcol,GRAD_LEFT_REFLECTION); + +// Set line weigth to 0 so that there are no border +// around each bar +$bplot->SetWeight(0); + +$graph->Add($bplot); + +// Create filled line plot +$lplot = new LinePlot($ydata2); +$lplot->SetFillColor('skyblue@0.5'); +$lplot->SetColor('navy@0.7'); +$lplot->SetBarCenter(); + +$lplot->mark->SetType(MARK_SQUARE); +$lplot->mark->SetColor('blue@0.5'); +$lplot->mark->SetFillColor('lightblue'); +$lplot->mark->SetSize(6); + +$graph->Add($lplot); + +// .. and finally send it back to the browser +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/barlinefreq_csimex1.php b/html/includes/jpgraph/src/Examples/barlinefreq_csimex1.php new file mode 100644 index 0000000000..5fec735ae7 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/barlinefreq_csimex1.php @@ -0,0 +1,100 @@ +CheckCSIMCache('auto'); + +// Setup some basic graph parameters +$graph->SetScale("textlin"); +$graph->SetY2Scale('lin',0,100); +$graph->img->SetMargin(50,70,30,40); +$graph->yaxis->SetTitleMargin(30); +$graph->SetMarginColor('#EEEEEE'); + +// Setup titles and fonts +$graph->title->Set("Frequence plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Turn the tickmarks +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +$graph->y2axis->SetTickSide(SIDE_RIGHT); +$graph->y2axis->SetColor('black','blue'); +$graph->y2axis->SetLabelFormat('%3d.0%%'); + +// Create a bar pot +$bplot = new BarPlot($data_freq); + +// Create targets and alt texts for the image maps. One for each bar +// (In this example this is just "dummy" targets) +$targ=array("#1","#2","#3","#4","#5","#6","#7"); +$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d","val=%d"); +$bplot->SetCSIMTargets($targ,$alts); + + +// Create accumulative graph +$lplot = new LinePlot($data_accfreq); + +// We want the line plot data point in the middle of the bars +$lplot->SetBarCenter(); + +// Use transperancy +$lplot->SetFillColor('lightblue@0.6'); +$lplot->SetColor('blue@0.6'); +//$lplot->SetColor('blue'); +$graph->AddY2($lplot); + + +// Setup the bars +$bplot->SetFillColor("orange@0.2"); +$bplot->SetValuePos('center'); +$bplot->value->SetFormat("%d"); +$bplot->value->SetFont(FF_ARIAL,FS_NORMAL,9); +$bplot->value->Show(); + +// Add it to the graph +$graph->Add($bplot); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); + +?> diff --git a/html/includes/jpgraph/src/Examples/barlinefreqex1.php b/html/includes/jpgraph/src/Examples/barlinefreqex1.php new file mode 100644 index 0000000000..210b5bf18e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/barlinefreqex1.php @@ -0,0 +1,83 @@ +SetScale("textlin"); +$graph->SetY2Scale('lin',0,100); +$graph->img->SetMargin(50,70,30,40); +$graph->yaxis->SetTitleMargin(30); +$graph->SetMarginColor('#EEEEEE'); + +// Setup titles and fonts +$graph->title->Set("Frequence plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Turn the tickmarks +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +$graph->y2axis->SetTickSide(SIDE_RIGHT); +$graph->y2axis->SetColor('black','blue'); +$graph->y2axis->SetLabelFormat('%3d.0%%'); + +// Create a bar pot +$bplot = new BarPlot($data_freq); + +// Create accumulative graph +$lplot = new LinePlot($data_accfreq); + +// We want the line plot data point in the middle of the bars +$lplot->SetBarCenter(); + +// Use transperancy +$lplot->SetFillColor('lightblue@0.6'); +$lplot->SetColor('blue@0.6'); +$graph->AddY2($lplot); + +// Setup the bars +$bplot->SetFillColor("orange@0.2"); +$bplot->SetValuePos('center'); +$bplot->value->SetFormat("%d"); +$bplot->value->SetFont(FF_ARIAL,FS_NORMAL,9); +$bplot->value->Show(); + +// Add it to the graph +$graph->Add($bplot); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/barpatternex1.php b/html/includes/jpgraph/src/Examples/barpatternex1.php new file mode 100644 index 0000000000..deac421397 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/barpatternex1.php @@ -0,0 +1,33 @@ +SetScale("textlin"); + +$graph->SetMarginColor('navy:1.9'); +$graph->SetBox(); + +$graph->title->Set('Bar Pattern'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,20); + +$graph->SetTitleBackground('lightblue:1.3',TITLEBKG_STYLE2,TITLEBKG_FRAME_BEVEL); +$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED,'lightblue','blue'); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor('darkorange'); +$bplot->SetWidth(0.6); + +$bplot->SetPattern(PATTERN_CROSS1,'navy'); + +$graph->Add($bplot); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/barscalecallbackex1.php b/html/includes/jpgraph/src/Examples/barscalecallbackex1.php new file mode 100644 index 0000000000..2315b47a89 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/barscalecallbackex1.php @@ -0,0 +1,59 @@ +img->SetMargin(80,30,30,40); +$graph->SetScale("textint"); +$graph->SetShadow(); +$graph->SetFrame(false); // No border around the graph + +// Add some grace to the top so that the scale doesn't +// end exactly at the max value. +// Since we are using integer scale the gace gets intervalled +// to adding integer values. +// For example grace 10 to 100 will add 1 to max, 101-200 adds 2 +// and so on... +$graph->yaxis->scale->SetGrace(30); +$graph->yaxis->SetLabelFormatCallback('yScaleCallback'); + +// Setup X-axis labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetFont(FF_FONT2); + +// Setup graph title ands fonts +$graph->title->Set("Example of Y-scale callback formatting"); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->xaxis->title->Set("Year 2002"); +$graph->xaxis->title->SetFont(FF_FONT2,FS_BOLD); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetWidth(0.5); +$bplot->SetShadow(); + +// Setup the values that are displayed on top of each bar +$bplot->value->Show(); +// Must use TTF fonts if we want text at an arbitrary angle +$bplot->value->SetFont(FF_ARIAL,FS_BOLD); +$bplot->value->SetAngle(45); +$bplot->value->SetFormat('$ %0.0f'); +// Black color for positive values and darkred for negative values +$bplot->value->SetColor("black","darkred"); +$graph->Add($bplot); + +// Finally stroke the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/bartutex1.php b/html/includes/jpgraph/src/Examples/bartutex1.php new file mode 100644 index 0000000000..fc7061357c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bartutex1.php @@ -0,0 +1,35 @@ +SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Set title and subtitle +$graph->title->Set("Elementary barplot with a text scale"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Create the bar plot +$b1 = new BarPlot($databary); +$b1->SetLegend("Temperature"); +//$b1->SetAbsWidth(6); +//$b1->SetShadow(); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/bartutex12.php b/html/includes/jpgraph/src/Examples/bartutex12.php new file mode 100644 index 0000000000..41eca7fb96 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bartutex12.php @@ -0,0 +1,90 @@ +SetBackgroundImage("tiger_bkg.png",BGIMG_FILLFRAME); +$graph->SetShadow(); + +// Use text X-scale so we can text labels on the X-axis +$graph->SetScale("textlin"); + +// Y2-axis is linear +$graph->SetY2Scale("lin"); + +// Color the two Y-axis to make them easier to associate +// to the corresponding plot (we keep the axis black though) +$graph->yaxis->SetColor("black","red"); +$graph->y2axis->SetColor("black","orange"); + +// Set title and subtitle +$graph->title->Set("Combined bar and line plot"); +$graph->subtitle->Set("100 data points, X-Scale: 'text'"); + +// Use built in font (don't need TTF support) +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Make the margin around the plot a little bit bigger then default +$graph->img->SetMargin(40,140,40,80); + +// Slightly adjust the legend from it's default position in the +// top right corner to middle right side +$graph->legend->Pos(0.03,0.5,"right","center"); + +// Display every 6:th tickmark +$graph->xaxis->SetTextTickInterval(6); + +// Label every 2:nd tick mark +$graph->xaxis->SetTextLabelInterval(2); + +// Setup the labels +$graph->xaxis->SetTickLabels($databarx); +$graph->xaxis->SetLabelAngle(90); + +// Create a red line plot +$p1 = new LinePlot($datay); +$p1->SetColor("red"); +$p1->SetLegend("Pressure"); + +// Create the bar plot +$b1 = new BarPlot($databary); +$b1->SetLegend("Temperature"); +$b1->SetFillColor("orange"); +$b1->SetAbsWidth(8); + +// Drop shadow on bars adjust the default values a little bit +$b1->SetShadow("steelblue",2,2); + +// The order the plots are added determines who's ontop +$graph->Add($p1); +$graph->AddY2($b1); + +// Finally output the image +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/bartutex2.php b/html/includes/jpgraph/src/Examples/bartutex2.php new file mode 100644 index 0000000000..4072d98712 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bartutex2.php @@ -0,0 +1,40 @@ +GetShortMonth(); + +// New graph with a drop shadow +$graph = new Graph(300,200,'auto'); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Specify X-labels +$graph->xaxis->SetTickLabels($months); + +// Set title and subtitle +$graph->title->Set("Textscale with specified labels"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Create the bar plot +$b1 = new BarPlot($databary); +$b1->SetLegend("Temperature"); + +//$b1->SetAbsWidth(6); +//$b1->SetShadow(); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/bartutex3.php b/html/includes/jpgraph/src/Examples/bartutex3.php new file mode 100644 index 0000000000..4ab88a011c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bartutex3.php @@ -0,0 +1,44 @@ +GetShortMonth(); + +srand ((double) microtime() * 1000000); +for( $i=0; $i<25; ++$i) { + $databary[]=rand(1,50); + $databarx[]=$months[$i%12]; +} + +// New graph with a drop shadow +$graph = new Graph(300,200,'auto'); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Specify X-labels +$graph->xaxis->SetTickLabels($databarx); + +// Set title and subtitle +$graph->title->Set("Bar tutorial example 3"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Create the bar plot +$b1 = new BarPlot($databary); +$b1->SetLegend("Temperature"); +//$b1->SetAbsWidth(6); +//$b1->SetShadow(); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/bartutex4.php b/html/includes/jpgraph/src/Examples/bartutex4.php new file mode 100644 index 0000000000..65a4a329b2 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bartutex4.php @@ -0,0 +1,47 @@ +GetShortMonth(); + +srand ((double) microtime() * 1000000); +for( $i=0; $i<25; ++$i) { + $databary[]=rand(1,50); + $databarx[]=$months[$i%12]; +} + +// New graph with a drop shadow +$graph = new Graph(300,200,'auto'); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Specify X-labels +//$databarx = array('tXi','','','xxx','','','iXii','','','OOO','','','tOO'); +$graph->xaxis->SetFont(FF_FONT1,FS_NORMAL); +$graph->xaxis->SetTickLabels($databarx); +$graph->xaxis->SetTextLabelInterval(3); + +// Set title and subtitle +$graph->title->Set("Displaying only every third label"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Create the bar plot +$b1 = new BarPlot($databary); +$b1->SetLegend("Temperature"); +//$b1->SetAbsWidth(6); +//$b1->SetShadow(); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/bartutex5.php b/html/includes/jpgraph/src/Examples/bartutex5.php new file mode 100644 index 0000000000..93a092e3a7 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bartutex5.php @@ -0,0 +1,45 @@ +GetShortMonth(); + +srand ((double) microtime() * 1000000); +for( $i=0; $i<25; ++$i) { + $databary[]=rand(1,50); + $databarx[]=$months[$i%12]; +} + +// New graph with a drop shadow +$graph = new Graph(300,200,'auto'); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Specify X-labels +$graph->xaxis->SetTickLabels($databarx); +$graph->xaxis->SetTextLabelInterval(1); +$graph->xaxis->SetTextTickInterval(3); + +// Set title and subtitle +$graph->title->Set("Bar tutorial example 5"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Create the bar plot +$b1 = new BarPlot($databary); +$b1->SetLegend("Temperature"); +$b1->SetWidth(0.4); + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/bartutex6.php b/html/includes/jpgraph/src/Examples/bartutex6.php new file mode 100644 index 0000000000..375fd70e55 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bartutex6.php @@ -0,0 +1,47 @@ +GetShortMonth(); +srand ((double) microtime() * 1000000); +for( $i=0; $i<25; ++$i) { + $databary[]=rand(1,50); + $databarx[]=$months[$i%12]; +} + +// New graph with a drop shadow +$graph = new Graph(300,200,'auto'); +$graph->SetShadow(); + +// Use a "text" X-scale +$graph->SetScale("textlin"); + +// Specify X-labels +$graph->xaxis->SetTickLabels($databarx); +$graph->xaxis->SetTextLabelInterval(3); + +// Hide the tick marks +$graph->xaxis->HideTicks(); + +// Set title and subtitle +$graph->title->Set("Bar tutorial example 6"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Create the bar plot +$b1 = new BarPlot($databary); +$b1->SetLegend("Temperature"); +$b1->SetWidth(0.4); + + +// The order the plots are added determines who's ontop +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/bezierex1.php b/html/includes/jpgraph/src/Examples/bezierex1.php new file mode 100644 index 0000000000..ba1af08486 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bezierex1.php @@ -0,0 +1,54 @@ +Get(50); + +// Create the graph +$g = new Graph(300,200); +$g->SetMargin(30,20,40,30); +$g->title->Set("Bezier interpolation"); +$g->title->SetFont(FF_ARIAL,FS_NORMAL,12); +$g->subtitle->Set('(Control points shown in red)'); +$g->subtitle->SetColor('darkred'); +$g->SetMarginColor('lightblue'); + +//$g->img->SetAntiAliasing(); + +// We need a linlin scale since we provide both +// x and y coordinates for the data points. +$g->SetScale('linlin'); + +// We want 1 decimal for the X-label +$g->xaxis->SetLabelFormat('%1.1f'); + +// We use a scatterplot to illustrate the original +// contro points. +$bplot = new ScatterPlot($ydata,$xdata); +$bplot->mark->SetFillColor('red@0.3'); +$bplot->mark->SetColor('red@0.5'); + +// And a line plot to stroke the smooth curve we got +// from the original control points +$lplot = new LinePlot($newy,$newx); +$lplot->SetColor('navy'); + +// Add the plots to the graph and stroke +$g->Add($lplot); +$g->Add($bplot); +$g->Stroke(); + +?> + diff --git a/html/includes/jpgraph/src/Examples/bkgimgflagex1.php b/html/includes/jpgraph/src/Examples/bkgimgflagex1.php new file mode 100644 index 0000000000..26aec98d3c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bkgimgflagex1.php @@ -0,0 +1,81 @@ +SetScale("textlin"); +$graph->SetMargin(40,20,20,40); +$graph->SetMarginColor('white:0.9'); +$graph->SetColor('white'); +$graph->SetShadow(); + + +// Adjust the position of the legend box +$graph->legend->Pos(0.03,0.10); + +// Adjust the color for theshadow of the legend +$graph->legend->SetShadow('darkgray@0.5'); +$graph->legend->SetFillColor('lightblue@0.1'); +$graph->legend->Hide(); + +// Get localised version of the month names +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +$graph->SetBackgroundCountryFlag('mais',BGIMG_COPY,50); + +// Set axis titles and fonts +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetColor('white'); + +$graph->xaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->SetColor('navy'); + +$graph->yaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->SetColor('navy'); + +//$graph->ygrid->Show(false); +$graph->ygrid->SetColor('white@0.5'); + +// Setup graph title +$graph->title->Set('Using a country flag background'); + +// Some extra margin (from the top) +$graph->title->SetMargin(3); +$graph->title->SetFont(FF_ARIAL,FS_NORMAL,12); + +// Create the three var series we will combine +$bplot1 = new BarPlot($datay1); +$bplot2 = new BarPlot($datay2); +$bplot3 = new BarPlot($datay3); + +// Setup the colors with 40% transparency (alpha channel) +$bplot1->SetFillColor('yellow@0.4'); +$bplot2->SetFillColor('red@0.4'); +$bplot3->SetFillColor('darkgreen@0.4'); + +// Setup legends +$bplot1->SetLegend('Label 1'); +$bplot2->SetLegend('Label 2'); +$bplot3->SetLegend('Label 3'); + +// Setup each bar with a shadow of 50% transparency +$bplot1->SetShadow('black@0.4'); +$bplot2->SetShadow('black@0.4'); +$bplot3->SetShadow('black@0.4'); + +$gbarplot = new GroupBarPlot(array($bplot1,$bplot2,$bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); +?> + diff --git a/html/includes/jpgraph/src/Examples/bkgimgflagex2.php b/html/includes/jpgraph/src/Examples/bkgimgflagex2.php new file mode 100644 index 0000000000..d2e05ec7cd --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bkgimgflagex2.php @@ -0,0 +1,83 @@ +SetScale("textlin"); +$graph->SetMargin(40,20,20,40); +$graph->SetMarginColor('white:0.9'); +$graph->SetColor('white'); +$graph->SetShadow(); + +// Apply a perspective transformation at the end +$graph->Set3DPerspective(SKEW3D_UP,100,180); + +// Adjust the position of the legend box +$graph->legend->Pos(0.03,0.10); + +// Adjust the color for theshadow of the legend +$graph->legend->SetShadow('darkgray@0.5'); +$graph->legend->SetFillColor('lightblue@0.1'); +$graph->legend->Hide(); + +// Get localised version of the month names +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +$graph->SetBackgroundCountryFlag('mais',BGIMG_COPY,50); + +// Set axis titles and fonts +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetColor('white'); + +$graph->xaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->SetColor('navy'); + +$graph->yaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->SetColor('navy'); + +//$graph->ygrid->Show(false); +$graph->ygrid->SetColor('white@0.5'); + +// Setup graph title +$graph->title->Set('Using a country flag background'); + +// Some extra margin (from the top) +$graph->title->SetMargin(3); +$graph->title->SetFont(FF_ARIAL,FS_NORMAL,12); + +// Create the three var series we will combine +$bplot1 = new BarPlot($datay1); +$bplot2 = new BarPlot($datay2); +$bplot3 = new BarPlot($datay3); + +// Setup the colors with 40% transparency (alpha channel) +$bplot1->SetFillColor('yellow@0.4'); +$bplot2->SetFillColor('red@0.4'); +$bplot3->SetFillColor('darkgreen@0.4'); + +// Setup legends +$bplot1->SetLegend('Label 1'); +$bplot2->SetLegend('Label 2'); +$bplot3->SetLegend('Label 3'); + +// Setup each bar with a shadow of 50% transparency +$bplot1->SetShadow('black@0.4'); +$bplot2->SetShadow('black@0.4'); +$bplot3->SetShadow('black@0.4'); + +$gbarplot = new GroupBarPlot(array($bplot1,$bplot2,$bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); +?> + diff --git a/html/includes/jpgraph/src/Examples/bkgimgflagex3.php b/html/includes/jpgraph/src/Examples/bkgimgflagex3.php new file mode 100644 index 0000000000..0ab9480000 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bkgimgflagex3.php @@ -0,0 +1,83 @@ +SetScale("textlin"); +$graph->SetMargin(40,20,20,40); +$graph->SetMarginColor('white:0.9'); +$graph->SetColor('white'); +$graph->SetShadow(); + +// Apply a perspective transformation at the end +$graph->Set3DPerspective(SKEW3D_DOWN,100,180); + +// Adjust the position of the legend box +$graph->legend->Pos(0.03,0.10); + +// Adjust the color for theshadow of the legend +$graph->legend->SetShadow('darkgray@0.5'); +$graph->legend->SetFillColor('lightblue@0.1'); +$graph->legend->Hide(); + +// Get localised version of the month names +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +$graph->SetBackgroundCountryFlag('mais',BGIMG_COPY,50); + +// Set axis titles and fonts +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetColor('white'); + +$graph->xaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->SetColor('navy'); + +$graph->yaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->SetColor('navy'); + +//$graph->ygrid->Show(false); +$graph->ygrid->SetColor('white@0.5'); + +// Setup graph title +$graph->title->Set('Using a country flag background'); + +// Some extra margin (from the top) +$graph->title->SetMargin(3); +$graph->title->SetFont(FF_ARIAL,FS_NORMAL,12); + +// Create the three var series we will combine +$bplot1 = new BarPlot($datay1); +$bplot2 = new BarPlot($datay2); +$bplot3 = new BarPlot($datay3); + +// Setup the colors with 40% transparency (alpha channel) +$bplot1->SetFillColor('yellow@0.4'); +$bplot2->SetFillColor('red@0.4'); +$bplot3->SetFillColor('darkgreen@0.4'); + +// Setup legends +$bplot1->SetLegend('Label 1'); +$bplot2->SetLegend('Label 2'); +$bplot3->SetLegend('Label 3'); + +// Setup each bar with a shadow of 50% transparency +$bplot1->SetShadow('black@0.4'); +$bplot2->SetShadow('black@0.4'); +$bplot3->SetShadow('black@0.4'); + +$gbarplot = new GroupBarPlot(array($bplot1,$bplot2,$bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); +?> + diff --git a/html/includes/jpgraph/src/Examples/bkgimgflagex4.php b/html/includes/jpgraph/src/Examples/bkgimgflagex4.php new file mode 100644 index 0000000000..48f606ea12 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/bkgimgflagex4.php @@ -0,0 +1,83 @@ +SetScale("textlin"); +$graph->SetMargin(40,20,20,40); +$graph->SetMarginColor('white:0.9'); +$graph->SetColor('white'); +$graph->SetShadow(); + +// Apply a perspective transformation at the end +$graph->Set3DPerspective(SKEW3D_LEFT,350,320,true); + +// Adjust the position of the legend box +$graph->legend->Pos(0.03,0.10); + +// Adjust the color for theshadow of the legend +$graph->legend->SetShadow('darkgray@0.5'); +$graph->legend->SetFillColor('lightblue@0.1'); +$graph->legend->Hide(); + +// Get localised version of the month names +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +$graph->SetBackgroundCountryFlag('mais',BGIMG_COPY,50); + +// Set axis titles and fonts +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetColor('white'); + +$graph->xaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->SetColor('navy'); + +$graph->yaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->SetColor('navy'); + +//$graph->ygrid->Show(false); +$graph->ygrid->SetColor('white@0.5'); + +// Setup graph title +$graph->title->Set('Using a country flag background'); + +// Some extra margin (from the top) +$graph->title->SetMargin(3); +$graph->title->SetFont(FF_ARIAL,FS_NORMAL,12); + +// Create the three var series we will combine +$bplot1 = new BarPlot($datay1); +$bplot2 = new BarPlot($datay2); +$bplot3 = new BarPlot($datay3); + +// Setup the colors with 40% transparency (alpha channel) +$bplot1->SetFillColor('yellow@0.4'); +$bplot2->SetFillColor('red@0.4'); +$bplot3->SetFillColor('darkgreen@0.4'); + +// Setup legends +$bplot1->SetLegend('Label 1'); +$bplot2->SetLegend('Label 2'); +$bplot3->SetLegend('Label 3'); + +// Setup each bar with a shadow of 50% transparency +$bplot1->SetShadow('black@0.4'); +$bplot2->SetShadow('black@0.4'); +$bplot3->SetShadow('black@0.4'); + +$gbarplot = new GroupBarPlot(array($bplot1,$bplot2,$bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); +?> + diff --git a/html/includes/jpgraph/src/Examples/blueblack400x300grad.png b/html/includes/jpgraph/src/Examples/blueblack400x300grad.png new file mode 100644 index 0000000000..8852862a74 Binary files /dev/null and b/html/includes/jpgraph/src/Examples/blueblack400x300grad.png differ diff --git a/html/includes/jpgraph/src/Examples/boxstockcsimex1.php b/html/includes/jpgraph/src/Examples/boxstockcsimex1.php new file mode 100644 index 0000000000..6e97c669c2 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/boxstockcsimex1.php @@ -0,0 +1,37 @@ +SetScale("textlin"); +$graph->SetMarginColor('lightblue'); +$graph->title->Set('Box Stock chart example'); + +// Create a new stock plot +$p1 = new BoxPlot($datay); + +// Setup URL target for image map +$p1->SetCSIMTargets(array('#1','#2','#3','#4','#5')); + +// Width of the bars (in pixels) +$p1->SetWidth(9); + +//$p1->SetCenter(); +// Uncomment the following line to hide the horizontal end lines +//$p1->HideEndLines(); + +// Add the plot to the graph and send it back to the browser +$graph->Add($p1); +$graph->StrokeCSIM(); + +?> diff --git a/html/includes/jpgraph/src/Examples/boxstockex1.php b/html/includes/jpgraph/src/Examples/boxstockex1.php new file mode 100644 index 0000000000..e85eed7372 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/boxstockex1.php @@ -0,0 +1,33 @@ +SetScale("textlin"); +$graph->SetMarginColor('lightblue'); +$graph->title->Set('Box Stock chart example'); + +// Create a new stock plot +$p1 = new BoxPlot($datay); + +// Width of the bars (in pixels) +$p1->SetWidth(9); + +// Uncomment the following line to hide the horizontal end lines +//$p1->HideEndLines(); + +// Add the plot to the graph and send it back to the browser +$graph->Add($p1); +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/boxstockex2.php b/html/includes/jpgraph/src/Examples/boxstockex2.php new file mode 100644 index 0000000000..c9330e708d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/boxstockex2.php @@ -0,0 +1,38 @@ +SetScale("textlin"); +$graph->SetMarginColor('lightblue'); +$graph->title->Set('Box Stock chart example'); +$graph->subtitle->Set('(Indented X-axis)'); + +// Create a new stock plot +$p1 = new BoxPlot($datay); + +// Width of the bars (in pixels) +$p1->SetWidth(9); + +// Indent bars so they dont start and end at the edge of the +// plot area +$p1->SetCenter(); + +// Uncomment the following line to hide the horizontal end lines +//$p1->HideEndLines(); + +// Add the plot to the graph and send it back to the browser +$graph->Add($p1); +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/builtinplotmarksex1.php b/html/includes/jpgraph/src/Examples/builtinplotmarksex1.php new file mode 100644 index 0000000000..28775c44c2 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/builtinplotmarksex1.php @@ -0,0 +1,65 @@ +SetMargin(30,20,60,20); +$graph->SetMarginColor('white'); +$graph->SetScale("linlin"); + +// Hide the frame around the graph +$graph->SetFrame(false); + +// Setup title +$graph->title->Set("Using Builtin PlotMarks"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); + +// Note: requires jpgraph 1.12p or higher +// $graph->SetBackgroundGradient('blue','navy:0.5',GRAD_HOR,BGRAD_PLOT); +$graph->tabtitle->Set('Region 1' ); +$graph->tabtitle->SetWidth(TABTITLE_WIDTHFULL); + +// Enable X and Y Grid +$graph->xgrid->Show(); +$graph->xgrid->SetColor('gray@0.5'); +$graph->ygrid->SetColor('gray@0.5'); + +// Format the legend box +$graph->legend->SetColor('navy'); +$graph->legend->SetFillColor('lightgreen'); +$graph->legend->SetLineWeight(1); +$graph->legend->SetFont(FF_ARIAL,FS_BOLD,8); +$graph->legend->SetShadow('gray@0.4',3); +$graph->legend->SetAbsPos(15,120,'right','bottom'); + +// Create the line plots + +$p1 = new LinePlot($datay1); +$p1->SetColor("red"); +$p1->SetFillColor("yellow@0.5"); +$p1->SetWeight(2); +$p1->mark->SetType(MARK_IMG_DIAMOND,5,0.6); +$p1->SetLegend('2006'); +$graph->Add($p1); + +$p2 = new LinePlot($datay2); +$p2->SetColor("darkgreen"); +$p2->SetWeight(2); +$p2->SetLegend('2001'); +$p2->mark->SetType(MARK_IMG_MBALL,'red'); +$graph->Add($p2); + +// Add a vertical line at the end scale position '7' +$l1 = new PlotLine(VERTICAL,7); +$graph->Add($l1); + +// Output the graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/canvas_jpgarchex.php b/html/includes/jpgraph/src/Examples/canvas_jpgarchex.php new file mode 100644 index 0000000000..fcf8121c4d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/canvas_jpgarchex.php @@ -0,0 +1,143 @@ +SetMargin(2,3,2,3); +$g->SetMarginColor("teal"); +$g->InitFrame(); + +// ... and a scale +$scale = new CanvasScale($g); +$scale->Set(0,$xmax,0,$ymax); + +// ... we need shape since we want the indented rectangle +$shape = new Shape($g,$scale); +$shape->SetColor('black'); + +// ... basic parameters for the overall image +$l = 2; // Left margin +$r = 18; // Row number to start the lowest line on +$width = 16; // Total width + +// Setup the two basic rectangle text object we will use +$tt = new CanvasRectangleText(); +$tt->SetFont(FF_ARIAL,FS_NORMAL,14); +$tt->SetFillColor(''); +$tt->SetColor(''); +$tt->SetFontColor('navy'); + +$t = new CanvasRectangleText(); +$t->SetFont(FF_ARIAL,FS_NORMAL,14); +$t->SetFillColor('goldenrod1'); +$t->SetFontColor('navy'); + + +// Now start drawing the arch overview from the bottom and up +// This is all pretty manual and one day I will write a proper +// framework to make it easy to construct these types of architecture +// overviews. But for now, just plain old coordinates.. + +// Line: GD Library and image libraries +$h=3; +$s = 3; $d=$l + $width-9; +$t->SetFillColor('cadetblue3'); +$t->Set("TTF",$d,$r+2,$s,1); +$t->Stroke($g->img,$scale); +$t->Set("PNG",$d+$s,$r+2,$s,1); +$t->Stroke($g->img,$scale); +$t->Set("JPEG",$d+2*$s,$r+2,$s,1); +$t->Stroke($g->img,$scale); +$shape->IndentedRectangle($l,$r,$width,$h,$s*3,1,2,'lightgreen'); +$tt->Set("GD Basic library\n(1.8.x or 2.x)",$l,$r,$width,$h-1); +$tt->Stroke($g->img,$scale); + + +// Area: Basic internal JpGraph architecture +$t->SetFillColor('goldenrod1'); +$h = 2; +$r -= $h; $d=8; +$t->Set("Image primitives\n(RGB, Anti-aliasing,\nGD Abstraction)",$l,$r-0.5,$width*0.5,$h+0.5); +$t->Stroke($g->img,$scale); +$t->Set("Image Cache &\nStreaming",$l+0.5*$width,$r,$width*0.4,$h); +$t->Stroke($g->img,$scale); + +$r -= $h; $d=8; +$t->Set("2D Rot & Transformation",$l,$r,$width*0.5,$h-0.5); $t->Stroke($g->img,$scale); + + +$r -= 2; $h = 4; +$shape->IndentedRectangle($l,$r,$width*0.9,$h,$d,2,3,'goldenrod1'); +$tt->Set("Axis, Labelling, (Auto)-Scaling",$l,$r,$width*0.9,$h-2); $tt->Stroke($g->img,$scale); + +$r -= 1; +$shape->IndentedRectangle($l,$r,$width,7,$width*0.9,6,3,'goldenrod1'); +$tt->Set("Error handling & Utility classes",$l,$r,$width,1); $tt->Stroke($g->img,$scale); + + +// Area: Top area with graph components +$t->SetFillColor('gold1'); +$r -= 3; +$w = $width*0.55/4; $h = 2; +$t->Set("Gantt\nGraph",$l,$r,$w,$h); +$t->Stroke($g->img,$scale); + +$t->Set("Pie\nGraph",$l+$w,$r,$w,$h); +$t->Stroke($g->img,$scale); +$t->Set("Radar\nGraph",$l+$w*2,$r,$w,$h); +$t->Stroke($g->img,$scale); + +$shape->IndentedRectangle($l,$r,$width,3,4*$w,2,0,'gold1'); +$tt->Set("Base Graph\n(Orthogonal\ncoordinate system)",$l+4*$w,$r,$width-$w*4,3); +$tt->Stroke($g->img,$scale); + +$r -= 2; +$d = 0.7; +$shape->IndentedRectangle($l+3*$w,$r,$w,4, $w*$d,2,0,'gold1'); +$t->Set("Canv\nUtil",$l+3*$w,$r,$w*$d,$h); $t->Stroke($g->img,$scale); +$tt->Set("Canvas\nGraph",$l+3*$w,$r+2,$w,2); $tt->Stroke($g->img,$scale); + +// Top line of plotting plugins +$t->SetFillColor('cyan'); +$t->Set("Gantt\nPlot",$l,$r,$w,$h); $t->Stroke($g->img,$scale); +$t->Set("2D\nPlot",$l+$w,$r,$w/2,$h); $t->Stroke($g->img,$scale); +$t->Set("3D\nPlot",$l+$w+$w/2,$r,$w/2,$h);$t->Stroke($g->img,$scale); +$t->Set("Radar\nPlot",$l+2*$w,$r,$w,$h); $t->Stroke($g->img,$scale); + +$wp = ($width - 4*$w)/4; +$t->Set("Error\nPlot",$l+4*$w,$r,$wp,$h); $t->Stroke($g->img,$scale); +$t->Set("Line\nPlot",$l+4*$w+$wp,$r,$wp,$h); $t->Stroke($g->img,$scale); +$t->Set("Bar\nPlot",$l+4*$w+2*$wp,$r,$wp,$h); $t->Stroke($g->img,$scale); +$t->Set("Scatter\nPlot",$l+4*$w+3*$wp,$r,$wp,$h); $t->Stroke($g->img,$scale); + +// Show application top +$r -= 2.5; $h=2; +$t->SetFillColor('blue'); +$t->SetFontColor('white'); +$t->SetFont(FF_ARIAL,FS_BOLD,20); +$t->Set("PHP Application",$l,$r,$width,$h); $t->Stroke($g->img,$scale); + +// Stroke title +$r = 0.5; +$tt->SetFontColor('black'); +$tt->SetFont(FF_TIMES,FS_BOLD,28); +$tt->Set("JpGraph Architecture Overview",$l,$r,$width,1); +$tt->Stroke($g->img,$scale); + +// Stroke footer +$tt->SetFont(FF_VERDANA,FS_NORMAL,10); +$tt->Set("Generated: ".date("ymd H:m",time()),0.1,$ymax*0.95); +$tt->Stroke($g->img,$scale); + +// .. and stream it all back +$g->Stroke(); + +?> + diff --git a/html/includes/jpgraph/src/Examples/canvasbezierex1.php b/html/includes/jpgraph/src/Examples/canvasbezierex1.php new file mode 100644 index 0000000000..e87977dd97 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/canvasbezierex1.php @@ -0,0 +1,40 @@ +title->Set('Bezier line with control points'); + +// Setup control point for bezier +$p = array(3,6, + 6,9, + 5,3, + 7,4); + +// Visualize control points +$shape->SetColor('blue'); +$shape->Line($p[0],$p[1],$p[2],$p[3]); +$shape->FilledCircle($p[2],$p[3],-6); + +$shape->SetColor('red'); +$shape->Line($p[4],$p[5],$p[6],$p[7]); +$shape->FilledCircle($p[4],$p[5],-6); + +// Draw bezier +$shape->SetColor('black'); +$shape->Bezier($p); + +// Frame it with a square +$shape->SetColor('navy'); +$shape->Rectangle(0.5,2,9.5,9.5); + +// ... and stroke it +$g->Stroke(); +?> + diff --git a/html/includes/jpgraph/src/Examples/canvasex01.php b/html/includes/jpgraph/src/Examples/canvasex01.php new file mode 100644 index 0000000000..8a95c190ee --- /dev/null +++ b/html/includes/jpgraph/src/Examples/canvasex01.php @@ -0,0 +1,37 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Draw a text box in the middle +$txt="This\nis\na TEXT!!!"; +$t = new Text($txt,200,10); +$t->SetFont(FF_ARIAL,FS_BOLD,40); + +// How should the text box interpret the coordinates? +$t->Align('center','top'); + +// How should the paragraph be aligned? +$t->ParagraphAlign('center'); + +// Add a box around the text, white fill, black border and gray shadow +$t->SetBox("white","black","gray"); + +// Stroke the text +$t->Stroke($g->img); + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/html/includes/jpgraph/src/Examples/canvasex02.php b/html/includes/jpgraph/src/Examples/canvasex02.php new file mode 100644 index 0000000000..f1ef91b58e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/canvasex02.php @@ -0,0 +1,42 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Add a black line +$g->img->SetColor('black'); +$g->img->Line(0,0,100,100); + +// .. and a circle (x,y,diameter) +$g->img->Circle(100,100,50); + +// .. and a filled circle (x,y,diameter) +$g->img->SetColor('red'); +$g->img->FilledCircle(200,100,50); + +// .. add a rectangle +$g->img->SetColor('green'); +$g->img->FilledRectangle(10,10,50,50); + +// .. add a filled rounded rectangle +$g->img->SetColor('green'); +$g->img->FilledRoundedRectangle(300,30,350,80,10); +// .. with a darker border +$g->img->SetColor('darkgreen'); +$g->img->RoundedRectangle(300,30,350,80,10); + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/html/includes/jpgraph/src/Examples/canvasex03.php b/html/includes/jpgraph/src/Examples/canvasex03.php new file mode 100644 index 0000000000..5c0971c5a1 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/canvasex03.php @@ -0,0 +1,58 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Create a new scale +$scale = new CanvasScale($g); +$scale->Set(0,$xmax,0,$ymax); + +// The shape class is wrapper around the Imgae class which translates +// the coordinates for us +$shape = new Shape($g,$scale); +$shape->SetColor('black'); + + +// Add a black line +$shape->SetColor('black'); +$shape->Line(0,0,20,20); + +// .. and a circle (x,y,diameter) +$shape->Circle(5,14,2); + +// .. and a filled circle (x,y,diameter) +$shape->SetColor('red'); +$shape->FilledCircle(11,8,3); + +// .. add a rectangle +$shape->SetColor('green'); +$shape->FilledRectangle(15,8,19,14); + +// .. add a filled rounded rectangle +$shape->SetColor('green'); +$shape->FilledRoundedRectangle(2,3,8,6); +// .. with a darker border +$shape->SetColor('darkgreen'); +$shape->RoundedRectangle(2,3,8,6); + + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/html/includes/jpgraph/src/Examples/canvasex04.php b/html/includes/jpgraph/src/Examples/canvasex04.php new file mode 100644 index 0000000000..3a3c295d38 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/canvasex04.php @@ -0,0 +1,58 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Create a new scale +$scale = new CanvasScale($g); +$scale->Set(0,$xmax,0,$ymax); + +// The shape class is wrapper around the Imgae class which translates +// the coordinates for us +$shape = new Shape($g,$scale); +$shape->SetColor('black'); + + +// Add a black line +$shape->SetColor('black'); +$shape->Line(0,0,20,20); + +// .. and a circle (x,y,diameter) +$shape->Circle(5,14,2); + +// .. and a filled circle (x,y,diameter) +$shape->SetColor('red'); +$shape->FilledCircle(11,8,3); + +// .. add a rectangle +$shape->SetColor('green'); +$shape->FilledRectangle(15,8,19,14); + +// .. add a filled rounded rectangle +$shape->SetColor('green'); +$shape->FilledRoundedRectangle(2,3,8,6); +// .. with a darker border +$shape->SetColor('darkgreen'); +$shape->RoundedRectangle(2,3,8,6); + + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/html/includes/jpgraph/src/Examples/canvasex05.php b/html/includes/jpgraph/src/Examples/canvasex05.php new file mode 100644 index 0000000000..ee45eaabf1 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/canvasex05.php @@ -0,0 +1,58 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Create a new scale +$scale = new CanvasScale($g); +$scale->Set(0,$xmax,0,$ymax); + +// The shape class is wrapper around the Imgae class which translates +// the coordinates for us +$shape = new Shape($g,$scale); +$shape->SetColor('black'); + + +// Add a black line +$shape->SetColor('black'); +$shape->Line(0,0,20,20); + +// .. and a circle (x,y,diameter) +$shape->Circle(5,14,2); + +// .. and a filled circle (x,y,diameter) +$shape->SetColor('red'); +$shape->FilledCircle(11,8,3); + +// .. add a rectangle +$shape->SetColor('green'); +$shape->FilledRectangle(15,8,19,14); + +// .. add a filled rounded rectangle +$shape->SetColor('green'); +$shape->FilledRoundedRectangle(2,3,8,6); +// .. with a darker border +$shape->SetColor('darkgreen'); +$shape->RoundedRectangle(2,3,8,6); + + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/html/includes/jpgraph/src/Examples/canvasex06.php b/html/includes/jpgraph/src/Examples/canvasex06.php new file mode 100644 index 0000000000..1af4b6d861 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/canvasex06.php @@ -0,0 +1,42 @@ +SetMargin(5,11,6,11); +$g->SetShadow(); +$g->SetMarginColor("teal"); + +// We need to stroke the plotarea and margin before we add the +// text since we otherwise would overwrite the text. +$g->InitFrame(); + +// Create a new scale +$scale = new CanvasScale($g); +$scale->Set(0,$xmax,0,$ymax); + +// The shape class is wrapper around the Imgae class which translates +// the coordinates for us +$shape = new Shape($g,$scale); +$shape->SetColor('black'); + +$shape->IndentedRectangle(1,2,15,15,8,8,CORNER_TOPLEFT,'khaki'); + +$shape->IndentedRectangle(1,20,15,15,8,8,CORNER_BOTTOMLEFT,'khaki'); + +$shape->IndentedRectangle(20,2,15,15,8,8,CORNER_TOPRIGHT,'khaki'); + +$shape->IndentedRectangle(20,20,15,15,8,8,CORNER_BOTTOMRIGHT,'khaki'); + +// Stroke the graph +$g->Stroke(); + +?> + diff --git a/html/includes/jpgraph/src/Examples/canvaspiralex1.php b/html/includes/jpgraph/src/Examples/canvaspiralex1.php new file mode 100644 index 0000000000..ca60610556 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/canvaspiralex1.php @@ -0,0 +1,78 @@ +SetColor($color1); + $img->Line($x,$y,$x+$s1*$w,$y); + } + else { + $x = $x + $s2*$w*$r; + $w = (1-$r)*$w; + $h = $h / (1-$r) * $r; + $s2 *= -1; + $img->SetColor($color1); + $img->Line($x,$y,$x,$y-$s2*$h); + } + $img->SetColor($color2); + $img->FilledRectangle($x-1,$y-1,$x+1,$y+1); + $img->Arc($x,$y,2*$w+1,2*$h+1,$sa,$ea); + $img->Arc($x,$y,2*$w,2*$h,$sa,$ea); + $img->Arc($x,$y,2*$w-1,2*$h-1,$sa,$ea); + $img->Line($x_old,$y_old,$x,$y); + $x_old=$x; $y_old=$y; + } +} + +$g = new CanvasGraph($w,$h); +//$gr = 1.61803398874989484820; + +$p = SeaShell($g->img,0,20,$w-1,$h-21,$r,19); +$g->img->SetColor('black'); +$g->img->Rectangle(0,20,$w-1,$h-1); +$g->img->SetFont(FF_FONT2,FS_BOLD); +$g->img->SetTextAlign('center','top'); +$g->img->StrokeText($w/2,0,"Canvas Spiral"); + +$g->Stroke(); +?> + diff --git a/html/includes/jpgraph/src/Examples/centeredlineex01.php b/html/includes/jpgraph/src/Examples/centeredlineex01.php new file mode 100644 index 0000000000..0ba4556589 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/centeredlineex01.php @@ -0,0 +1,35 @@ +img->SetMargin(40,40,40,40); +$graph->img->SetAntiAliasing(); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example of line centered plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + + +// Use 20% "grace" to get slightly larger scale then min/max of +// data +$graph->yscale->SetGrace(20); + + +$p1 = new LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$graph->Add($p1); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/centeredlineex02.php b/html/includes/jpgraph/src/Examples/centeredlineex02.php new file mode 100644 index 0000000000..be4763e2eb --- /dev/null +++ b/html/includes/jpgraph/src/Examples/centeredlineex02.php @@ -0,0 +1,30 @@ +img->SetMargin(40,40,40,40); +$graph->img->SetAntiAliasing(); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example of filled line centered plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new LinePlot($datay); +$p1->SetFillColor("green"); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$graph->Add($p1); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/centeredlineex03.php b/html/includes/jpgraph/src/Examples/centeredlineex03.php new file mode 100644 index 0000000000..2ed6cfb368 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/centeredlineex03.php @@ -0,0 +1,31 @@ +img->SetMargin(40,40,40,80); +$graph->img->SetAntiAliasing(); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example slanted X-labels"); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,14); + +$graph->xaxis->SetFont(FF_ARIAL,FS_NORMAL,11); +$graph->xaxis->SetTickLabels($labels); +$graph->xaxis->SetLabelAngle(45); + +$p1 = new LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$graph->Add($p1); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/centerlinebarex1.php b/html/includes/jpgraph/src/Examples/centerlinebarex1.php new file mode 100644 index 0000000000..e9b8393ffd --- /dev/null +++ b/html/includes/jpgraph/src/Examples/centerlinebarex1.php @@ -0,0 +1,35 @@ +img->SetMargin(40,80,40,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->Set('Center the line points in bars'); + +$line = new LinePlot($ydata); +$line->SetBarCenter(); +$line->SetWeight(2); + +$bar = new BarPlot($ydata); +$bar2 = new BarPlot($ydata); +$bar2->SetFillColor("red"); + +$gbar = new GroupbarPlot(array($bar,$bar2)); + +$graph->Add($gbar); +$graph->Add($line); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/combgraphex1.php b/html/includes/jpgraph/src/Examples/combgraphex1.php new file mode 100644 index 0000000000..b59ac32828 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/combgraphex1.php @@ -0,0 +1,89 @@ +getTicks($datax,DSUTILS_MONTH1); + +// Now create the real graph +// Combine a line and a bar graph + +// We add some grace to the end of the X-axis scale so that the first and last +// data point isn't exactly at the very end or beginning of the scale +$grace = 400000; +$xmin = $datax[0]-$grace; +$xmax = $datax[$n-1]+$grace;; + +// Overall width of graphs +$w = 450; +// Left and right margin for each graph +$lm=25; $rm=15; + +//---------------------- +// Setup the line graph +//---------------------- +$graph = new Graph($w,250); +$graph->SetScale('linlin',0,0,$xmin,$xmax); +$graph->SetMargin($lm,$rm,10,30); +$graph->SetMarginColor('white'); +$graph->SetFrame(false); +$graph->SetBox(true); +$graph->title->Set('Example of combined graph'); +$graph->title->SetFont(FF_ARIAL,FS_NORMAL,14); +$graph->xaxis->SetTickPositions($tickPositions,$minTickPositions); +$graph->xaxis->SetLabelFormatString('My',true); +$graph->xgrid->Show(); +$p1 = new LinePlot($datay,$datax); +$graph->Add($p1); + +//---------------------- +// Setup the bar graph +//---------------------- +$graph2 = new Graph($w,110); +$graph2->SetScale('linlin',0,0,$xmin,$xmax); +$graph2->SetMargin($lm,$rm,5,10); +$graph2->SetMarginColor('white'); +$graph2->SetFrame(false); +$graph2->SetBox(true); +$graph2->xgrid->Show(); +$graph2->xaxis->SetTickPositions($tickPositions,$minTickPositions); +$graph2->xaxis->SetLabelFormatString('My',true); +$graph2->xaxis->SetPos('max'); +$graph2->xaxis->HideLabels(); +$graph2->xaxis->SetTickSide(SIDE_DOWN); +$b1 = new BarPlot($datay2,$datax); +$b1->SetFillColor('teal'); +$b1->SetColor('teal:1.2'); +$graph2->Add($b1); + +//----------------------- +// Create a multigraph +//---------------------- +$mgraph = new MGraph(); +$mgraph->SetMargin(2,2,2,2); +$mgraph->SetFrame(true,'darkgray',2); +$mgraph->Add($graph); +$mgraph->Add($graph2,0,240); +$mgraph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/dateaxisex1.php b/html/includes/jpgraph/src/Examples/dateaxisex1.php new file mode 100644 index 0000000000..e39143260e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/dateaxisex1.php @@ -0,0 +1,55 @@ +SetMargin(40,40,30,70); +$graph->title->Set('Date: '.date('Y-m-d',$now)); +$graph->SetAlphaBlending(); + +// Setup a manual x-scale (We leave the sentinels for the +// Y-axis at 0 which will then autoscale the Y-axis.) +// We could also use autoscaling for the x-axis but then it +// probably will start a little bit earlier than the first value +// to make the first value an even number as it sees the timestamp +// as an normal integer value. +$graph->SetScale("intlin",0,200,$now,$datax[$n-1]); + +// Setup the x-axis with a format callback to convert the timestamp +// to a user readable time +$graph->xaxis->SetLabelFormatCallback('TimeCallback'); +$graph->xaxis->SetLabelAngle(90); + +// Create the line +$p1 = new LinePlot($datay,$datax); +$p1->SetColor("blue"); + +// Set the fill color partly transparent +$p1->SetFillColor("blue@0.4"); + +// Add lineplot to the graph +$graph->Add($p1); + +// Output line +$graph->Stroke(); +?> + + diff --git a/html/includes/jpgraph/src/Examples/dateaxisex2.php b/html/includes/jpgraph/src/Examples/dateaxisex2.php new file mode 100644 index 0000000000..c9935a7305 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/dateaxisex2.php @@ -0,0 +1,38 @@ +SetMargin(40,40,30,130); + +// Fix the Y-scale to go between [0,100] and use date for the x-axis +$graph->SetScale('datlin',0,100); +$graph->title->Set("Example on Date scale"); + +// Set the angle for the labels to 90 degrees +$graph->xaxis->SetLabelAngle(90); + +$line = new LinePlot($data,$xdata); +$line->SetLegend('Year 2005'); +$line->SetFillColor('lightblue@0.5'); +$graph->Add($line); +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/dateaxisex3.php b/html/includes/jpgraph/src/Examples/dateaxisex3.php new file mode 100644 index 0000000000..4fa810ca02 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/dateaxisex3.php @@ -0,0 +1,48 @@ +SetMargin(40,40,30,130); + +// Fix the Y-scale to go between [0,100] and use date for the x-axis +$graph->SetScale('datlin',0,100); +$graph->title->Set("Example on Date scale"); + +// Set the angle for the labels to 90 degrees +$graph->xaxis->SetLabelAngle(90); + +// It is possible to adjust the density for the X-axis as well +// The following call makes the dates a little more sparse +// $graph->SetTickDensity(TICKD_NORMAL,TICKD_SPARSE); + +// The automatic format string for dates can be overridden +// $graph->xaxis->scale->SetDateFormat('h:i'); + +// Adjust the start/end to a specific alignment +$graph->xaxis->scale->SetTimeAlign(MINADJ_15); + +$line = new LinePlot($data,$xdata); +$line->SetLegend('Year 2005'); +$line->SetFillColor('lightblue@0.5'); +$graph->Add($line); +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/dateaxisex4.php b/html/includes/jpgraph/src/Examples/dateaxisex4.php new file mode 100644 index 0000000000..9d7dd6657e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/dateaxisex4.php @@ -0,0 +1,44 @@ +SetMargin(40,40,30,130); + +// Fix the Y-scale to go between [0,100] and use date for the x-axis +$graph->SetScale('datlin',0,100); +$graph->title->Set("Example on Date scale"); + +// Set the angle for the labels to 90 degrees +$graph->xaxis->SetLabelAngle(90); + +// The automatic format string for dates can be overridden +$graph->xaxis->scale->SetDateFormat('H:i'); + +// Adjust the start/end to a specific alignment +$graph->xaxis->scale->SetTimeAlign(MINADJ_10); + +$line = new LinePlot($data,$xdata); +$line->SetLegend('Year 2005'); +$line->SetFillColor('lightblue@0.5'); +$graph->Add($line); +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/dbschemaex1.php b/html/includes/jpgraph/src/Examples/dbschemaex1.php new file mode 100644 index 0000000000..34451d506b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/dbschemaex1.php @@ -0,0 +1,117 @@ +' + return str_replace('JpGraph','', $aName); +} + +// Global callback to format each field name in the table +function FormatFldName($aName,$aTable) { + return $aName; +} + + +class Driver { + + var $ig, $img, $iscale, $ishape; + var $iymax,$ixmax; + var $iwidth,$iheight; + + function Driver() { + + // Define Image size and coordinate grid space to work within + $this->iwidth = 600; + $this->iheight= 750; + $this->iymax = 50; + $this->ixmax = 55; + + // Setup a basic canvas + $this->ig = new CanvasGraph($this->iwidth,$this->iheight,'auto'); + $this->img = $this->ig->img; + + // Define the scale to be used + $this->iscale = new CanvasScale($this->ig); + $this->iscale->Set(0,$this->ixmax,0,$this->iymax); + $this->ishape = new Shape($this->ig,$this->iscale); + + // A small frame around the canvas + $this->ig->SetMargin(2,3,2,3); + $this->ig->SetMarginColor("teal"); + $this->ig->InitFrame(); + + } + + function Run() { + + $leftm=1.5; // Left margin (for table schemes) + $topm=5; // Top margin (for table schemes) + $tblwidth=15; // Individual table width + $tlo=1; // Offset for top line + + // Add the background color for the project specific tables + $this->ishape->IndentedRectangle($leftm,$topm-1,3*$tblwidth+$tlo+6,45, + $tlo+2*$tblwidth+2,30,CORNER_BOTTOMLEFT, + 'lightblue'); + + // Stroke the tables (series of x,y offsets, If =-1 then use the + // automtic positioning + $tblposadj=array($tlo,0,$tblwidth+$tlo+2,0,2*$tblwidth+$tlo+4, + 0,-1,16,-1,16); + $dbschema = new ImgDBSchema('jpgraph_doc','FormatTblName','FormatFldName'); + $dbschema->SetMargin($leftm,$topm); + $dbschema->SetTableWidth($tblwidth); + $dbschema->Stroke($this->img,$this->iscale,$tblposadj); + + $tt = new CanvasRectangleText(); + $tt->SetFillColor(''); + $tt->SetColor(''); + $tt->SetFontColor('navy'); + + // Add explanation + $tt->SetFont(FF_ARIAL,FS_NORMAL,12); + $tt->Set('Project specific tables',$tblwidth+$leftm+3,16,15); + $tt->Stroke($this->img,$this->iscale); + + // Add title + $tt->SetColor(''); + $tt->SetFont(FF_VERDANA,FS_BOLD,26); + $tt->Set('DDDA - DB Schema',9,0.5,30); + $tt->Stroke($this->img,$this->iscale); + + // Add a version and date + $tt->SetFillColor('yellow'); + $tt->SetFont(FF_FONT1,FS_NORMAL,10); + $tt->Set("Generated: ".date("ymd H:i",time()),1,$this->iymax*0.96,15); + $tt->Stroke($this->img,$this->iscale); + + $this->ig->Stroke(); + } +} + +$driver = new Driver(); +$driver->Run(); + +?> + diff --git a/html/includes/jpgraph/src/Examples/dupyaxisex1.php b/html/includes/jpgraph/src/Examples/dupyaxisex1.php new file mode 100644 index 0000000000..0f8fb5b589 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/dupyaxisex1.php @@ -0,0 +1,31 @@ +E(-M_PI,M_PI,25); + +$graph = new Graph(300,200,"auto"); +$graph->SetScale("linlin"); +$graph->SetMargin(50,50,20,30); +$graph->SetFrame(false); +$graph->SetBox(true,'black',2); +$graph->SetMarginColor('white'); +$graph->SetColor('lightyellow'); + +$graph->title->Set('Duplicating Y-axis'); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->SetAxisStyle(AXSTYLE_YBOXIN); +$graph->xgrid->Show(); + +$lp1 = new LinePlot($ydata,$xdata); +$lp1->SetColor("blue"); +$lp1->SetWeight(2); +$graph->Add($lp1); + +$graph->Stroke(); +?> + + diff --git a/html/includes/jpgraph/src/Examples/example0.php b/html/includes/jpgraph/src/Examples/example0.php new file mode 100644 index 0000000000..9ccff2be03 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example0.php @@ -0,0 +1,21 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->SetColor("blue"); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example1.1.php b/html/includes/jpgraph/src/Examples/example1.1.php new file mode 100644 index 0000000000..3e8755343b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example1.1.php @@ -0,0 +1,25 @@ +SetScale("textlin"); +$graph->img->SetMargin(30,90,40,50); +$graph->xaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->title->Set("Example 1.1 same y-values"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->SetLegend("Test 1"); +$lineplot->SetColor("blue"); +$lineplot->SetWeight(5); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example1.2.php b/html/includes/jpgraph/src/Examples/example1.2.php new file mode 100644 index 0000000000..36e605466a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example1.2.php @@ -0,0 +1,29 @@ +SetScale("textlin"); +$graph->img->SetMargin(30,90,40,50); +$graph->xaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->title->Set("Dashed lineplot"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->SetLegend("Test 1"); +$lineplot->SetColor("blue"); + +// Style can also be specified as SetStyle([1|2|3|4]) or +// SetStyle("solid"|"dotted"|"dashed"|"lobgdashed") +$lineplot->SetStyle("dashed"); + + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example1.php b/html/includes/jpgraph/src/Examples/example1.php new file mode 100644 index 0000000000..14921c4ca6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example1.php @@ -0,0 +1,25 @@ +SetScale("textlin"); +$graph->img->SetMargin(50,90,40,50); +$graph->xaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->title->Set("Examples for graph"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->SetLegend("Test 1"); +$lineplot->SetColor("blue"); + + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example10.php b/html/includes/jpgraph/src/Examples/example10.php new file mode 100644 index 0000000000..f870cd0625 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example10.php @@ -0,0 +1,59 @@ +img->SetMargin(40,110,20,40); +$graph->SetScale("textlog"); +$graph->SetY2Scale("log"); +$graph->SetShadow(); + +$graph->ygrid->Show(true,true); +$graph->xgrid->Show(true,false); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot2=new LinePlot($y2data); + +$graph->yaxis->scale->ticks->SupressFirst(); +$graph->y2axis->scale->ticks->SupressFirst(); +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); +$graph->y2axis->SetColor("orange"); + +$graph->title->Set("Example 10"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +$graph->legend->Pos(0.05,0.5,"right","center"); + +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example11.php b/html/includes/jpgraph/src/Examples/example11.php new file mode 100644 index 0000000000..fa9c0182ae --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example11.php @@ -0,0 +1,44 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); + +$lineplot2=new LinePlot($ydata2); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->Add($lineplot2); + +$graph->img->SetMargin(40,20,20,40); +$graph->title->Set("Timing a graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("red"); +$graph->yaxis->SetWeight(2); +$graph->SetShadow(); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example13.php b/html/includes/jpgraph/src/Examples/example13.php new file mode 100644 index 0000000000..0ea9ede730 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example13.php @@ -0,0 +1,36 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40,30,20,40); +$graph->SetShadow(); + +// Create the error plot +$errplot=new ErrorPlot($errdatay); +$errplot->SetColor("red"); +$errplot->SetWeight(2); + +// Add the plot to the graph +$graph->Add($errplot); + +$graph->title->Set("Simple error plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$datax = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($datax); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example14.php b/html/includes/jpgraph/src/Examples/example14.php new file mode 100644 index 0000000000..98f1c71a45 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example14.php @@ -0,0 +1,37 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40,30,20,40); +$graph->SetShadow(); + +// Create the error plot +$errplot=new ErrorPlot($errdatay); +$errplot->SetColor("red"); +$errplot->SetWeight(2); +$errplot->SetCenter(); + +// Add the plot to the graph +$graph->Add($errplot); + +$graph->title->Set("Simple error plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$datax = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($datax); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example15.php b/html/includes/jpgraph/src/Examples/example15.php new file mode 100644 index 0000000000..5d93eeec4b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example15.php @@ -0,0 +1,40 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40,30,20,40); +$graph->SetShadow(); + +// Create the linear plot +$errplot=new ErrorLinePlot($errdatay); +$errplot->SetColor("red"); +$errplot->SetWeight(2); +$errplot->SetCenter(); +$errplot->line->SetWeight(2); +$errplot->line->SetColor("blue"); + +// Add the plot to the graph +$graph->Add($errplot); + +$graph->title->Set("Linear error plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$datax = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($datax); + + +// Display the graph +$graph->Stroke(); +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/example16.1.php b/html/includes/jpgraph/src/Examples/example16.1.php new file mode 100644 index 0000000000..a6c315ab05 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example16.1.php @@ -0,0 +1,46 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40,130,20,40); +$graph->SetShadow(); + +// Create the linear error plot +$l1plot=new LinePlot($l1datay); +$l1plot->SetColor("red"); +$l1plot->SetWeight(2); +$l1plot->SetLegend("Prediction"); + +// Create the bar plot +$l2plot = new LinePlot($l2datay); +$l2plot->SetFillColor("orange"); +$l2plot->SetLegend("Result"); + +// Add the plots to the graph +$graph->Add($l2plot); +$graph->Add($l1plot); + +$graph->title->Set("Mixing line and filled line"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +//$graph->xaxis->SetTickLabels($datax); +//$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example16.2.php b/html/includes/jpgraph/src/Examples/example16.2.php new file mode 100644 index 0000000000..bae6e2f6b3 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example16.2.php @@ -0,0 +1,46 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40,130,20,40); +$graph->SetShadow(); + +// Create the linear error plot +$l1plot=new LinePlot($l1datay); +$l1plot->SetColor("red"); +$l1plot->SetWeight(2); +$l1plot->SetLegend("Prediction"); + +// Create the bar plot +$bplot = new BarPlot($l2datay); +$bplot->SetFillColor("orange"); +$bplot->SetLegend("Result"); + +// Add the plots to t'he graph +$graph->Add($l1plot); +$graph->Add($bplot); + + +$graph->title->Set("Adding a line plot to a bar graph v1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +//$graph->xaxis->SetTickLabels($datax); +//$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example16.3.php b/html/includes/jpgraph/src/Examples/example16.3.php new file mode 100644 index 0000000000..7c58688257 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example16.3.php @@ -0,0 +1,47 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40,130,20,40); +$graph->SetShadow(); + +// Create the linear error plot +$l1plot=new LinePlot($l1datay); +$l1plot->SetColor("red"); +$l1plot->SetWeight(2); +$l1plot->SetLegend("Prediction"); + + +// Create the bar plot +$bplot = new BarPlot($l2datay); +$bplot->SetFillColor("orange"); +$bplot->SetLegend("Result"); + +// Add the plots to t'he graph +$graph->Add($bplot); +$graph->Add($l1plot); + + +$graph->title->Set("Adding a line plot to a bar graph v1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +//$graph->xaxis->SetTickLabels($datax); +//$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example16.4.php b/html/includes/jpgraph/src/Examples/example16.4.php new file mode 100644 index 0000000000..24ff875e6b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example16.4.php @@ -0,0 +1,44 @@ +SetScale("intlin"); + +$graph->img->SetMargin(40,130,20,40); +$graph->SetShadow(); + +// Create the linear error plot +$l1plot=new LinePlot($l1datay); +$l1plot->SetColor("red"); +$l1plot->SetWeight(2); +$l1plot->SetLegend("Prediction"); + +// Create the bar plot +$bplot = new BarPlot($l2datay); +$bplot->SetFillColor("orange"); +$bplot->SetLegend("Result"); + +// Add the plots to t'he graph +$graph->Add($bplot); +$graph->Add($l1plot); + +$graph->title->Set("Adding a line plot to a bar graph v3"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$datax = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($datax); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example16.5.php b/html/includes/jpgraph/src/Examples/example16.5.php new file mode 100644 index 0000000000..820fb0b7fa --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example16.5.php @@ -0,0 +1,57 @@ +img->SetMargin(40,70,20,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->SetColor(array(250,250,250)); + +$graph->img->SetTransparent("white"); + +$t1 = new Text("This is a text"); +$t1->Pos(0.5,0.5); +$t1->SetOrientation("h"); +$t1->SetFont(FF_FONT1,FS_BOLD); +$t1->SetBox("white","black","gray"); +$t1->SetColor("black"); +$graph->AddText($t1); + +// Create the linear error plot +$l1plot=new LinePlot($l1datay); +$l1plot->SetColor("blue"); +$l1plot->SetWeight(2); +$l1plot->SetLegend("Prediction"); + +// Create the bar plot +$l2plot = new BarPlot($l2datay); +$l2plot->SetFillColor("orange"); +$l2plot->SetLegend("Result"); + +// Add the plots to the graph +$graph->Add($l1plot); +$graph->Add($l2plot); + + +$graph->title->Set("Example 16.3"); +$graph->xaxis->title->Set("Month"); +$graph->yaxis->title->Set("x10,000 US$"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->xaxis->SetTickLabels($datax); +//$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example16.6.php b/html/includes/jpgraph/src/Examples/example16.6.php new file mode 100644 index 0000000000..45feceadd2 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example16.6.php @@ -0,0 +1,53 @@ +SetScale("linlin"); + +// Setup title +$graph->title->Set("Example of linear regression"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// make sure that the X-axis is always at the +// bottom at the plot and not just at Y=0 which is +// the default position +$graph->xaxis->SetPos('min'); + +// Create the scatter plot with some nice colors +$sp1 = new ScatterPlot($datay2,$datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->SetColor("blue"); +$sp1->SetWeight(3); +$sp1->mark->SetWidth(4); + +// Create the regression line +$lplot = new LinePlot($datay); +$lplot->SetWeight(2); +$lplot->SetColor('navy'); + +// Add the pltos to the line +$graph->Add($sp1); +$graph->Add($lplot); + +// ... and stroke +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/example16.php b/html/includes/jpgraph/src/Examples/example16.php new file mode 100644 index 0000000000..4a680a4290 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example16.php @@ -0,0 +1,44 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40,30,20,40); +$graph->SetShadow(); + +// Create the linear plot +$errplot=new ErrorLinePlot($errdatay); +$errplot->SetColor("red"); +$errplot->SetWeight(2); +$errplot->SetCenter(); +$errplot->line->SetWeight(2); +$errplot->line->SetColor("blue"); + +// Setup the legends +$errplot->SetLegend("Min/Max"); +$errplot->line->SetLegend("Average"); + +// Add the plot to the graph +$graph->Add($errplot); + +$graph->title->Set("Linear error plot"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$datax = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($datax); + + +// Display the graph +$graph->Stroke(); +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/example17.php b/html/includes/jpgraph/src/Examples/example17.php new file mode 100644 index 0000000000..c53f9dd863 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example17.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->SetShadow(); +$graph->img->SetMargin(40,30,20,40); + +// Create the linear plots for each category +$dplot[] = new LinePLot($datay1); +$dplot[] = new LinePLot($datay2); +$dplot[] = new LinePLot($datay3); + +$dplot[0]->SetFillColor("red"); +$dplot[1]->SetFillColor("blue"); +$dplot[2]->SetFillColor("green"); + +// Create the accumulated graph +$accplot = new AccLinePlot($dplot); + +// Add the plot to the graph +$graph->Add($accplot); + +$graph->xaxis->SetTextTickInterval(2); +$graph->title->Set("Example 17"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example18.php b/html/includes/jpgraph/src/Examples/example18.php new file mode 100644 index 0000000000..cb9bf19f73 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example18.php @@ -0,0 +1,32 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("A simple bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example19.1.php b/html/includes/jpgraph/src/Examples/example19.1.php new file mode 100644 index 0000000000..4abe27605a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example19.1.php @@ -0,0 +1,35 @@ +SetScale("linlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Bar graph, linear scale"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example19.php b/html/includes/jpgraph/src/Examples/example19.php new file mode 100644 index 0000000000..4523eaecda --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example19.php @@ -0,0 +1,35 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("A simple bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example2.1.php b/html/includes/jpgraph/src/Examples/example2.1.php new file mode 100644 index 0000000000..6c7e02f170 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example2.1.php @@ -0,0 +1,30 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); + +$lineplot->value->Show(); +$lineplot->value->SetColor("red"); +$lineplot->value->SetFont(FF_FONT1,FS_BOLD); + + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40,20,20,40); +$graph->title->Set("Example 2.1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example2.5.php b/html/includes/jpgraph/src/Examples/example2.5.php new file mode 100644 index 0000000000..b03acd911b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example2.5.php @@ -0,0 +1,26 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40,20,20,40); +$graph->title->Set("Example 2.5"); +$graph->xaxis->title->Set("X-title"); +$graph->xaxis->SetPos("min"); +$graph->yaxis->title->Set("Y-title"); + + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example2.6.php b/html/includes/jpgraph/src/Examples/example2.6.php new file mode 100644 index 0000000000..1b6d44f9a1 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example2.6.php @@ -0,0 +1,27 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->SetStepStyle(); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40,20,20,40); +$graph->title->Set("Example 2.6 (Line with stepstyle)"); +$graph->xaxis->title->Set("X-title"); +$graph->xaxis->SetPos("min"); +$graph->yaxis->title->Set("Y-title"); + + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example2.php b/html/includes/jpgraph/src/Examples/example2.php new file mode 100644 index 0000000000..3345e5ca5c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example2.php @@ -0,0 +1,25 @@ +SetScale("textlin"); + +// Setup margin and titles +$graph->img->SetMargin(40,20,20,40); +$graph->title->Set("Example 2"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example20.1.php b/html/includes/jpgraph/src/Examples/example20.1.php new file mode 100644 index 0000000000..b778f8dca0 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example20.1.php @@ -0,0 +1,36 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$bplot->value->Show(); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example20.2.php b/html/includes/jpgraph/src/Examples/example20.2.php new file mode 100644 index 0000000000..317342c6bf --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example20.2.php @@ -0,0 +1,37 @@ +SetScale("textlin"); +$graph->yaxis->scale->SetGrace(20); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$bplot->value->Show(); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Bar graph with Y-scale grace"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example20.3.php b/html/includes/jpgraph/src/Examples/example20.3.php new file mode 100644 index 0000000000..abbedccee7 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example20.3.php @@ -0,0 +1,40 @@ +SetScale("textlin"); +$graph->yaxis->scale->SetGrace(20); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL,FS_BOLD,10); +$bplot->value->SetAngle(45); +$bplot->value->SetFormat('%0.1f'); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Bar graph with Y-scale grace"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example20.4.php b/html/includes/jpgraph/src/Examples/example20.4.php new file mode 100644 index 0000000000..60acb072be --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example20.4.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->yaxis->scale->SetGrace(20); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$bplot->SetShadow(); +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL,FS_BOLD,10); +$bplot->value->SetAngle(45); +$bplot->value->SetFormat('%0.1f'); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Bar graph with drop shadow"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example20.5.php b/html/includes/jpgraph/src/Examples/example20.5.php new file mode 100644 index 0000000000..78bc5ef254 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example20.5.php @@ -0,0 +1,47 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); + +// Setup values +$bplot->value->Show(); +$bplot->value->SetFormat('%d'); +$bplot->value->SetFont(FF_FONT1,FS_BOLD); + +// Center the values in the bar +$bplot->SetValuePos('center'); + +// Make the bar a little bit wider +$bplot->SetWidth(0.7); + +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Centered values for bars"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example20.php b/html/includes/jpgraph/src/Examples/example20.php new file mode 100644 index 0000000000..b98d04dc4f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example20.php @@ -0,0 +1,36 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); + +// Adjust fill color +$bplot->SetFillColor('orange'); +$bplot->SetWidth(1.0); +$graph->Add($bplot); + +// Setup the titles +$graph->title->Set("Bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example21.php b/html/includes/jpgraph/src/Examples/example21.php new file mode 100644 index 0000000000..3b7a6addd6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example21.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->xgrid->Show(true,true); +$graph->xaxis->SetTextTickInterval(2); + +$graph->SetShadow(); +$graph->img->SetMargin(40,30,20,40); + +// Create the bar plots +$b1plot = new BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$b2plot = new BarPlot($data2y); +$b2plot->SetFillColor("blue"); + +// Create the grouped bar plot +$gbplot = new GroupBarPlot(array($b1plot,$b2plot)); + +// ...and add it to the graPH +$graph->Add($gbplot); + +$graph->title->Set("Example 21"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example22.php b/html/includes/jpgraph/src/Examples/example22.php new file mode 100644 index 0000000000..17cb8182c8 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example22.php @@ -0,0 +1,38 @@ +SetScale("textlin"); +$graph->SetShadow(); + +$graph->img->SetMargin(40,30,20,40); + +// Create the bar plots +$b1plot = new BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$b2plot = new BarPlot($data2y); +$b2plot->SetFillColor("blue"); + +// Create the grouped bar plot +$gbplot = new GroupBarPlot(array($b1plot,$b2plot)); +$gbplot->SetWidth(0.9); + +// ...and add it to the graPH +$graph->Add($gbplot); + +$graph->title->Set("Adjusting the width"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example23.php b/html/includes/jpgraph/src/Examples/example23.php new file mode 100644 index 0000000000..d529f10aed --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example23.php @@ -0,0 +1,37 @@ +SetScale("textlin"); + +$graph->SetShadow(); +$graph->img->SetMargin(40,30,20,40); + +// Create the bar plots +$b1plot = new BarPlot($data1y); +$b1plot->SetFillColor("blue"); +$b2plot = new BarPlot($data2y); +$b2plot->SetFillColor("orange"); + +// Create the grouped bar plot +$gbplot = new AccBarPlot(array($b1plot,$b2plot)); + +// ...and add it to the graPH +$graph->Add($gbplot); + +$graph->title->Set("Accumulated bar plots"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example24.php b/html/includes/jpgraph/src/Examples/example24.php new file mode 100644 index 0000000000..dce7868867 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example24.php @@ -0,0 +1,46 @@ +SetScale("textlin"); + +$graph->SetShadow(); +$graph->img->SetMargin(40,30,20,40); + +$b1plot = new BarPlot($data1y); +$b1plot->SetFillColor("orange"); +$b2plot = new BarPlot($data2y); +$b2plot->SetFillColor("blue"); +$b3plot = new BarPlot($data3y); +$b3plot->SetFillColor("green"); +$b4plot = new BarPlot($data4y); +$b4plot->SetFillColor("brown"); + +// Create the accumulated bar plots +$ab1plot = new AccBarPlot(array($b1plot,$b2plot)); +$ab2plot = new AccBarPlot(array($b3plot,$b4plot)); + +// Create the grouped bar plot +$gbplot = new GroupBarPlot(array($ab1plot,$ab2plot)); + +// ...and add it to the graph +$graph->Add($gbplot); + +$graph->title->Set("Grouped Accumulated bar plots"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example25.1.php b/html/includes/jpgraph/src/Examples/example25.1.php new file mode 100644 index 0000000000..5ecee62f12 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example25.1.php @@ -0,0 +1,41 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); +$graph->Add($bplot); + +// Create and add a new text +$txt=new Text("This is a text"); +$txt->Pos(10,25); +$txt->SetFont(FF_FONT1,FS_BOLD); +$txt->SetBox('yellow','navy','gray'); +$txt->SetColor("red"); +$graph->AddText($txt); + + +// Setup the titles +$graph->title->Set("A simple bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example25.2.php b/html/includes/jpgraph/src/Examples/example25.2.php new file mode 100644 index 0000000000..42d52c08d8 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example25.2.php @@ -0,0 +1,42 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); +$graph->Add($bplot); + +// Create and add a new text +$txt=new Text("This is a text\nwith many\nand even\nmore\nlines of text"); +$txt->Pos(0.5,0.5,"center","center"); +$txt->SetFont(FF_FONT2,FS_BOLD); +$txt->ParagraphAlign('cenetered'); +$txt->SetBox('yellow','navy','gray'); +$txt->SetColor("red"); +$graph->AddText($txt); + + +// Setup the titles +$graph->title->Set("A simple bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example25.php b/html/includes/jpgraph/src/Examples/example25.php new file mode 100644 index 0000000000..004efdd281 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example25.php @@ -0,0 +1,39 @@ +SetScale("textlin"); + +// Add a drop shadow +$graph->SetShadow(); + +// Adjust the margin a bit to make more room for titles +$graph->img->SetMargin(40,30,20,40); + +// Create a bar pot +$bplot = new BarPlot($datay); +$graph->Add($bplot); + +// Create and add a new text +$txt=new Text("This is a text"); +$txt->Pos(0,0); +$txt->SetColor("red"); +$graph->AddText($txt); + + +// Setup the titles +$graph->title->Set("A simple bar graph"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example26.1.php b/html/includes/jpgraph/src/Examples/example26.1.php new file mode 100644 index 0000000000..91762625fe --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example26.1.php @@ -0,0 +1,23 @@ +SetShadow(); + +$graph->title->Set("A simple Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->SetLegends($gDateLocale->GetShortMonth()); +$p1->SetCenter(0.4); +$p1->SetValueType(PIE_VALUE_ABS); +$p1->value->SetFormat('%d'); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/example26.php b/html/includes/jpgraph/src/Examples/example26.php new file mode 100644 index 0000000000..f9c0ed2902 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example26.php @@ -0,0 +1,18 @@ +SetShadow(); + +$graph->title->Set("A simple Pie plot"); + +$p1 = new PiePlot($data); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/example27.1.php b/html/includes/jpgraph/src/Examples/example27.1.php new file mode 100644 index 0000000000..bbcf2cb9e0 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example27.1.php @@ -0,0 +1,25 @@ +SetShadow(); + +$graph->title->Set("A simple Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot3D($data); +$p1->SetAngle(20); +$p1->SetSize(0.5); +$p1->SetCenter(0.45); +$p1->SetLegends($gDateLocale->GetShortMonth()); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/example27.2.php b/html/includes/jpgraph/src/Examples/example27.2.php new file mode 100644 index 0000000000..0566380a9a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example27.2.php @@ -0,0 +1,24 @@ +SetShadow(); + +$graph->title->Set("A simple Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->ExplodeSlice(1); +$p1->SetCenter(0.45); +$p1->SetLegends($gDateLocale->GetShortMonth()); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/example27.3.php b/html/includes/jpgraph/src/Examples/example27.3.php new file mode 100644 index 0000000000..d55bfe8b8d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example27.3.php @@ -0,0 +1,24 @@ +SetShadow(); + +$graph->title->Set("A simple 3D Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot3D($data); +$p1->ExplodeSlice(1); +$p1->SetCenter(0.45); +$p1->SetLegends($gDateLocale->GetShortMonth()); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/example27.php b/html/includes/jpgraph/src/Examples/example27.php new file mode 100644 index 0000000000..918830f84d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example27.php @@ -0,0 +1,24 @@ +SetShadow(); + +$graph->title->Set("A simple Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot3D($data); +$p1->SetSize(0.5); +$p1->SetCenter(0.45); +$p1->SetLegends($gDateLocale->GetShortMonth()); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/example28.1.php b/html/includes/jpgraph/src/Examples/example28.1.php new file mode 100644 index 0000000000..ed4f17f387 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example28.1.php @@ -0,0 +1,22 @@ +SetShadow(); + +$graph->title->Set("'earth' Theme"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->SetTheme("earth"); +$p1->SetCenter(0.5,0.55); +$p1->value->Show(false); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/example28.2.php b/html/includes/jpgraph/src/Examples/example28.2.php new file mode 100644 index 0000000000..9eb755df1d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example28.2.php @@ -0,0 +1,22 @@ +SetShadow(); + +$graph->title->Set("'pastel' Theme"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->SetTheme("pastel"); +$p1->SetCenter(0.5,0.55); +$p1->value->Show(false); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/example28.3.php b/html/includes/jpgraph/src/Examples/example28.3.php new file mode 100644 index 0000000000..0b12e4e0c4 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example28.3.php @@ -0,0 +1,22 @@ +SetShadow(); + +$graph->title->Set("'water' Theme"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->SetTheme("water"); +$p1->SetCenter(0.5,0.55); +$p1->value->Show(false); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/example28.php b/html/includes/jpgraph/src/Examples/example28.php new file mode 100644 index 0000000000..8b8d36b09f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example28.php @@ -0,0 +1,22 @@ +SetShadow(); + +$graph->title->Set("'sand' Theme"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.5,0.55); +$p1->value->Show(false); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/example3.1.php b/html/includes/jpgraph/src/Examples/example3.1.php new file mode 100644 index 0000000000..fa57d0e63b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example3.1.php @@ -0,0 +1,35 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->mark->SetType(MARK_UTRIANGLE); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40,20,20,40); +$graph->title->Set("Example 3.1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$graph->yaxis->SetColor("red"); +$graph->yaxis->SetWeight(2); +$graph->SetShadow(); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example3.2.1.php b/html/includes/jpgraph/src/Examples/example3.2.1.php new file mode 100644 index 0000000000..5a3da51aad --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example3.2.1.php @@ -0,0 +1,35 @@ +SetScale("textlin"); +$graph->yaxis->scale->SetGrace(10,10); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->mark->SetType(MARK_CIRCLE); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40,20,20,40); +$graph->title->Set("Grace value, version 1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$graph->yaxis->SetWeight(2); +$graph->SetShadow(); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example3.2.2.php b/html/includes/jpgraph/src/Examples/example3.2.2.php new file mode 100644 index 0000000000..8d2839f93e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example3.2.2.php @@ -0,0 +1,37 @@ +SetScale("textlin"); +$graph->yaxis->scale->SetGrace(10,10); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->mark->SetType(MARK_CIRCLE); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40,20,20,40); +$graph->title->Set("Grace value version 2"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->xaxis->SetPos('min'); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$graph->yaxis->SetWeight(2); +$graph->SetShadow(); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example3.2.php b/html/includes/jpgraph/src/Examples/example3.2.php new file mode 100644 index 0000000000..55637f9b12 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example3.2.php @@ -0,0 +1,34 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->mark->SetType(MARK_CIRCLE); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40,20,20,40); +$graph->title->Set("Example 3.2"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$graph->yaxis->SetWeight(2); +$graph->SetShadow(); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example3.3.php b/html/includes/jpgraph/src/Examples/example3.3.php new file mode 100644 index 0000000000..b8b8ab6488 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example3.3.php @@ -0,0 +1,37 @@ +SetScale("textlin"); + +// Adjust the margin +$graph->img->SetMargin(40,20,20,40); +$graph->SetShadow(); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->mark->SetType(MARK_UTRIANGLE); +$lineplot->value->show(); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->title->Set("Displaying the values"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example3.4.php b/html/includes/jpgraph/src/Examples/example3.4.php new file mode 100644 index 0000000000..05b1e444aa --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example3.4.php @@ -0,0 +1,41 @@ +SetScale("textlin"); + +// Adjust the margin +$graph->img->SetMargin(40,20,20,40); +$graph->SetShadow(); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot->mark->SetType(MARK_UTRIANGLE); +$lineplot->value->show(); +$lineplot->value->SetColor('darkred'); +$lineplot->value->SetFont(FF_FONT1,FS_BOLD); +$lineplot->value->SetFormat('$%0.1f'); + + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->title->Set("Displaying the values"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example3.php b/html/includes/jpgraph/src/Examples/example3.php new file mode 100644 index 0000000000..bebbf91ab1 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example3.php @@ -0,0 +1,35 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); + + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->img->SetMargin(40,20,20,40); +$graph->title->Set("Example 3"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$graph->yaxis->SetColor("red"); +$graph->yaxis->SetWeight(2); +$graph->SetShadow(); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example4.php b/html/includes/jpgraph/src/Examples/example4.php new file mode 100644 index 0000000000..201cefbf83 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example4.php @@ -0,0 +1,42 @@ +SetScale("textlin"); + +// Create the linear plot +$lineplot=new LinePlot($ydata); + +$lineplot2=new LinePlot($ydata2); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->Add($lineplot2); + +$graph->img->SetMargin(40,20,20,40); +$graph->title->Set("Example 4"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("red"); +$graph->yaxis->SetWeight(2); +$graph->SetShadow(); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example5.1.php b/html/includes/jpgraph/src/Examples/example5.1.php new file mode 100644 index 0000000000..df1d4f4969 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example5.1.php @@ -0,0 +1,47 @@ +img->SetMargin(40,40,20,40); +$graph->SetScale("textlin"); +$graph->SetY2Scale("lin"); +$graph->SetShadow(); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot2=new LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); +$graph->y2axis->SetColor("orange"); + +$graph->title->Set("Example 5"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example5.php b/html/includes/jpgraph/src/Examples/example5.php new file mode 100644 index 0000000000..d2a27db04d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example5.php @@ -0,0 +1,44 @@ +img->SetMargin(40,40,20,40); +$graph->SetScale("textlin"); +$graph->SetY2Scale("lin"); +$graph->SetShadow(); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot2=new LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); +$graph->y2axis->SetColor("orange"); + +$graph->title->Set("Example 5"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example6.1.php b/html/includes/jpgraph/src/Examples/example6.1.php new file mode 100644 index 0000000000..f00e08c8e9 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example6.1.php @@ -0,0 +1,55 @@ +SetScale("textlin"); +$graph->SetY2Scale("lin"); +$graph->SetShadow(); + +// Adjust the margin +$graph->img->SetMargin(40,40,20,70); + +// Create the two linear plot +$lineplot=new LinePlot($ydata); +$lineplot2=new LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +// Adjust the axis color +$graph->y2axis->SetColor("orange"); +$graph->yaxis->SetColor("blue"); + +$graph->title->Set("Example 6.1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Set the colors for the plots +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +// Set the legends for the plots +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +// Adjust the legend position +$graph->legend->SetLayout(LEGEND_HOR); +$graph->legend->Pos(0.4,0.95,"center","bottom"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example6.2.php b/html/includes/jpgraph/src/Examples/example6.2.php new file mode 100644 index 0000000000..b5e38cd64a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example6.2.php @@ -0,0 +1,47 @@ +SetScale("textlin"); +$graph->SetShadow(); + +// Adjust the margin +$graph->img->SetMargin(40,40,20,70); + +// Create the two linear plot +$lineplot=new LinePlot($ydata); +$lineplot->SetStepStyle(); + +// Adjust the axis color +$graph->yaxis->SetColor("blue"); + +$graph->title->Set("Example 6.2"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Set the colors for the plots +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +// Set the legends for the plots +$lineplot->SetLegend("Plot 1"); + +// Add the plot to the graph +$graph->Add($lineplot); + +// Adjust the legend position +$graph->legend->SetLayout(LEGEND_HOR); +$graph->legend->Pos(0.4,0.95,"center","bottom"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example6.php b/html/includes/jpgraph/src/Examples/example6.php new file mode 100644 index 0000000000..6e4b22f887 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example6.php @@ -0,0 +1,54 @@ +SetScale("textlin"); +$graph->SetY2Scale("lin"); +$graph->SetShadow(); + +// Adjust the margin +$graph->img->SetMargin(40,140,20,40); + +// Create the two linear plot +$lineplot=new LinePlot($ydata); +$lineplot2=new LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +// Adjust the axis color +$graph->y2axis->SetColor("orange"); +$graph->yaxis->SetColor("blue"); + +$graph->title->Set("Example 6"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +// Set the colors for the plots +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +// Set the legends for the plots +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +// Adjust the legend position +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example7.php b/html/includes/jpgraph/src/Examples/example7.php new file mode 100644 index 0000000000..24d9f7a739 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example7.php @@ -0,0 +1,44 @@ +SetScale("textlin"); +$graph->SetY2Scale("log"); +$graph->SetShadow(); +$graph->img->SetMargin(40,110,20,40); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot2=new LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$graph->yaxis->SetColor('blue'); + +$graph->title->Set("Example 7"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); +$lineplot2->SetWeight(2); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example8.1.php b/html/includes/jpgraph/src/Examples/example8.1.php new file mode 100644 index 0000000000..3025c2b5b6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example8.1.php @@ -0,0 +1,57 @@ +SetScale("textlog"); +$graph->SetY2Scale("log"); + +$graph->SetShadow(); +$graph->SetMargin(40,110,20,40); + +$graph->ygrid->Show(true,true); +$graph->xgrid->Show(true,false); + +// Create the linear plot +$lineplot=new LinePlot($ydata); + +$lineplot2=new LinePlot($y2data); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->scale->ticks->SupressFirst(); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); + +$graph->title->Set("Example 8"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); +$graph->y2axis->SetColor("orange"); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example8.php b/html/includes/jpgraph/src/Examples/example8.php new file mode 100644 index 0000000000..64c62e7b62 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example8.php @@ -0,0 +1,48 @@ +SetScale("textlog"); +$graph->SetShadow(); +$graph->img->SetMargin(40,110,20,40); + +// Show the gridlines +$graph->ygrid->Show(true,true); +$graph->xgrid->Show(true,false); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot2=new LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->title->Set("Example 8"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +// Adjust the color of the Y axis +$graph->yaxis->SetColor("blue"); + +// Specifya a legend +$lineplot->SetLegend("Plot 1"); + +// Adjust the position of the grid box +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example9.1.php b/html/includes/jpgraph/src/Examples/example9.1.php new file mode 100644 index 0000000000..896682eacc --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example9.1.php @@ -0,0 +1,50 @@ +SetScale("textlog"); + +$graph->img->SetMargin(40,110,20,40); +$graph->SetShadow(); + +$graph->ygrid->Show(true,true); +$graph->xgrid->Show(true,false); + +// Specify the tick labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +$graph->xaxis->SetTextLabelInterval(2); + +// Create the linear plot +$lineplot=new LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->title->Set("Examples 9"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); + +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example9.2.php b/html/includes/jpgraph/src/Examples/example9.2.php new file mode 100644 index 0000000000..3e5bf49088 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example9.2.php @@ -0,0 +1,52 @@ +SetScale("textlog"); + +$graph->img->SetMargin(40,110,20,50); +$graph->SetShadow(); + +$graph->ygrid->Show(true,true); +$graph->xgrid->Show(true,false); + +// Specify the tick labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); +//$graph->xaxis->SetTextLabelInterval(2); +$graph->xaxis->SetLabelAngle(90); + + +// Create the linear plot +$lineplot=new LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->title->Set("Examples 9"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); + +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/example9.php b/html/includes/jpgraph/src/Examples/example9.php new file mode 100644 index 0000000000..27a73f56ab --- /dev/null +++ b/html/includes/jpgraph/src/Examples/example9.php @@ -0,0 +1,49 @@ +SetScale("textlog"); + +$graph->img->SetMargin(40,110,20,40); +$graph->SetShadow(); + +$graph->ygrid->Show(true,true); +$graph->xgrid->Show(true,false); + +// Specify the tick labels +$a = $gDateLocale->GetShortMonth(); +$graph->xaxis->SetTickLabels($a); + +// Create the linear plot +$lineplot=new LinePlot($ydata); + +// Add the plot to the graph +$graph->Add($lineplot); + +$graph->title->Set("Examples 9"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); + +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/exampleex9.php b/html/includes/jpgraph/src/Examples/exampleex9.php new file mode 100644 index 0000000000..a5be5e6a2b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/exampleex9.php @@ -0,0 +1,63 @@ +SetScale("textlog"); + +$graph->img->SetMargin(40,110,20,40); + +$graph->SetY2Scale("log"); +$graph->SetShadow(); + +$graph->ygrid->Show(true,true); +$graph->xgrid->Show(true,false); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot2=new LinePlot($y2data); + +$graph->yaxis->scale->ticks->SupressFirst(); +$graph->y2axis->scale->ticks->SupressFirst(); +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); +$graph->y2axis->SetColor("orange"); + +$graph->title->Set("Examples 9"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +$graph->legend->Pos(0.05,0.5,"right","center"); + +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetTextTickInterval(2); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/fieldscatterex1.php b/html/includes/jpgraph/src/Examples/fieldscatterex1.php new file mode 100644 index 0000000000..ed2a542ef6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/fieldscatterex1.php @@ -0,0 +1,92 @@ + 1 ) $f=1; + $red = floor((1-$f)*255); + $blue = floor($f*255); + $color = array($red,0,$blue); + //echo "x=$x, y=$y, blue=$blue, red=$red
"; + return array($color,$size,$arrowsize); +} + +// Create data for a simulated pseudo-magnetic radient field +$datax = array(); +$datay = array(); +$angle = array(); +for($x=1; $x < 10; ++$x ) { + for($y=10; $y<100; $y += 10) { + $a = -1; + if( $x==$polex && $y==$poley ) continue; + if( $x==$polex ) { + if( $y > $poley ) $a=90; + else $a = 270; + } + if( $y==$poley ) { + if( $x > $polex ) $a=0; + else $a=180; + } + if( $a == -1 ) { + $d1 = $y-$poley; + $d2 = ($polex-$x)*20; + if( $y < $poley ) $d2 *= -1; + $h = sqrt($d1*$d1+$d2*$d2); + $t = -$d2/$h; + $ac = acos($t); + if( $y < $poley ) $ac += M_PI; + $a = $ac * 180/M_PI; + } + $datax[] = $x; + $datay[] = $y; + $angle[] = $a; + } +} + +// Setup the graph +$graph = new Graph(300,200); +$graph->SetScale("intlin",0,100,0,10); +$graph->SetMarginColor('lightblue'); + + +// ..and titles +$graph->title->Set("Field plot"); + +// Setup the field plot +$fp = new FieldPlot($datay,$datax,$angle); + +// Setup formatting callback +$fp->SetCallback('FldCallback'); + +// First size argument is length (in pixels of arrow) +// Second size argument is roughly size of arrow. Arrow size is specified as +// an integer in the range [0,9] +$fp->arrow->SetSize(20,2); +$fp->arrow->SetColor('navy'); + +$graph->Add($fp); + +// .. and output +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/filledgridex1.php b/html/includes/jpgraph/src/Examples/filledgridex1.php new file mode 100644 index 0000000000..adac8889bd --- /dev/null +++ b/html/includes/jpgraph/src/Examples/filledgridex1.php @@ -0,0 +1,50 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetFrame(false); +$graph->SetMargin(30,50,30,30); + +$graph->title->Set('Filled Y-grid'); + + +$graph->yaxis->HideZeroLabel(); +$graph->ygrid->SetFill(true,'#EFEFEF@0.5','#BBCCFF@0.5'); +$graph->xgrid->Show(); + +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +// Create the first line +$p1 = new LinePlot($datay1); +$p1->SetColor("navy"); +$p1->SetLegend('Line 1'); +$graph->Add($p1); + +// Create the second line +$p2 = new LinePlot($datay2); +$p2->SetColor("red"); +$p2->SetLegend('Line 2'); +$graph->Add($p2); + +// Create the third line +$p3 = new LinePlot($datay3); +$p3->SetColor("orange"); +$p3->SetLegend('Line 3'); +$graph->Add($p3); + +$graph->legend->SetShadow('gray@0.4',5); +$graph->legend->SetPos(0.1,0.1,'right','top'); +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/filledline01.php b/html/includes/jpgraph/src/Examples/filledline01.php new file mode 100644 index 0000000000..6f01974483 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/filledline01.php @@ -0,0 +1,24 @@ +img->SetMargin(40,40,40,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example of filled line plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new LinePlot($datay); +$p1->SetFillColor("orange"); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$graph->Add($p1); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/filledlineex01.1.php b/html/includes/jpgraph/src/Examples/filledlineex01.1.php new file mode 100644 index 0000000000..124690d03a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/filledlineex01.1.php @@ -0,0 +1,24 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40,40,40,40); +$graph->SetShadow(); +$graph->SetGridDepth(DEPTH_FRONT); + +$graph->title->Set("Example of filled line plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new LinePlot($datay); +$p1->SetFillColor("orange"); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$graph->Add($p1); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/filledlineex01.php b/html/includes/jpgraph/src/Examples/filledlineex01.php new file mode 100644 index 0000000000..3bc240bef3 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/filledlineex01.php @@ -0,0 +1,23 @@ +SetScale("textlin"); + +$graph->img->SetMargin(40,40,40,40); +$graph->SetShadow(); + +$graph->title->Set("Example of filled line plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new LinePlot($datay); +$p1->SetFillColor("orange"); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$graph->Add($p1); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/filledlineex02.php b/html/includes/jpgraph/src/Examples/filledlineex02.php new file mode 100644 index 0000000000..91476080a6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/filledlineex02.php @@ -0,0 +1,24 @@ +img->SetMargin(40,40,40,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example of filled line plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->subtitle->Set("(Starting from Y=0)"); + +$graph->yaxis->scale->SetAutoMin(0); + +$p1 = new LinePlot($datay); +$p1->SetFillColor("orange"); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$graph->Add($p1); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/filledlineex03.php b/html/includes/jpgraph/src/Examples/filledlineex03.php new file mode 100644 index 0000000000..21698b65e3 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/filledlineex03.php @@ -0,0 +1,23 @@ +SetScale('intlin'); +$graph->title->Set('Filled line with NULL values'); +//Make sure data starts from Zero whatever data we have +$graph->yscale->SetAutoMin(0); + +$p1 = new LinePlot($datay); +$p1->SetFillColor('lightblue'); +$graph->Add($p1); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/filledstepstyleex1.php b/html/includes/jpgraph/src/Examples/filledstepstyleex1.php new file mode 100644 index 0000000000..41bcbaebc4 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/filledstepstyleex1.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->SetShadow(true); +$graph->SetMarginColor("antiquewhite"); +$graph->img->SetMargin(60,40,40,50); +$graph->img->setTransparent("white"); +$graph->xaxis->SetFont(FF_FONT1); +$graph->xaxis->setTextTickInterval(1); +$graph->xaxis->SetTextLabelInterval(1); +$graph->legend->SetFillColor("antiquewhite"); +$graph->legend->SetShadow(true); +$graph->legend->SetLayout(LEGEND_VERT); +$graph->legend->Pos(0.02,0.01); +$graph->title->Set("Step Styled Example"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot = new LinePlot($ydata); +$lineplot->SetColor("black"); +$lineplot->setFillColor("gray7"); +$lineplot->SetStepStyle(); +$lineplot->SetLegend(" 2002 "); + +// add plot to the graph +$graph->Add($lineplot); +$graph->ygrid->show(false,false); + +// display graph +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/fixscale_radarex1.php b/html/includes/jpgraph/src/Examples/fixscale_radarex1.php new file mode 100644 index 0000000000..82f4e6fb2c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/fixscale_radarex1.php @@ -0,0 +1,37 @@ +SetScale("lin",0,50); +$graph->yscale->ticks->Set(25,5); +$graph->SetColor("white"); +$graph->SetShadow(); + +$graph->SetCenter(0.5,0.55); + +$graph->axis->SetFont(FF_FONT1,FS_BOLD); +$graph->axis->SetWeight(2); + +// Uncomment the following lines to also show grid lines. +//$graph->grid->SetLineStyle("longdashed"); +//$graph->grid->SetColor("navy"); +//$graph->grid->Show(); + +$graph->ShowMinorTickMarks(); + +$graph->title->Set("Quality result"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->SetTitles(array("One","Two","Three","Four","Five","Sex","Seven","Eight","Nine","Ten")); + +$plot = new RadarPlot(array(12,35,20,30,33,15,37)); +$plot->SetLegend("Goal"); +$plot->SetColor("red","lightred"); +$plot->SetFillColor('lightblue'); +$plot->SetLineWeight(2); + +$graph->Add($plot); +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/funcex1.php b/html/includes/jpgraph/src/Examples/funcex1.php new file mode 100644 index 0000000000..b324c2b771 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/funcex1.php @@ -0,0 +1,58 @@ +E(-1.2*M_PI,1.2*M_PI); + +$f = new FuncGenerator('$x*$x'); +list($x2data,$y2data) = $f->E(-2,2); + +// Setup the basic graph +$graph = new Graph(450,350,"auto"); +$graph->SetScale("linlin"); +$graph->SetShadow(); +$graph->img->SetMargin(50,50,60,40); +$graph->SetBox(true,'black',2); +$graph->SetMarginColor('white'); +$graph->SetColor('lightyellow'); + +// ... and titles +$graph->title->Set('Example of Function plot'); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->subtitle->Set("(With some more advanced axis formatting\nHiding first and last label)"); +$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL); +$graph->xgrid->Show(); + +$graph->yaxis->SetPos(0); +$graph->yaxis->SetWeight(2); +$graph->yaxis->HideZeroLabel(); +$graph->yaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->SetColor('black','darkblue'); +$graph->yaxis->HideTicks(true,false); +$graph->yaxis->HideFirstLastLabel(); + +$graph->xaxis->SetWeight(2); +$graph->xaxis->HideZeroLabel(); +$graph->xaxis->HideFirstLastLabel(); +$graph->xaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->SetColor('black','darkblue'); + +$lp1 = new LinePlot($ydata,$xdata); +$lp1->SetColor('blue'); +$lp1->SetWeight(2); + +$lp2 = new LinePlot($y2data,$x2data); +list($xm,$ym)=$lp2->Max(); +$lp2->SetColor('red'); +$lp2->SetWeight(2); + + +$graph->Add($lp1); +$graph->Add($lp2); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/funcex2.php b/html/includes/jpgraph/src/Examples/funcex2.php new file mode 100644 index 0000000000..80dbe3b516 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/funcex2.php @@ -0,0 +1,34 @@ +E(-M_PI,M_PI,25); + +$graph = new Graph(380,450,"auto"); +$graph->SetScale("linlin"); +$graph->SetShadow(); +$graph->img->SetMargin(50,50,60,40); +$graph->SetBox(true,'black',2); +$graph->SetMarginColor('white'); +$graph->SetColor('lightyellow'); +$graph->SetAxisStyle(AXSTYLE_SIMPLE); + +//$graph->xaxis->SetLabelFormat('%.1f'); + +$graph->title->Set("Function plot with marker"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->subtitle->Set("(BOXOUT Axis style)"); +$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL); + +$lp1 = new LinePlot($ydata,$xdata); +$lp1->mark->SetType(MARK_FILLEDCIRCLE); +$lp1->mark->SetFillColor("red"); +$lp1->SetColor("blue"); + +$graph->Add($lp1); +$graph->Stroke(); +?> + + diff --git a/html/includes/jpgraph/src/Examples/funcex3.php b/html/includes/jpgraph/src/Examples/funcex3.php new file mode 100644 index 0000000000..046c27ddfe --- /dev/null +++ b/html/includes/jpgraph/src/Examples/funcex3.php @@ -0,0 +1,37 @@ +E(-M_PI,M_PI,25); + +$graph = new Graph(350,430,"auto"); +$graph->SetScale("linlin"); +$graph->SetShadow(); +$graph->img->SetMargin(50,50,60,40); +$graph->SetBox(true,'black',2); +$graph->SetMarginColor('white'); +$graph->SetColor('lightyellow'); +$graph->SetAxisStyle(AXSTYLE_BOXIN); +$graph->xgrid->Show(); + + +//$graph->xaxis->SetLabelFormat('%.0f'); + +$graph->img->SetMargin(50,50,60,40); + +$graph->title->Set("Function plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->subtitle->Set("(BOXIN Axis style)"); +$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL); + +$lp1 = new LinePlot($ydata,$xdata); +$lp1->SetColor("blue"); +$lp1->SetWeight(2); + +$graph->Add($lp1); +$graph->Stroke(); +?> + + diff --git a/html/includes/jpgraph/src/Examples/funcex4.php b/html/includes/jpgraph/src/Examples/funcex4.php new file mode 100644 index 0000000000..ad8db88d45 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/funcex4.php @@ -0,0 +1,63 @@ +E(-1.2*M_PI,1.2*M_PI); + +$f = new FuncGenerator('$x*$x'); +list($x2data,$y2data) = $f->E(-2,2); + +// Setup the basic graph +$graph = new Graph(450,350,"auto"); +$graph->SetScale("linlin"); +//$graph->SetShadow(); +$graph->img->SetMargin(5,10,60,9); +$graph->SetBox(true,'green',2); +$graph->SetMarginColor('black'); +$graph->SetColor('black'); + +// ... and titles +$graph->title->Set('Example of Function plot'); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->title->SetColor('lightgreen'); +$graph->subtitle->Set("(With some more advanced axis formatting\nHiding first and last label)"); +$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL); +$graph->subtitle->SetColor('lightgreen'); + +$graph->xgrid->Show(); +$graph->xgrid->SetColor('darkgreen'); +$graph->ygrid->SetColor('darkgreen'); + +$graph->yaxis->SetPos(0); +$graph->yaxis->SetWeight(2); +$graph->yaxis->HideZeroLabel(); +$graph->yaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->SetColor('green','green'); +$graph->yaxis->HideTicks(true,true); +$graph->yaxis->HideFirstLastLabel(); + +$graph->xaxis->SetWeight(2); +$graph->xaxis->HideZeroLabel(); +$graph->xaxis->HideFirstLastLabel(); +$graph->xaxis->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->SetColor('green','green'); + +$lp1 = new LinePlot($ydata,$xdata); +$lp1->SetColor('yellow'); +$lp1->SetWeight(2); + +$lp2 = new LinePlot($y2data,$x2data); +list($xm,$ym)=$lp2->Max(); +$lp2->SetColor('blue'); +$lp2->SetWeight(2); + + +$graph->Add($lp1); +$graph->Add($lp2); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/ganttconstrainex0.php b/html/includes/jpgraph/src/Examples/ganttconstrainex0.php new file mode 100644 index 0000000000..a9a8920222 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttconstrainex0.php @@ -0,0 +1,38 @@ +title->Set("Example with grouping and constrains"); + +// Setup scale +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); + +// Add the specified activities +$graph->CreateSimple($data,$constrains,$progress); + +// .. and stroke the graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/ganttconstrainex1.php b/html/includes/jpgraph/src/Examples/ganttconstrainex1.php new file mode 100644 index 0000000000..7d3ed5309f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttconstrainex1.php @@ -0,0 +1,39 @@ +title->Set("Example with grouping and constrains"); + +// Setup scale +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); + +// Add the specified activities +$graph->CreateSimple($data,$constrains,$progress); + +// .. and stroke the graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/ganttconstrainex2.php b/html/includes/jpgraph/src/Examples/ganttconstrainex2.php new file mode 100644 index 0000000000..2e079dd932 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttconstrainex2.php @@ -0,0 +1,39 @@ +title->Set("Example with grouping and constrains"); +//$graph->SetFrame(false); + +// Setup scale +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); + +// Add the specified activities +$graph->CreateSimple($data,$constrains,$progress); + +// .. and stroke the graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/ganttcsimex01.php b/html/includes/jpgraph/src/Examples/ganttcsimex01.php new file mode 100644 index 0000000000..50a67d2048 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttcsimex01.php @@ -0,0 +1,28 @@ +SetCSIMTarget('#','Go back 1'); +$bar1->title->SetCSIMTarget('#','Go back 1 (title)'); +$bar2 = new GanttBar(1,"Activity 2","2002-01-03","2002-01-25"); +$bar2->SetCSIMTarget('#','Go back 2'); +$bar2->title->SetCSIMTarget('#','Go back 2 (title)'); + +$graph = new GanttGraph(500); +$graph->title->Set("Example with image map"); +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetFont(FF_FONT1); + +$graph->Add(array($bar1,$bar2)); + +// And stroke +$graph->StrokeCSIM(); + + +?> + + diff --git a/html/includes/jpgraph/src/Examples/ganttcsimex02.php b/html/includes/jpgraph/src/Examples/ganttcsimex02.php new file mode 100644 index 0000000000..7ec82142ca --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttcsimex02.php @@ -0,0 +1,40 @@ +title->Set("Example with image map"); +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetFont(FF_FONT1); + +$graph->CreateSimple($data,$constrains,$progress); + +// Add the specified activities +//SetupSimpleGantt($graph,$data,$constrains,$progress); + +// And stroke +$graph->StrokeCSIM(); + + +?> + + diff --git a/html/includes/jpgraph/src/Examples/ganttex00.php b/html/includes/jpgraph/src/Examples/ganttex00.php new file mode 100644 index 0000000000..42141895c6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex00.php @@ -0,0 +1,14 @@ +Add($activity); + +// Display the Gantt chart +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex01.php b/html/includes/jpgraph/src/Examples/ganttex01.php new file mode 100644 index 0000000000..30e6263b0a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex01.php @@ -0,0 +1,40 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex02.php b/html/includes/jpgraph/src/Examples/ganttex02.php new file mode 100644 index 0000000000..76ec5b4495 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex02.php @@ -0,0 +1,42 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("Main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); + +// Show day, week and month scale +//$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); +$graph->ShowHeaders(GANTT_HWEEK ); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_WNBR); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-02-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex03.php b/html/includes/jpgraph/src/Examples/ganttex03.php new file mode 100644 index 0000000000..d4a0e40e08 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex03.php @@ -0,0 +1,42 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(7,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex04.php b/html/includes/jpgraph/src/Examples/ganttex04.php new file mode 100644 index 0000000000..5796854d91 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex04.php @@ -0,0 +1,46 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$graph->Add($milestone); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex05.php b/html/includes/jpgraph/src/Examples/ganttex05.php new file mode 100644 index 0000000000..1ea07b0d71 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex05.php @@ -0,0 +1,48 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex06.php b/html/includes/jpgraph/src/Examples/ganttex06.php new file mode 100644 index 0000000000..35b28d5b64 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex06.php @@ -0,0 +1,52 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex07.php b/html/includes/jpgraph/src/Examples/ganttex07.php new file mode 100644 index 0000000000..d2902b9a4f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex07.php @@ -0,0 +1,53 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex08.php b/html/includes/jpgraph/src/Examples/ganttex08.php new file mode 100644 index 0000000000..9255433616 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex08.php @@ -0,0 +1,63 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Add a right marker +$activity->rightMark->Show(); +$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetWidth(13); +$activity->rightMark->SetColor("red"); +$activity->rightMark->SetFillColor("red"); +$activity->rightMark->title->Set("M5"); +$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity->rightMark->title->SetColor("white"); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex09.php b/html/includes/jpgraph/src/Examples/ganttex09.php new file mode 100644 index 0000000000..7ebf6b564f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex09.php @@ -0,0 +1,66 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Add a right marker +$activity->rightMark->Show(); +$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetWidth(13); +$activity->rightMark->SetColor("red"); +$activity->rightMark->SetFillColor("red"); +$activity->rightMark->title->Set("M5"); +$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity->rightMark->title->SetColor("white"); + +// Set absolute height +$activity->SetHeight(8); + +// Finally add the bar to the graph +$graph->Add($activity); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex10.php b/html/includes/jpgraph/src/Examples/ganttex10.php new file mode 100644 index 0000000000..1966ea1d30 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex10.php @@ -0,0 +1,90 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Add a right marker +$activity->rightMark->Show(); +$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetWidth(13); +$activity->rightMark->SetColor("red"); +$activity->rightMark->SetFillColor("red"); +$activity->rightMark->title->Set("M5"); +$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity->rightMark->title->SetColor("white"); + +// Set absolute height +$activity->SetHeight(1); + + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Add a right marker +$activity2->rightMark->Show(); +$activity2->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity2->rightMark->SetWidth(13); +$activity2->rightMark->SetColor("red"); +$activity2->rightMark->SetFillColor("red"); +$activity2->rightMark->title->Set("M5"); +$activity2->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity2->rightMark->title->SetColor("white"); + +// Set absolute height +$activity2->SetHeight(1); + + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex11.php b/html/includes/jpgraph/src/Examples/ganttex11.php new file mode 100644 index 0000000000..0408f5561b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex11.php @@ -0,0 +1,89 @@ +SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Add a right marker +$activity->rightMark->Show(); +$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetWidth(13); +$activity->rightMark->SetColor("red"); +$activity->rightMark->SetFillColor("red"); +$activity->rightMark->title->Set("M5"); +$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity->rightMark->title->SetColor("white"); + +// Set absolute height +$activity->SetHeight(10); + + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Add a right marker +$activity2->rightMark->Show(); +$activity2->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity2->rightMark->SetWidth(13); +$activity2->rightMark->SetColor("red"); +$activity2->rightMark->SetFillColor("red"); +$activity2->rightMark->title->Set("M5"); +$activity2->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity2->rightMark->title->SetColor("white"); + +// Set absolute height +$activity2->SetHeight(10); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex12.php b/html/includes/jpgraph/src/Examples/ganttex12.php new file mode 100644 index 0000000000..e19dd39f7e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex12.php @@ -0,0 +1,93 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("A nice main title"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(Draft version)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(0); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Add a right marker +$activity->rightMark->Show(); +$activity->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity->rightMark->SetWidth(13); +$activity->rightMark->SetColor("red"); +$activity->rightMark->SetFillColor("red"); +$activity->rightMark->title->Set("M5"); +$activity->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity->rightMark->title->SetColor("white"); + +// Set absolute height +$activity->SetHeight(10); + + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-20"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Add a right marker +$activity2->rightMark->Show(); +$activity2->rightMark->SetType(MARK_FILLEDCIRCLE); +$activity2->rightMark->SetWidth(13); +$activity2->rightMark->SetColor("red"); +$activity2->rightMark->SetFillColor("red"); +$activity2->rightMark->title->Set("M5"); +$activity2->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); +$activity2->rightMark->title->SetColor("white"); + +// Set absolute height +$activity2->SetHeight(10); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Create a miletone +$milestone = new MileStone(2,"Milestone","2002-01-15","2002-01-15"); +$milestone->title->SetColor("black"); +$milestone->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($milestone); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex13.php b/html/includes/jpgraph/src/Examples/ganttex13.php new file mode 100644 index 0000000000..aff2d2fbd9 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex13.php @@ -0,0 +1,71 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex13.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Instead of week number show the date for the first day in the week +// on the week scale +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Make the week scale font smaller than the default +$graph->scale->week->SetFont(FF_FONT0); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR4); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[ER,TR]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[BO,SW,JC]"); + +// ADjust font for caption +$activity2->caption->SetFont(FF_ARIAL,FS_BOLD); +$activity2->caption->SetColor("darkred"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex14.php b/html/includes/jpgraph/src/Examples/ganttex14.php new file mode 100644 index 0000000000..ef7195c321 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex14.php @@ -0,0 +1,67 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex14.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); + + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex15.php b/html/includes/jpgraph/src/Examples/ganttex15.php new file mode 100644 index 0000000000..af1468d75e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex15.php @@ -0,0 +1,68 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex15.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex16.php b/html/includes/jpgraph/src/Examples/ganttex16.php new file mode 100644 index 0000000000..c8e2a0396d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex16.php @@ -0,0 +1,73 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex16.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Set table title +$graph->scale->tableTitle->Set("(Rev: 1.22)"); +$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD); +$graph->scale->SetTableTitleBackground("silver"); +$graph->scale->tableTitle->Show(); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex17.php b/html/includes/jpgraph/src/Examples/ganttex17.php new file mode 100644 index 0000000000..f8f90f8e73 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex17.php @@ -0,0 +1,78 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex17.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Set table title +$graph->scale->tableTitle->Set("(Rev: 1.22)"); +$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD); +$graph->scale->SetTableTitleBackground("silver"); + +// Modify the appearance of the dividing lines +$graph->scale->divider->SetWeight(3); +$graph->scale->divider->SetColor("navy"); +$graph->scale->dividerh->SetWeight(3); +$graph->scale->dividerh->SetColor("navy"); + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex18.php b/html/includes/jpgraph/src/Examples/ganttex18.php new file mode 100644 index 0000000000..7ccfe4facb --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex18.php @@ -0,0 +1,82 @@ +SetBox(); +$graph->SetShadow(); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex18.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Set table title +$graph->scale->tableTitle->Set("(Rev: 1.22)"); +$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD); +$graph->scale->SetTableTitleBackground("silver"); + +// Modify the appearance of the dividing lines +$graph->scale->divider->SetWeight(3); +$graph->scale->divider->SetColor("navy"); + +$graph->scale->dividerh->SetWeight(3); +$graph->scale->dividerh->SetColor("navy"); + +$graph->SetBox(true,"navy",3); + + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex19.php b/html/includes/jpgraph/src/Examples/ganttex19.php new file mode 100644 index 0000000000..091d82e698 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex19.php @@ -0,0 +1,84 @@ +SetBox(); +$graph->SetShadow(); + +// Use swedish locale +$graph->scale->SetDateLocale("sv_SE"); + +// Add title and subtitle +$graph->title->Set("Example of captions"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->subtitle->Set("(ganttex19.php)"); + +// Show day, week and month scale +$graph->ShowHeaders(GANTT_HDAY | GANTT_HWEEK | GANTT_HMONTH); + +// Set table title +$graph->scale->tableTitle->Set("(Rev: 1.22)"); +$graph->scale->tableTitle->SetFont(FF_FONT1,FS_BOLD); +$graph->scale->SetTableTitleBackground("silver"); +$graph->scale->tableTitle->Show(); + +$graph->scale->divider->SetStyle('solid'); +$graph->scale->divider->SetWeight(2); +$graph->scale->divider->SetColor('black'); + + +$graph->SetBox(true,"navy",2); + + +// Use the short name of the month together with a 2 digit year +// on the month scale +$graph->scale->month->SetStyle(MONTHSTYLE_SHORTNAMEYEAR2); +$graph->scale->month->SetFontColor("white"); +$graph->scale->month->SetBackgroundColor("blue"); + +// 0 % vertical label margin +$graph->SetLabelVMarginFactor(1); + +// Format the bar for the first activity +// ($row,$title,$startdate,$enddate) +$activity = new GanttBar(0,"Project","2001-12-21","2002-01-07","[50%]"); + +// Yellow diagonal line pattern on a red background +$activity->SetPattern(BAND_RDIAG,"yellow"); +$activity->SetFillColor("red"); + +// Set absolute height +$activity->SetHeight(10); + +// Specify progress to 60% +$activity->progress->Set(0.6); +$activity->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Format the bar for the second activity +// ($row,$title,$startdate,$enddate) +$activity2 = new GanttBar(1,"Project","2001-12-21","2002-01-02","[30%]"); + +// Yellow diagonal line pattern on a red background +$activity2->SetPattern(BAND_RDIAG,"yellow"); +$activity2->SetFillColor("red"); + +// Set absolute height +$activity2->SetHeight(10); + +// Specify progress to 30% +$activity2->progress->Set(0.3); +$activity2->progress->SetPattern(BAND_HVCROSS,"blue"); + +// Finally add the bar to the graph +$graph->Add($activity); +$graph->Add($activity2); + +// Add a vertical line +$vline = new GanttVLine("2001-12-24","Phase 1"); +$vline->SetDayOffset(0.5); +//$graph->Add($vline); + +// ... and display it +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/ganttex30.php b/html/includes/jpgraph/src/Examples/ganttex30.php new file mode 100644 index 0000000000..d1cb9a8198 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex30.php @@ -0,0 +1,87 @@ +SetShadow(); +$graph->SetBox(); + +// Titles for chart +$graph->title->Set("General conversion plan"); +$graph->subtitle->Set("(Revision: 2001-11-18)"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,12); + +// For illustration we enable all headers. +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); + +// For the week we choose to show the start date of the week +// the default is to show week number (according to ISO 8601) +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Change the scale font +$graph->scale->week->SetFont(FF_FONT0); +$graph->scale->year->SetFont(FF_ARIAL,FS_BOLD,12); + + +// Setup some data for the gantt bars +$data = array( + array(0,"Group 1", "2001-10-29","2001-11-27",FF_FONT1,FS_BOLD,8), + array(1," Label 2", "2001-11-8","2001-12-14"), + array(2," Label 3", "2001-11-01","2001-11-8"), + array(4,"Group 2", "2001-11-07","2001-12-19",FF_FONT1,FS_BOLD,8), + array(5," Label 4", "2001-11-8","2001-12-19"), + array(6," Label 5", "2001-11-01","2001-11-8") + ); + +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + + // If you like each bar can have a shadow + // $bar->SetShadow(true,"darkgray"); + + // For illustration lets make each bar be red with yellow diagonal stripes + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("red"); + + // To indicate progress each bar can have a smaller bar within + // For illustrative purpose just set the progress to 50% for each bar + $bar->progress->Set(0.5); + + // Each bar may also have optional left and right plot marks + // As illustration lets put a filled circle with a number at the end + // of each bar + $bar->rightMark->SetType(MARK_FILLEDCIRCLE); + $bar->rightMark->SetFillColor("red"); + $bar->rightMark->SetColor("red"); + $bar->rightMark->SetWidth(10); + + // Title for the mark + $bar->rightMark->title->Set("".$i+1); + $bar->rightMark->title->SetColor("white"); + $bar->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,10); + $bar->rightMark->Show(); + + // ... and add the bar to the gantt chart + $graph->Add($bar); +} + +// Create a milestone mark +$ms = new MileStone(7,"M5","2001-12-10","10/12"); +$ms->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($ms); + +// Create a vertical line to emphasize the milestone +$vl = new GanttVLine("2001-12-10","Phase 1","darkred"); +$vl->SetDayOffset(0.5); // Center the line in the day +$graph->Add($vl); + +// Output the graph +$graph->Stroke(); + +// EOF +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/ganttex_slice.php b/html/includes/jpgraph/src/Examples/ganttex_slice.php new file mode 100644 index 0000000000..acb5fe7bfe --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttex_slice.php @@ -0,0 +1,78 @@ +SetShadow(); +$graph->SetBox(); + +// Only show part of the Gantt +$graph->SetDateRange('2001-11-22','2002-1-24'); + +// Weeks start on Sunday +$graph->scale->SetWeekStart(0); + +$graph->title->Set("General conversion plan"); +$graph->subtitle->Set("(Slice between 2001-11-22 to 2002-01-24)"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,20); + +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetFont(FF_FONT1); + + +$data = array( + array(0,"Group 1\tJohan", "2002-1-23","2002-01-28",FF_FONT1,FS_BOLD,8), + array(1," Label 2", "2001-10-26","2001-11-16"), + array(2," Label 3", "2001-11-30","2001-12-01"), + array(4,"Group 2", "2001-11-30","2001-12-22",FF_FONT1,FS_BOLD,8), + array(5," Label 4", "2001-11-30","2001-12-1"), + array(6," Label 5", "2001-12-6","2001-12-8"), + array(8," Label 8", "2001-11-30","2002-01-02") + ); + + +// make up some fictionary activity bars +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + + $bar->rightMark->Show(); + $bar->rightMark->SetType(MARK_FILLEDCIRCLE); + $bar->rightMark->SetWidth(8); + $bar->rightMark->SetColor("red"); + $bar->rightMark->SetFillColor("red"); + $bar->rightMark->title->Set($i+1); + $bar->rightMark->title->SetFont(FF_ARIAL,FS_BOLD,12); + $bar->rightMark->title->SetColor("white"); + + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("red"); + $bar->progress->Set($i/10); + $bar->progress->SetPattern(GANTT_SOLID,"darkgreen"); + + $graph->Add($bar); +} + + +// The line will NOT be shown since it is outside the specified slice +$vline = new GanttVLine("2002-02-28"); +$vline->title->Set("2002-02-28"); +$vline->title->SetFont(FF_FONT1,FS_BOLD,10); +$graph->Add($vline); + +// The milestone will NOT be shown since it is outside the specified slice +$ms = new MileStone(7,"M5","2002-01-28","28/1"); +$ms->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($ms); + +$graph->Stroke(); + + +?> + + diff --git a/html/includes/jpgraph/src/Examples/gantthgridex1.php b/html/includes/jpgraph/src/Examples/gantthgridex1.php new file mode 100644 index 0000000000..21ce4d1884 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/gantthgridex1.php @@ -0,0 +1,63 @@ +title->Set("Grid example"); +$graph->subtitle->Set("(Horizontal grid)"); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,14); + +// Specify what headers to show +$graph->ShowHeaders(GANTT_HMONTH|GANTT_HDAY ); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetFont(FF_FONT0); + +// Setup a horizontal grid +$graph->hgrid->Show(); +$graph->hgrid->SetRowFillColor('darkblue@0.9'); + + +for($i=0; $i 4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("red"); + $graph->Add($bar); +} + +// Setup a vertical marker line +$vline = new GanttVLine("2001-11-01"); +$vline->SetDayOffset(0.5); +$vline->title->Set("2001-11-01"); +$vline->title->SetFont(FF_FONT1,FS_BOLD,10); +$graph->Add($vline); + +// Setup a milestone +$ms = new MileStone(6,"M5","2001-11-28","28/12"); +$ms->title->SetFont(FF_FONT1,FS_BOLD); +$graph->Add($ms); + +// And to show that you can also add an icon we add "Tux" +$icon = new IconPlot('penguin.png',0.01,0.95,1,15); +$icon->SetAnchor('left','bottom'); +$graph->Add($icon); + +// .. and finally send it back to the browser +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/gantthourex1.php b/html/includes/jpgraph/src/Examples/gantthourex1.php new file mode 100644 index 0000000000..0cd89fed30 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/gantthourex1.php @@ -0,0 +1,51 @@ +SetMarginColor('blue:1.7'); +$graph->SetColor('white'); + +$graph->SetBackgroundGradient('navy','white',GRAD_HOR,BGRAD_MARGIN); +$graph->scale->hour->SetBackgroundColor('lightyellow:1.5'); +$graph->scale->hour->SetFont(FF_FONT1); +$graph->scale->day->SetBackgroundColor('lightyellow:1.5'); +$graph->scale->day->SetFont(FF_FONT1,FS_BOLD); + +$graph->title->Set("Example of hours in scale"); +$graph->title->SetColor('white'); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); + +$graph->ShowHeaders(GANTT_HDAY | GANTT_HHOUR); + +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); +$graph->scale->week->SetFont(FF_FONT1); +$graph->scale->hour->SetIntervall(4); + +$graph->scale->hour->SetStyle(HOURSTYLE_HM24); +$graph->scale->day->SetStyle(DAYSTYLE_SHORTDAYDATE3); + +$data = array( + array(0," Label 1", "2001-01-26 04:00","2001-01-26 14:00"), + array(1," Label 2", "2001-01-26 10:00","2001-01-26 18:00"), + array(2," Label 3", "2001-01-26","2001-01-27 10:00") +); + + +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("red"); + $graph->Add($bar); +} + +$graph->Stroke(); + + + +?> + + diff --git a/html/includes/jpgraph/src/Examples/gantthourminex1.php b/html/includes/jpgraph/src/Examples/gantthourminex1.php new file mode 100644 index 0000000000..749c27503f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/gantthourminex1.php @@ -0,0 +1,90 @@ +SetMarginColor('darkgreen@0.8'); +$graph->SetColor('white'); + +// We want to display day, hour and minute scales +$graph->ShowHeaders(GANTT_HDAY | GANTT_HHOUR | GANTT_HMIN); + +// We want to have the following titles in our columns +// describing each activity +$graph->scale->actinfo->SetColTitles( + array('Act','Duration','Start','Finish','Resp'));//,array(100,70,70,70)); + +// Uncomment the following line if you don't want the 3D look +// in the columns headers +//$graph->scale->actinfo->SetStyle(ACTINFO_2D); + +$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); + +//These are the default values for use in the columns +//$graph->scale->actinfo->SetFontColor('black'); +//$graph->scale->actinfo->SetBackgroundColor('lightgray'); +//$graph->scale->actinfo->vgrid->SetStyle('solid'); + +$graph->scale->actinfo->vgrid->SetColor('gray'); +$graph->scale->actinfo->SetColor('darkgray'); + +// Setup day format +$graph->scale->day->SetBackgroundColor('lightyellow:1.5'); +$graph->scale->day->SetFont(FF_ARIAL); +$graph->scale->day->SetStyle(DAYSTYLE_SHORTDAYDATE1); + +// Setup hour format +$graph->scale->hour->SetIntervall(1); +$graph->scale->hour->SetBackgroundColor('lightyellow:1.5'); +$graph->scale->hour->SetFont(FF_FONT0); +$graph->scale->hour->SetStyle(HOURSTYLE_H24); +$graph->scale->hour->grid->SetColor('gray:0.8'); + +// Setup minute format +$graph->scale->minute->SetIntervall(30); +$graph->scale->minute->SetBackgroundColor('lightyellow:1.5'); +$graph->scale->minute->SetFont(FF_FONT0); +$graph->scale->minute->SetStyle(MINUTESTYLE_MM); +$graph->scale->minute->grid->SetColor('lightgray'); + +$graph->scale->tableTitle->Set('Phase 1'); +$graph->scale->tableTitle->SetFont(FF_ARIAL,FS_NORMAL,12); +$graph->scale->SetTableTitleBackground('darkgreen@0.6'); +$graph->scale->tableTitle->Show(true); + +$graph->title->Set("Example of hours & mins scale"); +$graph->title->SetColor('darkgray'); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); + + +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("gray"); + $graph->Add($bar); +} + + +$vline = new GanttVLine("2001-11-27 13:00"); +$vline->title->Set("27/11 13:00"); +$vline->title->SetFont(FF_FONT1,FS_BOLD,10); +$graph->Add($vline); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/gantticonex1.php b/html/includes/jpgraph/src/Examples/gantticonex1.php new file mode 100644 index 0000000000..6b36329037 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/gantticonex1.php @@ -0,0 +1,76 @@ +title->Set("Using the builtin icons"); + +// Explicitely set the date range +// (Autoscaling will of course also work) +$graph->SetDateRange('2001-10-06','2002-4-10'); + + +// 1.5 line spacing to make more room +$graph->SetVMarginFactor(1.5); + +// Setup some nonstandard colors +$graph->SetMarginColor('lightgreen@0.8'); +$graph->SetBox(true,'yellow:0.6',2); +$graph->SetFrame(true,'darkgreen',4); +$graph->scale->divider->SetColor('yellow:0.6'); +$graph->scale->dividerh->SetColor('yellow:0.6'); + +// Display month and year scale with the gridlines +$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->scale->month->grid->SetColor('gray'); +$graph->scale->month->grid->Show(true); +$graph->scale->year->grid->SetColor('gray'); +$graph->scale->year->grid->Show(true); + +// For the titles we also add a minimum width of 100 pixels for the Task name column +$graph->scale->actinfo->SetColTitles( + array('Note','Task','Duration','Start','Finish'),array(30,100)); +$graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); +$graph->scale->actinfo->vgrid->SetStyle('solid'); +$graph->scale->actinfo->vgrid->SetColor('gray'); + +// Uncomment this to keep the columns but show no headers +//$graph->scale->actinfo->Show(false); + +// Setup the icons we want to use +$erricon = new IconImage(GICON_FOLDER,0.6); +$startconicon = new IconImage(GICON_FOLDEROPEN,0.6); +$endconicon = new IconImage(GICON_TEXTIMPORTANT,0.5); + +// Store the icons in the first column and use plain text in the others +$data = array( + array(0,array($erricon,"Pre-study","102 days","23 Nov '01","1 Mar '02") + , "2001-11-23","2002-03-1",FF_ARIAL,FS_NORMAL,8), + array(1,array($startconicon,"Prototype","21 days","26 Oct '01","16 Nov '01"), + "2001-10-26","2001-11-16",FF_ARIAL,FS_NORMAL,8), + array(2,array($endconicon,"Report","12 days","1 Mar '02","13 Mar '02"), + "2002-03-01","2002-03-13",FF_ARIAL,FS_NORMAL,8) +); + +// Create the bars and add them to the gantt chart +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("gray"); + $bar->progress->Set(0.5); + $bar->progress->SetPattern(GANTT_SOLID,"darkgreen"); + $bar->title->SetCSIMTarget(array('#1'.$i,'#2'.$i,'#3'.$i,'#4'.$i,'#5'.$i),array('11'.$i,'22'.$i,'33'.$i)); + $graph->Add($bar); +} + +// Output the chart +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/ganttmonthyearex1.php b/html/includes/jpgraph/src/Examples/ganttmonthyearex1.php new file mode 100644 index 0000000000..25128ff9b7 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttmonthyearex1.php @@ -0,0 +1,50 @@ +title->Set("Only month & year scale"); + +// Setup some "very" nonstandard colors +$graph->SetMarginColor('lightgreen@0.8'); +$graph->SetBox(true,'yellow:0.6',2); +$graph->SetFrame(true,'darkgreen',4); +$graph->scale->divider->SetColor('yellow:0.6'); +$graph->scale->dividerh->SetColor('yellow:0.6'); + +// Explicitely set the date range +// (Autoscaling will of course also work) +$graph->SetDateRange('2001-10-06','2002-4-01'); + +// Display month and year scale with the gridlines +$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->scale->month->grid->SetColor('gray'); +$graph->scale->month->grid->Show(true); +$graph->scale->year->grid->SetColor('gray'); +$graph->scale->year->grid->Show(true); + +// Data for our example activities +$data = array( + array(0,"Group 1 Johan", "2001-11-23","2002-03-1",FF_FONT1,FS_BOLD,8), + array(1," Label 2", "2001-10-26","2001-11-16")); + +// Create the bars and add them to the gantt chart +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("red"); + $bar->progress->Set(0.5); + $bar->progress->SetPattern(GANTT_SOLID,"darkgreen"); + $graph->Add($bar); +} + +// Output the chart +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/ganttmonthyearex2.php b/html/includes/jpgraph/src/Examples/ganttmonthyearex2.php new file mode 100644 index 0000000000..02703b6321 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttmonthyearex2.php @@ -0,0 +1,66 @@ +title->Set("Only month & year scale"); + +// Setup some "very" nonstandard colors +$graph->SetMarginColor('lightgreen@0.8'); +$graph->SetBox(true,'yellow:0.6',2); +$graph->SetFrame(true,'darkgreen',4); +$graph->scale->divider->SetColor('yellow:0.6'); +$graph->scale->dividerh->SetColor('yellow:0.6'); + +// Explicitely set the date range +// (Autoscaling will of course also work) +$graph->SetDateRange('2001-10-06','2002-4-10'); + +// Display month and year scale with the gridlines +$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->scale->month->grid->SetColor('gray'); +$graph->scale->month->grid->Show(true); +$graph->scale->year->grid->SetColor('gray'); +$graph->scale->year->grid->Show(true); + + +// Setup activity info + +// For the titles we also add a minimum width of 100 pixels for the Task name column +$graph->scale->actinfo->SetColTitles( + array('Name','Duration','Start','Finish'),array(100)); +$graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); +$graph->scale->actinfo->vgrid->SetStyle('solid'); +$graph->scale->actinfo->vgrid->SetColor('gray'); + +// Data for our example activities +$data = array( + array(0,array("Pre-study","102 days","23 Nov '01","1 Mar '02") + , "2001-11-23","2002-03-1",FF_ARIAL,FS_NORMAL,8), + array(1,array("Prototype","21 days","26 Oct '01","16 Nov '01"), + "2001-10-26","2001-11-16",FF_ARIAL,FS_NORMAL,8), + array(2,array("Report","12 days","1 Mar '02","13 Mar '02"), + "2002-03-01","2002-03-13",FF_ARIAL,FS_NORMAL,8) +); + +// Create the bars and add them to the gantt chart +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("gray"); + $bar->progress->Set(0.5); + $bar->progress->SetPattern(GANTT_SOLID,"darkgreen"); + $graph->Add($bar); +} + +// Output the chart +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/ganttmonthyearex3.php b/html/includes/jpgraph/src/Examples/ganttmonthyearex3.php new file mode 100644 index 0000000000..2dbf314c6b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttmonthyearex3.php @@ -0,0 +1,66 @@ +title->Set("Only month & year scale"); + +// Setup some "very" nonstandard colors +$graph->SetMarginColor('lightgreen@0.8'); +$graph->SetBox(true,'yellow:0.6',2); +$graph->SetFrame(true,'darkgreen',4); +$graph->scale->divider->SetColor('yellow:0.6'); +$graph->scale->dividerh->SetColor('yellow:0.6'); + +// Explicitely set the date range +// (Autoscaling will of course also work) +$graph->SetDateRange('2001-10-06','2002-4-10'); + +// Display month and year scale with the gridlines +$graph->ShowHeaders(GANTT_HMONTH | GANTT_HYEAR); +$graph->scale->month->grid->SetColor('gray'); +$graph->scale->month->grid->Show(true); +$graph->scale->year->grid->SetColor('gray'); +$graph->scale->year->grid->Show(true); + + +// Setup activity info + +// For the titles we also add a minimum width of 100 pixels for the Task name column +$graph->scale->actinfo->SetColTitles( + array('Type','Name','Duration','Start','Finish'),array(40,100)); +$graph->scale->actinfo->SetBackgroundColor('green:0.5@0.5'); +$graph->scale->actinfo->SetFont(FF_ARIAL,FS_NORMAL,10); +$graph->scale->actinfo->vgrid->SetStyle('solid'); +$graph->scale->actinfo->vgrid->SetColor('gray'); + +// Data for our example activities +$data = array( + array(0,array("","Pre-study","102 days","23 Nov '01","1 Mar '02") + , "2001-11-23","2002-03-1",FF_ARIAL,FS_NORMAL,8), + array(1,array("","Prototype","21 days","26 Oct '01","16 Nov '01"), + "2001-10-26","2001-11-16",FF_ARIAL,FS_NORMAL,8), + array(2,array("","Report","12 days","1 Mar '02","13 Mar '02"), + "2002-03-01","2002-03-13",FF_ARIAL,FS_NORMAL,8) +); + +// Create the bars and add them to the gantt chart +for($i=0; $i4 ) + $bar->title->SetFont($data[$i][4],$data[$i][5],$data[$i][6]); + $bar->SetPattern(BAND_RDIAG,"yellow"); + $bar->SetFillColor("gray"); + $bar->progress->Set(0.5); + $bar->progress->SetPattern(GANTT_SOLID,"darkgreen"); + $graph->Add($bar); +} + +// Output the chart +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/ganttsimpleex1.php b/html/includes/jpgraph/src/Examples/ganttsimpleex1.php new file mode 100644 index 0000000000..64e9cf7bc3 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ganttsimpleex1.php @@ -0,0 +1,31 @@ +title->Set("Gantt Graph using CreateSimple()"); + +// Setup scale +$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY); + +// Add the specified activities +$graph->CreateSimple($data); + +// .. and stroke the graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/gradbkgex1.php b/html/includes/jpgraph/src/Examples/gradbkgex1.php new file mode 100644 index 0000000000..0f25c64a7d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/gradbkgex1.php @@ -0,0 +1,66 @@ +SetMarginColor('white'); +$graph->SetScale("textlin",0,50); +$graph->SetMargin(30,50,30,30); + +// We must have the frame enabled to get the gradient +// However, we don't want the frame line so we set it to +// white color which makes it invisible. +$graph->SetFrame(true,'white'); + +// Setup a background gradient image +$graph->SetBackgroundGradient('blue','navy:0.5',GRAD_HOR,BGRAD_PLOT); + +// Setup the tab title +$graph->tabtitle->Set(' 3rd Division ' ); +$graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,13); + +// Setup x,Y grid +$graph->xgrid->Show(); +$graph->xgrid->SetColor('gray@0.5'); +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); +$graph->ygrid->SetColor('gray@0.5'); + +// Setup color for axis and labels on axis +$graph->xaxis->SetColor('orange','black'); +$graph->yaxis->SetColor('orange','black'); + +// Ticks on the outsid +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Setup the legend box colors and font +$graph->legend->SetColor('white','navy'); +$graph->legend->SetFillColor('navy@0.25'); +$graph->legend->SetFont(FF_ARIAL,FS_BOLD,8); +$graph->legend->SetShadow('darkgray@0.4',3); +$graph->legend->SetPos(0.05,0.05,'right','top'); + +// Create the first line +$p1 = new LinePlot($datay1); +$p1->SetColor("red"); +$p1->SetWeight(2); +$p1->SetLegend('2002'); +$graph->Add($p1); + +// Create the second line +$p2 = new LinePlot($datay2); +$p2->SetColor("lightyellow"); +$p2->SetLegend('2001'); +$p2->SetWeight(2); +$graph->Add($p2); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/gradlinefillex1.php b/html/includes/jpgraph/src/Examples/gradlinefillex1.php new file mode 100644 index 0000000000..c5b11cb7e9 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/gradlinefillex1.php @@ -0,0 +1,29 @@ +SetMargin(40,40,20,30); +$graph->SetScale("intlin"); +$graph->SetMarginColor('darkgreen@0.8'); + +$graph->title->Set('Gradient filled line plot'); +$graph->yscale->SetAutoMin(0); + +// Create the line +$p1 = new LinePlot($datay); +$p1->SetColor("blue"); +$p1->SetWeight(0); +$p1->SetFillGradient('red','yellow'); + +$graph->Add($p1); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/gradlinefillex2.php b/html/includes/jpgraph/src/Examples/gradlinefillex2.php new file mode 100644 index 0000000000..2c3d9fee8f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/gradlinefillex2.php @@ -0,0 +1,30 @@ +SetMargin(40,40,20,30); +$graph->SetScale("intlin"); +$graph->SetBox(); +$graph->SetMarginColor('darkgreen@0.8'); + +// Setup a background gradient image +$graph->SetBackgroundGradient('darkred','yellow',GRAD_HOR,BGRAD_PLOT); + +$graph->title->Set('Gradient filled line plot ex2'); +$graph->yscale->SetAutoMin(0); + +// Create the line +$p1 = new LinePlot($datay); +$p1->SetFillGradient('white','darkgreen'); +$graph->Add($p1); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/gradlinefillex3.php b/html/includes/jpgraph/src/Examples/gradlinefillex3.php new file mode 100644 index 0000000000..4f842d3848 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/gradlinefillex3.php @@ -0,0 +1,30 @@ +SetMargin(40,40,20,30); +$graph->SetScale("intlin"); +$graph->SetBox(); +$graph->SetMarginColor('darkgreen@0.8'); + +// Setup a background gradient image +$graph->SetBackgroundGradient('darkred','yellow',GRAD_HOR,BGRAD_PLOT); + +$graph->title->Set('Gradient filled line plot ex3'); +$graph->yscale->SetAutoMin(0); + +// Create the line +$p1 = new LinePlot($datay); +$p1->SetFillGradient('white','darkgreen',4); +$graph->Add($p1); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/gradlinefillex4.php b/html/includes/jpgraph/src/Examples/gradlinefillex4.php new file mode 100644 index 0000000000..59760c6576 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/gradlinefillex4.php @@ -0,0 +1,31 @@ +SetMargin(40,40,20,30); +$graph->SetScale("intlin"); +$graph->SetBox(); +$graph->SetMarginColor('darkgreen@0.8'); + +// Setup a background gradient image +$graph->SetBackgroundGradient('darkred','yellow',GRAD_HOR,BGRAD_PLOT); + +$graph->title->Set('Gradient filled line plot ex2'); +$graph->yscale->SetAutoMin(0); + +// Create the line +$p1 = new LinePlot($datay); +$p1->SetFillGradient('white','darkgreen'); +$p1->SetStepStyle(); +$graph->Add($p1); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/groupbarex1.php b/html/includes/jpgraph/src/Examples/groupbarex1.php new file mode 100644 index 0000000000..900caafbbe --- /dev/null +++ b/html/includes/jpgraph/src/Examples/groupbarex1.php @@ -0,0 +1,44 @@ +SetScale("textlin"); +$graph->SetShadow(); +$graph->img->SetMargin(40,30,40,40); +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +$graph->xaxis->title->Set('Year 2002'); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->title->Set('Group bar plot'); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$bplot1 = new BarPlot($datay1); +$bplot2 = new BarPlot($datay2); +$bplot3 = new BarPlot($datay3); + +$bplot1->SetFillColor("orange"); +$bplot2->SetFillColor("brown"); +$bplot3->SetFillColor("darkgreen"); + +$bplot1->SetShadow(); +$bplot2->SetShadow(); +$bplot3->SetShadow(); + +$bplot1->SetShadow(); +$bplot2->SetShadow(); +$bplot3->SetShadow(); + +$gbarplot = new GroupBarPlot(array($bplot1,$bplot2,$bplot3)); +$gbarplot->SetWidth(0.6); +$graph->Add($gbarplot); + +$graph->Stroke(); +?> + diff --git a/html/includes/jpgraph/src/Examples/horizbarex1.php b/html/includes/jpgraph/src/Examples/horizbarex1.php new file mode 100644 index 0000000000..8c9258c95b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/horizbarex1.php @@ -0,0 +1,64 @@ +SetScale("textlin"); + +// Rotate graph 90 degrees and set margin +$graph->Set90AndMargin(50,20,50,30); + +// Nice shadow +$graph->SetShadow(); + +// Setup title +$graph->title->Set("Horizontal bar graph ex 1"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); +$graph->subtitle->Set("(No Y-axis)"); + +// Setup X-axis +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,12); + +// Some extra margin looks nicer +$graph->xaxis->SetLabelMargin(10); + +// Label align for X-axis +$graph->xaxis->SetLabelAlign('right','center'); + +// Add some grace to y-axis so the bars doesn't go +// all the way to the end of the plot area +$graph->yaxis->scale->SetGrace(20); + +// We don't want to display Y-axis +$graph->yaxis->Hide(); + +// Now create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetShadow(); + +//You can change the width of the bars if you like +//$bplot->SetWidth(0.5); + +// We want to display the value of each bar at the top +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL,FS_BOLD,12); +$bplot->value->SetAlign('left','center'); +$bplot->value->SetColor("black","darkred"); +$bplot->value->SetFormat('%.1f mkr'); + +// Add the bar to the graph +$graph->Add($bplot); + +// .. and stroke the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/horizbarex2.php b/html/includes/jpgraph/src/Examples/horizbarex2.php new file mode 100644 index 0000000000..a0cc4181b3 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/horizbarex2.php @@ -0,0 +1,70 @@ +SetScale("textlin"); + +$top = 80; +$bottom = 30; +$left = 50; +$right = 30; +$graph->Set90AndMargin($left,$right,$top,$bottom); + +// Nice shadow +$graph->SetShadow(); + +// Setup title +$graph->title->Set("Horizontal bar graph ex 2"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); +$graph->subtitle->Set("(Axis at top)"); + +// Setup X-axis +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,12); + +// Some extra margin looks nicer +$graph->xaxis->SetLabelMargin(5); + +// Label align for X-axis +$graph->xaxis->SetLabelAlign('right','center'); + +// Add some grace to y-axis so the bars doesn't go +// all the way to the end of the plot area +$graph->yaxis->scale->SetGrace(20); +$graph->yaxis->SetLabelAlign('center','bottom'); +$graph->yaxis->SetLabelAngle(45); +$graph->yaxis->SetLabelFormat('%d'); +$graph->yaxis->SetFont(FF_VERDANA,FS_NORMAL,12); + +// We don't want to display Y-axis +//$graph->yaxis->Hide(); + +// Now create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetShadow(); + +//You can change the width of the bars if you like +//$bplot->SetWidth(0.5); + +// We want to display the value of each bar at the top +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL,FS_BOLD,12); +$bplot->value->SetAlign('left','center'); +$bplot->value->SetColor("black","darkred"); +$bplot->value->SetFormat('%.1f mkr'); + +// Add the bar to the graph +$graph->Add($bplot); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/horizbarex3.php b/html/includes/jpgraph/src/Examples/horizbarex3.php new file mode 100644 index 0000000000..1105e0623f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/horizbarex3.php @@ -0,0 +1,99 @@ +SetScale("textlin"); + +$top = 50; +$bottom = 80; +$left = 50; +$right = 20; +$graph->Set90AndMargin($left,$right,$top,$bottom); + +$graph->xaxis->SetPos('min'); + +// Nice shadow +$graph->SetShadow(); + +// Setup title +$graph->title->Set("Horizontal bar graph ex 3"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); +$graph->subtitle->Set("(Axis at bottom)"); + +// Setup X-axis +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetFont(FF_FONT2,FS_BOLD,12); + +// Some extra margin looks nicer +$graph->xaxis->SetLabelMargin(5); + +// Label align for X-axis +$graph->xaxis->SetLabelAlign('right','center'); + +// Add some grace to y-axis so the bars doesn't go +// all the way to the end of the plot area +$graph->yaxis->scale->SetGrace(20); + +// Setup the Y-axis to be displayed in the bottom of the +// graph. We also finetune the exact layout of the title, +// ticks and labels to make them look nice. +$graph->yaxis->SetPos('max'); + +// First make the labels look right +$graph->yaxis->SetLabelAlign('center','top'); +$graph->yaxis->SetLabelFormat('%d'); +$graph->yaxis->SetLabelSide(SIDE_RIGHT); + +// The fix the tick marks +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Finally setup the title +$graph->yaxis->SetTitleSide(SIDE_RIGHT); +$graph->yaxis->SetTitleMargin(35); + +// To align the title to the right use : +$graph->yaxis->SetTitle('Turnaround 2002','high'); +$graph->yaxis->title->Align('right'); + +// To center the title use : +//$graph->yaxis->SetTitle('Turnaround 2002','center'); +//$graph->yaxis->title->Align('center'); + +$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,12); +$graph->yaxis->title->SetAngle(0); + +$graph->yaxis->SetFont(FF_FONT2,FS_NORMAL); +// If you want the labels at an angle other than 0 or 90 +// you need to use TTF fonts +//$graph->yaxis->SetLabelAngle(0); + +// Now create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetShadow(); + +//You can change the width of the bars if you like +//$bplot->SetWidth(0.5); + +// We want to display the value of each bar at the top +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL,FS_BOLD,12); +$bplot->value->SetAlign('left','center'); +$bplot->value->SetColor("black","darkred"); +$bplot->value->SetFormat('%.1f mkr'); + +// Add the bar to the graph +$graph->Add($bplot); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/horizbarex4.php b/html/includes/jpgraph/src/Examples/horizbarex4.php new file mode 100644 index 0000000000..84248ed518 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/horizbarex4.php @@ -0,0 +1,48 @@ +SetScale("textlin"); + +$top = 60; +$bottom = 30; +$left = 80; +$right = 30; +$graph->Set90AndMargin($left,$right,$top,$bottom); + +// Nice shadow +$graph->SetShadow(); + +// Setup labels +$lbl = array("Andrew\nTait","Thomas\nAnderssen","Kevin\nSpacey","Nick\nDavidsson", +"David\nLindquist","Jason\nTait","Lorin\nPersson"); +$graph->xaxis->SetTickLabels($lbl); + +// Label align for X-axis +$graph->xaxis->SetLabelAlign('right','center','right'); + +// Label align for Y-axis +$graph->yaxis->SetLabelAlign('center','bottom'); + +// Titles +$graph->title->Set('Year Married'); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetWidth(0.5); +$bplot->SetYMin(1990); + +$graph->Add($bplot); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/horizbarex6.php b/html/includes/jpgraph/src/Examples/horizbarex6.php new file mode 100644 index 0000000000..7289f8d51a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/horizbarex6.php @@ -0,0 +1,83 @@ +SetScale("textlin"); + +// No frame around the image +$graph->SetFrame(false); + +// Rotate graph 90 degrees and set margin +$graph->Set90AndMargin(100,20,50,30); + +// Set white margin color +$graph->SetMarginColor('white'); + +// Use a box around the plot area +$graph->SetBox(); + +// Use a gradient to fill the plot area +$graph->SetBackgroundGradient('white','lightblue',GRAD_HOR,BGRAD_PLOT); + +// Setup title +$graph->title->Set("Graphic card performance"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,11); +$graph->subtitle->Set("(Non optimized)"); + +// Setup X-axis +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,8); + +// Some extra margin looks nicer +$graph->xaxis->SetLabelMargin(10); + +// Label align for X-axis +$graph->xaxis->SetLabelAlign('right','center'); + +// Add some grace to y-axis so the bars doesn't go +// all the way to the end of the plot area +$graph->yaxis->scale->SetGrace(20); + +// We don't want to display Y-axis +$graph->yaxis->Hide(); + +// Now create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetShadow(); + +//You can change the width of the bars if you like +//$bplot->SetWidth(0.5); + +// Set gradient fill for bars +$bplot->SetFillGradient('darkred','yellow',GRAD_HOR); + +// We want to display the value of each bar at the top +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL,FS_BOLD,10); +//$bplot->value->SetAlign('left','center'); +$bplot->value->SetColor("white"); +$bplot->value->SetFormat('%.1f'); +$bplot->SetValuePos('max'); + +// Add the bar to the graph +$graph->Add($bplot); + +// Add some explanation text +$txt = new Text('Note: Higher value is better.'); +$txt->SetPos(190,399,'center','bottom'); +$txt->SetFont(FF_ARIAL,FS_NORMAL,8); +$graph->Add($txt); + +// .. and stroke the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/imgmarkercsimex1.php b/html/includes/jpgraph/src/Examples/imgmarkercsimex1.php new file mode 100644 index 0000000000..e7a1748228 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/imgmarkercsimex1.php @@ -0,0 +1,55 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetFrame(false); +$graph->SetMargin(30,5,25,20); + +// Setup the tab +$graph->tabtitle->Set(' Year 2003 ' ); +$graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,13); +$graph->tabtitle->SetColor('darkred','#E1E1FF'); + +// Enable X-grid as well +$graph->xgrid->Show(); + +// Use months as X-labels +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +// Create the plot +$p1 = new LinePlot($datay1); +$p1->SetColor("navy"); + +$p1->SetCSIMTargets(array('#1','#2','#3','#4','#5')); + +// Use an image of favourite car as +$p1->mark->SetType(MARK_IMG,'saab_95.jpg',0.5); +//$p1->mark->SetType(MARK_SQUARE); + +// Displayes value on top of marker image +$p1->value->SetFormat('%d mil'); +$p1->value->Show(); +$p1->value->SetColor('darkred'); +$p1->value->SetFont(FF_ARIAL,FS_BOLD,10); +// Increase the margin so that the value is printed avove tje +// img marker +$p1->value->SetMargin(14); + +// Incent the X-scale so the first and last point doesn't +// fall on the edges +$p1->SetCenter(); + +$graph->Add($p1); + +$graph->StrokeCSIM(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/imgmarkerex1.php b/html/includes/jpgraph/src/Examples/imgmarkerex1.php new file mode 100644 index 0000000000..536622aa39 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/imgmarkerex1.php @@ -0,0 +1,52 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetFrame(false); +$graph->SetMargin(30,5,25,20); + +// Setup the tab +$graph->tabtitle->Set(' Year 2003 ' ); +$graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,13); +$graph->tabtitle->SetColor('darkred','#E1E1FF'); + +// Enable X-grid as well +$graph->xgrid->Show(); + +// Use months as X-labels +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +// Create the plot +$p1 = new LinePlot($datay1); +$p1->SetColor("navy"); + +// Use an image of favourite car as marker +$p1->mark->SetType(MARK_IMG,'saab_95.jpg',0.5); + +// Displayes value on top of marker image +$p1->value->SetFormat('%d mil'); +$p1->value->Show(); +$p1->value->SetColor('darkred'); +$p1->value->SetFont(FF_ARIAL,FS_BOLD,10); +// Increase the margin so that the value is printed avove tje +// img marker +$p1->value->SetMargin(14); + +// Incent the X-scale so the first and last point doesn't +// fall on the edges +$p1->SetCenter(); + +$graph->Add($p1); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/impulsex1.php b/html/includes/jpgraph/src/Examples/impulsex1.php new file mode 100644 index 0000000000..bcb1109bac --- /dev/null +++ b/html/includes/jpgraph/src/Examples/impulsex1.php @@ -0,0 +1,23 @@ +SetScale("textlin"); + +$graph->SetShadow(); +$graph->img->SetMargin(40,40,40,40); + +$graph->title->Set("Simple mpuls plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$sp1 = new ScatterPlot($datay); +$sp1->mark->SetType(MARK_SQUARE); +$sp1->SetImpuls(); + +$graph->Add($sp1); +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/impulsex2.php b/html/includes/jpgraph/src/Examples/impulsex2.php new file mode 100644 index 0000000000..4ca1ca44a6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/impulsex2.php @@ -0,0 +1,29 @@ +SetScale("textlin"); + +$graph->SetShadow(); +$graph->img->SetMargin(40,40,40,40); + +$graph->title->Set("Impuls plot, variant 2"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->Set("Impuls respons"); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$sp1 = new ScatterPlot($datay);//,$datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->mark->SetWidth(4); +$sp1->SetImpuls(); +$sp1->SetColor("blue"); +$sp1->SetWeight(3); + +$graph->Add($sp1); +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/impulsex3.php b/html/includes/jpgraph/src/Examples/impulsex3.php new file mode 100644 index 0000000000..8b1dc6a494 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/impulsex3.php @@ -0,0 +1,53 @@ +SetScale("intlin"); +$graph->SetShadow(); +$graph->SetBox(); + +$graph->title->Set("Impuls Example 3"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Set format callback for labels +$graph->yaxis->SetLabelFormatCallback("mycallback"); + +// Set X-axis at the minimum value of Y-axis (default will be at 0) +$graph->xaxis->SetPos("min"); // "min" will position the x-axis at the minimum value of the Y-axis + +// Extend the margin for the labels on the Y-axis and reverse the direction +// of the ticks on the Y-axis +$graph->yaxis->SetLabelMargin(12); +$graph->xaxis->SetLabelMargin(6); +$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(SIDE_DOWN); + +// Create a new impuls type scatter plot +$sp1 = new ScatterPlot($datay); +$sp1->mark->SetType(MARK_SQUARE); +$sp1->mark->SetFillColor("red"); +$sp1->SetImpuls(); +$sp1->SetColor("blue"); +$sp1->SetWeight(1); +$sp1->mark->SetWidth(3); + +$graph->Add($sp1); + +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/impulsex4.php b/html/includes/jpgraph/src/Examples/impulsex4.php new file mode 100644 index 0000000000..08acb75d70 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/impulsex4.php @@ -0,0 +1,75 @@ +SetScale("intlin"); + +$graph->SetShadow(); +$graph->SetBox(); +$graph->title->Set("Impuls Example 4"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Set some other color then the boring default +$graph->SetColor("lightyellow"); +$graph->SetMarginColor("khaki"); + +// Set legend box specification +$graph->legend->SetFillColor("white"); +$graph->legend->SetLineWeight(2); + +// Set X-axis at the minimum value of Y-axis (default will be at 0) +$graph->xaxis->SetPos("min"); // "min" will position the x-axis at the minimum value of the Y-axis + +// Extend the margin for the labels on the Y-axis and reverse the direction +// of the ticks on the Y-axis +$graph->yaxis->SetLabelMargin(12); +$graph->xaxis->SetLabelMargin(6); +$graph->yaxis->SetTickSide(SIDE_LEFT); +$graph->xaxis->SetTickSide(SIDE_DOWN); + +// Add mark graph with static lines +$line = new PlotLine(HORIZONTAL,0,"black",2); +$graph->AddLine($line); + +// Create a new impuls type scatter plot +$sp1 = new ScatterPlot($datay,$datax); +$sp1->mark->SetType(MARK_SQUARE); +$sp1->mark->SetFillColor("red"); +$sp1->mark->SetWidth(3); + +$sp1->SetImpuls(); +$sp1->SetColor("blue"); +$sp1->SetWeight(1); +$sp1->SetLegend("Non-causal signal"); + +$graph->Add($sp1); + +// Create the envelope plot +$ep1 = new LinePlot($datayenv,$datax); +$ep1->SetStyle("dotted"); +$ep1->SetLegend("Positive envelope"); + +$graph->Add($ep1); + +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/inyaxisex1.php b/html/includes/jpgraph/src/Examples/inyaxisex1.php new file mode 100644 index 0000000000..5954eb69c5 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/inyaxisex1.php @@ -0,0 +1,51 @@ +SetScale("linlin"); +$graph->img->SetMargin(50,50,60,40); +$graph->SetMarginColor('darkblue'); +$graph->SetColor('darkblue'); +$graph->SetAxisStyle(AXSTYLE_BOXOUT); + +$graph->title->Set("Depth curve. Dive #2"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->title->SetColor("white"); + +$graph->subtitle->Set("(Negated Y-axis)"); +$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL); +$graph->subtitle->SetColor("white"); + +// Setup axis +$graph->yaxis->SetLabelFormatCallback("_cb_negate"); +$graph->xaxis->SetColor("lightblue","white"); +$graph->yaxis->SetColor("lightblue","white"); +$graph->ygrid->SetColor("blue"); + + +$lp1 = new LinePlot($ydata); +$lp1->SetColor("yellow"); +$lp1->SetWeight(2); + + +$graph->Add($lp1); +$graph->Stroke(); +?> + + diff --git a/html/includes/jpgraph/src/Examples/inyaxisex2.php b/html/includes/jpgraph/src/Examples/inyaxisex2.php new file mode 100644 index 0000000000..51da310fef --- /dev/null +++ b/html/includes/jpgraph/src/Examples/inyaxisex2.php @@ -0,0 +1,53 @@ +SetScale("linlin"); +$graph->img->SetMargin(50,50,60,40); +$graph->SetMarginColor('darkblue'); +$graph->SetColor('darkblue'); +$graph->SetAxisStyle(AXSTYLE_BOXOUT); +$graph->SetBackgroundImage("blueblack400x300grad.png",1); +//$graph->SetBackgroundImage("lightbluedarkblue400x300grad.png",1); + +$graph->title->Set("Depth curve. Dive #2"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->title->SetColor("white"); + +$graph->subtitle->Set("(Negated Y-axis)"); +$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL); +$graph->subtitle->SetColor("white"); + +// Setup axis +$graph->yaxis->SetLabelFormatCallback("_cb_negate"); +$graph->xaxis->SetColor("lightblue","white"); +$graph->yaxis->SetColor("lightblue","white"); +$graph->ygrid->SetColor("blue"); + + +$lp1 = new LinePlot($ydata); +$lp1->SetColor("yellow"); +$lp1->SetWeight(2); + + +$graph->Add($lp1); +$graph->Stroke(); +?> + + diff --git a/html/includes/jpgraph/src/Examples/inyaxisex3.php b/html/includes/jpgraph/src/Examples/inyaxisex3.php new file mode 100644 index 0000000000..702549f4ce --- /dev/null +++ b/html/includes/jpgraph/src/Examples/inyaxisex3.php @@ -0,0 +1,69 @@ +SetScale("linlin"); +$graph->SetY2Scale("lin"); +$graph->SetMargin(50,50,60,40); +$graph->SetMarginColor('darkblue'); +$graph->SetColor('darkblue'); + +// Setup titles +$graph->title->Set("Inverting both Y-axis"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->title->SetColor("white"); + +$graph->subtitle->Set("(Negated Y & Y2 axis)"); +$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL); +$graph->subtitle->SetColor("white"); + +// Setup axis +$graph->yaxis->SetLabelFormatCallback("_cb_negate"); +$graph->xaxis->SetColor("lightblue","white"); +$graph->yaxis->SetColor("lightblue","white"); +$graph->ygrid->SetColor("blue"); + +// Setup Y2 axis +$graph->y2axis->SetLabelFormatCallback("_cb_negate"); +$graph->y2axis->SetColor("darkred","white"); +$graph->y2scale->SetAutoMax(0); // To make sure it starts with 0 + +// Setup plot 1 +$lp1 = new LinePlot($ydata); +$lp1->SetColor("yellow"); +$lp1->SetWeight(2); +$graph->Add($lp1); + +// Setup plot 2 +$lp2 = new LinePlot($y2data); +$lp2->SetColor("darkred"); +$lp2->SetWeight(2); +$graph->AddY2($lp2); + +$graph->Stroke(); +?> + + diff --git a/html/includes/jpgraph/src/Examples/ledex1.php b/html/includes/jpgraph/src/Examples/ledex1.php new file mode 100644 index 0000000000..c9d35b3183 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ledex1.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_GREEN); + + + +?> diff --git a/html/includes/jpgraph/src/Examples/ledex2.php b/html/includes/jpgraph/src/Examples/ledex2.php new file mode 100644 index 0000000000..257f6d43d1 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ledex2.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_RED); + + + +?> diff --git a/html/includes/jpgraph/src/Examples/ledex3.php b/html/includes/jpgraph/src/Examples/ledex3.php new file mode 100644 index 0000000000..8693847088 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ledex3.php @@ -0,0 +1,12 @@ +StrokeNumber('0123456789. ABCDEFGHIJKL',LEDC_YELLOW); + + + +?> diff --git a/html/includes/jpgraph/src/Examples/ledex4.php b/html/includes/jpgraph/src/Examples/ledex4.php new file mode 100644 index 0000000000..e4138550ce --- /dev/null +++ b/html/includes/jpgraph/src/Examples/ledex4.php @@ -0,0 +1,12 @@ +StrokeNumber('ABC123.',LEDC_RED); + + + +?> diff --git a/html/includes/jpgraph/src/Examples/lightbluedarkblue400x300grad.png b/html/includes/jpgraph/src/Examples/lightbluedarkblue400x300grad.png new file mode 100644 index 0000000000..86092ecfd8 Binary files /dev/null and b/html/includes/jpgraph/src/Examples/lightbluedarkblue400x300grad.png differ diff --git a/html/includes/jpgraph/src/Examples/linebarcentex1.php b/html/includes/jpgraph/src/Examples/linebarcentex1.php new file mode 100644 index 0000000000..9c220c57ae --- /dev/null +++ b/html/includes/jpgraph/src/Examples/linebarcentex1.php @@ -0,0 +1,49 @@ +GetShortMonth(); + +// Create the graph. +$graph = new Graph(400,200,"auto"); +$graph->SetScale("textlin"); +$graph->SetMargin(40,130,20,40); +$graph->SetShadow(); +$graph->xaxis->SetTickLabels($datax); + +// Create the linear error plot +$l1plot=new LinePlot($l1datay); +$l1plot->SetColor("red"); +$l1plot->SetWeight(2); +$l1plot->SetLegend("Prediction"); + +//Center the line plot in the center of the bars +$l1plot->SetBarCenter(); + + +// Create the bar plot +$bplot = new BarPlot($l2datay); +$bplot->SetFillColor("orange"); +$bplot->SetLegend("Result"); + +// Add the plots to t'he graph +$graph->Add($bplot); +$graph->Add($l1plot); + + +$graph->title->Set("Adding a line plot to a bar graph v1"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/linebarex1.php b/html/includes/jpgraph/src/Examples/linebarex1.php new file mode 100644 index 0000000000..c821d825e9 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/linebarex1.php @@ -0,0 +1,75 @@ +SetBackgroundImage("tiger_bkg.png",BGIMG_FILLFRAME); +$graph->SetShadow(); + +// Use an integer X-scale +$graph->SetScale("textlin"); + +// Set title and subtitle +$graph->title->Set("Combined bar and line plot"); +$graph->subtitle->Set("100 data points, X-Scale: 'text'"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Make the margin around the plot a little bit bigger +// then default +$graph->img->SetMargin(40,140,40,80); + +// Slightly adjust the legend from it's default position in the +// top right corner to middle right side +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Display every 10:th datalabel +$graph->xaxis->SetTextTickInterval(6); +$graph->xaxis->SetTextLabelInterval(2); +$graph->xaxis->SetTickLabels($databarx); +$graph->xaxis->SetLabelAngle(90); + +// Create a red line plot +$p1 = new LinePlot($datay); +$p1->SetColor("red"); +$p1->SetLegend("Pressure"); + +// Create the bar plot +$b1 = new BarPlot($databary); +$b1->SetLegend("Temperature"); +$b1->SetAbsWidth(6); +$b1->SetShadow(); + +// The order the plots are added determines who's ontop +$graph->Add($p1); +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/linebarex2.php b/html/includes/jpgraph/src/Examples/linebarex2.php new file mode 100644 index 0000000000..2db2402b5d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/linebarex2.php @@ -0,0 +1,59 @@ +SetBackgroundImage("tiger_bkg.png",BGIMG_FILLFRAME); +$graph->SetShadow(); + +// Use an integer X-scale +$graph->SetScale("intlin"); + +// Set title and subtitle +$graph->title->Set("Combined bar and line plot"); +$graph->subtitle->Set("(\"left\" aligned bars)"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Make the margin around the plot a little bit bigger +// then default +$graph->img->SetMargin(40,120,40,40); + +// Slightly adjust the legend from it's default position in the +// top right corner to middle right side +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Create a red line plot +$p1 = new LinePlot($datay,$datax); +$p1->SetColor("red"); +$p1->SetLegend("Status one"); +$graph->Add($p1); + +// Create the bar plot +$b1 = new BarPlot($databary,$databarx); +$b1->SetLegend("Status two"); +$b1->SetAlign("left"); +$b1->SetShadow(); +$graph->Add($b1); + +// Finally output the image +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/linebarex3.php b/html/includes/jpgraph/src/Examples/linebarex3.php new file mode 100644 index 0000000000..8fa79231ba --- /dev/null +++ b/html/includes/jpgraph/src/Examples/linebarex3.php @@ -0,0 +1,52 @@ +img->SetMargin(40,180,40,40); +$graph->SetBackgroundImage("tiger_bkg.png",BGIMG_FILLFRAME); + +//$graph->img->SetAntiAliasing(); + +$graph->SetScale("intlin"); +$graph->SetShadow(); +$graph->title->Set("Combined bar and line plot"); +$graph->subtitle->Set("(\"center\" aligned bars)"); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Slightly adjust the legend from it's default position in the +// top right corner. +$graph->legend->Pos(0.05,0.5,"right","center"); + +// Create the first line + +$p1 = new LinePlot($datay,$datax); +$p1->SetWeight(1); +$p1->SetColor("red"); +$p1->SetLegend("Triumph Tiger -98"); +$graph->Add($p1); + +$b1 = new BarPlot($databary,$databarx); +$b1->SetAbsWidth(10); +$b1->SetAlign("center"); +$b1->SetShadow(); +$graph->Add($b1); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/linegraceex.php b/html/includes/jpgraph/src/Examples/linegraceex.php new file mode 100644 index 0000000000..e9b7c30e84 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/linegraceex.php @@ -0,0 +1,31 @@ +img->SetMargin(40,40,40,40); + +$graph->img->SetAntiAliasing(); +$graph->SetScale("textlin"); +$graph->SetShadow(); +$graph->title->Set("Example of 10% top/bottom grace"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Add 10% grace to top and bottom of plot +$graph->yscale->SetGrace(10,10); + +$p1 = new LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$graph->Add($p1); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/lineiconex1.php b/html/includes/jpgraph/src/Examples/lineiconex1.php new file mode 100644 index 0000000000..5bc4ad216e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/lineiconex1.php @@ -0,0 +1,49 @@ +SetMargin(40,40,20,30); +$graph->SetScale("textlin"); + +$graph->title->Set('Adding an icon ("tux") in the background'); +$graph->title->SetFont(FF_ARIAL,FS_NORMAL,12); + +//$graph->SetBackgroundGradient('red','blue'); + +$graph->xaxis->SetPos('min'); + +$p1 = new LinePlot($datay); +$p1->SetColor("blue"); +$p1->SetFillGradient('yellow@0.4','red@0.4'); + +$p2 = new LinePlot($datay2); +$p2->SetColor("black"); +$p2->SetFillGradient('green@0.4','white'); + +$p3 = new LinePlot($datay3); +$p3->SetColor("blue"); +$p3->SetFillGradient('navy@0.4','white@0.4'); + +$graph->Add($p1); +$graph->Add($p2); +$graph->Add($p3); + +$icon = new IconPlot('penguin.png',0.2,0.3,1,30); +$icon->SetAnchor('center','center'); +$graph->Add($icon); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/lineiconex2.php b/html/includes/jpgraph/src/Examples/lineiconex2.php new file mode 100644 index 0000000000..6215ab5821 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/lineiconex2.php @@ -0,0 +1,32 @@ +SetMargin(40,40,20,30); +$graph->SetScale("textlin"); + +$graph->title->Set('Adding a country flag as a an icon'); + +$p1 = new LinePlot($datay); +$p1->SetColor("blue"); +$p1->SetFillGradient('yellow@0.4','red@0.4'); + +$graph->Add($p1); + +$icon = new IconPlot(); +$icon->SetCountryFlag('iceland',50,30,1.5,40,3); +$icon->SetAnchor('left','top'); +$graph->Add($icon); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/linlogex1.php b/html/includes/jpgraph/src/Examples/linlogex1.php new file mode 100644 index 0000000000..68aa45448a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/linlogex1.php @@ -0,0 +1,64 @@ +SetScale("linlog"); +$graph->img->SetMargin(40,20,20,40); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->Set("ab/2"); +$graph->yaxis->title->Set("rho_s"); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->ygrid->Show(true,true); +$graph->xgrid->Show(true,true); + +$errorplot=new ErrorPlot($ydata, $xdata); + +$graph->Add($errorplot); + +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/listallflags.php b/html/includes/jpgraph/src/Examples/listallflags.php new file mode 100644 index 0000000000..a26706eefd --- /dev/null +++ b/html/includes/jpgraph/src/Examples/listallflags.php @@ -0,0 +1,29 @@ +\n"; +$cols=0; +while( list($key,$val) = each($flags->iCountryNameMap) ) { + + echo '
'; + echo "$key
idx=$val\n"; + + if( ++$cols == 5 ) { + echo "\n"; + $cols=0; + } +} + +echo ""; + +?> + diff --git a/html/includes/jpgraph/src/Examples/listallflags_helper.php b/html/includes/jpgraph/src/Examples/listallflags_helper.php new file mode 100644 index 0000000000..29681caa0c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/listallflags_helper.php @@ -0,0 +1,25 @@ +GetImgByIdx($idx); +header ("Content-type: image/png"); +ImagePng ($img); + +?> diff --git a/html/includes/jpgraph/src/Examples/listfontsex1.php b/html/includes/jpgraph/src/Examples/listfontsex1.php new file mode 100644 index 0000000000..32f45b32d0 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/listfontsex1.php @@ -0,0 +1,117 @@ +Set(0,27,0,53); +$g->SetMargin(5,6,5,6); +$g->SetColor('white'); +$g->SetMarginColor("teal"); +$g->InitFrame(); + + +$t = new CanvasRectangleText(); +$t->SetFillColor('lightgreen'); +$t->SetFontColor('navy'); +$t->SetFont(FF_ARIAL,FS_NORMAL,16); +$t->Set("\n\n\n\n\n\n\n\n\n\n\nTTF Fonts",0.5,19,26,32); +$t->Stroke($g->img,$scale); + + +$t = new CanvasRectangleText(); + +$t->SetFillColor(''); +$t->SetFontColor('black'); +$t->SetColor(''); +$t->SetShadow(''); +$t->SetFont(FF_ARIAL,FS_BOLD,18); +$t->Set('Family',1,1,8); +$t->Stroke($g->img,$scale); + +$t->Set('Italic style',9,1,8); +$t->Stroke($g->img,$scale); + +$t->Set('Bold style',17.5,1,8); +$t->Stroke($g->img,$scale); + + +$t->SetFillColor('yellow'); +$t->SetFontColor('black'); +$t->SetColor('black'); +$t->SetShadow('gray'); + +$r=6;$c=1;$w=7.5;$h=3.5; + +$fonts=array( + array("Font 0",FF_FONT0,FS_NORMAL), + array("",FF_FONT0,FS_ITALIC), + array("",FF_FONT0,FS_BOLD), + + array("Font 1",FF_FONT1,FS_NORMAL), + array("",FF_FONT1,FS_ITALIC), + array("Font 1 bold",FF_FONT1,FS_BOLD), + + array("Font 2",FF_FONT2,FS_NORMAL), + array("",FF_FONT2,FS_ITALIC), + array("Font 2 bold",FF_FONT2,FS_BOLD), + + array("Arial",FF_ARIAL,FS_NORMAL), + array("Arial italic",FF_ARIAL,FS_ITALIC), + array("Arial bold",FF_ARIAL,FS_BOLD), + + array("Verdana",FF_VERDANA,FS_NORMAL), + array("Verdana italic",FF_VERDANA,FS_ITALIC), + array("Verdana bold",FF_VERDANA,FS_BOLD), + + + array("Trebuche",FF_TREBUCHE,FS_NORMAL), + array("Trebuche italic",FF_TREBUCHE,FS_ITALIC), + array("Trebuche bold",FF_TREBUCHE,FS_BOLD), + + array("Georgia",FF_GEORGIA,FS_NORMAL), + array("Georgia italic",FF_GEORGIA,FS_ITALIC), + array("Georgia bold",FF_GEORGIA,FS_BOLD), + + array("Comic",FF_COMIC,FS_NORMAL), + array("",FF_COMIC,FS_ITALIC), + array("Comic bold",FF_COMIC,FS_BOLD), + + array("Courier",FF_COURIER,FS_NORMAL), + array("Courier italic",FF_COURIER,FS_ITALIC), + array("Courier bold",FF_COURIER,FS_BOLD), + + + array("Times normal",FF_TIMES,FS_NORMAL), + array("Times italic",FF_TIMES,FS_ITALIC), + array("Times bold italic",FF_TIMES,FS_BOLDITALIC), + ); + + +$n=count($fonts); + +for( $i=0; $i < $n; ++$i ) { + + if( $i==9 ) $r += 3; + + if( $fonts[$i][0] ) { + $t->SetTxt($fonts[$i][0]); + $t->SetPos($c,$r,$w,$h); + $t->SetFont($fonts[$i][1],$fonts[$i][2],13); + $t->Stroke($g->img,$scale); + } + + $c += $w+1; + if( $c > 30-$w-2 ) { + $c = 1; + $r += 4; + } + +} + +$g->Stroke(); +?> + diff --git a/html/includes/jpgraph/src/Examples/logbarex1.php b/html/includes/jpgraph/src/Examples/logbarex1.php new file mode 100644 index 0000000000..06b7e49a1b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/logbarex1.php @@ -0,0 +1,48 @@ +img->SetMargin(50,30,50,50); +$graph->SetScale("textlog"); +//$graph->SetShadow(); + +// Setup titles for graph and axis +$graph->title->Set("Bar with logarithmic Y-scale"); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,18); + +$graph->xaxis->SetTitle("2002"); +$graph->xaxis->title->SetFont(FF_ARIAL,FS_NORMAL,16); + +$graph->yaxis->title->SetFont(FF_ARIAL,FS_NORMAL,16); +$graph->yaxis->SetTitle("Y-title",'center'); +$graph->yaxis->SetTitleMargin(30); + +// Setup month on X-scale +//$graph->xaxis->SetTickLabels($datax); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); + +//You can also set a manual base of the bars +//$bplot->SetYBase(0.001); + +/* +$bplot->SetShadow(); +$bplot->value->Show(); +$bplot->value->SetFont(FF_ARIAL,FS_BOLD); +$bplot->value->SetAngle(45); +$bplot->value->SetColor("black","darkred"); +*/ + +$graph->Add($bplot); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/loglogex1.php b/html/includes/jpgraph/src/Examples/loglogex1.php new file mode 100644 index 0000000000..d1364373cf --- /dev/null +++ b/html/includes/jpgraph/src/Examples/loglogex1.php @@ -0,0 +1,59 @@ +SetScale("loglog"); +$graph->SetY2Scale("lin"); +$graph->y2axis->SetColor("blue","blue"); + +$graph->img->SetMargin(50,70,40,50); +$graph->title->Set("Geoelektrik"); +$graph->xaxis->title->Set("Auslage ab/2 [m]"); +$graph->yaxis->title->Set("rho_s [Ohm m]"); +$graph->y2axis->title->Set("mn/2 [m]"); +$graph->y2axis->title->SetColor("blue"); +$graph->y2axis->SetTitleMargin(35); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xgrid->Show(true,true); +$graph->ygrid->Show(true,true); + +// Create the linear plot + +$lineplot=new LinePlot($rhos,$ab2); +$lineplot->SetWeight(1); +$lineplot->mark->SetType(MARK_FILLEDCIRCLE); +$lineplot->mark->SetWidth(2); + +// Create scatter plot + +$scplot=new ScatterPlot($mn2,$ab2); +$scplot->mark->SetType(MARK_FILLEDCIRCLE); +$scplot->mark->SetColor("blue"); +$scplot->mark->SetWidth(2); + +// Add plots to the graph + +$graph->AddY2($scplot); +$graph->Add($lineplot); + +// Display the graph +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/manscaleex1.php b/html/includes/jpgraph/src/Examples/manscaleex1.php new file mode 100644 index 0000000000..4bb452fc3a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/manscaleex1.php @@ -0,0 +1,22 @@ +SetScale("textlin",3,35); +$graph->yscale->ticks->Set(7,2); + +$graph->title->Set('Manual scale, manual ticks'); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$line = new LinePlot($ydata); +$graph->Add($line); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/manscaleex2.php b/html/includes/jpgraph/src/Examples/manscaleex2.php new file mode 100644 index 0000000000..79abb18453 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/manscaleex2.php @@ -0,0 +1,21 @@ +SetScale("textlin",3,35); + +$graph->title->Set('Manual scale, exact limits'); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$line = new LinePlot($ydata); +$graph->Add($line); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/manscaleex3.php b/html/includes/jpgraph/src/Examples/manscaleex3.php new file mode 100644 index 0000000000..4d1d8d8ce0 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/manscaleex3.php @@ -0,0 +1,23 @@ +SetScale("textlin",3,35); +$graph->SetTickDensity(TICKD_DENSE); +$graph->yscale->SetAutoTicks(); + +$graph->title->Set('Manual scale, auto ticks'); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$line = new LinePlot($ydata); +$graph->Add($line); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/manscaleex4.php b/html/includes/jpgraph/src/Examples/manscaleex4.php new file mode 100644 index 0000000000..b1f01fd134 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/manscaleex4.php @@ -0,0 +1,22 @@ +SetScale("textlin",3,35); +$graph->yscale->SetAutoTicks(); + +$graph->title->Set('Manual scale, allow adjustment'); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$line = new LinePlot($ydata); +$graph->Add($line); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/manualtickex1.php b/html/includes/jpgraph/src/Examples/manualtickex1.php new file mode 100644 index 0000000000..f2e27c2c73 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/manualtickex1.php @@ -0,0 +1,73 @@ +GetTicks($datax); + +// We add some grace to the end of the X-axis scale so that the first and last +// data point isn't exactly at the very end or beginning of the scale +$grace = 400000; +$xmin = $datax[0]-$grace; +$xmax = $datax[$n-1]+$grace; + +// +// The code to setup a very basic graph +// +$graph = new Graph(400,200); + +// +// We use an integer scale on the X-axis since the positions on the X axis +// are assumed to be UNI timestamps +$graph->SetScale('intlin',0,0,$xmin,$xmax); +$graph->title->Set('Basic example with manual ticks'); +$graph->title->SetFont(FF_ARIAL,FS_NORMAL,12); + +// +// Make sure that the X-axis is always at the bottom of the scale +// (By default the X-axis is alwys positioned at Y=0 so if the scale +// doesn't happen to include 0 the axis will not be shown) +$graph->xaxis->SetPos('min'); + +// Now set the tic positions +$graph->xaxis->SetTickPositions($tickPositions,$minTickPositions); + +// The labels should be formatted at dates with "Year-month" +$graph->xaxis->SetLabelFormatString('My',true); + +// Use Ariel font +$graph->xaxis->SetFont(FF_ARIAL,FS_NORMAL,9); + +// Add a X-grid +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new LinePlot($datay,$datax); +$p1->SetColor('teal'); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/manualtickex2.php b/html/includes/jpgraph/src/Examples/manualtickex2.php new file mode 100644 index 0000000000..bb8175f959 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/manualtickex2.php @@ -0,0 +1,72 @@ +E(0,10); + +// Now get labels at 1/2 PI intervall +$tickPositions = array(); +$tickLabels = array(); +$tickPositions[0] = 0; +$tickLabels[0] = '0'; +for($i=1; $i/2*M_PI < 11 ; ++$i ) { + $tickPositions[$i] = $i/2*M_PI; + if( $i % 2 ) + $tickLabels[$i] = $i.'/2'.SymChar::Get('pi'); + else + $tickLabels[$i] = ($i/2).SymChar::Get('pi'); +} + +$n = count($datax); +$xmin = $datax[0]; +$xmax = $datax[$n-1]; + +// +// The code to setup a very basic graph +// +$graph = new Graph(400,200); + +// +// We use an integer scale on the X-axis since the positions on the X axis +// are assumed to be UNI timestamps +$graph->SetScale('linlin',0,0,$xmin,$xmax); +$graph->title->Set('Example with manual tick labels'); +$graph->title->SetFont(FF_ARIAL,FS_NORMAL,12); + +// +// Make sure that the X-axis is always at the bottom of the scale +// (By default the X-axis is alwys positioned at Y=0 so if the scale +// doesn't happen to include 0 the axis will not be shown) +$graph->xaxis->SetPos('min'); + +// Now set the tic positions +$graph->xaxis->SetMajTickPositions($tickPositions,$tickLabels); + +// Use Times font +$graph->xaxis->SetFont(FF_TIMES,FS_NORMAL,10); +$graph->yaxis->SetFont(FF_TIMES,FS_NORMAL,10); + +// Add a X-grid +$graph->xgrid->Show(); + +// Create the plot line +$p1 = new LinePlot($datay,$datax); +$p1->SetColor('teal'); +$graph->Add($p1); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/markflagex1.php b/html/includes/jpgraph/src/Examples/markflagex1.php new file mode 100644 index 0000000000..a68c43ea82 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/markflagex1.php @@ -0,0 +1,74 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetFrame(false); +$graph->SetMargin(30,5,25,20); + +// Enable X-grid as well +$graph->xgrid->Show(); + +// Use months as X-labels +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +//------------------------ +// Create the plots +//------------------------ +$p1 = new LinePlot($datay[0]); +$p1->SetColor("navy"); + +// Use a flag +$p1->mark->SetType(MARK_FLAG1,'chin'); + +// Displayes value on top of marker image +$p1->value->SetFormat('%d mil'); +$p1->value->Show(); +$p1->value->SetColor('darkred'); +$p1->value->SetFont(FF_ARIAL,FS_BOLD,10); +// Increase the margin so that the value is printed avove tje +// img marker +$p1->value->SetMargin(14); + +// Incent the X-scale so the first and last point doesn't +// fall on the edges +$p1->SetCenter(); + +$graph->Add($p1); + +//------------ +// 2:nd plot +//------------ +$p2 = new LinePlot($datay[1]); +$p2->SetColor("navy"); + +// Use a flag +$p2->mark->SetType(MARK_FLAG1,'united states'); + +// Displayes value on top of marker image +$p2->value->SetFormat('%d mil'); +$p2->value->Show(); +$p2->value->SetColor('darkred'); +$p2->value->SetFont(FF_ARIAL,FS_BOLD,10); +// Increase the margin so that the value is printed avove tje +// img marker +$p2->value->SetMargin(14); + +// Incent the X-scale so the first and last point doesn't +// fall on the edges +$p2->SetCenter(); +$graph->Add($p2); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/multconstganttex01.php b/html/includes/jpgraph/src/Examples/multconstganttex01.php new file mode 100644 index 0000000000..d59d5e6a13 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/multconstganttex01.php @@ -0,0 +1,30 @@ +title->Set("Example with multiple constrains"); + +$bar1 = new GanttBar(0, "Label 1", "2003-06-08", "2003-06-12"); +$bar2 = new GanttBar(1, "Label 2", "2003-06-16", "2003-06-19"); +$bar3 = new GanttBar(2, "Label 3", "2003-06-15", "2003-06-21"); + +//create constraints +$bar1->SetConstrain(1, CONSTRAIN_ENDSTART); +$bar1->SetConstrain(2, CONSTRAIN_ENDSTART); + +// Setup scale +$graph->ShowHeaders(/*GANTT_HYEAR | GANTT_HMONTH |*/ GANTT_HDAY | GANTT_HWEEK); +$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAYWNBR); + +// Add the specified activities +$graph->Add($bar1); +$graph->Add($bar2); +$graph->Add($bar3); + +// .. and stroke the graph +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/mulyaxiscsimex1.php b/html/includes/jpgraph/src/Examples/mulyaxiscsimex1.php new file mode 100644 index 0000000000..31b941201c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/mulyaxiscsimex1.php @@ -0,0 +1,75 @@ +SetMargin(60,180,50,40); +$graph->SetMarginColor('white'); +$graph->title->Set("Multi Y-axes with Image Map"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Setup the scales for all axes +$graph->SetScale("intlin"); +$graph->SetYScale(0,'int'); +$graph->SetYScale(1,'int'); + +// Standard Y-axis plot +$lp1 = new LinePlot($datay1); +$lp1->SetLegend('2001'); +$lp1->mark->SetType(MARK_DIAMOND); +$lp1->mark->SetWidth(15); +$lp1->mark->SetFillColor('orange'); +$lp1->SetCSIMTargets($targ1,$alts1); +$graph->yaxis->title->Set('Basic Rate'); +$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->yaxis->title->SetColor('black'); +$graph->Add($lp1); + +// First multi Y-axis plot +$lp2 = new LinePlot($datay2); +$lp2->SetLegend('2002'); +$lp2->mark->SetType(MARK_DIAMOND); +$lp2->mark->SetWidth(15); +$lp2->mark->SetFillColor('darkred'); +$lp2->SetCSIMTargets($targ2,$alts2); +$graph->ynaxis[0]->SetColor('darkred'); +$graph->ynaxis[0]->title->Set('Rate A'); +$graph->ynaxis[0]->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->ynaxis[0]->title->SetColor('darkred'); +$graph->AddY(0,$lp2); + +// Second multi Y-axis plot +$lp3 = new LinePlot($datay3); +$lp3->SetLegend('2003'); +$lp3->mark->SetType(MARK_DIAMOND); +$lp3->mark->SetWidth(15); +$lp3->mark->SetFillColor('darkgreen'); +$lp3->SetCSIMTargets($targ3,$alts3); +$graph->ynaxis[1]->SetColor('darkgreen'); +$graph->ynaxis[1]->title->Set('Rate B'); +$graph->ynaxis[1]->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->ynaxis[1]->title->SetColor('darkgreen'); +$graph->AddY(1,$lp3); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); +?> diff --git a/html/includes/jpgraph/src/Examples/mulyaxisex1.php b/html/includes/jpgraph/src/Examples/mulyaxisex1.php new file mode 100644 index 0000000000..638042c12e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/mulyaxisex1.php @@ -0,0 +1,51 @@ +SetMargin(40,150,40,30); +$graph->SetMarginColor('white'); + +$graph->SetScale('intlin'); +$graph->title->Set('Using multiple Y-axis'); +$graph->title->SetFont(FF_ARIAL,FS_NORMAL,14); + +$graph->SetYScale(0,'lin'); +$graph->SetYScale(1,'lin'); +$graph->SetYScale(2,'lin'); + +$p1 = new LinePlot($datay); +$graph->Add($p1); + +$p2 = new LinePlot($datay2); +$p2->SetColor('teal'); +$graph->AddY(0,$p2); +$graph->ynaxis[0]->SetColor('teal'); + +$p3 = new LinePlot($datay3); +$p3->SetColor('red'); +$graph->AddY(1,$p3); +$graph->ynaxis[1]->SetColor('red'); + +$p4 = new LinePlot($datay4); +$p4->SetColor('blue'); +$graph->AddY(2,$p4); +$graph->ynaxis[2]->SetColor('blue'); + +// Output line +$graph->Stroke(); +?> + + diff --git a/html/includes/jpgraph/src/Examples/negbarvalueex01.php b/html/includes/jpgraph/src/Examples/negbarvalueex01.php new file mode 100644 index 0000000000..5c60ee9141 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/negbarvalueex01.php @@ -0,0 +1,39 @@ +img->SetMargin(60,30,40,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); + +// DIsplay value at top of each bar +$bplot->value->Show(); +$bplot->SetShadow(); + +$graph->Add($bplot); + +// Position the scale at the min of the other axis +$graph->xaxis->SetPos("min"); + +// Add 10% more space at top and bottom of graph +$graph->yscale->SetGrace(10,10); + +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,12); +$graph->title->Set("Example of bar plot with absolute labels"); + +$graph->yaxis->title->SetFont(FF_ARIAL,FS_NORMAL,16); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/nullvalueex01.php b/html/includes/jpgraph/src/Examples/nullvalueex01.php new file mode 100644 index 0000000000..b9fedccfc9 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/nullvalueex01.php @@ -0,0 +1,56 @@ +img->SetMargin(40,150,40,80); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +//Setup title +$graph->title->Set("Line plot with null values"); + +// Use built in font +$graph->title->SetFont(FF_ARIAL,FS_NORMAL,14); + +// Slightly adjust the legend from it's default position +$graph->legend->Pos(0.03,0.5,"right","center"); +$graph->legend->SetFont(FF_FONT1,FS_BOLD); + +// Setup X-scale +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetFont(FF_ARIAL,FS_NORMAL,8); +$graph->xaxis->SetLabelAngle(45); + +// Create the first line +$p1 = new LinePlot($datay); +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); +$p1->SetColor("blue"); +$p1->SetCenter(); +$p1->SetLegend("Undefined\nvariant 1"); +$graph->Add($p1); + +// ... and the second +$p2 = new LinePlot($data2y); +$p2->mark->SetType(MARK_STAR); +$p2->mark->SetFillColor("red"); +$p2->mark->SetWidth(4); +$p2->SetColor("red"); +$p2->SetCenter(); +$p2->SetLegend("Undefined\nvariant 2"); +$graph->Add($p2); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/partiallyfilledlineex1.php b/html/includes/jpgraph/src/Examples/partiallyfilledlineex1.php new file mode 100644 index 0000000000..4f5fae9474 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/partiallyfilledlineex1.php @@ -0,0 +1,44 @@ +SetScale("textlin"); +$graph->SetShadow(true); +$graph->SetMarginColor("lightblue"); + +// Setup format for legend +$graph->legend->SetFillColor("antiquewhite"); +$graph->legend->SetShadow(true); + +// Setup title +$graph->title->Set("Filled Area Example"); +$graph->title->SetFont(FF_FONT2,FS_BOLD); + +// Setup semi-filled line plot +$lineplot = new LinePlot($ydata); +$lineplot->SetLegend("Semi-filled\nLineplot"); + +// Set line color +$lineplot->SetColor("black"); + +// Setup the two areas to be filled +$lineplot->AddArea(2,5,LP_AREA_FILLED,"red"); +$lineplot->AddArea(6,8,LP_AREA_FILLED,"green"); + +// Display the marks on the lines +$lineplot->mark->SetType(MARK_DIAMOND); +$lineplot->mark->SetSize(8); +$lineplot->mark->Show(); + +// add plot to the graph +$graph->Add($lineplot); + +// display graph +$graph->Stroke(); +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/penguin.png b/html/includes/jpgraph/src/Examples/penguin.png new file mode 100644 index 0000000000..2ae426ae3c Binary files /dev/null and b/html/includes/jpgraph/src/Examples/penguin.png differ diff --git a/html/includes/jpgraph/src/Examples/pie3d_csimex1.php b/html/includes/jpgraph/src/Examples/pie3d_csimex1.php new file mode 100644 index 0000000000..91d32572b8 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pie3d_csimex1.php @@ -0,0 +1,43 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("3D Pie Client side image map"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Create +$p1 = new PiePlot3D($data); +$p1->SetLegends(array("Jan (%d)","Feb","Mar","Apr","May","Jun","Jul")); +$targ=array("pie3d_csimex1.php?v=1","pie3d_csimex1.php?v=2","pie3d_csimex1.php?v=3", + "pie3d_csimex1.php?v=4","pie3d_csimex1.php?v=5","pie3d_csimex1.php?v=6"); +$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d"); +$p1->SetCSIMTargets($targ,$alts); + +// Use absolute labels +$p1->SetLabelType(1); +$p1->value->SetFormat("%d kr"); + +// Move the pie slightly to the left +$p1->SetCenter(0.4,0.5); + +$graph->Add($p1); + + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pie3dex1.php b/html/includes/jpgraph/src/Examples/pie3dex1.php new file mode 100644 index 0000000000..aa0bfddb29 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pie3dex1.php @@ -0,0 +1,32 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 1 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1,0.2); + +// Create pie plot +$p1 = new PiePlot3d($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetAngle(30); +$p1->value->SetFont(FF_ARIAL,FS_NORMAL,12); +$p1->SetLegends(array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct")); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pie3dex2.php b/html/includes/jpgraph/src/Examples/pie3dex2.php new file mode 100644 index 0000000000..50057fffc3 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pie3dex2.php @@ -0,0 +1,45 @@ +SetShadow(); + + +// Set A title for the plot +$graph->title->Set("Example 2 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1,0.2); + +// Create 3D pie plot +$p1 = new PiePlot3d($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(0.4); +$p1->SetHeight(5); + +// Adjust projection angle +$p1->SetAngle(45); + +// You can explode several slices by specifying the explode +// distance for some slices in an array +$p1->Explode(array(0,40,0,30)); + +// As a shortcut you can easily explode one numbered slice with +// $p1->ExplodeSlice(3); + +$p1->value->SetFont(FF_ARIAL,FS_NORMAL,10); +$p1->SetLegends(array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct")); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pie3dex3.php b/html/includes/jpgraph/src/Examples/pie3dex3.php new file mode 100644 index 0000000000..cc4b52abae --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pie3dex3.php @@ -0,0 +1,42 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 3 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1,0.2); + +// Create 3D pie plot +$p1 = new PiePlot3d($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(80); + +// Adjust projection angle +$p1->SetAngle(45); + +// As a shortcut you can easily explode one numbered slice with +$p1->ExplodeSlice(3); + +// Setup the slice values +$p1->value->SetFont(FF_ARIAL,FS_BOLD,11); +$p1->value->SetColor("navy"); + +$p1->SetLegends(array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct")); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pie3dex4.php b/html/includes/jpgraph/src/Examples/pie3dex4.php new file mode 100644 index 0000000000..d86aeec04a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pie3dex4.php @@ -0,0 +1,46 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 4 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1,0.2); + +// Create 3D pie plot +$p1 = new PiePlot3d($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(80); + +// Adjust projection angle +$p1->SetAngle(45); + +// Adjsut angle for first slice +$p1->SetStartAngle(45); + +// As a shortcut you can easily explode one numbered slice with +$p1->ExplodeSlice(3); + +// Setup slice values +$p1->value->SetFont(FF_ARIAL,FS_BOLD,11); +$p1->value->SetColor("navy"); + + +$p1->SetLegends(array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct")); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pie3dex5.php b/html/includes/jpgraph/src/Examples/pie3dex5.php new file mode 100644 index 0000000000..4843157157 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pie3dex5.php @@ -0,0 +1,46 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 5 3D Pie plot"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,18); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1,0.2); + +// Create 3D pie plot +$p1 = new PiePlot3d($data); +$p1->SetTheme("sand"); +$p1->SetCenter(0.4); +$p1->SetSize(80); + +// Adjust projection angle +$p1->SetAngle(45); + +// Adjsut angle for first slice +$p1->SetStartAngle(45); + +// Display the slice values +$p1->value->SetFont(FF_ARIAL,FS_BOLD,11); +$p1->value->SetColor("navy"); + +// Add colored edges to the 3D pie +// NOTE: You can't have exploded slices with edges! +$p1->SetEdge("navy"); + +$p1->SetLegends(array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct")); + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pie_csimex1.php b/html/includes/jpgraph/src/Examples/pie_csimex1.php new file mode 100644 index 0000000000..9e16cd28d4 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pie_csimex1.php @@ -0,0 +1,35 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Client side image map"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Create +$p1 = new PiePlot($data); +$p1->SetCenter(0.4,0.5); + +$p1->SetLegends(array("Jan","Feb","Mar","Apr","May","Jun","Jul")); +$targ=array("pie_csimex1.php#1","pie_csimex1.php#2","pie_csimex1.php#3", +"pie_csimex1.php#4","pie_csimex1.php#5","pie_csimex1.php#6"); +$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d"); +$p1->SetCSIMTargets($targ,$alts); + +$graph->Add($p1); + + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/piebkgex1.php b/html/includes/jpgraph/src/Examples/piebkgex1.php new file mode 100644 index 0000000000..d53661d31b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/piebkgex1.php @@ -0,0 +1,95 @@ +SetMargin(1,1,40,1); +$graph->SetMarginColor('navy'); +$graph->SetShadow(false); + +// Setup background +$graph->SetBackgroundImage('worldmap1.jpg',BGIMG_FILLPLOT); + +// Setup title +$graph->title->Set("Pie plots with background image"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,20); +$graph->title->SetColor('white'); + +$p = array(); +// Create the plots +for( $i=0; $i < $n; ++$i ) { + $d = "data$i"; + $p[] = new PiePlot3D($data[$i]); +} + +// Position the four pies +for( $i=0; $i < $n; ++$i ) { + $p[$i]->SetCenter($piepos[2*$i],$piepos[2*$i+1]); +} + +// Set the titles +for( $i=0; $i < $n; ++$i ) { + $p[$i]->title->Set($titles[$i]); + $p[$i]->title->SetColor('white'); + $p[$i]->title->SetFont(FF_ARIAL,FS_BOLD,12); +} + +// Label font and color setup +for( $i=0; $i < $n; ++$i ) { + $p[$i]->value->SetFont(FF_ARIAL,FS_BOLD); + $p[$i]->value->SetColor('white'); +} + +// Show the percetages for each slice +for( $i=0; $i < $n; ++$i ) { + $p[$i]->value->Show(); +} + +// Label format +for( $i=0; $i < $n; ++$i ) { + $p[$i]->value->SetFormat("%01.1f%%"); +} + +// Size of pie in fraction of the width of the graph +for( $i=0; $i < $n; ++$i ) { + $p[$i]->SetSize(0.15); +} + +// Format the border around each slice + + +for( $i=0; $i < $n; ++$i ) { + $p[$i]->SetEdge(false); + $p[$i]->ExplodeSlice(1); +} + +// Use one legend for the whole graph +$p[0]->SetLegends(array("May","June","July","Aug")); +$graph->legend->Pos(0.05,0.35); +$graph->legend->SetShadow(false); + +for( $i=0; $i < $n; ++$i ) { + $graph->Add($p[$i]); +} + +$graph->Stroke(); +?> + + diff --git a/html/includes/jpgraph/src/Examples/piec_csimex1.php b/html/includes/jpgraph/src/Examples/piec_csimex1.php new file mode 100644 index 0000000000..ff8d1f12fb --- /dev/null +++ b/html/includes/jpgraph/src/Examples/piec_csimex1.php @@ -0,0 +1,87 @@ +SetFrame(false); + +// Uncomment this line to add a drop shadow to the border +// $graph->SetShadow(); + +// Setup title +$graph->title->Set("CSIM Center Pie plot ex 1"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,18); +$graph->title->SetMargin(8); // Add a little bit more margin from the top + +// Create the pie plot +$p1 = new PiePlotC($data); + +// Set the radius of pie (as fraction of image size) +$p1->SetSize(0.32); + +// Move the center of the pie slightly to the top of the image +$p1->SetCenter(0.5,0.45); + +// Label font and color setup +$p1->value->SetFont(FF_ARIAL,FS_BOLD,12); +$p1->value->SetColor('white'); + +// Setup the title on the center circle +$p1->midtitle->Set("Test mid\nRow 1\nRow 2"); +$p1->midtitle->SetFont(FF_ARIAL,FS_NORMAL,14); + +// Set color for mid circle +$p1->SetMidColor('yellow'); + +// Use percentage values in the legends values (This is also the default) +$p1->SetLabelType(PIE_VALUE_PER); + +// The label array values may have printf() formatting in them. The argument to the +// form,at string will be the value of the slice (either the percetage or absolute +// depending on what was specified in the SetLabelType() above. +$lbl = array("adam\n%.1f%%","bertil\n%.1f%%","johan\n%.1f%%", + "peter\n%.1f%%","daniel\n%.1f%%","erik\n%.1f%%"); +$p1->SetLabels($lbl); + +// Uncomment this line to remove the borders around the slices +// $p1->ShowBorder(false); + +// Add drop shadow to slices +$p1->SetShadow(); + +// Explode all slices 15 pixels +$p1->ExplodeAll(15); + +// Setup the CSIM targets +$targ=array("piec_csimex1.php#1","piec_csimex1.php#2","piec_csimex1.php#3", + "piec_csimex1.php#4","piec_csimex1.php#5","piec_csimex1.php#6"); +$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d"); +$p1->SetCSIMTargets($targ,$alts); +$p1->SetMidCSIM("piec_csimex1.php#7","Center"); + + +// Setup a small help text in the image +$txt = new Text("Note: This is an example of image map. Hold\nyour mouse over the slices to see the values.\nThe URL just points back to this page"); +$txt->SetFont(FF_FONT1,FS_BOLD); +$txt->Pos(0.5,0.97,'center','bottom'); +$txt->SetBox('yellow','black'); +$txt->SetShadow(); +$graph->AddText($txt); + +// Add plot to pie graph +$graph->Add($p1); + +// .. and send the image on it's marry way to the browser +$graph->StrokeCSIM(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/piecex1.php b/html/includes/jpgraph/src/Examples/piecex1.php new file mode 100644 index 0000000000..8de02d4d33 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/piecex1.php @@ -0,0 +1,46 @@ +title->Set("Pie plot with center circle"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); +$graph->title->SetMargin(8); // Add a little bit more margin from the top + +// Create the pie plot +$p1 = new PiePlotC($data); + +// Set size of pie +$p1->SetSize(0.32); + +// Label font and color setup +$p1->value->SetFont(FF_ARIAL,FS_BOLD,10); +$p1->value->SetColor('black'); + +// Setup the title on the center circle +$p1->midtitle->Set("Test mid\nRow 1\nRow 2"); +$p1->midtitle->SetFont(FF_ARIAL,FS_NORMAL,10); + +// Set color for mid circle +$p1->SetMidColor('yellow'); + +// Use percentage values in the legends values (This is also the default) +$p1->SetLabelType(PIE_VALUE_PER); + +// Add plot to pie graph +$graph->Add($p1); + +// .. and send the image on it's marry way to the browser +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/piecex2.php b/html/includes/jpgraph/src/Examples/piecex2.php new file mode 100644 index 0000000000..1ecbfcd324 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/piecex2.php @@ -0,0 +1,70 @@ +SetFrame(false); + +// Uncomment this line to add a drop shadow to the border +// $graph->SetShadow(); + +// Setup title +$graph->title->Set("PiePlotC"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,18); +$graph->title->SetMargin(8); // Add a little bit more margin from the top + +// Create the pie plot +$p1 = new PiePlotC($data); + +// Set size of pie +$p1->SetSize(0.35); + +// Label font and color setup +$p1->value->SetFont(FF_ARIAL,FS_BOLD,12); +$p1->value->SetColor('white'); + +$p1->value->Show(); + +// Setup the title on the center circle +$p1->midtitle->Set("Test mid\nRow 1\nRow 2"); +$p1->midtitle->SetFont(FF_ARIAL,FS_NORMAL,14); + +// Set color for mid circle +$p1->SetMidColor('yellow'); + +// Use percentage values in the legends values (This is also the default) +$p1->SetLabelType(PIE_VALUE_PER); + +// The label array values may have printf() formatting in them. The argument to the +// form,at string will be the value of the slice (either the percetage or absolute +// depending on what was specified in the SetLabelType() above. +$lbl = array("adam\n%.1f%%","bertil\n%.1f%%","johan\n%.1f%%", + "peter\n%.1f%%","daniel\n%.1f%%","erik\n%.1f%%"); +$p1->SetLabels($lbl); + +// Uncomment this line to remove the borders around the slices +// $p1->ShowBorder(false); + +// Add drop shadow to slices +$p1->SetShadow(); + +// Explode all slices 15 pixels +$p1->ExplodeAll(15); + +// Add plot to pie graph +$graph->Add($p1); + +// .. and send the image on it's marry way to the browser +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pieex1.php b/html/includes/jpgraph/src/Examples/pieex1.php new file mode 100644 index 0000000000..bf00510182 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pieex1.php @@ -0,0 +1,32 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 1 Pie plot"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,14); +$graph->title->SetColor("brown"); + +// Create pie plot +$p1 = new PiePlot($data); +//$p1->SetSliceColors(array("red","blue","yellow","green")); +$p1->SetTheme("earth"); + +$p1->value->SetFont(FF_ARIAL,FS_NORMAL,10); +// Set how many pixels each slice should explode +$p1->Explode(array(0,15,15,25,15)); + + +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pieex2.php b/html/includes/jpgraph/src/Examples/pieex2.php new file mode 100644 index 0000000000..d80a8d5a3a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pieex2.php @@ -0,0 +1,24 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Example 2 Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Create +$p1 = new PiePlot($data); +$p1->SetLegends(array("Jan","Feb","Mar","Apr","May","Jun","Jul")); +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pieex3.php b/html/includes/jpgraph/src/Examples/pieex3.php new file mode 100644 index 0000000000..0f1ac218f9 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pieex3.php @@ -0,0 +1,53 @@ +SetShadow(); + +// Set A title for the plot +$graph->title->Set("Multiple - Pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Create plots +$size=0.13; +$p1 = new PiePlot($data); +$p1->SetLegends(array("Jan","Feb","Mar","Apr","May")); +$p1->SetSize($size); +$p1->SetCenter(0.25,0.32); +$p1->value->SetFont(FF_FONT0); +$p1->title->Set("2001"); + +$p2 = new PiePlot($data); +$p2->SetSize($size); +$p2->SetCenter(0.65,0.32); +$p2->value->SetFont(FF_FONT0); +$p2->title->Set("2002"); + +$p3 = new PiePlot($data); +$p3->SetSize($size); +$p3->SetCenter(0.25,0.75); +$p3->value->SetFont(FF_FONT0); +$p3->title->Set("2003"); + +$p4 = new PiePlot($data); +$p4->SetSize($size); +$p4->SetCenter(0.65,0.75); +$p4->value->SetFont(FF_FONT0); +$p4->title->Set("2004"); + +$graph->Add($p1); +$graph->Add($p2); +$graph->Add($p3); +$graph->Add($p4); + +$graph->Stroke(); + +?> + + + diff --git a/html/includes/jpgraph/src/Examples/pieex4.php b/html/includes/jpgraph/src/Examples/pieex4.php new file mode 100644 index 0000000000..2a1a1684a4 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pieex4.php @@ -0,0 +1,25 @@ +SetShadow(); + +$graph->title->Set("Example 4 of pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$p1 = new PiePlot($data); +$p1->value->SetFont(FF_FONT1,FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetSize(0.3); +$p1->SetCenter(0.4); +$p1->SetLegends(array("Jan","Feb","Mar","Apr","May")); +$graph->Add($p1); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pieex5.php b/html/includes/jpgraph/src/Examples/pieex5.php new file mode 100644 index 0000000000..89c2bb4a22 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pieex5.php @@ -0,0 +1,31 @@ +SetShadow(); + +// Setup graph title +$graph->title->Set("Example 5 of pie plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Create pie plot +$p1 = new PiePlot($data); +$p1->value->SetFont(FF_VERDANA,FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetSize(0.3); +$p1->SetCenter(0.4); +$p1->SetLegends(array("Jan","Feb","Mar","Apr","May")); +//$p1->SetStartAngle(M_PI/8); +$p1->ExplodeSlice(3); + +$graph->Add($p1); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pieex6.php b/html/includes/jpgraph/src/Examples/pieex6.php new file mode 100644 index 0000000000..bba3187677 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pieex6.php @@ -0,0 +1,48 @@ +SetShadow(); + +// Setup title +$graph->title->Set("Example of pie plot with absolute labels"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// The pie plot +$p1 = new PiePlot($data); + +// Move center of pie to the left to make better room +// for the legend +$p1->SetCenter(0.35,0.5); + +// No border +$p1->ShowBorder(false); + +// Label font and color setup +$p1->value->SetFont(FF_FONT1,FS_BOLD); +$p1->value->SetColor("darkred"); + +// Use absolute values (type==1) +$p1->SetLabelType(PIE_VALUE_ABS); + +// Label format +$p1->value->SetFormat("$%d"); +$p1->value->Show(); + +// Size of pie in fraction of the width of the graph +$p1->SetSize(0.3); + +// Legends +$p1->SetLegends(array("May ($%d)","June ($%d)","July ($%d)","Aug ($%d)")); +$graph->legend->Pos(0.05,0.15); + +$graph->Add($p1); +$graph->Stroke(); +?> + + diff --git a/html/includes/jpgraph/src/Examples/pieex7.php b/html/includes/jpgraph/src/Examples/pieex7.php new file mode 100644 index 0000000000..62037ec25e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pieex7.php @@ -0,0 +1,52 @@ +SetShadow(); + +// Setup title +$graph->title->Set("Pie plot with absolute labels"); +$graph->subtitle->Set('(With hidden 0 labels)'); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// The pie plot +$p1 = new PiePlot($data); + + +// Move center of pie to the left to make better room +// for the legend +$p1->SetCenter(0.35,0.5); + +// No border +$p1->ShowBorder(false); + +// Label font and color setup +$p1->value->SetFont(FF_FONT1,FS_BOLD); +$p1->value->SetColor("darkred"); + +// Use absolute values (type==1) +$p1->SetLabelType(PIE_VALUE_ABS); + +// Label format +$p1->value->SetFormat("$%d"); +$p1->value->HideZero(); +$p1->value->Show(); + +// Size of pie in fraction of the width of the graph +$p1->SetSize(0.3); + +// Legends +$p1->SetLegends(array("May ($%d)","June ($%d)","July ($%d)","Aug ($%d)")); +$graph->legend->Pos(0.05,0.2); + +$graph->Add($p1); +$graph->Stroke(); +?> + + diff --git a/html/includes/jpgraph/src/Examples/pieex8.php b/html/includes/jpgraph/src/Examples/pieex8.php new file mode 100644 index 0000000000..c5ea25f954 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pieex8.php @@ -0,0 +1,33 @@ +SetShadow(); + +// Title setup +$graph->title->Set("Adjusting the label pos"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Setup the pie plot +$p1 = new PiePlot($data); + +// Adjust size and position of plot +$p1->SetSize(0.4); +$p1->SetCenter(0.5,0.52); + +// Setup slice labels and move them into the plot +$p1->value->SetFont(FF_FONT1,FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetLabelPos(0.6); + +// Finally add the plot +$graph->Add($p1); + +// ... and stroke it +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/pieex9.php b/html/includes/jpgraph/src/Examples/pieex9.php new file mode 100644 index 0000000000..5a5536a3fd --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pieex9.php @@ -0,0 +1,39 @@ +SetShadow(); + +// Title setup +$graph->title->Set("Exploding all slices"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Setup the pie plot +$p1 = new PiePlot($data); + +// Adjust size and position of plot +$p1->SetSize(0.35); +$p1->SetCenter(0.5,0.52); + +// Setup slice labels and move them into the plot +$p1->value->SetFont(FF_FONT1,FS_BOLD); +$p1->value->SetColor("darkred"); +$p1->SetLabelPos(0.65); + +// Explode all slices +$p1->ExplodeAll(10); + +// Add drop shadow +$p1->SetShadow(); + +// Finally add the plot +$graph->Add($p1); + +// ... and stroke it +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/pielabelsex1.php b/html/includes/jpgraph/src/Examples/pielabelsex1.php new file mode 100644 index 0000000000..65c6100818 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pielabelsex1.php @@ -0,0 +1,38 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1,0.2); + + +// Create pie plot +$p1 = new PiePlot($data); +$p1->SetCenter(0.5,0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines +$p1->SetGuideLines(); +$p1->SetGuideLinesAdjust(1.4); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL,FS_NORMAL,9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pielabelsex2.php b/html/includes/jpgraph/src/Examples/pielabelsex2.php new file mode 100644 index 0000000000..beaa7c7f56 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pielabelsex2.php @@ -0,0 +1,38 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1,0.2); + + +// Create pie plot +$p1 = new PiePlot($data); +$p1->SetCenter(0.5,0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines. Make labels line up vertically +$p1->SetGuideLines(true,false); +$p1->SetGuideLinesAdjust(1.5); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL,FS_NORMAL,9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pielabelsex3.php b/html/includes/jpgraph/src/Examples/pielabelsex3.php new file mode 100644 index 0000000000..d0296c7474 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pielabelsex3.php @@ -0,0 +1,39 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1,0.2); + + +// Create pie plot +$p1 = new PiePlot($data); +$p1->SetCenter(0.5,0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines. Make labels line up vertically +// and force guide lines to always beeing used +$p1->SetGuideLines(true,false,true); +$p1->SetGuideLinesAdjust(1.5); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL,FS_NORMAL,9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pielabelsex4.php b/html/includes/jpgraph/src/Examples/pielabelsex4.php new file mode 100644 index 0000000000..0c744612e6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pielabelsex4.php @@ -0,0 +1,38 @@ +title->Set("Label guide lines"); +$graph->title->SetFont(FF_VERDANA,FS_BOLD,12); +$graph->title->SetColor("darkblue"); +$graph->legend->Pos(0.1,0.2); + + +// Create pie plot +$p1 = new PiePlot($data); +$p1->SetCenter(0.5,0.55); +$p1->SetSize(0.3); + +// Enable and set policy for guide-lines. Make labels line up vertically +$p1->SetGuideLines(true,false); +$p1->SetGuideLinesAdjust(1.1); + +// Setup the labels +$p1->SetLabelType(PIE_VALUE_PER); +$p1->value->Show(); +$p1->value->SetFont(FF_ARIAL,FS_NORMAL,9); +$p1->value->SetFormat('%2.1f%%'); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/plotlineex1.php b/html/includes/jpgraph/src/Examples/plotlineex1.php new file mode 100644 index 0000000000..6daa481624 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/plotlineex1.php @@ -0,0 +1,35 @@ +SetScale("textlin"); +$graph->SetMargin(40,20,50,70); + +$graph->legend->SetPos(0.5,0.97,'center','bottom'); + +$graph->title->Set('Plot line legend'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,14); + +$graph->SetTitleBackground('lightblue:1.3',TITLEBKG_STYLE2,TITLEBKG_FRAME_BEVEL); +$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED,'lightblue','navy'); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->value->Show(); +$bplot->value->SetFont(FF_VERDANA,FS_BOLD,8); +$bplot->SetValuePos('top'); +$bplot->SetLegend('Bar Legend'); +$graph->Add($bplot); + +$pline = new PlotLine(HORIZONTAL,8,'red',2); +$pline->SetLegend('Line Legend'); +$graph->legend->SetColumns(10); +$graph->Add($pline); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/polarex0-180.php b/html/includes/jpgraph/src/Examples/polarex0-180.php new file mode 100644 index 0000000000..68f93dfbdf --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex0-180.php @@ -0,0 +1,27 @@ +SetScale('lin'); +$graph->SetMargin(35,35,25,25); +$graph->SetType(POLAR_180); + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex0.php b/html/includes/jpgraph/src/Examples/polarex0.php new file mode 100644 index 0000000000..46cddfee61 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex0.php @@ -0,0 +1,26 @@ +SetScale('lin'); +$graph->SetMargin(35,35,25,25); + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex1.php b/html/includes/jpgraph/src/Examples/polarex1.php new file mode 100644 index 0000000000..dc6533760a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex1.php @@ -0,0 +1,30 @@ +SetScale('lin'); +$graph->SetType(POLAR_180); +//$graph->SetAngle(90); +//$graph->SetMargin(30-150,30-150,30+150,30+150); +$graph->Set90AndMargin(40,40,40,40); +//$graph->axis->SetLabelAlign('right','center'); + +$p = new PolarPlot($data); +$p->SetLegend("Test"); +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex10.php b/html/includes/jpgraph/src/Examples/polarex10.php new file mode 100644 index 0000000000..093c1e57ae --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex10.php @@ -0,0 +1,66 @@ +SetScale('log',100); +$graph->SetType(POLAR_360); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +// Set color for gradient lines +$graph->axis->SetGridColor('lightblue:0.9','lightblue:0.9','lightblue:0.9'); + +// Set label and axis colors +$graph->axis->SetColor('black','navy','darkred'); + +// Draw the ticks on the bottom side of the radius axis +$graph->axis->SetTickSide(SIDE_DOWN); + +// Increase the margin for the labels since we changed the +// side of the ticks. +$graph->axis->SetLabelMargin(6); + +// Change fonts +$graph->axis->SetFont(FF_ARIAL,FS_NORMAL,8); +$graph->axis->SetAngleFont(FF_ARIAL,FS_NORMAL,8); + + +// Setup graph title +$graph->title->Set('Polar plot #10'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Setup tab title +$graph->tabtitle->Set('Microphone #1'); +$graph->tabtitle->SetColor('brown:0.5','lightyellow'); + + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$p->mark->SetType(MARK_SQUARE); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex2.php b/html/includes/jpgraph/src/Examples/polarex2.php new file mode 100644 index 0000000000..3bb700496b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex2.php @@ -0,0 +1,34 @@ +SetScale('lin'); + +$graph->title->Set('Polar plot #2'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + +// Hide last labels on the Radius axis +// They intersect with the box otherwise +$graph->axis->HideLastTickLabel(); + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex3-lin.php b/html/includes/jpgraph/src/Examples/polarex3-lin.php new file mode 100644 index 0000000000..29e5bb0bd1 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex3-lin.php @@ -0,0 +1,33 @@ +SetScale('lin',200); +$graph->SetType(POLAR_180); + +$graph->title->Set('Polar plot #3'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + +$graph->axis->ShowGrid(true,false); + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex3.php b/html/includes/jpgraph/src/Examples/polarex3.php new file mode 100644 index 0000000000..c0b160e273 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex3.php @@ -0,0 +1,33 @@ +SetScale('log',100); +$graph->SetType(POLAR_180); + +$graph->title->Set('Polar plot #3'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + +$graph->axis->ShowGrid(true,false); + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex4.php b/html/includes/jpgraph/src/Examples/polarex4.php new file mode 100644 index 0000000000..f9c6950638 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex4.php @@ -0,0 +1,34 @@ +SetScale('log'); + +$graph->title->Set('Polar plot #4'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + +// Hide last labels on the Radius axis +// They intersect with the box otherwise +$graph->axis->HideLastTickLabel(); + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex5.php b/html/includes/jpgraph/src/Examples/polarex5.php new file mode 100644 index 0000000000..69a9910c21 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex5.php @@ -0,0 +1,37 @@ +SetScale('log'); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +$graph->title->Set('Polar plot #5'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + +// Hide last labels on the Radius axis +// They intersect with the box otherwise +$graph->axis->HideLastTickLabel(); + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex6.php b/html/includes/jpgraph/src/Examples/polarex6.php new file mode 100644 index 0000000000..dddde3223d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex6.php @@ -0,0 +1,35 @@ +SetScale('log'); +$graph->SetType(POLAR_180); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +$graph->title->Set('Polar plot #6'); +$graph->title->SetFont(FF_FONT2,FS_BOLD); +$graph->title->SetColor('navy'); + + +$p = new PolarPlot($data); +$p->SetFillColor('lightred@0.5'); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex7-1.php b/html/includes/jpgraph/src/Examples/polarex7-1.php new file mode 100644 index 0000000000..bbdd3e622c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex7-1.php @@ -0,0 +1,50 @@ +SetScale('log',100); +$graph->SetType(POLAR_180); +$graph->SetPlotSize(220,250); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +$graph->SetBackgroundGradient('blue:1.3','brown:1.4',GRAD_HOR,BGRAD_PLOT); + +// Set color for gradient lines +$graph->axis->SetGridColor('gray','gray','gray'); + +// Setup axis title +$graph->axis->SetTitle('Coverage (in meter)','middle'); +$graph->axis->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->title->Set('Polar plot #7'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Adjust legen box position and color +$graph->legend->SetColor('navy','darkgray'); +$graph->legend->SetFillColor('white'); +$graph->legend->SetShadow('darkgray@0.5',5); + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$p->mark->SetType(MARK_SQUARE); +$p->SetLegend("Mirophone #1\n(No amps)"); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex7-2.php b/html/includes/jpgraph/src/Examples/polarex7-2.php new file mode 100644 index 0000000000..342fc57dad --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex7-2.php @@ -0,0 +1,53 @@ +SetScale('log',100); +$graph->SetType(POLAR_360); +$graph->SetPlotSize(220,300); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +$graph->SetBackgroundGradient('blue:1.3','brown:1.4',GRAD_MIDHOR,BGRAD_PLOT); + +// Set color for gradient lines +$graph->axis->SetGridColor('gray','gray','gray'); + +$graph->title->Set('Polar plot #7-2'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Adjust legen box position and color +$graph->legend->SetColor('navy','darkgray'); +$graph->legend->SetFillColor('white'); +$graph->legend->SetShadow('darkgray@0.5',5); + +$p = new PolarPlot($data); +$p->SetFillColor('yellow@0.6'); +$p->mark->SetType(MARK_SQUARE); +$p->SetLegend("Mirophone #1\n(No amps)"); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex7.php b/html/includes/jpgraph/src/Examples/polarex7.php new file mode 100644 index 0000000000..735aa8f1e7 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex7.php @@ -0,0 +1,53 @@ +SetScale('lin',300); +$graph->SetType(POLAR_180); +$graph->SetPlotSize(220,250); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +$graph->SetBackgroundGradient('blue:1.3','brown:1.4',GRAD_HOR,BGRAD_PLOT); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +// Set color for gradient lines +$graph->axis->SetGridColor('gray','gray','gray'); + +// Setup axis title +$graph->axis->SetTitle('Coverage (in meter)','middle'); +$graph->axis->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->title->Set('Polar plot #7'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Adjust legen box position and color +$graph->legend->SetColor('navy','darkgray'); +$graph->legend->SetFillColor('white'); +$graph->legend->SetShadow('darkgray@0.5',5); + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$p->mark->SetType(MARK_SQUARE); +$p->SetLegend("Mirophone #1\n(No amps)"); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex8.php b/html/includes/jpgraph/src/Examples/polarex8.php new file mode 100644 index 0000000000..84b1167323 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex8.php @@ -0,0 +1,54 @@ +SetScale('log',100); +$graph->SetType(POLAR_180); +//$graph->SetPlotSize(250,250); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +// Set plotarea color +$graph->SetColor('lightblue'); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +// Set color for gradient lines +$graph->axis->SetGridColor('lightblue:0.8','lightblue:0.8','lightblue:0.8'); + +// Setup axis title +$graph->axis->SetTitle('Coverage (in meter)','middle'); +$graph->axis->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->title->Set('Polar plot #8'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Adjust legen box position and color +$graph->legend->SetColor('navy','darkgray'); +$graph->legend->SetFillColor('white'); +$graph->legend->SetShadow('darkgray@0.5',5); + +$p = new PolarPlot($data); +$p->SetFillColor('white@0.5'); +$p->mark->SetType(MARK_SQUARE); +$p->SetLegend("Mirophone #1\n(No amps)"); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/polarex9.php b/html/includes/jpgraph/src/Examples/polarex9.php new file mode 100644 index 0000000000..206413c31a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/polarex9.php @@ -0,0 +1,63 @@ +SetScale('log',100); +$graph->SetType(POLAR_180); + +// Hide frame around graph (by setting width=0) +$graph->SetFrame(true,'white',1); + +// Show both major and minor grid lines +$graph->axis->ShowGrid(true,true); + +// Set color for gradient lines +$graph->axis->SetGridColor('lightblue:0.9','lightblue:0.9','lightblue:0.9'); + +// Set label and axis colors +$graph->axis->SetColor('black','navy','darkred'); + +// Draw the ticks on the bottom side of the radius axis +$graph->axis->SetTickSide(SIDE_DOWN); + +// Increase the margin for the labels since we changed the +// side of the ticks. +$graph->axis->SetLabelMargin(6); + +// Change fonts +$graph->axis->SetFont(FF_ARIAL,FS_NORMAL,8); +$graph->axis->SetAngleFont(FF_ARIAL,FS_NORMAL,8); + +// Setup axis title +$graph->axis->SetTitle('Coverage (in meter)','middle'); +$graph->axis->title->SetFont(FF_FONT1,FS_BOLD); + +// Setup graph title +$graph->title->Set('Polar plot #9'); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('navy'); + +// Setup tab title +$graph->tabtitle->Set('Microphone #1'); +$graph->tabtitle->SetColor('brown:0.5','lightyellow'); + + +$p = new PolarPlot($data); +$p->SetFillColor('lightblue@0.5'); +$p->mark->SetType(MARK_SQUARE); + +$graph->Add($p); + +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/pushpinex1.php b/html/includes/jpgraph/src/Examples/pushpinex1.php new file mode 100644 index 0000000000..3102d3021d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pushpinex1.php @@ -0,0 +1,62 @@ +img->SetMargin(1,1,1,1); +$graph->SetScale('linlin',0,100,0,100); + +// We don't want any axis to be shown +$graph->xaxis->Hide(); +$graph->yaxis->Hide(); + +// Use a worldmap as the background and let it fill the plot area +$graph->SetBackgroundImage(WORLDMAP,BGIMG_FILLPLOT); + +// Setup a nice title with a striped bevel background +$graph->title->Set("Pushpin graph"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('white'); +$graph->SetTitleBackground('darkgreen',TITLEBKG_STYLE1,TITLEBKG_FRAME_BEVEL); +$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED,'blue','darkgreen'); + +// Finally create the scatterplot +$sp = new ScatterPlot($datay,$datax); + +// We want the markers to be an image +$sp->mark->SetType(MARK_IMG_PUSHPIN,'blue',0.6); + +// Install the Y-X callback for the markers +$sp->mark->SetCallbackYX('markCallback'); + +// ... and add it to the graph +$graph->Add($sp); + +// .. and output to browser +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/pushpinex2.php b/html/includes/jpgraph/src/Examples/pushpinex2.php new file mode 100644 index 0000000000..58c97730dd --- /dev/null +++ b/html/includes/jpgraph/src/Examples/pushpinex2.php @@ -0,0 +1,63 @@ +img->SetMargin(1,1,1,1); +$graph->SetScale('linlin',0,100,0,100); + +// We don't want any axis to be shown +$graph->xaxis->Hide(); +$graph->yaxis->Hide(); + +// Use a worldmap as the background and let it fill the plot area +$graph->SetBackgroundImage(WORLDMAP,BGIMG_FILLPLOT); + +// Setup a nice title with a striped bevel background +$graph->title->Set("Pushpin graph"); +$graph->title->SetFont(FF_ARIAL,FS_BOLD,16); +$graph->title->SetColor('white'); +$graph->SetTitleBackground('darkgreen',TITLEBKG_STYLE1,TITLEBKG_FRAME_BEVEL); +$graph->SetTitleBackgroundFillStyle(TITLEBKG_FILLSTYLE_HSTRIPED,'blue','darkgreen'); + +// Finally create the lineplot +$lp = new LinePlot($datay,$datax); +$lp->SetColor('lightgray'); + +// We want the markers to be an image +$lp->mark->SetType(MARK_IMG_PUSHPIN,'blue',0.6); + +// Install the Y-X callback for the markers +$lp->mark->SetCallbackYX('markCallback'); + +// ... and add it to the graph +$graph->Add($lp); + +// .. and output to browser +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/radarex1.php b/html/includes/jpgraph/src/Examples/radarex1.php new file mode 100644 index 0000000000..e300697f1a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarex1.php @@ -0,0 +1,15 @@ +Add($plot); +$graph->Stroke(); +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/radarex2.php b/html/includes/jpgraph/src/Examples/radarex2.php new file mode 100644 index 0000000000..18ddb0c345 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarex2.php @@ -0,0 +1,21 @@ +title->Set('Weekly goals'); +$graph->subtitle->Set('Year 2003'); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightred'); +$graph->SetSize(0.6); +$graph->SetPos(0.5,0.6); +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/radarex3.php b/html/includes/jpgraph/src/Examples/radarex3.php new file mode 100644 index 0000000000..a61e394917 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarex3.php @@ -0,0 +1,21 @@ +GetShortMonth(); +$graph->SetTitles($titles); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightblue'); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/radarex4.php b/html/includes/jpgraph/src/Examples/radarex4.php new file mode 100644 index 0000000000..c285e10acb --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarex4.php @@ -0,0 +1,25 @@ +GetShortMonth(); +$graph->SetTitles($titles); + +// Add grid lines +$graph->grid->Show(); +$graph->grid->SetLineStyle('dotted'); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightblue'); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/radarex5.php b/html/includes/jpgraph/src/Examples/radarex5.php new file mode 100644 index 0000000000..901db85808 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarex5.php @@ -0,0 +1,26 @@ +GetShortMonth(); +$graph->SetTitles($titles); + +// Add grid lines +$graph->grid->Show(); +$graph->grid->SetColor('darkred'); +$graph->grid->SetLineStyle('dotted'); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightblue'); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/radarex6.1.php b/html/includes/jpgraph/src/Examples/radarex6.1.php new file mode 100644 index 0000000000..f6ca02b7ae --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarex6.1.php @@ -0,0 +1,45 @@ +SetShadow(); + +// Create the titles for the axis +$titles = $gDateLocale->GetShortMonth(); +$graph->SetTitles($titles); +$graph->SetColor('lightyellow'); + +// ADjust the position to make more room +// for the legend +$graph->SetCenter(0.4,0.55); +$graph->SetSize(0.6); + +// Add grid lines +$graph->grid->Show(); +$graph->grid->SetColor('darkred'); +$graph->grid->SetLineStyle('dotted'); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightblue'); +$plot->SetLegend("QA results"); + +$plot2 = new RadarPlot($data2); +$plot2->SetLegend("Target"); +$plot2->SetColor('red'); +$plot2->SetFill(false); +$plot2->SetLineWeight(2); + + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Add($plot2); +$graph->Stroke(); +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/radarex6.php b/html/includes/jpgraph/src/Examples/radarex6.php new file mode 100644 index 0000000000..8b71761156 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarex6.php @@ -0,0 +1,35 @@ +SetShadow(); + +// Create the titles for the axis +$titles = $gDateLocale->GetShortMonth(); +$graph->SetTitles($titles); +$graph->SetColor('lightyellow'); + +// ADjust the position to make more room +// for the legend +$graph->SetCenter(0.4,0.5); + +// Add grid lines +$graph->grid->Show(); +$graph->grid->SetColor('darkred'); +$graph->grid->SetLineStyle('dotted'); + +$plot = new RadarPlot($data); +$plot->SetFillColor('lightblue'); +$plot->SetLegend("QA results"); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/radarex7.php b/html/includes/jpgraph/src/Examples/radarex7.php new file mode 100644 index 0000000000..5340f255fb --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarex7.php @@ -0,0 +1,48 @@ +SetColor("white"); +$graph->SetShadow(); + +// Position the graph +$graph->SetCenter(0.4,0.55); + +// Setup the axis formatting +$graph->axis->SetFont(FF_FONT1,FS_BOLD); +$graph->axis->SetWeight(2); + +// Setup the grid lines +$graph->grid->SetLineStyle("longdashed"); +$graph->grid->SetColor("navy"); +$graph->grid->Show(); +$graph->HideTickMarks(); + +// Setup graph titles +$graph->title->Set("Quality result"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->SetTitles(array("One","Two","Three","Four","Five","Sex","Seven","Eight","Nine","Ten")); +// Create the first radar plot +$plot = new RadarPlot(array(30,80,60,40,71,81,47)); +$plot->SetLegend("Goal"); +$plot->SetColor("red","lightred"); +$plot->SetFill(false); +$plot->SetLineWeight(2); + +// Create the second radar plot +$plot2 = new RadarPlot(array(70,40,30,80,31,51,14)); +$plot2->SetLegend("Actual"); +$plot2->SetColor("blue","lightred"); + +// Add the plots to the graph +$graph->Add($plot2); +$graph->Add($plot); + +// And output the graph +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/radarex8.1.php b/html/includes/jpgraph/src/Examples/radarex8.1.php new file mode 100644 index 0000000000..4d85dd2c97 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarex8.1.php @@ -0,0 +1,52 @@ +img->SetAntiAliasing(); + +// Set background color and shadow +$graph->SetColor("white"); +$graph->SetShadow(); + +// Position the graph +$graph->SetCenter(0.4,0.55); + +// Setup the axis formatting +$graph->axis->SetFont(FF_FONT1,FS_BOLD); + +// Setup the grid lines +$graph->grid->SetLineStyle("solid"); +$graph->grid->SetColor("navy"); +$graph->grid->Show(); +$graph->HideTickMarks(); + +// Setup graph titles +$graph->title->Set("Quality result"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->SetTitles($gDateLocale->GetShortMonth()); + +// Create the first radar plot +$plot = new RadarPlot(array(70,80,60,90,71,81,47)); +$plot->SetLegend("Goal"); +$plot->SetColor("red","lightred"); +$plot->SetFill(false); +$plot->SetLineWeight(2); + +// Create the second radar plot +$plot2 = new RadarPlot(array(70,40,30,80,31,51,14)); +$plot2->SetLegend("Actual"); +$plot2->SetLineWeight(2); +$plot2->SetColor("blue"); +$plot2->SetFill(false); + +// Add the plots to the graph +$graph->Add($plot2); +$graph->Add($plot); + +// And output the graph +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/radarex8.php b/html/includes/jpgraph/src/Examples/radarex8.php new file mode 100644 index 0000000000..0e7a2a1a4c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarex8.php @@ -0,0 +1,51 @@ +img->SetAntiAliasing(); + +// Set background color and shadow +$graph->SetColor("white"); +$graph->SetShadow(); + +// Position the graph +$graph->SetCenter(0.4,0.55); + +// Setup the axis formatting +$graph->axis->SetFont(FF_FONT1,FS_BOLD); + +// Setup the grid lines +$graph->grid->SetLineStyle("solid"); +$graph->grid->SetColor("navy"); +$graph->grid->Show(); +$graph->HideTickMarks(); + +// Setup graph titles +$graph->title->Set("Quality result"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->SetTitles($gDateLocale->GetShortMonth()); + +// Create the first radar plot +$plot = new RadarPlot(array(70,80,60,90,71,81,47)); +$plot->SetLegend("Goal"); +$plot->SetColor("red","lightred"); +$plot->SetFill(false); +$plot->SetLineWeight(2); + +// Create the second radar plot +$plot2 = new RadarPlot(array(70,40,30,80,31,51,14)); +$plot2->SetLegend("Actual"); +$plot2->SetLineWeight(2); +$plot2->SetColor("blue"); +$plot2->SetFill(false); + +// Add the plots to the graph +$graph->Add($plot2); +$graph->Add($plot); + +// And output the graph +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/radarex9.php b/html/includes/jpgraph/src/Examples/radarex9.php new file mode 100644 index 0000000000..14f97c271e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarex9.php @@ -0,0 +1,33 @@ +title->Set("Accumulated PPM"); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,12); + +$graph->subtitle->Set("(according to direction)"); +$graph->subtitle->SetFont(FF_VERDANA,FS_ITALIC,10); + + +$graph->SetTitles($titles); +$graph->SetCenter(0.5,0.55); +$graph->HideTickMarks(); +$graph->SetColor('lightyellow'); +$graph->axis->SetColor('darkgray@0.3'); +$graph->grid->SetColor('darkgray@0.3'); +$graph->grid->Show(); + +$graph->SetGridDepth(DEPTH_BACK); + +$plot = new RadarPlot($data); +$plot->SetColor('red@0.2'); +$plot->SetLineWeight(1); +$plot->SetFillColor('red@0.7'); +$graph->Add($plot); +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/radarlogex1.php b/html/includes/jpgraph/src/Examples/radarlogex1.php new file mode 100644 index 0000000000..390c2fbef6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarlogex1.php @@ -0,0 +1,53 @@ +img->SetAntiAliasing(); + +// Make the spider graph fill out it's bounding box +$graph->SetPlotSize(0.85); + +// Use logarithmic scale (If you don't use any SetScale() +// the spider graph will default to linear scale +$graph->SetScale("log"); + +// Uncomment the following line if you want to supress +// minor tick marks +//$graph->yscale->ticks->SupressMinorTickMarks(); + +// We want the major tick marks to be black and minor +// slightly less noticable +$graph->yscale->ticks->SetMarkColor("black","darkgray"); + +// Set the axis title font +$graph->axis->title->SetFont(FF_ARIAL,FS_BOLD,12); + +// Use blue axis +$graph->axis->SetColor("blue"); + +$plot = new RadarPlot($data); +$plot->SetLineWeight(1); +$plot->SetColor('forestgreen'); + +$plot2 = new RadarPlot($data2); +$plot2->SetLineWeight(2); +$plot2->SetColor('red'); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Add($plot2); +$graph->Stroke(); +?> + diff --git a/html/includes/jpgraph/src/Examples/radarlogex2.php b/html/includes/jpgraph/src/Examples/radarlogex2.php new file mode 100644 index 0000000000..3198f426a4 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarlogex2.php @@ -0,0 +1,47 @@ +img->SetAntiAliasing(); + +// Make the spider graph fill out it's bounding box +$graph->SetPlotSize(0.85); + +// Use logarithmic scale (If you don't use any SetScale() +// the spider graph will default to linear scale +$graph->SetScale("log"); + +// Uncomment the following line if you want to supress +// minor tick marks +// $graph->yscale->ticks->SupressMinorTickMarks(); + +// We want the major tick marks to be black and minor +// slightly less noticable +$graph->yscale->ticks->SetMarkColor("black","darkgray"); + +// Set the axis title font +$graph->axis->title->SetFont(FF_ARIAL,FS_BOLD,12); + +// Use blue axis +$graph->axis->SetColor("blue"); + +$plot = new RadarPlot($data); +$plot->SetLineWeight(2); +$plot->SetColor('forestgreen'); + +// Add the plot and display the graph +$graph->Add($plot); +$graph->Stroke(); +?> + diff --git a/html/includes/jpgraph/src/Examples/radarmarkex1.php b/html/includes/jpgraph/src/Examples/radarmarkex1.php new file mode 100644 index 0000000000..af4cba5dc4 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/radarmarkex1.php @@ -0,0 +1,35 @@ +title->Set("Radar with marks"); +$graph->title->SetFont(FF_VERDANA,FS_NORMAL,12); + +$graph->SetTitles($titles); +$graph->SetCenter(0.5,0.55); +$graph->HideTickMarks(); +$graph->SetColor('lightgreen@0.7'); +$graph->axis->SetColor('darkgray'); +$graph->grid->SetColor('darkgray'); +$graph->grid->Show(); + +$graph->axis->title->SetFont(FF_ARIAL,FS_NORMAL,12); +$graph->axis->title->SetMargin(5); +$graph->SetGridDepth(DEPTH_BACK); +$graph->SetSize(0.6); + +$plot = new RadarPlot($data); +$plot->SetColor('red@0.2'); +$plot->SetLineWeight(1); +$plot->SetFillColor('red@0.7'); + +$plot->mark->SetType(MARK_IMG_SBALL,'red'); + +$graph->Add($plot); +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/rotateex1.php b/html/includes/jpgraph/src/Examples/rotateex1.php new file mode 100644 index 0000000000..5bfc82325a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/rotateex1.php @@ -0,0 +1,46 @@ +SetAngle(40); +$graph->img->SetMargin(80,80,80,80); +$graph->SetScale("textlin"); +$graph->SetY2Scale("lin"); +$graph->SetShadow(); + +// Create the linear plot +$lineplot=new LinePlot($ydata); +$lineplot2=new LinePlot($y2data); + +// Add the plot to the graph +$graph->Add($lineplot); +$graph->AddY2($lineplot2); +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); +$graph->y2axis->SetColor("orange"); + +$graph->title->Set("Example 1 rotated graph (40 degree)"); +$graph->legend->Pos(0.05,0.1,"right","top"); + +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$lineplot->SetColor("blue"); +$lineplot->SetWeight(2); + +$lineplot2->SetColor("orange"); +$lineplot2->SetWeight(2); + +$graph->yaxis->SetColor("blue"); + +$lineplot->SetLegend("Plot 1"); +$lineplot2->SetLegend("Plot 2"); + +// Display the graph +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/rotex0.php b/html/includes/jpgraph/src/Examples/rotex0.php new file mode 100644 index 0000000000..fe990e0e80 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/rotex0.php @@ -0,0 +1,22 @@ +SetMargin(30,90,30,30); +$graph->SetScale("textlin"); + +$line = new LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/rotex1.php b/html/includes/jpgraph/src/Examples/rotex1.php new file mode 100644 index 0000000000..455e35d668 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/rotex1.php @@ -0,0 +1,24 @@ +SetMargin(30,90,30,30); +$graph->SetScale("textlin"); + +$graph->img->SetAngle(45); + +$line = new LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/rotex2.php b/html/includes/jpgraph/src/Examples/rotex2.php new file mode 100644 index 0000000000..2e3a3304e9 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/rotex2.php @@ -0,0 +1,24 @@ +SetMargin(30,90,30,30); +$graph->SetScale("textlin"); + +$graph->img->SetAngle(90); + +$line = new LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/rotex3.php b/html/includes/jpgraph/src/Examples/rotex3.php new file mode 100644 index 0000000000..2f05091c5c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/rotex3.php @@ -0,0 +1,25 @@ +SetMargin(30,90,30,30); +$graph->SetScale("textlin"); + +$graph->img->SetAngle(45); +$graph->img->SetCenter(floor(270/2),floor(170/2)); + +$line = new LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/rotex4.php b/html/includes/jpgraph/src/Examples/rotex4.php new file mode 100644 index 0000000000..eeb2d97d29 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/rotex4.php @@ -0,0 +1,25 @@ +SetMargin(30,90,30,30); +$graph->SetScale("textlin"); + +$graph->img->SetAngle(90); +$graph->img->SetCenter(floor(270/2),floor(170/2)); + +$line = new LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/rotex5.php b/html/includes/jpgraph/src/Examples/rotex5.php new file mode 100644 index 0000000000..c61dceac07 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/rotex5.php @@ -0,0 +1,25 @@ +SetMargin(30,90,30,30); +$graph->SetScale("textlin"); + +$graph->img->SetAngle(-30); +$graph->img->SetCenter(30,170-30); + +$line = new LinePlot($ydata); +$line->SetLegend('2002'); +$line->SetColor('darkred'); +$line->SetWeight(2); +$graph->Add($line); + +// Output graph +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/saab_95.jpg b/html/includes/jpgraph/src/Examples/saab_95.jpg new file mode 100644 index 0000000000..189b0d48f8 Binary files /dev/null and b/html/includes/jpgraph/src/Examples/saab_95.jpg differ diff --git a/html/includes/jpgraph/src/Examples/scatter_csimex1.php b/html/includes/jpgraph/src/Examples/scatter_csimex1.php new file mode 100644 index 0000000000..6ec0cf3238 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/scatter_csimex1.php @@ -0,0 +1,44 @@ +SetShadow(); +$graph->SetScale("linlin"); + +//$graph->img->SetMargin(40,40,40,40); + +$graph->title->Set("Scatter plot with Image Map"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Client side image map targets +$targ=array("pie_csimex1.php#1","pie_csimex1.php#2","pie_csimex1.php#3", +"pie_csimex1.php#4","pie_csimex1.php#5","pie_csimex1.php#6", +"pie_csimex1.php#7","pie_csimex1.php#8","pie_csimex1.php#9" ); + +// Strings to put as "alts" (and "title" value) +$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d","val=%d","val=%d","val=%d"); + +// Create a new scatter plot +$sp1 = new ScatterPlot($datay,$datax); + +// Use diamonds as markerss +$sp1->mark->SetType(MARK_DIAMOND); +$sp1->mark->SetWidth(10); + +// Set the scatter plot image map targets +$sp1->SetCSIMTargets($targ,$alts); + +// Add the plot +$graph->Add($sp1); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); + +?> diff --git a/html/includes/jpgraph/src/Examples/scatterex1.php b/html/includes/jpgraph/src/Examples/scatterex1.php new file mode 100644 index 0000000000..ed47006af3 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/scatterex1.php @@ -0,0 +1,22 @@ +SetScale("linlin"); + +$graph->img->SetMargin(40,40,40,40); +$graph->SetShadow(); + +$graph->title->Set("A simple scatter plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$sp1 = new ScatterPlot($datay,$datax); + +$graph->Add($sp1); +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/scatterex2.php b/html/includes/jpgraph/src/Examples/scatterex2.php new file mode 100644 index 0000000000..c68414c3a8 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/scatterex2.php @@ -0,0 +1,25 @@ +SetScale("linlin"); + +$graph->img->SetMargin(40,40,40,40); +$graph->SetShadow(); + +$graph->title->Set("A simple scatter plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$sp1 = new ScatterPlot($datay,$datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->mark->SetWidth(8); + +$graph->Add($sp1); +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/scatterlinkex1.php b/html/includes/jpgraph/src/Examples/scatterlinkex1.php new file mode 100644 index 0000000000..4ad155be0e --- /dev/null +++ b/html/includes/jpgraph/src/Examples/scatterlinkex1.php @@ -0,0 +1,26 @@ +img->SetMargin(40,40,40,40); +$graph->img->SetAntiAliasing(); +$graph->SetScale("linlin"); +$graph->SetShadow(); +$graph->title->Set("Linked Scatter plot ex1"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +$sp1 = new ScatterPlot($datay,$datax); +$sp1->SetLinkPoints(true,"red",2); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("navy"); +$sp1->mark->SetWidth(3); + +$graph->Add($sp1); +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/scatterlinkex2.php b/html/includes/jpgraph/src/Examples/scatterlinkex2.php new file mode 100644 index 0000000000..98615a070c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/scatterlinkex2.php @@ -0,0 +1,43 @@ +SetScale("linlin"); + +$graph->img->SetMargin(40,40,40,40); + +$graph->SetShadow(); +$graph->title->Set("Linked scatter plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// 10% top and bottom grace +$graph->yscale->SetGrace(5,5); +$graph->xscale->SetGrace(1,1); + +$sp1 = new ScatterPlot($datay,$datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->SetColor("blue"); + +//$sp1->SetWeight(3); +$sp1->mark->SetWidth(4); +$sp1->SetLinkPoints(); + +$graph->Add($sp1); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/scatterlinkex3.php b/html/includes/jpgraph/src/Examples/scatterlinkex3.php new file mode 100644 index 0000000000..1909a93195 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/scatterlinkex3.php @@ -0,0 +1,46 @@ +SetScale("linlin"); +$graph->SetShadow(); +$graph->SetAxisStyle(AXSTYLE_BOXOUT); + +$graph->img->SetMargin(50,50,60,40); + +$graph->title->Set("Linked scatter plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->subtitle->Set("(BOXOUT Axis style)"); +$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL); + + +// 10% top and bottom grace +$graph->yscale->SetGrace(5,5); +$graph->xscale->SetGrace(1,1); + +$sp1 = new ScatterPlot($datay,$datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->SetColor("blue"); + +//$sp1->SetWeight(3); +$sp1->mark->SetWidth(4); +$sp1->SetLinkPoints(); + +$graph->Add($sp1); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/scatterlinkex4.php b/html/includes/jpgraph/src/Examples/scatterlinkex4.php new file mode 100644 index 0000000000..1c9071207d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/scatterlinkex4.php @@ -0,0 +1,45 @@ +SetScale("linlin"); +$graph->SetShadow(); +$graph->SetAxisStyle(AXSTYLE_BOXIN); + +$graph->img->SetMargin(50,50,60,40); + +$graph->title->Set("Linked scatter plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->subtitle->Set("(BOXIN Axis style)"); +$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL); + + +// 10% top and bottom grace +$graph->yscale->SetGrace(5,5); +$graph->xscale->SetGrace(1,1); + +$sp1 = new ScatterPlot($datay,$datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->SetColor("blue"); + +//$sp1->SetWeight(3); +$sp1->mark->SetWidth(4); +$sp1->SetLinkPoints(); + +$graph->Add($sp1); + +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/scatterrotex1.php b/html/includes/jpgraph/src/Examples/scatterrotex1.php new file mode 100644 index 0000000000..9061e21ca1 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/scatterrotex1.php @@ -0,0 +1,35 @@ +SetScale("linlin"); + +$graph->Set90AndMargin(40,40,40,40); +$graph->SetShadow(); + +$graph->title->Set("A 90 degrees rotated scatter plot"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Adjust the label align for X-axis so they look good rotated +$graph->xaxis->SetLabelAlign('right','center','right'); + +// Adjust the label align for Y-axis so they look good rotated +$graph->yaxis->SetLabelAlign('center','bottom'); + +$graph->xaxis->SetTitle('X-Axis title','low'); +$graph->xaxis->title->SetAngle(90); +$graph->xaxis->title->SetMargin(15); + +$sp1 = new ScatterPlot($datay,$datax); +$sp1->mark->SetType(MARK_FILLEDCIRCLE); +$sp1->mark->SetFillColor("red"); +$sp1->mark->SetWidth(5); + +$graph->Add($sp1); +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/show-example.php b/html/includes/jpgraph/src/Examples/show-example.php new file mode 100644 index 0000000000..0907ce452d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/show-example.php @@ -0,0 +1,24 @@ + + + + + Test suite for JpGraph - <?php echo $target; ?> + + + + "; + else + echo ""; + ?> + + + diff --git a/html/includes/jpgraph/src/Examples/show-image.php b/html/includes/jpgraph/src/Examples/show-image.php new file mode 100644 index 0000000000..95766aef13 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/show-image.php @@ -0,0 +1,10 @@ + + + + + Image <?php echo basename($target); ?> + + +<?php echo basename($target); ?> + + diff --git a/html/includes/jpgraph/src/Examples/show-source.php b/html/includes/jpgraph/src/Examples/show-source.php new file mode 100644 index 0000000000..7c3c232260 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/show-source.php @@ -0,0 +1 @@ + diff --git a/html/includes/jpgraph/src/Examples/smallstaticbandsex1.php b/html/includes/jpgraph/src/Examples/smallstaticbandsex1.php new file mode 100644 index 0000000000..206a67e2aa --- /dev/null +++ b/html/includes/jpgraph/src/Examples/smallstaticbandsex1.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->SetMargin(25,10,20,20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new PlotBand(HORIZONTAL,BAND_RDIAG,15,35,'khaki4'); +$band->ShowFrame(false); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_RDIAG'); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/smallstaticbandsex10.php b/html/includes/jpgraph/src/Examples/smallstaticbandsex10.php new file mode 100644 index 0000000000..15d294a47f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/smallstaticbandsex10.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->SetMargin(25,10,20,20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new PlotBand(HORIZONTAL,BAND_DIAGCROSS,15,35,'khaki4'); +$band->ShowFrame(false); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_DIAGCROSS'); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/smallstaticbandsex11.php b/html/includes/jpgraph/src/Examples/smallstaticbandsex11.php new file mode 100644 index 0000000000..15d294a47f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/smallstaticbandsex11.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->SetMargin(25,10,20,20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new PlotBand(HORIZONTAL,BAND_DIAGCROSS,15,35,'khaki4'); +$band->ShowFrame(false); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_DIAGCROSS'); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/smallstaticbandsex2.php b/html/includes/jpgraph/src/Examples/smallstaticbandsex2.php new file mode 100644 index 0000000000..f2cb9a9641 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/smallstaticbandsex2.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->SetMargin(25,10,20,20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new PlotBand(HORIZONTAL,BAND_LDIAG,15,35,'khaki4'); +$band->ShowFrame(false); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_LDIAG'); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/smallstaticbandsex3.php b/html/includes/jpgraph/src/Examples/smallstaticbandsex3.php new file mode 100644 index 0000000000..f2ebdce572 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/smallstaticbandsex3.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->SetMargin(25,10,20,20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new PlotBand(HORIZONTAL,BAND_SOLID,15,35,'khaki4'); +$band->ShowFrame(false); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_SOLID'); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/smallstaticbandsex4.php b/html/includes/jpgraph/src/Examples/smallstaticbandsex4.php new file mode 100644 index 0000000000..36ddcf58a7 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/smallstaticbandsex4.php @@ -0,0 +1,42 @@ +SetScale("textlin"); +$graph->SetMargin(25,10,20,20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new PlotBand(HORIZONTAL,BAND_3DPLANE,15,35,'khaki4'); +$band->SetDensity(60); +$band->ShowFrame(true); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_3DPLANE, Density=60'); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/smallstaticbandsex5.php b/html/includes/jpgraph/src/Examples/smallstaticbandsex5.php new file mode 100644 index 0000000000..f42456f1a6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/smallstaticbandsex5.php @@ -0,0 +1,42 @@ +SetScale("textlin"); +$graph->SetMargin(25,10,20,20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new PlotBand(HORIZONTAL,BAND_HVCROSS,15,35,'khaki4'); +$band->ShowFrame(true); +$band->SetOrder(DEPTH_FRONT); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_HVCROSS, In front'); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/smallstaticbandsex6.php b/html/includes/jpgraph/src/Examples/smallstaticbandsex6.php new file mode 100644 index 0000000000..71c4beddcf --- /dev/null +++ b/html/includes/jpgraph/src/Examples/smallstaticbandsex6.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->SetMargin(25,10,20,20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new PlotBand(HORIZONTAL,BAND_VLINE,15,35,'khaki4'); +$band->ShowFrame(false); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_VLINE'); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/smallstaticbandsex7.php b/html/includes/jpgraph/src/Examples/smallstaticbandsex7.php new file mode 100644 index 0000000000..d7a5cc8094 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/smallstaticbandsex7.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->SetMargin(25,10,20,20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new PlotBand(HORIZONTAL,BAND_HLINE,15,35,'khaki4'); +$band->ShowFrame(false); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_HLINE'); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/smallstaticbandsex8.php b/html/includes/jpgraph/src/Examples/smallstaticbandsex8.php new file mode 100644 index 0000000000..0c98d1f5fd --- /dev/null +++ b/html/includes/jpgraph/src/Examples/smallstaticbandsex8.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->SetMargin(25,10,20,20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new PlotBand(HORIZONTAL,BAND_3DPLANE,15,35,'khaki4'); +$band->ShowFrame(false); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_3DPLANE'); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/smallstaticbandsex9.php b/html/includes/jpgraph/src/Examples/smallstaticbandsex9.php new file mode 100644 index 0000000000..f2ad14d016 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/smallstaticbandsex9.php @@ -0,0 +1,41 @@ +SetScale("textlin"); +$graph->SetMargin(25,10,20,20); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("lightblue"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +$graph->ygrid->Show(false); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$band = new PlotBand(HORIZONTAL,BAND_HVCROSS,15,35,'khaki4'); +$band->ShowFrame(false); +$graph->AddBand($band); + +// Set title +$graph->title->SetFont(FF_ARIAL,FS_BOLD,10); +$graph->title->SetColor('darkred'); +$graph->title->Set('BAND_HVCROSS'); + + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/splineex1.php b/html/includes/jpgraph/src/Examples/splineex1.php new file mode 100644 index 0000000000..4130b79e2c --- /dev/null +++ b/html/includes/jpgraph/src/Examples/splineex1.php @@ -0,0 +1,56 @@ +Get(50); + +// Create the graph +$g = new Graph(300,200); +$g->SetMargin(30,20,40,30); +$g->title->Set("Natural cubic splines"); +$g->title->SetFont(FF_ARIAL,FS_NORMAL,12); +$g->subtitle->Set('(Control points shown in red)'); +$g->subtitle->SetColor('darkred'); +$g->SetMarginColor('lightblue'); + +//$g->img->SetAntiAliasing(); + +// We need a linlin scale since we provide both +// x and y coordinates for the data points. +$g->SetScale('linlin'); + +// We want 1 decimal for the X-label +$g->xaxis->SetLabelFormat('%1.1f'); + +// We use a scatterplot to illustrate the original +// contro points. +$splot = new ScatterPlot($ydata,$xdata); + +// +$splot->mark->SetFillColor('red@0.3'); +$splot->mark->SetColor('red@0.5'); + +// And a line plot to stroke the smooth curve we got +// from the original control points +$lplot = new LinePlot($newy,$newx); +$lplot->SetColor('navy'); + +// Add the plots to the graph and stroke +$g->Add($lplot); +$g->Add($splot); +$g->Stroke(); + +?> + diff --git a/html/includes/jpgraph/src/Examples/staticbandbarex1.php b/html/includes/jpgraph/src/Examples/staticbandbarex1.php new file mode 100644 index 0000000000..6d3c7bea9b --- /dev/null +++ b/html/includes/jpgraph/src/Examples/staticbandbarex1.php @@ -0,0 +1,52 @@ +img->SetMargin(60,30,50,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL,FS_BOLD,15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true,false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10,10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$graph->AddBand(new PlotBand(HORIZONTAL,BAND_HLINE,0,10)); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); +$graph->xaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/staticbandbarex2.php b/html/includes/jpgraph/src/Examples/staticbandbarex2.php new file mode 100644 index 0000000000..7364ae14b1 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/staticbandbarex2.php @@ -0,0 +1,52 @@ +img->SetMargin(60,30,50,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL,FS_BOLD,15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true,false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10,10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add band +$graph->AddBand(new PlotBand(HORIZONTAL,BAND_RDIAG,0,"max","red",2)); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); +$graph->xaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/staticbandbarex3.php b/html/includes/jpgraph/src/Examples/staticbandbarex3.php new file mode 100644 index 0000000000..2832f353f6 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/staticbandbarex3.php @@ -0,0 +1,58 @@ +img->SetMargin(60,30,50,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL,FS_BOLD,15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true,false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10,10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add upper and lower band and use no frames +$uband=new PlotBand(HORIZONTAL,BAND_RDIAG,0,"max","green"); +$uband->ShowFrame(false); +$lband=new PlotBand(HORIZONTAL,BAND_LDIAG,"min",0,"red"); +$lband->ShowFrame(false); + +$graph->AddBand($uband); +$graph->AddBand($lband); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); +$graph->xaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/staticbandbarex4.php b/html/includes/jpgraph/src/Examples/staticbandbarex4.php new file mode 100644 index 0000000000..abf5fa5990 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/staticbandbarex4.php @@ -0,0 +1,60 @@ +img->SetMargin(60,30,50,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL,FS_BOLD,15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true,false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10,10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add upper and lower band and use no frames +$uband=new PlotBand(HORIZONTAL,BAND_RDIAG,0,"max","green"); +$uband->ShowFrame(false); +$uband->SetDensity(50); // 50% line density +$lband=new PlotBand(HORIZONTAL,BAND_LDIAG,"min",0,"red"); +$lband->ShowFrame(false); +$lband->SetDensity(20); // 20% line density + +$graph->AddBand($uband); +$graph->AddBand($lband); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); +$graph->xaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/staticbandbarex5.php b/html/includes/jpgraph/src/Examples/staticbandbarex5.php new file mode 100644 index 0000000000..85d2eef4ef --- /dev/null +++ b/html/includes/jpgraph/src/Examples/staticbandbarex5.php @@ -0,0 +1,63 @@ +img->SetMargin(60,30,50,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL,FS_BOLD,15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true,false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10,10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add upper and lower band and use no frames +$band[0]=new PlotBand(HORIZONTAL,BAND_RDIAG,10,20,"green"); +$band[0]->ShowFrame(false); +$band[0]->SetDensity(30); +$band[1]=new PlotBand(HORIZONTAL,BAND_LDIAG,-20,-10,"red"); +$band[1]->ShowFrame(false); +$band[1]->SetDensity(40); +$band[2]=new PlotBand(HORIZONTAL,BAND_LDIAG,"min",-20,"red"); +$band[2]->ShowFrame(false); +$band[2]->SetDensity(80); + +// We can also add band in an array +$graph->AddBand($band); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); +$graph->xaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/staticbandbarex6.php b/html/includes/jpgraph/src/Examples/staticbandbarex6.php new file mode 100644 index 0000000000..8c618b395a --- /dev/null +++ b/html/includes/jpgraph/src/Examples/staticbandbarex6.php @@ -0,0 +1,72 @@ +img->SetMargin(60,30,50,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL,FS_BOLD,15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("Shows some possible patterns for bands"); + +// Show both X and Y grid +$graph->xgrid->Show(true,false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10,10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetShadow(); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add upper and lower band and use no frames +$band[0]=new PlotBand(HORIZONTAL,BAND_RDIAG,10,20,"green"); +$band[0]->ShowFrame(false); +$band[1]=new PlotBand(HORIZONTAL,BAND_LDIAG,-20,-10,"red"); +$band[1]->ShowFrame(false); +$band[1]->SetDensity(20); +$band[2]=new PlotBand(HORIZONTAL,BAND_DIAGCROSS,"min",-20,"red"); +$band[2]->ShowFrame(false); +$band[2]->SetDensity(40); +$band[3]=new PlotBand(VERTICAL,BAND_HLINE,0,1,"darkgray"); +$band[3]->ShowFrame(false); +$band[3]->SetOrder(DEPTH_FRONT); +$band[4]=new PlotBand(VERTICAL,BAND_HVCROSS,5,"max","darkgray"); +$band[4]->ShowFrame(false); +$band[4]->SetOrder(DEPTH_FRONT); +$band[5]=new PlotBand(HORIZONTAL,BAND_SOLID,20,"max","lightgreen"); +$band[6]=new PlotBand(HORIZONTAL,BAND_3DPLANE,-10,0,"blue"); +$band[6]->SetDensity(70); +$graph->AddBand($band); + +$graph->AddLine(new PlotLine(HORIZONTAL,0,"black",2)); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); +$graph->xaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/staticbandbarex7.php b/html/includes/jpgraph/src/Examples/staticbandbarex7.php new file mode 100644 index 0000000000..87eb20b9e1 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/staticbandbarex7.php @@ -0,0 +1,61 @@ +img->SetMargin(60,30,50,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL,FS_BOLD,15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("Use of static line, 3D and solid band"); + +// Turn off Y-grid (it's on by default) +$graph->ygrid->Show(false); + +// Add 10% grace ("space") at top of Y-scale. +$graph->yscale->SetGrace(10); +$graph->yscale->SetAutoMin(-20); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetShadow("darkblue"); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(true); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add upper and lower band and use no frames +$band[0]=new PlotBand(HORIZONTAL,BAND_3DPLANE,"min",0,"blue"); +$band[0]->ShowFrame(false); +$band[0]->SetDensity(20); +$band[1]=new PlotBand(HORIZONTAL,BAND_SOLID,0,"max","steelblue"); +$band[1]->ShowFrame(false); +$graph->Add($band); + +$graph->Add(new PlotLine(HORIZONTAL,0,"black",2)); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); +$graph->xaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/staticlinebarex1.php b/html/includes/jpgraph/src/Examples/staticlinebarex1.php new file mode 100644 index 0000000000..67a9829bcb --- /dev/null +++ b/html/includes/jpgraph/src/Examples/staticlinebarex1.php @@ -0,0 +1,54 @@ +img->SetMargin(60,30,50,40); +$graph->SetScale("textlin"); +$graph->SetShadow(); + +$graph->title->SetFont(FF_ARIAL,FS_BOLD,15); +$graph->title->Set("Cash flow "); +$graph->subtitle->Set("(Department X)"); + +// Show both X and Y grid +$graph->xgrid->Show(true,false); + +// Add 10% grace ("space") at top and botton of Y-scale. +$graph->yscale->SetGrace(10,10); + +// Turn the tick mark out from the plot area +$graph->xaxis->SetTickSide(SIDE_DOWN); +$graph->yaxis->SetTickSide(SIDE_LEFT); + +// Create a bar pot +$bplot = new BarPlot($datay); +$bplot->SetFillColor("orange"); +$bplot->SetShadow(); + +// Show the actual value for each bar on top/bottom +$bplot->value->Show(); +$bplot->value->SetFormat("%02d kr"); + +// Position the X-axis at the bottom of the plotare +$graph->xaxis->SetPos("min"); + +// .. and add the plot to the graph +$graph->Add($bplot); + +// Add mark graph with static lines +$graph->AddLine(new PlotLine(HORIZONTAL,0,"black",2)); +$graph->AddLine(new PlotLine(VERTICAL,3,"black",2)); + +//$graph->title->Set("Test of bar gradient fill"); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); +$graph->xaxis->title->SetFont(FF_ARIAL,FS_BOLD,11); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/stockex1.php b/html/includes/jpgraph/src/Examples/stockex1.php new file mode 100644 index 0000000000..78dfcfb85d --- /dev/null +++ b/html/includes/jpgraph/src/Examples/stockex1.php @@ -0,0 +1,33 @@ +SetScale("textlin"); +$graph->SetMarginColor('lightblue'); +$graph->title->Set('Stockchart example'); + +// Create a new stock plot +$p1 = new StockPlot($datay); + +// Width of the bars (in pixels) +$p1->SetWidth(9); + +// Uncomment the following line to hide the horizontal end lines +//$p1->HideEndLines(); + +// Add the plot to the graph and send it back to the browser +$graph->Add($p1); +$graph->Stroke(); + +?> diff --git a/html/includes/jpgraph/src/Examples/stockex2.php b/html/includes/jpgraph/src/Examples/stockex2.php new file mode 100644 index 0000000000..ae17cfa80f --- /dev/null +++ b/html/includes/jpgraph/src/Examples/stockex2.php @@ -0,0 +1,39 @@ +SetScale("textlin"); +$graph->SetMarginColor('white'); +$graph->SetFrame(false); +$graph->ygrid->SetFill(true,'#EFEFEF@0.5','#BBCCFF@0.5'); +$graph->SetBox(); + +$graph->tabtitle->Set(' Week 34 '); +$graph->tabtitle->SetFont(FF_ARIAL,FS_NORMAL,12); + +// Get week days in curent locale +$days = $gDateLocale->GetShortDay(); +array_shift($days); // Start on monday +$graph->xaxis->SetTickLabels($days); + +// Create stock plot +$p1 = new StockPlot($datay); + +// Indent plot so first and last bar isn't on the edges +$p1->SetCenter(); + +// Add and stroke +$graph->Add($p1); +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/stship.jpg b/html/includes/jpgraph/src/Examples/stship.jpg new file mode 100644 index 0000000000..7f3bae62d7 Binary files /dev/null and b/html/includes/jpgraph/src/Examples/stship.jpg differ diff --git a/html/includes/jpgraph/src/Examples/tabtitleex1.php b/html/includes/jpgraph/src/Examples/tabtitleex1.php new file mode 100644 index 0000000000..babf212f78 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/tabtitleex1.php @@ -0,0 +1,51 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetFrame(false); +$graph->SetMargin(30,50,30,30); + +$graph->tabtitle->Set(' Year 2003 ' ); +$graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,13); + + +$graph->yaxis->HideZeroLabel(); +$graph->ygrid->SetFill(true,'#EFEFEF@0.5','#BBCCFF@0.5'); +$graph->xgrid->Show(); + +$graph->xaxis->SetTickLabels($gDateLocale->GetShortMonth()); + +// Create the first line +$p1 = new LinePlot($datay1); +$p1->SetColor("navy"); +$p1->SetLegend('Line 1'); +$graph->Add($p1); + +// Create the second line +$p2 = new LinePlot($datay2); +$p2->SetColor("red"); +$p2->SetLegend('Line 2'); +$graph->Add($p2); + +// Create the third line +$p3 = new LinePlot($datay3); +$p3->SetColor("orange"); +$p3->SetLegend('Line 3'); +$graph->Add($p3); + +$graph->legend->SetShadow('gray@0.4',5); +$graph->legend->SetPos(0.1,0.1,'right','top'); +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/testsuit.php b/html/includes/jpgraph/src/Examples/testsuit.php new file mode 100644 index 0000000000..60a54b1864 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/testsuit.php @@ -0,0 +1,107 @@ +iType = $aType; + if( $aDir == '' ) { + $aDir = getcwd(); + } + if( !chdir($aDir) ) { + die("PANIC: Can't access directory : $aDir"); + } + $this->iDir = $aDir; + } + + function GetFiles() { + $d = dir($this->iDir); + $a = array(); + while( $entry=$d->Read() ) { + if( strstr($entry,".php") && strstr($entry,"x") && !strstr($entry,"show") && !strstr($entry,"csim") ) { + $a[] = $entry; + } + } + $d->Close(); + if( count($a) == 0 ) { + die("PANIC: Apache/PHP does not have enough permission to read the scripts in directory: $this->iDir"); + } + sort($a); + return $a; + } + + function GetCSIMFiles() { + $d = dir($this->iDir); + $a = array(); + while( $entry=$d->Read() ) { + if( strstr($entry,".php") && strstr($entry,"csim") ) { + $a[] = $entry; + } + } + $d->Close(); + if( count($a) == 0 ) { + die("PANIC: Apache/PHP does not have enough permission to read the CSIM scripts in directory: $this->iDir"); + } + sort($a); + return $a; + } + + + function Run() { + switch( $this->iType ) { + case 1: + $files = $this->GetFiles(); + break; + case 2: + $files = $this->GetCSIMFiles(); + break; + default: + die('Panic: Unknown type of test'); + break; + } + $n = count($files); + echo "

Visual test suit for JpGraph

"; + echo "Testtype: " . ($this->iType==1 ? ' Standard images ':' Image map tests '); + echo "
Number of tests: $n

"; + echo "

    "; + + for( $i=0; $i<$n; ++$i ) { + if( $this->iType ==1 ) { + echo '

  1. Filename: '.basename($files[$i])."\n"; + } + else { + echo '
  2. '.$files[$i]."\n"; + } + } + echo "
"; + + echo "

Done.

"; + } +} + +$type=@$HTTP_GET_VARS['t']; +if( empty($type) ) { + $type=1; +} + +$driver = new TestDriver($type); +$driver->Run(); + +?> diff --git a/html/includes/jpgraph/src/Examples/text-example1.php b/html/includes/jpgraph/src/Examples/text-example1.php new file mode 100644 index 0000000000..a8ac965259 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/text-example1.php @@ -0,0 +1,18 @@ +Pos(0.05,0.5); +$t1->SetOrientation("h"); +$t1->SetFont(FF_FONT1,FS_NORMAL); +$t1->SetBox("white","black",'gray'); +$t1->SetColor("black"); +$graph->AddText($t1); + +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/text-example2.php b/html/includes/jpgraph/src/Examples/text-example2.php new file mode 100644 index 0000000000..4bfa9616f7 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/text-example2.php @@ -0,0 +1,18 @@ +Pos(0.05,100); +$t1->SetFont(FF_FONT1,FS_NORMAL); +$t1->SetBox("white","black",true); +$t1->ParagraphAlign("right"); +$t1->SetColor("black"); +$graph->AddText($t1); + +$graph->Stroke(); + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/Examples/textalignex1.php b/html/includes/jpgraph/src/Examples/textalignex1.php new file mode 100644 index 0000000000..84d9b3c537 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/textalignex1.php @@ -0,0 +1,77 @@ +img; +$aImg->SetFont(FF_ARIAL,FS_NORMAL,16); +$tw=$aImg->GetBBoxWidth($txt,$angle); +$th=$aImg->GetBBoxHeight($txt,$angle); + +$aImg->SetFont(FF_ARIAL,FS_NORMAL,11); +$ch=$aImg->GetBBoxHeight($caption); + +// Calculate needed height for the image +$h = 3*$th+2*$ym + $ch; +$g = new CanvasGraph($w,$h); +$aImg = $g->img; + +$prof = array('left','top', + 'center','top', + 'right','top', + 'left','center', + 'center','center', + 'right','center', + 'left','bottom', + 'center','bottom', + 'right','bottom'); +$n = count($prof)/2; + +for( $i=0,$r=0,$c=0; $i < $n; ++$i ) { + $x = $c*($tw+$xm)+$xm/2; + $y = $r*($th+$ym)+$ym/2-10; + $aImg->SetColor('blue'); + $aImg->SetTextAlign($prof[$i*2],$prof[$i*2+1]); + $aImg->SetFont(FF_ARIAL,FS_NORMAL,16); + $aImg->StrokeText($x,$y,$txt,$angle,"left",true); + + $aImg->SetColor('black'); + $aImg->SetFont(FF_FONT1,FS_BOLD); + $aImg->SetTextAlign('center','top'); + $align = sprintf('("%s","%s")',$prof[$i*2],$prof[$i*2+1]); + $aImg->StrokeText($c*($tw/2+$xm)+$xm/2+$tw/2,$r*($th/2+$ym)+$th+$ym/2-4,$align); + $c++; + if( $c==3 ) { + $c=0;$r++; + } +} + +$aImg->SetTextAlign('center','bottom'); +$aImg->SetFont(FF_ARIAL,FS_ITALIC,11); +$aImg->StrokeText($w/2,$h-10,$caption,0,'left'); + +$aImg->SetColor('navy'); +$aImg->Rectangle(0,0,$w-1,$h-1); + +$g->Stroke(); + +?> + diff --git a/html/includes/jpgraph/src/Examples/tiger_bkg.gif b/html/includes/jpgraph/src/Examples/tiger_bkg.gif new file mode 100644 index 0000000000..3faaa174dc Binary files /dev/null and b/html/includes/jpgraph/src/Examples/tiger_bkg.gif differ diff --git a/html/includes/jpgraph/src/Examples/tiger_bkg.jpg b/html/includes/jpgraph/src/Examples/tiger_bkg.jpg new file mode 100644 index 0000000000..43d45f30e8 Binary files /dev/null and b/html/includes/jpgraph/src/Examples/tiger_bkg.jpg differ diff --git a/html/includes/jpgraph/src/Examples/tiger_bkg.png b/html/includes/jpgraph/src/Examples/tiger_bkg.png new file mode 100644 index 0000000000..78d8e25b0c Binary files /dev/null and b/html/includes/jpgraph/src/Examples/tiger_bkg.png differ diff --git a/html/includes/jpgraph/src/Examples/timestampex01.php b/html/includes/jpgraph/src/Examples/timestampex01.php new file mode 100644 index 0000000000..62142a98ab --- /dev/null +++ b/html/includes/jpgraph/src/Examples/timestampex01.php @@ -0,0 +1,59 @@ +SetMargin(40,20,30,50); + +// Now specify the X-scale explicit but let the Y-scale be auto-scaled +$graph->SetScale("intlin",0,0,$adjstart,$adjend); +$graph->title->Set("Example on TimeStamp Callback"); + +// Setup the callback and adjust the angle of the labels +$graph->xaxis->SetLabelFormatCallback('TimeCallback'); +$graph->xaxis->SetLabelAngle(90); + +// Set the labels every 5min (i.e. 300seconds) and minor ticks every minute +$graph->xaxis->scale->ticks->Set(300,60); + +$line = new LinePlot($data,$xdata); +$line->SetColor('lightblue'); +$graph->Add($line); + +$graph->Stroke(); +?> diff --git a/html/includes/jpgraph/src/Examples/titlecsimex01.php b/html/includes/jpgraph/src/Examples/titlecsimex01.php new file mode 100644 index 0000000000..e384a4aaeb --- /dev/null +++ b/html/includes/jpgraph/src/Examples/titlecsimex01.php @@ -0,0 +1,62 @@ +SetScale("textlin"); +$graph->SetMargin(50,80,20,40); +$graph->yaxis->SetTitleMargin(30); +$graph->yaxis->scale->SetGrace(30); +$graph->SetShadow(); + + +// Create a bar pot +$bplot = new BarPlot($datay); + +// Create targets for the bars image maps. One for each column +$targ=array("bar_clsmex1.php#1","bar_clsmex1.php#2","bar_clsmex1.php#3","bar_clsmex1.php#4","bar_clsmex1.php#5","bar_clsmex1.php#6"); +$alts=array("val=%d","val=%d","val=%d","val=%d","val=%d","val=%d"); +$bplot->SetCSIMTargets($targ,$alts); +$bplot->SetFillColor("orange"); +$bplot->SetLegend('Year 2001 %%','#kalle ','%s'); + +// Display the values on top of each bar +$bplot->SetShadow(); +$bplot->value->SetFormat(" $ %2.1f",70); +$bplot->value->SetFont(FF_ARIAL,FS_NORMAL,9); +$bplot->value->SetColor("blue"); +$bplot->value->Show(); + +$graph->Add($bplot); + +// Create a big "button" that has an image map action +$txt1 = new Text("A simple text with\ntwo rows"); +$txt1->SetFont(FF_ARIAL); +$txt1->SetBox('lightblue','black','white@1',5); +$txt1->SetParagraphAlign('center'); +$txt1->SetPos(40,50); +$txt1->SetCSIMTarget('#88','Text element'); +$graph->Add($txt1); + +// Add image map to the graph title as well (you can do this to the +// sub- and subsub-title as well) +$graph->title->Set("Image maps barex1"); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->title->SetCSIMTarget('#45','Title for Bar'); +$graph->xaxis->title->Set("X-title"); +$graph->yaxis->title->Set("Y-title"); + +// Setup the axis title image map and font style +$graph->yaxis->title->SetFont(FF_FONT2,FS_BOLD); +$graph->yaxis->title->SetCSIMTarget('#55','Y-axis title'); +$graph->xaxis->title->SetFont(FF_FONT2,FS_BOLD); +$graph->xaxis->title->SetCSIMTarget('#55','X-axis title'); + +// Send back the HTML page which will call this script again +// to retrieve the image. +$graph->StrokeCSIM(); + +?> diff --git a/html/includes/jpgraph/src/Examples/topxaxisex1.php b/html/includes/jpgraph/src/Examples/topxaxisex1.php new file mode 100644 index 0000000000..956fcbf7a0 --- /dev/null +++ b/html/includes/jpgraph/src/Examples/topxaxisex1.php @@ -0,0 +1,49 @@ +img->SetMargin(40,40,40,20); + +$graph->SetScale("linlin"); +$graph->SetShadow(); +$graph->title->Set("Top X-axis"); + +// Start at 0 +$graph->yscale->SetAutoMin(0); + +// Add some air around the Y-scale +$graph->yscale->SetGrace(100); + +// Use built in font +$graph->title->SetFont(FF_FONT1,FS_BOLD); + +// Adjust the X-axis +$graph->xaxis->SetPos("max"); +$graph->xaxis->SetLabelSide(SIDE_UP); +$graph->xaxis->SetTickSide(SIDE_DOWN); + +// Create the line plot +$p1 = new LinePlot($datay); +$p1->SetColor("blue"); + +// Specify marks for the line plots +$p1->mark->SetType(MARK_FILLEDCIRCLE); +$p1->mark->SetFillColor("red"); +$p1->mark->SetWidth(4); + +// Show values +$p1->value->Show(); + +// Add lineplot to graph +$graph->Add($p1); + +// Output line +$graph->Stroke(); + +?> + + diff --git a/html/includes/jpgraph/src/Examples/worldmap1.jpg b/html/includes/jpgraph/src/Examples/worldmap1.jpg new file mode 100644 index 0000000000..caa7c14045 Binary files /dev/null and b/html/includes/jpgraph/src/Examples/worldmap1.jpg differ diff --git a/html/includes/jpgraph/src/flags.dat b/html/includes/jpgraph/src/flags.dat new file mode 100644 index 0000000000..1cd2e72345 Binary files /dev/null and b/html/includes/jpgraph/src/flags.dat differ diff --git a/html/includes/jpgraph/src/flags_thumb100x100.dat b/html/includes/jpgraph/src/flags_thumb100x100.dat new file mode 100644 index 0000000000..545e7ade58 Binary files /dev/null and b/html/includes/jpgraph/src/flags_thumb100x100.dat differ diff --git a/html/includes/jpgraph/src/flags_thumb35x35.dat b/html/includes/jpgraph/src/flags_thumb35x35.dat new file mode 100644 index 0000000000..7335011ec9 Binary files /dev/null and b/html/includes/jpgraph/src/flags_thumb35x35.dat differ diff --git a/html/includes/jpgraph/src/flags_thumb60x60.dat b/html/includes/jpgraph/src/flags_thumb60x60.dat new file mode 100644 index 0000000000..6107d084eb Binary files /dev/null and b/html/includes/jpgraph/src/flags_thumb60x60.dat differ diff --git a/html/includes/jpgraph/src/gd_image.inc.php b/html/includes/jpgraph/src/gd_image.inc.php new file mode 100644 index 0000000000..00ee97db04 --- /dev/null +++ b/html/includes/jpgraph/src/gd_image.inc.php @@ -0,0 +1,2161 @@ +img = &$aImg; + + // Conversion array between color names and RGB + $this->rgb_table = array( + "aqua"=> array(0,255,255), + "lime"=> array(0,255,0), + "teal"=> array(0,128,128), + "whitesmoke"=>array(245,245,245), + "gainsboro"=>array(220,220,220), + "oldlace"=>array(253,245,230), + "linen"=>array(250,240,230), + "antiquewhite"=>array(250,235,215), + "papayawhip"=>array(255,239,213), + "blanchedalmond"=>array(255,235,205), + "bisque"=>array(255,228,196), + "peachpuff"=>array(255,218,185), + "navajowhite"=>array(255,222,173), + "moccasin"=>array(255,228,181), + "cornsilk"=>array(255,248,220), + "ivory"=>array(255,255,240), + "lemonchiffon"=>array(255,250,205), + "seashell"=>array(255,245,238), + "mintcream"=>array(245,255,250), + "azure"=>array(240,255,255), + "aliceblue"=>array(240,248,255), + "lavender"=>array(230,230,250), + "lavenderblush"=>array(255,240,245), + "mistyrose"=>array(255,228,225), + "white"=>array(255,255,255), + "black"=>array(0,0,0), + "darkslategray"=>array(47,79,79), + "dimgray"=>array(105,105,105), + "slategray"=>array(112,128,144), + "lightslategray"=>array(119,136,153), + "gray"=>array(190,190,190), + "lightgray"=>array(211,211,211), + "midnightblue"=>array(25,25,112), + "navy"=>array(0,0,128), + "cornflowerblue"=>array(100,149,237), + "darkslateblue"=>array(72,61,139), + "slateblue"=>array(106,90,205), + "mediumslateblue"=>array(123,104,238), + "lightslateblue"=>array(132,112,255), + "mediumblue"=>array(0,0,205), + "royalblue"=>array(65,105,225), + "blue"=>array(0,0,255), + "dodgerblue"=>array(30,144,255), + "deepskyblue"=>array(0,191,255), + "skyblue"=>array(135,206,235), + "lightskyblue"=>array(135,206,250), + "steelblue"=>array(70,130,180), + "lightred"=>array(211,167,168), + "lightsteelblue"=>array(176,196,222), + "lightblue"=>array(173,216,230), + "powderblue"=>array(176,224,230), + "paleturquoise"=>array(175,238,238), + "darkturquoise"=>array(0,206,209), + "mediumturquoise"=>array(72,209,204), + "turquoise"=>array(64,224,208), + "cyan"=>array(0,255,255), + "lightcyan"=>array(224,255,255), + "cadetblue"=>array(95,158,160), + "mediumaquamarine"=>array(102,205,170), + "aquamarine"=>array(127,255,212), + "darkgreen"=>array(0,100,0), + "darkolivegreen"=>array(85,107,47), + "darkseagreen"=>array(143,188,143), + "seagreen"=>array(46,139,87), + "mediumseagreen"=>array(60,179,113), + "lightseagreen"=>array(32,178,170), + "palegreen"=>array(152,251,152), + "springgreen"=>array(0,255,127), + "lawngreen"=>array(124,252,0), + "green"=>array(0,255,0), + "chartreuse"=>array(127,255,0), + "mediumspringgreen"=>array(0,250,154), + "greenyellow"=>array(173,255,47), + "limegreen"=>array(50,205,50), + "yellowgreen"=>array(154,205,50), + "forestgreen"=>array(34,139,34), + "olivedrab"=>array(107,142,35), + "darkkhaki"=>array(189,183,107), + "khaki"=>array(240,230,140), + "palegoldenrod"=>array(238,232,170), + "lightgoldenrodyellow"=>array(250,250,210), + "lightyellow"=>array(255,255,200), + "yellow"=>array(255,255,0), + "gold"=>array(255,215,0), + "lightgoldenrod"=>array(238,221,130), + "goldenrod"=>array(218,165,32), + "darkgoldenrod"=>array(184,134,11), + "rosybrown"=>array(188,143,143), + "indianred"=>array(205,92,92), + "saddlebrown"=>array(139,69,19), + "sienna"=>array(160,82,45), + "peru"=>array(205,133,63), + "burlywood"=>array(222,184,135), + "beige"=>array(245,245,220), + "wheat"=>array(245,222,179), + "sandybrown"=>array(244,164,96), + "tan"=>array(210,180,140), + "chocolate"=>array(210,105,30), + "firebrick"=>array(178,34,34), + "brown"=>array(165,42,42), + "darksalmon"=>array(233,150,122), + "salmon"=>array(250,128,114), + "lightsalmon"=>array(255,160,122), + "orange"=>array(255,165,0), + "darkorange"=>array(255,140,0), + "coral"=>array(255,127,80), + "lightcoral"=>array(240,128,128), + "tomato"=>array(255,99,71), + "orangered"=>array(255,69,0), + "red"=>array(255,0,0), + "hotpink"=>array(255,105,180), + "deeppink"=>array(255,20,147), + "pink"=>array(255,192,203), + "lightpink"=>array(255,182,193), + "palevioletred"=>array(219,112,147), + "maroon"=>array(176,48,96), + "mediumvioletred"=>array(199,21,133), + "violetred"=>array(208,32,144), + "magenta"=>array(255,0,255), + "violet"=>array(238,130,238), + "plum"=>array(221,160,221), + "orchid"=>array(218,112,214), + "mediumorchid"=>array(186,85,211), + "darkorchid"=>array(153,50,204), + "darkviolet"=>array(148,0,211), + "blueviolet"=>array(138,43,226), + "purple"=>array(160,32,240), + "mediumpurple"=>array(147,112,219), + "thistle"=>array(216,191,216), + "snow1"=>array(255,250,250), + "snow2"=>array(238,233,233), + "snow3"=>array(205,201,201), + "snow4"=>array(139,137,137), + "seashell1"=>array(255,245,238), + "seashell2"=>array(238,229,222), + "seashell3"=>array(205,197,191), + "seashell4"=>array(139,134,130), + "AntiqueWhite1"=>array(255,239,219), + "AntiqueWhite2"=>array(238,223,204), + "AntiqueWhite3"=>array(205,192,176), + "AntiqueWhite4"=>array(139,131,120), + "bisque1"=>array(255,228,196), + "bisque2"=>array(238,213,183), + "bisque3"=>array(205,183,158), + "bisque4"=>array(139,125,107), + "peachPuff1"=>array(255,218,185), + "peachpuff2"=>array(238,203,173), + "peachpuff3"=>array(205,175,149), + "peachpuff4"=>array(139,119,101), + "navajowhite1"=>array(255,222,173), + "navajowhite2"=>array(238,207,161), + "navajowhite3"=>array(205,179,139), + "navajowhite4"=>array(139,121,94), + "lemonchiffon1"=>array(255,250,205), + "lemonchiffon2"=>array(238,233,191), + "lemonchiffon3"=>array(205,201,165), + "lemonchiffon4"=>array(139,137,112), + "ivory1"=>array(255,255,240), + "ivory2"=>array(238,238,224), + "ivory3"=>array(205,205,193), + "ivory4"=>array(139,139,131), + "honeydew"=>array(193,205,193), + "lavenderblush1"=>array(255,240,245), + "lavenderblush2"=>array(238,224,229), + "lavenderblush3"=>array(205,193,197), + "lavenderblush4"=>array(139,131,134), + "mistyrose1"=>array(255,228,225), + "mistyrose2"=>array(238,213,210), + "mistyrose3"=>array(205,183,181), + "mistyrose4"=>array(139,125,123), + "azure1"=>array(240,255,255), + "azure2"=>array(224,238,238), + "azure3"=>array(193,205,205), + "azure4"=>array(131,139,139), + "slateblue1"=>array(131,111,255), + "slateblue2"=>array(122,103,238), + "slateblue3"=>array(105,89,205), + "slateblue4"=>array(71,60,139), + "royalblue1"=>array(72,118,255), + "royalblue2"=>array(67,110,238), + "royalblue3"=>array(58,95,205), + "royalblue4"=>array(39,64,139), + "dodgerblue1"=>array(30,144,255), + "dodgerblue2"=>array(28,134,238), + "dodgerblue3"=>array(24,116,205), + "dodgerblue4"=>array(16,78,139), + "steelblue1"=>array(99,184,255), + "steelblue2"=>array(92,172,238), + "steelblue3"=>array(79,148,205), + "steelblue4"=>array(54,100,139), + "deepskyblue1"=>array(0,191,255), + "deepskyblue2"=>array(0,178,238), + "deepskyblue3"=>array(0,154,205), + "deepskyblue4"=>array(0,104,139), + "skyblue1"=>array(135,206,255), + "skyblue2"=>array(126,192,238), + "skyblue3"=>array(108,166,205), + "skyblue4"=>array(74,112,139), + "lightskyblue1"=>array(176,226,255), + "lightskyblue2"=>array(164,211,238), + "lightskyblue3"=>array(141,182,205), + "lightskyblue4"=>array(96,123,139), + "slategray1"=>array(198,226,255), + "slategray2"=>array(185,211,238), + "slategray3"=>array(159,182,205), + "slategray4"=>array(108,123,139), + "lightsteelblue1"=>array(202,225,255), + "lightsteelblue2"=>array(188,210,238), + "lightsteelblue3"=>array(162,181,205), + "lightsteelblue4"=>array(110,123,139), + "lightblue1"=>array(191,239,255), + "lightblue2"=>array(178,223,238), + "lightblue3"=>array(154,192,205), + "lightblue4"=>array(104,131,139), + "lightcyan1"=>array(224,255,255), + "lightcyan2"=>array(209,238,238), + "lightcyan3"=>array(180,205,205), + "lightcyan4"=>array(122,139,139), + "paleturquoise1"=>array(187,255,255), + "paleturquoise2"=>array(174,238,238), + "paleturquoise3"=>array(150,205,205), + "paleturquoise4"=>array(102,139,139), + "cadetblue1"=>array(152,245,255), + "cadetblue2"=>array(142,229,238), + "cadetblue3"=>array(122,197,205), + "cadetblue4"=>array(83,134,139), + "turquoise1"=>array(0,245,255), + "turquoise2"=>array(0,229,238), + "turquoise3"=>array(0,197,205), + "turquoise4"=>array(0,134,139), + "cyan1"=>array(0,255,255), + "cyan2"=>array(0,238,238), + "cyan3"=>array(0,205,205), + "cyan4"=>array(0,139,139), + "darkslategray1"=>array(151,255,255), + "darkslategray2"=>array(141,238,238), + "darkslategray3"=>array(121,205,205), + "darkslategray4"=>array(82,139,139), + "aquamarine1"=>array(127,255,212), + "aquamarine2"=>array(118,238,198), + "aquamarine3"=>array(102,205,170), + "aquamarine4"=>array(69,139,116), + "darkseagreen1"=>array(193,255,193), + "darkseagreen2"=>array(180,238,180), + "darkseagreen3"=>array(155,205,155), + "darkseagreen4"=>array(105,139,105), + "seagreen1"=>array(84,255,159), + "seagreen2"=>array(78,238,148), + "seagreen3"=>array(67,205,128), + "seagreen4"=>array(46,139,87), + "palegreen1"=>array(154,255,154), + "palegreen2"=>array(144,238,144), + "palegreen3"=>array(124,205,124), + "palegreen4"=>array(84,139,84), + "springgreen1"=>array(0,255,127), + "springgreen2"=>array(0,238,118), + "springgreen3"=>array(0,205,102), + "springgreen4"=>array(0,139,69), + "chartreuse1"=>array(127,255,0), + "chartreuse2"=>array(118,238,0), + "chartreuse3"=>array(102,205,0), + "chartreuse4"=>array(69,139,0), + "olivedrab1"=>array(192,255,62), + "olivedrab2"=>array(179,238,58), + "olivedrab3"=>array(154,205,50), + "olivedrab4"=>array(105,139,34), + "darkolivegreen1"=>array(202,255,112), + "darkolivegreen2"=>array(188,238,104), + "darkolivegreen3"=>array(162,205,90), + "darkolivegreen4"=>array(110,139,61), + "khaki1"=>array(255,246,143), + "khaki2"=>array(238,230,133), + "khaki3"=>array(205,198,115), + "khaki4"=>array(139,134,78), + "lightgoldenrod1"=>array(255,236,139), + "lightgoldenrod2"=>array(238,220,130), + "lightgoldenrod3"=>array(205,190,112), + "lightgoldenrod4"=>array(139,129,76), + "yellow1"=>array(255,255,0), + "yellow2"=>array(238,238,0), + "yellow3"=>array(205,205,0), + "yellow4"=>array(139,139,0), + "gold1"=>array(255,215,0), + "gold2"=>array(238,201,0), + "gold3"=>array(205,173,0), + "gold4"=>array(139,117,0), + "goldenrod1"=>array(255,193,37), + "goldenrod2"=>array(238,180,34), + "goldenrod3"=>array(205,155,29), + "goldenrod4"=>array(139,105,20), + "darkgoldenrod1"=>array(255,185,15), + "darkgoldenrod2"=>array(238,173,14), + "darkgoldenrod3"=>array(205,149,12), + "darkgoldenrod4"=>array(139,101,8), + "rosybrown1"=>array(255,193,193), + "rosybrown2"=>array(238,180,180), + "rosybrown3"=>array(205,155,155), + "rosybrown4"=>array(139,105,105), + "indianred1"=>array(255,106,106), + "indianred2"=>array(238,99,99), + "indianred3"=>array(205,85,85), + "indianred4"=>array(139,58,58), + "sienna1"=>array(255,130,71), + "sienna2"=>array(238,121,66), + "sienna3"=>array(205,104,57), + "sienna4"=>array(139,71,38), + "burlywood1"=>array(255,211,155), + "burlywood2"=>array(238,197,145), + "burlywood3"=>array(205,170,125), + "burlywood4"=>array(139,115,85), + "wheat1"=>array(255,231,186), + "wheat2"=>array(238,216,174), + "wheat3"=>array(205,186,150), + "wheat4"=>array(139,126,102), + "tan1"=>array(255,165,79), + "tan2"=>array(238,154,73), + "tan3"=>array(205,133,63), + "tan4"=>array(139,90,43), + "chocolate1"=>array(255,127,36), + "chocolate2"=>array(238,118,33), + "chocolate3"=>array(205,102,29), + "chocolate4"=>array(139,69,19), + "firebrick1"=>array(255,48,48), + "firebrick2"=>array(238,44,44), + "firebrick3"=>array(205,38,38), + "firebrick4"=>array(139,26,26), + "brown1"=>array(255,64,64), + "brown2"=>array(238,59,59), + "brown3"=>array(205,51,51), + "brown4"=>array(139,35,35), + "salmon1"=>array(255,140,105), + "salmon2"=>array(238,130,98), + "salmon3"=>array(205,112,84), + "salmon4"=>array(139,76,57), + "lightsalmon1"=>array(255,160,122), + "lightsalmon2"=>array(238,149,114), + "lightsalmon3"=>array(205,129,98), + "lightsalmon4"=>array(139,87,66), + "orange1"=>array(255,165,0), + "orange2"=>array(238,154,0), + "orange3"=>array(205,133,0), + "orange4"=>array(139,90,0), + "darkorange1"=>array(255,127,0), + "darkorange2"=>array(238,118,0), + "darkorange3"=>array(205,102,0), + "darkorange4"=>array(139,69,0), + "coral1"=>array(255,114,86), + "coral2"=>array(238,106,80), + "coral3"=>array(205,91,69), + "coral4"=>array(139,62,47), + "tomato1"=>array(255,99,71), + "tomato2"=>array(238,92,66), + "tomato3"=>array(205,79,57), + "tomato4"=>array(139,54,38), + "orangered1"=>array(255,69,0), + "orangered2"=>array(238,64,0), + "orangered3"=>array(205,55,0), + "orangered4"=>array(139,37,0), + "deeppink1"=>array(255,20,147), + "deeppink2"=>array(238,18,137), + "deeppink3"=>array(205,16,118), + "deeppink4"=>array(139,10,80), + "hotpink1"=>array(255,110,180), + "hotpink2"=>array(238,106,167), + "hotpink3"=>array(205,96,144), + "hotpink4"=>array(139,58,98), + "pink1"=>array(255,181,197), + "pink2"=>array(238,169,184), + "pink3"=>array(205,145,158), + "pink4"=>array(139,99,108), + "lightpink1"=>array(255,174,185), + "lightpink2"=>array(238,162,173), + "lightpink3"=>array(205,140,149), + "lightpink4"=>array(139,95,101), + "palevioletred1"=>array(255,130,171), + "palevioletred2"=>array(238,121,159), + "palevioletred3"=>array(205,104,137), + "palevioletred4"=>array(139,71,93), + "maroon1"=>array(255,52,179), + "maroon2"=>array(238,48,167), + "maroon3"=>array(205,41,144), + "maroon4"=>array(139,28,98), + "violetred1"=>array(255,62,150), + "violetred2"=>array(238,58,140), + "violetred3"=>array(205,50,120), + "violetred4"=>array(139,34,82), + "magenta1"=>array(255,0,255), + "magenta2"=>array(238,0,238), + "magenta3"=>array(205,0,205), + "magenta4"=>array(139,0,139), + "mediumred"=>array(140,34,34), + "orchid1"=>array(255,131,250), + "orchid2"=>array(238,122,233), + "orchid3"=>array(205,105,201), + "orchid4"=>array(139,71,137), + "plum1"=>array(255,187,255), + "plum2"=>array(238,174,238), + "plum3"=>array(205,150,205), + "plum4"=>array(139,102,139), + "mediumorchid1"=>array(224,102,255), + "mediumorchid2"=>array(209,95,238), + "mediumorchid3"=>array(180,82,205), + "mediumorchid4"=>array(122,55,139), + "darkorchid1"=>array(191,62,255), + "darkorchid2"=>array(178,58,238), + "darkorchid3"=>array(154,50,205), + "darkorchid4"=>array(104,34,139), + "purple1"=>array(155,48,255), + "purple2"=>array(145,44,238), + "purple3"=>array(125,38,205), + "purple4"=>array(85,26,139), + "mediumpurple1"=>array(171,130,255), + "mediumpurple2"=>array(159,121,238), + "mediumpurple3"=>array(137,104,205), + "mediumpurple4"=>array(93,71,139), + "thistle1"=>array(255,225,255), + "thistle2"=>array(238,210,238), + "thistle3"=>array(205,181,205), + "thistle4"=>array(139,123,139), + "gray1"=>array(10,10,10), + "gray2"=>array(40,40,30), + "gray3"=>array(70,70,70), + "gray4"=>array(100,100,100), + "gray5"=>array(130,130,130), + "gray6"=>array(160,160,160), + "gray7"=>array(190,190,190), + "gray8"=>array(210,210,210), + "gray9"=>array(240,240,240), + "darkgray"=>array(100,100,100), + "darkblue"=>array(0,0,139), + "darkcyan"=>array(0,139,139), + "darkmagenta"=>array(139,0,139), + "darkred"=>array(139,0,0), + "silver"=>array(192, 192, 192), + "eggplant"=>array(144,176,168), + "lightgreen"=>array(144,238,144)); + } +//---------------- +// PUBLIC METHODS + // Colors can be specified as either + // 1. #xxxxxx HTML style + // 2. "colorname" as a named color + // 3. array(r,g,b) RGB triple + // This function translates this to a native RGB format and returns an + // RGB triple. + function Color($aColor) { + if (is_string($aColor)) { + // Strip of any alpha factor + $pos = strpos($aColor,'@'); + if( $pos === false ) { + $alpha = 0; + } + else { + $pos2 = strpos($aColor,':'); + if( $pos2===false ) + $pos2 = $pos-1; // Sentinel + if( $pos > $pos2 ) { + $alpha = str_replace(',','.',substr($aColor,$pos+1)); + $aColor = substr($aColor,0,$pos); + } + else { + $alpha = substr($aColor,$pos+1,$pos2-$pos-1); + $aColor = substr($aColor,0,$pos).substr($aColor,$pos2); + } + } + + // Extract potential adjustment figure at end of color + // specification + $pos = strpos($aColor,":"); + if( $pos === false ) { + $adj = 1.0; + } + else { + $adj = 0.0 + str_replace(',','.',substr($aColor,$pos+1)); + $aColor = substr($aColor,0,$pos); + } + if( $adj < 0 ) + JpGraphError::RaiseL(25077);//('Adjustment factor for color must be > 0'); + + if (substr($aColor, 0, 1) == "#") { + $r = hexdec(substr($aColor, 1, 2)); + $g = hexdec(substr($aColor, 3, 2)); + $b = hexdec(substr($aColor, 5, 2)); + } else { + if(!isset($this->rgb_table[$aColor]) ) + JpGraphError::RaiseL(25078,$aColor);//(" Unknown color: $aColor"); + $tmp=$this->rgb_table[$aColor]; + $r = $tmp[0]; + $g = $tmp[1]; + $b = $tmp[2]; + } + // Scale adj so that an adj=2 always + // makes the color 100% white (i.e. 255,255,255. + // and adj=1 neutral and adj=0 black. + if( $adj > 1 ) { + $m = ($adj-1.0)*(255-min(255,min($r,min($g,$b)))); + return array(min(255,$r+$m), min(255,$g+$m), min(255,$b+$m),$alpha); + } + elseif( $adj < 1 ) { + $m = ($adj-1.0)*max(255,max($r,max($g,$b))); + return array(max(0,$r+$m), max(0,$g+$m), max(0,$b+$m),$alpha); + } + else { + return array($r,$g,$b,$alpha); + } + + } elseif( is_array($aColor) ) { + if( count($aColor)==3 ) { + $aColor[3]=0; + return $aColor; + } + else + return $aColor; + } + else + JpGraphError::RaiseL(25079,$aColor,count($aColor));//(" Unknown color specification: $aColor , size=".count($aColor)); + } + + // Compare two colors + // return true if equal + function Equal($aCol1,$aCol2) { + $c1 = $this->Color($aCol1); + $c2 = $this->Color($aCol2); + if( $c1[0]==$c2[0] && $c1[1]==$c2[1] && $c1[2]==$c2[2] ) + return true; + else + return false; + } + + // Allocate a new color in the current image + // Return new color index, -1 if no more colors could be allocated + function Allocate($aColor,$aAlpha=0.0) { + list ($r, $g, $b, $a) = $this->color($aColor); + // If alpha is specified in the color string then this + // takes precedence over the second argument + if( $a > 0 ) + $aAlpha = $a; + if( $aAlpha < 0 || $aAlpha > 1 ) { + JpGraphError::RaiseL(25080);//('Alpha parameter for color must be between 0.0 and 1.0'); + } + return imagecolorresolvealpha($this->img, $r, $g, $b, round($aAlpha * 127)); + } +} // Class + + +//=================================================== +// CLASS Image +// Description: Wrapper class with some goodies to form the +// Interface to low level image drawing routines. +//=================================================== +class Image { + var $img_format; + var $expired=true; + var $img=null; + var $left_margin=30,$right_margin=20,$top_margin=20,$bottom_margin=30; + var $plotwidth=0,$plotheight=0; + var $rgb=null; + var $current_color,$current_color_name; + var $lastx=0, $lasty=0; + var $width=0, $height=0; + var $line_weight=1; + var $line_style=1; // Default line style is solid + var $obs_list=array(); + var $font_size=12,$font_family=FF_FONT1, $font_style=FS_NORMAL; + var $font_file=''; + var $text_halign="left",$text_valign="bottom"; + var $ttf=null; + var $use_anti_aliasing=false; + var $quality=null; + var $colorstack=array(),$colorstackidx=0; + var $canvascolor = 'white' ; + var $langconv = null ; + + //--------------- + // CONSTRUCTOR + function Image($aWidth,$aHeight,$aFormat=DEFAULT_GFORMAT,$aSetAutoMargin=true) { + $this->CreateImgCanvas($aWidth,$aHeight); + if( $aSetAutoMargin ) + $this->SetAutoMargin(); + + if( !$this->SetImgFormat($aFormat) ) { + JpGraphError::RaiseL(25081,$aFormat);//("JpGraph: Selected graphic format is either not supported or unknown [$aFormat]"); + } + $this->ttf = new TTF(); + $this->langconv = new LanguageConv(); + } + + // Should we use anti-aliasing. Note: This really slows down graphics! + function SetAntiAliasing() { + $this->use_anti_aliasing=true; + } + + function CreateRawCanvas($aWidth=0,$aHeight=0) { + if( $aWidth <= 1 || $aHeight <= 1 ) { + JpGraphError::RaiseL(25082,$aWidth,$aHeight);//("Illegal sizes specified for width or height when creating an image, (width=$aWidth, height=$aHeight)"); + } + $this->img = @imagecreatetruecolor($aWidth, $aHeight); + if( $this->img < 1 ) { + JpGraphError::RaiseL(25126); + //die("Can't create truecolor image. Check that you really have GD2 library installed."); + } + $this->SetAlphaBlending(); + if( $this->rgb != null ) + $this->rgb->img = $this->img ; + else + $this->rgb = new RGB($this->img); + } + + function CloneCanvasH() { + $oldimage = $this->img; + $this->CreateRawCanvas($this->width,$this->height); + imagecopy($this->img,$oldimage,0,0,0,0,$this->width,$this->height); + return $oldimage; + } + + function CreateImgCanvas($aWidth=0,$aHeight=0) { + + $old = array($this->img,$this->width,$this->height); + + $aWidth = round($aWidth); + $aHeight = round($aHeight); + + $this->width=$aWidth; + $this->height=$aHeight; + + + if( $aWidth==0 || $aHeight==0 ) { + // We will set the final size later. + // Note: The size must be specified before any other + // img routines that stroke anything are called. + $this->img = null; + $this->rgb = null; + return $old; + } + + $this->CreateRawCanvas($aWidth,$aHeight); + + // Set canvas color (will also be the background color for a + // a pallett image + $this->SetColor($this->canvascolor); + $this->FilledRectangle(0,0,$aWidth,$aHeight); + + return $old ; + } + + function CopyCanvasH($aToHdl,$aFromHdl,$aToX,$aToY,$aFromX,$aFromY,$aWidth,$aHeight,$aw=-1,$ah=-1) { + if( $aw === -1 ) { + $aw = $aWidth; + $ah = $aHeight; + $f = 'imagecopyresized'; + } + else { + $f = 'imagecopyresampled' ; + } + $f($aToHdl,$aFromHdl, + $aToX,$aToY,$aFromX,$aFromY, $aWidth,$aHeight,$aw,$ah); + } + + function Copy($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth=-1,$fromHeight=-1) { + $this->CopyCanvasH($this->img,$fromImg,$toX,$toY,$fromX,$fromY, + $toWidth,$toHeight,$fromWidth,$fromHeight); + } + + function CopyMerge($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth=-1,$fromHeight=-1,$aMix=100) { + if( $aMix == 100 ) { + $this->CopyCanvasH($this->img,$fromImg, + $toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth,$fromHeight); + } + else { + if( ($fromWidth != -1 && ($fromWidth != $toWidth)) || + ($fromHeight != -1 && ($fromHeight != $fromHeight)) ) { + // Create a new canvas that will hold the re-scaled original from image + if( $toWidth <= 1 || $toHeight <= 1 ) { + JpGraphError::RaiseL(25083);//('Illegal image size when copying image. Size for copied to image is 1 pixel or less.'); + } + $tmpimg = @imagecreatetruecolor($toWidth, $toHeight); + if( $tmpimg < 1 ) { + JpGraphError::RaiseL(25084);//('Failed to create temporary GD canvas. Out of memory ?'); + } + $this->CopyCanvasH($tmpimg,$fromImg,0,0,0,0, + $toWidth,$toHeight,$fromWidth,$fromHeight); + $fromImg = $tmpimg; + } + imagecopymerge($this->img,$fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$aMix); + } + } + + function GetWidth($aImg=null) { + if( $aImg === null ) + $aImg = $this->img; + return imagesx($aImg); + } + + function GetHeight($aImg=null) { + if( $aImg === null ) + $aImg = $this->img; + return imagesy($aImg); + } + + function CreateFromString($aStr) { + $img = @imagecreatefromstring($aStr); + if( $img === false ) { + JpGraphError::RaiseL(25085);//('An image can not be created from the supplied string. It is either in a format not supported or the string is representing an corrupt image.'); + } + return $img; + } + + function SetCanvasH($aHdl) { + $this->img = $aHdl; + $this->rgb->img = $aHdl; + } + + function SetCanvasColor($aColor) { + $this->canvascolor = $aColor ; + } + + function SetAlphaBlending($aFlg=true) { + ImageAlphaBlending($this->img,$aFlg); + } + + + function SetAutoMargin() { + GLOBAL $gJpgBrandTiming; + $min_bm=5; + /* + if( $gJpgBrandTiming ) + $min_bm=15; + */ + $lm = min(40,$this->width/7); + $rm = min(20,$this->width/10); + $tm = max(5,$this->height/7); + $bm = max($min_bm,$this->height/7); + + $this->SetMargin($lm,$rm,$tm,$bm); + } + + + //--------------- + // PUBLIC METHODS + + function SetFont($family,$style=FS_NORMAL,$size=10) { + $this->font_family=$family; + $this->font_style=$style; + $this->font_size=$size; + $this->font_file=''; + if( ($this->font_family==FF_FONT1 || $this->font_family==FF_FONT2) && $this->font_style==FS_BOLD ){ + ++$this->font_family; + } + if( $this->font_family > FF_FONT2+1 ) { // A TTF font so get the font file + + // Check that this PHP has support for TTF fonts + if( !function_exists('imagettfbbox') ) { + JpGraphError::RaiseL(25087);//('This PHP build has not been configured with TTF support. You need to recompile your PHP installation with FreeType support.'); + } + $this->font_file = $this->ttf->File($this->font_family,$this->font_style); + } + } + + // Get the specific height for a text string + function GetTextHeight($txt="",$angle=0) { + $tmp = split("\n",$txt); + $n = count($tmp); + $m=0; + for($i=0; $i< $n; ++$i) + $m = max($m,strlen($tmp[$i])); + + if( $this->font_family <= FF_FONT2+1 ) { + if( $angle==0 ) { + $h = imagefontheight($this->font_family); + if( $h === false ) { + JpGraphError::RaiseL(25088);//('You have a misconfigured GD font support. The call to imagefontwidth() fails.'); + } + + return $n*$h; + } + else { + $w = @imagefontwidth($this->font_family); + if( $w === false ) { + JpGraphError::RaiseL(25088);//('You have a misconfigured GD font support. The call to imagefontwidth() fails.'); + } + + return $m*$w; + } + } + else { + $bbox = $this->GetTTFBBox($txt,$angle); + return $bbox[1]-$bbox[5]; + } + } + + // Estimate font height + function GetFontHeight($angle=0) { + $txt = "XOMg"; + return $this->GetTextHeight($txt,$angle); + } + + // Approximate font width with width of letter "O" + function GetFontWidth($angle=0) { + $txt = 'O'; + return $this->GetTextWidth($txt,$angle); + } + + // Get actual width of text in absolute pixels + function GetTextWidth($txt,$angle=0) { + + $tmp = split("\n",$txt); + $n = count($tmp); + if( $this->font_family <= FF_FONT2+1 ) { + + $m=0; + for($i=0; $i < $n; ++$i) { + $l=strlen($tmp[$i]); + if( $l > $m ) { + $m = $l; + } + } + + if( $angle==0 ) { + $w = @imagefontwidth($this->font_family); + if( $w === false ) { + JpGraphError::RaiseL(25088);//('You have a misconfigured GD font support. The call to imagefontwidth() fails.'); + } + return $m*$w; + } + else { + // 90 degrees internal so height becomes width + $h = @imagefontheight($this->font_family); + if( $h === false ) { + JpGraphError::RaiseL(25089);//('You have a misconfigured GD font support. The call to imagefontheight() fails.'); + } + return $n*$h; + } + } + else { + // For TTF fonts we must walk through a lines and find the + // widest one which we use as the width of the multi-line + // paragraph + $m=0; + for( $i=0; $i < $n; ++$i ) { + $bbox = $this->GetTTFBBox($tmp[$i],$angle); + $mm = $bbox[2] - $bbox[0]; + if( $mm > $m ) + $m = $mm; + } + return $m; + } + } + + // Draw text with a box around it + function StrokeBoxedText($x,$y,$txt,$dir=0,$fcolor="white",$bcolor="black", + $shadowcolor=false,$paragraph_align="left", + $xmarg=6,$ymarg=4,$cornerradius=0,$dropwidth=3) { + + if( !is_numeric($dir) ) { + if( $dir=="h" ) $dir=0; + elseif( $dir=="v" ) $dir=90; + else JpGraphError::RaiseL(25090,$dir);//(" Unknown direction specified in call to StrokeBoxedText() [$dir]"); + } + + if( $this->font_family >= FF_FONT0 && $this->font_family <= FF_FONT2+1) { + $width=$this->GetTextWidth($txt,$dir) ; + $height=$this->GetTextHeight($txt,$dir) ; + } + else { + $width=$this->GetBBoxWidth($txt,$dir) ; + $height=$this->GetBBoxHeight($txt,$dir) ; + } + + $height += 2*$ymarg; + $width += 2*$xmarg; + + if( $this->text_halign=="right" ) $x -= $width; + elseif( $this->text_halign=="center" ) $x -= $width/2; + if( $this->text_valign=="bottom" ) $y -= $height; + elseif( $this->text_valign=="center" ) $y -= $height/2; + + $olda = $this->SetAngle(0); + + if( $shadowcolor ) { + $this->PushColor($shadowcolor); + $this->FilledRoundedRectangle($x-$xmarg+$dropwidth,$y-$ymarg+$dropwidth, + $x+$width+$dropwidth,$y+$height-$ymarg+$dropwidth, + $cornerradius); + $this->PopColor(); + $this->PushColor($fcolor); + $this->FilledRoundedRectangle($x-$xmarg,$y-$ymarg, + $x+$width,$y+$height-$ymarg, + $cornerradius); + $this->PopColor(); + $this->PushColor($bcolor); + $this->RoundedRectangle($x-$xmarg,$y-$ymarg, + $x+$width,$y+$height-$ymarg,$cornerradius); + $this->PopColor(); + } + else { + if( $fcolor ) { + $oc=$this->current_color; + $this->SetColor($fcolor); + $this->FilledRoundedRectangle($x-$xmarg,$y-$ymarg,$x+$width,$y+$height-$ymarg,$cornerradius); + $this->current_color=$oc; + } + if( $bcolor ) { + $oc=$this->current_color; + $this->SetColor($bcolor); + $this->RoundedRectangle($x-$xmarg,$y-$ymarg,$x+$width,$y+$height-$ymarg,$cornerradius); + $this->current_color=$oc; + } + } + + $h=$this->text_halign; + $v=$this->text_valign; + $this->SetTextAlign("left","top"); + $this->StrokeText($x, $y, $txt, $dir, $paragraph_align); + $bb = array($x-$xmarg,$y+$height-$ymarg,$x+$width,$y+$height-$ymarg, + $x+$width,$y-$ymarg,$x-$xmarg,$y-$ymarg); + $this->SetTextAlign($h,$v); + + $this->SetAngle($olda); + + return $bb; + } + + // Set text alignment + function SetTextAlign($halign,$valign="bottom") { + $this->text_halign=$halign; + $this->text_valign=$valign; + } + + + function _StrokeBuiltinFont($x,$y,$txt,$dir=0,$paragraph_align="left",&$aBoundingBox,$aDebug=false) { + + if( is_numeric($dir) && $dir!=90 && $dir!=0) + JpGraphError::RaiseL(25091);//(" Internal font does not support drawing text at arbitrary angle. Use TTF fonts instead."); + + $h=$this->GetTextHeight($txt); + $fh=$this->GetFontHeight(); + $w=$this->GetTextWidth($txt); + + if( $this->text_halign=="right") + $x -= $dir==0 ? $w : $h; + elseif( $this->text_halign=="center" ) { + // For center we subtract 1 pixel since this makes the middle + // be prefectly in the middle + $x -= $dir==0 ? $w/2-1 : $h/2; + } + if( $this->text_valign=="top" ) + $y += $dir==0 ? $h : $w; + elseif( $this->text_valign=="center" ) + $y += $dir==0 ? $h/2 : $w/2; + + if( $dir==90 ) { + imagestringup($this->img,$this->font_family,$x,$y,$txt,$this->current_color); + $aBoundingBox = array(round($x),round($y),round($x),round($y-$w),round($x+$h),round($y-$w),round($x+$h),round($y)); + if( $aDebug ) { + // Draw bounding box + $this->PushColor('green'); + $this->Polygon($aBoundingBox,true); + $this->PopColor(); + } + } + else { + if( ereg("\n",$txt) ) { + $tmp = split("\n",$txt); + for($i=0; $i < count($tmp); ++$i) { + $w1 = $this->GetTextWidth($tmp[$i]); + if( $paragraph_align=="left" ) { + imagestring($this->img,$this->font_family,$x,$y-$h+1+$i*$fh,$tmp[$i],$this->current_color); + } + elseif( $paragraph_align=="right" ) { + imagestring($this->img,$this->font_family,$x+($w-$w1), + $y-$h+1+$i*$fh,$tmp[$i],$this->current_color); + } + else { + imagestring($this->img,$this->font_family,$x+$w/2-$w1/2, + $y-$h+1+$i*$fh,$tmp[$i],$this->current_color); + } + } + } + else { + //Put the text + imagestring($this->img,$this->font_family,$x,$y-$h+1,$txt,$this->current_color); + } + if( $aDebug ) { + // Draw the bounding rectangle and the bounding box + $p1 = array(round($x),round($y),round($x),round($y-$h),round($x+$w),round($y-$h),round($x+$w),round($y)); + + // Draw bounding box + $this->PushColor('green'); + $this->Polygon($p1,true); + $this->PopColor(); + + } + $aBoundingBox=array(round($x),round($y),round($x),round($y-$h),round($x+$w),round($y-$h),round($x+$w),round($y)); + } + } + + function AddTxtCR($aTxt) { + // If the user has just specified a '\n' + // instead of '\n\t' we have to add '\r' since + // the width will be too muchy otherwise since when + // we print we stroke the individually lines by hand. + $e = explode("\n",$aTxt); + $n = count($e); + for($i=0; $i<$n; ++$i) { + $e[$i]=str_replace("\r","",$e[$i]); + } + return implode("\n\r",$e); + } + + function GetTTFBBox($aTxt,$aAngle=0) { + $bbox = @ImageTTFBBox($this->font_size,$aAngle,$this->font_file,$aTxt); + if( $bbox === false ) { + JpGraphError::RaiseL(25092,$this->font_file); +//("There is either a configuration problem with TrueType or a problem reading font file (".$this->font_file."). Make sure file exists and is in a readable place for the HTTP process. (If 'basedir' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try uppgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library."); + } + return $bbox; + } + + function GetBBoxTTF($aTxt,$aAngle=0) { + // Normalize the bounding box to become a minimum + // enscribing rectangle + + $aTxt = $this->AddTxtCR($aTxt); + + if( !is_readable($this->font_file) ) { + JpGraphError::RaiseL(25093,$this->font_file); +//('Can not read font file ('.$this->font_file.') in call to Image::GetBBoxTTF. Please make sure that you have set a font before calling this method and that the font is installed in the TTF directory.'); + } + $bbox = $this->GetTTFBBox($aTxt,$aAngle); + + if( $aAngle==0 ) + return $bbox; + if( $aAngle >= 0 ) { + if( $aAngle <= 90 ) { //<=0 + $bbox = array($bbox[6],$bbox[1],$bbox[2],$bbox[1], + $bbox[2],$bbox[5],$bbox[6],$bbox[5]); + } + elseif( $aAngle <= 180 ) { //<= 2 + $bbox = array($bbox[4],$bbox[7],$bbox[0],$bbox[7], + $bbox[0],$bbox[3],$bbox[4],$bbox[3]); + } + elseif( $aAngle <= 270 ) { //<= 3 + $bbox = array($bbox[2],$bbox[5],$bbox[6],$bbox[5], + $bbox[6],$bbox[1],$bbox[2],$bbox[1]); + } + else { + $bbox = array($bbox[0],$bbox[3],$bbox[4],$bbox[3], + $bbox[4],$bbox[7],$bbox[0],$bbox[7]); + } + } + elseif( $aAngle < 0 ) { + if( $aAngle <= -270 ) { // <= -3 + $bbox = array($bbox[6],$bbox[1],$bbox[2],$bbox[1], + $bbox[2],$bbox[5],$bbox[6],$bbox[5]); + } + elseif( $aAngle <= -180 ) { // <= -2 + $bbox = array($bbox[0],$bbox[3],$bbox[4],$bbox[3], + $bbox[4],$bbox[7],$bbox[0],$bbox[7]); + } + elseif( $aAngle <= -90 ) { // <= -1 + $bbox = array($bbox[2],$bbox[5],$bbox[6],$bbox[5], + $bbox[6],$bbox[1],$bbox[2],$bbox[1]); + } + else { + $bbox = array($bbox[0],$bbox[3],$bbox[4],$bbox[3], + $bbox[4],$bbox[7],$bbox[0],$bbox[7]); + } + } + return $bbox; + } + + function GetBBoxHeight($aTxt,$aAngle=0) { + $box = $this->GetBBoxTTF($aTxt,$aAngle); + return $box[1]-$box[7]+1; + } + + function GetBBoxWidth($aTxt,$aAngle=0) { + $box = $this->GetBBoxTTF($aTxt,$aAngle); + return $box[2]-$box[0]+1; + } + + function _StrokeTTF($x,$y,$txt,$dir=0,$paragraph_align="left",&$aBoundingBox,$debug=false) { + + // Setupo default inter line margin for paragraphs to + // 25% of the font height. + $ConstLineSpacing = 0.25 ; + + // Remember the anchor point before adjustment + if( $debug ) { + $ox=$x; + $oy=$y; + } + + if( !ereg("\n",$txt) || ($dir>0 && ereg("\n",$txt)) ) { + // Format a single line + + $txt = $this->AddTxtCR($txt); + + $bbox=$this->GetBBoxTTF($txt,$dir); + + // Align x,y ot lower left corner of bbox + $x -= $bbox[0]; + $y -= $bbox[1]; + + // Note to self: "topanchor" is deprecated after we changed the + // bopunding box stuff. + if( $this->text_halign=="right" || $this->text_halign=="topanchor" ) + $x -= $bbox[2]-$bbox[0]; + elseif( $this->text_halign=="center" ) $x -= ($bbox[2]-$bbox[0])/2; + + if( $this->text_valign=="top" ) $y += abs($bbox[5])+$bbox[1]; + elseif( $this->text_valign=="center" ) $y -= ($bbox[5]-$bbox[1])/2; + + ImageTTFText ($this->img, $this->font_size, $dir, $x, $y, + $this->current_color,$this->font_file,$txt); + + // Calculate and return the co-ordinates for the bounding box + $box=@ImageTTFBBox($this->font_size,$dir,$this->font_file,$txt); + $p1 = array(); + + + for($i=0; $i < 4; ++$i) { + $p1[] = round($box[$i*2]+$x); + $p1[] = round($box[$i*2+1]+$y); + } + $aBoundingBox = $p1; + + // Debugging code to highlight the bonding box and bounding rectangle + // For text at 0 degrees the bounding box and bounding rectangle are the + // same + if( $debug ) { + // Draw the bounding rectangle and the bounding box + $box=@ImageTTFBBox($this->font_size,$dir,$this->font_file,$txt); + $p = array(); + $p1 = array(); + for($i=0; $i < 4; ++$i) { + $p[] = $bbox[$i*2]+$x; + $p[] = $bbox[$i*2+1]+$y; + $p1[] = $box[$i*2]+$x; + $p1[] = $box[$i*2+1]+$y; + } + + // Draw bounding box + $this->PushColor('green'); + $this->Polygon($p1,true); + $this->PopColor(); + + // Draw bounding rectangle + $this->PushColor('darkgreen'); + $this->Polygon($p,true); + $this->PopColor(); + + // Draw a cross at the anchor point + $this->PushColor('red'); + $this->Line($ox-15,$oy,$ox+15,$oy); + $this->Line($ox,$oy-15,$ox,$oy+15); + $this->PopColor(); + } + } + else { + // Format a text paragraph + $fh=$this->GetFontHeight(); + + // Line margin is 25% of font height + $linemargin=round($fh*$ConstLineSpacing); + $fh += $linemargin; + $w=$this->GetTextWidth($txt); + + $y -= $linemargin/2; + $tmp = split("\n",$txt); + $nl = count($tmp); + $h = $nl * $fh; + + if( $this->text_halign=="right") + $x -= $dir==0 ? $w : $h; + elseif( $this->text_halign=="center" ) { + $x -= $dir==0 ? $w/2 : $h/2; + } + + if( $this->text_valign=="top" ) + $y += $dir==0 ? $h : $w; + elseif( $this->text_valign=="center" ) + $y += $dir==0 ? $h/2 : $w/2; + + // Here comes a tricky bit. + // Since we have to give the position for the string at the + // baseline this means thaht text will move slightly up + // and down depending on any of it's character descend below + // the baseline, for example a 'g'. To adjust the Y-position + // we therefore adjust the text with the baseline Y-offset + // as used for the current font and size. This will keep the + // baseline at a fixed positoned disregarding the actual + // characters in the string. + $standardbox = $this->GetTTFBBox('Gg',$dir); + $yadj = $standardbox[1]; + $xadj = $standardbox[0]; + $aBoundingBox = array(); + for($i=0; $i < $nl; ++$i) { + $wl = $this->GetTextWidth($tmp[$i]); + $bbox = $this->GetTTFBBox($tmp[$i],$dir); + if( $paragraph_align=="left" ) { + $xl = $x; + } + elseif( $paragraph_align=="right" ) { + $xl = $x + ($w-$wl); + } + else { + // Center + $xl = $x + $w/2 - $wl/2 ; + } + + $xl -= $bbox[0]; + $yl = $y - $yadj; + $xl = $xl - $xadj; + ImageTTFText ($this->img, $this->font_size, $dir, + $xl, $yl-($h-$fh)+$fh*$i, + $this->current_color,$this->font_file,$tmp[$i]); + + if( $debug ) { + // Draw the bounding rectangle around each line + $box=@ImageTTFBBox($this->font_size,$dir,$this->font_file,$tmp[$i]); + $p = array(); + for($j=0; $j < 4; ++$j) { + $p[] = $bbox[$j*2]+$xl; + $p[] = $bbox[$j*2+1]+$yl-($h-$fh)+$fh*$i; + } + + // Draw bounding rectangle + $this->PushColor('darkgreen'); + $this->Polygon($p,true); + $this->PopColor(); + } + } + + // Get the bounding box + $bbox = $this->GetBBoxTTF($txt,$dir); + for($j=0; $j < 4; ++$j) { + $bbox[$j*2]+= round($x); + $bbox[$j*2+1]+= round($y - ($h-$fh) - $yadj); + } + $aBoundingBox = $bbox; + + if( $debug ) { + // Draw a cross at the anchor point + $this->PushColor('red'); + $this->Line($ox-25,$oy,$ox+25,$oy); + $this->Line($ox,$oy-25,$ox,$oy+25); + $this->PopColor(); + } + + } + } + + function StrokeText($x,$y,$txt,$dir=0,$paragraph_align="left",$debug=false) { + + $x = round($x); + $y = round($y); + + // Do special language encoding + $txt = $this->langconv->Convert($txt,$this->font_family); + + if( !is_numeric($dir) ) + JpGraphError::RaiseL(25094);//(" Direction for text most be given as an angle between 0 and 90."); + + if( $this->font_family >= FF_FONT0 && $this->font_family <= FF_FONT2+1) { + $this->_StrokeBuiltinFont($x,$y,$txt,$dir,$paragraph_align,$boundingbox,$debug); + } + elseif($this->font_family >= _FF_FIRST && $this->font_family <= _FF_LAST) { + $this->_StrokeTTF($x,$y,$txt,$dir,$paragraph_align,$boundingbox,$debug); + } + else + JpGraphError::RaiseL(25095);//(" Unknown font font family specification. "); + return $boundingbox; + } + + function SetMargin($lm,$rm,$tm,$bm) { + $this->left_margin=$lm; + $this->right_margin=$rm; + $this->top_margin=$tm; + $this->bottom_margin=$bm; + $this->plotwidth=$this->width - $this->left_margin-$this->right_margin ; + $this->plotheight=$this->height - $this->top_margin-$this->bottom_margin ; + if( $this->width > 0 && $this->height > 0 ) { + if( $this->plotwidth < 0 || $this->plotheight < 0 ) + JpGraphError::raise("Too small plot area. ($lm,$rm,$tm,$bm : $this->plotwidth x $this->plotheight). With the given image size and margins there is to little space left for the plot. Increase the plot size or reduce the margins."); + } + } + + function SetTransparent($color) { + imagecolortransparent ($this->img,$this->rgb->allocate($color)); + } + + function SetColor($color,$aAlpha=0) { + $this->current_color_name = $color; + $this->current_color=$this->rgb->allocate($color,$aAlpha); + if( $this->current_color == -1 ) { + JpGraphError::RaiseL(25096); +//("Can't allocate any more colors."); + } + return $this->current_color; + } + + function PushColor($color) { + if( $color != "" ) { + $this->colorstack[$this->colorstackidx]=$this->current_color_name; + $this->colorstack[$this->colorstackidx+1]=$this->current_color; + $this->colorstackidx+=2; + $this->SetColor($color); + } + else { + JpGraphError::RaiseL(25097);//("Color specified as empty string in PushColor()."); + } + } + + function PopColor() { + if($this->colorstackidx<1) + JpGraphError::RaiseL(25098);//(" Negative Color stack index. Unmatched call to PopColor()"); + $this->current_color=$this->colorstack[--$this->colorstackidx]; + $this->current_color_name=$this->colorstack[--$this->colorstackidx]; + } + + + function SetLineWeight($weight) { + $this->line_weight = $weight; + } + + function SetStartPoint($x,$y) { + $this->lastx=round($x); + $this->lasty=round($y); + } + + function Arc($cx,$cy,$w,$h,$s,$e) { + // GD Arc doesn't like negative angles + while( $s < 0) $s += 360; + while( $e < 0) $e += 360; + + imagearc($this->img,round($cx),round($cy),round($w),round($h), + $s,$e,$this->current_color); + } + + function FilledArc($xc,$yc,$w,$h,$s,$e,$style="") { + + while( $s < 0 ) $s += 360; + while( $e < 0 ) $e += 360; + if( $style=="" ) + $style=IMG_ARC_PIE; + + // Workaround for bug in 4.4.7 which will not draw a correct 360 + // degree slice with any other angles than 0,360 + if( 360-abs($s-$e) < 0.01 ) { + $s = 0; + $e = 360; + } + if( abs($s-$e) > 0.001 ) { + imagefilledarc($this->img,round($xc),round($yc),round($w),round($h), + round($s),round($e),$this->current_color,$style); + } + } + + function FilledCakeSlice($cx,$cy,$w,$h,$s,$e) { + $this->CakeSlice($cx,$cy,$w,$h,$s,$e,$this->current_color_name); + } + + function CakeSlice($xc,$yc,$w,$h,$s,$e,$fillcolor="",$arccolor="") { + $s = round($s); $e = round($e); + $w = round($w); $h = round($h); + $xc = round($xc); $yc = round($yc); + + if( $s==$e ) { + // A full circle. We draw this a plain circle + $this->PushColor($fillcolor); + imagefilledellipse($this->img,$xc,$yc,2*$w,2*$h,$this->current_color); + $this->PopColor(); + $this->PushColor($arccolor); + imageellipse($this->img,$xc,$yc,2*$w,2*$h,$this->current_color); + $this->Line($xc,$yc,cos($s*M_PI/180)*$w+$xc,$yc+sin($s*M_PI/180)*$h); + $this->PopColor(); + } + else { + $this->PushColor($fillcolor); + $this->FilledArc($xc,$yc,2*$w,2*$h,$s,$e); + $this->PopColor(); + if( $arccolor != "" ) { + $this->PushColor($arccolor); + // We add 2 pixels to make the Arc() better aligned with the filled arc. + imagefilledarc($this->img,$xc,$yc,2*$w,2*$h,$s,$e,$this->current_color,IMG_ARC_NOFILL | IMG_ARC_EDGED ) ; + + // Workaround for bug in 4.4.7 which will not draw a correct 360 + // degree slice with any other angles than 0,360. Unfortunately we cannot just + // adjust the angles since the interior ar edge is drawn correct but not the surrounding + // circle. This workaround can only be used with perfect circle shaped arcs + if( PHP_VERSION==='4.4.7' && (360-abs($s-$e) < 0.01 && $w==$h) ) { + $this->Circle($xc,$yc,$w); + } + $this->PopColor(); + } + } + } + + function Ellipse($xc,$yc,$w,$h) { + $this->Arc($xc,$yc,$w,$h,0,360); + } + + // Breseham circle gives visually better result then using GD + // built in arc(). It takes some more time but gives better + // accuracy. + function BresenhamCircle($xc,$yc,$r) { + $d = 3-2*$r; + $x = 0; + $y = $r; + while($x<=$y) { + $this->Point($xc+$x,$yc+$y); + $this->Point($xc+$x,$yc-$y); + $this->Point($xc-$x,$yc+$y); + $this->Point($xc-$x,$yc-$y); + + $this->Point($xc+$y,$yc+$x); + $this->Point($xc+$y,$yc-$x); + $this->Point($xc-$y,$yc+$x); + $this->Point($xc-$y,$yc-$x); + + if( $d<0 ) $d += 4*$x+6; + else { + $d += 4*($x-$y)+10; + --$y; + } + ++$x; + } + } + + function Circle($xc,$yc,$r) { + if( USE_BRESENHAM ) + $this->BresenhamCircle($xc,$yc,$r); + else { + + /* + // Some experimental code snippet to see if we can get a decent + // result doing a trig-circle + // Create an approximated circle with 0.05 rad resolution + $end = 2*M_PI; + $l = $r/10; + if( $l < 3 ) $l=3; + $step_size = 2*M_PI/(2*$r*M_PI/$l); + $pts = array(); + $pts[] = $r + $xc; + $pts[] = $yc; + for( $a=$step_size; $a <= $end; $a += $step_size ) { + $pts[] = round($xc + $r*cos($a)); + $pts[] = round($yc - $r*sin($a)); + } + imagepolygon($this->img,$pts,count($pts)/2,$this->current_color); + */ + + $this->Arc($xc,$yc,$r*2,$r*2,0,360); + + // For some reason imageellipse() isn't in GD 2.0.1, PHP 4.1.1 + //imageellipse($this->img,$xc,$yc,$r,$r,$this->current_color); + } + } + + function FilledCircle($xc,$yc,$r) { + imagefilledellipse($this->img,round($xc),round($yc),2*$r,2*$r,$this->current_color); + } + + // Linear Color InterPolation + function lip($f,$t,$p) { + $p = round($p,1); + $r = $f[0] + ($t[0]-$f[0])*$p; + $g = $f[1] + ($t[1]-$f[1])*$p; + $b = $f[2] + ($t[2]-$f[2])*$p; + return array($r,$g,$b); + } + + // Anti-aliased line. + // Note that this is roughly 8 times slower then a normal line! + function WuLine($x1,$y1,$x2,$y2) { + // Get foreground line color + $lc = imagecolorsforindex($this->img,$this->current_color); + $lc = array($lc["red"],$lc["green"],$lc["blue"]); + + $dx = $x2-$x1; + $dy = $y2-$y1; + + if( abs($dx) > abs($dy) ) { + if( $dx<0 ) { + $dx = -$dx;$dy = -$dy; + $tmp=$x2;$x2=$x1;$x1=$tmp; + $tmp=$y2;$y2=$y1;$y1=$tmp; + } + $x=$x1<<16; $y=$y1<<16; + $yinc = ($dy*65535)/$dx; + $first=true; + while( ($x >> 16) < $x2 ) { + + $bc = @imagecolorsforindex($this->img,imagecolorat($this->img,$x>>16,$y>>16)); + if( $bc <= 0 ) { + JpGraphError::RaiseL(25100);//('Problem with color palette and your GD setup. Please disable anti-aliasing or use GD2 with true-color. If you have GD2 library installed please make sure that you have set the USE_GD2 constant to true and that truecolor is enabled.'); + } + $bc=array($bc["red"],$bc["green"],$bc["blue"]); + + $this->SetColor($this->lip($lc,$bc,($y & 0xFFFF)/65535)); + imagesetpixel($this->img,$x>>16,$y>>16,$this->current_color); + $this->SetColor($this->lip($lc,$bc,(~$y & 0xFFFF)/65535)); + if( !$first ) + imagesetpixel($this->img,$x>>16,($y>>16)+1,$this->current_color); + $x += 65536; $y += $yinc; + $first=false; + } + } + else { + if( $dy<0 ) { + $dx = -$dx;$dy = -$dy; + $tmp=$x2;$x2=$x1;$x1=$tmp; + $tmp=$y2;$y2=$y1;$y1=$tmp; + } + $x=$x1<<16; $y=$y1<<16; + $xinc = ($dx*65535)/$dy; + $first = true; + while( ($y >> 16) < $y2 ) { + + $bc = @imagecolorsforindex($this->img,imagecolorat($this->img,$x>>16,$y>>16)); + if( $bc <= 0 ) { + JpGraphError::RaiseL(25100);//('Problem with color palette and your GD setup. Please disable anti-aliasing or use GD2 with true-color. If you have GD2 library installed please make sure that you have set the USE_GD2 constant to true and truecolor is enabled.'); + + } + + $bc=array($bc["red"],$bc["green"],$bc["blue"]); + + $this->SetColor($this->lip($lc,$bc,($x & 0xFFFF)/65535)); + imagesetpixel($this->img,$x>>16,$y>>16,$this->current_color); + $this->SetColor($this->lip($lc,$bc,(~$x & 0xFFFF)/65535)); + if( !$first ) + imagesetpixel($this->img,($x>>16)+1,$y>>16,$this->current_color); + $y += 65536; $x += $xinc; + $first = false; + } + } + $this->SetColor($lc); + //imagesetpixel($this->img,$x2,$y2,$this->current_color); + //imagesetpixel($this->img,$x1,$y1,$this->current_color); + } + + // Set line style dashed, dotted etc + function SetLineStyle($s) { + if( is_numeric($s) ) { + if( $s<1 || $s>4 ) + JpGraphError::RaiseL(25101,$s);//(" Illegal numeric argument to SetLineStyle(): ($s)"); + } + elseif( is_string($s) ) { + if( $s == "solid" ) $s=1; + elseif( $s == "dotted" ) $s=2; + elseif( $s == "dashed" ) $s=3; + elseif( $s == "longdashed" ) $s=4; + else JpGraphError::RaiseL(25102,$s);//(" Illegal string argument to SetLineStyle(): $s"); + } + else { + JpGraphError::RaiseL(25103,$s);//(" Illegal argument to SetLineStyle $s"); + } + $old = $this->line_style; + $this->line_style=$s; + return $old; + } + + // Same as Line but take the line_style into account + function StyleLine($x1,$y1,$x2,$y2) { + switch( $this->line_style ) { + case 1:// Solid + $this->Line($x1,$y1,$x2,$y2); + break; + case 2: // Dotted + $this->DashedLine($x1,$y1,$x2,$y2,1,6); + break; + case 3: // Dashed + $this->DashedLine($x1,$y1,$x2,$y2,2,4); + break; + case 4: // Longdashes + $this->DashedLine($x1,$y1,$x2,$y2,8,6); + break; + default: + JpGraphError::RaiseL(25104,$this->line_style);//(" Unknown line style: $this->line_style "); + break; + } + } + + function Line($x1,$y1,$x2,$y2) { + + $x1 = round($x1); + $x2 = round($x2); + $y1 = round($y1); + $y2 = round($y2); + + if( $this->line_weight==0 ) return; + if( $this->use_anti_aliasing ) { + $dx = $x2-$x1; + $dy = $y2-$y1; + // Vertical, Horizontal or 45 lines don't need anti-aliasing + if( $dx!=0 && $dy!=0 && $dx!=$dy ) { + $this->WuLine($x1,$y1,$x2,$y2); + return; + } + } + if( $this->line_weight==1 ) { + imageline($this->img,$x1,$y1,$x2,$y2,$this->current_color); + } + elseif( $x1==$x2 ) { // Special case for vertical lines + imageline($this->img,$x1,$y1,$x2,$y2,$this->current_color); + $w1=floor($this->line_weight/2); + $w2=floor(($this->line_weight-1)/2); + for($i=1; $i<=$w1; ++$i) + imageline($this->img,$x1+$i,$y1,$x2+$i,$y2,$this->current_color); + for($i=1; $i<=$w2; ++$i) + imageline($this->img,$x1-$i,$y1,$x2-$i,$y2,$this->current_color); + } + elseif( $y1==$y2 ) { // Special case for horizontal lines + imageline($this->img,$x1,$y1,$x2,$y2,$this->current_color); + $w1=floor($this->line_weight/2); + $w2=floor(($this->line_weight-1)/2); + for($i=1; $i<=$w1; ++$i) + imageline($this->img,$x1,$y1+$i,$x2,$y2+$i,$this->current_color); + for($i=1; $i<=$w2; ++$i) + imageline($this->img,$x1,$y1-$i,$x2,$y2-$i,$this->current_color); + } + else { // General case with a line at an angle + $a = atan2($y1-$y2,$x2-$x1); + // Now establish some offsets from the center. This gets a little + // bit involved since we are dealing with integer functions and we + // want the apperance to be as smooth as possible and never be thicker + // then the specified width. + + // We do the trig stuff to make sure that the endpoints of the line + // are perpendicular to the line itself. + $dx=(sin($a)*$this->line_weight/2); + $dy=(cos($a)*$this->line_weight/2); + + $pnts = array(round($x2+$dx),round($y2+$dy),round($x2-$dx),round($y2-$dy), + round($x1-$dx),round($y1-$dy),round($x1+$dx),round($y1+$dy)); + imagefilledpolygon($this->img,$pnts,count($pnts)/2,$this->current_color); + } + $this->lastx=$x2; $this->lasty=$y2; + } + + function Polygon($p,$closed=FALSE,$fast=FALSE) { + if( $this->line_weight==0 ) return; + $n=count($p); + $oldx = $p[0]; + $oldy = $p[1]; + if( $fast ) { + for( $i=2; $i < $n; $i+=2 ) { + imageline($this->img,$oldx,$oldy,$p[$i],$p[$i+1],$this->current_color); + $oldx = $p[$i]; + $oldy = $p[$i+1]; + } + if( $closed ) { + imageline($this->img,$p[$n*2-2],$p[$n*2-1],$p[0],$p[1],$this->current_color); + } + } + else { + for( $i=2; $i < $n; $i+=2 ) { + $this->StyleLine($oldx,$oldy,$p[$i],$p[$i+1]); + $oldx = $p[$i]; + $oldy = $p[$i+1]; + } + if( $closed ) + $this->Line($oldx,$oldy,$p[0],$p[1]); + } + } + + function FilledPolygon($pts) { + $n=count($pts); + if( $n == 0 ) { + JpGraphError::RaiseL(25105);//('NULL data specified for a filled polygon. Check that your data is not NULL.'); + } + for($i=0; $i < $n; ++$i) + $pts[$i] = round($pts[$i]); + imagefilledpolygon($this->img,$pts,count($pts)/2,$this->current_color); + } + + function Rectangle($xl,$yu,$xr,$yl) { + $this->Polygon(array($xl,$yu,$xr,$yu,$xr,$yl,$xl,$yl,$xl,$yu)); + } + + function FilledRectangle($xl,$yu,$xr,$yl) { + $this->FilledPolygon(array($xl,$yu,$xr,$yu,$xr,$yl,$xl,$yl)); + } + + function FilledRectangle2($xl,$yu,$xr,$yl,$color1,$color2,$style=1) { + // Fill a rectangle with lines of two colors + if( $style===1 ) { + // Horizontal stripe + if( $yl < $yu ) { + $t = $yl; $yl=$yu; $yu=$t; + } + for( $y=$yu; $y <= $yl; ++$y) { + $this->SetColor($color1); + $this->Line($xl,$y,$xr,$y); + ++$y; + $this->SetColor($color2); + $this->Line($xl,$y,$xr,$y); + } + } + else { + if( $xl < $xl ) { + $t = $xl; $xl=$xr; $xr=$t; + } + for( $x=$xl; $x <= $xr; ++$x) { + $this->SetColor($color1); + $this->Line($x,$yu,$x,$yl); + ++$x; + $this->SetColor($color2); + $this->Line($x,$yu,$x,$yl); + } + } + } + + function ShadowRectangle($xl,$yu,$xr,$yl,$fcolor=false,$shadow_width=3,$shadow_color=array(102,102,102)) { + // This is complicated by the fact that we must also handle the case where + // the reactangle has no fill color + $this->PushColor($shadow_color); + $this->FilledRectangle($xr-$shadow_width,$yu+$shadow_width,$xr,$yl-$shadow_width-1); + $this->FilledRectangle($xl+$shadow_width,$yl-$shadow_width,$xr,$yl); + //$this->FilledRectangle($xl+$shadow_width,$yu+$shadow_width,$xr,$yl); + $this->PopColor(); + if( $fcolor==false ) + $this->Rectangle($xl,$yu,$xr-$shadow_width-1,$yl-$shadow_width-1); + else { + $this->PushColor($fcolor); + $this->FilledRectangle($xl,$yu,$xr-$shadow_width-1,$yl-$shadow_width-1); + $this->PopColor(); + $this->Rectangle($xl,$yu,$xr-$shadow_width-1,$yl-$shadow_width-1); + } + } + + function FilledRoundedRectangle($xt,$yt,$xr,$yl,$r=5) { + if( $r==0 ) { + $this->FilledRectangle($xt,$yt,$xr,$yl); + return; + } + + // To avoid overlapping fillings (which will look strange + // when alphablending is enabled) we have no choice but + // to fill the five distinct areas one by one. + + // Center square + $this->FilledRectangle($xt+$r,$yt+$r,$xr-$r,$yl-$r); + // Top band + $this->FilledRectangle($xt+$r,$yt,$xr-$r,$yt+$r-1); + // Bottom band + $this->FilledRectangle($xt+$r,$yl-$r+1,$xr-$r,$yl); + // Left band + $this->FilledRectangle($xt,$yt+$r+1,$xt+$r-1,$yl-$r); + // Right band + $this->FilledRectangle($xr-$r+1,$yt+$r,$xr,$yl-$r); + + // Topleft & Topright arc + $this->FilledArc($xt+$r,$yt+$r,$r*2,$r*2,180,270); + $this->FilledArc($xr-$r,$yt+$r,$r*2,$r*2,270,360); + + // Bottomleft & Bottom right arc + $this->FilledArc($xt+$r,$yl-$r,$r*2,$r*2,90,180); + $this->FilledArc($xr-$r,$yl-$r,$r*2,$r*2,0,90); + + } + + function RoundedRectangle($xt,$yt,$xr,$yl,$r=5) { + + if( $r==0 ) { + $this->Rectangle($xt,$yt,$xr,$yl); + return; + } + + // Top & Bottom line + $this->Line($xt+$r,$yt,$xr-$r,$yt); + $this->Line($xt+$r,$yl,$xr-$r,$yl); + + // Left & Right line + $this->Line($xt,$yt+$r,$xt,$yl-$r); + $this->Line($xr,$yt+$r,$xr,$yl-$r); + + // Topleft & Topright arc + $this->Arc($xt+$r,$yt+$r,$r*2,$r*2,180,270); + $this->Arc($xr-$r,$yt+$r,$r*2,$r*2,270,360); + + // Bottomleft & Bottomright arc + $this->Arc($xt+$r,$yl-$r,$r*2,$r*2,90,180); + $this->Arc($xr-$r,$yl-$r,$r*2,$r*2,0,90); + } + + function FilledBevel($x1,$y1,$x2,$y2,$depth=2,$color1='white@0.4',$color2='darkgray@0.4') { + $this->FilledRectangle($x1,$y1,$x2,$y2); + $this->Bevel($x1,$y1,$x2,$y2,$depth,$color1,$color2); + } + + function Bevel($x1,$y1,$x2,$y2,$depth=2,$color1='white@0.4',$color2='black@0.5') { + $this->PushColor($color1); + for( $i=0; $i < $depth; ++$i ) { + $this->Line($x1+$i,$y1+$i,$x1+$i,$y2-$i); + $this->Line($x1+$i,$y1+$i,$x2-$i,$y1+$i); + } + $this->PopColor(); + + $this->PushColor($color2); + for( $i=0; $i < $depth; ++$i ) { + $this->Line($x1+$i,$y2-$i,$x2-$i,$y2-$i); + $this->Line($x2-$i,$y1+$i,$x2-$i,$y2-$i-1); + } + $this->PopColor(); + } + + function StyleLineTo($x,$y) { + $this->StyleLine($this->lastx,$this->lasty,$x,$y); + $this->lastx=$x; + $this->lasty=$y; + } + + function LineTo($x,$y) { + $this->Line($this->lastx,$this->lasty,$x,$y); + $this->lastx=$x; + $this->lasty=$y; + } + + function Point($x,$y) { + imagesetpixel($this->img,round($x),round($y),$this->current_color); + } + + function Fill($x,$y) { + imagefill($this->img,round($x),round($y),$this->current_color); + } + + function FillToBorder($x,$y,$aBordColor) { + $bc = $this->rgb->allocate($aBordColor); + if( $bc == -1 ) { + JpGraphError::RaiseL(25106);//('Image::FillToBorder : Can not allocate more colors'); + } + imagefilltoborder($this->img,round($x),round($y),$bc,$this->current_color); + } + + function DashedLine($x1,$y1,$x2,$y2,$dash_length=1,$dash_space=4) { + + $x1 = round($x1); + $x2 = round($x2); + $y1 = round($y1); + $y2 = round($y2); + + // Code based on, but not identical to, work by Ariel Garza and James Pine + $line_length = ceil (sqrt(pow(($x2 - $x1),2) + pow(($y2 - $y1),2)) ); + $dx = ($line_length) ? ($x2 - $x1) / $line_length : 0; + $dy = ($line_length) ? ($y2 - $y1) / $line_length : 0; + $lastx = $x1; $lasty = $y1; + $xmax = max($x1,$x2); + $xmin = min($x1,$x2); + $ymax = max($y1,$y2); + $ymin = min($y1,$y2); + for ($i = 0; $i < $line_length; $i += ($dash_length + $dash_space)) { + $x = ($dash_length * $dx) + $lastx; + $y = ($dash_length * $dy) + $lasty; + + // The last section might overshoot so we must take a computational hit + // and check this. + if( $x>$xmax ) $x=$xmax; + if( $y>$ymax ) $y=$ymax; + + if( $x<$xmin ) $x=$xmin; + if( $y<$ymin ) $y=$ymin; + + $this->Line($lastx,$lasty,$x,$y); + $lastx = $x + ($dash_space * $dx); + $lasty = $y + ($dash_space * $dy); + } + } + + function SetExpired($aFlg=true) { + $this->expired = $aFlg; + } + + // Generate image header + function Headers() { + + // In case we are running from the command line with the client version of + // PHP we can't send any headers. + $sapi = php_sapi_name(); + if( $sapi == 'cli' ) + return; + + // These parameters are set by headers_sent() but they might cause + // an undefined variable error unless they are initilized + $file=''; + $lineno=''; + if( headers_sent($file,$lineno) ) { + $file=basename($file); + $t = new ErrMsgText(); + $msg = $t->Get(10,$file,$lineno); + die($msg); + } + + if ($this->expired) { + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); + header("Cache-Control: no-cache, must-revalidate"); + header("Pragma: no-cache"); + } + header("Content-type: image/$this->img_format"); + } + + // Adjust image quality for formats that allow this + function SetQuality($q) { + $this->quality = $q; + } + + // Stream image to browser or to file + function Stream($aFile="") { + $func="image".$this->img_format; + if( $this->img_format=="jpeg" && $this->quality != null ) { + $res = @$func($this->img,$aFile,$this->quality); + } + else { + if( $aFile != "" ) { + $res = @$func($this->img,$aFile); + if( !$res ) + JpGraphError::RaiseL(25107,$aFile);//("Can't write to file '$aFile'. Check that the process running PHP has enough permission."); + } + else { + $res = @$func($this->img); + if( !$res ) + JpGraphError::RaiseL(25108);//("Can't stream image. This is most likely due to a faulty PHP/GD setup. Try to recompile PHP and use the built-in GD library that comes with PHP."); + + } + } + } + + // Clear resource tide up by image + function Destroy() { + imagedestroy($this->img); + } + + // Specify image format. Note depending on your installation + // of PHP not all formats may be supported. + function SetImgFormat($aFormat,$aQuality=75) { + $this->quality = $aQuality; + $aFormat = strtolower($aFormat); + $tst = true; + $supported = imagetypes(); + if( $aFormat=="auto" ) { + if( $supported & IMG_PNG ) + $this->img_format="png"; + elseif( $supported & IMG_JPG ) + $this->img_format="jpeg"; + elseif( $supported & IMG_GIF ) + $this->img_format="gif"; + elseif( $supported & IMG_WBMP ) + $this->img_format="wbmp"; + elseif( $supported & IMG_XPM ) + $this->img_format="xpm"; + else + JpGraphError::RaiseL(25109);//("Your PHP (and GD-lib) installation does not appear to support any known graphic formats. You need to first make sure GD is compiled as a module to PHP. If you also want to use JPEG images you must get the JPEG library. Please see the PHP docs for details."); + + return true; + } + else { + if( $aFormat=="jpeg" || $aFormat=="png" || $aFormat=="gif" || $aFormat=="wbmp" || $aFormat=="xpm") { + if( $aFormat=="jpeg" && !($supported & IMG_JPG) ) + $tst=false; + elseif( $aFormat=="png" && !($supported & IMG_PNG) ) + $tst=false; + elseif( $aFormat=="gif" && !($supported & IMG_GIF) ) + $tst=false; + elseif( $aFormat=="wbmp" && !($supported & IMG_WBMP) ) + $tst=false; + elseif( $aFormat=="xpm" && !($supported & IMG_XPM) ) + $tst=false; + else { + $this->img_format=$aFormat; + return true; + } + } + else + $tst=false; + if( !$tst ) + JpGraphError::RaiseL(25110,$aFormat);//(" Your PHP installation does not support the chosen graphic format: $aFormat"); + } + } +} // CLASS + +//=================================================== +// CLASS RotImage +// Description: Exactly as Image but draws the image at +// a specified angle around a specified rotation point. +//=================================================== +class RotImage extends Image { + var $m=array(); + var $a=0; + var $dx=0,$dy=0,$transx=0,$transy=0; + + function RotImage($aWidth,$aHeight,$a=0,$aFormat=DEFAULT_GFORMAT,$aSetAutoMargin=true) { + $this->Image($aWidth,$aHeight,$aFormat,$aSetAutoMargin); + $this->dx=$this->left_margin+$this->plotwidth/2; + $this->dy=$this->top_margin+$this->plotheight/2; + $this->SetAngle($a); + } + + function SetCenter($dx,$dy) { + $old_dx = $this->dx; + $old_dy = $this->dy; + $this->dx=$dx; + $this->dy=$dy; + $this->SetAngle($this->a); + return array($old_dx,$old_dy); + } + + function SetTranslation($dx,$dy) { + $old = array($this->transx,$this->transy); + $this->transx = $dx; + $this->transy = $dy; + return $old; + } + + function UpdateRotMatrice() { + $a = $this->a; + $a *= M_PI/180; + $sa=sin($a); $ca=cos($a); + // Create the rotation matrix + $this->m[0][0] = $ca; + $this->m[0][1] = -$sa; + $this->m[0][2] = $this->dx*(1-$ca) + $sa*$this->dy ; + $this->m[1][0] = $sa; + $this->m[1][1] = $ca; + $this->m[1][2] = $this->dy*(1-$ca) - $sa*$this->dx ; + } + + function SetAngle($a) { + $tmp = $this->a; + $this->a = $a; + $this->UpdateRotMatrice(); + return $tmp; + } + + function Circle($xc,$yc,$r) { + // Circle get's rotated through the Arc() call + // made in the parent class + parent::Circle($xc,$yc,$r); + } + + function FilledCircle($xc,$yc,$r) { + list($xc,$yc) = $this->Rotate($xc,$yc); + parent::FilledCircle($xc,$yc,$r); + } + + function Arc($xc,$yc,$w,$h,$s,$e) { + list($xc,$yc) = $this->Rotate($xc,$yc); + $s += $this->a; + $e += $this->a; + parent::Arc($xc,$yc,$w,$h,$s,$e); + } + + function FilledArc($xc,$yc,$w,$h,$s,$e) { + list($xc,$yc) = $this->Rotate($xc,$yc); + $s += $this->a; + $e += $this->a; + parent::FilledArc($xc,$yc,$w,$h,$s,$e); + } + + function SetMargin($lm,$rm,$tm,$bm) { + parent::SetMargin($lm,$rm,$tm,$bm); + $this->dx=$this->left_margin+$this->plotwidth/2; + $this->dy=$this->top_margin+$this->plotheight/2; + $this->UpdateRotMatrice(); + } + + function Rotate($x,$y) { + // Optimization. Ignore rotation if Angle==0 || ANgle==360 + if( $this->a == 0 || $this->a == 360 ) { + return array($x + $this->transx, $y + $this->transy ); + } + else { + $x1=round($this->m[0][0]*$x + $this->m[0][1]*$y,1) + $this->m[0][2] + $this->transx; + $y1=round($this->m[1][0]*$x + $this->m[1][1]*$y,1) + $this->m[1][2] + $this->transy; + return array($x1,$y1); + } + } + + function CopyMerge($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth=-1,$fromHeight=-1,$aMix=100) { + list($toX,$toY) = $this->Rotate($toX,$toY); + parent::CopyMerge($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth,$fromHeight,$aMix); + + } + + function ArrRotate($pnts) { + $n = count($pnts)-1; + for($i=0; $i < $n; $i+=2) { + list ($x,$y) = $this->Rotate($pnts[$i],$pnts[$i+1]); + $pnts[$i] = $x; $pnts[$i+1] = $y; + } + return $pnts; + } + + function Line($x1,$y1,$x2,$y2) { + list($x1,$y1) = $this->Rotate($x1,$y1); + list($x2,$y2) = $this->Rotate($x2,$y2); + parent::Line($x1,$y1,$x2,$y2); + } + + function Rectangle($x1,$y1,$x2,$y2) { + // Rectangle uses Line() so it will be rotated through that call + parent::Rectangle($x1,$y1,$x2,$y2); + } + + function FilledRectangle($x1,$y1,$x2,$y2) { + if( $y1==$y2 || $x1==$x2 ) + $this->Line($x1,$y1,$x2,$y2); + else + $this->FilledPolygon(array($x1,$y1,$x2,$y1,$x2,$y2,$x1,$y2)); + } + + function Polygon($pnts,$closed=FALSE,$fast=false) { + // Polygon uses Line() so it will be rotated through that call unless + // fast drawing routines are used in which case a rotate is needed + if( $fast ) { + parent::Polygon($this->ArrRotate($pnts)); + } + else + parent::Polygon($pnts,$closed,$fast); + } + + function FilledPolygon($pnts) { + parent::FilledPolygon($this->ArrRotate($pnts)); + } + + function Point($x,$y) { + list($xp,$yp) = $this->Rotate($x,$y); + parent::Point($xp,$yp); + } + + function StrokeText($x,$y,$txt,$dir=0,$paragraph_align="left",$debug=false) { + list($xp,$yp) = $this->Rotate($x,$y); + return parent::StrokeText($xp,$yp,$txt,$dir,$paragraph_align,$debug); + } +} + + +?> diff --git a/html/includes/jpgraph/src/imgdata_balls.inc.php b/html/includes/jpgraph/src/imgdata_balls.inc.php new file mode 100644 index 0000000000..11291efd3f --- /dev/null +++ b/html/includes/jpgraph/src/imgdata_balls.inc.php @@ -0,0 +1,1063 @@ + 'imgdata_large', + MARK_IMG_MBALL => 'imgdata_small', + MARK_IMG_SBALL => 'imgdata_xsmall', + MARK_IMG_BALL => 'imgdata_xsmall'); + var $colors_1 = array('blue','lightblue','brown','darkgreen', + 'green','purple','red','gray','yellow','silver','gray'); + var $index_1 = array('blue'=>9,'lightblue'=>1,'brown'=>6,'darkgreen'=>7, + 'green'=>8,'purple'=>4,'red'=>0,'gray'=>5,'silver'=>3,'yellow'=>2); + var $maxidx_1 = 9 ; + + var $colors_2 = array('blue','bluegreen','brown','cyan', + 'darkgray','greengray','gray','green', + 'greenblue','lightblue','lightred', + 'purple','red','white','yellow'); + + + var $index_2 = array('blue'=>9,'bluegreen'=>13,'brown'=>8,'cyan'=>12, + 'darkgray'=>5,'greengray'=>6,'gray'=>2,'green'=>10, + 'greenblue'=>3,'lightblue'=>1,'lightred'=>14, + 'purple'=>7,'red'=>0,'white'=>11,'yellow'=>4); + + var $maxidx_2 = 14 ; + + + var $colors_3 = array('bluegreen','cyan','darkgray','greengray', + 'gray','graypurple','green','greenblue','lightblue', + 'lightred','navy','orange','purple','red','yellow'); + + var $index_3 = array('bluegreen'=>1,'cyan'=>11,'darkgray'=>14,'greengray'=>10, + 'gray'=>3,'graypurple'=>4,'green'=>9,'greenblue'=>7, + 'lightblue'=>13,'lightred'=>0,'navy'=>2,'orange'=>12, + 'purple'=>8,'red'=>5,'yellow'=>6); + var $maxidx_3 = 14 ; + + var $colors,$index,$maxidx; + var $imgdata_large ; + var $imgdata_small ; + var $imgdata_xsmall ; + + + function GetImg($aMark,$aIdx) { + switch( $aMark ) { + case MARK_IMG_SBALL: + case MARK_IMG_BALL: + $this->colors = $this->colors_3; + $this->index = $this->index_3 ; + $this->maxidx = $this->maxidx_3 ; + break; + case MARK_IMG_MBALL: + $this->colors = $this->colors_2; + $this->index = $this->index_2 ; + $this->maxidx = $this->maxidx_2 ; + break; + default: + $this->colors = $this->colors_1; + $this->index = $this->index_1 ; + $this->maxidx = $this->maxidx_1 ; + break; + } + return parent::GetImg($aMark,$aIdx); + } + + function ImgData_Balls() { + +//========================================================== +// File: bl_red.png +//========================================================== + $this->imgdata_large[0][0]= 1072 ; + $this->imgdata_large[0][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAByF'. + 'BMVEX/////////xsb/vb3/lIz/hIT/e3v/c3P/c2v/a2v/Y2P/'. + 'UlL/Skr/SkL/Qjn/MTH/MSn/KSn/ISH/IRj/GBj/GBD/EBD/EA'. + 'j/CAj/CAD/AAD3QkL3MTH3KSn3KSH3GBj3EBD3CAj3AAD1zMzv'. + 'QkLvISHvIRjvGBjvEBDvEAjvAADnUlLnSkrnMTnnKSnnIRjnGB'. + 'DnEBDnCAjnAADec3PeSkreISHeGBjeGBDeEAjWhITWa2vWUlLW'. + 'SkrWISnWGBjWEBDWEAjWCAjWAADOnp7Oa2vOGCHOGBjOGBDOEB'. + 'DOCAjOAADJrq7Gt7fGGBjGEBDGCAjGAADEpKS/v7+9QkK9GBC9'. + 'EBC9CAi9AAC1e3u1a2u1Skq1KSm1EBC1CAi1AACtEBCtCBCtCA'. + 'itAACngYGlCAilAACghIScOTmcCAicAACYgYGUGAiUCAiUAAiU'. + 'AACMKSmMEACMAACEa2uEGAiEAAB7GBh7CAB7AABzOTlzGBBzCA'. + 'BzAABrSkprOTlrGBhrAABjOTljAABaQkJaOTlaCABaAABSKSlS'. + 'GBhSAABKKSlKGBhKAABCGBhCCABCAAA5CAA5AAAxCAAxAAApCA'. + 'ApAAAhAAAYAACc9eRyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'. + 'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkRFD'. + 'UHLytKAAAB4UlEQVR4nGNgIAK4mGjrmNq6BmFIWMmISUpKSmk5'. + 'B8ZEokj4qoiLiQCBgqald3xaBpKMj6y4sLCQkJCIvIaFV0RaUR'. + 'lCSk5cWEiAn19ASN7QwisuraihHiajKyEixM/NwckjoKrvEACU'. + 'qumpg7pAUlREiJdNmZmLT9/cMzwps7Smc3I2WEpGUkxYkJuFiY'. + 'lTxszePzY1v7Shc2oX2D+K4iLCgjzsrOw8embuYUmZeTVtPVOn'. + 'gqSslYAOF+Ln4ZHWtXMPTcjMrWno7J82rRgoZWOsqaCgrqaqqm'. + 'fn5peQmlsK1DR52vRaoFSIs5GRoYG5ub27n19CYm5pdVPnxKnT'. + 'pjWDpLydnZwcHTz8QxMSEnJLgDL9U6dNnQ6Sio4PDAgICA+PTU'. + 'zNzSkph8hADIxKS46Pj0tKTc3MLSksqWrtmQySAjuDIT8rKy0r'. + 'Kz+vtLSmur6jb9JUIJgGdjxDQUVRUVFpaUVNQ1NrZ9+kKVOmTZ'. + 'k6vR0sldJUAwQNTU2dnX0TgOJTQLrSIYFY2dPW1NbW2TNxwtQp'. + 'U6ZMmjJt2rRGWNB3TO7vnzh5MsgSoB6gy7sREdY7bRrQEDAGOb'. + 'wXOQW0TJsOEpwClmxBTTbZ7UDVIPkp7dkYaYqhuLa5trYYUxwL'. + 'AADzm6uekAAcXAAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bl_bluegreen.png +//========================================================== + $this->imgdata_large[1][0]= 1368 ; + $this->imgdata_large[1][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. + 'B3RJTUUH0wMMFi8hE9b2uAAABOVJREFUeNq9lk2sJFUVx3+3qv'. + 'tW95t57zFvhiFxmCFRUJRoNCQiJARMhiFx/Igxii5goTG6ZDAu'. + '/EhcSCIrTAgLEiKsJ8ywABNZEMJXEDYCukAmjgjzBkK/j35V1d'. + '333FtV97io97pfzwxfG86qcu/N+Z3zP+fcW/Apmfk4hx57+R/6'. + 'Rqmc9ykhsWjlsUngAA1fXIQ7b73pI/186IGHnn9dH/8frC8v4I'. + 'PiG53uaerR4GmKkv31mB8cyfjd946ZTwR66qVX9OTWIi8UKUv9'. + 'BOrZXpYZvFeiBvzI0fgSUSFKwbVG+Pl1V3HH0VvNR4KeeukV/f'. + 'PmMmdHhst76aXD64AbeVQ9bjNHaiGOC2o3wLrAb2/4LL/84ffn'. + 'fCdzkOdayKpLppBemrBsU5Y1Zdmm9LJdGU6E/t4M24Q26jRDRL'. + 'j3mdc49cSTekFsMzs5XuTsyLDUNSDQ25NwKOly9YIl22MYhJr/'. + 'uoDtBBoT0CxBRGYOAhibIaOCe//2MpfM6KHnX9cXipSlbkKWmS'. + 'nk9iv38J0jixw7vJfrTMYBOvhSoQHJBS09ANELloAGDxW8tfoW'. + 'J+5/UC8CPS0LU7r3SpYarr7M8rmFjMPLXT6/33L4si7Z2GCrQC'. + '+0ctlOaNs9DReV8vSLr85ndPLpZ/WNvHW+01kAVFBOGvJx0wYg'. + 'Sp47RIQ4Emwa8FGJXlDxSCFo5YlVgAo2hwPue/hRndboTV3EW2'. + 'Wp3k6wBp8q56QiWzecW6vwQfnPRkAWhFgILnq08jQ+R2nlUzzN'. + 'uES9Q7Vd+9fba7NmWJW61db2247qACmcjxXr45psYphsFGSLBu'. + 'kIajxqtjNwHkvAjQt0sg3crhPA2+fPz0CuyNFOghsGsr19mnFg'. + 'DGwrRm8UoAtNmQPQtRXDgdC4HImCFEKcCE0oieUWUYq2LtbiGp'. + 'mBQmppfIkjw45DK0QNNkvQ0jMBtPL0UnDRM1rN+cxKwzvOo2NP'. + 'tykR9a1kfpZNDLMG6QDYJqCTBvUe1+uxs+YKyPoGrTwY2HhvC4'. + 'CDWQd5d4xNApNQEEMgjgLdUCLBQ5cprL/trwNwKG2IUmDqDFd5'. + 'sr5BWrlxuSdLDFEFlqAzXGc4zFjupqh6uqYihpxJcEgp026l2w'. + '7wFUv7Z6AvrfRo/n0OYzPwIKE3HUKAJg2otMBiElnsF7wngis9'. + '3ZDjNnLi7huCWUZfueZKTu/M0V3HvmkOFDVxVKDG04ScejSgW5'. + 'V0q5JYFEghuDLHlTmToqDeGOCKIVtrW9hsdmXufEcNLPSXuPHa'. + 'a+bvuh9df5AH/v5PDFmbWQC3Mx+TVvfGVTRB2CodNgT2JBX003'. + 'aANZAYS/BxCv32TV/l2C03G7jgmfjGiT/qmeEmibEYm7XzAO2k'. + 'A+pbgHhBgydqu54YO5eRiLCy7yDvPP6Xqf+5Z+Lu277OYuOpiw'. + 'H15oBmlNOMcmK5RbP+PrEscGU+DSAxdg4CICIkxnLP8aNz63Og'. + 'H3/rdvOb795GVhuaYo0oBc3GGrEsUPVTwO6a7LYd+X51x3Hu/t'. + 'lP5tS65FN+6okn9U+n/sqb596dTvhOF+02myXTmkQNrOw7yD3H'. + 'j14E+UDQjp24/0E9/eKrbA4HH3aMK1b2ccvXvswjv//1J/s5ud'. + 'Due/hRPfP+OmfOrk7vrn7a48ihA3zh8CH+8Iuffiw/n4r9H1ZZ'. + '0zz7G56hAAAAAElFTkSuQmCC' ; + +//========================================================== +// File: bl_yellow.png +//========================================================== + $this->imgdata_large[2][0]= 1101 ; + $this->imgdata_large[2][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAB2l'. + 'BMVEX//////////+///+f//9b//8b//73//7X//63//6X//5T/'. + '/4z//4T//3P//2v//1r//0r//0L//zH//yn//yH//xj//xD//w'. + 'j//wD/90L/9zn/9zH/9xj/9xD/9wj/9wD39yn37zn37zH37yH3'. + '7xD37wj37wDv70Lv50rv50Lv5znv5yHv5xjv5wjv5wDn51Ln5x'. + 'Dn3jHn3iHn3hjn3hDn3gje3oze3nPe3lLe1oze1nPe1lLe1ine'. + '1iHe1hje1hDe1gje1gDW1qXW1mvWzqXWzkLWzhjWzhDWzgjWzg'. + 'DOzrXOzq3OzpzOzgDOxkrOxinOxhjOxhDOxgjOxgDGxqXGxnvG'. + 'xmvGvRjGvRDGvQjGvQDFxbnAvr6/v7+9vaW9vZS9vQi9vQC9tR'. + 'C9tQi9tQC7u7W1tZS1tXu1tTG1tQi1rRC1rQi1rQCtrYytrSGt'. + 'rQitrQCtpYStpSGtpQitpQClpYSlpXulpQClnBClnAilnACcnG'. + 'ucnAicnACclAiclACUlFqUlCmUlAiUlACUjFKUjAiUjACMjFKM'. + 'jEqMjACMhACEhACEewB7ezF7exB7ewB7cwBzcylzcwBzaxBzaw'. + 'BraxhrawhrawBrYxBrYwBjYwBjWgBaWgBaUgCXBwRMAAAAAXRS'. + 'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'. + 'LdfvwAAAAHdElNRQfTAwkRFBKiJZ4hAAAB7ElEQVR4nI3S+1vS'. + 'UBgHcB67WJmIMWAVdDHEDLBC6Go0slj3Ft0m9RRBWQEmFZFDEM'. + 'Qgt0EMFBY7p/+198hj1kM/9N1+++x73rOd6XT/kStnTx4fPzd9'. + 'uwfOjFhomj7smAhwj/6Cm2O0xUwy6g7cCL99uCW3jtBmE7lsdr'. + 'fvejgpzP7uEDFRRoqy2k8xQPnypo2BUMP6waF9Vpf3ciiSzErL'. + 'XTkPc0zDe3bsHDAcc00yoVgqL3UWN2iENpspff+2vn6D0+NnZ9'. + '6lC5K6RuSqBTZn1O/a3rd7v/MSez+WyIpVFX8GuuCA9SjD4N6B'. + 'oRNTfo5PCAVR0fBXoIuOQzab1XjwwNHx00GOj8/nKtV1DdeArk'. + '24R+0ul9PjmbrHPYl+EipyU0OoQSjg8/m83kl/MMhx0fjCkqio'. + 'SMOE7t4JMAzDsizH81AqSdW2hroLPg4/CEF4PhKNx98vlevrbY'. + 'QQXgV6kXwVfjkTiSXmhYVcSa7DIE1DOENe7GM6lUym0l+EXKks'. + 'K20VAeH2M0JvVgrZfL5Qqkiy0lRVaMBd7H7EZUmsiJJcrTdVja'. + 'wGpdbTLj3/3qwrUOjAfGgg4LnNA5tdQx14Hm00QFBm65hfNzAm'. + '+yIFhFtzuj+z2MI/MQn6Uez5pz4Ua41G7VumB/6RX4zMr1TKBr'. + 'SXAAAAAElFTkSuQmCC' ; + +//========================================================== +// File: bl_silver.png +//========================================================== + $this->imgdata_large[3][0]= 1481 ; + $this->imgdata_large[3][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAADAF'. + 'BMVEUAAADOzs7Gxsa9vb21tbXOxsbOzsbGzsb3///O1ta1vb2c'. + 'paVSWlpKWlpSY2ve5+97hIze7/9aY2vO5/9zhJRaa3tSY3PGzt'. + 'aMlJxrc3tja3NKUlpCSlK1vcZze4RSWmPW5/+Upb3G3v9zhJxS'. + 'Y3t7jKVaa4TO3veltc6ElK1re5Rjc4ycpbV7hJRaY3M5QlLn7/'. + '/Gzt6lrb2EjJzO3v9ja3vG1ve9zu+1xueltdacrc6UpcaMnL1C'. + 'SlqElLV7jK1zhKVre5zW3u/O1ue1vc6ttcaMlKVze4xrc4RSWm'. + 'tKUmPG1v+9zve1xu+tveeltd6crdbe5/+9xt6cpb17hJxaY3s5'. + 'QlrW3vfO1u/Gzue1vdattc6lrcaUnLWMlK2EjKVze5Rrc4xja4'. + 'RSWnNKUmtCSmO9xuecpcZ7hKVaY4TW3v/O1vfGzu+1vd6ttdal'. + 'rc69xu+UnL2MlLWEjK1ze5xrc5R7hK1ja4zO1v+1veettd6lrd'. + 'aMlL3Gzv/39//W1t7Gxs61tb29vcatrbWlpa2cnKWUlJyEhIx7'. + 'e4TW1ufGxta1tcZSUlqcnK3W1u+UlKW9vda1tc57e4ytrcalpb'. + '1ra3vOzu9jY3OUlK29vd6MjKWEhJxaWmtSUmNzc4xKSlpjY3tK'. + 'SmNCQlqUjJzOxs7///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'. + 'AAAAAAAAAAAAAAAAAAAAAAAAD///9fnkWVAAAAAnRSTlP/AOW3'. + 'MEoAAAABYktHRP+lB/LFAAAACXBIWXMAAABFAAAARQBP+QatAA'. + 'AB/klEQVR42mNgxAsYqCdd3+lcb4hLmj8wMMvEu8DCMqYbU9op'. + 'UEFB2MTb26eyysomFl06XEEhUCHLpAKo2z/fujikEUVaXUFBMB'. + 'BouLePuV+VVWGRciIXknSEsImCQd3//xwmPr65llaFcSFJHkjS'. + '3iYmWUDZ//8NfCr989NjNUMSUyTg0jneSiaCINn/gmlVQM12qg'. + 'lJnp5waTMTE5NAkCyHWZW/lXWNfUlikmdYK0zax7siS4EDKJtd'. + 'mQeU1XRwLBdLkRGASucWmGVnZ4dnhZvn5lmm29iVOWpnJqcuko'. + 'JKR1Wm5eTkRKYF5eblp9sU2ZeUJiV7zbfVg0pH56UFBQXNjIqK'. + 'jgkujItX1koKTVmYajsdKu2qETVhwgSXiUDZ2Bn9xqUeoZ5e0t'. + 'LzYYZ3B092ndjtOnmKTmycW1s7SHa+l5dtB8zlccE6RlN0dGbM'. + 'mDVbd5KupNBcL6+F82XgHouLj5vRP2PWLGNdd4+ppnxe8tJec6'. + 'XnNsKkm0uVQ5RDRHQTPTym68nPlZbvkfYCexsa5rpJ2qXa5Umm'. + 'ocmec3m8vHjmSs+fgxyhC5JDQ8WSPT2lvbzm8vDIe0nbtiBLN8'. + '8BigNdu1B6Lsje+fPbUFMLi5TMfGmvHi/puUAv23q2YCTFNqH5'. + 'MvPnSwPh3HasCbm3XUpv+nS5VtrkEkwAANSTpGHdye9PAAAASn'. + 'RFWHRzaWduYXR1cmUANGJkODkyYmE4MWZhNTk4MTIyNDJjNjUx'. + 'NzZhY2UxMDAzOGFhZjdhZWIyNzliNTM2ZGFmZDlkM2RiNDU3Zm'. + 'NlNT9CliMAAAAASUVORK5CYII=' ; + +//========================================================== +// File: bl_purple.png +//========================================================== + $this->imgdata_large[4][0]= 1149 ; + $this->imgdata_large[4][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAACAV'. + 'BMVEX/////////7///5///1v//xv//rf//pf//lP//jP//hP//'. + 'c///a///Wv//Wvf/Uv//Sv//Qv//Qvf/Off/Mf//Kf//If//If'. + 'f/GP//GPf/EP//EPf/CP//CPf/CO//AP//APf3Oe/3Kff3Ke/3'. + 'Ie/3GO/3EO/3AO/vSu/vSufvOefvMefvIefvGOfvEOfvCOfvAO'. + 'fnUufnSufnMd7nId7nGN7nGNbnEN7nCN7nAN7ejN7ejNbec97e'. + 'c9beUtbeQtbeIdbeGNbeENbeCNbeANbWpdbWa9bWQs7WGM7WEM'. + '7WCM7WAM7Otc7Orc7OnM7OSsbOIb3OGMbOEMbOCMbOAM7OAMbG'. + 'pcbGnMbGe8bGa8bGKbXGEL3GCL3GAL3FucXBu73AvsC/v7+9pb'. + '29Ka29GLW9ELW9CLW9AL29ALW5rrm1lLW1e7W1MbW1GKW1EK21'. + 'CLW1CK21AK2tjK2thKWtMaWtIaWtGJytCK2tCKWtAK2tAKWlhK'. + 'Wle6WlEJylCJylAKWlAJyca5ycGJScEJScCJScAJycAJSUWpSU'. + 'UoyUKZSUEIyUCIyUAJSUAIyMUoyMSoyMIYSMEISMCISMAIyMAI'. + 'SECHuEAISEAHt7MXt7EHt7CHt7AHt7AHNzKXNzEGtzAHNzAGtr'. + 'GGtrEGNrCGtrAGtrAGNjCFpjAGNjAFpaAFpaAFIpZn4bAAAAAX'. + 'RSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsS'. + 'AdLdfvwAAAAHdElNRQfTAwkRFB0ymoOwAAAB9UlEQVR4nGNgIA'. + 'K42hhqGtm5+WFIWClKycvLK6gbuARGoEj4aMjLSElISUir6Tt7'. + 'x+aEIWR8leQlwEBSTc/CK7awLguuR0lGQkJMVFRUTFJVzwko1d'. + 'oFk9OQl5IQE+Dh5hVR0TV3CkkvbJgyASJjDZIR5GBl5eRX0TH1'. + 'DEqrbJ2ypBEspSgvJSXKw8bMxMavbOLoGZNf1TZlybw4oIyfLN'. + 'BxotxsLEzsQiaOHkFpBQ2905esrAZK2SpIAaUEuDm5+LTNPAKj'. + 'C+pbps1evrIDKGWnLictKSkuLKyoZQyUya9o7Z2+YMXKGUApew'. + 'M9PTVdXR0TEwf3wOjUirruafOXL18xFyjl72Kpb25qaurg4REU'. + 'EFVe2zJ5zpLlK1aCpbydnZ2dnDwDA6NTopLLeiZNXbB8BcTAyP'. + 'TQ0JDg4KCY1NS83JKmiVOBepYvX9UPlAovzEiPSU/LLyior2vq'. + 'mjZr3vLlIF01IC+XVhUWFlZW1Lc290ycOGfxohVATSsXx4Oksn'. + 'vaWlsb2tq6J0+bM2/RohVA81asbIcEYueU3t7JU6ZNnwNyGkhm'. + '+cp5CRCppJnzZ8+ZM3/JUogECBbBIixr8Yqly8FCy8F6ltUgoj'. + 'lz7sqVK2ByK+cVMSCDxoUrwWDVysXt8WhJKqG4Y8bcuTP6qrGk'. + 'QwwAABiMu7T4HMi4AAAAAElFTkSuQmCC' ; + +//========================================================== +// File: bl_gray.png +//========================================================== + $this->imgdata_large[5][0]= 905 ; + $this->imgdata_large[5][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAABO1'. + 'BMVEX////////3///39/fv7+/e5+fW3t7Wzs7WxsbG1tbGzsbG'. + 'xsbDxMS/v7++wMC+v7+9zsa9xsa9vb29tbW9ra29pa24uLi1xs'. + 'a1vb21tbWxtrattbWmpqalra2cra2cpaWcnJycjIyUpaWUnJyU'. + 'lJSUjIyMnJyMnJSMlJSMlIyMjJSMjIyElJSElIyEjIyEhIR7jI'. + 'x7hIR7hHt7e3t7e3N7e2tzhIRze3tze3Nzc3Nre3trc3Nrc2tr'. + 'a2tjc3Njc2tja3Nja2tjY2NjWlpaa2taY2taY2NaY1paWlpaUl'. + 'JSY2NSY1pSWlpSWlJSUlJSUkpKWlpKWlJKUlpKUlJKUkpKSkpK'. + 'SkJCUlJCUkJCSkpCSkJCQkI5Sko5QkI5Qjk5OUI5OTkxQkIxOT'. + 'kxMTkxMTEpMTEhMTEhKSkYISEpy7AFAAAAAXRSTlMAQObYZgAA'. + 'AAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdE'. + 'lNRQfTAwkRFQfW40uLAAABx0lEQVR4nI3SbXfSMBQA4NV3nce5'. + 'TecAHUywRMHSgFuBCFsQUqwBS1OsWQh0GTj//y8wZUzdwQ/efM'. + 'tzcm/uuXdj4z9ic/PR9k4qk1qDnf0X2/uZzKt8GaRvSubg4LVp'. + 'mkWzCGAT/i3Zsm2XNQHLsm2n2937LaaNnGoJFAEo27B50qN0ay'. + 'Wg26lXsw8fP8nmzcJb2CbsnF5JmmCE8ncN404KvLfsYwd7/MdV'. + 'Pdgl/VbKMIzbuwVgVZw2JlSKJTVJ3609vWUY957lgAUd1KNcqr'. + 'yWnOcOPn8q7d5/8PywAqsOOiVDrn42NFk+HQ7dVuXNYeFdBTpN'. + 'nY5JdZl8xI5Y+HXYaTVqEDp1hAnRohZM03EUjMdhn5wghOoNnD'. + 'wSK7KiiDPqEtz+iD4ctdyAifNYzUnScBSxwPd6GLfRURW7Ay5i'. + 'pS5bmrY8348C5vvUI+TLiIVSJrVA0heK/GDkJxYMRoyfCSmk4s'. + 'uWc3yic/oBo4yF374LGQs5Xw0GyQljI8bYmEsxVUoKxa6HMpAT'. + 'vgyhU2mR8uU1pXmsa8ezqb6U4mwWF/5MeY8uLtQ0nmmQ8UWYvb'. + 'EcJaYWar7QhztrO5Wr4Q4hDbAG/4hfTAF2iCiWrCEAAAAASUVO'. + 'RK5CYII=' ; + +//========================================================== +// File: bl_brown.png +//========================================================== + $this->imgdata_large[6][0]= 1053 ; + $this->imgdata_large[6][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAABoV'. + 'BMVEX////Gzs7GvbXGrZTGpXu9nHO1nHO1nIy9taXGxs7GtaXO'. + 'nHPGlFrGjEq9hEq1hEqte0Klczmcazmce1KtnIzGxsbGvb3OlF'. + 'LOlFq9hFKte0qcc0KUYzGEWimMc1K9ta3OnGvOnGPWnGO9jFq9'. + 'jFKlc0KUazmMYzl7UilzUjGtpZzGxr3GnGPWpWvepXO1hFJ7Wj'. + 'FrSiFjUjG1ra3GnHPvxpT/5733zpythFKUa0KEYzlzUilaOSF7'. + 'Wjm9jErvvYz/99b///f/78bnrYS1hFqle0p7UjFrSiljQiFCMR'. + 'iMhHO9lGvGjFLWnGv/3q3////erXuthEqlc0paQiFKMRhSQin/'. + '1qX/997//++cc0pjSilaQilKORhCKRiclIy9pYzGlGPntYT33q'. + '3vvZSEWjlSOSE5KRB7c2O1lHutczmthFqte1JrWkqtjGtCKRBa'. + 'SjmljGuca0KMYzGMaznOztaclISUYzmEWjFKOSF7a1qEYzFaSi'. + 'GUjISEa0pKOSm9vb2llIxaQhg5IQiEc2tzY0paORilnJy1raVS'. + 'OSljUkJjWkKTpvQWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU'. + 'gAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkREiei'. + 'zP2EAAAB9UlEQVR4nGWS/VfSUBjHL5QluhhBxtwyWcCus5Blpm'. + 'wDC4ONaWXCyBi7RMZmpQ2Bypm9W/byV3cHHo/W88s95/s5z/d5'. + 'uwCcCh/4L3zAf+bs0NC588On9QAYGSUuBINk6GI4cmnsBLk8Go'. + '1SFEGMkzRzZeLq5JE8FvDHouw1lqXiCZJOcnCKnx4AcP0GBqmZ'. + 'mRgRT9MMB4Wbs7cGSXNRik3dnp9fiMUzNCNKgpzN9bsaWaQo9s'. + '7dfH7pXiFTZCBU1JK27LmtBO8TDx7mV1eXHqXXyiIUFLWiVzHx'. + 'BxcJIvV4/cn6wkqmWOOwmVE3UQOAp6HxRKL5bGPj+VwhUhalFq'. + '8alm5vAt+LlySZTsebzcKrraIIW4JqZC3N3ga+1+EQTZKZta1M'. + 'pCZCSeDViqVrThsEdsLJZLJYLpZrHVGScrKBvTQNtQHY6XIM02'. + 'E6Ik7odRW1Dzy3N28n3kGuB3tQagm7UMBFXI/sATAs7L5vdbEs'. + '8Lycm923NB0j5wMe6KOsKIIyxcuqauxbrmlqyEWfPmPy5assY1'. + 'U1SvWKZWom9nK/HfQ3+v2HYZSMStayTNN0PYKqg11P1nWsWq7u'. + '4gJeY8g9PLrddNXRdW8Iryv86I3ja/9s26gvukhDdvUQnIjlKr'. + 'IdZCNH+3Xw779qbG63f//ZOzb6C4+ofdbzERrSAAAAAElFTkSu'. + 'QmCC' ; + +//========================================================== +// File: bl_darkgreen.png +//========================================================== + $this->imgdata_large[7][0]= 1113 ; + $this->imgdata_large[7][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAB2l'. + 'BMVEX////////3///v///n/+/e99bW/+/W99bO786/v7++vr69'. + '/96999a7wb24vbu1/9a1zqW1u7itxrWosq6l772l1qWlxrWlxq'. + '2lva2cxpSU562U3q2UxqWUvaWUpZyM77WM57WMvYyMtZyMrZyM'. + 'pZSMnJSEvZyEtYyErZSElIx7zpR7xpx7xpR7vZR7jIRz1pRzxp'. + 'RzjIRrzpRrzoxrxoxrtYRrrYxrrXtrpYRrhHNjzoxjxoxjxoRj'. + 'vYRjtYRjrXtjpXtjlGNje2tazoxazoRaxoxaxoRavYRatYRatX'. + 'tarXtapXNanHNajFpae2tSzoRSxoRSvXtStXtSrXtSrXNSpXNS'. + 'nHNSnGtSlGtSlGNSjGtSjGNKvXtKtXNKrXNKpWtKnGtKlGNKjG'. + 'NKhGNKhFJKc1pKa1JCrWtCpWtCnGtClGNCjGNCjFpChFpCe1JC'. + 'a1JCY1I5pWs5nGM5lGM5jFo5hFo5e1o5c0o5WkoxjFoxhFoxhF'. + 'Ixe1Ixc1Ixc0oxa0ophFIpe0opc0opa0opa0IpY0IpWkIpWjkp'. + 'UkIpUjkhc0oha0IhY0IhWjkhWjEhUjkhUjEhSjEhSikhQjEhQi'. + 'kYWjkYSjEYSikYQjEYQikQSikQQikQQiEQOSExf8saAAAAAXRS'. + 'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'. + 'LdfvwAAAAHdElNRQfTAwkRFCaDkWqUAAAB+ElEQVR4nI3S+1vS'. + 'UBgHcGZlPV0ks/vFrmQWFimJjiwiYUJWjFBWFhClyZCy5hLrwA'. + 'x2EIwJC1w7zf2vnU0re+iHvs9++7x7zznvORbLf+TA6ct9fYMX'. + 'jrfAUYefpp+/iM1ykxf/lmuhUZ/PTwXC8dml5Wcd23o5H5Mk6b'. + '5NUU8icXbhS67rNzn9JDnguOEYGQtEEtwC+Crs3RJ76P5A/znr'. + 'vsNX7wQnEiwHCtK7TTkW8rvdZ9uJtvZTLkxpHhSrP66bNEj7/P'. + '3WNoLYeeSWQQCIpe9lQw7RNEU5rDsIYtcJ14Nocg7kRUlBNkxn'. + 'YmGKcp7cv3vPwR7XOJPmc0VYU3Sv0e9NOBAYG7Hbz/cMjTMveZ'. + 'CHkqxuTBv0PhYJB4N3XR6PJ5rMAPMnpGUxDX1IxSeMTEaZp1OZ'. + 'nGAIQiYtsalUIhFlmGTy3sO3AizJCKn6DKYryxzHsWyaneMzr6'. + 'cWxRVZVlFTe4SpE3zm+U/4+whyiwJcWVMQNr3XONirVWAklxcE'. + 'EdbqchPhjhVzGpeqhUKhWBQhLElr9fo3pDaQPrw5xOl1CGG1JE'. + 'k1uYEBIVkrb02+o6RItfq6rBhbw/tuINT96766KhuqYpY3UFPF'. + 'BbY/19yZ1XF1U0UNBa9T7rZsz80K0jWk6bpWGW55UzbvTHZ+3t'. + 'vbAv/IT+K1uCmhIrKJAAAAAElFTkSuQmCC' ; + +//========================================================== +// File: bl_green.png +//========================================================== + $this->imgdata_large[8][0]= 1484 ; + $this->imgdata_large[8][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. + 'B3RJTUUH0wMMFjM4kcoDJQAABVlJREFUeNq9ll2MJFUVx3/11V'. + 'Vd/TE9vU0v4zLDwJIF16jBqLAPhsRXEiDqg0QTJiQSjcSNvCzw'. + 'sBEDDxizhvAAxBgf1oR9QF9NiE9ESFZkQyZB5WtddmdnZ3qqqr'. + 'uqbt367Cofqu3ZZpWVaDzJfbkf53//55z/PVdZXV3l/2H6f7Lp'. + '5VdOV/4Nb+GmHpUeA7AdBNxc3kafNb73jRPK9Xwon8ToxVefqU'. + 'b91wibH5EkCQBCizFihTSviHUHR0hWws9xe3wvJ7/7nPKpgX5y'. + '9oFqt3eOgWniRBoAbUBGGqZUibSYaeoT2B5bnkdaSA6793Cv/S'. + 'QPPbihXBfo5VdOV+8dfgnvwAU62YH5fCZ12sDujFkwyegCqTrB'. + 'iUOKTOJKj8jr88jS8zy6cXwBTP048nuHX0I0nDlIp7RpTG7kM0'. + 'sdyAYsTVukUuWGhlWHMq0ITL92lnUp9R1Obz/GmTNnqn9bDD8/'. + '+0D1oX0O0zQZZDYCsK2j3Gl9jQqDfHiei8GfiKVLlsZkJaBAN1'. + '0i6PgwUbB0GxG5/PrtE/xLRr959Znqw9452oVNI+jiJhnr1pe4'. + 'k29zB1/nFr5Kj7tpt1YYhJ0FJ7nUYbcJQBgahN2MzeCP/OipR6'. + 'prgN6Qr6ELFQFUWoRpNVjlKwxZB8DCpE+PtfEKqV1cUzxpVudu'. + 'GTBHA5Y1g99e+dUio9O/P1Vpq+/WE5GGjDSMoAtAQjrf3C52IP'. + 'QxpY4WK2hpReka9Gfrhqgz0bACRoCWjDh56kQ1z9FeuUUQxVhK'. + 'B92sD1VahM+bAJgcoJhGjP/6Ln8rAgDiRCVRKiIzxMkkodBJ85'. + 'im1IlEHbE4k1xyNveL4YP8HarmGJIOpqyjeQmfNHmTvnqZTWBt'. + 'vIJXpPwlukJSuSTKGK3pEwtJmiX00ZlInTyNscImO6XBITvH1c'. + '8vVt2OucdKvIyeKRTNCivsEMgcpg6taYs30nfq0Gqg6hOSSFJ4'. + 'BSnJPht0IqEjWmOGocEI6F0J94F0qaL6BntTF0MtUfweKQKAPU'. + 'Wwp4OcVnQAmVb0p9DLOzjEhEKnGRmoRc7EzRGlwA6NujAKG4yP'. + '6Sjwc4aVznZ7DK0xXdkDoJf0kGmFBniFBOBGcZSCCSKd0IwN0k'. + 'IS+QZWCGVZex4BnUxya3+Zt9iugQbcRFpIAtuHvAZulPUdLhUJ'. + 'RqegI3WcqaSXddlT3idsWMSRRGkEtNwmyTifAwyBo7LP+11J0e'. + '7tM7pZOYblHkBLcqZ5LcYtw6Wbd4CM3SpE9foYZsIHoqDKCrbz'. + 'mLSQtPwmuhXgtBLs0GBdbXOhFGB7WBKO2F8GXt9/VO97Ya3atF'. + '7nUHnwGjGGQqcPxFEdFqURkEidiZszAERoYIsGju1hq21kWee3'. + 'bw15+8WpsvAy3K1+i3JkkhZyPpxxjjPOsfOYiZ+TFhLPzQnHOU'. + 'tpzGB2dgA4tscIkKIx19Cxg/fPL7vQJu47eXt1VvsDK8pwPueZ'. + 'PuZoQMOqhRoJHSs0kKLBWjvjYinmeQGw1TaX1RFdfZ3LMzYLjA'. + 'C++dkn6AaH2Nobk6cxEzdnuG0TdC8zvdJkN0hqkFkO/jwL0fxa'. + 'so8sBcuFzQ+/+MRC+BeAHnpwQzn++ee5KT9Eshuy46dcKAXm32'. + '0uzPQhS4GttkH2GQID2Wc0Y4LtAbDxhZ/x5A+e/uTG9+jGceXH'. + '9/ySnnIXnUzOxXe1038mW3ZynNmam4yYWkO+f9cv+Oljz16/lV'. + '9tDz/9nerc1hm8ZEScSRK7VvtYl1i1dklsOKyvc+zg/bzw1O8+'. + '/efkajt56kR1ydlEJBc5H46xzbrJ3dY9wrB7hGcff+6/+279L+'. + '0fHxyiE8XMLl4AAAAASUVORK5CYII=' ; + +//========================================================== +// File: bl_blue.png +//========================================================== + $this->imgdata_large[9][0]= 1169 ; + $this->imgdata_large[9][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAACEF'. + 'BMVEX/////////7//35//v1v/exv/Wvf/Wrf/Wpf/Orf+/v7+9'. + 'tc69jP+9hP+5ucW1tc6tlP+rq7Wlpdalpcalpb2cnM6cnMacc/'. + '+cWv+UlLWUjN6UjK2Uc/+Ma/+MUv+EhKWEa/+EQvd7e8Z7e7V7'. + 'e6V7c957Wv9za9Zza8ZzSv9ra5xrSv9rOf9rMe9jUudjQv9jOe'. + '9aWpRaUt5aUpRaSu9aSudSUoxSSs5SSoxSMf9KQtZKOfdKMedK'. + 'Kf9KKe9CKf9CKb1CKa1CIfdCIedCId45MXs5Kfc5If85Iec5Id'. + 'Y5GP8xMbUxMXsxKc4xKZQxIf8xGP8xGO8xGN4xGNYxGL0xGK0p'. + 'KXMpIYwpGP8pGO8pGOcpGNYpGM4pEP8pEPcpEOcpEN4pENYpEM'. + 'YpEL0hGKUhEP8hEPchEO8hEOchEN4hENYhEM4hEMYhELUhCP8h'. + 'CO8hCN4YGJwYGGsYEL0YEK0YEHMYCN4YCM4YCMYYCL0YCKUYAP'. + '8QEJQQEIwQEHsQEGsQCM4QCLUQCK0QCKUQCJwQCJQQCIwQCHMQ'. + 'CGsQAP8QAPcQAO8QAOcQAN4QANYQAM4QAMYQAL0QALUQAKUQAJ'. + 'QQAIQICGsICGMIAO8IANYIAL0IALUIAK0IAKUIAJwIAJQIAIwI'. + 'AIQIAHsIAHMIAGsIAGMAAN4AAMYAAK0AAJQAAIwAAIQAAHMAAG'. + 'sAAGMAAFrR1dDlAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkRFRPMOZ'. + '/2AAAB+klEQVR4nGNgIAIIqeqZmBqpi2JISNml5lVXV3d198Yo'. + 'oUjwm1SnxsbGRsSm5ZfNXO4tjCTjVh0ABhFx6QV9E1Y0S8JkuN'. + '3yAgLc7W3t/QPi4jPKJ8ye1yoIlTKpjvVy15eVUbN0i4zKLJ8w'. + 'ae6qcKgLqmMj3PUFWFl5NJ0CExLLJzbNW7BWCyxlXR0ba6/Axs'. + 'zELmfnkRBT0QiSKgXJCOflxUbYy3KyMHEoOrtEZ1c2TZ6/cMl6'. + 'eaCUamdsbIC7tjgPr4SBS3BMMVDTwkXr1hsDpYy6UmMj/O0tdX'. + 'QNbDxjknJLWqYsXLx0vStQynxGflpkZGCgs7Onp29SbtNkoMy6'. + 'pevCgFJWy3oyMuKjgoKCPWNCvEuqWhcsWrJ06XqQlPnMvrKyrM'. + 'TomJjkZAfHlNa2qdOWrlu63gcopbG8v7+hvLwip7g4JdSxsLZu'. + '8dKlS9ettwBKic2eNXHChIkTG5tKqgpr2uo6loLAehWQx0LnzJ'. + '49p6mpeXLLlNq6RUvqly6dvnR9Bx9ISnnlvLmT582bMr9t4aL2'. + '+vrp60GaDCGB6Ld6wfwFCxYCJZYsXQ+SmL6+FBryInVrFi1atH'. + 'jJkqVQsH6pNCzCJNvXrQW6CmQJREYFEc2CYevXrwMLAyXXl0oz'. + 'IAOt0vVQUGSIkabkDV3DwlzNVDAksAAAfUbNQRCwr88AAAAASU'. + 'VORK5CYII=' ; + +//========================================================== +// File: bs_red.png +//========================================================== + $this->imgdata_small[0][0]= 437 ; + $this->imgdata_small[0][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAk1'. + 'BMVEX////////GxsbGra3/xsbOhITWhIT/hIT/e3v/c3P/a2vG'. + 'UlK1SkrOUlL/Y2PWUlLGSkrnUlLeSkrnSkr/SkqEGBj/KSmlGB'. + 'jeGBjvGBj3GBj/EBD/CAj/AAD3AADvAADnAADeAADWAADOAADG'. + 'AAC9AAC1AACtAAClAACcAACUAACMAACEAAB7AABzAABrAABjAA'. + 'BuukXBAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. + 'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGDNEMgOYAAAAm0'. + 'lEQVR4nI3Q3RKCIBAFYGZMy9RKzX7MVUAUlQTe/+kS0K49d3wD'. + '7JlFaG+CvIR3FvzPXgpLatxevVVS+Jzv0BDGk/UJwOkQ1ph2g/'. + 'Ct5ACX4wNT1o/zzUoJUFUGBiGfVnDTYGJgmrWy8iKEtp0Bpd2d'. + 'jLGu56MB7f4JOOfDJAwoNwslk/jOUi+Jts6RVNrC1hkhPy50Ef'. + 'u79/ADQMQSGQ8bBywAAAAASUVORK5CYII=' ; + + +//========================================================== +// File: bs_lightblue.png +//========================================================== + $this->imgdata_small[1][0]= 657 ; + $this->imgdata_small[1][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABVl'. + 'BMVEX////////d///AwMC7wcS08P+y+P+xxdCwxM+uws2twMur'. + 'vsinzNynytylzuKhyN6e5v6d5P+d1fOcwNWcu8ub4f+at8iZ3v'. + '+ZvdGY2/yW2f+VscGU1vuT1fqTr72Sx+SSxeKR0fWRz/GPz/OP'. + 'rr+OyeqMy+6Myu2LyeyKxueJudSGw+SGorGDvt+Cvd6CvN2Aud'. + 'p+uNd+t9Z9tdV8tdR8tNN6sc94r813rct2q8h0qcZ0qMVzp8Rx'. + 'o8Bwor5tn7ptnrptnrlsnbhqmbRpmbNpi51ol7Flkqtkkqtkka'. + 'pjj6hijaRhjaZgi6NfiqJfiaFdh55bhJtag5pZgphYgJZYf5VX'. + 'cn9Ve5FSeI1RdopRdYlQdYlPc4dPcoZPcoVNcINLboBLbH9GZn'. + 'hGZXdFZHZEY3RDYnJCXW4/W2s/WWg+Wmo7VmU7VGM7U2E6VGM6'. + 'VGI5UV82T1wGxheQAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU'. + 'gAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGTok'. + '9Yp9AAAAtElEQVR4nGNgIBaw8wkpKghzwvksPAKiUsraprYiLF'. + 'ARXkE2JiZ1PXMHXzGIAIekOFBE08TGLTCOCyzCLyvDxsZqZOnk'. + 'E56kAhaRV9NQUjW2tPcMjs9wBYsY6Oobmlk7egRGpxZmgkW0zC'. + '2s7Jy9giKT8gohaiQcnVzc/UNjkrMLCyHmcHr7BYREJKTlFxbm'. + 'QOxiEIuKTUzJKgQCaZibpdOzQfwCOZibGRi4dcJyw3S4iQ4HAL'. + 'qvIlIAMH7YAAAAAElFTkSuQmCC' ; + +//========================================================== +// File: bs_gray.png +//========================================================== + $this->imgdata_small[2][0]= 550 ; + $this->imgdata_small[2][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAMAAADH72RtAAABI1'. + 'BMVEX///8AAAD8EAD8IAD8NAD8RAD8VAAYGBi/v7+goKCCgoJk'. + 'ZGRGRkb8yAD83AD87AD8/AD4+ADo+ADY+ADI+AC0+ACk+ACU+A'. + 'CE+AB0/ABk/ABU/ABE/AAw/AAg/AAQ/AAA/AAA+AAA6BAA2CAA'. + 'yDQAtEQApFQAlGQAhHQAdIgAZJgAVKgARLgAMMgAINwAEOwAAP'. + 'wAAPgIAPAQAOgYAOAkANgsANA0AMg8AMBEALhMALBUAKhcAKBo'. + 'AJhwAJB4AIiAAID////4+Pjy8vLs7Ozm5ubg4ODa2trT09PNzc'. + '3Hx8fBwcG7u7u1tbWurq6oqKiioqKcnJyWlpaQkJCJiYmDg4N9'. + 'fX13d3dxcXFra2tkZGReXl5YWFhSUlJMTExGRkZAQEA1BLn4AA'. + 'AAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIA'. + 'AAsSAdLdfvwAAAAHdElNRQfTAwkUGiIctEHoAAAAfElEQVR4nI'. + '2N2xKDIAwF+bZ2kAa8cNFosBD//yvKWGh9dN+yk9kjxH28R7ze'. + 'wzBOYSX6CaNB927Z9qZ66KTSNmBM7UU9Hx2c5qjmJaWCaV5j4t'. + 'o1ANr40sn5a+x4biElrqHgrXMeac/c1nEpFHG0LSFoo/jO/BeF'. + 'lJnFbT58ayUf0BpA8wAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bs_greenblue.png +//========================================================== + $this->imgdata_small[3][0]= 503 ; + $this->imgdata_small[3][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAxl'. + 'BMVEX///////+/v79znJQhSkJ7raU5hHtjraVKnJRCjIRClIyU'. + '9++E595avbVaxr2/v7+ctbWcvb17nJxrjIx7paUxQkK9//+Mvb'. + '17ra2Evb17tbVCY2MQGBiU5+ec9/eM5+d71tZanJxjra1rvb1j'. + 'tbVSnJxara1rzs5jxsZKlJRChIQpUlIhQkJatbVSpaU5c3MxY2'. + 'MYMTEQISFavb1Sra1KnJxCjIw5e3sxa2spWlpClJQhSkoYOTkp'. + 'Y2MhUlIQKSkIGBgQMTH+e30mAAAAAXRSTlMAQObYZgAAAAFiS0'. + 'dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfT'. + 'AwkUGTIqLgJPAAAAqklEQVR4nI2QVxOCMBCEM6Mi2OiCvSslJB'. + 'CUoqjn//9TYgCfubf9Zu9uZxFqO+rscO7b6l/LljMZX29J2pNr'. + 'YjmX4ZaIEs2NeiWO19NNacl8rHAyD4LR6jjw6PMRdTjZE0JOiU'. + 'dDv2ALTlzRvSdCCfAHGCc7yRPSrAQRQOWxKc3C/IUjBlDdUcM8'. + '97vFGwBY9QsZGBc/A4DWZNbeXIPWZEZI0c2lqSute/gCO9MXGY'. + '4/IOkAAAAASUVORK5CYII=' ; + +//========================================================== +// File: bs_yellow.png +//========================================================== + $this->imgdata_small[4][0]= 507 ; + $this->imgdata_small[4][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAzF'. + 'BMVEX///////+/v79zYwCMewDOxoTWzoTezkr/5wj/5wDnzgDe'. + 'xgC1pQCtnACllACcjACUhABjWgDGvVK1rUrOxlLGvUqEexilnB'. + 'jv3hj35xj/7wj/7wD35wDv3gDn1gDezgDWxgDOvQDGtQC9rQCE'. + 'ewB7cwBzawBrYwDWzlLn3lLe1krn3kre1hi9tQC1rQCtpQClnA'. + 'CclACUjACMhAD/9wC/v7///8bOzoT//4T//3v//3P//2v//2Pn'. + '50r//0r//yn39xj//xD//wBjYwDO8noaAAAAAXRSTlMAQObYZg'. + 'AAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAH'. + 'dElNRQfTAwkUGSDZl3MHAAAAqElEQVR4nI3QWRNDMBAA4My09E'. + 'IF1SME0VT1okXvM/3//6kEfbZv+81eswA0DfHxRpOV+M+zkDGG'. + 'rL63zCoJ2ef2RLZDIqNqYexyvFrY9ePkxGWdpvfzC7tEGtIRly'. + 'nqzboFKMlizAXbNnZyiFUKAy4bZ+B6W0lRaQDLmg4h/k7eFwDL'. + 'OWIky8qhXUBQ7gKGmsxpC+ah1TdriwByqG8GQNDNr6kLjf/wAx'. + 'KgEq+FpPbfAAAAAElFTkSuQmCC' ; + +//========================================================== +// File: bs_darkgray.png +//========================================================== + $this->imgdata_small[5][0]= 611 ; + $this->imgdata_small[5][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAABJl'. + 'BMVEX////////o8v/f6O7W4OnR3PXL1OTL0evEyLvCzePAwMC/'. + 'v7a8wsq7t7C1xum1vtS1q6GzopmyxeKsrsOqvNWoq7anvN+nsb'. + 'qhrcGgqbGfpq6cp7+bqMuVmJKRm7yPlKKMnL6FkKWFipOEkLSE'. + 'j6qEhoqAiaB+jqd8haF7hZR4iJt4g5l3hZl2gIt2cod1hJVzeY'. + 'VzboJvhp9sfJJsb41peY1pd5xpdoVod4xndI5lcHxka4BjcYVg'. + 'Z3BfboFbb4lbZnZbYntaZ4laZYVZV3JYYWpXX3JWWm5VX4RVW2'. + 'NUYX9SXHxPWn5OVFxNWWtNVXVMVWFKV3xHUGZGU3dGTldFSlxE'. + 'Sk9ESXBCRlNBS3k/SGs/RU4+R1k9R2U6RFU2PUg0PEQxNU0ECL'. + 'QWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAA'. + 'CxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGQmbJetrAAAAtklEQV'. + 'R4nGNgwAK4JZTNNOWlYDxhMT4ZDTOzQE1uMF9CiJWVU0LbxDlS'. + 'G8QVF+FnZ2KRNHAIiPUHaZGSlmZj5lH19A1KjLUA8lXU5MWllF'. + 'yjo30TYr2BfG19G11b37CEeN84H38gX1HbwTUkOjo+zjfG3hLI'. + 'l1exCvCNCwnxjfMz0gTyRdXNHXx9fUNCQu2MwU6SN3ZwD42LCH'. + 'W30IK4T8vUJSAkNMhDiwPqYiktXWN9JZj7UQAAjWEfhlG+kScA'. + 'AAAASUVORK5CYII=' ; + + +//========================================================== +// File: bs_darkgreen.png +//========================================================== + $this->imgdata_small[6][0]= 666 ; + $this->imgdata_small[6][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABX1'. + 'BMVEX////////l/+nAwMC86r+8wb28wby8wLy78sCzw7SywrSx'. + 'wLKwvrGuvK+syK+ryq2rx62n36ym3aumxKmk2qij0Keh16ahva'. + 'Og1aSguKKe06KeuaCetZ+d0KGdtZ+bz6Cay56ZyZ2Zwp2Zr5qZ'. + 'rpqYwJuXyZuXrJmVw5mUxZiTxJeTw5eTq5WRwJWPtJKOvZKKuI'. + '6Kt42Kn4yJt42ItIuGsomFsYmEsIiEr4eDr4eBrIR/qoN+qIJ8'. + 'poB7pH56o356on14nnt2nXl0mndzmnZzmXZymHVwlXNvlHJukn'. + 'FtiHBqjm1qjW1oi2toiWpniWplh2hlhmdkhWdig2VggGNgf2Je'. + 'fmFdfGBde19bbl1aeFxXdFpWclhVclhVcVdUcFZTb1VSbVRQal'. + 'JPaVFKY0xKYkxJYUtIYEpHX0lEWkZCWERCV0NCVkM/U0A+U0A+'. + 'UUA+UEA9Uj89UT48Tj45TDvewfrHAAAAAXRSTlMAQObYZgAAAA'. + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. + 'RQfTAwkUGRjxlcuZAAAAtElEQVR4nGNgIBZw8osqqIpzw/msfI'. + 'IiUmr6lo6SbFARASEOJiYtQ2uXADmIAJeEGFBE18LBMySBBywi'. + 'LC/LwcFiZuvmH5WiAxZR0tRW1DC3dfYJS8zyAouYGBibWtm7+o'. + 'TEpZfkgEX0rG3snNx9Q2NSCksgaqRd3Ty8gyLiU/NKSiDmcPsF'. + 'BodHJ2UUlZTkQ+xikIlNSE7LLgECZagL2VQyc0H8YnV2uD94jS'. + 'ILIo14iQ4HALarJBNwbJVNAAAAAElFTkSuQmCC' ; + +//========================================================== +// File: bs_purple.png +//========================================================== + $this->imgdata_small[7][0]= 447 ; + $this->imgdata_small[7][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAnF'. + 'BMVEX///////+/v7/Gvca9rb3Grcb/xv+1hLWte629hL21e7XG'. + 'hMbWhNbOe87We9b/hP//e/97OXv/c///a///Y/+cOZz/Sv/WOd'. + 'bnOefvOe//Kf9jCGNrCGv/EP//CP/nCOf/AP/3APfvAO/nAOfe'. + 'AN7WANbOAM7GAMa9AL21ALWtAK2lAKWcAJyUAJSMAIyEAIR7AH'. + 'tzAHNrAGtjAGPP1sZnAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'. + 'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGS'. + 'o5QpoZAAAAnElEQVR4nI3Q2xJDMBAG4MyQokWrZz3oSkJISJH3'. + 'f7dK0Gv/Xb7J7vyzCK0NjtPsHuH/2wlhTE7LnTNLCO/TFQjjIp'. + 'hHAA6bY06LSqppMAY47x+04HXTba2kAFlmQKr+YuVDCGUG2k6/'. + 'rNwYK8rKwKCnPxHnVS0aA3rag4UQslUGhrlk0Kpv1+sx3tLZ6w'. + 'dtYemMkOsnz8R3V9/hB87DEu2Wos5+AAAAAElFTkSuQmCC' ; + + +//========================================================== +// File: bs_brown.png +//========================================================== + $this->imgdata_small[8][0]= 677 ; + $this->imgdata_small[8][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABaF'. + 'BMVEX//////////8X/3oD/3nj/1HX/0Gr/xGP/rkv/gBf+iS/2'. + 'bAL1agDxaQDuZwDrZwLpZQDmZQLlZADjcx7gZATeYQDdZgraXw'. + 'DZXwHYXgDXiEvXZAvUjlfUXwXTjVfTbR7ShUvRbR7RWwDMWQDL'. + 'WADKooLKWADJoYLJgkvHWATGoILFn4LFgEvFVgDEZx7EVQDDt6'. + '/DVQDCt6/CnoLChlfCVADAwMC+hFe+UgC8UgC6UQC4gVe4UAC3'. + 'gVe3UAC1gFe1eUu1TwC1TgCzTgCwTQKuTACrSgCqSgCpSgCpSQ'. + 'CodEulSACkRwCiRgCdRACcRACaQwCYQgCWQgKVQQCVQACUQACS'. + 'UR6RPwCOPgCNPQCLPACKPACJOwCEOQCBOAB+NwB9NgB8NgB7NQ'. + 'B6NwJ4NAB3RR52MwB0MgBuLwBtLwBsLwBqLgBpLQBkLQJiKgBh'. + 'KgBgKwRcKABbKQJbJwBaKQRaJwBYKAJVJQDZvdIYAAAAAXRSTl'. + 'MAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLd'. + 'fvwAAAAHdElNRQfTAwkUGho0tvl2AAAAtklEQVR4nGNgIBaoSg'. + 'mLKGpowfkGMty8AqJKpi4mRlAROR5ONg4JFUv3YHOIgDo/HwsT'. + 'q6yps29EsjZYREFIkJ2ZS9/OMzA20wEsIi8uKSZtaOPmH5WSFw'. + 'YW0VRW07Vw8vCLSMguLwCL6FlaObp6B0TGZxSXQ9TouHv6+IXG'. + 'JGYWlpdDzNEKCgmPjkvLKS0vL4LYxWAen5SelV8OBNZQFxrZ5h'. + 'aC+GX2MDczMBh7pZakehkTHQ4AA0Am/jsB5gkAAAAASUVORK5C'. + 'YII=' ; + +//========================================================== +// File: bs_blue.png +//========================================================== + $this->imgdata_small[9][0]= 436 ; + $this->imgdata_small[9][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAk1'. + 'BMVEX///////+/v7+trcbGxv+EhM6EhNaEhP97e/9zc/9ra/9S'. + 'UsZKSrVSUs5jY/9SUtZKSsZSUudKSt5KSudKSv8YGIQpKf8YGK'. + 'UYGN4YGO8YGPcQEP8ICP8AAP8AAPcAAO8AAOcAAN4AANYAAM4A'. + 'AMYAAL0AALUAAK0AAKUAAJwAAJQAAIwAAIQAAHsAAHMAAGsAAG'. + 'ONFkFbAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. + 'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGhNNakHSAAAAmk'. + 'lEQVR4nI3P2xKCIBAGYGfM6SBWo1nauIqogaDA+z9dK9Lhrv47'. + 'vtl/2A2CfxNlJRRp9IETYGraJeEb7ocLNKznia8A7Db7umWDUG'. + 'sxAzhurxRHxok4KQGqCuEhlL45oU1D2w5BztY4KRhj/bCAsetM'. + '2uObjwvY8/oX50JItYDxSyZSTrO2mNhvGMbaWAevnbFIcpuTr7'. + 't+5AkyfBIKSJHdSQAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bs_green.png +//========================================================== + $this->imgdata_small[10][0]= 452 ; + $this->imgdata_small[10][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAn1'. + 'BMVEX///////+/v7+/v7/G/8aUxpSMvYyUzpSMzoyM1oxarVqE'. + '/4R7/3tavVpKnEpaxlpz/3Nr/2tKtUpj/2Na51pKzkpK1kpK50'. + 'pK/0oYcxgp/ykYlBgY3hgY7xgY9xgQ/xAI/wgA/wAA9wAA7wAA'. + '5wAA3gAA1gAAzgAAxgAAvQAAtQAArQAApQAAnAAAlAAAjAAAhA'. + 'AAewAAcwAAawAAYwA0tyxUAAAAAXRSTlMAQObYZgAAAAFiS0dE'. + 'AIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAw'. + 'kUGgW5vvSDAAAAnklEQVR4nI3QSxKCMAwA0M4gqCgoiiJ+kEAL'. + 'LQUq0PufzX7ENdnlJZNkgtDS2CYZvK6bf+7EoKLA9cH5SQzv6A'. + 'YloTywsAbYr44FrlgrXCMJwHl3xxVtuuFkJAPIcw2tGB9GcFli'. + 'oqEf5GTkSUhVMw2TtD0XSlnDOw3SznE5520vNEi7CwW9+Ayjyq'. + 'U/3+yPuq5gvhkhL0xlGnqL//AFf14UIh4mkEkAAAAASUVORK5C'. + 'YII=' ; + + +//========================================================== +// File: bs_white.png +//========================================================== + $this->imgdata_small[11][0]= 480 ; + $this->imgdata_small[11][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAAQCAYAAADwMZRfAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. + 'B3RJTUUH0wMLFTsY/ewvBQAAAW1JREFUeJytkz2u4jAUhT/jic'. + 'gfBUKiZhE0bIKeVbCWrIKenp6eDiGlCEEEBArIxvzGU4xeZjLk'. + 'jWb05lRXuvbx+exr4bouX1Xjyw7Atz81F4uFBYjjGIDhcCjq1o'. + 'k6nN1uZwFerxfP55Msy1itVmRZBsB4PK6YveHkeW5d18XzPIIg'. + 'wPd9Wq0WnU6HMAxJkoQoiuynOIfDwUopkVIihKAoCgAcx6Hdbm'. + 'OMIU1T5vN55eBKEikljUYDIX6kFUKU9e8aDAZlmjcca+1b7TgO'. + '1+uVy+VS9nzfr8e53++VzdZaiqIgz3OMMWitOZ/PaK0JgqDeRC'. + 'mF53lIKYGfr3O73TDGoJQiTVO01nS73XqT4/FIs9kkCAIej0eZ'. + 'brPZEMcxSZKgtQZgMpmIWpN+vy+m06n1PK9yTx8Gy+WS/X5Pr9'. + 'er9GuHLYoiG4YhSilOpxPr9Zrtdlti/JriU5MPjUYjq7UuEWaz'. + '2d+P/b/qv/zi75oetJcv7QQXAAAAAElFTkSuQmCC' ; + + +//========================================================== +// File: bs_cyan.png +//========================================================== + $this->imgdata_small[12][0]= 633 ; + $this->imgdata_small[12][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAABPl'. + 'BMVEX////////F///AwMCvxsaC1NSC0dGCz8+CzMyA//94//91'. + '//9q//9j//9X4uJX09NXz89Xx8dXxMRL//9L5uZL3d1L2NhLxs'. + 'ZLt7cv//8e9fUe8fEe7u4e398epqYehoYX//8L+PgK//8F9fUE'. + '/v4E5+cEb28EZ2cC//8C/v4C/f0CzMwCrq4Cjo4CdXUCaWkCZW'. + 'UB/PwA//8A/f0A+/sA8/MA7e0A7OwA6+sA5eUA5OQA4uIA4eEA'. + '3NwA2toA2NgA1dUA09MA0tIA0NAAysoAxsYAxcUAxMQAv78Avr'. + '4AvLwAtrYAtbUAs7MAsLAAra0Aq6sAqKgApaUApKQAoqIAoKAA'. + 'n58AmpoAlZUAk5MAkpIAkJAAj48AjIwAiYkAh4cAf38AfX0Ae3'. + 'sAenoAcnIAcHAAa2sAaWkAaGgAYmIUPEuTAAAAAXRSTlMAQObY'. + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. + 'AHdElNRQfTAwkUGQDi+VPPAAAAtElEQVR4nGNgIBawikipyIiy'. + 'wfksfJpGRkamNtr8LFARPiMFHmFDcztXfwGoFi0jLiZuZRtnry'. + 'BddrCIiJEGL6eklYO7X3iCOFhE2thESdHawdUnJDZFDiyiamZh'. + 'aevk5h0UlZSpBhaRtbN3dPHwDY5MSM+EqBFzc/f0DgiLTkjLzI'. + 'SYw6bjHxgaEZeckZmpD7GLQSAqJj4xNRMIBGFuFtRLA/ENhGBu'. + 'ZmDgkJBXl5fgIDocAAKcINaFePT4AAAAAElFTkSuQmCC' ; + +//========================================================== +// File: bs_bluegreen.png +//========================================================== + $this->imgdata_small[13][0]= 493 ; + $this->imgdata_small[13][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAvV'. + 'BMVEX///////+/v79j//855/8x3v851v9Spb1C1v8AOUqEtcZK'. + 'lK1StdYxzv8hxv8AY4QASmNSlK1KpcZKtd4YQlIYnM4YrecIvf'. + '8AtfcAre8AjL0AhLUAc5wAa5QAWnsAQloAKTkAGCFKhJxKrdYY'. + 'jL0Ypd4Atf8ArfcApecAnN4AlM4AjMYAe60Ac6UAY4wAUnNSnL'. + '0AlNYAWoQASmsAOVIAITGEtc4YWnsAUnsAMUqtvcaErcYAKUIA'. + 'GCkAECHUyVh/AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAA'. + 'AJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGxNUcXCT'. + 'AAAAqUlEQVR4nI2Q1xKCMBREM2NHLCCogAGCjd6SqLT8/2cZKT'. + '6zb3tm987OBWCsXoejp8rC35fi4+l6gXFZlD0Rz6fZ1tdDmKR9'. + 'RdOmkzmP7DDpilfX3SzvRgQ/Vr1uiZplfsCBiVf03RJd140wgj'. + 'kmNqMtuYXcxyYmNWJdRoYwzpM9qRvGujuCmSR7q7ARY00/MiWk'. + 'sCnjkobNEm1+HknDZgAqR0GKU43+wxdu2hYzbsHU6AAAAABJRU'. + '5ErkJggg==' ; + +//========================================================== +// File: bs_lightred.png +//========================================================== + $this->imgdata_small[14][0]= 532 ; + $this->imgdata_small[14][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAA3l'. + 'BMVEX///////+/v7/Gvb0hGBj/5///3v//zu//1u//xucpGCG9'. + 'nK21lKVSQkp7Wms5KTExISlaOUpjQlIhEBj/tdbOhKXnrcbGjK'. + 'Wla4TetcbGnK2EWmv/rc73pcZ7UmOcY3vOpbW1jJzenLW9e5Rz'. + 'Slq1c4xrQlJSOULGhJz/pcb3nL2chIzOnK33rcbelK3WjKWMWm'. + 'vGe5SEUmM5ISnOtb3GrbXerb3vpb2ca3v/rcaUY3POhJxCKTF7'. + 'SlrWnK21e4ytc4TvnLXnlK2la3taOUK1lJxrSlLGhJRjQkpSMT'. + 'lw+q2nAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. + 'cwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAwkUGjoP2Nm+AAAAr0'. + 'lEQVR4nGNgIBaYiOk62imYwPnMkiIyso76yhJSzFARMxkRNk49'. + 'a3t5OW6oFk1LVkYOfWUHKxUXiEYzLS12DnN3VXkjIRtFsIiSk5'. + '6evqGqhYGKugAfWMRa1FpD2UHeQEXQRlgALCJur+rgbCUNFOAS'. + 'hqjRkZe3MpBTcwEKCEPMMTGSs3Xz8OQHCnBBHckt6OJpIyAMBD'. + 'wwN/MYc4H4LK4wNzMwmGrzcvFqmxIdDgDiHRT6VVQkrAAAAABJ'. + 'RU5ErkJggg==' ; + +//========================================================== +// File: bxs_lightred.png +//========================================================== + $this->imgdata_xsmall[0][0]= 432 ; + $this->imgdata_xsmall[0][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAA3l'. + 'BMVEX///////+/v7/Gvb0hGBj/5///3v//zu//1u//xucpGCG9'. + 'nK21lKVSQkp7Wms5KTExISlaOUpjQlIhEBj/tdbOhKXnrcbGjK'. + 'Wla4TetcbGnK2EWmv/rc73pcZ7UmOcY3vOpbW1jJzenLW9e5Rz'. + 'Slq1c4xrQlJSOULGhJz/pcb3nL2chIzOnK33rcbelK3WjKWMWm'. + 'vGe5SEUmM5ISnOtb3GrbXerb3vpb2ca3v/rcaUY3POhJxCKTF7'. + 'SlrWnK21e4ytc4TvnLXnlK2la3taOUK1lJxrSlLGhJRjQkpSMT'. + 'lw+q2nAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. + 'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUKBOgGhWjAAAAS0'. + 'lEQVR4nGNgQAEmunYmEJaMCKe1vBxYzJKVQ9lKBSSupKdnaKGi'. + 'zgdkiqs6WKnYcIGYJnK2HvzCwmCNgi42wsLCECNMeXlNUY0HAL'. + 'DaB7Du8MiEAAAAAElFTkSuQmCC' ; + +//========================================================== +// File: bxs_bluegreen.png +//========================================================== + $this->imgdata_xsmall[1][0]= 397 ; + $this->imgdata_xsmall[1][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAvV'. + 'BMVEX///////+/v79j//855/8x3v851v9Spb1C1v8AOUqEtcZK'. + 'lK1StdYxzv8hxv8AY4QASmNSlK1KpcZKtd4YQlIYnM4YrecIvf'. + '8AtfcAre8AjL0AhLUAc5wAa5QAWnsAQloAKTkAGCFKhJxKrdYY'. + 'jL0Ypd4Atf8ArfcApecAnN4AlM4AjMYAe60Ac6UAY4wAUnNSnL'. + '0AlNYAWoQASmsAOVIAITGEtc4YWnsAUnsAMUqtvcaErcYAKUIA'. + 'GCkAECHUyVh/AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAA'. + 'AJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUKDVyF5Be'. + 'AAAASUlEQVR4nGNgQAFmYqJcEJaEOJ+UrD5YTJKFTZrfGCQuaq'. + 'glLWvMaQ5kqujo6hnbKIKYXPr68gp2dmCNJiZAlh3ECGsREWtU'. + '4wF1kwdpAHfnSwAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bxs_navy.png +//========================================================== + $this->imgdata_xsmall[2][0]= 353 ; + $this->imgdata_xsmall[2][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAk1'. + 'BMVEX///////+/v7+trcbGxv+EhM6EhNaEhP97e/9zc/9ra/9S'. + 'UsZKSrVSUs5jY/9SUtZKSsZSUudKSt5KSudKSv8YGIQpKf8YGK'. + 'UYGN4YGO8YGPcQEP8ICP8AAP8AAPcAAO8AAOcAAN4AANYAAM4A'. + 'AMYAAL0AALUAAK0AAKUAAJwAAJQAAIwAAIQAAHsAAHMAAGsAAG'. + 'ONFkFbAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. + 'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUJxXO4axZAAAAR0'. + 'lEQVR4nGNgQAGskhKsEJaslIi8ijpYTJaDU1FVAyQuKSujoKKh'. + 'LQ5kSigpqWro6oOYrOoaWroGBmCNWiCWAdQwUVFWVOMBOp4GCJ'. + 's5S60AAAAASUVORK5CYII=' ; + +//========================================================== +// File: bxs_gray.png +//========================================================== + $this->imgdata_xsmall[3][0]= 492 ; + $this->imgdata_xsmall[3][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABI1'. + 'BMVEX///8AAAD8EAD8IAD8NAD8RAD8VAAYGBi/v7+goKCCgoJk'. + 'ZGRGRkb8yAD83AD87AD8/AD4+ADo+ADY+ADI+AC0+ACk+ACU+A'. + 'CE+AB0/ABk/ABU/ABE/AAw/AAg/AAQ/AAA/AAA+AAA6BAA2CAA'. + 'yDQAtEQApFQAlGQAhHQAdIgAZJgAVKgARLgAMMgAINwAEOwAAP'. + 'wAAPgIAPAQAOgYAOAkANgsANA0AMg8AMBEALhMALBUAKhcAKBo'. + 'AJhwAJB4AIiAAID////4+Pjy8vLs7Ozm5ubg4ODa2trT09PNzc'. + '3Hx8fBwcG7u7u1tbWurq6oqKiioqKcnJyWlpaQkJCJiYmDg4N9'. + 'fX13d3dxcXFra2tkZGReXl5YWFhSUlJMTExGRkZAQEA1BLn4AA'. + 'AAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEA'. + 'AAsRAX9kX5EAAAAHdElNRQfTAwkUKC74clmyAAAAQklEQVR4nG'. + 'NgQAVBYVCGt5dXYEQ0mOnp5h4QFgVmeri6+4dHxYMVeHoFRUTH'. + 'gTUFBIZBWAwMkZEx8bFQM2Lj0UwHANc/DV6yq/BiAAAAAElFTk'. + 'SuQmCC' ; + +//========================================================== +// File: bxs_graypurple.png +//========================================================== + $this->imgdata_xsmall[4][0]= 542 ; + $this->imgdata_xsmall[4][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABSl'. + 'BMVEX////////11P/MqdvKrNfAwMC+u7+9u7+4rr24lsi3rby3'. + 'lMe1rLq1o720q7i0oL20ksSzoryyqbaykMGxlb2wkL+vnbiujb'. + '2sjLuri7qpl7GoirWoibenmK2mla6mjLKmhrSllauki7CjhrCj'. + 'hLGihLChg6+ggq2fkqadkKOcfqqai6Gag6WYe6WXeqSWeaOTd6'. + 'CTd5+Rdp6RdZ6RdZ2Qg5eOc5qMcpiLcZeJb5WIbpOHbZKGbJGE'. + 'a4+CaY2AZ4t/Z4p/Zop/Zol+Zol7ZIZ6Y4V5YoR1ZH11X391Xn'. + '9zXX1yXXtxXHtvWnluWXhsV3VqVnNpVXJoVHFnU3BmUm9jUGth'. + 'VGdgTmheTGZcS2RcSmRaSWJYR19XRl5SQllRQlhQQVdPQFZOP1'. + 'VLPlFJO09IPE5IOk5FOEtEN0lDOEpDOElDNklCNkc/M0XhbrfD'. + 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'. + 'EAAAsRAX9kX5EAAAAHdElNRQfTAwkUKCgREfyHAAAATUlEQVR4'. + 'nGNgQAEcIko8EBY3M5Ougy+IxSXMwmTsFsAHZMqrSRvZB0W7A5'. + 'k6FlYugXEZICaPr394Um4uSAFDRFRCbm4uxAihsDAhVOMBHT0L'. + 'hkeRpo8AAAAASUVORK5CYII=' ; + +//========================================================== +// File: bxs_red.png +//========================================================== + $this->imgdata_xsmall[5][0]= 357 ; + $this->imgdata_xsmall[5][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAk1'. + 'BMVEX////////GxsbGra3/xsbOhITWhIT/hIT/e3v/c3P/a2vG'. + 'UlK1SkrOUlL/Y2PWUlLGSkrnUlLeSkrnSkr/SkqEGBj/KSmlGB'. + 'jeGBjvGBj3GBj/EBD/CAj/AAD3AADvAADnAADeAADWAADOAADG'. + 'AAC9AAC1AACtAAClAACcAACUAACMAACEAAB7AABzAABrAABjAA'. + 'BuukXBAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZ'. + 'cwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUIyjy5SVMAAAAS0'. + 'lEQVR4nGNgQAFsUpJsEJastIi8ijpYTJaDU0FVgxXIlJKVUVDR'. + '0BYHMiUUlVQ1dPVBTDZ1dS1dAwOQAgYtbSDLAGIEq6goK6rxAD'. + 'yXBg73lwGUAAAAAElFTkSuQmCC' ; + +//========================================================== +// File: bxs_yellow.png +//========================================================== + $this->imgdata_xsmall[6][0]= 414 ; + $this->imgdata_xsmall[6][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAzF'. + 'BMVEX///////+/v79zYwCMewDOxoTWzoTezkr/5wj/5wDnzgDe'. + 'xgC1pQCtnACllACcjACUhABjWgDGvVK1rUrOxlLGvUqEexilnB'. + 'jv3hj35xj/7wj/7wD35wDv3gDn1gDezgDWxgDOvQDGtQC9rQCE'. + 'ewB7cwBzawBrYwDWzlLn3lLe1krn3kre1hi9tQC1rQCtpQClnA'. + 'CclACUjACMhAD/9wC/v7///8bOzoT//4T//3v//3P//2v//2Pn'. + '50r//0r//yn39xj//xD//wBjYwDO8noaAAAAAXRSTlMAQObYZg'. + 'AAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAH'. + 'dElNRQfTAwkUIzoBXFQEAAAAS0lEQVR4nGNgQAFsDhJsEJaTo5'. + '2skj5YzMnSSk7ZwBzIlOSUklPiMxYHMnW4FXT5VNVBTDZeXiNV'. + 'QUGQAgYBYyBLEGIEq5gYK6rxAH4kBmHBaMQQAAAAAElFTkSuQm'. + 'CC' ; + +//========================================================== +// File: bxs_greenblue.png +//========================================================== + $this->imgdata_xsmall[7][0]= 410 ; + $this->imgdata_xsmall[7][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAxl'. + 'BMVEX///////+/v79znJQhSkJ7raU5hHtjraVKnJRCjIRClIyU'. + '9++E595avbVaxr2/v7+ctbWcvb17nJxrjIx7paUxQkK9//+Mvb'. + '17ra2Evb17tbVCY2MQGBiU5+ec9/eM5+d71tZanJxjra1rvb1j'. + 'tbVSnJxara1rzs5jxsZKlJRChIQpUlIhQkJatbVSpaU5c3MxY2'. + 'MYMTEQISFavb1Sra1KnJxCjIw5e3sxa2spWlpClJQhSkoYOTkp'. + 'Y2MhUlIQKSkIGBgQMTH+e30mAAAAAXRSTlMAQObYZgAAAAFiS0'. + 'dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfT'. + 'AwkUJy5/6kV9AAAATUlEQVR4nGNgQAGCyuyCEJaGugKHviVYzF'. + 'hO3sxCWwDIVNLTM9PXtpEGMhW12Cy0DR1ATEFLSxZ7BweQAgYd'. + 'HUMHBweIEQKiogKoxgMAo/4H5AfSehsAAAAASUVORK5CYII=' ; + +//========================================================== +// File: bxs_purple.png +//========================================================== + $this->imgdata_xsmall[8][0]= 364 ; + $this->imgdata_xsmall[8][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAnF'. + 'BMVEX///////+/v7/Gvca9rb3Grcb/xv+1hLWte629hL21e7XG'. + 'hMbWhNbOe87We9b/hP//e/97OXv/c///a///Y/+cOZz/Sv/WOd'. + 'bnOefvOe//Kf9jCGNrCGv/EP//CP/nCOf/AP/3APfvAO/nAOfe'. + 'AN7WANbOAM7GAMa9AL21ALWtAK2lAKWcAJyUAJSMAIyEAIR7AH'. + 'tzAHNrAGtjAGPP1sZnAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'. + 'HUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUIj'. + 'mBTjT/AAAASUlEQVR4nGNgQAGskhKsEJaCrJiSuhZYTEFASFlD'. + 'GyQuqSCnrK6tJwpkiquoamgbGIGYrFpaugbGxmCNunpAljHECB'. + 'ZBQRZU4wFSMAZsXeM71AAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bxs_green.png +//========================================================== + $this->imgdata_xsmall[9][0]= 370 ; + $this->imgdata_xsmall[9][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAn1'. + 'BMVEX///////+/v7+/v7/G/8aUxpSMvYyUzpSMzoyM1oxarVqE'. + '/4R7/3tavVpKnEpaxlpz/3Nr/2tKtUpj/2Na51pKzkpK1kpK50'. + 'pK/0oYcxgp/ykYlBgY3hgY7xgY9xgQ/xAI/wgA/wAA9wAA7wAA'. + '5wAA3gAA1gAAzgAAxgAAvQAAtQAArQAApQAAnAAAlAAAjAAAhA'. + 'AAewAAcwAAawAAYwA0tyxUAAAAAXRSTlMAQObYZgAAAAFiS0dE'. + 'AIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAw'. + 'kUKBrZxq0HAAAATElEQVR4nGNgQAGccrIcEJaivISyhjaIxa7I'. + 'I6CiqcMKZMopKqho6OhLA5kyqmqaOobGICartraeoYkJSAGDnj'. + '6QZQIxgk1Skg3VeABlVgbItqEBUwAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bxs_darkgreen.png +//========================================================== + $this->imgdata_xsmall[10][0]= 563 ; + $this->imgdata_xsmall[10][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABX1'. + 'BMVEX////////l/+nAwMC86r+8wb28wby8wLy78sCzw7SywrSx'. + 'wLKwvrGuvK+syK+ryq2rx62n36ym3aumxKmk2qij0Keh16ahva'. + 'Og1aSguKKe06KeuaCetZ+d0KGdtZ+bz6Cay56ZyZ2Zwp2Zr5qZ'. + 'rpqYwJuXyZuXrJmVw5mUxZiTxJeTw5eTq5WRwJWPtJKOvZKKuI'. + '6Kt42Kn4yJt42ItIuGsomFsYmEsIiEr4eDr4eBrIR/qoN+qIJ8'. + 'poB7pH56o356on14nnt2nXl0mndzmnZzmXZymHVwlXNvlHJukn'. + 'FtiHBqjm1qjW1oi2toiWpniWplh2hlhmdkhWdig2VggGNgf2Je'. + 'fmFdfGBde19bbl1aeFxXdFpWclhVclhVcVdUcFZTb1VSbVRQal'. + 'JPaVFKY0xKYkxJYUtIYEpHX0lEWkZCWERCV0NCVkM/U0A+U0A+'. + 'UUA+UEA9Uj89UT48Tj45TDvewfrHAAAAAXRSTlMAQObYZgAAAA'. + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN'. + 'RQfTAwkUKCFozUQjAAAATUlEQVR4nGNgQAGcoqrcEJYQB5OhSw'. + 'CIxSXGwWThGcIDZCppK5o7hyV6AZl6NnbuoSmFICZ3YHB0RkkJ'. + 'SAFDbEJaSUkJxAjeyEheVOMBQj4MOEkWew4AAAAASUVORK5CYI'. + 'I=' ; + +//========================================================== +// File: bxs_cyan.png +//========================================================== + $this->imgdata_xsmall[11][0]= 530 ; + $this->imgdata_xsmall[11][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABPl'. + 'BMVEX////////F///AwMCvxsaC1NSC0dGCz8+CzMyA//94//91'. + '//9q//9j//9X4uJX09NXz89Xx8dXxMRL//9L5uZL3d1L2NhLxs'. + 'ZLt7cv//8e9fUe8fEe7u4e398epqYehoYX//8L+PgK//8F9fUE'. + '/v4E5+cEb28EZ2cC//8C/v4C/f0CzMwCrq4Cjo4CdXUCaWkCZW'. + 'UB/PwA//8A/f0A+/sA8/MA7e0A7OwA6+sA5eUA5OQA4uIA4eEA'. + '3NwA2toA2NgA1dUA09MA0tIA0NAAysoAxsYAxcUAxMQAv78Avr'. + '4AvLwAtrYAtbUAs7MAsLAAra0Aq6sAqKgApaUApKQAoqIAoKAA'. + 'n58AmpoAlZUAk5MAkpIAkJAAj48AjIwAiYkAh4cAf38AfX0Ae3'. + 'sAenoAcnIAcHAAa2sAaWkAaGgAYmIUPEuTAAAAAXRSTlMAQObY'. + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAA'. + 'AHdElNRQfTAwkUKQFKuFWqAAAATUlEQVR4nGNgQAGsUjJsEJaR'. + 'grC5qz9YzIiL28YriB3IlDZRsnYNiZUDMmXtHT2CE9JBTDb/wI'. + 'jkzEyQAoaomMTMzEyIERzy8hyoxgMAN2MLVPW0f4gAAAAASUVO'. + 'RK5CYII=' ; + +//========================================================== +// File: bxs_orange.png +//========================================================== + $this->imgdata_xsmall[12][0]= 572 ; + $this->imgdata_xsmall[12][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABaF'. + 'BMVEX//////////8X/3oD/3nj/1HX/0Gr/xGP/rkv/gBf+iS/2'. + 'bAL1agDxaQDuZwDrZwLpZQDmZQLlZADjcx7gZATeYQDdZgraXw'. + 'DZXwHYXgDXiEvXZAvUjlfUXwXTjVfTbR7ShUvRbR7RWwDMWQDL'. + 'WADKooLKWADJoYLJgkvHWATGoILFn4LFgEvFVgDEZx7EVQDDt6'. + '/DVQDCt6/CnoLChlfCVADAwMC+hFe+UgC8UgC6UQC4gVe4UAC3'. + 'gVe3UAC1gFe1eUu1TwC1TgCzTgCwTQKuTACrSgCqSgCpSgCpSQ'. + 'CodEulSACkRwCiRgCdRACcRACaQwCYQgCWQgKVQQCVQACUQACS'. + 'UR6RPwCOPgCNPQCLPACKPACJOwCEOQCBOAB+NwB9NgB8NgB7NQ'. + 'B6NwJ4NAB3RR52MwB0MgBuLwBtLwBsLwBqLgBpLQBkLQJiKgBh'. + 'KgBgKwRcKABbKQJbJwBaKQRaJwBYKAJVJQDZvdIYAAAAAXRSTl'. + 'MAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9k'. + 'X5EAAAAHdElNRQfTAwkUJBSSy88MAAAATUlEQVR4nGNgQAGqwo'. + 'paEBYPJ4eKezCIpc7HwmrqG6ENZMpLihm6RaWEAZl6Vo7ekRnF'. + 'IKZWSHhcTnk5SAFDfFJWeXk5xAjj1FRjVOMBeFwNcWYSLjsAAA'. + 'AASUVORK5CYII=' ; + +//========================================================== +// File: bxs_lightblue.png +//========================================================== + $this->imgdata_xsmall[13][0]= 554 ; + $this->imgdata_xsmall[13][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAABVl'. + 'BMVEX////////d///AwMC7wcS08P+y+P+xxdCwxM+uws2twMur'. + 'vsinzNynytylzuKhyN6e5v6d5P+d1fOcwNWcu8ub4f+at8iZ3v'. + '+ZvdGY2/yW2f+VscGU1vuT1fqTr72Sx+SSxeKR0fWRz/GPz/OP'. + 'rr+OyeqMy+6Myu2LyeyKxueJudSGw+SGorGDvt+Cvd6CvN2Aud'. + 'p+uNd+t9Z9tdV8tdR8tNN6sc94r813rct2q8h0qcZ0qMVzp8Rx'. + 'o8Bwor5tn7ptnrptnrlsnbhqmbRpmbNpi51ol7Flkqtkkqtkka'. + 'pjj6hijaRhjaZgi6NfiqJfiaFdh55bhJtag5pZgphYgJZYf5VX'. + 'cn9Ve5FSeI1RdopRdYlQdYlPc4dPcoZPcoVNcINLboBLbH9GZn'. + 'hGZXdFZHZEY3RDYnJCXW4/W2s/WWg+Wmo7VmU7VGM7U2E6VGM6'. + 'VGI5UV82T1wGxheQAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHU'. + 'gAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElNRQfTAwkUJziL'. + 'PvAsAAAATUlEQVR4nGNgQAHsQgqcEJYgG5Oegy+IxSHOxmTiFs'. + 'gFZMprKBnbB8e7AplaFlbOQUl5ICanX0BEWmEhSAFDVGxKYWEh'. + 'xAjusDBuVOMBJO8LrFHRAykAAAAASUVORK5CYII=' ; + +//========================================================== +// File: bxs_darkgray.png +//========================================================== + $this->imgdata_xsmall[14][0]= 574 ; + $this->imgdata_xsmall[14][1]= + 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABm'. + 'JLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsRAAALEQF/ZF+RAAAB'. + 'iElEQVR42k3QPU8TYRwA8P//ebkXrgdIColXRAOEkJqbaExMut'. + 'DBhE1GNjYHPg+DG6ODiU6QOLjVxITBcFKBYCstlAC2Bz17fe76'. + 'vLD6+wg/1FpTRFR5lpaub/u1eGBGaAT4HneD4OlXx7avtDYUjT'. + 'HQabd2Ti8e3vVSKzxrtHS32wIpFVldno22Nqvvg2Bhl0gp/aNm'. + 'vJ3qqXAtLIva+ks1H0wqlSXi4+d6+OFTfRsAfHJx2d1od24rZP'. + 'xP2HzopINr1mkesX7ccojqif0v9crxWXODZTno3+dNGA7uWLsd'. + 'mUYU4fHJCViMG9umLBmM4L6fagZGg9QKfjZ+Qfy3C3G/B3mugF'. + 'IHHNcDf64E3KJALApk2p8CSolUUqLjFkyxOGMsTtFyJ+Wz57NQ'. + '8DghS4sLB0svioeZZo7nPhFoUKZDIVFbglkTTnl5/rC8snjAkJ'. + 'Bk/XV5LxHC/v7tR8jzTFPbg8LENK9WX0Vv31T2AEmCSmlKCCoh'. + 'ROnP1U1tPFYjJBRcbtzSf+GPsFTAQBq1n4AAAABKdEVYdHNpZ2'. + '5hdHVyZQBiYzYyMDIyNjgwYThjODMyMmUxNjk0NWUzZjljOGFh'. + 'N2VmZWFhMjA4OTE2ZjkwOTdhZWE1MzYyMjk0MWRkM2I5EqaPDA'. + 'AAAABJRU5ErkJggg==' ; + } +} + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/imgdata_bevels.inc.php b/html/includes/jpgraph/src/imgdata_bevels.inc.php new file mode 100644 index 0000000000..569c7dd654 --- /dev/null +++ b/html/includes/jpgraph/src/imgdata_bevels.inc.php @@ -0,0 +1,104 @@ + 'imgdata'); + + var $colors = array('green','purple','orange','red','yellow'); + var $index = array('green'=>1,'purple'=>4,'orange'=>2,'red'=>0,'yellow'=>3); + var $maxidx = 4 ; + + var $imgdata ; + + function ImgData_Bevels() { +//========================================================== +// File: bullets_balls_red_013.png +//========================================================== + $this->imgdata[0][0]= 337 ; + $this->imgdata[0][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'. + 'BMVEX////////27t/f3+LFwcmNxMuxm62DmqKth1VpZmIWg6fv'. + 'HCa7K0BwMEytCjFnIyUlEBg9vhQvAAAAAXRSTlMAQObYZgAAAA'. + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. + 'RQfTAxcBNhk+pYJVAAAAl0lEQVR4nE2Q2xLDIAgFHUWBKJf//9'. + 'oekmbafVDZARRbK/pYTKP9WNcNv64zzUdd9BjmrgnsVXRNSzO3'. + 'CJ5ahdhy0XKQkxld1kxb45j7dp0x2lBNOyVgQpMaoadX7Hs7zr'. + 'P1yKj47DKBnKaBKiSAkNss7O6PkMx6kIgYXISQJpcZCqdY6KR+'. + 'J1PkS5Xob/h7MNz8x6D3fz5DKQjpkZOBYAAAAABJRU5ErkJggg'. + '==' ; + +//========================================================== +// File: bullets_balls_green_013.png +//========================================================== + $this->imgdata[1][0]= 344 ; + $this->imgdata[1][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'. + 'BMVEX////////27t/e3+K3vriUub/Dm18j4xc3ob10k0ItqQlU'. + 'e5JBmwpxY1ENaKBgUh0iHgwsSre9AAAAAXRSTlMAQObYZgAAAA'. + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. + 'RQfTAxcBNTfJXtxZAAAAnklEQVR4nE2QWY4EMQhDUVhSIRC4/2'. + 'kbaqLp9p+f2AxAayAzDfiK9znPORuvH0x8Ss9z6I9sHp6tcxE9'. + 'nLmWmebmt5F5p2AR0+C9AWpLBjXRaZsCAT3SqklVp0YkAWaGtd'. + 'c5Z41/STYpPzW7BjyiRrwkVmQto/Cw9tNEMvsgcekyCyFPboIu'. + 'IsuXiKffYB4NK4r/h6d4g9HPPwCR7i8+GscIiiaonUAAAAAASU'. + 'VORK5CYII=' ; + +//========================================================== +// File: bullets_balls_oy_035.png +//========================================================== + $this->imgdata[2][0]= 341 ; + $this->imgdata[2][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'. + 'BMVEX////////27t/f3+K5tbqNwcjnkjXjbxR2i5anfEoNkbis'. + 'PBxpU0sZbZejKgdqIRIlERIwYtkYAAAAAXRSTlMAQObYZgAAAA'. + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. + 'RQfTAxcBNgK0wEu5AAAAm0lEQVR4nE3QVxIEIQgEUErAgTHA/U'. + '+7zbipf9RXgoGo0liMmX6RdSPLPtZM9F4LuuSIaZtZWffiU6Iz'. + 'Y8SOMF0NogBj30ioGRGLZgiPvce1TbIRz6oBQEbOFGK0rIoxrn'. + '5hDomMA1cfGRCaRVhjS3gkzheM+4HtnlkXcvdZhWG4qZawewe6'. + '9Jnz/TKLB/ML6HUepn//QczazuwFO/0Ivpolhi4AAAAASUVORK'. + '5CYII=' ; + +//========================================================== +// File: bullets_balls_oy_036.png +//========================================================== + $this->imgdata[3][0]= 340 ; + $this->imgdata[3][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'. + 'BMVEX////////27t/e3+LO3hfYzz65ubiNwci6uQ12ipadgVGa'. + 'fwsNkbhnVkcaZ5dwSA8lFg7CEepmAAAAAXRSTlMAQObYZgAAAA'. + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN'. + 'RQfTAxcCBySi1nevAAAAjElEQVR4nFXPWw7EIAgFUNMoCMhj/6'. + 'staKczc/2RkwjS2glQ+w3YytgXCXCZpRo8gJdGxZadJws13CUP'. + '4SZI4MYiUxypeiGGw1XShVBTNN9kLXP2GRrZPFvKgd7z/sqGGV'. + '7C7r7r3l09alYN3iA8Yn+ImdVrNoEeSRqJPAaHfhZzLYwXstdZ'. + 'rP3n2bvdAI4INwtihiwAAAAASUVORK5CYII=' ; + +//========================================================== +// File: bullets_balls_pp_019.png +//========================================================== + $this->imgdata[4][0]= 334 ; + $this->imgdata[4][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'. + 'BMVEX////+/v7i4eO/w8eHxcvKroNVormtfkjrMN2BeXQrepPc'. + 'Esy4IL+OFaR7F25LHF8mFRh5XXtUAAAAAXRSTlMAQObYZgAAAA'. + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. + 'RQfTAxcBNgkjEpIxAAAAlElEQVR4nE2QAQ7FIAhDDTAVndL7n3'. + 'ZV/7JfEwMvFIWUlkTMVNInbVv5ZeJqG7Smh2QTBwJBpsdizAZP'. + '5NyW0awhK8kYodnZxS6ECvPRp2sI+y7PBv1mN02KH7h77QCJ8D'. + '4VvY5NUgEmCwj6ZMzHtJRgRSXwC1gfcqJJH0GBnSnK1kUQ72DY'. + 'CPBv+MCS/e0jib77eQAJxwiEWm7hFwAAAABJRU5ErkJggg==' ; + + } +} + + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/imgdata_diamonds.inc.php b/html/includes/jpgraph/src/imgdata_diamonds.inc.php new file mode 100644 index 0000000000..eefdc8d828 --- /dev/null +++ b/html/includes/jpgraph/src/imgdata_diamonds.inc.php @@ -0,0 +1,177 @@ +'imgdata'); + var $colors = array('lightblue','darkblue','gray', + 'blue','pink','purple','red','yellow'); + var $index = array('lightblue' =>7,'darkblue'=>2,'gray'=>6, + 'blue'=>4,'pink'=>1,'purple'=>5,'red'=>0,'yellow'=>3); + + var $maxidx = 7 ; + var $imgdata ; + + function ImgData_Diamonds() { +//========================================================== +// File: diam_red.png +//========================================================== + $this->imgdata[0][0]= 668 ; + $this->imgdata[0][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'. + 'BMVEX///////+cAAD/AADOAABjAABrAADWGBjOCAj/CAj/GBj/'. + 'EBCcCAiMOTl7KSl7ISFzGBilGBjOEBBrCAjv5+eMQkK1QkKtMT'. + 'GtKSnWKSn/KSlzEBCcEBDexsb/tbXOe3ucWlqcUlKUSkr/e3vn'. + 'a2u9UlL/a2uEMTHeUlLeSkqtOTn/UlL/SkrWOTn/QkL/OTmlIS'. + 'H/MTH/ISH39/f/9/f35+fezs7/5+fvzs7WtbXOra3nvb3/zs7G'. + 'nJzvtbXGlJTepaW9jIy1hITWlJS1e3uta2ulY2P/lJTnhITne3'. + 'vGY2O9Wlr/c3PeY2O1Skr/Y2P/WlreQkLWISGlEBCglEUaAAAA'. + 'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'. + 'sSAdLdfvwAAAAHdElNRQfTAwsWEw5WI4qnAAABGUlEQVR4nHXQ'. + '1XLDMBAFUKUCM1NiO8zcpIxpp8z0//9SWY7b2LHv6EU6s1qtAN'. + 'iMBAojLPkigpJvogKC4pxDuQipjanlICXof1RQDkYEF21mKIfg'. + '/GGKtjAmOKt9oSyuCU7OhyiDCQnjowGfRnooCJIkiWJvv8NxnG'. + 'nyNAwFcekvZpPP3mu7Vrp8fOq8DYbTyjdnAvBj7Jbd7nP95urs'. + '+MC2D6unF+Cu0VJULQBAlsOQuueN3Hrp2nGUvqppemBZ0aU7Se'. + 'SXvYZFMKaLJn7MH3btJmZEMEmGSOreqy0SI/4ffo3uiUOYEACy'. + 'OFopmNWlP5uZd9uPWmUoxvK9ilO9NtBo6mS7KkZD0fOJYqgGBU'. + 'S/T7OKCAA9tfsFOicXcbxt29cAAAAASUVORK5CYII=' ; + +//========================================================== +// File: diam_pink.png +//========================================================== + $this->imgdata[1][0]= 262 ; + $this->imgdata[1][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'. + 'BMVEX///+AgID/M5n/Zpn/zMz/mZn1xELhAAAAAXRSTlMAQObY'. + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. + 'AHdElNRQfTAwsWEi3tX8qUAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'. + 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'. + '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'. + 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'. + '==' ; + +//========================================================== +// File: diam_blue.png +//========================================================== + $this->imgdata[2][0]= 662 ; + $this->imgdata[2][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA+V'. + 'BMVEX///+AgIAAAJwAAP8AAM4AAGMAAGsQEP8YGHMQEHMYGP8Q'. + 'EKUICJwICM5KSpQxMYQpKXsYGNYQEM4ICGsICP97e85aWpw5OY'. + 'xSUv85ObVCQt4xMa0pKa0hIaUpKf+9vd6EhLVra+dzc/9SUr1r'. + 'a/9aWt5SUt5CQrVaWv9KSv8hIXs5Of8xMf8pKdYhIdYYGKUhIf'. + '/Ozs739//v7/fn5+/v7//n5/fW1ufOzufOzu/W1v+trc69veel'. + 'pc6trd6UlMa9vf+MjL21tfe1tf+UlNZzc61ra6Wlpf+EhOeMjP'. + '9ra8ZSUpyEhP9CQoxKSrVCQv85Od4xMdYQENZnJhlWAAAAAXRS'. + 'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'. + 'LdfvwAAAAHdElNRQfTAwsWEx3Snct5AAABFklEQVR4nHXR5XbD'. + 'IBgGYM6AuHsaqbvOfeuknev9X8xISbplSd5/8JyXwwcA/I0AKm'. + 'PFchVBdvKNKggKQx2VIoRwMZihMiQE49YUlWBCcPL0hYq4ITh+'. + 'qKECUoLDZWqoQNA766F/mJHlHXblPJJNiyURhM5eU9cNw5BlmS'. + 'IrLOLxhzfotF7vwO2j3ez2ap/TmW4AIM7DoN9+tu+vLk6Pdg9O'. + '6ufXjfXLm6pxPACSJIpRFAa+/26DhuK6qjbiON40k0N3skjOvm'. + 'NijBmchF5mi+1jhQqDmWyIzPp1hUlrv8On5l+6mMm1tigFNyrt'. + '5R97g+FKKyGKkTNKesXPJTZXOFIrUoKiypcTQVHjK4g8H2dWEQ'. + 'B8bvUDLSQXSr41rmEAAAAASUVORK5CYII=' ; + +//========================================================== +// File: diam_yellow.png +//========================================================== + $this->imgdata[3][0]= 262 ; + $this->imgdata[3][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'. + 'BMVEX///+AgIBmMwCZZgD/zADMmQD/QLMZAAAAAXRSTlMAQObY'. + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. + 'AHdElNRQfTAwsWEwcv/zIDAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'. + 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'. + '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'. + 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'. + '==' ; + +//========================================================== +// File: diam_lightblue.png +//========================================================== + $this->imgdata[4][0]= 671 ; + $this->imgdata[4][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/1'. + 'BMVEX///+AgIAAnP8A//8Azv8AY/8Aa/8I//8Y1v8Izv8Y//8Q'. + '//8InP8Qzv8Ypf85jP8he/8Yc/8Ia/8pe/8p//8p1v9Ctf8xrf'. + '8prf8QnP8Qc/9CjP+1//97//9r//9S//9K//9C//85//8x//8h'. + '//9r5/9K3v9S3v851v97zv9Svf85rf8hpf/G3v9SnP9anP9KlP'. + '8xhP/n7//v7+f3///n///O//+U//9z//9j//9a//975/9C3v8h'. + '1v+E5/+17/9j3v/O7//n9/+95/+l3v9jxv+U1v8Qpf9avf9Ktf'. + '+Uxv+11v97tf9rrf+cxv+Mvf9jpf+tzv+Etf/O3v/39/8Akkxr'. + 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'. + 'IAAAsSAdLdfvwAAAAHdElNRQfTAwsWEiHk6Ya/AAABGUlEQVR4'. + 'nHXQ13KDMBAF0J2o0E01GHDvJa7p3em95/+/JQJMYjDc0Yt0Zr'. + 'VaAaxHgtxwbSGPkGQpOIeQ2ORxJiJmNWYZyAhZR0WcgQGhViU0'. + 'nEGoedDHGxgRapRPcRpXhOr7XZzCmLjaXk9IIjvkOEmSRLG62+'. + 'F5XlEElhA5sW21GvXj6mGlDBfnJ51lr9svnvEKwH1hu2QPbwd3'. + 'N9eXVzuL7/Hn29frdKaamgcgy67L3HFG9gDefV+dm5qme4YRXL'. + 'oVR374mRqUELZYosf84XAxISFRQuMh4rrH8YxGSP6HX6H97NNQ'. + 'KEAaR08qCeuSnx2a8zIPWqUowtKHSRK91rAw0elmVYQFVc8mhq'. + '7p5RD7Ps3IIwA9sfsFxFUX6eZ4Zh4AAAAASUVORK5CYII=' ; + +//========================================================== +// File: diam_purple.png +//========================================================== + $this->imgdata[5][0]= 657 ; + $this->imgdata[5][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'. + 'BMVEX///////8xAP/OAP+cAP9jAP9rAP+cCP85CP/OEP9SKf/O'. + 'CP9CEP9zGP9rCP+lGP/WOf/WIf9KIf9jOf+MQv+EMf97If9zEP'. + '+1Sv+lIf/ne//eUv/na//n5//Oxv/Wzv+chP9zUv97Wv9rQv9a'. + 'Mf9KGP/v5/+te/97Kf+9Y/+tOf+tKf+lEP/vtf/WMf/WKf/v7+'. + 'f39/+tnP+9rf9rSv9jQv9CGP+ljP+EY//Gtf+tlP+Ma/9zSv/e'. + 'zv+UUv+9lP+cWv+lY/+cUv+MOf+EKf+UQv/Opf/OhP/Ga/+1Qv'. + '/Oe/+9Uv/ntf/eWv/eSv/WGP/3zv/vlP/WEP//9/+pL4oHAAAA'. + 'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'. + 'sSAdLdfvwAAAAHdElNRQfTAwsWEjX+M1LCAAABDklEQVR4nHXQ'. + '1bLDIBAGYFqIEW+ksbr7cXd3ff93OUCamdOE/Mxw882yywLwPz'. + '+gNKotlRFUVnNUQlCxTMRFCKEdE+MgpJaEiIOU4DKaoSIygtb3'. + 'FBUQrm3xjPK4JvXjK0A5hFniYSBtIilQVYUm+X0KTVNiYah+2q'. + 'ulFb8nUbSovD2+TCavwXQWmnMA6ro+di+uR5cPzfPhVqPV3N1p'. + 'n3b3+rimAWAYhP3xnXd7P6oc9vadPsa1wYEs00dFQRAFehlX21'. + '25Sg9NOgwF5jeNTjVL9om0TjDc1lmeCKZ17nFPzhPtSRt6J06R'. + 'WKUoeG3MoXRa/wjLHGLodwZcotPqjsYngnWslRBZH91hWTbpD2'. + 'EdF1ECWW1SAAAAAElFTkSuQmCC' ; + +//========================================================== +// File: diam_gray.png +//========================================================== + $this->imgdata[6][0]= 262 ; + $this->imgdata[6][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'. + 'BMVEX//////wAzMzNmZmbMzMyZmZlq4Qo5AAAAAXRSTlMAQObY'. + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. + 'AHdElNRQfTAwsWExZFTxLxAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'. + 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'. + '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'. + 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'. + '==' ; + +//========================================================== +// File: diam_blgr.png +//========================================================== + $this->imgdata[7][0]= 262 ; + $this->imgdata[7][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'. + 'BMVEX///+AgIBmzP9m///M//+Z//8hMmBVAAAAAXRSTlMAQObY'. + 'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'. + 'AHdElNRQfTAwsWEwCxm6egAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'. + 'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'. + '6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'. + 'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'. + '==' ; + } +} + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/imgdata_pushpins.inc.php b/html/includes/jpgraph/src/imgdata_pushpins.inc.php new file mode 100644 index 0000000000..a9659d2b58 --- /dev/null +++ b/html/includes/jpgraph/src/imgdata_pushpins.inc.php @@ -0,0 +1,517 @@ + 'imgdata_small', + MARK_IMG_SPUSHPIN => 'imgdata_small', + MARK_IMG_LPUSHPIN => 'imgdata_large'); + + var $colors = array('blue','green','orange','pink','red'); + var $index = array('red' => 0, 'orange' => 1, 'pink' => 2, 'blue' => 3, 'green' => 4 ) ; + var $maxidx = 4 ; + var $imgdata_large, $imgdata_small ; + + function ImgData_PushPins() { + + // The anchor should be where the needle "hits" the paper + // (bottom left corner) + $this->anchor_x = 0; + $this->anchor_y = 1; + +//========================================================== +// File: ppl_red.png +//========================================================== + $this->imgdata_large[0][0]= 2490 ; + $this->imgdata_large[0][1]= + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. + 'B3RJTUUH0wMKBh4Ryh89CgAACUdJREFUeJy9mNtTFFcexz+/7p'. + '4Lw1wZJKDGCAwmDAqUySamcCq1ed6k9mn3UfMP7F+1T3nYqn2J'. + 'lZdoDEjpbq0KG8EBFBFBEJye6Zmenkv32Ydu5GYiUMmeqq6uqT'. + '6Xz3zP73aOcIKmAQkIFyD3N/jrBPwlKjLQEglVlJKyUjR3u7cc'. + 'WLoP3/4dvv03LNrQ8I6x1rFbDML9kOmHvh7IRHU9JKmUSG8vpF'. + 'IoXX/TV0AiEM5A5jT0noFMFMJHXUt/d5f9TUAbhtQ3cPFruDog'. + '8klHMnmO0dGYe/myOJGINEwTz3F2higFXgy8PpAkOC+h8hoaCt'. + '4ppHFcQAWSgOQlyI/p+lUjmRxWAwNJd3xca/f34yoFi4tgmjtD'. + 'NIFkJ4xcgBCgVqEBFJ9DqcZea/gNAAVEg7AOGYnHe9XoaJd3+X'. + 'LISSSwnz6lsbKCZ9sHh4UVdBkwdA6cPwNnIfJPmC3Ctgft3wwQ'. + 'QPkvTZJJnbExzfvsM2nMzVG7e5fG48d4lnXwTwEYCjJxuHQBog'. + 'BHUfKkgAIIhiGk06hTp/Dm5qS1uYlXLvtWd4gPgIiCrAEcVckT'. + 'Ab5p7TaYJrK1hQaEenrwSiVfQdc91P0kSp7Ii89D5ksY/kAkLy'. + 'IZXFdXkQjS1YUSEbdcRu168V6+HTUNIKJDRwdE+sBIQmP9Ld59'. + 'bEBA3of4F/D+uXb7rGaaCSmXI3pPj64PDaHCYfEqFVSjgWo2D2'. + '73XlJNQTgCyQykIuBWoNKEeh1aLXBPBCggGdBOgxZVSjoajVhH'. + 'o5HWlIpq4bCQSgm9vXhK4ZZKh5SUYygp4J1EQVUD9xlU18BJQD'. + 'bUbJ5T5XJStyxN9fSI099P3baxV1dRloW2h2ivx/yakg2ot6F1'. + 'EkCa4G1D+zVEq5ArKTWM42Q6HUczQV7U66w9e0ZpdRXlOIQ5vF'. + 'VHUXILKify4jiEzkOqC3peQMoBQymFlMt4Dx6wUSxSsm2UZXEK'. + 'P30QvOUt8/2Sd78CdWwFDTA+gsw3cOlPcPUD+CQB52oQ21RKXM'. + 'eRhGXhOg7VoKrx8KuS4ygZhVg3ZI8FGIfwR9BVgAtfwxdXdP3L'. + '86nUR91dXelNXTeWWy10paQHX602YAP1ADASAL7LJvFtMpOCc0'. + 'cG3FHuGlz6Gr4YEpnoTCbzsdHRbOzy5RCRiLRMk5rjyOtAimwA'. + 'U4U3SurBN/0wnAASBCVDIKpB4kiAB5Ub0/UvO9LpPAMDGfn005'. + 'AxPCzxep3Q6iqPLUseBoufCZRsAE6g5g5kKIDfKUj3wnpAG8QB'. + '/Z1OIqANQuI65AtwNScyYXR2XlAXL2YZHzcklRKWl5GVFXFtGx'. + 'MoAiV/EQaAGH6BUQNWgQpwFngv+Ca8KUAQEBcwgTJHyMV7679R'. + 'XS8YqdSI6u/PMD5ukMtJY3GR2uQkr5aXeWVZOEALmA8WsIAxfL'. + 'd0goVLAdCOd+/YpgqeVtBv4yiA++q/RKKXixe7GB8PSyoljcVF'. + 'yg8fyubyMpulEk2lyAIfAAvAC+B+oOQFoAt/+0rAejB/EzjNri'. + 'vvqNnCd64jxcE39V8spnP+vMbAgDSePKE2NcXm06dslMuUlcID'. + 'TuFvqwXMBU8N39bGgRR+ki0Dz4L5DSAe9NGD7zq+6kcN1L6H2b'. + 'ao5WWaQHllRTafPmWrVMJUimoAQrBYJFjQwre7B6A8YAi8LCgD'. + '5DVo6/hbb/iHK1KggvFeD3hHziQKEMuiNTNDbXGRTdtmw7Iwla'. + 'KGH0oqwbscLOoG46rAY6AOzRhY74PT6QuUKEN4PegXxd/yEDTT'. + 'YMWOk+oEaLkuFdNk0zTZwjfkavDUArXWgGXgFb4dEShXhfYqlI'. + 'ow3w9rg3B6ED60IOOA5oEYQBrcpG+mj9bg0VG8GMJhVDZLyzAo'. + 'VSq8rFYxXXefcjVgG9+uisDrXUCApoKSBcUHMBmHhfcgNwhtD3'. + 'q9IG6Lr15b4OUTmPwBJt8JqGuapp05o0mhoHnptLQfPsR+8IBK'. + 'uYyNH3yr+B77LHheA3tK1Ta+IrMeTL2C6Xl48TOsNWDDgAz7s5'. + '/r+krP/eddCsbj8fDQ4GBm9MqVvvRXX2VULBayRGRzaYn1SoWa'. + 'UjgB4PIB5QK4ZgBXBKaAHxQsrED1H7CRgCUPwgHZDqACmhWwXv'. + '2aDRqGYeRyufS169cvThQKV88PDuYbW1vJ5VRK+5euqxWlPMdX'. + 'SRqgreHbZGN3ijfKBXBTAeh2Fdwi2MofshP/dvKwCmKhp4m83Y'. + 'vj8Xg4l8tlCoXC0MTExMTFkZE/1m37wvLGRvKRacoD1209E7Fc'. + 'pZwYREOQqEJ4z3HskHLsz4AoXykPIBSN0t3dTTQafROoHdumXC'. + '4fjoMiog0ODiauX7+eLxQKV3O53ETdti88nJnJ3rl505ifmWm3'. + 'arWSodR8GNbycDoNHy5C5jFold1k8d+DyvELNwg93d18/vnn9P'. + 'X1oes6nufx/Plz7t+/fxhQKSWJRCI5NjaWHxkZKdj1+sjSwkJm'. + '+uZN/dZ337VqCwullGUVdZjsgIUC5LqhrUPvCugWuApeApPAzY'. + 'PKHWyaphGNRunt7WVwcBARwfM8Ojo6sCzrMKBhGLphGFEF2Wq1'. + '2jc7M5OZ/vHH0MPbt93awkJJmeZsC6ZaMK3DCwvWdNioQUb5B6'. + 'AdBR+9SzkAz/NwHIeXL18iIui6TjgcJplMMjY2th8wHo+Hh4aG'. + 'MsPDw6fddru7+Phxx51bt/RbN260qwsLpZhlFZsw9QJ+2Pbrga'. + 'oJG2FY2oKwuTtVEz9uV34NbqdtbW0xPT1NNBoF4MyZM1y5coWu'. + 'rq5dQBHRcrlc4tq1a/l8Pj9RMs38ndu3Ez//9JNXLRZNyuXZJk'. + 'xVYKoExQpsK/+IaAuYb7no8zjC/R+A4zisrq7u+53NZjl16tQ+'. + 'QIlEIslsNpuPRCJXZ2dnh2/duNFRW1oy07a96MKd575yxRqU1B'. + '5vPMpF5HHa1tYW9+7do7Ozc/eQpZTSQ6FQt1Lq8pMnT/5w7969'. + 'nuLcXE1rNufO9fRMhlKpOyvt9qPtVmvb25fFfvvWbrepVCqHwo'. + 'xaX19vff/996ZhGC8qlkW9Wt1Onz073fXxxz+6MB+9e9dUjuO+'. + '7ebq9wLdB9hoNCrr6+s/4wf3FCJW3fPmTZhXsNWCprjuW66Dfr'. + '928KAfBhJAEgiJSLuzs7OSTqctoFkqlZRt26j/I+L/AGjPTN4d'. + 'Nqn4AAAAAElFTkSuQmCC' ; + +//========================================================== +// File: ppl_orange.png +//========================================================== + $this->imgdata_large[1][0]= 2753 ; + $this->imgdata_large[1][1]= + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. + 'B3RJTUUH0wMLFQ0VCkHCzQAACk5JREFUeJytmGtzG0d2hp8zNw'. + 'AEcRdJ6EJK9FL0CqZUm9jWbkwq3vhDstl8dmLvz8rP2H8Q75ZT'. + 'pkRfpLgqsS6WIFEKGYkiSBCDO+banQ8DUpRWEkklXQUUqlCDfv'. + 'rp857pgfAOQ4AMOJdg4R/hX96Hf06bvDc5iT07i8yeg8ksiIAI'. + '4TBi/ds9/vivD/njapNHvRBfHXMu410AM+BUoVSF05NQsi1sO4'. + '8402AXwLQTuP31OAZO2aG0MEn14iSlnI1z3LnMk8IZYJyBwjIs'. + '/TWsVIWPJkvMFS4zMfMhUp5BsoCpAAEBLYKaMFGn00jBxnvu02'. + '35+JHmSJEnBpQEcPo38MmCxd/nS9Ry71Ga/g1W9a8gn0GsHkgA'. + '6DGjxkqb5CoO+YxF3A3p+jGjQUzoK+L/V0ADzFMwtSR8eLbAr8'. + 'uXOTf9NzhTc0geSLUQcYHgYEH786RMg0zWJHV2Aitv4x/HpHVS'. + 'QA2YBqTTGIUq5qkPMWaWkVwPnPtAA/BevmZcjxaaUtHh8pJJGu'. + 'DpCB9FvT7A7YT7S3p5vFMNzmWo/O0MSx/Ms3TqI8r59zFTfUQe'. + 'I7SBODE3tnfoIxYnNHligwik0zAzDdVpyKbA8sff5YAeMEwgkV'. + 'cufQeTJzZoCsaFLKXPTnNpoUTNsSgJmNoGsuNQjIDwYD2HlnZy'. + 'k++yxTKXZfKTU8zOpjhneeQYkorSmGERtIlICBKRbLX+y98YN3'. + 'ADcNIm+bJD4U3pPnmbEaRgYVRTGBkDSSsmxKfY7ZLuDJA4hdjl'. + 'JEgyBB2SJOvQ9RzTpNKoEwNq0CNFvOXR3/HxMgYVPObaz8kPmh'. + 'hkEWMatAfRONGGvLizyOE9P8KkpwhPDAgQKJQbELUD0oOIhbbH'. + 'JeVTmowxjAgZutB5AoOngA+2DdYrcTyOyYZP9+QpBvI29vwEhb'. + 'It042BVQgDy9KTMfkwQG1A9ACCLlgBBGUwxxoc52WDh2ATyEPp'. + '1hoaPvrEBh0Dq5an9OUsl/9hylk5b5c+mowLc4E2Jtw4Eoljyf'. + 'ogA/AGEAagNRjGyUxOmEycyVA5EWDBxrmUp3ytLIv/NJP69Goh'. + '+9mFydIvS5PZYkvH1oY/RFtKymlwBFQAgQd+kAA6qSQ8pvn2mp'. + 'SkJkuVFHPHBnQMrEt5Sl+e4/Lvp51PF1PF5Xy6WMvOWZXMom8z'. + 'OZTQ8+j5sbQiMEwopsCIwRtBGIJSCdzbTGo9NimkDcgdC7Bg49'. + 'TG5n4/nfr0Si77WdYp1YzyZEkWPdteaEnB7pPqBTxuIf/VgciE'. + 'SgasCPwh+GNIkaNNag1RiPge5pEhMQVjfoLcF+eoXSvbKxedwn'. + 'LKzC3KWbOi5/sW5a44/SHFUSgVA7SCzRG0AvA9mPOgFIETgu4n'. + 'Ww0wNQWFAqRSL6D2ZQYBdDrQ7R7jXiwgRcvIL02makuTmWtpM/'. + '+BlLMl5vuWzLVEuwH6oYnR1KS8kJINGXMM2YdfRlALoQoQQKeb'. + 'bDVwoMdxQMaLCwLo96HZTF5HbrEhmOftianfZisfzueKv7ZmrX'. + 'MsjhxKXZGBjzyeEHmSE3oWiggtyVGmE8DTIXTC5NxgAxOAGUM8'. + 'fun9mnSSLQ/CxNzOTgJ3LIMgoGwkKBiiMyaVviHVkdCO4FEKNv'. + 'LQzWBYHfITPa4UBVM0LR/WB7ARJsdDDTjA6deYFIFUOimJ3d0E'. + 'sNdLavYYgBpthqKcjiiJRO8K6CK0CsJTjfQAGaJtD9vQFAxNNQ'. + '1FB0yBAfA8gdMAIagLoCVAen0M00zMOTYShNDtoHs9CAIUoI4E'. + '1IBihCdNhsMhsj6NuV7BCC2IBpBqQaaFOENCCeiEsO1BO4RQgy'. + 'I5Hm4k4oIU9MrgZSAdBeTabZz+ODxKQRRBFBJo6IUc51anYRQo'. + 'dto+24FNxYCiaWKkQsj00KkO4gxRRkAngJ868M0u3OkkM+hxQA'. + 'cQ7YD7GO5XYSsPZybh/TCkFIYY+kWniTW4Q7jXgHvHMhiRpmuW'. + 'ca08GZkkZ/nY6TZMNhCnf2CuPoDVJvxpB+q9BHA8Ag1uH+oP4c'. + 'YEPCzDwmzSLquShHW/E0YRbG/BjZtw40hAy7aNzJlzRn75E6N0'. + 'qiwTzafI7kOU3gWrhzZC2iHcbsPqLlxvJnCt4KC1RYAL3I5hzY'. + 'Xv/huePYCtITQMKEnyB4KQvMURuJvw889HGSwUCs7CwkLpo6tX'. + 'Ty/+7nel6VLGDn/8N9m+eZuo1UP8iNhLau6b3RfmOsHBGTUYw9'. + 'WBNeDrGB4+h/4qNLKwTnLbHj9CJw/6GoIh9Jpvq0HHcayFhYXi'. + 'l3/4w9LK8vLKexfma3G/mb/3n1njTivS7tNQaaU1grQDjJ868D'. + 'Axx6vmxnBrY9C9IcSbSXbavNjb/S3eN6/0m1JcKBScixcvllZW'. + 'Vi6uLC8v12q1v/M8b/HxVjP//YYr32yE4dYWvShO0ogi14xwxq'. + 'F4rbnxZ3cMjtpvEEeMvwA0TdOYn5/PffHFF7Vr166tvPeLXyx7'. + 'nrd4+/btyg/frFo//Xgncnd67qCn78earQqcmYD3fSi1wPCTSV'. + '3gzqvm9uFOMl5nUAqFQn5paal26dKla57vf7D+6FHph9VV88af'. + 'vgq79bo70e3VT2l9A3hYg4UiRALVHTCHSZvYBm4A//6quf8zoG'. + '3bpuM4acMwKr1+//SDe/dK31+/bv90/Xrcq9fduNW6rbVeC+E7'. + 'gWdD2DKg4UEpBmPcm10RuScida31ntb62HAigoigDw6Gh0axWH'. + 'QWFhZKi4uLZ+I4PrVer2e+u37dXPvqq6hbr7tOp1NXWq89h6/b'. + '8FBB34WGBesdcPrj38lkMkGlUuml0+mu53nR3t4eo9HoSLhMJk'. + 'OlUiGdTuN5Hq7rvgA0TdO4cOFC7vPPP6/VarXldqdTu7m2lrv7'. + '7beq++BBO263b/tKrfWSXlbvwJ6CuAtDgTYiaBFMw6BSqfDxxx'. + '+rarWqGo0GN2/eZGtrC6XenAkRoVKpcPXqVWZmZmg0Gty6desF'. + 'oIhIOp3Ol8vlmmVZK3fv3Lm09uc/Zwbr653ccPgoNIzvnmn99Z'. + '7W9QG46lAaM5mM2l95GIYUi0VOnz7N7OwsWmsymQzyuse5Q8Mw'. + 'DNLpNDMzM5w/f/7A6AGgUkoajYa9urpayOXzUz/fvZutr68Pim'. + 'F4/2y1+n2o9Q/ru7uPesPhXnyo4A+vfHp6mmazybNnz9jZ2UFr'. + 'TbPZJAhe+8/aS0Mphed5NBoNABqNBqPR6MWBVWstvu/nnj9/Pv'. + 'vo0aPq5uZmPBgM/qcwPf39xV/9ajU1M3Nvq9PZaw8GoT50PjdN'. + 'k6mpKa5cucL58+eJ45j19XWePHnCzs4OnudhmiaWZRGGIVH05r'. + 'yEYYjrumxubrKxsfFyDQJ6NBp1Pc+7C4jWumBaVm+kVL2l1H2l'. + '1G6otS+H6V6z8u3tbVzXpdFooJRicXGRqakptre3uXXr1ltrcT'. + 'Qa8ezZszemWAE9rfUdYBOwtVLRbrPZ+48ff+wDvuu6Sr3MB4Dr'. + 'uty6desgfa1WC3iRyrNnz4pSSmezWUzTfGtYtNYcdvC/9sMlgP'. + 'n5N4cAAAAASUVORK5CYII=' ; + +//========================================================== +// File: ppl_pink.png +//========================================================== + $this->imgdata_large[2][0]= 2779 ; + $this->imgdata_large[2][1]= + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. + 'B3RJTUUH0wMLFQolY9lkpgAACmhJREFUeJy9mOtzFNl5h5+3b9'. + 'Mz0kzPBWmEVtIiWYhIiC0HCDhB8lb8ISk7nzdZ5+/zJ/8BTmpT'. + '660CZLwG1pVFgBkgGIHECEaa+/T9nHzQCCQuRpCNz6mp6g893U'. + '8/c37ve3qEjxiC4OA4n/Lp/EUu/tsMM/+aEWduVBx7WhdkShcY'. + 'xUH2zo0Dwod/5N6vf8V//PoGdx8M8EOFPtK9jI8BdHCcMuVSmf'. + 'LxHLmSZdm2U8xIbmKETDGDZZnIy4dBbCynyGhphurEDBOlHFnn'. + 'qPcyPxTOwDCOccw7w5nlBRZWylI+ny/mZ6rL1dzUZ5/IWGZU3D'. + 'ZIOMQDDaJcHDVGWUbJBi9odVr0QoVSPzigIEaZ8vgSS/8wZU3/'. + 'k1fylipz5dLM2WlrZqHKaGCKbEbontq3KAKWQyZfZKTgYqc9Bp'. + '2I2PcJ4ogk/UEBQcwipbFZmT13vDBx8fhnE1Ofnp9yJopFyT3X'. + 'yANfks0QHSQMDaL37pOxMLIu2UyVkjVKLjyKSeuD8dAYCFkso1'. + 'gYMaeWJ40T56cl8yAi/O4FSa2P6kYczIDsgVpAqcDImZPMuAB1'. + 'dkLQtcc8a/bwox8IUHAxZVxGZMouSLVYwKuMkD5IxN+JSdsRJB'. + 'pexuTVgYYM6EoGmxkmg3/hEhNUMr/hd7dqbOzExMn/GRDAxWZc'. + 'j3I8HiXfMjF2FQowKw7pjoN6E/Llw/GBJj8qxVOMlX4ipxc/lY'. + 'kl2zBLkmrTcEzMkoNoRLVidLi/9g+Z3I+1xRHX5EcAihxnbPRv'. + 'OTU9kZSmpKPy9FTGrLimPZ1H+UiyGaF67w6n7E1DwMngFDxGvc'. + 'w70v0xZUby5IxjlIyMssUJrJwVWkXBdbXvSvwEibcSdKCAFI16'. + '4/sc0SRo9cGAGq1DwvQFzV6DVuBiV4zYnlEts6A2TSPcSiXoxo'. + 'QqJCEEFMbQ2b69o5qMiOOPqIMQkagu/aSL7waE8101WFShLjk9'. + 'yxgEvjRUiyYd+gwAjY2J9VpXfZ/JEXLhDp3OR6U4T97+hEnPwx'. + 'tv4HsRjy2tTQSFzQgDUnwSLBQRI+x1ZgcH87Vcv4SF19Kt0ezS'. + '1h9s0Ma25pgr/YJfnLnEysok0+ezjM6EBLldGqKIJYuDRhOQEJ'. + 'Oih8X9Q0xmcXNjlCofBJgn78wxVz7L2YWf8tPPz1hnfjbjzfxN'. + 'qVwutq2etZXUQSXikcXGIgUiUkJSDIQMJgYGJsaB3c7b1qQ4GZ'. + 'xSkdGZIwMeNLfK6uezMnvJK3pLxeVixfvMsyVjSNSO6IV9adPG'. + 'AArkEEz8oUkFmBjYGO80qfd6pCWIayD59wIKcsjcKqufn7JO/S'. + 'xfyi+5c24pey5rZ09mJRNkiDdT/tzbkBr3SYkpMYpgEaIJSYhI'. + 'kSOY1GhilAQk5ntDIojxCZ/kf87Pl85xbuWEnLiUy+cW3NNuJX'. + 'MmY5meKf6mT7wZS+THdOjxlG06tIlIOMZxchSxcFFEGAwAGGME'. + 'jwyZYSnWL3cXWiIUbUI6hO/vxXuFOV84ycmlBWthNeflTjuzTi'. + 'lzJmM5s46Ej0J63/ZoPmoy6PYxtYVNhmfs0mbAND1mmKVMBY1L'. + 'mxA1LN7WgXQbCApNhKJHRIM+DQbv7yQGhjnJ5NgFuXBuxpu5mD'. + 'udm3LPuY7pmZLUE6L1SIJaIPFuDAqyw9lnwDYv6NFHkWJh4ZDB'. + 'wCBFD3uMxsTAwcBAiElpE/KcPg36dIiOvpsRxDCyhmlP2YY9ZU'. + 'v8NMb/1id+FGO0DTztkSXLOONUqeITsMkW2zwnJEIDFhYGx+A1'. + 'kwK4mASkvKDPc3p0iYhRRwYUhZLUTyV6Eu0t4s1Y4kcx6W6KaM'. + 'EZThcXH59RRhGEgIAddnBwNEBKqqpUtWBIF22YDIhJsbEkJqFN'. + 'qLtERHs7GnUkwISEQAf0uj30bY39PzbiC6qrDu2cExJ69Nhhhz'. + '59UlIUipCQOnVi4sjG7ubJBy6um0C+he/0iDHQKIQERYyKFLqr'. + 'SI/W6kJCnvOcrWSLSquC1/Jw9Ks3R0FQKHr0uMc9bnCDGjX69A'. + 'H0XlcJkibN5jOe/alCZStHbjJL9lSMLkXExvCXRiDV6GZEeGeX'. + '3TvvBVQoEjfBL/v0rT75Th7VU5C8gktI6NLlMY+5yU3WWGODDf'. + 'r098tHpNFNH7/2lKdXXdz7efLzVaqJIBOCmK8AJUlI6g0aV+9y'. + '9+p7AR3bMQpTBWPy7yeN6fy0jNwewfpvC9Xe+3kFoUuXe9zj5n'. + 'BusEGHjh6GIAGawC2FWuvSvbbF1maFylZAsC1ISZADBiVNSJrP'. + 'eX73MY//skHP85z5+fnSxQsXj//4n39cmnPn7LbZlsajBmEnBL'. + '1nuEGDG9x4aa5Ldz+h0RCuBqwBv1Wo+7vs9r7n++0MmYeAM+zB'. + '+61EK1QUEnbbtN+9Bh3Hsebn54u//PdfLq9eWl2ZnZ1dSnaSwu'. + 'Pin40b9g3doKE0WoNIl65xj3v75njd3BBubQi6ExKmDWkMRKSl'. + 'tSbVKQcMao1Go5Ugb0+x53nOyZMnSysrKydXLq1cWlxa/McgCB'. + 'Yev3hU+GPrD3I5/q94k3pXYQY58q6B5Bs0HB//neaGx00gyWaz'. + 'VCoV7bquCoKAnZ0dfN/f03egLGj0m3XQNE1jdnY2/+WXXy6trq'. + '6uzP3oR5eCIFi4detW5feXL1vr679Let37zVB3/mQytjXJwmSB'. + 'wikHp9ShY0RESqObwPrr5oBERKhUKly4cIFqtUq9XufmzZtsbW'. + '2hXvuDwTTNtxZq8TyvsLy8vLS4uLgahOHphw8elL69fNlc++qr'. + 'uFOrNXPddm1cczVL5f5P+Lv5MuOJgTGxwYbZpZsCdeAq8M1Bcw'. + 'CGYeC6LtVqlRMnTjAyMkKn0yGXyx0N0LZt03Ec1zCMSrfXO37v'. + 'zp3S769csb+/ciXt1mrNdHf3ltZ6Lca8ZpJsduhtCdb2gEFJoQ'. + 'xADYHuHDS3f32lFEEQUK/XGRkZoVAocP78eZaXl9FaI/Jq25Uk'. + 'yWHAYrHozM/PlxYWFibTND32sFbLXrtyxVz76qukXas1M61WTW'. + 'm99gx+20TdN9jqtfjP7QzOwwYNp037Zd0DukDnIByA1pqdnR2+'. + '++472u02Z8+eZWJiAsMwDsEBRNGBzYJpmsaJEyfyX3zxxdLS0t'. + 'KlVqu1dP3q1cLta9ekU6u1dat1J9b6Sk9kraV1rYXegW7apDYw'. + 'kFY6fPc4MNTw88bwfZ/NzU2UUnieRxAEiAiGcXiXfcigiIjruo'. + 'VyubxkWdbK7fX1xWvffFMInjzBM82uMT5+p++6V1UUrSe7u03t'. + '+8lezlKt3gHyl0aSJDQaDa5fv876+vo+w6FzDq1BpZRsb2/bly'. + '9f9vL5/Njdu3fzG0+eMJHNxsfn532vXN5NPG/7abPZal6/Hvfe'. + 'kroPHfsm98f7AHW9Xo+//vrrlmVZm71+37QNw3JnZ9PK4uJGpV'. + 'pt4Dh+vLGhsrmcfv1iHzu01m89HjIdCon2fb8TBMHtvYeRUn50'. + '1Oj4vqp3Ok1f5LYSadfr9dQfDN642P/XeF2DA+SBAuA4jkOhUK'. + 'BQKESO43S11p3BYBDt7u4y+CtB/i/q7jp1GMiw2AAAAABJRU5E'. + 'rkJggg==' ; + +//========================================================== +// File: ppl_blue.png +//========================================================== + $this->imgdata_large[3][0]= 2284 ; + $this->imgdata_large[3][1]= + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. + 'B3RJTUUH0wMLFRAiTZAL3gAACHlJREFUeJy9mGtv29YZgJ9zKF'. + 'F3y/Q9jh05tuQkarKgbYasde0UBdZgwNou/Vqga/sD9mP2B4a1'. + 'BbZ9atFPxb5sqOtmXbI19bqsluPYiR3HN90vFEWRZx/IJI5zqa'. + 'x0OwBBSgR5Hj7v+55zSEFXTUgIJyA9C6/9RsjMjAyFIxxJCDc7'. + 'iBqKgyZACGg3G2x9+xXf/fG33P3mC9qNKsp1O+1JdkEnQTdgIO'. + 'ttCSMUi8gj072MnugllAyB9G8rBGi6RsToJTF6iuRoFi1kHKZf'. + '7fB8Iggj0/Dy23D2dakNTR3JDsXPvzstxmZGRMER1EwHhQAEgE'. + 'CLhIkPD6InY9S3djGLJVBtQP1Qb4HDAyoJYQOOZkPx49nhTH9i'. + '7MUBGT7egxkJgd70wZS/CUkoZtA/fRoE1DZ2ACiv52ibReCp4e'. + '7CIEHomxDiuVdGTqUnf/ZeOjR8fpiVXZul5ZrY3bWwbdcLr/dA'. + 'AAIpAwQjUWIjQ+g9HZvswiCgBVF9/SI6OSLGzo0i+oLi6+Utbq'. + '+bKEftgwOE/0Ohocf66M+cBjo22U2RQLIHMhmYnvaOpR9S8bSU'. + 'UqCURGpRkuMZMm9cIvPGJZLj0yBjT2LprkiSkykx9cuXIhOnUs'. + 'm+QNC2XdG02ggBTcvFabsPWwTPpBAChSCgh4kYBpoeplWp47Qs'. + '7EYDt21xINzd5GCAxLExRl89Z+nHjpbKMmjbmkgfDzI0JEW53K'. + 'Jaa6NcAOEX8v52uJzsBlAS6u0hcnTIccPRqhWPCUcLD+s1EaUp'. + 'HCEhEMCyHNpt9SjgIU12A6iw6xb123vYhaaKjB9tlgMD5X+uBp'. + 'zdkpg6azA8EaNQtKlVba+Xez4eCntnJrsDdFsW5nYFpxlFN846'. + 'DXe8utkM4mhi+EgQmjYbS2WqexZKk6BpjwJ2YlK5VjeA3pNDiH'. + 'YjRWPzPE7tmBo8EWwGhkXx+z3uXL7D3rU97LIF8RBEAl6lK/Uo'. + '6JNM1rZ2aTcr3eUgIQOGTgbdwXMGyRejenLYTvQGbAdRuetSud'. + 'OivVuFZgtCEgICghICnZoMhmlVTPR49LCAEkQUhk/B7KXe0MWf'. + 'nxj8xVR/cDheK14WZmtVMJSBnlGoN6FmQq0FLfdwJgORKPHRo/'. + 'Snzx4G0F/FjJ4KiOdmjPCrrx8bffnMybMv9MQGNG3rzlVqtR1B'. + 'sh/CYXCD4Aag1oCW7ZnUOjSp6WFi/QNEB8Y7BfTNjZyCmUvJ0I'. + 'XXT47MTp98Ybon9VZCk8cVazfqlNargsY34G7ByAlIjkHd9CCr'. + 'LbBdiHViUgiECuDKYCdz8b2cywREdiYZOj8zNnLuzOTzx6ODp+'. + 'OaGaqwVzBFqz0Idhz2loE7YEwBLaAJLQcKbW8qjAcBF5Jh0AMP'. + 'IOHe6kxgtb3UMO2OxkF//ffK28nQqxfvm3szrtnDVa799Qb/+v'. + 'NtsbNSpm3tAv8B+w7Ub0FhAyoBcMPec9oK6raXk48ziQBXQcmC'. + 'pT3YqHa0mpEBkTR6wz/Jjo2cy04+fzwxdDquNfQKO7sFUbpu0c'. + 'wp3JoAYsA42Bbkl4GCryUNDEM7Avm6Z/CgSYBWG8pNuFuDu1Wo'. + 'tjoxKIJGeHIiM/jmK9NnX5ycuJQMtUcqXPvLDTa+qIie4hAJ1U'. + 'vdrmO2HaDfB931twJgAn1A4lGT96obPHPLBbhVgUoTHHWo9aAA'. + 'JVAKpyKEmQNzWRENAsL18ycKjAFN/9gCNvzLB/390MMmE7pnDi'. + 'Bvwt0K5Jv3O+0oB22nJ1Vvjb/UMhOpcKknqN1OiMB2DNHU2G5s'. + 'sVndpGJVcZXjX1IAlvw9PmhRQcOFPhsSDkiBrQR1G7brgs0a7D'. + 'ag3FK4rguqBXarI4Nt1SJv5gls7TEWtJDRBO2GwnIs8maevFnA'. + 'Gx6awLZvzeTBu4kFbLigijC47pscpx0xyDfkvtUEnlarCDtrUC'. + 't2HGIhvPHVdVwqjTIrxRU2a5uUrYoP0QZ2gMvACl7+3V/LuKDq'. + 'sJuDy597516+CEezIHXv7vcgXQu2l+Bvn8He9Y4AE4kgk5P9DE'. + 'R6aFdq5Et5Nit3yTf3m9sBcsAN3+D98c0Fit5JawE25r1zg1Fo'. + '5B8GFD7g+nVYnu8EUEop9XTa0N/9dUbqcphP/rDJzbUClVbpgR'. + 'y2fXM3fND95qj75J8AC6BWPINfVSBieK+x+6cS5UCzCLu3oFV9'. + 'GqCMx2NGOp2Znpv7aXZudsool3T5J/179sxVlHJ4kGPrP2COBX'. + '/7DmiApWCjxIMXpYNznYuXM+6TAKWUMppOZzLvv//ery5cuDCT'. + 'SqVS336bCwr1JfAPB9r+2KAFwJS+OcETzZHz/7v3etl6ipz77X'. + 'GAMh6PG+l0OjM3NzczOzs3k0pNnFlbW43+e/GKtMqrblSsF03V'. + 'WHcJA0PjIAzvg9JTze2H67g9DjAwOTmZ+uCDD96anZ2dnZiYmF'. + '5dW41++Lvfa1fnr7qllVK9103mXNTnJgPA+YugsvB3HTaEl+Qs'. + 'AZ/yeHPPDCiTyaRx5syZbGoilV1dW00szC9oV+avusuLy0Xd0X'. + 'MgFkDM+zkYBZEHV8f7wwKu84zmngQoNU0LaZoWUa4K31y5qX/8'. + '4cfyyvwVN5/L10NOKNeg8UmDxoKF5Vfj1xXAgD0JrgAcvBDfel'. + 'a4g4AykUgY6XR6emJiIru2ttZXq9S0K19eUcuLy8WQE8o5OAsN'. + 'Ggsmpl+NpoL1g9X4UBU+C9xDgEKIwNTUVOqdd955M9mbnJ3/cj'. + '6Vu5aTheXCQXNdVeMzAwJSCGEA2XKpnF1cXIzlFnOVhJPIKdR+'. + 'c88ctq4AlVKsrKzw0UcfKcC5uXqzXnNqSzb2pwLxOHP/l7Z/BN'. + 'eB01LKt4HTrusKvGr8jB+hGn8MQAkYQMrfw4Nq/MFPtf+rdvDb'. + 'k8QL+/5Z4Uepxm7bfwHuTAVUWpWaqAAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: ppl_green.png +//========================================================== + $this->imgdata_large[4][0]= 2854 ; + $this->imgdata_large[4][1]= + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. + 'B3RJTUUH0wMLFQ4hANhluwAACrNJREFUeJytmF1zE1eagJ+3u9'. + 'XdkvUty2AbmLEtEzDBgZ0UpDBOalNTUzU3czl7tct/2n+wt3M/'. + 'NVM12SSTQQSyW2TA+QAJQogtYYFtyfrqL3WfvWj5g8AEjzfvhS'. + 'SXjk8//Zz3Pf3qCMcJAWxMKlT4kH+jwu/FknnJSUItKFHzCrKA'. + 'BggBQx5ziz/wn/yBz3hED4/oaJfSjgVoYjJJgTLTZCjohp7IGT'. + 'k5aZ4kb+bRTR30Q7djj8f/kpPMUSCFedRL6W8e8qMQNE6S4xpv'. + 'c5HrTPFubiJ3ZnlyOXV59rJYU5Z00h1c3d0brxAiUkScRijisk'. + '6XLTyiN3s8HuAJpniXa/q8/pt8Or+0kF8oXJm5YiydWcIpOrJu'. + 'rjOQwd54AQwsMpTJYhPSoYuLQ58An/DnBQSdImXO8avsTPbqpc'. + 'lLp67OXDVzMznZLGxSs2qyIRu4at8gKHQEC50kE1icxqCAdxST'. + 'xjEA44tqaJlERl8uLWvvnX5PHuQfcCdxh5qq0aX76vj4WgWyXO'. + 'QiNgBP8IAaddr08X8+wHFmJSQhBbPAZGoSZSt5wQs6qoNC7UEd'. + '4AEoLIQSCaCCy78Dv8Tiv1hjjW1CRj8XIAgEKqDtt9keboMJZa'. + 'vMjuzQVd3Xr9prTJo+GF/jKZea95R25Lxs8jg5qFGiwDnOS0mW'. + 'NE0rjNRIt3WbklUCA9mV3Zdz8OBT/JfCQLB0SKYVVjGFYSfx/E'. + '26ow4e6uDujlPFQpE0FU6P8qNTHdXJdEdda0qf0itWBVM3pa/3'. + 'ccUlIECJet0cAJoeYk5EZCeS5IwEoerSxccJBwRqFFf38QCTaO'. + 'TRVFKJm3NTbtLNSyh2IkhIXsvLCesEGNCWdmwyruSD/z9kUlRc'. + '3bqNlSxhJNJ43p5JITrOEis8Qtr0cXEpU/JT/pmO18n2vb42pU'. + '3JnDnHMBqyPlpnoAaxhr2llv1ZUBqEGlqYwDQMsskMOcMgVL3Y'. + 'ZOQTHAcQQiIGjHCwCaiovjrv4hbcpKuJJjIcDHm685RGr4GLCx'. + 'YHkAcrLoAoDSLBiAQrMkjqybHJCbxgh+7xAC1MpsgzwRwD3qHL'. + 'WyTIBdlAa6u2rHfXaew06PV78ZZjAwleNnkolECoH5i090wOcY'. + '+TgwYzFHiPi1zkOkXexeAMASnVU+LiyiA1wFUuaqggACLizeWw'. + 'ycMzyssmVYKkbpGyC5T+OUALk2mKLHKWf+ED/az+YW42d66YL+'. + 'aNrmEEzQCFEnKw368EgEvcN1m80eTIQIt0TFOjMJHkzNEBBYPp'. + 'sblf8QHzrORO5JaWZ5ZLl6cuJyyxpNPv4PZdoT+GyIxBfI5uUg'. + 'eJMCwP2/bIHO1JEudcgUUWOceKNq99mCvnzs5PzRcuTV4y5mRO'. + 'SMIjo47z5S7a94oQCNKgJsZwO7D/IDNg3/LLhRNXt4JohBb4aG'. + '82GLdXcf93mQ+Y43r2RHZp+cRy6cqJK4l8MS+tdItaqiYtc0Mm'. + 'QpfJARh98HYh9IiXVcaAo58wGb+LBAjbSPgCOcoSa0wzxXtc08'. + '/pv8mfyL+9MLVQvDJ1JVHJV6SZbFI1qtTsB+KlehRtRTGE8Afo'. + 'P4DRcAxiEudhAHjjzz+ubgX4oHowakHQOlqzICQwyVPITGVOXi'. + 'xfLF6aumzmczl5lHzMff2+fCdPaGttEkXoLQAO9B7C6EugPYby'. + 'gVPjGXc5eIbNAJPjGwiAbaAJUQv8wVG7GROkJFpyOqn/ovgLba'. + '44L0+sDaraXb6jzq7aBQWjBOyUoHcaopOgmaA3IRyNDZnA1HjO'. + 'HSBkr7eEFDAEngHrQCf+/s2A8cSiSkqcKUeeTjwFy2Jd78t3+L'. + 'TR4itIiBLwLQhzkJyB5Cx4HXDaENVQCBAQcRqFIHTRaBIvuYXg'. + 'AdsouuNxEL0ZUBHnSQp66R73zYfUtQ6OytKT8RckQAJQoLtgO5'. + 'BJgj0D/WfgdyHaAHx8THoUcbGx8ciwhUl3bDEiToURPooeI7pH'. + 'MziK9Yd9nU5a6GgKjOH41vsgI4hAcyC5AZkapF+AoYNrjjsuhx'. + 'FbtPmeB5ykyQQzTPAWAQWC8S9oAI0QRRuPb9jkmyMZNAOTklvC'. + 'GGYZaFkGmkVAh8h4DtKFMIBunG+pB5B5AIkGBDsQ+qBiL20caj'. + 'zhJknq5KlgMkLjJHJos4kYEbFJi5vc5eYbATVN02bNWe19+32t'. + 'aJWlFm3wbf8Rz5NbDFJdlOFBF/g7cBf0JkrbBb+F6j1DOduEkU'. + '8bWCOiSofPWadBnSZDWmgUkEMGhZCINut8S/0NBtPptFlZrBSu'. + 'vnt1+ndnflfIp9OJ/279Ubbbd+lP7KBKPoEBsgnqLph/BRzwdS'. + 'LnBUFvHcfdpRsGPAGqwMco6jynz+e0SPKYCHMfLX5VKHwcenR+'. + 'Igd1XTcqlUr+xn/cePv91fevzy8sLO2OtrOpWkqL7gXKSAVRdh'. + 'ZFEmEXoYkwBNqovoc/3GHH3aUR+jwC1oD/AWrANi4hGwyBzqEG'. + 'Vvb77Dgi0eT1VZzJZMxKpVJYXV1dXF1dXVm6sPSvruue3Xzcyj'. + '6/syvDzwj0lNazK6Fj5LFCRZouZpBABj6jXouu3+Np6HNvDHaf'. + 'g91t74msbMuOJicnSSaTKKUQEUQEpRSO69But1/dB0VEm5uby9'. + 'y4cWNpdXX1+sLCworrume//PuXpeqnVeOban0U1PW2kcx+O9L7'. + 'Te9sUB4lWFR9SqNtNGcHx+/RDD2+Am4D94CnQA8OjjlEhMnyJC'. + 'srK8zOzu7BiYioMAzZ2Njg9u3brwIqpSSXy2WXl5eXLly4sOo4'. + 'zoV6vV6oflrVP/7Tx8Hmw1Zb6ydqmpWp7ha8h4O3gjOhzVANmF'. + 'XPMNQWvdDnCXCXuHR+APqH4fbCtm2mp6eZn59H13WJuYXRaKSU'. + 'UiSTyVcBdV3XDcOwRaTU7/en19bWCn/79G+JL/76RbhZ22y7u+'. + '6ahl71nPDz/nO17m7wAxlabFOihy4+DvAcqAMbPzZ3OFzX5dmz'. + 'Z2iahoiosUUVhiGNRgPHcV4GzGQy5uLiYuH8+fMzo9FoslarJW'. + '9+elP75E+fBJu1zY7qqpqBUW3T/niohnVvy+1zm5aVtp+WE2XT'. + 'nrHFzbjh1tYLz3XdPjD4R3BKKba2tqhWq4dzUO3noBPn4H5PKy'. + 'LaO++8U7hx48byhQsXVne7u6tf3/v64t3P7mbq9+odt+OuaWi3'. + 'PLxbW2ytubjbQCgiMnt6VlaurWgz0zM0m02q1WrUaDSUUuqI56'. + 'ivDxE5MCgiYllWtlwuL5mmufLV/a/O/uXPf9Ff1F+80Lv6Yx29'. + '2qHzyZBh3cdvc7gaTZuZkzPh/Py8ACqVSv1/uPZDKXUAGEWRtF'. + 'qtxEcffZTL5XLF+2v39fqjeivshA/TpP83JLwzYFBzcA4370Cc'. + 'S81nTRBUs9lkOByi1GuOPI4Rh3+26JZlnSkWi781DOPXvV4v3+'. + '/2G0R8kSBxB/jew+tERK+c49m2TblcxrZtXNfl+fPneJ6HZVmU'. + 'y2VJJpNyaJ9TSinlOA5bW1u4rntkQA0oAG8D54gb9W3ianxM3A'. + 'e/cn73U3Hq1Cm5du2aPjs7a+ztcSIShmE4ajQa6tatWzQajZ+0'. + 'fbiKI+It4SvijVUj7kL2qvGfgkskEqTTaZmcnDROnTplJhIJTU'. + 'QiwPd9P/Q8T6XTaQzDIAiCfzjP/wFVfszuFqdHXgAAAABJRU5E'. + 'rkJggg==' ; + + +//========================================================== +// File: pp_red.png +//========================================================== + $this->imgdata_small[0][0]= 384 ; + $this->imgdata_small[0][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'. + 'B3RJTUUH0wMJFhouFobZrQAAAQ1JREFUeJyV1dFtwyAQBuD/og'. + 'xQdYxa8gRY6hJ0jK6QdohMkTEuE5wUj5ERen05IoLvID7Jkn2G'. + 'j8MgTMyMXqRlUQBYq9ydmaL2h1cwqD7l30t+L1iwlbYFRegY7I'. + 'SHjkEifGg4ww3aBa/l4+9AhxWWr/dLhEunXUGHq6yGniw3QkOw'. + '3jJ7UBd82n/VVAlAtvsfp98lAj2sAJOhU4AeQ7DC1ubVBODWDJ'. + 'TtCsEWa6u5M1NeFs1NzgdtuhHGtj+9Q2IDppQUAL6Cyrlz0gDN'. + 'ohSMiJCt861672EiAhEhESG3woJ9V9OKTkwRKbdqz4cHmFLSFg'. + 's69+LvAZKdeZ/n89uLnd2g0S+gjd5g8zzjH5Y/eLLi+NPEAAAA'. + 'AElFTkSuQmCC' ; + +//========================================================== +// File: pp_orange.png +//========================================================== + $this->imgdata_small[1][0]= 403 ; + $this->imgdata_small[1][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'. + 'B3RJTUUH0wMJFhwAnApz5AAAASBJREFUeJyN1dFthDAMBuDf7S'. + '3BCm2VCRKpS4QxbhikW6IewzcBqm6Fm6JyH7iEEByCn5AJH38g'. + 'BBIRHNUzBAWAGNfe/SrUGv92CtNt309BrfFdMGPjvt9CD8Fyml'. + 'ZZaDchRgA/59FDMD18pvNoNyHxMnUmgLmPHoJ+CqqfMaNAH22C'. + 'fgqKRwR+GRpxGjXBEiuXDBWQhTK3plxijyWWvtKVS5KNG1xM8I'. + 'OBr7geV1WupDqpmTAPKjCqLhxk/z0PImQmjKrAuI6vMXlhFroD'. + 'vfdqITXWqg2YMSJEAFcReoag6UXU2DzPG8w5t09YYsAyLWvHrL'. + 'HUy6D3XmvMAAhAay8kAJpBosX4vt0G4+4Jam6s6Rz1fgFG0ncA'. + 'f3XfOQcA+Acv5IUSdQw9hgAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: pp_pink.png +//========================================================== + $this->imgdata_small[2][0]= 419 ; + $this->imgdata_small[2][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'. + 'B3RJTUUH0wMJFhsQzvz1RwAAATBJREFUeJyd1MFthDAQheF/oi'. + 'gF+JYWQKICkCJRA1vGtrDbxFbhGvY0HVjCLeS2BeTiHFgTB2wg'. + 'eRISstCnmcG2qCpbuXf3ADBQzWsPfZfS9y9HsEu4/Fo33Wf4Fx'. + 'gxL3a1XkI3wbTNXHLoboVeLFUYDqObYBy+Fw/Uh9DdCmtOwIjF'. + 'YvG76CZoOhNGRmpO8zz30CJoOhMAqlDxFzQLppgXj2XaNlP7FF'. + 'GLL7ccMYCBgZERgCvXLBrfi2DEclmiKZwFY4tp6sW26bVfnede'. + 'e5Hc5dC2bUgrXGKqWrwcXnNYDjmCrcCIiQgDcFYV05kQ8SXmnB'. + 'NgPiVN06wrTDGAhz5EWY/FOccTk+cTnHM/YNu2YYllgFxCWuUM'. + 'ikzGx+2Gc+4N+CoJW8n+5a2UKm2aBoBvGA6L7wfl8aoAAAAASU'. + 'VORK5CYII=' ; + + +//========================================================== +// File: pp_blue.png +//========================================================== + $this->imgdata_small[3][0]= 883 ; + $this->imgdata_small[3][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAACi1'. + 'BMVEX///8AAAAAADMAAGYAAJkAAMwAAP8zAAAzADMzAGYzAJkz'. + 'AMwzAP9mAABmADNmAGZmAJlmAMxmAP+ZAACZADOZAGaZAJmZAM'. + 'yZAP/MAADMADPMAGbMAJnMAMzMAP//AAD/ADP/AGb/AJn/AMz/'. + 'AP8AMwAAMzMAM2YAM5kAM8wAM/8zMwAzMzMzM2YzM5kzM8wzM/'. + '9mMwBmMzNmM2ZmM5lmM8xmM/+ZMwCZMzOZM2aZM5mZM8yZM//M'. + 'MwDMMzPMM2bMM5nMM8zMM///MwD/MzP/M2b/M5n/M8z/M/8AZg'. + 'AAZjMAZmYAZpkAZswAZv8zZgAzZjMzZmYzZpkzZswzZv9mZgBm'. + 'ZjNmZmZmZplmZsxmZv+ZZgCZZjOZZmaZZpmZZsyZZv/MZgDMZj'. + 'PMZmbMZpnMZszMZv//ZgD/ZjP/Zmb/Zpn/Zsz/Zv8AmQAAmTMA'. + 'mWYAmZkAmcwAmf8zmQAzmTMzmWYzmZkzmcwzmf9mmQBmmTNmmW'. + 'ZmmZlmmcxmmf+ZmQCZmTOZmWaZmZmZmcyZmf/MmQDMmTPMmWbM'. + 'mZnMmczMmf//mQD/mTP/mWb/mZn/mcz/mf8AzAAAzDMAzGYAzJ'. + 'kAzMwAzP8zzAAzzDMzzGYzzJkzzMwzzP9mzABmzDNmzGZmzJlm'. + 'zMxmzP+ZzACZzDOZzGaZzJmZzMyZzP/MzADMzDPMzGbMzJnMzM'. + 'zMzP//zAD/zDP/zGb/zJn/zMz/zP8A/wAA/zMA/2YA/5kA/8wA'. + '//8z/wAz/zMz/2Yz/5kz/8wz//9m/wBm/zNm/2Zm/5lm/8xm//'. + '+Z/wCZ/zOZ/2aZ/5mZ/8yZ///M/wDM/zPM/2bM/5nM/8zM////'. + '/wD//zP//2b//5n//8z///9jJVUgAAAAAXRSTlMAQObYZgAAAA'. + 'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'. + 'RQfTAwkWGTNerea3AAAAYUlEQVR4nHXNwQ3AIAxDUUfyoROxRZ'. + 'icARin0EBTIP3Hp1gBRqSqYo0seqjZpnngojlWBir5+b8o06lM'. + 'ha5uFKEpDZulV8l52axhVzqaCdxQp32qVSSwC1wN3fYiw7b76w'. + 'bN4SMue4/KbwAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: pp_green.png +//========================================================== + $this->imgdata_small[4][0]= 447 ; + $this->imgdata_small[4][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'. + 'B3RJTUUH0wMJFhkLdq9eKQAAAUxJREFUeJyN1LFVwzAQxvH/8f'. + 'IeDS0FLKABlN6eIwPYAzCHB0gWYI2jj+i1ABUTQN4TRSQ7iiWZ'. + 'qxLn9Mt9ydmiqrSq930AYFiu6YdKrf/hP1gYQn6960PxwBaYMG'. + 'E9UA3dBFtVQjdBOQmBakLennK0CapRwbZRZ3N0O/IeEsqp3HKL'. + 'Smtt5pUZgTPg4gdDud+6xoS97wM2rsxxmRSoTgoVcMZsXJkBho'. + 'SmKqCuOuEtls6nmGMFPTUmxBKx/MeyNfQGLoOOiC2ddsxb1Kzv'. + 'ZzUqu5IXbGDvBJf+hDisi77qFSuhq7Xpuu66TyJLRGbsXVUPxV'. + 'SxsgkzDMt0mKT3/RcjL8C5hHnvJToXY0xYRZ4xnVKsV/S+a8YA'. + 'AvCb3s9g13UhYj+TTo93B3fApRV1FVlEAD6H42DjN9/WvzDYuJ'. + 'dL5b1/ji+/IX8EGWP4AwRii8PdFHTqAAAAAElFTkSuQmCC' ; + } +} + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/imgdata_squares.inc.php b/html/includes/jpgraph/src/imgdata_squares.inc.php new file mode 100644 index 0000000000..dfc26bffc7 --- /dev/null +++ b/html/includes/jpgraph/src/imgdata_squares.inc.php @@ -0,0 +1,150 @@ +'imgdata'); + + var $colors = array('bluegreen','blue','green', + 'lightblue','orange','purple','red','yellow'); + var $index = array('bluegreen' =>2,'blue'=>5,'green'=>6, + 'lightblue'=>0,'orange'=>7,'purple'=>4,'red'=>3,'yellow'=>1); + var $maxidx = 7 ; + var $imgdata ; + + function ImgData_Squares () { +//========================================================== +//sq_lblue.png +//========================================================== + $this->imgdata[0][0]= 362 ; + $this->imgdata[0][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAAABm'. + 'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'. + 'B3RJTUUH0wMLFgojiPx/ygAAAPdJREFUeNpj/P377+kzHx89/c'. + 'VAHNBQ5VBX52HavPWWjg6nnDQbkXoUFTnnL7zD9PPXrz17HxCj'. + 'E6Jn6fL7H7/+ZWJgYCBGJ7IeBgYGJogofp1oehDa8OjE1IOiDa'. + 'tOrHoYGBhY0NwD0enirMDAwMDFxYRVD7ptyDrNTAU0NXix6sGu'. + 'jYGBgZOT9e/f/0xMjFyczFgVsGAKCfBza2kKzpl3hIuT1c9Xb/'. + 'PW58/foKchJqx6tmy98vbjj8cvPm/afMnXW1JShA2fNmQ9EBFc'. + 'Opnw6MGjkwm/Hlw6mQjqwaqTiRg9mDoZv//4M2/+UYJ64EBWgj'. + 'cm2hwA8l24oNDl+DMAAAAASUVORK5CYII=' ; + +//========================================================== +//sq_yellow.png +//========================================================== + $this->imgdata[1][0]= 338 ; + $this->imgdata[1][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAWl'. + 'BMVEX////+/+H+/9/9/9v8/8P8/8H8/7v8/7n6/4P5/335/3n5'. + '/3X4/1f4/1P3/031/w30/wn0/wPt+ADp9ADm8ADk7gDc5gDa5A'. + 'DL1ADFzgCwuACqsgClrABzeAC9M0MzAAAAAWJLR0QAiAUdSAAA'. + 'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEDlOgDj'. + 'EAAAB+SURBVHjaVcpbCsQgDEDRGERGKopjDa2a/W9zfLWj9/Nw'. + 'Ac21ZRBOtZlRN9ApzSYFaDUj79KIorRDbJNO9bN/GUSh2ZRJFJ'. + 'S18iorURBiyksO8buT0zkfYaUqzI91ckfhWhoGXTLzsDjI68Sz'. + 'pGMjrzPzauA/iXk1AtykmvgBC8UcWUdc9HkAAAAASUVORK5CYI'. + 'I=' ; + +//========================================================== +//sq_blgr.png +//========================================================== + $this->imgdata[2][0]= 347 ; + $this->imgdata[2][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAZl'. + 'BMVEX////0+vv0+vrz+fry+frv+Png7e/d7e/a6+zY6+250tSz'. + '0tSyztCtztGM0NWIz9SDzdNfsLVcrrRZrbJOp61MpqtIr7dHn6'. + 'RErrZArLQ6q7M2g4kygYcsp68npa4ctr8QZ20JnqepKsl4AAAA'. + 'AWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU'. + '1FB9MDCxYEByp8tpUAAAB7SURBVHjaVcjRFoIgDADQWZpWJpjY'. + 'MsnG//9kzIFn3McLzfArDA3MndFjrhvgfDHFBEB9pt0CVzwrY3'. + 'n2yicjhY4vTSp0nbXtN+hCV53SHDWe61dZY+/9463r2XuifHAM'. + '0SoH+6xEcovUlCfefeFSIwfTTQ3fB+pi4lV/bTIgvmaA7a0AAA'. + 'AASUVORK5CYII=' ; + +//========================================================== +//sq_red.png +//========================================================== + $this->imgdata[3][0]= 324 ; + $this->imgdata[3][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'. + 'BMVEX////++Pn99/j99ff99fb98/X98/T98PL55uj43+P24+bw'. + 'kKPvjaHviJ3teJHpxMnoL2Pjs73WW3rWNljVWXnUVnbUK1DTJk'. + '3SUHPOBz/KQmmxPVmuOFasNFOeIkWVka/fAAAAAWJLR0QAiAUd'. + 'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEHd'. + 'ceT+8AAABtSURBVHjaVchbAkMwEAXQq6i3VrQiQfa/zDYTw8z5'. + 'PCjGt9JVWFt1XWPh1fWNdfDy+tq6WPfRUPENNKnSnXNWPB4uv2'. + 'b54nSZ8jHrMtOxvWZZZtpD4KP6xLkO9/AhzhaCOMhJh68cOjzV'. + '/K/4Ac2cG+nBcaRuAAAAAElFTkSuQmCC' ; + +//========================================================== +//sq_pink.png +//========================================================== + $this->imgdata[4][0]= 445 ; + $this->imgdata[4][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAApV'. + 'BMVEX////6+Pz69/v49Pr38/r17/jr4+/l3Onj2efh1ua/L+i+'. + 'q8m+Lue9Lua8qsS8LuW8LeS7pca5LOG4LN+2Y9O2YNW1ZdO1Kt'. + 'y0atC0aNGzb82zbc6zKtuzKdqycsuwa8qtJtOISZ2GRpuFN6GE'. + 'NqCDQpmCMZ+BPpd/LJ1/K519S5B9Jpx9Jpt9JZt6RY11BJZ1BJ'. + 'V0BJV0BJRzBJNvNoRtIoJUEmdZ/XbrAAAAAWJLR0QAiAUdSAAA'. + 'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYDF3iKMD'. + 'YAAACeSURBVHjaVczbEoIgGARgCiMtrexoWpaa2FHUgvd/tH4Y'. + 'BnEvv9ldhNPradPnnGBUTtPDzMRPSIF46SaBoR25dYjz3I20Lb'. + 'ek6BgQz73Il7KKpSgCO0pTHU0886J1sCe0ZYbALjGhjFnEM2es'. + 'VhZVI4d+B1QtfnV47ywCEaKeP/p7JdLejSYt0j6NIiOq1wJZIs'. + 'QTDA0ELHwhPBCwyR/Cni9cOmzJtwAAAABJRU5ErkJggg==' ; + +//========================================================== +//sq_blue.png +//========================================================== + $this->imgdata[5][0]= 283 ; + $this->imgdata[5][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAQl'. + 'BMVEX////4+fz39/z19vvy8vru7/ni4+7g4fHW1ue8vteXmt6B'. + 'hdhiZ7FQVaZETcxCSJo1Oq4zNoMjKakhJHcKFaMEC2jRVYdWAA'. + 'AAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0'. + 'SU1FB9MDCxYDN0PkEP4AAABfSURBVHjaVchHAoAgDATAVcCCIF'. + 'j4/1elJEjmOFDHKVgDv4iz640gLs+LMF6ZUv/VqcXXplU7Gqpy'. + 'PFzBT5qml9NzlOX259riWHlS4kOffviHD8PQYZx2EFMPRkw+9Q'. + 'FSnRPeWEDzKAAAAABJRU5ErkJggg==' ; + +//========================================================== +//sq_green.png +//========================================================== + $this->imgdata[6][0]= 325 ; + $this->imgdata[6][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'. + 'BMVEX////2+vX1+vX1+fT0+fPz+PPx9/Dv9u7u9e3h7uHe697a'. + '6dnO2s3I1sa10LOvza2ay5aEwYBWlE9TqE5Tkk1RkEpMrUJMg0'. + 'hKiUNGpEFBojw8oTcsbScaYBMWlwmMT0NtAAAAAWJLR0QAiAUd'. + 'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEFd'. + 'nFx90AAABuSURBVHjaVc9HAoAgDADB2HuJWLDx/2cKBITscW4L'. + '5byzMIWtZobNDZIZtrcCGZsRQ8GwvRSRNxIiMuysODKG3alikl'. + 'ueOPlpKTLBaRmOZxQxaXlfb5ZWI9om4WntrXiDSJzp7SBkwMQa'. + 'FEy0VR/NAB2kNuj7rgAAAABJRU5ErkJggg==' ; + +//========================================================== +//sq_orange.png +//========================================================== + $this->imgdata[7][0]= 321 ; + $this->imgdata[7][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAUV'. + 'BMVEX/////8+n/8uf/8OP/59H/5Mv/zqH/zJ3/ypv/yJf/vYH/'. + 'u33/uXn/n0n/nUX/m0H/lzn/ljf/lDP/kS3/kCv/iR//hxv/fg'. + 'n/fAX/eQDYZgDW6ia5AAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAL'. + 'EgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEJIgbx+cAAAB2SURBVH'. + 'jaVczRCoQwDETRbLAWLZSGUA35/w/dVI0283i4DODew3YESmWW'. + 'kg5gWkoQAe6TleUQI/66Sy7i56+kLk7cht2N0+hcnJgQu0SqiC'. + '1SzSIbzWSi6gavqJ63wSduRi2f+kwyD5rEukwCdZ1kGAMGMfv9'. + 'AbWuGMOr5COSAAAAAElFTkSuQmCC' ; + } +} + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/imgdata_stars.inc.php b/html/includes/jpgraph/src/imgdata_stars.inc.php new file mode 100644 index 0000000000..bd3272a71a --- /dev/null +++ b/html/includes/jpgraph/src/imgdata_stars.inc.php @@ -0,0 +1,144 @@ + 'imgdata'); + + var $colors = array('bluegreen','lightblue','purple','blue','green','pink','red','yellow'); + var $index = array('bluegreen'=>3,'lightblue'=>4,'purple'=>1, + 'blue'=>5,'green'=>0,'pink'=>7,'red'=>2,'yellow'=>6); + var $maxidx = 7 ; + var $imgdata ; + + function ImgData_Stars() { +//========================================================== +// File: bstar_green_001.png +//========================================================== + $this->imgdata[0][0]= 329 ; + $this->imgdata[0][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAAUV'. + 'BMVEX///////+/v7+83rqcyY2Q/4R7/15y/1tp/05p/0lg/zdX'. + '/zdX/zVV/zdO/zFJ9TFJvDFD4yg+8Bw+3iU68hwurhYotxYosx'. + 'YokBoTfwANgQFUp7DWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'. + 'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJj'. + 'CRyxgTAAAAcUlEQVR4nH3MSw6AIAwEUBL/IKBWwXL/g0pLojUS'. + 'ZzGLl8ko9Zumhr5iy66/GH0dp49llNPB5sTotDY5PVuLG6tnM9'. + 'CVKSIe1joSgPsAKSuANNaENFQvTAGzmheSkUpMBWeJZwqBT8wo'. + 'hmysD4bnnPsC/x8ItUdGPfAAAAAASUVORK5CYII=' ; +//========================================================== +// File: bstar_blred.png +//========================================================== + $this->imgdata[1][0]= 325 ; + $this->imgdata[1][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. + 'BMVEX///+/v79uRJ6jWPOSUtKrb+ejWO+gWPaGTruJTr6rZvF2'. + 'RqC2ocqdVuCeV+egV/GsnLuIXL66rMSpcOyATbipY/OdWOp+VK'. + 'aTU9WhV+yJKBoLAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJwynv1'. + 'XVAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bstar_red_001.png +//========================================================== + $this->imgdata[2][0]= 325 ; + $this->imgdata[2][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. + 'BMVEX///+/v7+eRFHzWG3SUmHnb37vWGr2WHG7Tlm+TljxZneg'. + 'Rk3KoaXgVmXnV2nxV227nJ++XGzErK3scIS4TVzzY3fqWG2mVF'. + 'zVU2PsV2rJFw9VAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJzCI0C'. + 'lSAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bstar_blgr_001.png +//========================================================== + $this->imgdata[3][0]= 325 ; + $this->imgdata[3][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. + 'BMVEX///+/v79Ehp5Yx/NSq9Jvw+dYwu9YzfZOmbtOmb5myPFG'. + 'gqChvcpWteBXvedXxvGcsbtcpb6su8RwzOxNmrhjyvNYwupUjK'. + 'ZTr9VXwOyJhmWNAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJTC65k'. + 'vQAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bstar_blgr_002.png +//========================================================== + $this->imgdata[4][0]= 325 ; + $this->imgdata[4][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. + 'BMVEX///+/v79EnpxY8/FS0dJv5+dY7+9Y9vBOubtOur5m8fFG'. + 'nKChycpW3uBX5+ZX8e2curtcvrqswsRw7OdNuLZj8/BY6udUpK'. + 'ZT1dRX7OtNkrW5AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJgXHeN'. + 'wwAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bstar_blue_001.png +//========================================================== + $this->imgdata[5][0]= 325 ; + $this->imgdata[5][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. + 'BMVEX///+/v79EY55Yi/NSetJvledYiO9YkPZOb7tObr5mkvFG'. + 'X6ChrcpWgOBXhedXi/Gcpbtcf76sssRwnOxNcbhjk/NYiepUbK'. + 'ZTfdVXh+ynNEzzAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJhStyP'. + 'zCAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bstar_oy_007.png +//========================================================== + $this->imgdata[6][0]= 325 ; + $this->imgdata[6][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. + 'BMVEX///+/v7+ejUTz11jSvVLn02/v1lj21li7q06+r07x2mag'. + 'lUbKxKHgy1bnz1fx1Ve7t5y+qlzEwqzs03C4pE3z2WPqz1imml'. + 'TVv1Ps01dGRjeyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJjsGGc'. + 'GbAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; + +//========================================================== +// File: bstar_lred.png +//========================================================== + $this->imgdata[7][0]= 325 ; + $this->imgdata[7][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'. + 'BMVEX///+/v7+eRJPzWN3SUr7nb9TvWNj2WOS7Tqi+TqnxZtyg'. + 'Ro/KocPgVsjnV9LxV927nLa+XLTErL7scN24TarzY9/qWNemVJ'. + 'jVU8LsV9VCwcc9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'. + 'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJxi9ZY'. + 'GoAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'. + 'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'. + 'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'. + 'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ; + } +} + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/jpg-config.inc.php b/html/includes/jpgraph/src/jpg-config.inc.php new file mode 100644 index 0000000000..7936f2a1f8 --- /dev/null +++ b/html/includes/jpgraph/src/jpg-config.inc.php @@ -0,0 +1,216 @@ + diff --git a/html/includes/jpgraph/src/jpgraph.php b/html/includes/jpgraph/src/jpgraph.php new file mode 100644 index 0000000000..0da5cb5aae --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph.php @@ -0,0 +1,5950 @@ +Get(11,$file,$lineno); + die($msg); + } + else { + DEFINE('CACHE_DIR', $_SERVER['TEMP'] . '/'); + } + } else { + DEFINE('CACHE_DIR','/tmp/jpgraph_cache/'); + } + } +} +elseif( !defined('CACHE_DIR') ) { + DEFINE('CACHE_DIR', ''); +} + +if (!defined('TTF_DIR')) { + if (strstr( PHP_OS, 'WIN') ) { + $sroot = getenv('SystemRoot'); + if( empty($sroot) ) { + $t = new ErrMsgText(); + $msg = $t->Get(12,$file,$lineno); + die($msg); + } + else { + DEFINE('TTF_DIR', $sroot.'/fonts/'); + } + } else { + DEFINE('TTF_DIR','/usr/X11R6/lib/X11/fonts/truetype/'); + } +} + +if (!defined('MBTTF_DIR')) { + if (strstr( PHP_OS, 'WIN') ) { + $sroot = getenv('SystemRoot'); + if( empty($sroot) ) { + $t = new ErrMsgText(); + $msg = $t->Get(12,$file,$lineno); + die($msg); + } + else { + DEFINE('TTF_DIR', $sroot.'/fonts/'); + } + } else { + DEFINE('MBTTF_DIR','/usr/share/fonts/ja/TrueType/'); + } +} + +//------------------------------------------------------------------ +// Constants which are used as parameters for the method calls +//------------------------------------------------------------------ + +// Tick density +DEFINE("TICKD_DENSE",1); +DEFINE("TICKD_NORMAL",2); +DEFINE("TICKD_SPARSE",3); +DEFINE("TICKD_VERYSPARSE",4); + +// Side for ticks and labels. +DEFINE("SIDE_LEFT",-1); +DEFINE("SIDE_RIGHT",1); +DEFINE("SIDE_DOWN",-1); +DEFINE("SIDE_BOTTOM",-1); +DEFINE("SIDE_UP",1); +DEFINE("SIDE_TOP",1); + +// Legend type stacked vertical or horizontal +DEFINE("LEGEND_VERT",0); +DEFINE("LEGEND_HOR",1); + +// Mark types for plot marks +DEFINE("MARK_SQUARE",1); +DEFINE("MARK_UTRIANGLE",2); +DEFINE("MARK_DTRIANGLE",3); +DEFINE("MARK_DIAMOND",4); +DEFINE("MARK_CIRCLE",5); +DEFINE("MARK_FILLEDCIRCLE",6); +DEFINE("MARK_CROSS",7); +DEFINE("MARK_STAR",8); +DEFINE("MARK_X",9); +DEFINE("MARK_LEFTTRIANGLE",10); +DEFINE("MARK_RIGHTTRIANGLE",11); +DEFINE("MARK_FLASH",12); +DEFINE("MARK_IMG",13); +DEFINE("MARK_FLAG1",14); +DEFINE("MARK_FLAG2",15); +DEFINE("MARK_FLAG3",16); +DEFINE("MARK_FLAG4",17); + +// Builtin images +DEFINE("MARK_IMG_PUSHPIN",50); +DEFINE("MARK_IMG_SPUSHPIN",50); +DEFINE("MARK_IMG_LPUSHPIN",51); +DEFINE("MARK_IMG_DIAMOND",52); +DEFINE("MARK_IMG_SQUARE",53); +DEFINE("MARK_IMG_STAR",54); +DEFINE("MARK_IMG_BALL",55); +DEFINE("MARK_IMG_SBALL",55); +DEFINE("MARK_IMG_MBALL",56); +DEFINE("MARK_IMG_LBALL",57); +DEFINE("MARK_IMG_BEVEL",58); + +// Inline defines +DEFINE("INLINE_YES",1); +DEFINE("INLINE_NO",0); + +// Format for background images +DEFINE("BGIMG_FILLPLOT",1); +DEFINE("BGIMG_FILLFRAME",2); +DEFINE("BGIMG_COPY",3); +DEFINE("BGIMG_CENTER",4); + +// Depth of objects +DEFINE("DEPTH_BACK",0); +DEFINE("DEPTH_FRONT",1); + +// Direction +DEFINE("VERTICAL",1); +DEFINE("HORIZONTAL",0); + +// Axis styles for scientific style axis +DEFINE('AXSTYLE_SIMPLE',1); +DEFINE('AXSTYLE_BOXIN',2); +DEFINE('AXSTYLE_BOXOUT',3); +DEFINE('AXSTYLE_YBOXIN',4); +DEFINE('AXSTYLE_YBOXOUT',5); + +// Style for title backgrounds +DEFINE('TITLEBKG_STYLE1',1); +DEFINE('TITLEBKG_STYLE2',2); +DEFINE('TITLEBKG_STYLE3',3); +DEFINE('TITLEBKG_FRAME_NONE',0); +DEFINE('TITLEBKG_FRAME_FULL',1); +DEFINE('TITLEBKG_FRAME_BOTTOM',2); +DEFINE('TITLEBKG_FRAME_BEVEL',3); +DEFINE('TITLEBKG_FILLSTYLE_HSTRIPED',1); +DEFINE('TITLEBKG_FILLSTYLE_VSTRIPED',2); +DEFINE('TITLEBKG_FILLSTYLE_SOLID',3); + +// Style for background gradient fills +DEFINE('BGRAD_FRAME',1); +DEFINE('BGRAD_MARGIN',2); +DEFINE('BGRAD_PLOT',3); + +// Width of tab titles +DEFINE('TABTITLE_WIDTHFIT',0); +DEFINE('TABTITLE_WIDTHFULL',-1); + +// Defines for 3D skew directions +DEFINE('SKEW3D_UP',0); +DEFINE('SKEW3D_DOWN',1); +DEFINE('SKEW3D_LEFT',2); +DEFINE('SKEW3D_RIGHT',3); + +// For internal use only +DEFINE("_JPG_DEBUG",false); +DEFINE("_FORCE_IMGTOFILE",false); +DEFINE("_FORCE_IMGDIR",'/tmp/jpgimg/'); + + +function CheckPHPVersion($aMinVersion) +{ + list($majorC, $minorC, $editC) = split('[/.-]', PHP_VERSION); + list($majorR, $minorR, $editR) = split('[/.-]', $aMinVersion); + + if ($majorC > $majorR) return true; + if ($majorC < $majorR) return false; + // same major - check minor + if ($minorC > $minorR) return true; + if ($minorC < $minorR) return false; + // and same minor + if ($editC >= $editR) return true; + return true; +} + +// +// Make sure PHP version is high enough +// +if( !CheckPHPVersion(MIN_PHPVERSION) ) { + JpGraphError::RaiseL(13,PHP_VERSION,MIN_PHPVERSION); +} + +// +// Routine to determine if GD1 or GD2 is installed +// +function CheckGDVersion() { + if( !function_exists("imagetypes") || !function_exists('imagecreatefromstring') ) + return 0; + $GDfuncList = get_extension_funcs('gd'); + if( !$GDfuncList ) + return 0 ; + else { + if( in_array('imagegd2',$GDfuncList) && + in_array('imagecreatetruecolor',$GDfuncList)) + return 2; + else + return 1; + } +} + +// +// Check what version of the GD library is installed. +// +$gdversion = CheckGDVersion(); +if( $gdversion != 2 ) { + JpGraphError::RaiseL(25002); +//(" Your PHP installation does not seem to have the required GD 2.x library. Please see the PHP documentation on how to install and enable the GD library."); +} + +// +// Setup PHP error handler +// +function _phpErrorHandler($errno,$errmsg,$filename, $linenum, $vars) { + // Respect current error level + if( $errno & error_reporting() ) { + JpGraphError::RaiseL(25003,basename($filename),$linenum,$errmsg); + } +} + +if( INSTALL_PHP_ERR_HANDLER ) { + set_error_handler("_phpErrorHandler"); +} + +// +//Check if there were any warnings, perhaps some wrong includes by the user +// +if( isset($GLOBALS['php_errormsg']) && CATCH_PHPERRMSG && + !preg_match('/|Deprecated|/i', $GLOBALS['php_errormsg'])) { + JpGraphError::RaiseL(25004,$GLOBALS['php_errormsg']); +} + + +// Useful mathematical function +function sign($a) {return $a >= 0 ? 1 : -1;} + +// Utility function to generate an image name based on the filename we +// are running from and assuming we use auto detection of graphic format +// (top level), i.e it is safe to call this function +// from a script that uses JpGraph +function GenImgName() { + global $_SERVER; + + // Determine what format we should use when we save the images + $supported = imagetypes(); + if( $supported & IMG_PNG ) $img_format="png"; + elseif( $supported & IMG_GIF ) $img_format="gif"; + elseif( $supported & IMG_JPG ) $img_format="jpeg"; + elseif( $supported & IMG_WBMP ) $img_format="wbmp"; + elseif( $supported & IMG_XPM ) $img_format="xpm"; + + if( !isset($_SERVER['PHP_SELF']) ) + JpGraphError::RaiseL(25005); +//(" Can't access PHP_SELF, PHP global variable. You can't run PHP from command line if you want to use the 'auto' naming of cache or image files."); + $fname = basename($_SERVER['PHP_SELF']); + if( !empty($_SERVER['QUERY_STRING']) ) { + $q = @$_SERVER['QUERY_STRING']; + $fname .= '_'.preg_replace("/\W/", "_", $q).'.'.$img_format; + } + else { + $fname = substr($fname,0,strlen($fname)-4).'.'.$img_format; + } + return $fname; +} + +//=================================================== +// CLASS JpgTimer +// Description: General timing utility class to handle +// time measurement of generating graphs. Multiple +// timers can be started. +//=================================================== +class JpgTimer { + var $start; + var $idx; +//--------------- +// CONSTRUCTOR + function JpgTimer() { + $this->idx=0; + } + +//--------------- +// PUBLIC METHODS + + // Push a new timer start on stack + function Push() { + list($ms,$s)=explode(" ",microtime()); + $this->start[$this->idx++]=floor($ms*1000) + 1000*$s; + } + + // Pop the latest timer start and return the diff with the + // current time + function Pop() { + assert($this->idx>0); + list($ms,$s)=explode(" ",microtime()); + $etime=floor($ms*1000) + (1000*$s); + $this->idx--; + return $etime-$this->start[$this->idx]; + } +} // Class + +$gJpgBrandTiming = BRAND_TIMING; +//=================================================== +// CLASS DateLocale +// Description: Hold localized text used in dates +//=================================================== +class DateLocale { + + var $iLocale = 'C'; // environmental locale be used by default + + var $iDayAbb = null; + var $iShortDay = null; + var $iShortMonth = null; + var $iMonthName = null; + +//--------------- +// CONSTRUCTOR + function DateLocale() { + settype($this->iDayAbb, 'array'); + settype($this->iShortDay, 'array'); + settype($this->iShortMonth, 'array'); + settype($this->iMonthName, 'array'); + + + $this->Set('C'); + } + +//--------------- +// PUBLIC METHODS + function Set($aLocale) { + if ( in_array($aLocale, array_keys($this->iDayAbb)) ){ + $this->iLocale = $aLocale; + return TRUE; // already cached nothing else to do! + } + + $pLocale = setlocale(LC_TIME, 0); // get current locale for LC_TIME + + if (is_array($aLocale)) { + foreach ($aLocale as $loc) { + $res = @setlocale(LC_TIME, $loc); + if ( $res ) { + $aLocale = $loc; + break; + } + } + } + else { + $res = @setlocale(LC_TIME, $aLocale); + } + if ( ! $res ){ + JpGraphError::RaiseL(25007,$aLocale); +//("You are trying to use the locale ($aLocale) which your PHP installation does not support. Hint: Use '' to indicate the default locale for this geographic region."); + return FALSE; + } + + $this->iLocale = $aLocale; + + for ( $i = 0, $ofs = 0 - strftime('%w'); $i < 7; $i++, $ofs++ ){ + $day = strftime('%a', strtotime("$ofs day")); + $day{0} = strtoupper($day{0}); + $this->iDayAbb[$aLocale][]= $day{0}; + $this->iShortDay[$aLocale][]= $day; + } + + for($i=1; $i<=12; ++$i) { + list($short ,$full) = explode('|', strftime("%b|%B",strtotime("2001-$i-01"))); + $this->iShortMonth[$aLocale][] = ucfirst($short); + $this->iMonthName [$aLocale][] = ucfirst($full); + } + + // Return to original locale + setlocale(LC_TIME, $pLocale); + + return TRUE; + } + + + function GetDayAbb() { + return $this->iDayAbb[$this->iLocale]; + } + + function GetShortDay() { + return $this->iShortDay[$this->iLocale]; + } + + function GetShortMonth() { + return $this->iShortMonth[$this->iLocale]; + } + + function GetShortMonthName($aNbr) { + return $this->iShortMonth[$this->iLocale][$aNbr]; + } + + function GetLongMonthName($aNbr) { + return $this->iMonthName[$this->iLocale][$aNbr]; + } + + function GetMonth() { + return $this->iMonthName[$this->iLocale]; + } +} + +$gDateLocale = new DateLocale(); +$gJpgDateLocale = new DateLocale(); + + +//======================================================= +// CLASS Footer +// Description: Encapsulates the footer line in the Graph +//======================================================= +class Footer { + var $left,$center,$right; + var $iLeftMargin = 3; + var $iRightMargin = 3; + var $iBottomMargin = 3; + + function Footer() { + $this->left = new Text(); + $this->left->ParagraphAlign('left'); + $this->center = new Text(); + $this->center->ParagraphAlign('center'); + $this->right = new Text(); + $this->right->ParagraphAlign('right'); + } + + function Stroke(&$aImg) { + $y = $aImg->height - $this->iBottomMargin; + $x = $this->iLeftMargin; + $this->left->Align('left','bottom'); + $this->left->Stroke($aImg,$x,$y); + + $x = ($aImg->width - $this->iLeftMargin - $this->iRightMargin)/2; + $this->center->Align('center','bottom'); + $this->center->Stroke($aImg,$x,$y); + + $x = $aImg->width - $this->iRightMargin; + $this->right->Align('right','bottom'); + $this->right->Stroke($aImg,$x,$y); + } +} + + +//=================================================== +// CLASS Graph +// Description: Main class to handle graphs +//=================================================== +class Graph { + var $cache=null; // Cache object (singleton) + var $img=null; // Img object (singleton) + var $plots=array(); // Array of all plot object in the graph (for Y 1 axis) + var $y2plots=array();// Array of all plot object in the graph (for Y 2 axis) + var $ynplots=array(); + var $xscale=null; // X Scale object (could be instance of LinearScale or LogScale + var $yscale=null,$y2scale=null, $ynscale=array(); + var $iIcons = array(); // Array of Icons to add to + var $cache_name; // File name to be used for the current graph in the cache directory + var $xgrid=null; // X Grid object (linear or logarithmic) + var $ygrid=null,$y2grid=null; + var $doframe=true,$frame_color=array(0,0,0), $frame_weight=1; // Frame around graph + var $boxed=false, $box_color=array(0,0,0), $box_weight=1; // Box around plot area + var $doshadow=false,$shadow_width=4,$shadow_color=array(102,102,102); // Shadow for graph + var $xaxis=null; // X-axis (instane of Axis class) + var $yaxis=null, $y2axis=null, $ynaxis=array(); // Y axis (instance of Axis class) + var $margin_color=array(200,200,200); // Margin color of graph + var $plotarea_color=array(255,255,255); // Plot area color + var $title,$subtitle,$subsubtitle; // Title and subtitle(s) text object + var $axtype="linlin"; // Type of axis + var $xtick_factor,$ytick_factor; // Factot to determine the maximum number of ticks depending on the plot with + var $texts=null, $y2texts=null; // Text object to ge shown in the graph + var $lines=null, $y2lines=null; + var $bands=null, $y2bands=null; + var $text_scale_off=0, $text_scale_abscenteroff=-1; // Text scale offset in fractions and for centering bars in absolute pixels + var $background_image="",$background_image_type=-1,$background_image_format="png"; + var $inline; + var $showcsim=0,$csimcolor="red"; //debug stuff, draw the csim boundaris on the image if <>0 + var $grid_depth=DEPTH_BACK; // Draw grid under all plots as default + var $iAxisStyle = AXSTYLE_SIMPLE; + var $iCSIMdisplay=false,$iHasStroked = false; + var $footer; + var $csimcachename = '', $csimcachetimeout = 0, $iCSIMImgAlt=''; + var $iDoClipping = false; + var $y2orderback=true; + var $tabtitle; + var $bkg_gradtype=-1,$bkg_gradstyle=BGRAD_MARGIN; + var $bkg_gradfrom='navy', $bkg_gradto='silver'; + var $titlebackground = false; + var $titlebackground_color = 'lightblue', + $titlebackground_style = 1, + $titlebackground_framecolor = 'blue', + $titlebackground_framestyle = 2, + $titlebackground_frameweight = 1, + $titlebackground_bevelheight = 3 ; + var $titlebkg_fillstyle=TITLEBKG_FILLSTYLE_SOLID; + var $titlebkg_scolor1='black',$titlebkg_scolor2='white'; + var $framebevel = false, $framebeveldepth = 2 ; + var $framebevelborder = false, $framebevelbordercolor='black'; + var $framebevelcolor1='white@0.4', $framebevelcolor2='black@0.4'; + var $background_image_mix=100; + var $background_cflag = ''; + var $background_cflag_type = BGIMG_FILLPLOT; + var $background_cflag_mix = 100; + var $iImgTrans=false, + $iImgTransHorizon = 100,$iImgTransSkewDist=150, + $iImgTransDirection = 1, $iImgTransMinSize = true, + $iImgTransFillColor='white',$iImgTransHighQ=false, + $iImgTransBorder=false,$iImgTransHorizonPos=0.5; + var $iYAxisDeltaPos=50; + var $iIconDepth=DEPTH_BACK; + var $iAxisLblBgType = 0, + $iXAxisLblBgFillColor = 'lightgray', $iXAxisLblBgColor = 'black', + $iYAxisLblBgFillColor = 'lightgray', $iYAxisLblBgColor = 'black'; + var $iTables=NULL; + var $legend; + +//--------------- +// CONSTRUCTOR + + // aWIdth Width in pixels of image + // aHeight Height in pixels of image + // aCachedName Name for image file in cache directory + // aTimeOut Timeout in minutes for image in cache + // aInline If true the image is streamed back in the call to Stroke() + // If false the image is just created in the cache + function Graph($aWidth=300,$aHeight=200,$aCachedName="",$aTimeOut=0,$aInline=true) { + GLOBAL $gJpgBrandTiming; + // If timing is used create a new timing object + if( $gJpgBrandTiming ) { + global $tim; + $tim = new JpgTimer(); + $tim->Push(); + } + + if( !is_numeric($aWidth) || !is_numeric($aHeight) ) { + JpGraphError::RaiseL(25008);//('Image width/height argument in Graph::Graph() must be numeric'); + } + + // Automatically generate the image file name based on the name of the script that + // generates the graph + if( $aCachedName=="auto" ) + $aCachedName=GenImgName(); + + // Should the image be streamed back to the browser or only to the cache? + $this->inline=$aInline; + + $this->img = new RotImage($aWidth,$aHeight); + + $this->cache = new ImgStreamCache($this->img); + $this->cache->SetTimeOut($aTimeOut); + + $this->title = new Text(); + $this->title->ParagraphAlign('center'); + $this->title->SetFont(FF_FONT2,FS_BOLD); + $this->title->SetMargin(3); + $this->title->SetAlign('center'); + + $this->subtitle = new Text(); + $this->subtitle->ParagraphAlign('center'); + $this->subtitle->SetMargin(2); + $this->subtitle->SetAlign('center'); + + $this->subsubtitle = new Text(); + $this->subsubtitle->ParagraphAlign('center'); + $this->subsubtitle->SetMargin(2); + $this->subsubtitle->SetAlign('center'); + + $this->legend = new Legend(); + $this->footer = new Footer(); + + // Window doesn't like '?' in the file name so replace it with an '_' + $aCachedName = str_replace("?","_",$aCachedName); + + // If the cached version exist just read it directly from the + // cache, stream it back to browser and exit + if( $aCachedName!="" && READ_CACHE && $aInline ) + if( $this->cache->GetAndStream($aCachedName) ) { + exit(); + } + + $this->cache_name = $aCachedName; + $this->SetTickDensity(); // Normal density + + $this->tabtitle = new GraphTabTitle(); + } +//--------------- +// PUBLIC METHODS + // Enable final image perspective transformation + function Set3DPerspective($aDir=1,$aHorizon=100,$aSkewDist=120,$aQuality=false,$aFillColor='#FFFFFF',$aBorder=false,$aMinSize=true,$aHorizonPos=0.5) { + $this->iImgTrans = true; + $this->iImgTransHorizon = $aHorizon; + $this->iImgTransSkewDist= $aSkewDist; + $this->iImgTransDirection = $aDir; + $this->iImgTransMinSize = $aMinSize; + $this->iImgTransFillColor=$aFillColor; + $this->iImgTransHighQ=$aQuality; + $this->iImgTransBorder=$aBorder; + $this->iImgTransHorizonPos=$aHorizonPos; + } + + // Set Image format and optional quality + function SetImgFormat($aFormat,$aQuality=75) { + $this->img->SetImgFormat($aFormat,$aQuality); + } + + // Should the grid be in front or back of the plot? + function SetGridDepth($aDepth) { + $this->grid_depth=$aDepth; + } + + function SetIconDepth($aDepth) { + $this->iIconDepth=$aDepth; + } + + // Specify graph angle 0-360 degrees. + function SetAngle($aAngle) { + $this->img->SetAngle($aAngle); + } + + function SetAlphaBlending($aFlg=true) { + $this->img->SetAlphaBlending($aFlg); + } + + // Shortcut to image margin + function SetMargin($lm,$rm,$tm,$bm) { + $this->img->SetMargin($lm,$rm,$tm,$bm); + } + + function SetY2OrderBack($aBack=true) { + $this->y2orderback = $aBack; + } + + // Rotate the graph 90 degrees and set the margin + // when we have done a 90 degree rotation + function Set90AndMargin($lm=0,$rm=0,$tm=0,$bm=0) { + $lm = $lm ==0 ? floor(0.2 * $this->img->width) : $lm ; + $rm = $rm ==0 ? floor(0.1 * $this->img->width) : $rm ; + $tm = $tm ==0 ? floor(0.2 * $this->img->height) : $tm ; + $bm = $bm ==0 ? floor(0.1 * $this->img->height) : $bm ; + + $adj = ($this->img->height - $this->img->width)/2; + $this->img->SetMargin($tm-$adj,$bm-$adj,$rm+$adj,$lm+$adj); + $this->img->SetCenter(floor($this->img->width/2),floor($this->img->height/2)); + $this->SetAngle(90); + if( empty($this->yaxis) || empty($this->xaxis) ) { + JpgraphError::RaiseL(25009);//('You must specify what scale to use with a call to Graph::SetScale()'); + } + $this->xaxis->SetLabelAlign('right','center'); + $this->yaxis->SetLabelAlign('center','bottom'); + } + + function SetClipping($aFlg=true) { + $this->iDoClipping = $aFlg ; + } + + // Add a plot object to the graph + function Add(&$aPlot) { + if( $aPlot == null ) + JpGraphError::RaiseL(25010);//("Graph::Add() You tried to add a null plot to the graph."); + if( is_array($aPlot) && count($aPlot) > 0 ) + $cl = $aPlot[0]; + else + $cl = $aPlot; + + if( is_a($cl,'Text') ) + $this->AddText($aPlot); + elseif( is_a($cl,'PlotLine') ) + $this->AddLine($aPlot); + elseif( is_a($cl,'PlotBand') ) + $this->AddBand($aPlot); + elseif( is_a($cl,'IconPlot') ) + $this->AddIcon($aPlot); + elseif( is_a($cl,'GTextTable') ) + $this->AddTable($aPlot); + else + $this->plots[] = &$aPlot; + } + + + function AddTable(&$aTable) { + if( is_array($aTable) ) { + for($i=0; $i < count($aTable); ++$i ) + $this->iTables[]=&$aTable[$i]; + } + else { + $this->iTables[] = &$aTable ; + } + } + + function AddIcon(&$aIcon) { + if( is_array($aIcon) ) { + for($i=0; $i < count($aIcon); ++$i ) + $this->iIcons[]=&$aIcon[$i]; + } + else { + $this->iIcons[] = &$aIcon ; + } + } + + // Add plot to second Y-scale + function AddY2(&$aPlot) { + if( $aPlot == null ) + JpGraphError::RaiseL(25011);//("Graph::AddY2() You tried to add a null plot to the graph."); + + if( is_array($aPlot) && count($aPlot) > 0 ) + $cl = $aPlot[0]; + else + $cl = $aPlot; + + if( is_a($cl,'Text') ) + $this->AddText($aPlot,true); + elseif( is_a($cl,'PlotLine') ) + $this->AddLine($aPlot,true); + elseif( is_a($cl,'PlotBand') ) + $this->AddBand($aPlot,true); + else + $this->y2plots[] = &$aPlot; + } + + // Add plot to second Y-scale + function AddY($aN,&$aPlot) { + + if( $aPlot == null ) + JpGraphError::RaiseL(25012);//("Graph::AddYN() You tried to add a null plot to the graph."); + + if( is_array($aPlot) && count($aPlot) > 0 ) + $cl = $aPlot[0]; + else + $cl = $aPlot; + + if( is_a($cl,'Text') || is_a($cl,'PlotLine') || is_a($cl,'PlotBand') ) + JpGraph::RaiseL(25013);//('You can only add standard plots to multiple Y-axis'); + else + $this->ynplots[$aN][] = &$aPlot; + } + + // Add text object to the graph + function AddText(&$aTxt,$aToY2=false) { + if( $aTxt == null ) + JpGraphError::RaiseL(25014);//("Graph::AddText() You tried to add a null text to the graph."); + if( $aToY2 ) { + if( is_array($aTxt) ) { + for($i=0; $i < count($aTxt); ++$i ) + $this->y2texts[]=&$aTxt[$i]; + } + else + $this->y2texts[] = &$aTxt; + } + else { + if( is_array($aTxt) ) { + for($i=0; $i < count($aTxt); ++$i ) + $this->texts[]=&$aTxt[$i]; + } + else + $this->texts[] = &$aTxt; + } + } + + // Add a line object (class PlotLine) to the graph + function AddLine(&$aLine,$aToY2=false) { + if( $aLine == null ) + JpGraphError::RaiseL(25015);//("Graph::AddLine() You tried to add a null line to the graph."); + + if( $aToY2 ) { + if( is_array($aLine) ) { + for($i=0; $i < count($aLine); ++$i ) + $this->y2lines[]=&$aLine[$i]; + } + else + $this->y2lines[] = &$aLine; + } + else { + if( is_array($aLine) ) { + for($i=0; $i < count($aLine); ++$i ) + $this->lines[]=&$aLine[$i]; + } + else + $this->lines[] = &$aLine; + } + } + + // Add vertical or horizontal band + function AddBand(&$aBand,$aToY2=false) { + if( $aBand == null ) + JpGraphError::RaiseL(25016);//(" Graph::AddBand() You tried to add a null band to the graph."); + + if( $aToY2 ) { + if( is_array($aBand) ) { + for($i=0; $i < count($aBand); ++$i ) + $this->y2bands[] = &$aBand[$i]; + } + else + $this->y2bands[] = &$aBand; + } + else { + if( is_array($aBand) ) { + for($i=0; $i < count($aBand); ++$i ) + $this->bands[] = &$aBand[$i]; + } + else + $this->bands[] = &$aBand; + } + } + + function SetBackgroundGradient($aFrom='navy',$aTo='silver',$aGradType=2,$aStyle=BGRAD_FRAME) { + $this->bkg_gradtype=$aGradType; + $this->bkg_gradstyle=$aStyle; + $this->bkg_gradfrom = $aFrom; + $this->bkg_gradto = $aTo; + } + + // Set a country flag in the background + function SetBackgroundCFlag($aName,$aBgType=BGIMG_FILLPLOT,$aMix=100) { + $this->background_cflag = $aName; + $this->background_cflag_type = $aBgType; + $this->background_cflag_mix = $aMix; + } + + // Alias for the above method + function SetBackgroundCountryFlag($aName,$aBgType=BGIMG_FILLPLOT,$aMix=100) { + $this->background_cflag = $aName; + $this->background_cflag_type = $aBgType; + $this->background_cflag_mix = $aMix; + } + + + // Specify a background image + function SetBackgroundImage($aFileName,$aBgType=BGIMG_FILLPLOT,$aImgFormat="auto") { + + // Get extension to determine image type + if( $aImgFormat == "auto" ) { + $e = explode('.',$aFileName); + if( !$e ) { + JpGraphError::RaiseL(25018,$aFileName);//('Incorrect file name for Graph::SetBackgroundImage() : '.$aFileName.' Must have a valid image extension (jpg,gif,png) when using autodetection of image type'); + } + + $valid_formats = array('png', 'jpg', 'gif'); + $aImgFormat = strtolower($e[count($e)-1]); + if ($aImgFormat == 'jpeg') { + $aImgFormat = 'jpg'; + } + elseif (!in_array($aImgFormat, $valid_formats) ) { + JpGraphError::RaiseL(25019,$aImgFormat);//('Unknown file extension ($aImgFormat) in Graph::SetBackgroundImage() for filename: '.$aFileName); + } + } + + $this->background_image = $aFileName; + $this->background_image_type=$aBgType; + $this->background_image_format=$aImgFormat; + } + + function SetBackgroundImageMix($aMix) { + $this->background_image_mix = $aMix ; + } + + // Specify axis style (boxed or single) + function SetAxisStyle($aStyle) { + $this->iAxisStyle = $aStyle ; + } + + // Set a frame around the plot area + function SetBox($aDrawPlotFrame=true,$aPlotFrameColor=array(0,0,0),$aPlotFrameWeight=1) { + $this->boxed = $aDrawPlotFrame; + $this->box_weight = $aPlotFrameWeight; + $this->box_color = $aPlotFrameColor; + } + + // Specify color for the plotarea (not the margins) + function SetColor($aColor) { + $this->plotarea_color=$aColor; + } + + // Specify color for the margins (all areas outside the plotarea) + function SetMarginColor($aColor) { + $this->margin_color=$aColor; + } + + // Set a frame around the entire image + function SetFrame($aDrawImgFrame=true,$aImgFrameColor=array(0,0,0),$aImgFrameWeight=1) { + $this->doframe = $aDrawImgFrame; + $this->frame_color = $aImgFrameColor; + $this->frame_weight = $aImgFrameWeight; + } + + function SetFrameBevel($aDepth=3,$aBorder=false,$aBorderColor='black',$aColor1='white@0.4',$aColor2='darkgray@0.4',$aFlg=true) { + $this->framebevel = $aFlg ; + $this->framebeveldepth = $aDepth ; + $this->framebevelborder = $aBorder ; + $this->framebevelbordercolor = $aBorderColor ; + $this->framebevelcolor1 = $aColor1 ; + $this->framebevelcolor2 = $aColor2 ; + + $this->doshadow = false ; + } + + // Set the shadow around the whole image + function SetShadow($aShowShadow=true,$aShadowWidth=5,$aShadowColor=array(102,102,102)) { + $this->doshadow = $aShowShadow; + $this->shadow_color = $aShadowColor; + $this->shadow_width = $aShadowWidth; + $this->footer->iBottomMargin += $aShadowWidth; + $this->footer->iRightMargin += $aShadowWidth; + } + + // Specify x,y scale. Note that if you manually specify the scale + // you must also specify the tick distance with a call to Ticks::Set() + function SetScale($aAxisType,$aYMin=1,$aYMax=1,$aXMin=1,$aXMax=1) { + $this->axtype = $aAxisType; + + if( $aYMax < $aYMin || $aXMax < $aXMin ) + JpGraphError::RaiseL(25020);//('Graph::SetScale(): Specified Max value must be larger than the specified Min value.'); + + $yt=substr($aAxisType,-3,3); + if( $yt=="lin" ) + $this->yscale = new LinearScale($aYMin,$aYMax); + elseif( $yt == "int" ) { + $this->yscale = new LinearScale($aYMin,$aYMax); + $this->yscale->SetIntScale(); + } + elseif( $yt=="log" ) + $this->yscale = new LogScale($aYMin,$aYMax); + else + JpGraphError::RaiseL(25021,$aAxisType);//("Unknown scale specification for Y-scale. ($aAxisType)"); + + $xt=substr($aAxisType,0,3); + if( $xt == "lin" || $xt == "tex" ) { + $this->xscale = new LinearScale($aXMin,$aXMax,"x"); + $this->xscale->textscale = ($xt == "tex"); + } + elseif( $xt == "int" ) { + $this->xscale = new LinearScale($aXMin,$aXMax,"x"); + $this->xscale->SetIntScale(); + } + elseif( $xt == "dat" ) { + $this->xscale = new DateScale($aXMin,$aXMax,"x"); + } + elseif( $xt == "log" ) + $this->xscale = new LogScale($aXMin,$aXMax,"x"); + else + JpGraphError::RaiseL(25022,$aAxisType);//(" Unknown scale specification for X-scale. ($aAxisType)"); + + $this->xaxis = new Axis($this->img,$this->xscale); + $this->yaxis = new Axis($this->img,$this->yscale); + $this->xgrid = new Grid($this->xaxis); + $this->ygrid = new Grid($this->yaxis); + $this->ygrid->Show(); + } + + // Specify secondary Y scale + function SetY2Scale($aAxisType="lin",$aY2Min=1,$aY2Max=1) { + if( $aAxisType=="lin" ) + $this->y2scale = new LinearScale($aY2Min,$aY2Max); + elseif( $aAxisType == "int" ) { + $this->y2scale = new LinearScale($aY2Min,$aY2Max); + $this->y2scale->SetIntScale(); + } + elseif( $aAxisType=="log" ) { + $this->y2scale = new LogScale($aY2Min,$aY2Max); + } + else JpGraphError::RaiseL(25023,$aAxisType);//("JpGraph: Unsupported Y2 axis type: $aAxisType\nMust be one of (lin,log,int)"); + + $this->y2axis = new Axis($this->img,$this->y2scale); + $this->y2axis->scale->ticks->SetDirection(SIDE_LEFT); + $this->y2axis->SetLabelSide(SIDE_RIGHT); + $this->y2axis->SetPos('max'); + $this->y2axis->SetTitleSide(SIDE_RIGHT); + + // Deafult position is the max x-value + $this->y2grid = new Grid($this->y2axis); + } + + // Set the delta position (in pixels) between the multiple Y-axis + function SetYDeltaDist($aDist) { + $this->iYAxisDeltaPos = $aDist; + } + + // Specify secondary Y scale + function SetYScale($aN,$aAxisType="lin",$aYMin=1,$aYMax=1) { + + if( $aAxisType=="lin" ) + $this->ynscale[$aN] = new LinearScale($aYMin,$aYMax); + elseif( $aAxisType == "int" ) { + $this->ynscale[$aN] = new LinearScale($aYMin,$aYMax); + $this->ynscale[$aN]->SetIntScale(); + } + elseif( $aAxisType=="log" ) { + $this->ynscale[$aN] = new LogScale($aYMin,$aYMax); + } + else JpGraphError::RaiseL(25024,$aAxisType);//("JpGraph: Unsupported Y axis type: $aAxisType\nMust be one of (lin,log,int)"); + + $this->ynaxis[$aN] = new Axis($this->img,$this->ynscale[$aN]); + $this->ynaxis[$aN]->scale->ticks->SetDirection(SIDE_LEFT); + $this->ynaxis[$aN]->SetLabelSide(SIDE_RIGHT); + } + + + // Specify density of ticks when autoscaling 'normal', 'dense', 'sparse', 'verysparse' + // The dividing factor have been determined heuristically according to my aesthetic + // sense (or lack off) y.m.m.v ! + function SetTickDensity($aYDensity=TICKD_NORMAL,$aXDensity=TICKD_NORMAL) { + $this->xtick_factor=30; + $this->ytick_factor=25; + switch( $aYDensity ) { + case TICKD_DENSE: + $this->ytick_factor=12; + break; + case TICKD_NORMAL: + $this->ytick_factor=25; + break; + case TICKD_SPARSE: + $this->ytick_factor=40; + break; + case TICKD_VERYSPARSE: + $this->ytick_factor=100; + break; + default: + JpGraphError::RaiseL(25025,$densy);//("JpGraph: Unsupported Tick density: $densy"); + } + switch( $aXDensity ) { + case TICKD_DENSE: + $this->xtick_factor=15; + break; + case TICKD_NORMAL: + $this->xtick_factor=30; + break; + case TICKD_SPARSE: + $this->xtick_factor=45; + break; + case TICKD_VERYSPARSE: + $this->xtick_factor=60; + break; + default: + JpGraphError::RaiseL(25025,$densx);//("JpGraph: Unsupported Tick density: $densx"); + } + } + + + // Get a string of all image map areas + function GetCSIMareas() { + if( !$this->iHasStroked ) + $this->Stroke(_CSIM_SPECIALFILE); + + $csim = $this->title->GetCSIMAreas(); + $csim .= $this->subtitle->GetCSIMAreas(); + $csim .= $this->subsubtitle->GetCSIMAreas(); + $csim .= $this->legend->GetCSIMAreas(); + + if( $this->y2axis != NULL ) { + $csim .= $this->y2axis->title->GetCSIMAreas(); + } + + if( $this->texts != null ) { + $n = count($this->texts); + for($i=0; $i < $n; ++$i ) { + $csim .= $this->texts[$i]->GetCSIMAreas(); + } + } + + if( $this->y2texts != null && $this->y2scale != null ) { + $n = count($this->y2texts); + for($i=0; $i < $n; ++$i ) { + $csim .= $this->y2texts[$i]->GetCSIMAreas(); + } + } + + if( $this->yaxis != null && $this->xaxis != null ) { + $csim .= $this->yaxis->title->GetCSIMAreas(); + $csim .= $this->xaxis->title->GetCSIMAreas(); + } + + $n = count($this->plots); + for( $i=0; $i < $n; ++$i ) + $csim .= $this->plots[$i]->GetCSIMareas(); + + $n = count($this->y2plots); + for( $i=0; $i < $n; ++$i ) + $csim .= $this->y2plots[$i]->GetCSIMareas(); + + $n = count($this->ynaxis); + for( $i=0; $i < $n; ++$i ) { + $m = count($this->ynplots[$i]); + for($j=0; $j < $m; ++$j ) { + $csim .= $this->ynplots[$i][$j]->GetCSIMareas(); + } + } + + $n = count($this->iTables); + for( $i=0; $i < $n; ++$i ) { + $csim .= $this->iTables[$i]->GetCSIMareas(); + } + + return $csim; + } + + // Get a complete .. tag for the final image map + function GetHTMLImageMap($aMapName) { + $im = "\n"; + $im .= $this->GetCSIMareas(); + $im .= ""; + return $im; + } + + function CheckCSIMCache($aCacheName,$aTimeOut=60) { + global $_SERVER; + + if( $aCacheName=='auto' ) + $aCacheName=basename($_SERVER['PHP_SELF']); + + $urlarg = $this->GetURLArguments(); + $this->csimcachename = CSIMCACHE_DIR.$aCacheName.$urlarg; + $this->csimcachetimeout = $aTimeOut; + + // First determine if we need to check for a cached version + // This differs from the standard cache in the sense that the + // image and CSIM map HTML file is written relative to the directory + // the script executes in and not the specified cache directory. + // The reason for this is that the cache directory is not necessarily + // accessible from the HTTP server. + if( $this->csimcachename != '' ) { + $dir = dirname($this->csimcachename); + $base = basename($this->csimcachename); + $base = strtok($base,'.'); + $suffix = strtok('.'); + $basecsim = $dir.'/'.$base.'?'.$urlarg.'_csim_.html'; + $baseimg = $dir.'/'.$base.'?'.$urlarg.'.'.$this->img->img_format; + + $timedout=false; + // Does it exist at all ? + + if( file_exists($basecsim) && file_exists($baseimg) ) { + // Check that it hasn't timed out + $diff=time()-filemtime($basecsim); + if( $this->csimcachetimeout>0 && ($diff > $this->csimcachetimeout*60) ) { + $timedout=true; + @unlink($basecsim); + @unlink($baseimg); + } + else { + if ($fh = @fopen($basecsim, "r")) { + fpassthru($fh); + return true; + } + else + JpGraphError::RaiseL(25027,$basecsim);//(" Can't open cached CSIM \"$basecsim\" for reading."); + } + } + } + return false; + } + + // Build the argument string to be used with the csim images + function GetURLArguments() { + + // This is a JPGRAPH internal defined that prevents + // us from recursively coming here again + $urlarg = _CSIM_DISPLAY.'=1'; + + // Now reconstruct any user URL argument + reset($_GET); + while( list($key,$value) = each($_GET) ) { + if( is_array($value) ) { + foreach ( $value as $k => $v ) { + $urlarg .= '&'.$key.'%5B'.$k.'%5D='.urlencode($v); + } + } + else { + $urlarg .= '&'.$key.'='.urlencode($value); + } + } + + // It's not ideal to convert POST argument to GET arguments + // but there is little else we can do. One idea for the + // future might be recreate the POST header in case. + reset($_POST); + while( list($key,$value) = each($_POST) ) { + if( is_array($value) ) { + foreach ( $value as $k => $v ) { + $urlarg .= '&'.$key.'%5B'.$k.'%5D='.urlencode($v); + } + } + else { + $urlarg .= '&'.$key.'='.urlencode($value); + } + } + + return $urlarg; + } + + function SetCSIMImgAlt($aAlt) { + $this->iCSIMImgAlt = $aAlt; + } + + function StrokeCSIM($aScriptName='auto',$aCSIMName='',$aBorder=0) { + if( $aCSIMName=='' ) { + // create a random map name + srand ((double) microtime() * 1000000); + $r = rand(0,100000); + $aCSIMName='__mapname'.$r.'__'; + } + + if( $aScriptName=='auto' ) + $aScriptName=basename($_SERVER['PHP_SELF']); + + $urlarg = $this->GetURLArguments(); + + if( empty($_GET[_CSIM_DISPLAY]) ) { + // First determine if we need to check for a cached version + // This differs from the standard cache in the sense that the + // image and CSIM map HTML file is written relative to the directory + // the script executes in and not the specified cache directory. + // The reason for this is that the cache directory is not necessarily + // accessible from the HTTP server. + if( $this->csimcachename != '' ) { + $dir = dirname($this->csimcachename); + $base = basename($this->csimcachename); + $base = strtok($base,'.'); + $suffix = strtok('.'); + $basecsim = $dir.'/'.$base.'?'.$urlarg.'_csim_.html'; + $baseimg = $base.'?'.$urlarg.'.'.$this->img->img_format; + + // Check that apache can write to directory specified + + if( file_exists($dir) && !is_writeable($dir) ) { + JpgraphError::RaiseL(25028,$dir);//('Apache/PHP does not have permission to write to the CSIM cache directory ('.$dir.'). Check permissions.'); + } + + // Make sure directory exists + $this->cache->MakeDirs($dir); + + // Write the image file + $this->Stroke(CSIMCACHE_DIR.$baseimg); + + // Construct wrapper HTML and write to file and send it back to browser + + // In the src URL we must replace the '?' with its encoding to prevent the arguments + // to be converted to real arguments. + $tmp = str_replace('?','%3f',$baseimg); + $htmlwrap = $this->GetHTMLImageMap($aCSIMName)."\n". + '\"".$this-iCSIMImgAlt."\" />\n"; + + if($fh = @fopen($basecsim,'w') ) { + fwrite($fh,$htmlwrap); + fclose($fh); + echo $htmlwrap; + } + else + JpGraphError::RaiseL(25029,$basecsim);//(" Can't write CSIM \"$basecsim\" for writing. Check free space and permissions."); + } + else { + + if( $aScriptName=='' ) { + JpGraphError::RaiseL(25030);//('Missing script name in call to StrokeCSIM(). You must specify the name of the actual image script as the first parameter to StrokeCSIM().'); + } + echo $this->GetHTMLImageMap($aCSIMName); + echo "\"".$this-iCSIMImgAlt."\" />\n"; + } + } + else { + $this->Stroke(); + } + } + + function GetTextsYMinMax($aY2=false) { + if( $aY2 ) + $txts = $this->y2texts; + else + $txts = $this->texts; + $n = count($txts); + $min=null; + $max=null; + for( $i=0; $i < $n; ++$i ) { + if( $txts[$i]->iScalePosY !== null && + $txts[$i]->iScalePosX !== null ) { + if( $min === null ) { + $min = $max = $txts[$i]->iScalePosY ; + } + else { + $min = min($min,$txts[$i]->iScalePosY); + $max = max($max,$txts[$i]->iScalePosY); + } + } + } + if( $min !== null ) { + return array($min,$max); + } + else + return null; + } + + function GetTextsXMinMax($aY2=false) { + if( $aY2 ) + $txts = $this->y2texts; + else + $txts = $this->texts; + $n = count($txts); + $min=null; + $max=null; + for( $i=0; $i < $n; ++$i ) { + if( $txts[$i]->iScalePosY !== null && + $txts[$i]->iScalePosX !== null ) { + if( $min === null ) { + $min = $max = $txts[$i]->iScalePosX ; + } + else { + $min = min($min,$txts[$i]->iScalePosX); + $max = max($max,$txts[$i]->iScalePosX); + } + } + } + if( $min !== null ) { + return array($min,$max); + } + else + return null; + } + + function GetXMinMax() { + list($min,$ymin) = $this->plots[0]->Min(); + list($max,$ymax) = $this->plots[0]->Max(); + foreach( $this->plots as $p ) { + list($xmin,$ymin) = $p->Min(); + list($xmax,$ymax) = $p->Max(); + $min = Min($xmin,$min); + $max = Max($xmax,$max); + } + + if( $this->y2axis != null ) { + foreach( $this->y2plots as $p ) { + list($xmin,$ymin) = $p->Min(); + list($xmax,$ymax) = $p->Max(); + $min = Min($xmin,$min); + $max = Max($xmax,$max); + } + } + + $n = count($this->ynaxis); + for( $i=0; $i < $n; ++$i ) { + if( $this->ynaxis[$i] != null) { + foreach( $this->ynplots[$i] as $p ) { + list($xmin,$ymin) = $p->Min(); + list($xmax,$ymax) = $p->Max(); + $min = Min($xmin,$min); + $max = Max($xmax,$max); + } + } + } + + return array($min,$max); + } + + function AdjustMarginsForTitles() { + $totrequired = + ($this->title->t != '' ? + $this->title->GetTextHeight($this->img) + $this->title->margin + 5 : 0 ) + + ($this->subtitle->t != '' ? + $this->subtitle->GetTextHeight($this->img) + $this->subtitle->margin + 5 : 0 ) + + ($this->subsubtitle->t != '' ? + $this->subsubtitle->GetTextHeight($this->img) + $this->subsubtitle->margin + 5 : 0 ) ; + + + $btotrequired = 0; + if($this->xaxis != null && !$this->xaxis->hide && !$this->xaxis->hide_labels ) { + // Minimum bottom margin + if( $this->xaxis->title->t != '' ) { + if( $this->img->a == 90 ) + $btotrequired = $this->yaxis->title->GetTextHeight($this->img) + 5 ; + else + $btotrequired = $this->xaxis->title->GetTextHeight($this->img) + 5 ; + } + else + $btotrequired = 0; + + if( $this->img->a == 90 ) { + $this->img->SetFont($this->yaxis->font_family,$this->yaxis->font_style, + $this->yaxis->font_size); + $lh = $this->img->GetTextHeight('Mg',$this->yaxis->label_angle); + } + else { + $this->img->SetFont($this->xaxis->font_family,$this->xaxis->font_style, + $this->xaxis->font_size); + $lh = $this->img->GetTextHeight('Mg',$this->xaxis->label_angle); + } + + $btotrequired += $lh + 5; + } + + if( $this->img->a == 90 ) { + // DO Nothing. It gets too messy to do this properly for 90 deg... + } + else{ + if( $this->img->top_margin < $totrequired ) { + $this->SetMargin($this->img->left_margin,$this->img->right_margin, + $totrequired,$this->img->bottom_margin); + } + if( $this->img->bottom_margin < $btotrequired ) { + $this->SetMargin($this->img->left_margin,$this->img->right_margin, + $this->img->top_margin,$btotrequired); + } + } + } + + // Stroke the graph + // $aStrokeFileName If != "" the image will be written to this file and NOT + // streamed back to the browser + function Stroke($aStrokeFileName="") { + + // Fist make a sanity check that user has specified a scale + if( empty($this->yscale) ) { + JpGraphError::RaiseL(25031);//('You must specify what scale to use with a call to Graph::SetScale().'); + } + + // Start by adjusting the margin so that potential titles will fit. + $this->AdjustMarginsForTitles(); + + // Setup scale constants + if( $this->yscale ) $this->yscale->InitConstants($this->img); + if( $this->xscale ) $this->xscale->InitConstants($this->img); + if( $this->y2scale ) $this->y2scale->InitConstants($this->img); + + $n=count($this->ynscale); + for($i=0; $i < $n; ++$i) { + if( $this->ynscale[$i] ) $this->ynscale[$i]->InitConstants($this->img); + } + + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // a best we can. Therefor you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); + + // We need to know if we have stroked the plot in the + // GetCSIMareas. Otherwise the CSIM hasn't been generated + // and in the case of GetCSIM called before stroke to generate + // CSIM without storing an image to disk GetCSIM must call Stroke. + $this->iHasStroked = true; + + // Do any pre-stroke adjustment that is needed by the different plot types + // (i.e bar plots want's to add an offset to the x-labels etc) + for($i=0; $i < count($this->plots) ; ++$i ) { + $this->plots[$i]->PreStrokeAdjust($this); + $this->plots[$i]->DoLegend($this); + } + + // Any plots on the second Y scale? + if( $this->y2scale != null ) { + for($i=0; $iy2plots) ; ++$i ) { + $this->y2plots[$i]->PreStrokeAdjust($this); + $this->y2plots[$i]->DoLegend($this); + } + } + + // Any plots on the extra Y axises? + $n = count($this->ynaxis); + for($i=0; $i<$n ; ++$i ) { + if( $this->ynplots == null || $this->ynplots[$i] == null) { + JpGraphError::RaiseL(25032,$i);//("No plots for Y-axis nbr:$i"); + } + $m = count($this->ynplots[$i]); + for($j=0; $j < $m; ++$j ) { + $this->ynplots[$i][$j]->PreStrokeAdjust($this); + $this->ynplots[$i][$j]->DoLegend($this); + } + } + + + // Bail out if any of the Y-axis not been specified and + // has no plots. (This means it is impossible to do autoscaling and + // no other scale was given so we can't possible draw anything). If you use manual + // scaling you also have to supply the tick steps as well. + if( (!$this->yscale->IsSpecified() && count($this->plots)==0) || + ($this->y2scale!=null && !$this->y2scale->IsSpecified() && count($this->y2plots)==0) ) { + //$e = "n=".count($this->y2plots)."\n"; + // $e = "Can't draw unspecified Y-scale.
\nYou have either:
\n"; + // $e .= "1. Specified an Y axis for autoscaling but have not supplied any plots
\n"; + // $e .= "2. Specified a scale manually but have forgot to specify the tick steps"; + JpGraphError::RaiseL(25026); + } + + // Bail out if no plots and no specified X-scale + if( (!$this->xscale->IsSpecified() && count($this->plots)==0 && count($this->y2plots)==0) ) + JpGraphError::RaiseL(25034);//("JpGraph: Can't draw unspecified X-scale.
No plots.
"); + + //Check if we should autoscale y-axis + if( !$this->yscale->IsSpecified() && count($this->plots)>0 ) { + list($min,$max) = $this->GetPlotsYMinMax($this->plots); + $lres = $this->GetLinesYMinMax($this->lines); + if( is_array($lres) ) { + list($linmin,$linmax) = $lres ; + $min = min($min,$linmin); + $max = max($max,$linmax); + } + $tres = $this->GetTextsYMinMax(); + if( is_array($tres) ) { + list($tmin,$tmax) = $tres ; + $min = min($min,$tmin); + $max = max($max,$tmax); + } + $this->yscale->AutoScale($this->img,$min,$max, + $this->img->plotheight/$this->ytick_factor); + } + elseif( $this->yscale->IsSpecified() && + ( $this->yscale->auto_ticks || !$this->yscale->ticks->IsSpecified()) ) { + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + $min = $this->yscale->scale[0]; + $max = $this->yscale->scale[1]; + $this->yscale->AutoScale($this->img,$min,$max, + $this->img->plotheight/$this->ytick_factor, + $this->yscale->auto_ticks); + } + + if( $this->y2scale != null) { + + if( !$this->y2scale->IsSpecified() && count($this->y2plots)>0 ) { + list($min,$max) = $this->GetPlotsYMinMax($this->y2plots); + $lres = $this->GetLinesYMinMax($this->y2lines); + if( is_array($lres) ) { + list($linmin,$linmax) = $lres ; + $min = min($min,$linmin); + $max = max($max,$linmax); + } + $tres = $this->GetTextsYMinMax(true); + if( is_array($tres) ) { + list($tmin,$tmax) = $tres ; + $min = min($min,$tmin); + $max = max($max,$tmax); + } + $this->y2scale->AutoScale($this->img,$min,$max,$this->img->plotheight/$this->ytick_factor); + } + elseif( $this->y2scale->IsSpecified() && + ( $this->y2scale->auto_ticks || !$this->y2scale->ticks->IsSpecified()) ) { + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + $min = $this->y2scale->scale[0]; + $max = $this->y2scale->scale[1]; + $this->y2scale->AutoScale($this->img,$min,$max, + $this->img->plotheight/$this->ytick_factor, + $this->y2scale->auto_ticks); + } + } + + // + // Autoscale the multiple Y-axis + // + $n = count($this->ynaxis); + for( $i=0; $i < $n; ++$i ) { + if( $this->ynscale[$i] != null) { + if( !$this->ynscale[$i]->IsSpecified() && count($this->ynplots[$i])>0 ) { + list($min,$max) = $this->GetPlotsYMinMax($this->ynplots[$i]); + $this->ynscale[$i]->AutoScale($this->img,$min,$max,$this->img->plotheight/$this->ytick_factor); + } + elseif( $this->ynscale[$i]->IsSpecified() && + ( $this->ynscale[$i]->auto_ticks || !$this->ynscale[$i]->ticks->IsSpecified()) ) { + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + $min = $this->ynscale[$i]->scale[0]; + $max = $this->ynscale[$i]->scale[1]; + $this->ynscale[$i]->AutoScale($this->img,$min,$max, + $this->img->plotheight/$this->ytick_factor, + $this->ynscale[$i]->auto_ticks); + } + } + } + + + //Check if we should autoscale x-axis + if( !$this->xscale->IsSpecified() ) { + if( substr($this->axtype,0,4) == "text" ) { + $max=0; + $n = count($this->plots); + for($i=0; $i < $n; ++$i ) { + $p = $this->plots[$i]; + // We need some unfortunate sub class knowledge here in order + // to increase number of data points in case it is a line plot + // which has the barcenter set. If not it could mean that the + // last point of the data is outside the scale since the barcenter + // settings means that we will shift the entire plot half a tick step + // to the right in oder to align with the center of the bars. + if( is_a($p,'BarPlot') || empty($p->barcenter)) { + $max=max($max,$p->numpoints-1); + } + else { + $max=max($max,$p->numpoints); + } + } + $min=0; + if( $this->y2axis != null ) { + foreach( $this->y2plots as $p ) { + $max=max($max,$p->numpoints-1); + } + } + $n = count($this->ynaxis); + for( $i=0; $i < $n; ++$i ) { + if( $this->ynaxis[$i] != null) { + foreach( $this->ynplots[$i] as $p ) { + $max=max($max,$p->numpoints-1); + } + } + } + + $this->xscale->Update($this->img,$min,$max); + $this->xscale->ticks->Set($this->xaxis->tick_step,1); + $this->xscale->ticks->SupressMinorTickMarks(); + } + else { + list($min,$max) = $this->GetXMinMax(); + + $lres = $this->GetLinesXMinMax($this->lines); + if( $lres ) { + list($linmin,$linmax) = $lres ; + $min = min($min,$linmin); + $max = max($max,$linmax); + } + $lres = $this->GetLinesXMinMax($this->y2lines); + if( $lres ) { + list($linmin,$linmax) = $lres ; + $min = min($min,$linmin); + $max = max($max,$linmax); + } + + $tres = $this->GetTextsXMinMax(); + if( $tres ) { + list($tmin,$tmax) = $tres ; + $min = min($min,$tmin); + $max = max($max,$tmax); + } + + $tres = $this->GetTextsXMinMax(true); + if( $tres ) { + list($tmin,$tmax) = $tres ; + $min = min($min,$tmin); + $max = max($max,$tmax); + } + + $this->xscale->AutoScale($this->img,$min,$max,round($this->img->plotwidth/$this->xtick_factor)); + } + + //Adjust position of y-axis and y2-axis to minimum/maximum of x-scale + if( !is_numeric($this->yaxis->pos) && !is_string($this->yaxis->pos) ) + $this->yaxis->SetPos($this->xscale->GetMinVal()); + if( $this->y2axis != null ) { + if( !is_numeric($this->y2axis->pos) && !is_string($this->y2axis->pos) ) + $this->y2axis->SetPos($this->xscale->GetMaxVal()); + $this->y2axis->SetTitleSide(SIDE_RIGHT); + } + + $n = count($this->ynaxis); + $nY2adj = $this->y2axis != null ? $this->iYAxisDeltaPos : 0; + for( $i=0; $i < $n; ++$i ) { + if( $this->ynaxis[$i] != null ) { + if( !is_numeric($this->ynaxis[$i]->pos) && !is_string($this->ynaxis[$i]->pos) ) { + $this->ynaxis[$i]->SetPos($this->xscale->GetMaxVal()); + $this->ynaxis[$i]->SetPosAbsDelta($i*$this->iYAxisDeltaPos + $nY2adj); + } + $this->ynaxis[$i]->SetTitleSide(SIDE_RIGHT); + } + } + } + elseif( $this->xscale->IsSpecified() && + ( $this->xscale->auto_ticks || !$this->xscale->ticks->IsSpecified()) ) { + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + $min = $this->xscale->scale[0]; + $max = $this->xscale->scale[1]; + + + $this->xscale->AutoScale($this->img,$min,$max, + $this->img->plotwidth/$this->xtick_factor, + false); + + if( $this->y2axis != null ) { + if( !is_numeric($this->y2axis->pos) && !is_string($this->y2axis->pos) ) + $this->y2axis->SetPos($this->xscale->GetMaxVal()); + $this->y2axis->SetTitleSide(SIDE_RIGHT); + } + + } + + // If we have a negative values and x-axis position is at 0 + // we need to supress the first and possible the last tick since + // they will be drawn on top of the y-axis (and possible y2 axis) + // The test below might seem strange the reasone being that if + // the user hasn't specified a value for position this will not + // be set until we do the stroke for the axis so as of now it + // is undefined. + // For X-text scale we ignore all this since the tick are usually + // much further in and not close to the Y-axis. Hence the test + // for 'text' + + if( ($this->yaxis->pos==$this->xscale->GetMinVal() || + (is_string($this->yaxis->pos) && $this->yaxis->pos=='min')) && + !is_numeric($this->xaxis->pos) && $this->yscale->GetMinVal() < 0 && + substr($this->axtype,0,4) != 'text' && $this->xaxis->pos!="min" ) { + + //$this->yscale->ticks->SupressZeroLabel(false); + $this->xscale->ticks->SupressFirst(); + if( $this->y2axis != null ) { + $this->xscale->ticks->SupressLast(); + } + } + elseif( !is_numeric($this->yaxis->pos) && $this->yaxis->pos=='max' ) { + $this->xscale->ticks->SupressLast(); + } + + + if( !$_csim ) { + $this->StrokePlotArea(); + if( $this->iIconDepth == DEPTH_BACK ) { + $this->StrokeIcons(); + } + } + $this->StrokeAxis(false); + + // Stroke bands + if( $this->bands != null && !$_csim) + for($i=0; $i < count($this->bands); ++$i) { + // Stroke all bands that asks to be in the background + if( $this->bands[$i]->depth == DEPTH_BACK ) + $this->bands[$i]->Stroke($this->img,$this->xscale,$this->yscale); + } + + if( $this->y2bands != null && $this->y2scale != null && !$_csim ) + for($i=0; $i < count($this->y2bands); ++$i) { + // Stroke all bands that asks to be in the foreground + if( $this->y2bands[$i]->depth == DEPTH_BACK ) + $this->y2bands[$i]->Stroke($this->img,$this->xscale,$this->y2scale); + } + + + if( $this->grid_depth == DEPTH_BACK && !$_csim) { + $this->ygrid->Stroke(); + $this->xgrid->Stroke(); + } + + // Stroke Y2-axis + if( $this->y2axis != null && !$_csim) { + $this->y2axis->Stroke($this->xscale); + $this->y2grid->Stroke(); + } + + // Stroke yn-axis + $n = count($this->ynaxis); + for( $i=0; $i < $n; ++$i ) { + $this->ynaxis[$i]->Stroke($this->xscale); + } + + $oldoff=$this->xscale->off; + if(substr($this->axtype,0,4)=="text") { + if( $this->text_scale_abscenteroff > -1 ) { + // For a text scale the scale factor is the number of pixel per step. + // Hence we can use the scale factor as a substitute for number of pixels + // per major scale step and use that in order to adjust the offset so that + // an object of width "abscenteroff" becomes centered. + $this->xscale->off += round($this->xscale->scale_factor/2)-round($this->text_scale_abscenteroff/2); + } + else { + $this->xscale->off += + ceil($this->xscale->scale_factor*$this->text_scale_off*$this->xscale->ticks->minor_step); + } + } + + if( $this->iDoClipping ) { + $oldimage = $this->img->CloneCanvasH(); + } + + if( ! $this->y2orderback ) { + // Stroke all plots for Y axis + for($i=0; $i < count($this->plots); ++$i) { + $this->plots[$i]->Stroke($this->img,$this->xscale,$this->yscale); + $this->plots[$i]->StrokeMargin($this->img); + } + } + + // Stroke all plots for Y2 axis + if( $this->y2scale != null ) + for($i=0; $i< count($this->y2plots); ++$i ) { + $this->y2plots[$i]->Stroke($this->img,$this->xscale,$this->y2scale); + } + + if( $this->y2orderback ) { + // Stroke all plots for Y1 axis + for($i=0; $i < count($this->plots); ++$i) { + $this->plots[$i]->Stroke($this->img,$this->xscale,$this->yscale); + $this->plots[$i]->StrokeMargin($this->img); + } + } + + $n = count($this->ynaxis); + for( $i=0; $i < $n; ++$i ) { + $m = count($this->ynplots[$i]); + for( $j=0; $j < $m; ++$j ) { + $this->ynplots[$i][$j]->Stroke($this->img,$this->xscale,$this->ynscale[$i]); + $this->ynplots[$i][$j]->StrokeMargin($this->img); + } + } + + if( $this->iIconDepth == DEPTH_FRONT) { + $this->StrokeIcons(); + } + + if( $this->iDoClipping ) { + // Clipping only supports graphs at 0 and 90 degrees + if( $this->img->a == 0 ) { + $this->img->CopyCanvasH($oldimage,$this->img->img, + $this->img->left_margin,$this->img->top_margin, + $this->img->left_margin,$this->img->top_margin, + $this->img->plotwidth+1,$this->img->plotheight); + } + elseif( $this->img->a == 90 ) { + $adj = ($this->img->height - $this->img->width)/2; + $this->img->CopyCanvasH($oldimage,$this->img->img, + $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, + $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, + $this->img->plotheight+1,$this->img->plotwidth); + } + else { + JpGraphError::RaiseL(25035,$this->img->a);//('You have enabled clipping. Cliping is only supported for graphs at 0 or 90 degrees rotation. Please adjust you current angle (='.$this->img->a.' degrees) or disable clipping.'); + } + $this->img->Destroy(); + $this->img->SetCanvasH($oldimage); + } + + $this->xscale->off=$oldoff; + + if( $this->grid_depth == DEPTH_FRONT && !$_csim ) { + $this->ygrid->Stroke(); + $this->xgrid->Stroke(); + } + + // Stroke bands + if( $this->bands!= null ) + for($i=0; $i < count($this->bands); ++$i) { + // Stroke all bands that asks to be in the foreground + if( $this->bands[$i]->depth == DEPTH_FRONT ) + $this->bands[$i]->Stroke($this->img,$this->xscale,$this->yscale); + } + + if( $this->y2bands!= null && $this->y2scale != null ) + for($i=0; $i < count($this->y2bands); ++$i) { + // Stroke all bands that asks to be in the foreground + if( $this->y2bands[$i]->depth == DEPTH_FRONT ) + $this->y2bands[$i]->Stroke($this->img,$this->xscale,$this->y2scale); + } + + + // Stroke any lines added + if( $this->lines != null ) { + for($i=0; $i < count($this->lines); ++$i) { + $this->lines[$i]->Stroke($this->img,$this->xscale,$this->yscale); + $this->lines[$i]->DoLegend($this); + } + } + + if( $this->y2lines != null && $this->y2scale != null ) { + for($i=0; $i < count($this->y2lines); ++$i) { + $this->y2lines[$i]->Stroke($this->img,$this->xscale,$this->y2scale); + $this->y2lines[$i]->DoLegend($this); + } + } + + // Finally draw the axis again since some plots may have nagged + // the axis in the edges.However we do no stroke the labels again + // since any user defined callback would be called twice. It also + // enhances performance. + + if( !$_csim ) { + $this->StrokeAxis(); + } + + if( $this->y2scale != null && !$_csim ) + $this->y2axis->Stroke($this->xscale,false); + + if( !$_csim ) { + $this->StrokePlotBox(); + } + + // The titles and legends never gets rotated so make sure + // that the angle is 0 before stroking them + $aa = $this->img->SetAngle(0); + $this->StrokeTitles(); + $this->footer->Stroke($this->img); + $this->legend->Stroke($this->img); + $this->img->SetAngle($aa); + $this->StrokeTexts(); + $this->StrokeTables(); + + if( !$_csim ) { + + $this->img->SetAngle($aa); + + // Draw an outline around the image map + if(_JPG_DEBUG) { + $this->DisplayClientSideaImageMapAreas(); + } + + // Should we do any final image transformation + if( $this->iImgTrans ) { + if( !class_exists('ImgTrans') ) { + require_once('jpgraph_imgtrans.php'); + //JpGraphError::Raise('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.'); + } + + $tform = new ImgTrans($this->img->img); + $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, + $this->iImgTransDirection,$this->iImgTransHighQ, + $this->iImgTransMinSize,$this->iImgTransFillColor, + $this->iImgTransBorder); + } + + // If the filename is given as the special "__handle" + // then the image handler is returned and the image is NOT + // streamed back + if( $aStrokeFileName == _IMG_HANDLER ) { + return $this->img->img; + } + else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName); + } + } + } + + function SetAxisLabelBackground($aType,$aXFColor='lightgray',$aXColor='black',$aYFColor='lightgray',$aYColor='black') { + $this->iAxisLblBgType = $aType; + $this->iXAxisLblBgFillColor = $aXFColor; + $this->iXAxisLblBgColor = $aXColor; + $this->iYAxisLblBgFillColor = $aYFColor; + $this->iYAxisLblBgColor = $aYColor; + } + +//--------------- +// PRIVATE METHODS + + function StrokeAxisLabelBackground() { + // Types + // 0 = No background + // 1 = Only X-labels, length of axis + // 2 = Only Y-labels, length of axis + // 3 = As 1 but extends to width of graph + // 4 = As 2 but extends to height of graph + // 5 = Combination of 3 & 4 + // 6 = Combination of 1 & 2 + + $t = $this->iAxisLblBgType ; + if( $t < 1 ) return; + // Stroke optional X-axis label background color + if( $t == 1 || $t == 3 || $t == 5 || $t == 6 ) { + $this->img->PushColor($this->iXAxisLblBgFillColor); + if( $t == 1 || $t == 6 ) { + $xl = $this->img->left_margin; + $yu = $this->img->height - $this->img->bottom_margin + 1; + $xr = $this->img->width - $this->img->right_margin ; + $yl = $this->img->height-1-$this->frame_weight; + } + else { // t==3 || t==5 + $xl = $this->frame_weight; + $yu = $this->img->height - $this->img->bottom_margin + 1; + $xr = $this->img->width - 1 - $this->frame_weight; + $yl = $this->img->height-1-$this->frame_weight; + } + + $this->img->FilledRectangle($xl,$yu,$xr,$yl); + $this->img->PopColor(); + + // Check if we should add the vertical lines at left and right edge + if( $this->iXAxisLblBgColor !== '' ) { + $this->img->PushColor($this->iXAxisLblBgColor); + if( $t == 1 || $t == 6 ) { + $this->img->Line($xl,$yu,$xl,$yl); + $this->img->Line($xr,$yu,$xr,$yl); + } + else { + $xl = $this->img->width - $this->img->right_margin ; + $this->img->Line($xl,$yu-1,$xr,$yu-1); + } + $this->img->PopColor(); + } + } + + if( $t == 2 || $t == 4 || $t == 5 || $t == 6 ) { + $this->img->PushColor($this->iYAxisLblBgFillColor); + if( $t == 2 || $t == 6 ) { + $xl = $this->frame_weight; + $yu = $this->frame_weight+$this->img->top_margin; + $xr = $this->img->left_margin - 1; + $yl = $this->img->height - $this->img->bottom_margin + 1; + } + else { + $xl = $this->frame_weight; + $yu = $this->frame_weight; + $xr = $this->img->left_margin - 1; + $yl = $this->img->height-1-$this->frame_weight; + } + + $this->img->FilledRectangle($xl,$yu,$xr,$yl); + $this->img->PopColor(); + + // Check if we should add the vertical lines at left and right edge + if( $this->iXAxisLblBgColor !== '' ) { + $this->img->PushColor($this->iXAxisLblBgColor); + if( $t == 2 || $t == 6 ) { + $this->img->Line($xl,$yu-1,$xr,$yu-1); + $this->img->Line($xl,$yl-1,$xr,$yl-1); + } + else { + $this->img->Line($xr+1,$yu,$xr+1,$this->img->top_margin); + } + $this->img->PopColor(); + } + + } + } + + function StrokeAxis($aStrokeLabels=true) { + + if( $aStrokeLabels ) { + $this->StrokeAxisLabelBackground(); + } + + // Stroke axis + if( $this->iAxisStyle != AXSTYLE_SIMPLE ) { + switch( $this->iAxisStyle ) { + case AXSTYLE_BOXIN : + $toppos = SIDE_DOWN; + $bottompos = SIDE_UP; + $leftpos = SIDE_RIGHT; + $rightpos = SIDE_LEFT; + break; + case AXSTYLE_BOXOUT : + $toppos = SIDE_UP; + $bottompos = SIDE_DOWN; + $leftpos = SIDE_LEFT; + $rightpos = SIDE_RIGHT; + break; + case AXSTYLE_YBOXIN: + $toppos = -100; + $bottompos = SIDE_UP; + $leftpos = SIDE_RIGHT; + $rightpos = SIDE_LEFT; + break; + case AXSTYLE_YBOXOUT: + $toppos = -100; + $bottompos = SIDE_DOWN; + $leftpos = SIDE_LEFT; + $rightpos = SIDE_RIGHT; + break; + default: + JpGRaphError::RaiseL(25036,$this->iAxisStyle); //('Unknown AxisStyle() : '.$this->iAxisStyle); + break; + } + $this->xaxis->SetPos('min'); + + // By default we hide the first label so it doesn't cross the + // Y-axis in case the positon hasn't been set by the user. + // However, if we use a box we always want the first value + // displayed so we make sure it will be displayed. + $this->xscale->ticks->SupressFirst(false); + + $this->xaxis->SetLabelSide(SIDE_DOWN); + $this->xaxis->scale->ticks->SetSide($bottompos); + $this->xaxis->Stroke($this->yscale); + + if( $toppos != -100 ) { + // To avoid side effects we work on a new copy + $maxis = $this->xaxis; + $maxis->SetPos('max'); + $maxis->SetLabelSide(SIDE_UP); + $maxis->SetLabelMargin(7); + $this->xaxis->scale->ticks->SetSide($toppos); + $maxis->Stroke($this->yscale); + } + + $this->yaxis->SetPos('min'); + $this->yaxis->SetLabelMargin(10); + $this->yaxis->SetLabelSide(SIDE_LEFT); + $this->yaxis->scale->ticks->SetSide($leftpos); + $this->yaxis->Stroke($this->xscale); + + $myaxis = $this->yaxis; + $myaxis->SetPos('max'); + $myaxis->SetLabelMargin(10); + $myaxis->SetLabelSide(SIDE_RIGHT); + $myaxis->title->Set(''); + $myaxis->scale->ticks->SetSide($rightpos); + $myaxis->Stroke($this->xscale); + + } + else { + $this->xaxis->Stroke($this->yscale,$aStrokeLabels); + $this->yaxis->Stroke($this->xscale,$aStrokeLabels); + } + } + + + // Private helper function for backgound image + function LoadBkgImage($aImgFormat='',$aFile='',$aImgStr='') { + if( $aImgStr != '' ) { + return Image::CreateFromString($aImgStr); + } + + // Remove case sensitivity and setup appropriate function to create image + // Get file extension. This should be the LAST '.' separated part of the filename + $e = explode('.',$aFile); + $ext = strtolower($e[count($e)-1]); + if ($ext == "jpeg") { + $ext = "jpg"; + } + + if( trim($ext) == '' ) + $ext = 'png'; // Assume PNG if no extension specified + + if( $aImgFormat == '' ) + $imgtag = $ext; + else + $imgtag = $aImgFormat; + + $supported = imagetypes(); + if( ( $ext == 'jpg' && !($supported & IMG_JPG) ) || + ( $ext == 'gif' && !($supported & IMG_GIF) ) || + ( $ext == 'png' && !($supported & IMG_PNG) ) || + ( $ext == 'bmp' && !($supported & IMG_WBMP) ) || + ( $ext == 'xpm' && !($supported & IMG_XPM) ) ) { + JpGraphError::RaiseL(25037,$aFile);//('The image format of your background image ('.$aFile.') is not supported in your system configuration. '); + } + + + if( $imgtag == "jpg" || $imgtag == "jpeg") + { + $f = "imagecreatefromjpeg"; + $imgtag = "jpg"; + } + else + { + $f = "imagecreatefrom".$imgtag; + } + + // Compare specified image type and file extension + if( $imgtag != $ext ) { + //$t = "Background image seems to be of different type (has different file extension) than specified imagetype. Specified: '".$aImgFormat."'File: '".$aFile."'"; + JpGraphError::RaiseL(25038, $aImgFormat, $aFile); + } + + $img = @$f($aFile); + if( !$img ) { + JpGraphError::RaiseL(25039,$aFile);//(" Can't read background image: '".$aFile."'"); + } + return $img; + } + + function StrokeBackgroundGrad() { + if( $this->bkg_gradtype < 0 ) + return; + $grad = new Gradient($this->img); + if( $this->bkg_gradstyle == BGRAD_PLOT ) { + $xl = $this->img->left_margin; + $yt = $this->img->top_margin; + $xr = $xl + $this->img->plotwidth+1 ; + $yb = $yt + $this->img->plotheight ; + $grad->FilledRectangle($xl,$yt,$xr,$yb,$this->bkg_gradfrom,$this->bkg_gradto,$this->bkg_gradtype); + } + else { + $xl = 0; + $yt = 0; + $xr = $xl + $this->img->width - 1; + $yb = $yt + $this->img->height; + if( $this->doshadow ) { + $xr -= $this->shadow_width; + $yb -= $this->shadow_width; + } + if( $this->doframe ) { + $yt += $this->frame_weight; + $yb -= $this->frame_weight; + $xl += $this->frame_weight; + $xr -= $this->frame_weight; + } + $aa = $this->img->SetAngle(0); + $grad->FilledRectangle($xl,$yt,$xr,$yb,$this->bkg_gradfrom,$this->bkg_gradto,$this->bkg_gradtype); + $aa = $this->img->SetAngle($aa); + } + } + + function StrokeFrameBackground() { + if( $this->background_image != "" && $this->background_cflag != "" ) { + JpGraphError::RaiseL(25040);//('It is not possible to specify both a background image and a background country flag.'); + } + if( $this->background_image != "" ) { + $bkgimg = $this->LoadBkgImage($this->background_image_format,$this->background_image); + } + elseif( $this->background_cflag != "" ) { + if( ! class_exists('FlagImages') ) { + JpGraphError::RaiseL(25041);//('In order to use Country flags as backgrounds you must include the "jpgraph_flags.php" file.'); + } + $fobj = new FlagImages(FLAGSIZE4); + $dummy=''; + $bkgimg = $fobj->GetImgByName($this->background_cflag,$dummy); + $this->background_image_mix = $this->background_cflag_mix; + $this->background_image_type = $this->background_cflag_type; + } + else { + return ; + } + + $bw = ImageSX($bkgimg); + $bh = ImageSY($bkgimg); + + // No matter what the angle is we always stroke the image and frame + // assuming it is 0 degree + $aa = $this->img->SetAngle(0); + + switch( $this->background_image_type ) { + case BGIMG_FILLPLOT: // Resize to just fill the plotarea + $this->FillMarginArea(); + $this->StrokeFrame(); + // Special case to hande 90 degree rotated graph corectly + if( $aa == 90 ) { + $this->img->SetAngle(90); + $this->FillPlotArea(); + $aa = $this->img->SetAngle(0); + $adj = ($this->img->height - $this->img->width)/2; + $this->img->CopyMerge($bkgimg, + $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, + 0,0, + $this->img->plotheight+1,$this->img->plotwidth, + $bw,$bh,$this->background_image_mix); + + } + else { + $this->FillPlotArea(); + $this->img->CopyMerge($bkgimg, + $this->img->left_margin,$this->img->top_margin, + 0,0,$this->img->plotwidth+1,$this->img->plotheight, + $bw,$bh,$this->background_image_mix); + } + break; + case BGIMG_FILLFRAME: // Fill the whole area from upper left corner, resize to just fit + $hadj=0; $vadj=0; + if( $this->doshadow ) { + $hadj = $this->shadow_width; + $vadj = $this->shadow_width; + } + $this->FillMarginArea(); + $this->FillPlotArea(); + $this->img->CopyMerge($bkgimg,0,0,0,0,$this->img->width-$hadj,$this->img->height-$vadj, + $bw,$bh,$this->background_image_mix); + $this->StrokeFrame(); + break; + case BGIMG_COPY: // Just copy the image from left corner, no resizing + $this->FillMarginArea(); + $this->FillPlotArea(); + $this->img->CopyMerge($bkgimg,0,0,0,0,$bw,$bh, + $bw,$bh,$this->background_image_mix); + $this->StrokeFrame(); + break; + case BGIMG_CENTER: // Center original image in the plot area + $this->FillMarginArea(); + $this->FillPlotArea(); + $centerx = round($this->img->plotwidth/2+$this->img->left_margin-$bw/2); + $centery = round($this->img->plotheight/2+$this->img->top_margin-$bh/2); + $this->img->CopyMerge($bkgimg,$centerx,$centery,0,0,$bw,$bh, + $bw,$bh,$this->background_image_mix); + $this->StrokeFrame(); + break; + default: + JpGraphError::RaiseL(25042);//(" Unknown background image layout"); + } + $this->img->SetAngle($aa); + } + + // Private + // Draw a frame around the image + function StrokeFrame() { + if( !$this->doframe ) return; + + if( $this->background_image_type <= 1 && + ($this->bkg_gradtype < 0 || ($this->bkg_gradtype > 0 && $this->bkg_gradstyle==BGRAD_PLOT)) ) { + $c = $this->margin_color; + } + else { + $c = false; + } + + if( $this->doshadow ) { + $this->img->SetColor($this->frame_color); + $this->img->ShadowRectangle(0,0,$this->img->width,$this->img->height, + $c,$this->shadow_width,$this->shadow_color); + } + elseif( $this->framebevel ) { + if( $c ) { + $this->img->SetColor($this->margin_color); + $this->img->FilledRectangle(0,0,$this->img->width-1,$this->img->height-1); + } + $this->img->Bevel(1,1,$this->img->width-2,$this->img->height-2, + $this->framebeveldepth, + $this->framebevelcolor1,$this->framebevelcolor2); + if( $this->framebevelborder ) { + $this->img->SetColor($this->framebevelbordercolor); + $this->img->Rectangle(0,0,$this->img->width-1,$this->img->height-1); + } + } + else { + $this->img->SetLineWeight($this->frame_weight); + if( $c ) { + $this->img->SetColor($this->margin_color); + $this->img->FilledRectangle(0,0,$this->img->width-1,$this->img->height-1); + } + $this->img->SetColor($this->frame_color); + $this->img->Rectangle(0,0,$this->img->width-1,$this->img->height-1); + } + } + + function FillMarginArea() { + $hadj=0; $vadj=0; + if( $this->doshadow ) { + $hadj = $this->shadow_width; + $vadj = $this->shadow_width; + } + + $this->img->SetColor($this->margin_color); +// $this->img->FilledRectangle(0,0,$this->img->width-1-$hadj,$this->img->height-1-$vadj); + + $this->img->FilledRectangle(0,0,$this->img->width-1-$hadj,$this->img->top_margin); + $this->img->FilledRectangle(0,$this->img->top_margin,$this->img->left_margin,$this->img->height-1-$hadj); + $this->img->FilledRectangle($this->img->left_margin+1, + $this->img->height-$this->img->bottom_margin, + $this->img->width-1-$hadj, + $this->img->height-1-$hadj); + $this->img->FilledRectangle($this->img->width-$this->img->right_margin, + $this->img->top_margin+1, + $this->img->width-1-$hadj, + $this->img->height-$this->img->bottom_margin-1); + } + + function FillPlotArea() { + $this->img->PushColor($this->plotarea_color); + $this->img->FilledRectangle($this->img->left_margin, + $this->img->top_margin, + $this->img->width-$this->img->right_margin, + $this->img->height-$this->img->bottom_margin); + $this->img->PopColor(); + } + + // Stroke the plot area with either a solid color or a background image + function StrokePlotArea() { + // Note: To be consistent we really should take a possible shadow + // into account. However, that causes some problem for the LinearScale class + // since in the current design it does not have any links to class Graph which + // means it has no way of compensating for the adjusted plotarea in case of a + // shadow. So, until I redesign LinearScale we can't compensate for this. + // So just set the two adjustment parameters to zero for now. + $boxadj = 0; //$this->doframe ? $this->frame_weight : 0 ; + $adj = 0; //$this->doshadow ? $this->shadow_width : 0 ; + + if( $this->background_image != "" || $this->background_cflag != "" ) { + $this->StrokeFrameBackground(); + } + else { + $aa = $this->img->SetAngle(0); + $this->StrokeFrame(); + $aa = $this->img->SetAngle($aa); + $this->StrokeBackgroundGrad(); + if( $this->bkg_gradtype < 0 || + ($this->bkg_gradtype > 0 && $this->bkg_gradstyle==BGRAD_MARGIN) ) { + $this->FillPlotArea(); + } + } + } + + function StrokeIcons() { + $n = count($this->iIcons); + for( $i=0; $i < $n; ++$i ) { + $this->iIcons[$i]->StrokeWithScale($this->img,$this->xscale,$this->yscale); + } + } + + function StrokePlotBox() { + // Should we draw a box around the plot area? + if( $this->boxed ) { + $this->img->SetLineWeight(1); + $this->img->SetLineStyle('solid'); + $this->img->SetColor($this->box_color); + for($i=0; $i < $this->box_weight; ++$i ) { + $this->img->Rectangle( + $this->img->left_margin-$i,$this->img->top_margin-$i, + $this->img->width-$this->img->right_margin+$i, + $this->img->height-$this->img->bottom_margin+$i); + } + } + } + + function SetTitleBackgroundFillStyle($aStyle,$aColor1='black',$aColor2='white') { + $this->titlebkg_fillstyle = $aStyle; + $this->titlebkg_scolor1 = $aColor1; + $this->titlebkg_scolor2 = $aColor2; + } + + function SetTitleBackground($aBackColor='gray', $aStyle=TITLEBKG_STYLE1, $aFrameStyle=TITLEBKG_FRAME_NONE, $aFrameColor='black', $aFrameWeight=1, $aBevelHeight=3, $aEnable=true) { + $this->titlebackground = $aEnable; + $this->titlebackground_color = $aBackColor; + $this->titlebackground_style = $aStyle; + $this->titlebackground_framecolor = $aFrameColor; + $this->titlebackground_framestyle = $aFrameStyle; + $this->titlebackground_frameweight = $aFrameWeight; + $this->titlebackground_bevelheight = $aBevelHeight ; + } + + + function StrokeTitles() { + + $margin=3; + + if( $this->titlebackground ) { + + // Find out height + $this->title->margin += 2 ; + $h = $this->title->GetTextHeight($this->img)+$this->title->margin+$margin; + if( $this->subtitle->t != "" && !$this->subtitle->hide ) { + $h += $this->subtitle->GetTextHeight($this->img)+$margin+ + $this->subtitle->margin; + $h += 2; + } + if( $this->subsubtitle->t != "" && !$this->subsubtitle->hide ) { + $h += $this->subsubtitle->GetTextHeight($this->img)+$margin+ + $this->subsubtitle->margin; + $h += 2; + } + $this->img->PushColor($this->titlebackground_color); + if( $this->titlebackground_style === TITLEBKG_STYLE1 ) { + // Inside the frame + if( $this->framebevel ) { + $x1 = $y1 = $this->framebeveldepth + 1 ; + $x2 = $this->img->width - $this->framebeveldepth - 2 ; + $this->title->margin += $this->framebeveldepth + 1 ; + $h += $y1 ; + $h += 2; + } + else { + $x1 = $y1 = $this->frame_weight; + $x2 = $this->img->width - 2*$x1; + } + } + elseif( $this->titlebackground_style === TITLEBKG_STYLE2 ) { + // Cover the frame as well + $x1 = $y1 = 0; + $x2 = $this->img->width - 1 ; + } + elseif( $this->titlebackground_style === TITLEBKG_STYLE3 ) { + // Cover the frame as well (the difference is that + // for style==3 a bevel frame border is on top + // of the title background) + $x1 = $y1 = 0; + $x2 = $this->img->width - 1 ; + $h += $this->framebeveldepth ; + $this->title->margin += $this->framebeveldepth ; + } + else { + JpGraphError::RaiseL(25043);//('Unknown title background style.'); + } + + if( $this->titlebackground_framestyle === 3 ) { + $h += $this->titlebackground_bevelheight*2 + 1 ; + $this->title->margin += $this->titlebackground_bevelheight ; + } + + if( $this->doshadow ) { + $x2 -= $this->shadow_width ; + } + + $indent=0; + if( $this->titlebackground_framestyle == TITLEBKG_FRAME_BEVEL ) { + $ind = $this->titlebackground_bevelheight; + } + + if( $this->titlebkg_fillstyle==TITLEBKG_FILLSTYLE_HSTRIPED ) { + $this->img->FilledRectangle2($x1+$ind,$y1+$ind,$x2-$ind,$h-$ind, + $this->titlebkg_scolor1, + $this->titlebkg_scolor2); + } + elseif( $this->titlebkg_fillstyle==TITLEBKG_FILLSTYLE_VSTRIPED ) { + $this->img->FilledRectangle2($x1+$ind,$y1+$ind,$x2-$ind,$h-$ind, + $this->titlebkg_scolor1, + $this->titlebkg_scolor2,2); + } + else { + // Solid fill + $this->img->FilledRectangle($x1,$y1,$x2,$h); + } + $this->img->PopColor(); + + $this->img->PushColor($this->titlebackground_framecolor); + $this->img->SetLineWeight($this->titlebackground_frameweight); + if( $this->titlebackground_framestyle == TITLEBKG_FRAME_FULL ) { + // Frame background + $this->img->Rectangle($x1,$y1,$x2,$h); + } + elseif( $this->titlebackground_framestyle == TITLEBKG_FRAME_BOTTOM ) { + // Bottom line only + $this->img->Line($x1,$h,$x2,$h); + } + elseif( $this->titlebackground_framestyle == TITLEBKG_FRAME_BEVEL ) { + $this->img->Bevel($x1,$y1,$x2,$h,$this->titlebackground_bevelheight); + } + $this->img->PopColor(); + + // This is clumsy. But we neeed to stroke the whole graph frame if it is + // set to bevel to get the bevel shading on top of the text background + if( $this->framebevel && $this->doframe && + $this->titlebackground_style === 3 ) { + $this->img->Bevel(1,1,$this->img->width-2,$this->img->height-2, + $this->framebeveldepth, + $this->framebevelcolor1,$this->framebevelcolor2); + if( $this->framebevelborder ) { + $this->img->SetColor($this->framebevelbordercolor); + $this->img->Rectangle(0,0,$this->img->width-1,$this->img->height-1); + } + } + } + + // Stroke title + $y = $this->title->margin; + if( $this->title->halign == 'center' ) + $this->title->Center(0,$this->img->width,$y); + elseif( $this->title->halign == 'left' ) { + $this->title->SetPos($this->title->margin+2,$y); + } + elseif( $this->title->halign == 'right' ) { + $indent = 0; + if( $this->doshadow ) + $indent = $this->shadow_width+2; + $this->title->SetPos($this->img->width-$this->title->margin-$indent,$y,'right'); + } + $this->title->Stroke($this->img); + + // ... and subtitle + $y += $this->title->GetTextHeight($this->img) + $margin + $this->subtitle->margin; + if( $this->subtitle->halign == 'center' ) + $this->subtitle->Center(0,$this->img->width,$y); + elseif( $this->subtitle->halign == 'left' ) { + $this->subtitle->SetPos($this->subtitle->margin+2,$y); + } + elseif( $this->subtitle->halign == 'right' ) { + $indent = 0; + if( $this->doshadow ) + $indent = $this->shadow_width+2; + $this->subtitle->SetPos($this->img->width-$this->subtitle->margin-$indent,$y,'right'); + } + $this->subtitle->Stroke($this->img); + + // ... and subsubtitle + $y += $this->subtitle->GetTextHeight($this->img) + $margin + $this->subsubtitle->margin; + if( $this->subsubtitle->halign == 'center' ) + $this->subsubtitle->Center(0,$this->img->width,$y); + elseif( $this->subsubtitle->halign == 'left' ) { + $this->subsubtitle->SetPos($this->subsubtitle->margin+2,$y); + } + elseif( $this->subsubtitle->halign == 'right' ) { + $indent = 0; + if( $this->doshadow ) + $indent = $this->shadow_width+2; + $this->subsubtitle->SetPos($this->img->width-$this->subsubtitle->margin-$indent,$y,'right'); + } + $this->subsubtitle->Stroke($this->img); + + // ... and fancy title + $this->tabtitle->Stroke($this->img); + + } + + function StrokeTexts() { + // Stroke any user added text objects + if( $this->texts != null ) { + for($i=0; $i < count($this->texts); ++$i) { + $this->texts[$i]->StrokeWithScale($this->img,$this->xscale,$this->yscale); + } + } + + if( $this->y2texts != null && $this->y2scale != null ) { + for($i=0; $i < count($this->y2texts); ++$i) { + $this->y2texts[$i]->StrokeWithScale($this->img,$this->xscale,$this->y2scale); + } + } + + } + + function StrokeTables() { + if( $this->iTables != null ) { + $n = count($this->iTables); + for( $i=0; $i < $n; ++$i ) { + $this->iTables[$i]->StrokeWithScale($this->img,$this->xscale,$this->yscale); + } + } + } + + function DisplayClientSideaImageMapAreas() { + // Debug stuff - display the outline of the image map areas + $csim=''; + foreach ($this->plots as $p) { + $csim.= $p->GetCSIMareas(); + } + $csim .= $this->legend->GetCSIMareas(); + if (preg_match_all("/area shape=\"(\w+)\" coords=\"([0-9\, ]+)\"/", $csim, $coords)) { + $this->img->SetColor($this->csimcolor); + $n = count($coords[0]); + for ($i=0; $i < $n; $i++) { + if ($coords[1][$i]=="poly") { + preg_match_all('/\s*([0-9]+)\s*,\s*([0-9]+)\s*,*/',$coords[2][$i],$pts); + $this->img->SetStartPoint($pts[1][count($pts[0])-1],$pts[2][count($pts[0])-1]); + $m = count($pts[0]); + for ($j=0; $j < $m; $j++) { + $this->img->LineTo($pts[1][$j],$pts[2][$j]); + } + } else if ($coords[1][$i]=="rect") { + $pts = preg_split('/,/', $coords[2][$i]); + $this->img->SetStartPoint($pts[0],$pts[1]); + $this->img->LineTo($pts[2],$pts[1]); + $this->img->LineTo($pts[2],$pts[3]); + $this->img->LineTo($pts[0],$pts[3]); + $this->img->LineTo($pts[0],$pts[1]); + } + } + } + } + + // Text scale offset in fractions of a major scale step + function SetTextScaleOff($aOff) { + $this->text_scale_off = $aOff; + $this->xscale->text_scale_off = $aOff; + } + + // Text width of bar to be centered in absolute pixels + function SetTextScaleAbsCenterOff($aOff) { + $this->text_scale_abscenteroff = $aOff; + } + + // Get Y min and max values for added lines + function GetLinesYMinMax( $aLines ) { + $n = count($aLines); + if( $n == 0 ) return false; + $min = $aLines[0]->scaleposition ; + $max = $min ; + $flg = false; + for( $i=0; $i < $n; ++$i ) { + if( $aLines[$i]->direction == HORIZONTAL ) { + $flg = true ; + $v = $aLines[$i]->scaleposition ; + if( $min > $v ) $min = $v ; + if( $max < $v ) $max = $v ; + } + } + return $flg ? array($min,$max) : false ; + } + + // Get X min and max values for added lines + function GetLinesXMinMax( $aLines ) { + $n = count($aLines); + if( $n == 0 ) return false ; + $min = $aLines[0]->scaleposition ; + $max = $min ; + $flg = false; + for( $i=0; $i < $n; ++$i ) { + if( $aLines[$i]->direction == VERTICAL ) { + $flg = true ; + $v = $aLines[$i]->scaleposition ; + if( $min > $v ) $min = $v ; + if( $max < $v ) $max = $v ; + } + } + return $flg ? array($min,$max) : false ; + } + + // Get min and max values for all included plots + function GetPlotsYMinMax(&$aPlots) { + $n = count($aPlots); + $i=0; + do { + list($xmax,$max) = $aPlots[$i]->Max(); + } while( ++$i < $n && !is_numeric($max) ); + + $i=0; + do { + list($xmin,$min) = $aPlots[$i]->Min(); + } while( ++$i < $n && !is_numeric($min) ); + + if( !is_numeric($min) || !is_numeric($max) ) { + JpGraphError::RaiseL(25044);//('Cannot use autoscaling since it is impossible to determine a valid min/max value of the Y-axis (only null values).'); + } + + list($xmax,$max) = $aPlots[0]->Max(); + list($xmin,$min) = $aPlots[0]->Min(); + for($i=0; $i < count($aPlots); ++$i ) { + list($xmax,$ymax)=$aPlots[$i]->Max(); + list($xmin,$ymin)=$aPlots[$i]->Min(); + if (is_numeric($ymax)) $max=max($max,$ymax); + if (is_numeric($ymin)) $min=min($min,$ymin); + } + if( $min == '' ) $min = 0; + if( $max == '' ) $max = 0; + if( $min == 0 && $max == 0 ) { + // Special case if all values are 0 + $min=0;$max=1; + } + return array($min,$max); + } + +} // Class + + + +//=================================================== +// CLASS LineProperty +// Description: Holds properties for a line +//=================================================== +class LineProperty { + var $iWeight=1, $iColor="black",$iStyle="solid"; + var $iShow=true; + +//--------------- +// PUBLIC METHODS + function SetColor($aColor) { + $this->iColor = $aColor; + } + + function SetWeight($aWeight) { + $this->iWeight = $aWeight; + } + + function SetStyle($aStyle) { + $this->iStyle = $aStyle; + } + + function Show($aShow=true) { + $this->iShow=$aShow; + } + + function Stroke(&$aImg,$aX1,$aY1,$aX2,$aY2) { + if( $this->iShow ) { + $aImg->PushColor($this->iColor); + $oldls = $aImg->line_style; + $oldlw = $aImg->line_weight; + $aImg->SetLineWeight($this->iWeight); + $aImg->SetLineStyle($this->iStyle); + $aImg->StyleLine($aX1,$aY1,$aX2,$aY2); + $aImg->PopColor($this->iColor); + $aImg->line_style = $oldls; + $aImg->line_weight = $oldlw; + + } + } +} + + +//=================================================== +// CLASS Text +// Description: Arbitrary text object that can be added to the graph +//=================================================== +class Text { + var $t,$x=0,$y=0,$halign="left",$valign="top",$color=array(0,0,0); + var $font_family=FF_FONT1,$font_style=FS_NORMAL,$font_size=10; + var $hide=false, $dir=0; + var $boxed=false; // Should the text be boxed + var $paragraph_align="left"; + var $margin=0; + var $icornerradius=0,$ishadowwidth=3; + var $iScalePosY=null,$iScalePosX=null; + var $iWordwrap=0; + var $fcolor='white',$bcolor='black',$shadow=false; + var $iCSIMarea='',$iCSIMalt='',$iCSIMtarget='',$iCSIMWinTarget=''; + +//--------------- +// CONSTRUCTOR + + // Create new text at absolute pixel coordinates + function Text($aTxt='',$aXAbsPos=0,$aYAbsPos=0) { + if( ! is_string($aTxt) ) { + JpGraphError::RaiseL(25050);//('First argument to Text::Text() must be s atring.'); + } + $this->t = $aTxt; + $this->x = round($aXAbsPos); + $this->y = round($aYAbsPos); + $this->margin = 0; + } +//--------------- +// PUBLIC METHODS + // Set the string in the text object + function Set($aTxt) { + $this->t = $aTxt; + } + + // Alias for Pos() + function SetPos($aXAbsPos=0,$aYAbsPos=0,$aHAlign="left",$aVAlign="top") { + $this->Pos($aXAbsPos,$aYAbsPos,$aHAlign,$aVAlign); + } + + // Specify the position and alignment for the text object + function Pos($aXAbsPos=0,$aYAbsPos=0,$aHAlign="left",$aVAlign="top") { + $this->x = $aXAbsPos; + $this->y = $aYAbsPos; + $this->halign = $aHAlign; + $this->valign = $aVAlign; + } + + function SetScalePos($aX,$aY) { + $this->iScalePosX = $aX; + $this->iScalePosY = $aY; + } + + // Specify alignment for the text + function Align($aHAlign,$aVAlign="top",$aParagraphAlign="") { + $this->halign = $aHAlign; + $this->valign = $aVAlign; + if( $aParagraphAlign != "" ) + $this->paragraph_align = $aParagraphAlign; + } + + // Alias + function SetAlign($aHAlign,$aVAlign="top",$aParagraphAlign="") { + $this->Align($aHAlign,$aVAlign,$aParagraphAlign); + } + + // Specifies the alignment for a multi line text + function ParagraphAlign($aAlign) { + $this->paragraph_align = $aAlign; + } + + // Specifies the alignment for a multi line text + function SetParagraphAlign($aAlign) { + $this->paragraph_align = $aAlign; + } + + function SetShadow($aShadowColor='darkgray',$aShadowWidth=3) { + $this->ishadowwidth=$aShadowWidth; + $this->shadow=$aShadowColor; + $this->boxed=true; + } + + function SetWordWrap($aCol) { + $this->iWordwrap = $aCol ; + } + + // Specify that the text should be boxed. fcolor=frame color, bcolor=border color, + // $shadow=drop shadow should be added around the text. + function SetBox($aFrameColor=array(255,255,255),$aBorderColor=array(0,0,0),$aShadowColor=false,$aCornerRadius=4,$aShadowWidth=3) { + if( $aFrameColor==false ) + $this->boxed=false; + else + $this->boxed=true; + $this->fcolor=$aFrameColor; + $this->bcolor=$aBorderColor; + // For backwards compatibility when shadow was just true or false + if( $aShadowColor === true ) + $aShadowColor = 'gray'; + $this->shadow=$aShadowColor; + $this->icornerradius=$aCornerRadius; + $this->ishadowwidth=$aShadowWidth; + } + + // Hide the text + function Hide($aHide=true) { + $this->hide=$aHide; + } + + // This looks ugly since it's not a very orthogonal design + // but I added this "inverse" of Hide() to harmonize + // with some classes which I designed more recently (especially) + // jpgraph_gantt + function Show($aShow=true) { + $this->hide=!$aShow; + } + + // Specify font + function SetFont($aFamily,$aStyle=FS_NORMAL,$aSize=10) { + $this->font_family=$aFamily; + $this->font_style=$aStyle; + $this->font_size=$aSize; + } + + // Center the text between $left and $right coordinates + function Center($aLeft,$aRight,$aYAbsPos=false) { + $this->x = $aLeft + ($aRight-$aLeft )/2; + $this->halign = "center"; + if( is_numeric($aYAbsPos) ) + $this->y = $aYAbsPos; + } + + // Set text color + function SetColor($aColor) { + $this->color = $aColor; + } + + function SetAngle($aAngle) { + $this->SetOrientation($aAngle); + } + + // Orientation of text. Note only TTF fonts can have an arbitrary angle + function SetOrientation($aDirection=0) { + if( is_numeric($aDirection) ) + $this->dir=$aDirection; + elseif( $aDirection=="h" ) + $this->dir = 0; + elseif( $aDirection=="v" ) + $this->dir = 90; + else JpGraphError::RaiseL(25051);//(" Invalid direction specified for text."); + } + + // Total width of text + function GetWidth(&$aImg) { + $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); + $w = $aImg->GetTextWidth($this->t,$this->dir); + return $w; + } + + // Hight of font + function GetFontHeight(&$aImg) { + $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); + $h = $aImg->GetFontHeight(); + return $h; + + } + + function GetTextHeight(&$aImg) { + $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); + $h = $aImg->GetTextHeight($this->t,$this->dir); + return $h; + } + + function GetHeight(&$aImg) { + // Synonym for GetTextHeight() + $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); + $h = $aImg->GetTextHeight($this->t,$this->dir); + return $h; + } + + // Set the margin which will be interpretated differently depending + // on the context. + function SetMargin($aMarg) { + $this->margin = $aMarg; + } + + function StrokeWithScale(&$aImg,$axscale,$ayscale) { + if( $this->iScalePosX === null || + $this->iScalePosY === null ) { + $this->Stroke($aImg); + } + else { + $this->Stroke($aImg, + round($axscale->Translate($this->iScalePosX)), + round($ayscale->Translate($this->iScalePosY))); + } + } + + function SetCSIMTarget($aURITarget,$aAlt='',$aWinTarget='') { + $this->iCSIMtarget = $aURITarget; + $this->iCSIMalt = $aAlt; + $this->iCSIMWinTarget = $aWinTarget; + } + + function GetCSIMareas() { + if( $this->iCSIMtarget !== '' ) + return $this->iCSIMarea; + else + return ''; + } + + // Display text in image + function Stroke(&$aImg,$x=null,$y=null) { + + if( !empty($x) ) $this->x = round($x); + if( !empty($y) ) $this->y = round($y); + + // Insert newlines + if( $this->iWordwrap > 0 ) { + $this->t = wordwrap($this->t,$this->iWordwrap,"\n"); + } + + // If position been given as a fraction of the image size + // calculate the absolute position + if( $this->x < 1 && $this->x > 0 ) $this->x *= $aImg->width; + if( $this->y < 1 && $this->y > 0 ) $this->y *= $aImg->height; + + $aImg->PushColor($this->color); + $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); + $aImg->SetTextAlign($this->halign,$this->valign); + if( $this->boxed ) { + if( $this->fcolor=="nofill" ) + $this->fcolor=false; + $aImg->SetLineWeight(1); + $bbox = $aImg->StrokeBoxedText($this->x,$this->y,$this->t, + $this->dir,$this->fcolor,$this->bcolor,$this->shadow, + $this->paragraph_align,5,5,$this->icornerradius, + $this->ishadowwidth); + } + else { + $bbox = $aImg->StrokeText($this->x,$this->y,$this->t,$this->dir,$this->paragraph_align); + } + + // Create CSIM targets + $coords = $bbox[0].','.$bbox[1].','.$bbox[2].','.$bbox[3].','.$bbox[4].','.$bbox[5].','.$bbox[6].','.$bbox[7]; + $this->iCSIMarea = "iCSIMtarget)."\" "; + if( trim($this->iCSIMalt) != '' ) { + $this->iCSIMarea .= " alt=\"".$this->iCSIMalt."\" "; + $this->iCSIMarea .= " title=\"".$this->iCSIMalt."\" "; + } + if( trim($this->iCSIMWinTarget) != '' ) { + $this->iCSIMarea .= " target=\"".$this->iCSIMWinTarget."\" "; + } + $this->iCSIMarea .= " />\n"; + + $aImg->PopColor($this->color); + + } +} // Class + +class GraphTabTitle extends Text{ + var $corner = 6 , $posx = 7, $posy = 4; + var $color='darkred',$fillcolor='lightyellow',$bordercolor='black'; + var $align = 'left', $width=TABTITLE_WIDTHFIT; + function GraphTabTitle() { + $this->t = ''; + $this->font_style = FS_BOLD; + $this->hide = true; + } + + function SetColor($aTxtColor,$aFillColor='lightyellow',$aBorderColor='black') { + $this->color = $aTxtColor; + $this->fillcolor = $aFillColor; + $this->bordercolor = $aBorderColor; + } + + function SetFillColor($aFillColor) { + $this->fillcolor = $aFillColor; + } + + function SetTabAlign($aAlign) { + // Synonym for SetPos + $this->align = $aAlign; + } + + function SetPos($aAlign) { + $this->align = $aAlign; + } + + function SetWidth($aWidth) { + $this->width = $aWidth ; + } + + function Set($t) { + $this->t = $t; + $this->hide = false; + } + + function SetCorner($aD) { + $this->corner = $aD ; + } + + function Stroke(&$aImg) { + if( $this->hide ) + return; + $this->boxed = false; + $w = $this->GetWidth($aImg) + 2*$this->posx; + $h = $this->GetTextHeight($aImg) + 2*$this->posy; + + $x = $aImg->left_margin; + $y = $aImg->top_margin; + + if( $this->width === TABTITLE_WIDTHFIT ) { + if( $this->align == 'left' ) { + $p = array($x, $y, + $x, $y-$h+$this->corner, + $x + $this->corner,$y-$h, + $x + $w - $this->corner, $y-$h, + $x + $w, $y-$h+$this->corner, + $x + $w, $y); + } + elseif( $this->align == 'center' ) { + $x += round($aImg->plotwidth/2) - round($w/2); + $p = array($x, $y, + $x, $y-$h+$this->corner, + $x + $this->corner, $y-$h, + $x + $w - $this->corner, $y-$h, + $x + $w, $y-$h+$this->corner, + $x + $w, $y); + } + else { + $x += $aImg->plotwidth -$w; + $p = array($x, $y, + $x, $y-$h+$this->corner, + $x + $this->corner,$y-$h, + $x + $w - $this->corner, $y-$h, + $x + $w, $y-$h+$this->corner, + $x + $w, $y); + } + } + else { + if( $this->width === TABTITLE_WIDTHFULL ) + $w = $aImg->plotwidth ; + else + $w = $this->width ; + + // Make the tab fit the width of the plot area + $p = array($x, $y, + $x, $y-$h+$this->corner, + $x + $this->corner,$y-$h, + $x + $w - $this->corner, $y-$h, + $x + $w, $y-$h+$this->corner, + $x + $w, $y); + + } + if( $this->halign == 'left' ) { + $aImg->SetTextAlign('left','bottom'); + $x += $this->posx; + $y -= $this->posy; + } + elseif( $this->halign == 'center' ) { + $aImg->SetTextAlign('center','bottom'); + $x += $w/2; + $y -= $this->posy; + } + else { + $aImg->SetTextAlign('right','bottom'); + $x += $w - $this->posx; + $y -= $this->posy; + } + + $aImg->SetColor($this->fillcolor); + $aImg->FilledPolygon($p); + + $aImg->SetColor($this->bordercolor); + $aImg->Polygon($p,true); + + $aImg->SetColor($this->color); + $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); + $aImg->StrokeText($x,$y,$this->t,0,'center'); + } + +} + +//=================================================== +// CLASS SuperScriptText +// Description: Format a superscript text +//=================================================== +class SuperScriptText extends Text { + var $iSuper=""; + var $sfont_family="",$sfont_style="",$sfont_size=8; + var $iSuperMargin=2,$iVertOverlap=4,$iSuperScale=0.65; + var $iSDir=0; + var $iSimple=false; + + function SuperScriptText($aTxt="",$aSuper="",$aXAbsPos=0,$aYAbsPos=0) { + parent::Text($aTxt,$aXAbsPos,$aYAbsPos); + $this->iSuper = $aSuper; + } + + function FromReal($aVal,$aPrecision=2) { + // Convert a floating point number to scientific notation + $neg=1.0; + if( $aVal < 0 ) { + $neg = -1.0; + $aVal = -$aVal; + } + + $l = floor(log10($aVal)); + $a = sprintf("%0.".$aPrecision."f",round($aVal / pow(10,$l),$aPrecision)); + $a *= $neg; + if( $this->iSimple && ($a == 1 || $a==-1) ) $a = ''; + + if( $a != '' ) + $this->t = $a.' * 10'; + else { + if( $neg == 1 ) + $this->t = '10'; + else + $this->t = '-10'; + } + $this->iSuper = $l; + } + + function Set($aTxt,$aSuper="") { + $this->t = $aTxt; + $this->iSuper = $aSuper; + } + + function SetSuperFont($aFontFam,$aFontStyle=FS_NORMAL,$aFontSize=8) { + $this->sfont_family = $aFontFam; + $this->sfont_style = $aFontStyle; + $this->sfont_size = $aFontSize; + } + + // Total width of text + function GetWidth(&$aImg) { + $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); + $w = $aImg->GetTextWidth($this->t); + $aImg->SetFont($this->sfont_family,$this->sfont_style,$this->sfont_size); + $w += $aImg->GetTextWidth($this->iSuper); + $w += $this->iSuperMargin; + return $w; + } + + // Hight of font (approximate the height of the text) + function GetFontHeight(&$aImg) { + $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); + $h = $aImg->GetFontHeight(); + $aImg->SetFont($this->sfont_family,$this->sfont_style,$this->sfont_size); + $h += $aImg->GetFontHeight(); + return $h; + } + + // Hight of text + function GetTextHeight(&$aImg) { + $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); + $h = $aImg->GetTextHeight($this->t); + $aImg->SetFont($this->sfont_family,$this->sfont_style,$this->sfont_size); + $h += $aImg->GetTextHeight($this->iSuper); + return $h; + } + + function Stroke(&$aImg,$ax=-1,$ay=-1) { + + // To position the super script correctly we need different + // cases to handle the alignmewnt specified since that will + // determine how we can interpret the x,y coordinates + + $w = parent::GetWidth($aImg); + $h = parent::GetTextHeight($aImg); + switch( $this->valign ) { + case 'top': + $sy = $this->y; + break; + case 'center': + $sy = $this->y - $h/2; + break; + case 'bottom': + $sy = $this->y - $h; + break; + default: + JpGraphError::RaiseL(25052);//('PANIC: Internal error in SuperScript::Stroke(). Unknown vertical alignment for text'); + break; + } + + switch( $this->halign ) { + case 'left': + $sx = $this->x + $w; + break; + case 'center': + $sx = $this->x + $w/2; + break; + case 'right': + $sx = $this->x; + break; + default: + JpGraphError::RaiseL(25053);//('PANIC: Internal error in SuperScript::Stroke(). Unknown horizontal alignment for text'); + break; + } + + $sx += $this->iSuperMargin; + $sy += $this->iVertOverlap; + + // Should we automatically determine the font or + // has the user specified it explicetly? + if( $this->sfont_family == "" ) { + if( $this->font_family <= FF_FONT2 ) { + if( $this->font_family == FF_FONT0 ) { + $sff = FF_FONT0; + } + elseif( $this->font_family == FF_FONT1 ) { + if( $this->font_style == FS_NORMAL ) + $sff = FF_FONT0; + else + $sff = FF_FONT1; + } + else { + $sff = FF_FONT1; + } + $sfs = $this->font_style; + $sfz = $this->font_size; + } + else { + // TTF fonts + $sff = $this->font_family; + $sfs = $this->font_style; + $sfz = floor($this->font_size*$this->iSuperScale); + if( $sfz < 8 ) $sfz = 8; + } + $this->sfont_family = $sff; + $this->sfont_style = $sfs; + $this->sfont_size = $sfz; + } + else { + $sff = $this->sfont_family; + $sfs = $this->sfont_style; + $sfz = $this->sfont_size; + } + + parent::Stroke($aImg,$ax,$ay); + + + // For the builtin fonts we need to reduce the margins + // since the bounding bx reported for the builtin fonts + // are much larger than for the TTF fonts. + if( $sff <= FF_FONT2 ) { + $sx -= 2; + $sy += 3; + } + + $aImg->SetTextAlign('left','bottom'); + $aImg->SetFont($sff,$sfs,$sfz); + $aImg->PushColor($this->color); + $aImg->StrokeText($sx,$sy,$this->iSuper,$this->iSDir,'left'); + $aImg->PopColor(); + } +} + + +//=================================================== +// CLASS Grid +// Description: responsible for drawing grid lines in graph +//=================================================== +class Grid { + var $img; + var $scale; + var $grid_color='#DDDDDD',$grid_mincolor='#DDDDDD'; + var $type="solid"; + var $show=false, $showMinor=false,$weight=1; + var $fill=false,$fillcolor=array('#EFEFEF','#BBCCFF'); +//--------------- +// CONSTRUCTOR + function Grid(&$aAxis) { + $this->scale = &$aAxis->scale; + $this->img = &$aAxis->img; + } +//--------------- +// PUBLIC METHODS + function SetColor($aMajColor,$aMinColor=false) { + $this->grid_color=$aMajColor; + if( $aMinColor === false ) + $aMinColor = $aMajColor ; + $this->grid_mincolor = $aMinColor; + } + + function SetWeight($aWeight) { + $this->weight=$aWeight; + } + + // Specify if grid should be dashed, dotted or solid + function SetLineStyle($aType) { + $this->type = $aType; + } + + // Decide if both major and minor grid should be displayed + function Show($aShowMajor=true,$aShowMinor=false) { + $this->show=$aShowMajor; + $this->showMinor=$aShowMinor; + } + + function SetFill($aFlg=true,$aColor1='lightgray',$aColor2='lightblue') { + $this->fill = $aFlg; + $this->fillcolor = array( $aColor1, $aColor2 ); + } + + // Display the grid + function Stroke() { + + // We do not have minor ticks (or grids) for text scales + if( $this->showMinor && !$this->scale->textscale ) { + $tmp = $this->grid_color; + $this->grid_color = $this->grid_mincolor; + $this->DoStroke($this->scale->ticks->ticks_pos); + + $this->grid_color = $tmp; + $this->DoStroke($this->scale->ticks->maj_ticks_pos); + } + else { + $this->DoStroke($this->scale->ticks->maj_ticks_pos); + } + } + +//-------------- +// Private methods + // Draw the grid + function DoStroke(&$aTicksPos) { + if( !$this->show ) + return; + $nbrgrids = count($aTicksPos); + + if( $this->scale->type=="y" ) { + $xl=$this->img->left_margin; + $xr=$this->img->width-$this->img->right_margin; + + if( $this->fill ) { + // Draw filled areas + $y2 = $aTicksPos[0]; + $i=1; + while( $i < $nbrgrids ) { + $y1 = $y2; + $y2 = $aTicksPos[$i++]; + $this->img->SetColor($this->fillcolor[$i & 1]); + $this->img->FilledRectangle($xl,$y1,$xr,$y2); + } + } + + $this->img->SetColor($this->grid_color); + $this->img->SetLineWeight($this->weight); + + // Draw grid lines + for($i=0; $i<$nbrgrids; ++$i) { + $y=$aTicksPos[$i]; + if( $this->type == "solid" ) + $this->img->Line($xl,$y,$xr,$y); + elseif( $this->type == "dotted" ) + $this->img->DashedLine($xl,$y,$xr,$y,1,6); + elseif( $this->type == "dashed" ) + $this->img->DashedLine($xl,$y,$xr,$y,2,4); + elseif( $this->type == "longdashed" ) + $this->img->DashedLine($xl,$y,$xr,$y,8,6); + } + } + elseif( $this->scale->type=="x" ) { + $yu=$this->img->top_margin; + $yl=$this->img->height-$this->img->bottom_margin; + $limit=$this->img->width-$this->img->right_margin; + + if( $this->fill ) { + // Draw filled areas + $x2 = $aTicksPos[0]; + $i=1; + while( $i < $nbrgrids ) { + $x1 = $x2; + $x2 = min($aTicksPos[$i++],$limit) ; + $this->img->SetColor($this->fillcolor[$i & 1]); + $this->img->FilledRectangle($x1,$yu,$x2,$yl); + } + } + + $this->img->SetColor($this->grid_color); + $this->img->SetLineWeight($this->weight); + + // We must also test for limit since we might have + // an offset and the number of ticks is calculated with + // assumption offset==0 so we might end up drawing one + // to many gridlines + $i=0; + $x=$aTicksPos[$i]; + while( $itype == "solid" ) + $this->img->Line($x,$yl,$x,$yu); + elseif( $this->type == "dotted" ) + $this->img->DashedLine($x,$yl,$x,$yu,1,6); + elseif( $this->type == "dashed" ) + $this->img->DashedLine($x,$yl,$x,$yu,2,4); + elseif( $this->type == "longdashed" ) + $this->img->DashedLine($x,$yl,$x,$yu,8,6); + ++$i; + } + } + else { + JpGraphError::RaiseL(25054,$this->scale->type);//('Internal error: Unknown grid axis ['.$this->scale->type.']'); + } + return true; + } +} // Class + +//=================================================== +// CLASS Axis +// Description: Defines X and Y axis. Notes that at the +// moment the code is not really good since the axis on +// several occasion must know wheter it's an X or Y axis. +// This was a design decision to make the code easier to +// follow. +//=================================================== +class Axis { + var $pos = false; + var $weight=1; + var $color=array(0,0,0),$label_color=array(0,0,0); + var $img=null,$scale=null; + var $hide=false; + var $ticks_label=false, $ticks_label_colors=null; + var $show_first_label=true,$show_last_label=true; + var $label_step=1; // Used by a text axis to specify what multiple of major steps + // should be labeled. + var $tick_step=1; + var $labelPos=0; // Which side of the axis should the labels be? + var $title=null,$title_adjust,$title_margin,$title_side=SIDE_LEFT; + var $font_family=FF_FONT1,$font_style=FS_NORMAL,$font_size=10,$label_angle=0; + var $tick_label_margin=7; + var $label_halign = '',$label_valign = '', $label_para_align='left'; + var $hide_line=false,$hide_labels=false; + var $iDeltaAbsPos=0; + //var $hide_zero_label=false; + +//--------------- +// CONSTRUCTOR + function Axis(&$img,&$aScale,$color=array(0,0,0)) { + $this->img = &$img; + $this->scale = &$aScale; + $this->color = $color; + $this->title=new Text(""); + + if( $aScale->type=="y" ) { + $this->title_margin = 25; + $this->title_adjust="middle"; + $this->title->SetOrientation(90); + $this->tick_label_margin=7; + $this->labelPos=SIDE_LEFT; + //$this->SetLabelFormat('%.1f'); + } + else { + $this->title_margin = 5; + $this->title_adjust="high"; + $this->title->SetOrientation(0); + $this->tick_label_margin=7; + $this->labelPos=SIDE_DOWN; + $this->title_side=SIDE_DOWN; + //$this->SetLabelFormat('%.0f'); + } + } +//--------------- +// PUBLIC METHODS + + function SetLabelFormat($aFormStr) { + $this->scale->ticks->SetLabelFormat($aFormStr); + } + + function SetLabelFormatString($aFormStr,$aDate=false) { + $this->scale->ticks->SetLabelFormat($aFormStr,$aDate); + } + + function SetLabelFormatCallback($aFuncName) { + $this->scale->ticks->SetFormatCallback($aFuncName); + } + + function SetLabelAlign($aHAlign,$aVAlign="top",$aParagraphAlign='left') { + $this->label_halign = $aHAlign; + $this->label_valign = $aVAlign; + $this->label_para_align = $aParagraphAlign; + } + + // Don't display the first label + function HideFirstTickLabel($aShow=false) { + $this->show_first_label=$aShow; + } + + function HideLastTickLabel($aShow=false) { + $this->show_last_label=$aShow; + } + + // Manually specify the major and (optional) minor tick position and labels + function SetTickPositions($aMajPos,$aMinPos=NULL,$aLabels=NULL) { + $this->scale->ticks->SetTickPositions($aMajPos,$aMinPos,$aLabels); + } + + // Manually specify major tick positions and optional labels + function SetMajTickPositions($aMajPos,$aLabels=NULL) { + $this->scale->ticks->SetTickPositions($aMajPos,NULL,$aLabels); + } + + // Hide minor or major tick marks + function HideTicks($aHideMinor=true,$aHideMajor=true) { + $this->scale->ticks->SupressMinorTickMarks($aHideMinor); + $this->scale->ticks->SupressTickMarks($aHideMajor); + } + + // Hide zero label + function HideZeroLabel($aFlag=true) { + $this->scale->ticks->SupressZeroLabel(); + //$this->hide_zero_label = $aFlag; + } + + function HideFirstLastLabel() { + // The two first calls to ticks method will supress + // automatically generated scale values. However, that + // will not affect manually specified value, e.g text-scales. + // therefor we also make a kludge here to supress manually + // specified scale labels. + $this->scale->ticks->SupressLast(); + $this->scale->ticks->SupressFirst(); + $this->show_first_label = false; + $this->show_last_label = false; + } + + // Hide the axis + function Hide($aHide=true) { + $this->hide=$aHide; + } + + // Hide the actual axis-line, but still print the labels + function HideLine($aHide=true) { + $this->hide_line = $aHide; + } + + function HideLabels($aHide=true) { + $this->hide_labels = $aHide; + } + + + // Weight of axis + function SetWeight($aWeight) { + $this->weight = $aWeight; + } + + // Axis color + function SetColor($aColor,$aLabelColor=false) { + $this->color = $aColor; + if( !$aLabelColor ) $this->label_color = $aColor; + else $this->label_color = $aLabelColor; + } + + // Title on axis + function SetTitle($aTitle,$aAdjustAlign="high") { + $this->title->Set($aTitle); + $this->title_adjust=$aAdjustAlign; + } + + // Specify distance from the axis + function SetTitleMargin($aMargin) { + $this->title_margin=$aMargin; + } + + // Which side of the axis should the axis title be? + function SetTitleSide($aSideOfAxis) { + $this->title_side = $aSideOfAxis; + } + + // Utility function to set the direction for tick marks + function SetTickDirection($aDir) { + // Will be deprecated from 1.7 + if( ERR_DEPRECATED ) + JpGraphError::RaiseL(25055);//('Axis::SetTickDirection() is deprecated. Use Axis::SetTickSide() instead'); + $this->scale->ticks->SetSide($aDir); + } + + function SetTickSide($aDir) { + $this->scale->ticks->SetSide($aDir); + } + + // Specify text labels for the ticks. One label for each data point + function SetTickLabels($aLabelArray,$aLabelColorArray=null) { + $this->ticks_label = $aLabelArray; + $this->ticks_label_colors = $aLabelColorArray; + } + + // How far from the axis should the labels be drawn + function SetTickLabelMargin($aMargin) { + if( ERR_DEPRECATED ) + JpGraphError::RaiseL(25056);//('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.'); + $this->tick_label_margin=$aMargin; + } + + function SetLabelMargin($aMargin) { + $this->tick_label_margin=$aMargin; + } + + // Specify that every $step of the ticks should be displayed starting + // at $start + // DEPRECATED FUNCTION: USE SetTextTickInterval() INSTEAD + function SetTextTicks($step,$start=0) { + JpGraphError::RaiseL(25057);//(" SetTextTicks() is deprecated. Use SetTextTickInterval() instead."); + } + + // Specify that every $step of the ticks should be displayed starting + // at $start + function SetTextTickInterval($aStep,$aStart=0) { + $this->scale->ticks->SetTextLabelStart($aStart); + $this->tick_step=$aStep; + } + + // Specify that every $step tick mark should have a label + // should be displayed starting + function SetTextLabelInterval($aStep,$aStart=0) { + if( $aStep < 1 ) + JpGraphError::RaiseL(25058);//(" Text label interval must be specified >= 1."); + $this->scale->ticks->SetTextLabelStart($aStart); + $this->label_step=$aStep; + } + + // Which side of the axis should the labels be on? + function SetLabelPos($aSidePos) { + // This will be deprecated from 1.7 + if( ERR_DEPRECATED ) + JpGraphError::RaiseL(25059);//('SetLabelPos() is deprecated. Use Axis::SetLabelSide() instead.'); + $this->labelPos=$aSidePos; + } + + function SetLabelSide($aSidePos) { + $this->labelPos=$aSidePos; + } + + // Set the font + function SetFont($aFamily,$aStyle=FS_NORMAL,$aSize=10) { + $this->font_family = $aFamily; + $this->font_style = $aStyle; + $this->font_size = $aSize; + } + + // Position for axis line on the "other" scale + function SetPos($aPosOnOtherScale) { + $this->pos=$aPosOnOtherScale; + } + + // Set the position of the axis to be X-pixels delta to the right + // of the max X-position (used to position the multiple Y-axis) + function SetPosAbsDelta($aDelta) { + $this->iDeltaAbsPos=$aDelta; + } + + // Specify the angle for the tick labels + function SetLabelAngle($aAngle) { + $this->label_angle = $aAngle; + } + + // Stroke the axis. + function Stroke($aOtherAxisScale,$aStrokeLabels=true) { + if( $this->hide ) return; + if( is_numeric($this->pos) ) { + $pos=$aOtherAxisScale->Translate($this->pos); + } + else { // Default to minimum of other scale if pos not set + if( ($aOtherAxisScale->GetMinVal() >= 0 && $this->pos==false) || $this->pos=="min" ) { + $pos = $aOtherAxisScale->scale_abs[0]; + } + elseif($this->pos == "max") { + $pos = $aOtherAxisScale->scale_abs[1]; + } + else { // If negative set x-axis at 0 + $this->pos=0; + $pos=$aOtherAxisScale->Translate(0); + } + } + $pos += $this->iDeltaAbsPos; + $this->img->SetLineWeight($this->weight); + $this->img->SetColor($this->color); + $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); + if( $this->scale->type == "x" ) { + if( !$this->hide_line ) + $this->img->FilledRectangle($this->img->left_margin,$pos, + $this->img->width-$this->img->right_margin,$pos+$this->weight-1); + if( $this->title_side == SIDE_DOWN ) { + $y = $pos + $this->img->GetFontHeight() + $this->title_margin + $this->title->margin; + $yalign = 'top'; + } + else { + $y = $pos - $this->img->GetFontHeight() - $this->title_margin - $this->title->margin; + $yalign = 'bottom'; + } + + if( $this->title_adjust=="high" ) + $this->title->Pos($this->img->width-$this->img->right_margin,$y,"right",$yalign); + elseif( $this->title_adjust=="middle" || $this->title_adjust=="center" ) + $this->title->Pos(($this->img->width-$this->img->left_margin-$this->img->right_margin)/2+$this->img->left_margin,$y,"center",$yalign); + elseif($this->title_adjust=="low") + $this->title->Pos($this->img->left_margin,$y,"left",$yalign); + else { + JpGraphError::RaiseL(25060,$this->title_adjust);//('Unknown alignment specified for X-axis title. ('.$this->title_adjust.')'); + } + } + elseif( $this->scale->type == "y" ) { + // Add line weight to the height of the axis since + // the x-axis could have a width>1 and we want the axis to fit nicely together. + if( !$this->hide_line ) + $this->img->FilledRectangle($pos-$this->weight+1,$this->img->top_margin, + $pos,$this->img->height-$this->img->bottom_margin+$this->weight-1); + $x=$pos ; + if( $this->title_side == SIDE_LEFT ) { + $x -= $this->title_margin; + $x -= $this->title->margin; + $halign="right"; + } + else { + $x += $this->title_margin; + $x += $this->title->margin; + $halign="left"; + } + // If the user has manually specified an hor. align + // then we override the automatic settings with this + // specifed setting. Since default is 'left' we compare + // with that. (This means a manually set 'left' align + // will have no effect.) + if( $this->title->halign != 'left' ) + $halign = $this->title->halign; + if( $this->title_adjust=="high" ) + $this->title->Pos($x,$this->img->top_margin,$halign,"top"); + elseif($this->title_adjust=="middle" || $this->title_adjust=="center") + $this->title->Pos($x,($this->img->height-$this->img->top_margin-$this->img->bottom_margin)/2+$this->img->top_margin,$halign,"center"); + elseif($this->title_adjust=="low") + $this->title->Pos($x,$this->img->height-$this->img->bottom_margin,$halign,"bottom"); + else + JpGraphError::RaiseL(25061,$this->title_adjust);//('Unknown alignment specified for Y-axis title. ('.$this->title_adjust.')'); + + } + $this->scale->ticks->Stroke($this->img,$this->scale,$pos); + if( $aStrokeLabels ) { + if( !$this->hide_labels ) + $this->StrokeLabels($pos); + $this->title->Stroke($this->img); + } + } + +//--------------- +// PRIVATE METHODS + // Draw all the tick labels on major tick marks + function StrokeLabels($aPos,$aMinor=false,$aAbsLabel=false) { + + $this->img->SetColor($this->label_color); + $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); + $yoff=$this->img->GetFontHeight()/2; + + // Only draw labels at major tick marks + $nbr = count($this->scale->ticks->maj_ticks_label); + + // We have the option to not-display the very first mark + // (Usefull when the first label might interfere with another + // axis.) + $i = $this->show_first_label ? 0 : 1 ; + if( !$this->show_last_label ) --$nbr; + // Now run through all labels making sure we don't overshoot the end + // of the scale. + $ncolor=0; + if( isset($this->ticks_label_colors) ) + $ncolor=count($this->ticks_label_colors); + + while( $i<$nbr ) { + // $tpos holds the absolute text position for the label + $tpos=$this->scale->ticks->maj_ticklabels_pos[$i]; + + // Note. the $limit is only used for the x axis since we + // might otherwise overshoot if the scale has been centered + // This is due to us "loosing" the last tick mark if we center. + if( $this->scale->type=="x" && $tpos > $this->img->width-$this->img->right_margin+1 ) { + return; + } + // we only draw every $label_step label + if( ($i % $this->label_step)==0 ) { + + // Set specific label color if specified + if( $ncolor > 0 ) + $this->img->SetColor($this->ticks_label_colors[$i % $ncolor]); + + // If the label has been specified use that and in other case + // just label the mark with the actual scale value + $m=$this->scale->ticks->GetMajor(); + + // ticks_label has an entry for each data point and is the array + // that holds the labels set by the user. If the user hasn't + // specified any values we use whats in the automatically asigned + // labels in the maj_ticks_label + if( isset($this->ticks_label[$i*$m]) ) + $label=$this->ticks_label[$i*$m]; + else { + if( $aAbsLabel ) + $label=abs($this->scale->ticks->maj_ticks_label[$i]); + else + $label=$this->scale->ticks->maj_ticks_label[$i]; + if( $this->scale->textscale && $this->scale->ticks->label_formfunc == '' ) { + ++$label; + } + } + + //if( $this->hide_zero_label && $label==0.0 ) { + // ++$i; + // continue; + //} + + if( $this->scale->type == "x" ) { + if( $this->labelPos == SIDE_DOWN ) { + if( $this->label_angle==0 || $this->label_angle==90 ) { + if( $this->label_halign=='' && $this->label_valign=='') + $this->img->SetTextAlign('center','top'); + else + $this->img->SetTextAlign($this->label_halign,$this->label_valign); + + } + else { + if( $this->label_halign=='' && $this->label_valign=='') + $this->img->SetTextAlign("right","top"); + else + $this->img->SetTextAlign($this->label_halign,$this->label_valign); + } + + $this->img->StrokeText($tpos,$aPos+$this->tick_label_margin+1,$label, + $this->label_angle,$this->label_para_align); + } + else { + if( $this->label_angle==0 || $this->label_angle==90 ) { + if( $this->label_halign=='' && $this->label_valign=='') + $this->img->SetTextAlign("center","bottom"); + else + $this->img->SetTextAlign($this->label_halign,$this->label_valign); + } + else { + if( $this->label_halign=='' && $this->label_valign=='') + $this->img->SetTextAlign("right","bottom"); + else + $this->img->SetTextAlign($this->label_halign,$this->label_valign); + } + $this->img->StrokeText($tpos,$aPos-$this->tick_label_margin-1,$label, + $this->label_angle,$this->label_para_align); + } + } + else { + // scale->type == "y" + //if( $this->label_angle!=0 ) + //JpGraphError::Raise(" Labels at an angle are not supported on Y-axis"); + if( $this->labelPos == SIDE_LEFT ) { // To the left of y-axis + if( $this->label_halign=='' && $this->label_valign=='') + $this->img->SetTextAlign("right","center"); + else + $this->img->SetTextAlign($this->label_halign,$this->label_valign); + $this->img->StrokeText($aPos-$this->tick_label_margin,$tpos,$label,$this->label_angle,$this->label_para_align); + } + else { // To the right of the y-axis + if( $this->label_halign=='' && $this->label_valign=='') + $this->img->SetTextAlign("left","center"); + else + $this->img->SetTextAlign($this->label_halign,$this->label_valign); + $this->img->StrokeText($aPos+$this->tick_label_margin,$tpos,$label,$this->label_angle,$this->label_para_align); + } + } + } + ++$i; + } + } + +} // Class + +//=================================================== +// CLASS Ticks +// Description: Abstract base class for drawing linear and logarithmic +// tick marks on axis +//=================================================== +class Ticks { + var $minor_abs_size=3, $major_abs_size=5; + var $direction=1; // Should ticks be in(=1) the plot area or outside (=-1)? + var $scale; + var $is_set=false; + var $precision; + var $supress_zerolabel=false,$supress_first=false; + var $supress_last=false,$supress_tickmarks=false,$supress_minor_tickmarks=false; + var $mincolor="",$majcolor=""; + var $weight=1; + var $label_formatstr=''; // C-style format string to use for labels + var $label_formfunc=''; + var $label_dateformatstr=''; + var $label_usedateformat=FALSE; + + +//--------------- +// CONSTRUCTOR + function Ticks(&$aScale) { + $this->scale=&$aScale; + $this->precision = -1; + } + +//--------------- +// PUBLIC METHODS + // Set format string for automatic labels + function SetLabelFormat($aFormatString,$aDate=FALSE) { + $this->label_formatstr=$aFormatString; + $this->label_usedateformat=$aDate; + } + + function SetLabelDateFormat($aFormatString) { + $this->label_dateformatstr=$aFormatString; + } + + function SetFormatCallback($aCallbackFuncName) { + $this->label_formfunc = $aCallbackFuncName; + } + + // Don't display the first zero label + function SupressZeroLabel($aFlag=true) { + $this->supress_zerolabel=$aFlag; + } + + // Don't display minor tick marks + function SupressMinorTickMarks($aHide=true) { + $this->supress_minor_tickmarks=$aHide; + } + + // Don't display major tick marks + function SupressTickMarks($aHide=true) { + $this->supress_tickmarks=$aHide; + } + + // Hide the first tick mark + function SupressFirst($aHide=true) { + $this->supress_first=$aHide; + } + + // Hide the last tick mark + function SupressLast($aHide=true) { + $this->supress_last=$aHide; + } + + // Size (in pixels) of minor tick marks + function GetMinTickAbsSize() { + return $this->minor_abs_size; + } + + // Size (in pixels) of major tick marks + function GetMajTickAbsSize() { + return $this->major_abs_size; + } + + function SetSize($aMajSize,$aMinSize=3) { + $this->major_abs_size = $aMajSize; + $this->minor_abs_size = $aMinSize; + } + + // Have the ticks been specified + function IsSpecified() { + return $this->is_set; + } + + // Set the distance between major and minor tick marks + function Set($aMaj,$aMin) { + // "Virtual method" + // Should be implemented by the concrete subclass + // if any action is wanted. + } + + // Specify number of decimals in automatic labels + // Deprecated from 1.4. Use SetFormatString() instead + function SetPrecision($aPrecision) { + if( ERR_DEPRECATED ) + JpGraphError::RaiseL(25063);//('Ticks::SetPrecision() is deprecated. Use Ticks::SetLabelFormat() (or Ticks::SetFormatCallback()) instead'); + $this->precision=$aPrecision; + } + + function SetSide($aSide) { + $this->direction=$aSide; + } + + // Which side of the axis should the ticks be on + function SetDirection($aSide=SIDE_RIGHT) { + $this->direction=$aSide; + } + + // Set colors for major and minor tick marks + function SetMarkColor($aMajorColor,$aMinorColor="") { + $this->SetColor($aMajorColor,$aMinorColor); + } + + function SetColor($aMajorColor,$aMinorColor="") { + $this->majcolor=$aMajorColor; + + // If not specified use same as major + if( $aMinorColor=="" ) + $this->mincolor=$aMajorColor; + else + $this->mincolor=$aMinorColor; + } + + function SetWeight($aWeight) { + $this->weight=$aWeight; + } + +} // Class + +//=================================================== +// CLASS LinearTicks +// Description: Draw linear ticks on axis +//=================================================== +class LinearTicks extends Ticks { + var $minor_step=1, $major_step=2; + var $xlabel_offset=0,$xtick_offset=0; + var $label_offset=0; // What offset should the displayed label have + // i.e should we display 0,1,2 or 1,2,3,4 or 2,3,4 etc + var $text_label_start=0; + var $iManualTickPos = NULL, $iManualMinTickPos = NULL, $iManualTickLabels = NULL; + var $maj_ticks_pos = array(), $maj_ticklabels_pos = array(), + $ticks_pos = array(), $maj_ticks_label = array(); + var $iAdjustForDST = false; // If a date falls within the DST period add one hour to the diaplyed time + +//--------------- +// CONSTRUCTOR + function LinearTicks() { + $this->precision = -1; + } + +//--------------- +// PUBLIC METHODS + + + // Return major step size in world coordinates + function GetMajor() { + return $this->major_step; + } + + // Return minor step size in world coordinates + function GetMinor() { + return $this->minor_step; + } + + // Set Minor and Major ticks (in world coordinates) + function Set($aMajStep,$aMinStep=false) { + if( $aMinStep==false ) + $aMinStep=$aMajStep; + + if( $aMajStep <= 0 || $aMinStep <= 0 ) { + JpGraphError::RaiseL(25064); +//(" Minor or major step size is 0. Check that you haven't got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem."); + } + + $this->major_step=$aMajStep; + $this->minor_step=$aMinStep; + $this->is_set = true; + } + + function SetMajTickPositions($aMajPos,$aLabels=NULL) { + $this->SetTickPositions($aMajPos,NULL,$aLabels); + } + + function SetTickPositions($aMajPos,$aMinPos=NULL,$aLabels=NULL) { + if( !is_array($aMajPos) || ($aMinPos!==NULL && !is_array($aMinPos)) ) { + JpGraphError::RaiseL(25065);//('Tick positions must be specifued as an array()'); + return; + } + $n=count($aMajPos); + if( is_array($aLabels) && (count($aLabels) != $n) ) { + JpGraphError::RaiseL(25066);//('When manually specifying tick positions and labels the number of labels must be the same as the number of specified ticks.'); + return; + } + $this->iManualTickPos = $aMajPos; + $this->iManualMinTickPos = $aMinPos; + $this->iManualTickLabels = $aLabels; + } + + // Specify all the tick positions manually and possible also the exact labels + function _doManualTickPos($aScale) { + $n=count($this->iManualTickPos); + $m=count($this->iManualMinTickPos); + $doLbl=count($this->iManualTickLabels) > 0; + + $this->maj_ticks_pos = array(); + $this->maj_ticklabels_pos = array(); + $this->ticks_pos = array(); + + // Now loop through the supplied positions and translate them to screen coordinates + // and store them in the maj_label_positions + $minScale = $aScale->scale[0]; + $maxScale = $aScale->scale[1]; + $j=0; + for($i=0; $i < $n ; ++$i ) { + // First make sure that the first tick is not lower than the lower scale value + if( !isset($this->iManualTickPos[$i]) || + $this->iManualTickPos[$i] < $minScale || $this->iManualTickPos[$i] > $maxScale) { + continue; + } + + + $this->maj_ticks_pos[$j] = $aScale->Translate($this->iManualTickPos[$i]); + $this->maj_ticklabels_pos[$j] = $this->maj_ticks_pos[$j]; + + // Set the minor tick marks the same as major if not specified + if( $m <= 0 ) { + $this->ticks_pos[$j] = $this->maj_ticks_pos[$j]; + } + + if( $doLbl ) { + $this->maj_ticks_label[$j] = $this->iManualTickLabels[$i]; + } + else { + $this->maj_ticks_label[$j]=$this->_doLabelFormat($this->iManualTickPos[$i],$i,$n); + } + ++$j; + } + + // Some sanity check + if( count($this->maj_ticks_pos) < 2 ) { + JpGraphError::RaiseL(25067);//('Your manually specified scale and ticks is not correct. The scale seems to be too small to hold any of the specified tickl marks.'); + } + + // Setup the minor tick marks + $j=0; + for($i=0; $i < $m; ++$i ) { + if( empty($this->iManualMinTickPos[$i]) || + $this->iManualMinTickPos[$i] < $minScale || $this->iManualMinTickPos[$i] > $maxScale) + continue; + $this->ticks_pos[$j] = $aScale->Translate($this->iManualMinTickPos[$i]); + ++$j; + } + } + + function _doAutoTickPos($aScale) { + $maj_step_abs = $aScale->scale_factor*$this->major_step; + $min_step_abs = $aScale->scale_factor*$this->minor_step; + + if( $min_step_abs==0 || $maj_step_abs==0 ) { + JpGraphError::RaiseL(25068);//("A plot has an illegal scale. This could for example be that you are trying to use text autoscaling to draw a line plot with only one point or that the plot area is too small. It could also be that no input data value is numeric (perhaps only '-' or 'x')"); + } + // We need to make this an int since comparing it below + // with the result from round() can give wrong result, such that + // (40 < 40) == TRUE !!! + $limit = (int)$aScale->scale_abs[1]; + + if( $aScale->textscale ) { + // This can only be true for a X-scale (horizontal) + // Define ticks for a text scale. This is slightly different from a + // normal linear type of scale since the position might be adjusted + // and the labels start at on + $label = (float)$aScale->GetMinVal()+$this->text_label_start+$this->label_offset; + $start_abs=$aScale->scale_factor*$this->text_label_start; + $nbrmajticks=round(($aScale->GetMaxVal()-$aScale->GetMinVal()-$this->text_label_start )/$this->major_step)+1; + $x = $aScale->scale_abs[0]+$start_abs+$this->xlabel_offset*$min_step_abs; + for( $i=0; $label <= $aScale->GetMaxVal()+$this->label_offset; ++$i ) { + // Apply format to label + $this->maj_ticks_label[$i]=$this->_doLabelFormat($label,$i,$nbrmajticks); + $label+=$this->major_step; + + // The x-position of the tick marks can be different from the labels. + // Note that we record the tick position (not the label) so that the grid + // happen upon tick marks and not labels. + $xtick=$aScale->scale_abs[0]+$start_abs+$this->xtick_offset*$min_step_abs+$i*$maj_step_abs; + $this->maj_ticks_pos[$i]=$xtick; + $this->maj_ticklabels_pos[$i] = round($x); + $x += $maj_step_abs; + + } + } + else { + $label = $aScale->GetMinVal(); + $abs_pos = $aScale->scale_abs[0]; + $j=0; $i=0; + $step = round($maj_step_abs/$min_step_abs); + if( $aScale->type == "x" ) { + // For a normal linear type of scale the major ticks will always be multiples + // of the minor ticks. In order to avoid any rounding issues the major ticks are + // defined as every "step" minor ticks and not calculated separately + $nbrmajticks=round(($aScale->GetMaxVal()-$aScale->GetMinVal()-$this->text_label_start )/$this->major_step)+1; + while( round($abs_pos) <= $limit ) { + $this->ticks_pos[] = round($abs_pos); + $this->ticks_label[] = $label; + if( $step == 0 || $i % $step == 0 && $j < $nbrmajticks ) { + $this->maj_ticks_pos[$j] = round($abs_pos); + $this->maj_ticklabels_pos[$j] = round($abs_pos); + $this->maj_ticks_label[$j]=$this->_doLabelFormat($label,$j,$nbrmajticks); + ++$j; + } + ++$i; + $abs_pos += $min_step_abs; + $label+=$this->minor_step; + } + } + elseif( $aScale->type == "y" ) { + $nbrmajticks=round(($aScale->GetMaxVal()-$aScale->GetMinVal())/$this->major_step)+1; + while( round($abs_pos) >= $limit ) { + $this->ticks_pos[$i] = round($abs_pos); + $this->ticks_label[$i]=$label; + if( $step == 0 || $i % $step == 0 && $j < $nbrmajticks ) { + $this->maj_ticks_pos[$j] = round($abs_pos); + $this->maj_ticklabels_pos[$j] = round($abs_pos); + $this->maj_ticks_label[$j]=$this->_doLabelFormat($label,$j,$nbrmajticks); + ++$j; + } + ++$i; + $abs_pos += $min_step_abs; + $label += $this->minor_step; + } + } + } + } + + function AdjustForDST($aFlg=true) { + $this->iAdjustForDST = $aFlg; + } + + + function _doLabelFormat($aVal,$aIdx,$aNbrTicks) { + + // If precision hasn't been specified set it to a sensible value + if( $this->precision==-1 ) { + $t = log10($this->minor_step); + if( $t > 0 ) + $precision = 0; + else + $precision = -floor($t); + } + else + $precision = $this->precision; + + if( $this->label_formfunc != '' ) { + $f=$this->label_formfunc; + $l = call_user_func($f,$aVal); + } + elseif( $this->label_formatstr != '' || $this->label_dateformatstr != '' ) { + if( $this->label_usedateformat ) { + // Adjust the value to take daylight savings into account + if (date("I",$aVal)==1 && $this->iAdjustForDST ) // DST + $aVal+=3600; + $l = date($this->label_formatstr,$aVal); + if( $this->label_formatstr == 'W' ) { + // If we use week formatting then add a single 'w' in front of the + // week number to differentiate it from dates + $l = 'w'.$l; + } + } + else { + if( $this->label_dateformatstr !== '' ) { + // Adjust the value to take daylight savings into account + if (date("I",$aVal)==1 && $this->iAdjustForDST ) // DST + $aVal+=3600; + $l = date($this->label_dateformatstr,$aVal); + if( $this->label_formatstr == 'W' ) { + // If we use week formatting then add a single 'w' in front of the + // week number to differentiate it from dates + $l = 'w'.$l; + } + } + else + $l = sprintf($this->label_formatstr,$aVal); + } + } + else { + $l = sprintf('%01.'.$precision.'f',round($aVal,$precision)); + } + + if( ($this->supress_zerolabel && $l==0) || ($this->supress_first && $aIdx==0) || + ($this->supress_last && $aIdx==$aNbrTicks-1) ) { + $l=''; + } + return $l; + } + + // Stroke ticks on either X or Y axis + function _StrokeTicks(&$aImg,$aScale,$aPos) { + $hor = $aScale->type == 'x'; + $aImg->SetLineWeight($this->weight); + + // We need to make this an int since comparing it below + // with the result from round() can give wrong result, such that + // (40 < 40) == TRUE !!! + $limit = (int)$aScale->scale_abs[1]; + + // A text scale doesn't have any minor ticks + if( !$aScale->textscale ) { + // Stroke minor ticks + $yu = $aPos - $this->direction*$this->GetMinTickAbsSize(); + $xr = $aPos + $this->direction*$this->GetMinTickAbsSize(); + $n = count($this->ticks_pos); + for($i=0; $i < $n; ++$i ) { + if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) { + if( $this->mincolor!="" ) $aImg->PushColor($this->mincolor); + if( $hor ) { + //if( $this->ticks_pos[$i] <= $limit ) + $aImg->Line($this->ticks_pos[$i],$aPos,$this->ticks_pos[$i],$yu); + } + else { + //if( $this->ticks_pos[$i] >= $limit ) + $aImg->Line($aPos,$this->ticks_pos[$i],$xr,$this->ticks_pos[$i]); + } + if( $this->mincolor!="" ) $aImg->PopColor(); + } + } + } + + // Stroke major ticks + $yu = $aPos - $this->direction*$this->GetMajTickAbsSize(); + $xr = $aPos + $this->direction*$this->GetMajTickAbsSize(); + $nbrmajticks=round(($aScale->GetMaxVal()-$aScale->GetMinVal()-$this->text_label_start )/$this->major_step)+1; + $n = count($this->maj_ticks_pos); + for($i=0; $i < $n ; ++$i ) { + if(!($this->xtick_offset > 0 && $i==$nbrmajticks-1) && !$this->supress_tickmarks) { + if( $this->majcolor!="" ) $aImg->PushColor($this->majcolor); + if( $hor ) { + //if( $this->maj_ticks_pos[$i] <= $limit ) + $aImg->Line($this->maj_ticks_pos[$i],$aPos,$this->maj_ticks_pos[$i],$yu); + } + else { + //if( $this->maj_ticks_pos[$i] >= $limit ) + $aImg->Line($aPos,$this->maj_ticks_pos[$i],$xr,$this->maj_ticks_pos[$i]); + } + if( $this->majcolor!="" ) $aImg->PopColor(); + } + } + + } + + // Draw linear ticks + function Stroke(&$aImg,$aScale,$aPos) { + if( $this->iManualTickPos != NULL ) + $this->_doManualTickPos($aScale); + else + $this->_doAutoTickPos($aScale); + $this->_StrokeTicks($aImg,$aScale,$aPos, $aScale->type == 'x' ); + } + +//--------------- +// PRIVATE METHODS + // Spoecify the offset of the displayed tick mark with the tick "space" + // Legal values for $o is [0,1] used to adjust where the tick marks and label + // should be positioned within the major tick-size + // $lo specifies the label offset and $to specifies the tick offset + // this comes in handy for example in bar graphs where we wont no offset for the + // tick but have the labels displayed halfway under the bars. + function SetXLabelOffset($aLabelOff,$aTickOff=-1) { + $this->xlabel_offset=$aLabelOff; + if( $aTickOff==-1 ) // Same as label offset + $this->xtick_offset=$aLabelOff; + else + $this->xtick_offset=$aTickOff; + if( $aLabelOff>0 ) + $this->SupressLast(); // The last tick wont fit + } + + // Which tick label should we start with? + function SetTextLabelStart($aTextLabelOff) { + $this->text_label_start=$aTextLabelOff; + } + +} // Class + +//=================================================== +// CLASS LinearScale +// Description: Handle linear scaling between screen and world +//=================================================== +class LinearScale { + var $scale=array(0,0); + var $scale_abs=array(0,0); + var $scale_factor; // Scale factor between world and screen + var $world_size; // Plot area size in world coordinates + var $world_abs_size; // Plot area size in pixels + var $off; // Offset between image edge and plot area + var $type; // is this x or y scale ? + var $ticks=null; // Store ticks + var $text_scale_off = 0; + var $autoscale_min=false; // Forced minimum value, auto determine max + var $autoscale_max=false; // Forced maximum value, auto determine min + var $gracetop=0,$gracebottom=0; + var $intscale=false; // Restrict autoscale to integers + var $textscale=false; // Just a flag to let the Plot class find out if + // we are a textscale or not. This is a cludge since + // this ionformatyion is availabale in Graph::axtype but + // we don't have access to the graph object in the Plots + // stroke method. So we let graph store the status here + // when the linear scale is created. A real cludge... + var $auto_ticks=false; // When using manual scale should the ticks be automatically set? + var $name = 'lin'; +//--------------- +// CONSTRUCTOR + function LinearScale($aMin=0,$aMax=0,$aType="y") { + assert($aType=="x" || $aType=="y" ); + assert($aMin<=$aMax); + + $this->type=$aType; + $this->scale=array($aMin,$aMax); + $this->world_size=$aMax-$aMin; + $this->ticks = new LinearTicks(); + } + +//--------------- +// PUBLIC METHODS + // Check if scale is set or if we should autoscale + // We should do this is either scale or ticks has not been set + function IsSpecified() { + if( $this->GetMinVal()==$this->GetMaxVal() ) { // Scale not set + return false; + } + return true; + } + + // Set the minimum data value when the autoscaling is used. + // Usefull if you want a fix minimum (like 0) but have an + // automatic maximum + function SetAutoMin($aMin) { + $this->autoscale_min=$aMin; + } + + // Set the minimum data value when the autoscaling is used. + // Usefull if you want a fix minimum (like 0) but have an + // automatic maximum + function SetAutoMax($aMax) { + $this->autoscale_max=$aMax; + } + + // If the user manually specifies a scale should the ticks + // still be set automatically? + function SetAutoTicks($aFlag=true) { + $this->auto_ticks = $aFlag; + } + + // Specify scale "grace" value (top and bottom) + function SetGrace($aGraceTop,$aGraceBottom=0) { + if( $aGraceTop<0 || $aGraceBottom < 0 ) + JpGraphError::RaiseL(25069);//(" Grace must be larger then 0"); + $this->gracetop=$aGraceTop; + $this->gracebottom=$aGraceBottom; + } + + // Get the minimum value in the scale + function GetMinVal() { + return $this->scale[0]; + } + + // get maximum value for scale + function GetMaxVal() { + return $this->scale[1]; + } + + // Specify a new min/max value for sclae + function Update(&$aImg,$aMin,$aMax) { + $this->scale=array($aMin,$aMax); + $this->world_size=$aMax-$aMin; + $this->InitConstants($aImg); + } + + // Translate between world and screen + function Translate($aCoord) { + if( !is_numeric($aCoord) ) { + if( $aCoord != '' && $aCoord != '-' && $aCoord != 'x' ) + JpGraphError::RaiseL(25070);//('Your data contains non-numeric values.'); + return 0; + } + else { + return $this->off + ($aCoord - $this->scale[0])*$this->scale_factor; + } + } + + // Relative translate (don't include offset) usefull when we just want + // to know the relative position (in pixels) on the axis + function RelTranslate($aCoord) { + if( !is_numeric($aCoord) ) { + if( $aCoord != '' && $aCoord != '-' && $aCoord != 'x' ) + JpGraphError::RaiseL(25070);//('Your data contains non-numeric values.'); + return 0; + } + else { + return ($aCoord - $this->scale[0]) * $this->scale_factor; + } + } + + // Restrict autoscaling to only use integers + function SetIntScale($aIntScale=true) { + $this->intscale=$aIntScale; + } + + // Calculate an integer autoscale + function IntAutoScale(&$img,$min,$max,$maxsteps,$majend=true) { + // Make sure limits are integers + $min=floor($min); + $max=ceil($max); + if( abs($min-$max)==0 ) { + --$min; ++$max; + } + $maxsteps = floor($maxsteps); + + $gracetop=round(($this->gracetop/100.0)*abs($max-$min)); + $gracebottom=round(($this->gracebottom/100.0)*abs($max-$min)); + if( is_numeric($this->autoscale_min) ) { + $min = ceil($this->autoscale_min); + if( $min >= $max ) { + JpGraphError::RaiseL(25071);//('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.'); + } + } + + if( is_numeric($this->autoscale_max) ) { + $max = ceil($this->autoscale_max); + if( $min >= $max ) { + JpGraphError::RaiseL(25072);//('You have specified a max value with SetAutoMax() which is smaller than the miminum value used for the scale. This is not possible.'); + } + } + + if( abs($min-$max ) == 0 ) { + ++$max; + --$min; + } + + $min -= $gracebottom; + $max += $gracetop; + + // First get tickmarks as multiples of 1, 10, ... + if( $majend ) { + list($num1steps,$adj1min,$adj1max,$maj1step) = + $this->IntCalcTicks($maxsteps,$min,$max,1); + } + else { + $adj1min = $min; + $adj1max = $max; + list($num1steps,$maj1step) = + $this->IntCalcTicksFreeze($maxsteps,$min,$max,1); + } + + if( abs($min-$max) > 2 ) { + // Then get tick marks as 2:s 2, 20, ... + if( $majend ) { + list($num2steps,$adj2min,$adj2max,$maj2step) = + $this->IntCalcTicks($maxsteps,$min,$max,5); + } + else { + $adj2min = $min; + $adj2max = $max; + list($num2steps,$maj2step) = + $this->IntCalcTicksFreeze($maxsteps,$min,$max,5); + } + } + else { + $num2steps = 10000; // Dummy high value so we don't choose this + } + + if( abs($min-$max) > 5 ) { + // Then get tickmarks as 5:s 5, 50, 500, ... + if( $majend ) { + list($num5steps,$adj5min,$adj5max,$maj5step) = + $this->IntCalcTicks($maxsteps,$min,$max,2); + } + else { + $adj5min = $min; + $adj5max = $max; + list($num5steps,$maj5step) = + $this->IntCalcTicksFreeze($maxsteps,$min,$max,2); + } + } + else { + $num5steps = 10000; // Dummy high value so we don't choose this + } + + // Check to see whichof 1:s, 2:s or 5:s fit better with + // the requested number of major ticks + $match1=abs($num1steps-$maxsteps); + $match2=abs($num2steps-$maxsteps); + if( !empty($maj5step) && $maj5step > 1 ) + $match5=abs($num5steps-$maxsteps); + else + $match5=10000; // Dummy high value + + // Compare these three values and see which is the closest match + // We use a 0.6 weight to gravitate towards multiple of 5:s + if( $match1 < $match2 ) { + if( $match1 < $match5 ) + $r=1; + else + $r=3; + } + else { + if( $match2 < $match5 ) + $r=2; + else + $r=3; + } + // Minsteps are always the same as maxsteps for integer scale + switch( $r ) { + case 1: + $this->ticks->Set($maj1step,$maj1step); + $this->Update($img,$adj1min,$adj1max); + break; + case 2: + $this->ticks->Set($maj2step,$maj2step); + $this->Update($img,$adj2min,$adj2max); + break; + case 3: + $this->ticks->Set($maj5step,$maj5step); + $this->Update($img,$adj5min,$adj5max); + break; + default: + JpGraphError::RaiseL(25073,$r);//('Internal error. Integer scale algorithm comparison out of bound (r=$r)'); + } + } + + + // Calculate autoscale. Used if user hasn't given a scale and ticks + // $maxsteps is the maximum number of major tickmarks allowed. + function AutoScale(&$img,$min,$max,$maxsteps,$majend=true) { + if( $this->intscale ) { + $this->IntAutoScale($img,$min,$max,$maxsteps,$majend); + return; + } + if( abs($min-$max) < 0.00001 ) { + // We need some difference to be able to autoscale + // make it 5% above and 5% below value + if( $min==0 && $max==0 ) { // Special case + $min=-1; $max=1; + } + else { + $delta = (abs($max)+abs($min))*0.005; + $min -= $delta; + $max += $delta; + } + } + + $gracetop=($this->gracetop/100.0)*abs($max-$min); + $gracebottom=($this->gracebottom/100.0)*abs($max-$min); + if( is_numeric($this->autoscale_min) ) { + $min = $this->autoscale_min; + if( $min >= $max ) { + JpGraphError::RaiseL(25071);//('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.'); + } + if( abs($min-$max ) < 0.00001 ) + $max *= 1.2; + } + + if( is_numeric($this->autoscale_max) ) { + $max = $this->autoscale_max; + if( $min >= $max ) { + JpGraphError::RaiseL(25072);//('You have specified a max value with SetAutoMax() which is smaller than the miminum value used for the scale. This is not possible.'); + } + if( abs($min-$max ) < 0.00001 ) + $min *= 0.8; + } + + + $min -= $gracebottom; + $max += $gracetop; + + // First get tickmarks as multiples of 0.1, 1, 10, ... + if( $majend ) { + list($num1steps,$adj1min,$adj1max,$min1step,$maj1step) = + $this->CalcTicks($maxsteps,$min,$max,1,2); + } + else { + $adj1min=$min; + $adj1max=$max; + list($num1steps,$min1step,$maj1step) = + $this->CalcTicksFreeze($maxsteps,$min,$max,1,2,false); + } + + // Then get tick marks as 2:s 0.2, 2, 20, ... + if( $majend ) { + list($num2steps,$adj2min,$adj2max,$min2step,$maj2step) = + $this->CalcTicks($maxsteps,$min,$max,5,2); + } + else { + $adj2min=$min; + $adj2max=$max; + list($num2steps,$min2step,$maj2step) = + $this->CalcTicksFreeze($maxsteps,$min,$max,5,2,false); + } + + // Then get tickmarks as 5:s 0.05, 0.5, 5, 50, ... + if( $majend ) { + list($num5steps,$adj5min,$adj5max,$min5step,$maj5step) = + $this->CalcTicks($maxsteps,$min,$max,2,5); + } + else { + $adj5min=$min; + $adj5max=$max; + list($num5steps,$min5step,$maj5step) = + $this->CalcTicksFreeze($maxsteps,$min,$max,2,5,false); + } + + // Check to see whichof 1:s, 2:s or 5:s fit better with + // the requested number of major ticks + $match1=abs($num1steps-$maxsteps); + $match2=abs($num2steps-$maxsteps); + $match5=abs($num5steps-$maxsteps); + // Compare these three values and see which is the closest match + // We use a 0.8 weight to gravitate towards multiple of 5:s + $r=$this->MatchMin3($match1,$match2,$match5,0.8); + switch( $r ) { + case 1: + $this->Update($img,$adj1min,$adj1max); + $this->ticks->Set($maj1step,$min1step); + break; + case 2: + $this->Update($img,$adj2min,$adj2max); + $this->ticks->Set($maj2step,$min2step); + break; + case 3: + $this->Update($img,$adj5min,$adj5max); + $this->ticks->Set($maj5step,$min5step); + break; + } + } + +//--------------- +// PRIVATE METHODS + + // This method recalculates all constants that are depending on the + // margins in the image. If the margins in the image are changed + // this method should be called for every scale that is registred with + // that image. Should really be installed as an observer of that image. + function InitConstants(&$img) { + if( $this->type=="x" ) { + $this->world_abs_size=$img->width - $img->left_margin - $img->right_margin; + $this->off=$img->left_margin; + $this->scale_factor = 0; + if( $this->world_size > 0 ) + $this->scale_factor=$this->world_abs_size/($this->world_size*1.0); + } + else { // y scale + $this->world_abs_size=$img->height - $img->top_margin - $img->bottom_margin; + $this->off=$img->top_margin+$this->world_abs_size; + $this->scale_factor = 0; + if( $this->world_size > 0 ) { + $this->scale_factor=-$this->world_abs_size/($this->world_size*1.0); + } + } + $size = $this->world_size * $this->scale_factor; + $this->scale_abs=array($this->off,$this->off + $size); + } + + // Initialize the conversion constants for this scale + // This tries to pre-calculate as much as possible to speed up the + // actual conversion (with Translate()) later on + // $start =scale start in absolute pixels (for x-scale this is an y-position + // and for an y-scale this is an x-position + // $len =absolute length in pixels of scale + function SetConstants($aStart,$aLen) { + $this->world_abs_size=$aLen; + $this->off=$aStart; + + if( $this->world_size<=0 ) { + // This should never ever happen !! + JpGraphError::RaiseL(25074); +//("You have unfortunately stumbled upon a bug in JpGraph. It seems like the scale range is ".$this->world_size." [for ".$this->type." scale]
Please report Bug #01 to jpgraph@aditus.nu and include the script that gave this error. This problem could potentially be caused by trying to use \"illegal\" values in the input data arrays (like trying to send in strings or only NULL values) which causes the autoscaling to fail."); + + } + + // scale_factor = number of pixels per world unit + $this->scale_factor=$this->world_abs_size/($this->world_size*1.0); + + // scale_abs = start and end points of scale in absolute pixels + $this->scale_abs=array($this->off,$this->off+$this->world_size*$this->scale_factor); + } + + + // Calculate number of ticks steps with a specific division + // $a is the divisor of 10**x to generate the first maj tick intervall + // $a=1, $b=2 give major ticks with multiple of 10, ...,0.1,1,10,... + // $a=5, $b=2 give major ticks with multiple of 2:s ...,0.2,2,20,... + // $a=2, $b=5 give major ticks with multiple of 5:s ...,0.5,5,50,... + // We return a vector of + // [$numsteps,$adjmin,$adjmax,$minstep,$majstep] + // If $majend==true then the first and last marks on the axis will be major + // labeled tick marks otherwise it will be adjusted to the closest min tick mark + function CalcTicks($maxsteps,$min,$max,$a,$b,$majend=true) { + $diff=$max-$min; + if( $diff==0 ) + $ld=0; + else + $ld=floor(log10($diff)); + + // Gravitate min towards zero if we are close + if( $min>0 && $min < pow(10,$ld) ) $min=0; + + //$majstep=pow(10,$ld-1)/$a; + $majstep=pow(10,$ld)/$a; + $minstep=$majstep/$b; + + $adjmax=ceil($max/$minstep)*$minstep; + $adjmin=floor($min/$minstep)*$minstep; + $adjdiff = $adjmax-$adjmin; + $numsteps=$adjdiff/$majstep; + + while( $numsteps>$maxsteps ) { + $majstep=pow(10,$ld)/$a; + $numsteps=$adjdiff/$majstep; + ++$ld; + } + + $minstep=$majstep/$b; + $adjmin=floor($min/$minstep)*$minstep; + $adjdiff = $adjmax-$adjmin; + if( $majend ) { + $adjmin = floor($min/$majstep)*$majstep; + $adjdiff = $adjmax-$adjmin; + $adjmax = ceil($adjdiff/$majstep)*$majstep+$adjmin; + } + else + $adjmax=ceil($max/$minstep)*$minstep; + + return array($numsteps,$adjmin,$adjmax,$minstep,$majstep); + } + + function CalcTicksFreeze($maxsteps,$min,$max,$a,$b) { + // Same as CalcTicks but don't adjust min/max values + $diff=$max-$min; + if( $diff==0 ) + $ld=0; + else + $ld=floor(log10($diff)); + + //$majstep=pow(10,$ld-1)/$a; + $majstep=pow(10,$ld)/$a; + $minstep=$majstep/$b; + $numsteps=floor($diff/$majstep); + + while( $numsteps > $maxsteps ) { + $majstep=pow(10,$ld)/$a; + $numsteps=floor($diff/$majstep); + ++$ld; + } + $minstep=$majstep/$b; + return array($numsteps,$minstep,$majstep); + } + + + function IntCalcTicks($maxsteps,$min,$max,$a,$majend=true) { + $diff=$max-$min; + if( $diff==0 ) + JpGraphError::RaiseL(25075);//('Can\'t automatically determine ticks since min==max.'); + else + $ld=floor(log10($diff)); + + // Gravitate min towards zero if we are close + if( $min>0 && $min < pow(10,$ld) ) $min=0; + + if( $ld == 0 ) $ld=1; + + if( $a == 1 ) + $majstep = 1; + else + $majstep=pow(10,$ld)/$a; + $adjmax=ceil($max/$majstep)*$majstep; + + $adjmin=floor($min/$majstep)*$majstep; + $adjdiff = $adjmax-$adjmin; + $numsteps=$adjdiff/$majstep; + while( $numsteps>$maxsteps ) { + $majstep=pow(10,$ld)/$a; + $numsteps=$adjdiff/$majstep; + ++$ld; + } + + $adjmin=floor($min/$majstep)*$majstep; + $adjdiff = $adjmax-$adjmin; + if( $majend ) { + $adjmin = floor($min/$majstep)*$majstep; + $adjdiff = $adjmax-$adjmin; + $adjmax = ceil($adjdiff/$majstep)*$majstep+$adjmin; + } + else + $adjmax=ceil($max/$majstep)*$majstep; + + return array($numsteps,$adjmin,$adjmax,$majstep); + } + + + function IntCalcTicksFreeze($maxsteps,$min,$max,$a) { + // Same as IntCalcTick but don't change min/max values + $diff=$max-$min; + if( $diff==0 ) + JpGraphError::RaiseL(25075);//('Can\'t automatically determine ticks since min==max.'); + else + $ld=floor(log10($diff)); + + if( $ld == 0 ) $ld=1; + + if( $a == 1 ) + $majstep = 1; + else + $majstep=pow(10,$ld)/$a; + + $numsteps=floor($diff/$majstep); + while( $numsteps > $maxsteps ) { + $majstep=pow(10,$ld)/$a; + $numsteps=floor($diff/$majstep); + ++$ld; + } + + return array($numsteps,$majstep); + } + + + + // Determine the minimum of three values witha weight for last value + function MatchMin3($a,$b,$c,$weight) { + if( $a < $b ) { + if( $a < ($c*$weight) ) + return 1; // $a smallest + else + return 3; // $c smallest + } + elseif( $b < ($c*$weight) ) + return 2; // $b smallest + return 3; // $c smallest + } +} // Class +//=================================================== +// CLASS ImgStreamCache +// Description: Handle caching of graphs to files +//=================================================== +class ImgStreamCache { + var $cache_dir; + var $img=null; + var $timeout=0; // Infinite timeout + //--------------- + // CONSTRUCTOR + function ImgStreamCache(&$aImg, $aCacheDir=CACHE_DIR) { + $this->img = &$aImg; + $this->cache_dir = $aCacheDir; + } + +//--------------- +// PUBLIC METHODS + + // Specify a timeout (in minutes) for the file. If the file is older then the + // timeout value it will be overwritten with a newer version. + // If timeout is set to 0 this is the same as infinite large timeout and if + // timeout is set to -1 this is the same as infinite small timeout + function SetTimeout($aTimeout) { + $this->timeout=$aTimeout; + } + + // Output image to browser and also write it to the cache + function PutAndStream(&$aImage,$aCacheFileName,$aInline,$aStrokeFileName) { + // Some debugging code to brand the image with numbe of colors + // used + GLOBAL $gJpgBrandTiming; + + if( $gJpgBrandTiming ) { + global $tim; + $t=$tim->Pop()/1000.0; + $c=$aImage->SetColor("black"); + $t=sprintf(BRAND_TIME_FORMAT,round($t,3)); + imagestring($this->img->img,2,5,$this->img->height-20,$t,$c); + } + + // Check if we should stroke the image to an arbitrary file + if( _FORCE_IMGTOFILE ) { + $aStrokeFileName = _FORCE_IMGDIR.GenImgName(); + } + + if( $aStrokeFileName!="" ) { + if( $aStrokeFileName == "auto" ) + $aStrokeFileName = GenImgName(); + if( file_exists($aStrokeFileName) ) { + // Delete the old file + if( !@unlink($aStrokeFileName) ) + JpGraphError::RaiseL(25111,$aStrokeFileName);//(" Can't delete cached image $aStrokeFileName. Permission problem?"); + } + $aImage->Stream($aStrokeFileName); + return; + } + + if( $aCacheFileName != "" && USE_CACHE) { + + $aCacheFileName = $this->cache_dir . $aCacheFileName; + if( file_exists($aCacheFileName) ) { + if( !$aInline ) { + // If we are generating image off-line (just writing to the cache) + // and the file exists and is still valid (no timeout) + // then do nothing, just return. + $diff=time()-filemtime($aCacheFileName); + if( $diff < 0 ) + JpGraphError::RaiseL(25112,$aCacheFileName);//(" Cached imagefile ($aCacheFileName) has file date in the future!!"); + if( $this->timeout>0 && ($diff <= $this->timeout*60) ) + return; + } + if( !@unlink($aCacheFileName) ) + JpGraphError::RaiseL(25113,$aStrokeFileName);//(" Can't delete cached image $aStrokeFileName. Permission problem?"); + $aImage->Stream($aCacheFileName); + } + else { + $this->MakeDirs(dirname($aCacheFileName)); + if( !is_writeable(dirname($aCacheFileName)) ) { + JpGraphError::RaiseL(25114,$aCacheFileName);//('PHP has not enough permissions to write to the cache file '.$aCacheFileName.'. Please make sure that the user running PHP has write permission for this file if you wan to use the cache system with JpGraph.'); + } + $aImage->Stream($aCacheFileName); + } + + $res=true; + // Set group to specified + if( CACHE_FILE_GROUP != "" ) + $res = @chgrp($aCacheFileName,CACHE_FILE_GROUP); + if( CACHE_FILE_MOD != "" ) + $res = @chmod($aCacheFileName,CACHE_FILE_MOD); + if( !$res ) + JpGraphError::RaiseL(25115,$aStrokeFileName);//(" Can't set permission for cached image $aStrokeFileName. Permission problem?"); + + $aImage->Destroy(); + if( $aInline ) { + if ($fh = @fopen($aCacheFileName, "rb") ) { + $this->img->Headers(); + fpassthru($fh); + return; + } + else + JpGraphError::RaiseL(25116,$aFile);//(" Cant open file from cache [$aFile]"); + } + } + elseif( $aInline ) { + $this->img->Headers(); + $aImage->Stream(); + return; + } + } + + // Check if a given image is in cache and in that case + // pass it directly on to web browser. Return false if the + // image file doesn't exist or exists but is to old + function GetAndStream($aCacheFileName) { + $aCacheFileName = $this->cache_dir.$aCacheFileName; + if ( USE_CACHE && file_exists($aCacheFileName) && $this->timeout>=0 ) { + $diff=time()-filemtime($aCacheFileName); + if( $this->timeout>0 && ($diff > $this->timeout*60) ) { + return false; + } + else { + if ($fh = @fopen($aCacheFileName, "rb")) { + $this->img->Headers(); + fpassthru($fh); + return true; + } + else + JpGraphError::RaiseL(25117,$aCacheFileName);//(" Can't open cached image \"$aCacheFileName\" for reading."); + } + } + return false; + } + + //--------------- + // PRIVATE METHODS + // Create all necessary directories in a path + function MakeDirs($aFile) { + $dirs = array(); + while ( !(file_exists($aFile)) ) { + $dirs[] = $aFile; + $aFile = dirname($aFile); + } + for ($i = sizeof($dirs)-1; $i>=0; $i--) { + if(! @mkdir($dirs[$i],0777) ) + JpGraphError::RaiseL(25118,$aFile);//(" Can't create directory $aFile. Make sure PHP has write permission to this directory."); + // We also specify mode here after we have changed group. + // This is necessary if Apache user doesn't belong the + // default group and hence can't specify group permission + // in the previous mkdir() call + if( CACHE_FILE_GROUP != "" ) { + $res=true; + $res =@chgrp($dirs[$i],CACHE_FILE_GROUP); + $res &= @chmod($dirs[$i],0777); + if( !$res ) + JpGraphError::RaiseL(25119,$aFile);//(" Can't set permissions for $aFile. Permission problems?"); + } + } + return true; + } +} // CLASS Cache + +//=================================================== +// CLASS Legend +// Description: Responsible for drawing the box containing +// all the legend text for the graph +//=================================================== +DEFINE('_DEFAULT_LPM_SIZE',8); +class Legend { + var $color=array(0,0,0); // Default fram color + var $fill_color=array(235,235,235); // Default fill color + var $shadow=true; // Shadow around legend "box" + var $shadow_color='gray'; + var $txtcol=array(); + var $mark_abs_hsize=_DEFAULT_LPM_SIZE, $mark_abs_vsize=_DEFAULT_LPM_SIZE; + var $xmargin=10,$ymargin=3,$shadow_width=2; + var $xlmargin=2, $ylmargin=''; + var $xpos=0.05, $ypos=0.15, $xabspos=-1, $yabspos=-1; + var $halign="right", $valign="top"; + var $font_family=FF_FONT1,$font_style=FS_NORMAL,$font_size=10; + var $font_color='black'; + var $hide=false,$layout_n=1; + var $weight=1,$frameweight=1; + var $csimareas=''; + var $reverse = false ; +//--------------- +// CONSTRUCTOR + function Legend() { + // Empty + } +//--------------- +// PUBLIC METHODS + function Hide($aHide=true) { + $this->hide=$aHide; + } + + function SetHColMargin($aXMarg) { + $this->xmargin = $aXMarg; + } + + function SetVColMargin($aSpacing) { + $this->ymargin = $aSpacing ; + } + + function SetLeftMargin($aXMarg) { + $this->xlmargin = $aXMarg; + } + + // Synonym + function SetLineSpacing($aSpacing) { + $this->ymargin = $aSpacing ; + } + + function SetShadow($aShow='gray',$aWidth=2) { + if( is_string($aShow) ) { + $this->shadow_color = $aShow; + $this->shadow=true; + } + else + $this->shadow=$aShow; + $this->shadow_width=$aWidth; + } + + function SetMarkAbsSize($aSize) { + $this->mark_abs_vsize = $aSize ; + $this->mark_abs_hsize = $aSize ; + } + + function SetMarkAbsVSize($aSize) { + $this->mark_abs_vsize = $aSize ; + } + + function SetMarkAbsHSize($aSize) { + $this->mark_abs_hsize = $aSize ; + } + + function SetLineWeight($aWeight) { + $this->weight = $aWeight; + } + + function SetFrameWeight($aWeight) { + $this->frameweight = $aWeight; + } + + function SetLayout($aDirection=LEGEND_VERT) { + $this->layout_n = $aDirection==LEGEND_VERT ? 1 : 99 ; + } + + function SetColumns($aCols) { + $this->layout_n = $aCols ; + } + + function SetReverse($f=true) { + $this->reverse = $f ; + } + + // Set color on frame around box + function SetColor($aFontColor,$aColor='black') { + $this->font_color=$aFontColor; + $this->color=$aColor; + } + + function SetFont($aFamily,$aStyle=FS_NORMAL,$aSize=10) { + $this->font_family = $aFamily; + $this->font_style = $aStyle; + $this->font_size = $aSize; + } + + function SetPos($aX,$aY,$aHAlign="right",$aVAlign="top") { + $this->Pos($aX,$aY,$aHAlign,$aVAlign); + } + + function SetAbsPos($aX,$aY,$aHAlign="right",$aVAlign="top") { + $this->xabspos=$aX; + $this->yabspos=$aY; + $this->halign=$aHAlign; + $this->valign=$aVAlign; + } + + + function Pos($aX,$aY,$aHAlign="right",$aVAlign="top") { + if( !($aX<1 && $aY<1) ) + JpGraphError::RaiseL(25120);//(" Position for legend must be given as percentage in range 0-1"); + $this->xpos=$aX; + $this->ypos=$aY; + $this->halign=$aHAlign; + $this->valign=$aVAlign; + } + + function SetFillColor($aColor) { + $this->fill_color=$aColor; + } + + function Add($aTxt,$aColor,$aPlotmark="",$aLinestyle=0,$csimtarget='',$csimalt='',$csimwintarget='') { + $this->txtcol[]=array($aTxt,$aColor,$aPlotmark,$aLinestyle,$csimtarget,$csimalt,$csimwintarget); + } + + function GetCSIMAreas() { + return $this->csimareas; + } + + function Stroke(&$aImg) { + // Constant + $fillBoxFrameWeight=1; + + if( $this->hide ) return; + + $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); + + if( $this->reverse ) { + $this->txtcol = array_reverse($this->txtcol); + } + + $n=count($this->txtcol); + if( $n == 0 ) return; + + // Find out the max width and height of each column to be able + // to size the legend box. + $numcolumns = ($n > $this->layout_n ? $this->layout_n : $n); + for( $i=0; $i < $numcolumns; ++$i ) { + $colwidth[$i] = $aImg->GetTextWidth($this->txtcol[$i][0]) + + 2*$this->xmargin + 2*$this->mark_abs_hsize; + $colheight[$i] = 0; + } + + // Find our maximum height in each row + $rows = 0 ; $rowheight[0] = 0; + for( $i=0; $i < $n; ++$i ) { + $h = max($this->mark_abs_vsize,$aImg->GetTextHeight($this->txtcol[$i][0]))+$this->ymargin; + if( $i % $numcolumns == 0 ) { + $rows++; + $rowheight[$rows-1] = 0; + } + $rowheight[$rows-1] = max($rowheight[$rows-1],$h); + } + + $abs_height = 0; + for( $i=0; $i < $rows; ++$i ) { + $abs_height += $rowheight[$i] ; + } + + // Make sure that the height is at least as high as mark size + ymargin + $abs_height = max($abs_height,$this->mark_abs_vsize); + + // We add 3 extra pixels height to compensate for the difficult in + // calculating font height + $abs_height += $this->ymargin+3; + + // Find out the maximum width in each column + for( $i=$numcolumns; $i < $n; ++$i ) { + $colwidth[$i % $numcolumns] = max( + $aImg->GetTextWidth($this->txtcol[$i][0])+2*$this->xmargin+2*$this->mark_abs_hsize,$colwidth[$i % $numcolumns]); + } + + // Get the total width + $mtw = 0; + for( $i=0; $i < $numcolumns; ++$i ) { + $mtw += $colwidth[$i] ; + } + + // Find out maximum width we need for legend box + $abs_width = $mtw+$this->xlmargin; + + if( $this->xabspos === -1 && $this->yabspos === -1 ) { + $this->xabspos = $this->xpos*$aImg->width ; + $this->yabspos = $this->ypos*$aImg->height ; + } + + // Positioning of the legend box + if( $this->halign=="left" ) + $xp = $this->xabspos; + elseif( $this->halign=="center" ) + $xp = $this->xabspos - $abs_width/2; + else + $xp = $aImg->width - $this->xabspos - $abs_width; + + $yp=$this->yabspos; + if( $this->valign=="center" ) + $yp-=$abs_height/2; + elseif( $this->valign=="bottom" ) + $yp-=$abs_height; + + // Stroke legend box + $aImg->SetColor($this->color); + $aImg->SetLineWeight($this->frameweight); + $aImg->SetLineStyle('solid'); + + if( $this->shadow ) + $aImg->ShadowRectangle($xp,$yp,$xp+$abs_width+$this->shadow_width, + $yp+$abs_height+$this->shadow_width, + $this->fill_color,$this->shadow_width,$this->shadow_color); + else { + $aImg->SetColor($this->fill_color); + $aImg->FilledRectangle($xp,$yp,$xp+$abs_width,$yp+$abs_height); + $aImg->SetColor($this->color); + $aImg->Rectangle($xp,$yp,$xp+$abs_width,$yp+$abs_height); + } + + // x1,y1 is the position for the legend mark + $x1=$xp+$this->mark_abs_hsize+$this->xlmargin; + $y1=$yp + $this->ymargin; + + $f2 = round($aImg->GetTextHeight('X')/2); + + $grad = new Gradient($aImg); + $patternFactory = null; + + // Now stroke each legend in turn + // Each plot has added the following information to the legend + // p[0] = Legend text + // p[1] = Color, + // p[2] = For markers a reference to the PlotMark object + // p[3] = For lines the line style, for gradient the negative gradient style + // p[4] = CSIM target + // p[5] = CSIM Alt text + $i = 1 ; $row = 0; + foreach($this->txtcol as $p) { + + // STROKE DEBUG BOX + if( _JPG_DEBUG ) { + $aImg->SetLineWeight(1); + $aImg->SetColor('red'); + $aImg->SetLineStyle('solid'); + $aImg->Rectangle($xp,$y1,$xp+$abs_width,$y1+$rowheight[$row]); + } + + $aImg->SetLineWeight($this->weight); + $x1 = round($x1); $y1=round($y1); + if ( $p[2] && $p[2]->GetType() > -1 ) { + // Make a plot mark legend + $aImg->SetColor($p[1]); + if( is_string($p[3]) || $p[3]>0 ) { + $aImg->SetLineStyle($p[3]); + $aImg->StyleLine($x1-$this->mark_abs_hsize,$y1+$f2,$x1+$this->mark_abs_hsize,$y1+$f2); + } + // Stroke a mark with the standard size + // (As long as it is not an image mark ) + if( $p[2]->GetType() != MARK_IMG ) { + + // Clear any user callbacks since we ont want them called for + // the legend marks + $p[2]->iFormatCallback = ''; + $p[2]->iFormatCallback2 = ''; + + // Since size for circles is specified as the radius + // this means that we must half the size to make the total + // width behave as the other marks + if( $p[2]->GetType() == MARK_FILLEDCIRCLE || $p[2]->GetType() == MARK_CIRCLE ) { + $p[2]->SetSize(min($this->mark_abs_vsize,$this->mark_abs_hsize)/2); + $p[2]->Stroke($aImg,$x1,$y1+$f2); + } + else { + $p[2]->SetSize(min($this->mark_abs_vsize,$this->mark_abs_hsize)); + $p[2]->Stroke($aImg,$x1,$y1+$f2); + } + } + } + elseif ( $p[2] && (is_string($p[3]) || $p[3]>0 ) ) { + // Draw a styled line + $aImg->SetColor($p[1]); + $aImg->SetLineStyle($p[3]); + $aImg->StyleLine($x1-1,$y1+$f2,$x1+$this->mark_abs_hsize,$y1+$f2); + $aImg->StyleLine($x1-1,$y1+$f2+1,$x1+$this->mark_abs_hsize,$y1+$f2+1); + } + else { + // Draw a colored box + $color = $p[1] ; + // We make boxes slightly larger to better show + $boxsize = min($this->mark_abs_vsize,$this->mark_abs_hsize) + 2 ; + $ym = round($y1 + $f2 - $boxsize/2); + // We either need to plot a gradient or a + // pattern. To differentiate we use a kludge. + // Patterns have a p[3] value of < -100 + if( $p[3] < -100 ) { + // p[1][0] == iPattern, p[1][1] == iPatternColor, p[1][2] == iPatternDensity + if( $patternFactory == null ) { + $patternFactory = new RectPatternFactory(); + } + $prect = $patternFactory->Create($p[1][0],$p[1][1],1); + $prect->SetBackground($p[1][3]); + $prect->SetDensity($p[1][2]+1); + $prect->SetPos(new Rectangle($x1,$ym,$boxsize,$boxsize)); + $prect->Stroke($aImg); + $prect=null; + } + else { + if( is_array($color) && count($color)==2 ) { + // The client want a gradient color + $grad->FilledRectangle($x1,$ym, + $x1+$boxsize,$ym+$boxsize, + $color[0],$color[1],-$p[3]); + } + else { + $aImg->SetColor($p[1]); + $aImg->FilledRectangle($x1,$ym,$x1+$boxsize,$ym+$boxsize); + } + $aImg->SetColor($this->color); + $aImg->SetLineWeight($fillBoxFrameWeight); + $aImg->Rectangle($x1,$ym,$x1+$boxsize,$ym+$boxsize); + } + } + $aImg->SetColor($this->font_color); + $aImg->SetFont($this->font_family,$this->font_style,$this->font_size); + $aImg->SetTextAlign("left","top"); + $aImg->StrokeText(round($x1+$this->mark_abs_hsize+$this->xmargin),$y1,$p[0]); + + // Add CSIM for Legend if defined + if( $p[4] != "" ) { + $xe = $x1 + $this->xmargin+$this->mark_abs_hsize+$aImg->GetTextWidth($p[0]); + $ye = $y1 + max($this->mark_abs_vsize,$aImg->GetTextHeight($p[0])); + $coords = "$x1,$y1,$xe,$y1,$xe,$ye,$x1,$ye"; + if( ! empty($p[4]) ) { + $this->csimareas .= "csimareas .= " target=\"".$p[6]."\""; + } + + if( !empty($p[5]) ) { + $tmp=sprintf($p[5],$p[0]); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + } + if( $i >= $this->layout_n ) { + $x1 = $xp+$this->mark_abs_hsize+$this->xlmargin; + $y1 += $rowheight[$row++]; + $i = 1; + } + else { + $x1 += $colwidth[($i-1) % $numcolumns] ; + ++$i; + } + } + } +} // Class + + +//=================================================== +// CLASS DisplayValue +// Description: Used to print data values at data points +//=================================================== +class DisplayValue { + var $show=false,$format="%.1f",$negformat=""; + var $iFormCallback=''; + var $angle=0; + var $ff=FF_FONT1,$fs=FS_NORMAL,$fsize=10; + var $color="navy",$negcolor=""; + var $margin=5,$valign="",$halign="center"; + var $iHideZero=false; + + function Show($aFlag=true) { + $this->show=$aFlag; + } + + function SetColor($aColor,$aNegcolor="") { + $this->color = $aColor; + $this->negcolor = $aNegcolor; + } + + function SetFont($aFontFamily,$aFontStyle=FS_NORMAL,$aFontSize=10) { + $this->ff=$aFontFamily; + $this->fs=$aFontStyle; + $this->fsize=$aFontSize; + } + + function SetMargin($aMargin) { + $this->margin = $aMargin; + } + + function SetAngle($aAngle) { + $this->angle = $aAngle; + } + + function SetAlign($aHAlign,$aVAlign='') { + $this->halign = $aHAlign; + $this->valign = $aVAlign; + } + + function SetFormat($aFormat,$aNegFormat="") { + $this->format= $aFormat; + $this->negformat= $aNegFormat; + } + + function SetFormatCallback($aFunc) { + $this->iFormCallback = $aFunc; + } + + function HideZero($aFlag=true) { + $this->iHideZero=$aFlag; + } + + function Stroke(&$img,$aVal,$x,$y) { + + if( $this->show ) + { + if( $this->negformat=="" ) $this->negformat=$this->format; + if( $this->negcolor=="" ) $this->negcolor=$this->color; + + if( $aVal===NULL || (is_string($aVal) && ($aVal=="" || $aVal=="-" || $aVal=="x" ) ) ) + return; + + if( is_numeric($aVal) && $aVal==0 && $this->iHideZero ) { + return; + } + + // Since the value is used in different cirumstances we need to check what + // kind of formatting we shall use. For example, to display values in a line + // graph we simply display the formatted value, but in the case where the user + // has already specified a text string we don't fo anything. + if( $this->iFormCallback != '' ) { + $f = $this->iFormCallback; + $sval = call_user_func($f,$aVal); + } + elseif( is_numeric($aVal) ) { + if( $aVal >= 0 ) + $sval=sprintf($this->format,$aVal); + else + $sval=sprintf($this->negformat,$aVal); + } + else + $sval=$aVal; + + $y = $y-sign($aVal)*$this->margin; + + $txt = new Text($sval,$x,$y); + $txt->SetFont($this->ff,$this->fs,$this->fsize); + if( $this->valign == "" ) { + if( $aVal >= 0 ) + $valign = "bottom"; + else + $valign = "top"; + } + else + $valign = $this->valign; + $txt->Align($this->halign,$valign); + + $txt->SetOrientation($this->angle); + if( $aVal > 0 ) + $txt->SetColor($this->color); + else + $txt->SetColor($this->negcolor); + $txt->Stroke($img); + } + } +} + +//=================================================== +// CLASS Plot +// Description: Abstract base class for all concrete plot classes +//=================================================== +class Plot { + var $line_weight=1; + var $coords=array(); + var $legend='',$hidelegend=false; + var $csimtargets=array(); // Array of targets for CSIM + var $csimwintargets=array(); // Array of window targets for CSIM + var $csimareas=""; // Resultant CSIM area tags + var $csimalts=null; // ALT:s for corresponding target + var $color="black"; + var $numpoints=0; + var $weight=1; + var $value; + var $center=false; + var $legendcsimtarget='',$legendcsimwintarget=''; + var $legendcsimalt=''; +//--------------- +// CONSTRUCTOR + function Plot(&$aDatay,$aDatax=false) { + $this->numpoints = count($aDatay); + if( $this->numpoints==0 ) + JpGraphError::RaiseL(25121);//("Empty input data array specified for plot. Must have at least one data point."); + $this->coords[0]=$aDatay; + if( is_array($aDatax) ) { + $this->coords[1]=$aDatax; + $n = count($aDatax); + for($i=0; $i < $n; ++$i ) { + if( !is_numeric($aDatax[$i])) { + JpGraphError::RaiseL(25070); + } + } + } + $this->value = new DisplayValue(); + } + +//--------------- +// PUBLIC METHODS + + // Stroke the plot + // "virtual" function which must be implemented by + // the subclasses + function Stroke(&$aImg,&$aXScale,&$aYScale) { + JpGraphError::RaiseL(25122);//("JpGraph: Stroke() must be implemented by concrete subclass to class Plot"); + } + + function HideLegend($f=true) { + $this->hidelegend = $f; + } + + function DoLegend(&$graph) { + if( !$this->hidelegend ) + $this->Legend($graph); + } + + function StrokeDataValue($img,$aVal,$x,$y) { + $this->value->Stroke($img,$aVal,$x,$y); + } + + // Set href targets for CSIM + function SetCSIMTargets($aTargets,$aAlts='',$aWinTargets='') { + $this->csimtargets=$aTargets; + $this->csimwintargets=$aWinTargets; + $this->csimalts=$aAlts; + } + + // Get all created areas + function GetCSIMareas() { + return $this->csimareas; + } + + // "Virtual" function which gets called before any scale + // or axis are stroked used to do any plot specific adjustment + function PreStrokeAdjust(&$aGraph) { + if( substr($aGraph->axtype,0,4) == "text" && (isset($this->coords[1])) ) + JpGraphError::RaiseL(25123);//("JpGraph: You can't use a text X-scale with specified X-coords. Use a \"int\" or \"lin\" scale instead."); + return true; + } + + // Get minimum values in plot + function Min() { + if( isset($this->coords[1]) ) + $x=$this->coords[1]; + else + $x=""; + if( $x != "" && count($x) > 0 ) { + $xm=min($x); + } + else + $xm=0; + $y=$this->coords[0]; + $cnt = count($y); + if( $cnt > 0 ) { + /* + if( ! isset($y[0]) ) { + JpGraphError('The input data array must have consecutive values from position 0 and forward. The given y-array starts with empty values (NULL)'); + } + */ + //$ym = $y[0]; + $i=0; + while( $i<$cnt && !is_numeric($ym=$y[$i]) ) + $i++; + while( $i < $cnt) { + if( is_numeric($y[$i]) ) + $ym=min($ym,$y[$i]); + ++$i; + } + } + else + $ym=""; + return array($xm,$ym); + } + + // Get maximum value in plot + function Max() { + if( isset($this->coords[1]) ) + $x=$this->coords[1]; + else + $x=""; + + if( $x!="" && count($x) > 0 ) + $xm=max($x); + else { + $xm = $this->numpoints-1; + } + $y=$this->coords[0]; + if( count($y) > 0 ) { + /* + if( !isset($y[0]) ) { + JpGraphError::Raise('The input data array must have consecutive values from position 0 and forward. The given y-array starts with empty values (NULL)'); + //$y[0] = 0; +// Change in 1.5.1 Don't treat this as an error any more. Just silently convert to 0 +// Change in 1.17 Treat his as an error again !! This is the right way to do !! + } + */ + $cnt = count($y); + $i=0; + while( $i<$cnt && !is_numeric($ym=$y[$i]) ) + $i++; + while( $i < $cnt ) { + if( is_numeric($y[$i]) ) + $ym=max($ym,$y[$i]); + ++$i; + } + + } + else + $ym=""; + return array($xm,$ym); + } + + function SetColor($aColor) { + $this->color=$aColor; + } + + function SetLegend($aLegend,$aCSIM='',$aCSIMAlt='',$aCSIMWinTarget='') { + $this->legend = $aLegend; + $this->legendcsimtarget = $aCSIM; + $this->legendcsimwintarget = $aCSIMWinTarget; + $this->legendcsimalt = $aCSIMAlt; + } + + function SetWeight($aWeight) { + $this->weight=$aWeight; + } + + function SetLineWeight($aWeight=1) { + $this->line_weight=$aWeight; + } + + function SetCenter($aCenter=true) { + $this->center = $aCenter; + } + + // This method gets called by Graph class to plot anything that should go + // into the margin after the margin color has been set. + function StrokeMargin(&$aImg) { + return true; + } + + // Framework function the chance for each plot class to set a legend + function Legend(&$aGraph) { + if( $this->legend != "" ) + $aGraph->legend->Add($this->legend,$this->color,"",0,$this->legendcsimtarget, + $this->legendcsimalt,$this->legendcsimwintarget); + } + +} // Class + + +//=================================================== +// CLASS PlotLine +// Description: +// Data container class to hold properties for a static +// line that is drawn directly in the plot area. +// Usefull to add static borders inside a plot to show +// for example set-values +//=================================================== +class PlotLine { + var $weight=1; + var $color="black"; + var $direction=-1; + var $scaleposition; + var $legend='',$hidelegend=false, $legendcsimtarget='', $legendcsimalt='', $legendcsimwintarget=''; + var $iLineStyle='solid'; + + +//--------------- +// CONSTRUCTOR + function PlotLine($aDir=HORIZONTAL,$aPos=0,$aColor="black",$aWeight=1) { + $this->direction = $aDir; + $this->color=$aColor; + $this->weight=$aWeight; + $this->scaleposition=$aPos; + } + +//--------------- +// PUBLIC METHODS + + function SetLegend($aLegend,$aCSIM='',$aCSIMAlt='',$aCSIMWinTarget='') { + $this->legend = $aLegend; + $this->legendcsimtarget = $aCSIM; + $this->legendcsimwintarget = $aCSIMWinTarget; + $this->legendcsimalt = $aCSIMAlt; + } + + function HideLegend($f=true) { + $this->hidelegend = $f; + } + + function SetPosition($aScalePosition) { + $this->scaleposition=$aScalePosition; + } + + function SetDirection($aDir) { + $this->direction = $aDir; + } + + function SetColor($aColor) { + $this->color=$aColor; + } + + function SetWeight($aWeight) { + $this->weight=$aWeight; + } + + function SetLineStyle($aStyle) { + $this->iLineStyle = $aStyle; + } + +//--------------- +// PRIVATE METHODS + + function DoLegend(&$graph) { + if( !$this->hidelegend ) + $this->Legend($graph); + } + + // Framework function the chance for each plot class to set a legend + function Legend(&$aGraph) { + if( $this->legend != "" ) { + $dummyPlotMark = new PlotMark(); + $lineStyle = 1; + $aGraph->legend->Add($this->legend,$this->color,$dummyPlotMark,$lineStyle, + $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); + } + } + + function PreStrokeAdjust($aGraph) { + // Nothing to do + } + + function Stroke(&$aImg,&$aXScale,&$aYScale) { + $aImg->SetColor($this->color); + $aImg->SetLineWeight($this->weight); + $oldStyle = $aImg->SetLineStyle($this->iLineStyle); + if( $this->direction == VERTICAL ) { + $ymin_abs=$aYScale->Translate($aYScale->GetMinVal()); + $ymax_abs=$aYScale->Translate($aYScale->GetMaxVal()); + $xpos_abs=$aXScale->Translate($this->scaleposition); + $aImg->StyleLine($xpos_abs, $ymin_abs, $xpos_abs, $ymax_abs); + } + elseif( $this->direction == HORIZONTAL ) { + $xmin_abs=$aXScale->Translate($aXScale->GetMinVal()); + $xmax_abs=$aXScale->Translate($aXScale->GetMaxVal()); + $ypos_abs=$aYScale->Translate($this->scaleposition); + $aImg->StyleLine($xmin_abs, $ypos_abs, $xmax_abs, $ypos_abs); + } + else { + JpGraphError::RaiseL(25125);//(" Illegal direction for static line"); + } + $aImg->SetLineStyle($oldStyle); + } +} + +// +?> diff --git a/html/includes/jpgraph/src/jpgraph_antispam-digits.php b/html/includes/jpgraph/src/jpgraph_antispam-digits.php new file mode 100644 index 0000000000..f72f153338 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_antispam-digits.php @@ -0,0 +1,204 @@ +digits['6'][0]= 645 ; + $this->digits['6'][1]= + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC'. + 'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA'. + 'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu'. + 'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e'. + 'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN'. + 'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37'. + 'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z' ; + +//========================================================== +// d2-small.jpg +//========================================================== + $this->digits['2'][0]= 606 ; + $this->digits['2'][1]= + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC'. + 'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA'. + 'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou'. + 'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F'. + 'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1'. + '7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL'. + 'DLZ6f//Z' ; + +//========================================================== +// d9-small.jpg +//========================================================== + $this->digits['9'][0]= 680 ; + $this->digits['9'][1]= + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD'. + 'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA'. + 'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV'. + 'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz'. + 'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha'. + 'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ'. + 'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro'. + '1V1//9k=' ; + +//========================================================== +// d5-small.jpg +//========================================================== + $this->digits['5'][0]= 632 ; + $this->digits['5'][1]= + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME'. + 'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA'. + 'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug'. + 'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r'. + 'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/'. + 'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz'. + '8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k=' ; + +//========================================================== +// d1-small.jpg +//========================================================== + $this->digits['1'][0]= 646 ; + $this->digits['1'][1]= + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD'. + 'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA'. + 'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA'. + 'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN'. + 'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI'. + 'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS'. + 'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q==' ; + +//========================================================== +// d8-small.jpg +//========================================================== + $this->digits['8'][0]= 694 ; + $this->digits['8'][1]= + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD'. + 'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA'. + 'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8'. + 'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J'. + '44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7'. + 'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9'. + 'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC'. + 'EylmLHQltptPZKQOBo1FzH//2Q==' ; + +//========================================================== +// d4-small.jpg +//========================================================== + $this->digits['4'][0]= 643 ; + $this->digits['4'][1]= + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA'. + 'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA'. + 'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv'. + 'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44'. + 'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q'. + '27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG'. + 'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q==' ; + +//========================================================== +// d7-small.jpg +//========================================================== + $this->digits['7'][0]= 658 ; + $this->digits['7'][1]= + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE'. + 'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA'. + 'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps'. + '19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC'. + 'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5'. + '8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp'. + 'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q==' ; + +//========================================================== +// d3-small.jpg +//========================================================== + $this->digits['3'][0]= 662 ; + $this->digits['3'][1]= + '/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. + 'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. + 'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED'. + 'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA'. + 'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS'. + 'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK'. + 'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu'. + 'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7'. + 'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k=' ; + } +} + +class AntiSpam { + + var $iNumber=''; + + function AntiSpam($aNumber='') { + $this->iNumber = $aNumber; + } + + function Rand($aLen) { + $d=''; + for($i=0; $i < $aLen; ++$i) { + $d .= rand(1,9); + } + $this->iNumber = $d; + return $d; + } + + function Stroke() { + + $n=strlen($this->iNumber); + for($i=0; $i < $n; ++$i ) { + if( !is_numeric($this->iNumber[$i]) || $this->iNumber[$i]==0 ) { + return false; + } + } + + $dd = new HandDigits(); + $n = strlen($this->iNumber); + $img = @imagecreatetruecolor($n*$dd->iWidth, $dd->iHeight); + if( $img < 1 ) { + return false; + } + $start=0; + for($i=0; $i < $n; ++$i ) { + $size = $dd->digits[$this->iNumber[$i]][0]; + $dimg = imagecreatefromstring(base64_decode($dd->digits[$this->iNumber[$i]][1])); + imagecopy($img,$dimg,$start,0,0,0,imagesx($dimg), $dd->iHeight); + $start += imagesx($dimg); + } + $resimg = @imagecreatetruecolor($start+4, $dd->iHeight+4); + if( $resimg < 1 ) { + return false; + } + imagecopy($resimg,$img,2,2,0,0,$start, $dd->iHeight); + header("Content-type: image/jpeg"); + imagejpeg($resimg); + return true; + } +} + +?> diff --git a/html/includes/jpgraph/src/jpgraph_antispam.php b/html/includes/jpgraph/src/jpgraph_antispam.php new file mode 100644 index 0000000000..7d87e22ac1 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_antispam.php @@ -0,0 +1,624 @@ +chars['j'][0]= 658 ; +$this->chars['j'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAUGBAf/xAAsEAACAQMDAwMBCQAAAAAAAAAB'. +'AgMEBREAEjEGIUEUUXGBBxMVIiNSYWKC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAwEC/8QAGhEAAwADAQAAAAAAAAAAAAAAAAECERIh'. +'Mv/aAAwDAQACEQMRAD8A6veK2st8zRWSyV1dUBfvHaGVI4hknsS7AFv4AyM57ayWbqeS+11xtT2etttwo4YqhEqnQs5bcAfyk4AZ'. +'SOeD441TKRTyingUBG4/ah8j684+dSFzh/BvtaslejMUu9DPQTDnLx4lQ/ONw1TGBm0jdRWqguEMghEisWilgDmNs4Ze+MEEEH40'. +'aUVFTa7JeLjRXu4GjhmnNbSfqFQVlA3rkckOjH/Q99Glmkl0C/Q06pvsvT9vttXHDF6T1KrWbs5gRgQJM+FDlQxPhjpF1XcVq+qe'. +'jEoKiOecXBqh2TDDYIXLKuP6549xk8auI6aJqV45oknWdNswkAIkGMYIxjGO2NR1F0LZY5qkWqkS1xrM0M8lMSJpY+TGrnJiQ577'. +'cEgeNHhi7D3qC3UN69M8tIakRhgrh9o748+eNGtcCiKjjpkQKlMTEg3ZwoxtHHtgfTRpYXArvp//2Q==' ; + +//========================================================== +// lf-small.jpg +//========================================================== +$this->chars['f'][0]= 633 ; +$this->chars['f'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQFBgcC/8QAKxAAAgEDAwMCBQUAAAAAAAAA'. +'AQIDBBEhAAUGEjFBEyIHFFFhoRUzYnGS/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQP/xAAaEQACAwEBAAAAAAAAAAAAAAAAAQIRMRIh'. +'/9oADAMBAAIRAxEAPwDcnmLoIkiSYsouC3tA++O2lU9WkqVjJ+YdhZLsQI/4/YfQm50kZP0vbmaCSU0SRNIH6sghb9INs3t38dvp'. +'akUuz8x5DwdN5peS1jV1dSipSiVUigIcdQjQ26lIB/c6r3F86SZpE/zCFJaqsihQNhRgdj3Jyfxo0jDSbXHt9Oph9RAoV3qJGltY'. +'HDOxyb/nRpV0D3RXle21m48XraOk3IUSemUaV4g4Zc9ShcDtgff+tQfwvjq34Dtku7buamFqeJKemCCMxKFsEJU+/FrX8d76sEHG'. +'aNItzr4usVNdG3S0rmRYAVwEUmyjyQLZ11x7aF4zs9DQOyzml29I2cLa/pixIHi99DFCtU9dFuLIaijo9qiYPmR2mZmB9thgAHOD'. +'4+mjUrURyrUNMZFEkkIOFuFAbsP9d/OjVIQ6Vh4tP//Z' ; + +//========================================================== +// lb-small.jpg +//========================================================== +$this->chars['b'][0]= 645 ; +$this->chars['b'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAYCAwUH/8QAKxAAAQMDAwMDAwUAAAAAAAAA'. +'AQIDBAAFEQYSIRMxUSJBYQcVI2JxgqHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAQL/xAAYEQEBAQEBAAAAAAAAAAAAAAAAATERYf/a'. +'AAwDAQACEQMRAD8A6H95mxNYwLXcX+pCuilSLXJ6YSplaUELjqxwe4IJ5PIPamJ2V0bPcS7+NxCX1cHggAnIP+xSd9RyzHh2m7FQ'. +'Q1CvMNQWTjCt+HFD+PB/Y1fI1PL1HFFt0zaGblFdJQ9cJjpZiqPJUlBAKnPcEpGB5NNRKdrOl1NlgiQol4R2w4Sc5VtGf7opZteo'. +'LhdorjUSM5FnQnlR50NeHQysYxtVxlJHIPgjtRRD3xkaghs6juumdHz4+Y7RVPnt59K2mk7W+fcKWsZ7djTXMkW+xMP3GRJjwIEN'. +'HTG/CWx5wPY8AADx2NYk3SL9wukvUjGobnBkORksIbjdMANozgEqSo8qJPGO/wAVO36IsjUmBIfZfuM7epZk3F9UhSSk5O0K9Kcq'. +'8AcU3UzFuhUSBFud6nRXoz96mqmJZWg7m2dqUNhWBwdqQSP1UU5c/FFCn//Z' ; + +//========================================================== +// d6-small.jpg +//========================================================== +$this->chars['6'][0]= 645 ; +$this->chars['6'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. +'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC'. +'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA'. +'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu'. +'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e'. +'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN'. +'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37'. +'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z' ; + +//========================================================== +// lx-small.jpg +//========================================================== +$this->chars['x'][0]= 650 ; +$this->chars['x'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABMDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAUHBgj/xAApEAABAwMDAwQCAwAAAAAAAAAB'. +'AgMEBQYRACFBBxIxFCJRgRNxkcHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAWEQEBAQAAAAAAAAAAAAAAAAAAEQH/2gAMAwEA'. +'AhEDEQA/AH9t3pKvO14UykVARa/HfAlxlDKXR24V2p3z7RlPwdtMep91uWdRGHWELjuTFFtLvcC4SNznnH+21O7ttiodOq1BvC0E'. +'p9I0lSX2kgqCSklK+5PKCMAng6zV2XRO6u3lSIURtbDRShltlZHa0tW7q/0MeTwnjxq1Jiw2xc9xTLbhSVU5iaXUFfqFFILgJOCd'. +'9Gt3SXabR6REpkL8yo0RpLCFNx1qBCRjOQMHxo0pEr6o3um2LVYpMEpTVqg25lHn08dfcB9kEgfZ1LIFDuawqZRb7aQlLTzqglsg'. +'9wQdveOEqBIB425xqhQuk8qo9UKlPrlRblw2ZBeCSVKW6CcoSrI2AGOT41SKzT4dYtmdS5bIXDZhNoWgbZJ94x8AYT/GkM03oNUc'. +'uKgwqtTZDTMOU0FttqRkoHggnPkEEHRrkJ6t1SlSHYUOc6zHaWrsbQrATk5/vRqK/9k=' ; + +//========================================================== +// d2-small.jpg +//========================================================== +$this->chars['2'][0]= 606 ; +$this->chars['2'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. +'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC'. +'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA'. +'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou'. +'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F'. +'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1'. +'7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL'. +'DLZ6f//Z' ; + +//========================================================== +// lm-small.jpg +//========================================================== +$this->chars['m'][0]= 649 ; +$this->chars['m'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAAAAcDBAUCBv/EAC0QAAICAQMCBAMJAAAAAAAA'. +'AAECAwQRAAUSBiETMVFhB2KhFSIyQVJxgZHB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgED/8QAGREBAQEAAwAAAAAAAAAAAAAAAQAR'. +'EiEx/9oADAMBAAIRAxEAPwB0MI2lIdgI0Cly3kFXLEn2zx1FDdp7rbpbjUtRWKio3hyxOGQllJzkegX66rQ2qW87Zuk9S5FNVmru'. +'iywyBhjDKTkeXfSr+GRfYtq2KAO32b1BGxAZu0dyJ2DKPTxY1wPddVszycUq2Golq8jRWbcnJWwCVGMjz+VQP50atxMtm2ZUOY4l'. +'4qfUnBP0x/Z0amy4jJm10Tt2yddWasFmfaRfdrlG3UcgArnxKzJ+Fu4DqCMkcgNem2DoWav8PLfTm+FPEkuSNTnqueS5bnHIv6CG'. +'LNjJwM99bm67NB1Ht89KSxNXnr2hNDbiUc47K4KyD2GQMfmMjUnS+7vuIktTqPCaaWCqAMMojPFyw8hyYMQBnAwNJHYGXPTsW9VN'. +'jg2zf50W9zk524GAEihuz+xbIOD82jW5TkjtRPZkTkJ+4VgDhQfuj/f3OjUxl1f/2Q==' ; + +//========================================================== +// lt-small.jpg +//========================================================== +$this->chars['t'][0]= 648 ; +$this->chars['t'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQDBQYH/8QAJxAAAQMDAgYDAQEAAAAAAAAA'. +'AQIDBAUGEQASEyExQVFhIjJxFSP/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAP/xAAZEQADAQEBAAAAAAAAAAAAAAAAAREhMUH/2gAM'. +'AwEAAhEDEQA/AO4BLEiEy7uG4IGxxs5IOOx76wd2XYidSp1HoD70240gcNNPbDyI6wQQpaz8E9MczkdhqtbsKYLieDk6WLKmZmmL'. +'Hk7AHVkbkLI+RQc7uRxgkfr1tx2rGu6VbToLVKkhU+kbugGf9WfaknCk5ycaX0zmaa+3JkqvW/CmzojsB9xoF6OoFK0r6HOcEDI0'. +'aefTuKX5ScMdC14HYq8n12zo1DEUcKTGg1Z+hyBwoPBVIiA/VQyOIgedhUCB4WMfXSV3UufVLcTUIqVf26K6mXDbPVRRzKT54iMg'. +'+zjtq6mtsyJjclxpKlUhSXEbkgkqWnBx4+J5e/zU0pZemPvJJQzEPDfQOrwwFY9AZ5eeYPLV6FwhoFYZuigxpkJeIjqAeIoAk9wA'. +'D46EnuD+6Nc1smDNrTlRkxqtMo1vzKhIdYgU9YDqVpISrLhHxSSd21I0aYyqP//Z' ; + +//========================================================== +// li-small.jpg +//========================================================== +$this->chars['i'][0]= 639 ; +$this->chars['i'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABYDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAABwAGBP/EACcQAAEEAQMEAgIDAAAAAAAAAAEC'. +'AwQRBQAGEiExQVEHExSBFWFx/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgMB/8QAGBEBAQEBAQAAAAAAAAAAAAAAAAECMRH/2gAMAwEA'. +'AhEDEQA/AE7c+5M9BeRG29t1WUfKFFYW+GvrI7WD3B9g140YD5T36rcErDjbUR6dCBdejsKUpxITXI2FUrooCh70yvxzHyIlMvuK'. +'eVSH7IKEpJoKqu/ahddLryR/aMiO187bsmrWShhp1AZS2XHHrWhNJrzdf7f7GiVcHk3sptmHkJcJ2DIftS2FrKlJPXudWuLGYeQp'. +'t2fmEIckqIZaaKuSGG0lQ4gduRoFRHQ9AOgs2lOJbk9aSUlpjGvAWeSVH2VKq/2dFPw3IjyJe8s281ct3I9UoHJXGiQkD2STrSZ7'. +'Yf8AOl7JTdw5eOCz0jw3+LbYCfA9nz71msb8KMxoTGTw+5srjsipAdDqFBQBIuiOl6KrdYyJMyTCshlw2G3Fr/HiNqNNAqJJUoGl'. +'KND+h47km1bZwsvCbYYjycxIyK1qDv2yEi0hQviK8atKDcy9j//Z' ; + + +//========================================================== +// lp-small.jpg +//========================================================== +$this->chars['p'][0]= 700 ; +$this->chars['p'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGgAAAQUBAAAAAAAAAAAAAAAAAAECBAUGB//EAC8QAAEDAwMCBAMJAAAAAAAA'. +'AAECAwQFESEABhIiMRMVUWEHFEEWIzIzcYGRocH/xAAWAQEBAQAAAAAAAAAAAAAAAAADAgH/xAAcEQACAgIDAAAAAAAAAAAAAAAA'. +'AQIxAxESIUH/2gAMAwEAAhEDEQA/AOh703xG21DMeOyqoVNDjSzERiwU6Ep5qtZNycA97HTF13d33KWtmlt9xwkLl1NkXVxIuQgK'. +'wLj+hqBvel0qmbR8GnR22nJNZiLeeKr8nDIT1OLJucX+uPbWom7iocRpafOac5MX1ALltp/Cbi+cJH++utdh+WVNL3PNdNYpdWgx'. +'Y0qmLZSrwJJcQoOJ5XKlJFu4HbJOjVbt+V5nu7eopNRivqcdhK+bFnWwA1Y2AOcgjvj9dGlxy0g5y0xd+hNXoG24C4obizq3HZUh'. +'YHqtRHD06bG/8a0MbbG1mqekxaBSGmgkrcdcitlLfrckZIz7DUatbeFak0tyRLUwzT5vmiGm0cufEkFBJItfkD+59tKmiO12atFa'. +'eQukO3ejUxgENqTcfnE5WbkHiOnJ76N2IqI1DibabptS+zkZhtp90F2Y0S026EkAFK/qL46cXv65NVZDfxHmVCK4DE2/RX/lRFbA'. +'C5LwAyq2EtpHZI7mxPYDRqoctdESimz/2Q==' ; + +//========================================================== +// le-small.jpg +//========================================================== +$this->chars['e'][0]= 700 ; +$this->chars['e'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABgDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAYEBQcB/8QAKhAAAQMCBAUEAwEAAAAAAAAA'. +'AgEDBAURAAYSIQciMTJBE0JRYRQVFoH/xAAXAQEBAQEAAAAAAAAAAAAAAAAAAgED/8QAGREAAwEBAQAAAAAAAAAAAAAAAAERAjFB'. +'/9oADAMBAAIRAxEAPwDTszvhEYCoS80BTm2bCjQRwdAzVe2yopkpJtpRUVfjEIc4V2oMerByg5Ji30oMyS3GeMunK0upfnu09MdJ'. +'p2scTmWnnGfx6HThktgLfKj7xEOqyr7QBbL41LhBzpxbcOru0LKDLdSnOHoaltNqSC4qWL0x9xbJYum69caczSaHmGmTmpDUYn4l'. +'UiqjkynzAVtwV23Ud+X4Ibpa2DCPkjhfUaRO/p8yzpb+YHhUmhbev6ZEll1lvqK3jt2XrbBgp6HVwsK3THpfEubGSoOUyFMpbJmL'. +'Deh6SgOGKti57EuY6l62JMWdJy7k3hg1LkOozEbVm7suQSkTiKtkEfP1pH664Za/QItccgI4bseTHdNxiXHLQ8yVl7V32XyioqL5'. +'TGc1ng6eYs0idczXUZscBBABWgEhEtfKNuUezwPnBhEuj8X2M21z9BR6NUX211Kk/UKKAjuhkPhL7XVf8vtgw7UPJlEyrDWFSYLb'. +'LBNF6qrzG6t0spEu6+fpL7YMXhUndp//2Q==' ; + +//========================================================== +// la-small.jpg +//========================================================== +$this->chars['a'][0]= 730 ; +$this->chars['a'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABoDASIAAhEBAxEB/8QAGAABAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwIFAQcCBwAAAAAAAAAB'. +'AgMEBREAEiExQQYHFBUiUXGBE2EyQkNSgpHh/8QAFwEBAQEBAAAAAAAAAAAAAAAAAAMBAv/EABkRAAMBAQEAAAAAAAAAAAAAAAAB'. +'IQIRMf/aAAwDAQACEQMRAD8AfdQ1pxjqZMSn0mRUZRYDaklJCE3OawO2ttTxY4hl07qFMVs1Ku02kpPnRGhsAqz8W9T9wDjozq6o'. +'Q1lDrcZLGVcmUoZg0obpufxK3Ftt9ccqB1GgBcmLSqtVEqOZcr6ARm/kbXHt7DEtc7WTJKTJqEWvRKfLqL9QplSjuPtGVYOJKBrm'. +'t+U+n94WGStZzNypmRWqckUKTbixy6jAfxPxHtCgKqFNlU5huK6pLMndSlegG4J45N8aKmTMKQRBsCNMzwB+RbHWHGEAZlPZX2hx'. +'qZIC34ygZoYUbB50JSkFXFhZR9BrpheR4fIbQ6gvurJ7q02bIQTuAOAN8x40HAxRr3TrNRpBmSHVt1KMlTyJTCsqkKAPlSf28W+c'. +'UGaD1c9HSR1HFUh9tJU45EBcAtcC9+P9wqbg8IAto9o81yputrVGpiUkgHKkqUTZI32+cKm1z1tIUgPBBAKQ4UBQH3uL3xmXSXep'. +'HVDtXStE5K5jlPU7PF3Q41+okJFkjgC+3OuNSYiSzHaLtRcW4UDMpLYSCbakDW3thhum5p//2Q==' ; + +//========================================================== +// d9-small.jpg +//========================================================== +$this->chars['9'][0]= 680 ; +$this->chars['9'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. +'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD'. +'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA'. +'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV'. +'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz'. +'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha'. +'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ'. +'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro'. +'1V1//9k=' ; + +//========================================================== +// d5-small.jpg +//========================================================== +$this->chars['5'][0]= 632 ; +$this->chars['5'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. +'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME'. +'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA'. +'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug'. +'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r'. +'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/'. +'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz'. +'8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k=' ; + +//========================================================== +// d1-small.jpg +//========================================================== +$this->chars['1'][0]= 646 ; +$this->chars['1'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. +'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD'. +'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA'. +'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA'. +'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN'. +'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI'. +'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS'. +'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q==' ; + +//========================================================== +// ll-small.jpg +//========================================================== +$this->chars['l'][0]= 626 ; +$this->chars['l'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYEBQf/xAArEAACAQIFAwIGAwAAAAAAAAAB'. +'AgMEEQAFBhIhFEFREzEHFSIyYcFxgZH/xAAXAQEAAwAAAAAAAAAAAAAAAAACAAED/8QAGhEAAwEAAwAAAAAAAAAAAAAAAAECMREh'. +'Qf/aAAwDAQACEQMRAD8A15Zfm1VURj1Fp5AqLKv3OARcL4W5Nzx+MLWjdRz5hqXU6TSb6OCr6WghiQbrJ91gOTy1yT5xZ55myZFk'. +'Gb5ozX6Ondm28XYqpQDwu7jEH4c5S2UaDy4xxrLmlUDWzk8XaQ3O49hbj+RiB85HNg8Ee3aqwIqhDuux7G/HHbvzgxEqaWOvy09R'. +'O0o3hjdQoUji20g+fY3wYSM6pJ4Ylr7V+Zz5PSaezHTlTRNWzxySSxt6q1MSkH6AOT2Fu3Aw7RfF/T9DEkLUeawuF2mKSgdWQj2/'. +'q3+fnDZDlqRZzQGaOGcpTOaeR1u8R+ncN3gj94so2jNWHeMNNKzorEX2qp9v3imNPoRE1zpjUtZ09HJmYq5lury0benZeTww23t3'. +'Ivgw+T0yRRyyxIqNfkLcA8jt7YMKcBWn/9k=' ; + + +//========================================================== +// ls-small.jpg +//========================================================== +$this->chars['s'][0]= 701 ; +$this->chars['s'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAAAAMCBAUGB//EACwQAAEEAQIFAgUFAAAAAAAA'. +'AAECAwQFEQAGEhMUITEiYQcjQVFxFRZCUoH/xAAWAQEBAQAAAAAAAAAAAAAAAAADAgH/xAAZEQADAQEBAAAAAAAAAAAAAAAAAQIR'. +'EiH/2gAMAwEAAhEDEQA/APWZMhmFXSJU+SGmWFiQtAWMJQAnJUr8Z+w/OuQk71uZnMsqnbjy9s8st9UMCQ6kZJdZaIHEkZ/JHceN'. +'N3HtizuY1JLrG48yLBSC9UTFKQiY4nACir+wAOOMEe2rm2bTbzlqtE1MyBuZAPybpw85KSfDRJ4Cg+Pl/wC61hJeGjV31VuuKqwr'. +'LGU+whZZK+Rw+oYJAyj3GjS4dZFpZVkqPLktdfMXNcaU2kBC1BIITkdx6c599GlnvPAa3TL2vNvU76n0063acr3YSLCEjpUpUQtW'. +'Dhf14SMEnOc57aZ8Tegm7dbrEQGZt1PeTDgc1PEW3FeXAvyAkZVkeMDOm2G3f3O7Cl/qEuqkQg4lp6CRxraWfUlRUD24kZA741Ko'. +'2k1HvlT3ri2sLOCgtsyJz6XEtBwZPAgJAGQMHUNPWKqWItsqh0UCFVyLeKhyLHQ2TMdHNVj+RKlAnJyfto1FW2ahgjrq6LYTFjjf'. +'lymUOLdWfJyoHA+gA7AAAaNPE3ysJdLT/9k=' ; + +//========================================================== +// lh-small.jpg +//========================================================== +$this->chars['h'][0]= 677 ; +$this->chars['h'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGgAAAQUBAAAAAAAAAAAAAAAAAAIDBAUGB//EACwQAAIBAwMCBQIHAAAAAAAA'. +'AAECAwQFEQAGEiExExQiQVEVggcyU2GRocH/xAAXAQADAQAAAAAAAAAAAAAAAAAAAwQB/8QAGhEBAQEAAwEAAAAAAAAAAAAAAQAC'. +'AyEyMf/aAAwDAQACEQMRAD8A6DZb95q9bmpK6ieOCzNHJTxmE+NMhQ5fr1fLq3Ejvkak2e7ipiFsqb3R0m4qkPPJRiRXenU9VjKE'. +'5JVcA9R7nWc3/BUbfoKTdO3VRXhpjbZ2D8Rwk6RyZH6chB+46m7i2hDYtgA2ePlV2VkuKysoLzzRnlIScZJZeeevvjtrX7LK2rp7'. +'tTwwJ9WjhILDrTKnIdMEDl2+P80aVdJZb1QW+vgqENLPH4sBCDLIwUgnOf4GjVvDnLgUk79T81voqjb8NnuUx8pVRCiEaYUSuynl'. +'jHU9mOfnOoOx6hqz8PrbNdfEkMUXg1LSM3rKOUywJ7YAJ1ZTWmSpvdvlaVTDSUzJAhH5ZJBgv0x2RSAPlz21WXqoet3ba9nuW8n4'. +'Jr6qTPqnUNxSM/f6mPvxA9zqJnExTbR+h0nkhVu1uE8j0UBRQ9PGxBKFjnkAScdsDp10a0lc7z0tI7Y5YYN+5GAf7GjVXF4Icj3f'. +'/9k=' ; + + +//========================================================== +// ld-small.jpg +//========================================================== +$this->chars['d'][0]= 681 ; +$this->chars['d'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAQFBgH/xAAsEAABAwMEAAQFBQAAAAAAAAAB'. +'AgMEBQYRABIhMQcTI0EUMlFhkRgicaGx/8QAFgEBAQEAAAAAAAAAAAAAAAAAAgEA/8QAGBEBAQEBAQAAAAAAAAAAAAAAAAECETH/'. +'2gAMAwEAAhEDEQA/ALUhp6h3W/X63UlypbhCY0WMjLqGzwDtPCfv/WtealNpVInuVBBqCogcdbU36YUkAkJWVHG8YPXBxxzxqPcN'. +'YtWyWnIlUeW05VEOAvrCnnSkftK1H5lKJPHsMDoDUWq+KdrSbIqsalVsImiEtLUZ2MU71bcYJWkhZ/36ayLHhi/IXZVOmzKqp5uU'. +'688hTyjuGVEFJKvoQesD86NL2jGZp1EoLDSmk+ZAQ8d7oPzp3YGesFWMfxo1YGvSzLsT9QExVX8phTlMaFOExAJIBGQjJwCcL+/e'. +'rd+W7GuO0Kw05CQ6+ww69Gfdb2kFIKk7DgEkjgnr86rXRa9HuyP8LV4SH0sIBbWFFDiFEgDaocgdkjo8ccay0qw7ut5nyrcviQqC'. +'slsRKo0HwlODkBRzxj2AGoXTtpzIdQ8MbffUChz4NCPRaClAo9Mn6c7T3o13wytmo0K05VIqkiPJbizFiMWs4CTgnIIHOST796NL'. +'Ia1JX//Z' ; + +//========================================================== +// d8-small.jpg +//========================================================== +$this->chars['8'][0]= 694 ; +$this->chars['8'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. +'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD'. +'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA'. +'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8'. +'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J'. +'44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7'. +'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9'. +'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC'. +'EylmLHQltptPZKQOBo1FzH//2Q==' ; + +//========================================================== +// lz-small.jpg +//========================================================== +$this->chars['z'][0]= 690 ; +$this->chars['z'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABYDASIAAhEBAxEB/8QAFwABAQEBAAAAAAAAAAAAAAAABgAHA//EACsQAAEDAwQBAwIHAAAAAAAAAAEC'. +'AwQFESEABhIxBxMiQVFxCCM0UmGRof/EABYBAQEBAAAAAAAAAAAAAAAAAAECAP/EABgRAAMBAQAAAAAAAAAAAAAAAAABEVEC/9oA'. +'DAMBAAIRAxEAPwBTWfLu1KXXZDbM4uewNvLajlwhaCbBAwDe5uehYd3xm6t6bi3jvulwqc7KgxXZZeYQLNLeF73WRg4HEdgfzrSa'. +'P45pNEkznITDc9ypLShtyWhJDJyXC2qxJHZvjoZOjyVv1v8AESt6FFS4ijxvTLbawEApSccrYHJf0+OtJMQ2rNXk7GZMufJgJjTH'. +'Un9M4qzxT7hyCiThIyRnPXWrRvyLElVBUF6vlhl0lwRYCFKcQhAtyWpVhyWTx+w++rUvp4EWjOvbniUOnVatcS43BYDbJSPZyIBw'. +'ejclIx+3Wa+J63T6DQanuGszI0eZVJJV60p0Jum5GEi6le7l0PjvSjyRsaTvJqI1BqhhR46ksuMrQVJcUSEoUbHNr/7o7C8L7eiz'. +'4lLlyJk2cEqW+6V+m0AE9ISLnsj5+O9UhsFK92bZZqb9SRu9p2c4A0OCEqDbYAJSlJwAVZv3fBvbFrg/462btlhuS1RG5nL8pYkq'. +'KrnsKH06I/rVrQKkf//Z' ; + +//========================================================== +// d4-small.jpg +//========================================================== +$this->chars['4'][0]= 643 ; +$this->chars['4'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. +'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA'. +'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA'. +'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv'. +'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44'. +'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q'. +'27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG'. +'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q==' ; + +//========================================================== +// lv-small.jpg +//========================================================== +$this->chars['v'][0]= 648 ; +$this->chars['v'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQDBQYH/8QAKBAAAQQBAwMEAgMAAAAAAAAA'. +'AQIDBBEFAAYhEzFBEhQiYQdRFTKB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAAAAAAAAERIf/aAAwD'. +'AQACEQMRAD8A6Ngt1SZ4yrYgrecgTFsFJA9aGwAUrUaF2D2Avjzq6CIjiBPkB9bwQVIkIYIDae/wq+P9N+dY4SGMf+Txlev7KBmY'. +'PoadKRy4zxSgRxaTwO/x09u7KPYnasmHjlsyFZZXt4K23ezjvBpNGgLUrvXfVZyLLbWambiwEbKvvxYAkeotNlIJW2FEJWb7WBda'. +'NSQI0fHYyJjkrjKRDZQwnpQ1vgBIr+w8+a+9GocZr8iKkuY1eXhsKH8U8iZE9BHz6ZHUc48UfSPqzqH3kfeO9kTTDQYGGietpTaO'. +'shyW6AocpHNIrv8AvWzk9BUSdPdYS4BcRlomkhIV6KP0VE39V+tU2wdlRMHtZUB8NuTQ+51X27+Kr46ZPIAFV540D8zeLsJ5LMHa'. +'ubmMBCVJdjx0pRyLoWR4I8aNIQ8BvZMNtMTeUcsptKfc4tC1gAkCyFC+K0aJtf/Z' ; + +//========================================================== +// lk-small.jpg +//========================================================== +$this->chars['k'][0]= 680 ; +$this->chars['k'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABUDASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAAUGBAMH/8QALhAAAQMDAwIEBAcAAAAAAAAA'. +'AQIDBAUREgAGITFBEyIyYQcVUYEUIzNicZHx/8QAFgEBAQEAAAAAAAAAAAAAAAAAAwEE/8QAGxEAAwACAwAAAAAAAAAAAAAAAAEC'. +'AxESMeH/2gAMAwEAAhEDEQA/APVK/V36dU6NSJDTT8esPLiqfK8S2cCoeTkKvZQ6jm2ldSqKqbu+OgMOvSX3m4UBrLnDlbqiefKl'. +'Nzz2x1m+IwNP27CkJQ7JkR6rCkMJbP5jp8S2CPfkgD6H+dJ6Ca0nerr+64rTNSqMYrg+C9mmOwhVpDfsuxSbi97DmybaoZeQ5jTl'. +'PEp18JTIfeW3kq3ly4H26aNZqvTWZsjFcZTsVtSg0G8Rio+vr2vb7g6NLPRnuXy8F+8kl+obUh4KXJdqSJJQnohlkZqJPYBXh3P+'. +'a4b5Hyp6k1bO7sOotPyXkj9NlwFl0ewstJA9ifrqkVSmET4csoS7UTHXFQ+6SQlskKUMb/tH9ddLVUmS7DqdBqD7U6OsqfS46jzl'. +'hQ5bXb1K9Scuybdxo2OTu92dwSZkWn0Sb8viQWyn8Qq5D6ifSLd0BIv7q0arTBRSKPToMZbi2GWylsvLK148Wue/XRrRjxOpT2R2'. +'k9aP/9k=' ; + +//========================================================== +// lr-small.jpg +//========================================================== +$this->chars['r'][0]= 681 ; +$this->chars['r'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABYDASIAAhEBAxEB/8QAGgAAAgIDAAAAAAAAAAAAAAAAAAYCBQMEB//EAC4QAAICAQIFAgMJAQAAAAAA'. +'AAECAwQRBQYAEiExQQdRFGFxEyIyM0JSYoGC8P/EABYBAQEBAAAAAAAAAAAAAAAAAAEAAv/EABcRAQEBAQAAAAAAAAAAAAAAAAAB'. +'EUH/2gAMAwEAAhEDEQA/AOs0ZdETU54Gt1INSmlPJEsyo7J+jlXPUYBPY9c+eE/dO9tY0a7ren6BVrW7VJTZtW5kZkjXkBSIKveQ'. +'gHp0AAJ4w+q2hVdT2Md0h46+saS4mr3EUK0gWTAB+vQj2PboeL/ZVOqmhaZVjkFmxdC6tctt3tM2G5/7bAx4C4+qxiWwd3prWzKe'. +'r3IBAth5OYxozKsgc8y4GTgnJB9uncdTi6tXq2140rRVM13JMEMAVAg7sMdBjJB/18uDgRO9R2Oo6FX2vShkFzURFUq1whIj+8DI'. +'7EdAFjXv7MeNb0kuStsFEmIaajZaos2fy2Q4VGH7SGxn+Rzw9yMLOm/FzRhZazmOTkP4grYyD3B8j2PTyeFfZ+z7G3BeSS8lmprl'. +'2K2qcnK0Z5S8gPjrgAY8cNEWmq7u23pEos6/Zji+Kd0rLLGWwseA3joeZj/w4OET1g0vlmrWV+ydFnkUxSgsvM4V+YYIwfHz6cHB'. +'ZeKZ1//Z' ; + +//========================================================== +// lg-small.jpg +//========================================================== +$this->chars['g'][0]= 655 ; +$this->chars['g'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAQCBQYH/8QAJxAAAQQBAwQCAgMAAAAAAAAA'. +'AQIDBBEFAAYhBxIxQRNhcYEiQlH/xAAYAQACAwAAAAAAAAAAAAAAAAACAwABBP/EABkRAAMBAQEAAAAAAAAAAAAAAAABAhEhIv/a'. +'AAwDAQACEQMRAD8AayO4t6bq3hmMHtxyLi4OKeKH5jyASiiQCCQeTRNAeB61FrBb+jTGpLO+BMW24EFMhkhpQru8m7B/H70x09Yi'. +'q3nv/vLfwpnJ7UNkqSRbngf2ofWkpXV7brymC2malLfagurjW0aHk89xPJ9cX9aprURHWbYEaMHHEBfwpv8AnXPk+/8AdGqGJOxO'. +'4YbOSxK4y4boIStUWysgkEmxY54r60aOI8oTV9MHtjJwunPUbO46WWo0HLlD8KY4goboFVoquOVEVwLT963WdnxYfT6ZJyz0JvHm'. +'KvtaSkW4tYNVSqKiTwB+fw5n9sY/cuOXCzDDcluyW3Ckd7V+0n0eNZTH9DdouFalHIOJBUhtDki0pNV3UALo81ehG6IdKjPZ6d47'. +'4ywltanVJvuJI+RQs/sHRqy2r003JhsImEc/CUyhxRZBjKV2oJ8eRXNmufPnRo1WIz3DdNn/2Q==' ; + +//========================================================== +// lc-small.jpg +//========================================================== +$this->chars['c'][0]= 629 ; +$this->chars['c'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAwEBAQAAAAAAAAAAAAAAAAUGBwID/8QALRAAAgICAQIEBAYDAAAAAAAA'. +'AQIDBAURACExBhIiQRMVUWEHMkJScYFykaH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAgP/xAAXEQEBAQEAAAAAAAAAAAAAAAAAATER'. +'/9oADAMBAAIRAxEAPwDcoGkmiT4Q8kWvzuPU38D2/v8A1zwrCFayq1qTaFk2H7aJHt05MeMvENzC4upDWkjW9kJXiricAJCigvJN'. +'IB1IVQT5frrv24twPgunk6a288crbklUSJNNdnSTZ2STHHqOP/Eb17njdZtAoqwEvrEiGVyG117/AG6HhyV8H1sljMldoxXTksGC'. +'zV7M0oaWGQOVeGQ92I6EMR22D11w4LmEPjaOL51iL8ssc9Z69zHtZkYCGGeQK0ez2UEoU39wCeX1S/LLiEt+mPSbMLxsGVv2kEjR'. +'305xkaEV/GTULMUT1LD/AAGh8gIZS2jv+vpybb8NMIb0dVLWYWgiiU0vmMphOj6V0TvQI3rfsON1E6dYjGtisa0F1mAWR2NhG0WZ'. +'3Ls3TqNs5Hc9h23w49NWL9K+Q/VD5T/zhwPH/9k=' ; + +//========================================================== +// d7-small.jpg +//========================================================== +$this->chars['7'][0]= 658 ; +$this->chars['7'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. +'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE'. +'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA'. +'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps'. +'19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC'. +'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5'. +'8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp'. +'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q==' ; + +//========================================================== +// ly-small.jpg +//========================================================== +$this->chars['y'][0]= 672 ; +$this->chars['y'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAAAAQGBQf/xAArEAABAwMEAQIFBQAAAAAAAAAB'. +'AgMEBREhAAYSEzEHIhQkQVGxQmFxgaH/xAAWAQEBAQAAAAAAAAAAAAAAAAADAQL/xAAeEQEAAgEEAwAAAAAAAAAAAAABABECAxIh'. +'MUGR8P/aAAwDAQACEQMRAD8Ar3tys07dVHohemz5dWQ7fk91MsA3IIRY8rkKFySceTqw3JVV0KhyKw+0C1CQp9aUOFSiAk4AIAvn'. +'76xtz0ioVvbcJ6msx2JtOfZmw1PKI5LQcJNh7UqBKcn6+NRfqPu6s1fYc6GxSJsRfWDUVSGA22ygEckJWSexRNgOP0udXzDKOJ0I'. +'yo62mHm25Sy80l1Z4lSgpQvZRGLgWwPGjTjbchyLH+Ejx22EtJSgO8kki3kADA/nOjWjGzv73CyQZjUWNVp7bNSrj7qJDqflqUlQ'. +'DMds24l3HvcNr3Pi9gME6T9WWVsemdYWswwC2lPta4m5WMA3OdUExCmozUJD6g84ntMjrHIFBTdQz5yLDx/WDNytpwW6nAkViqVe'. +'uvmXdlme6n4dCwlRBKEgA2tj99QG7Ilncp5QqpU31PMsJ6x7A32f6SPxo0hPVCD45oVyKf0MtgeT97/nRrO7UOCFla3tn//Z' ; + +//========================================================== +// d3-small.jpg +//========================================================== +$this->chars['3'][0]= 662 ; +$this->chars['3'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'. +'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED'. +'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA'. +'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS'. +'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK'. +'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu'. +'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7'. +'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k=' ; + +//========================================================== +// ln-small.jpg +//========================================================== +$this->chars['n'][0]= 643 ; +$this->chars['n'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGwAAAgEFAAAAAAAAAAAAAAAAAAYCAQMEBQf/xAAtEAACAQMCBAUCBwAAAAAA'. +'AAABAgMEBREAIQYSE0EHIjFRcWGRIzIzQoGCwf/EABYBAQEBAAAAAAAAAAAAAAAAAAMEAP/EABkRAQEBAQEBAAAAAAAAAAAAAAEA'. +'AhEhUf/aAAwDAQACEQMRAD8A6FR3p7v4oV9rlkMQsjL00RyOss0KkFxnDcrc2PbI1NOJKyTjW+W5OmKeA0UEJx5meRZS2/8AUfbS'. +'LVGS1+K16vCzfiR3GmoqqXGyxz06hWPsFlVMfOmq1iNvE69KjBYo3oJMZ3GKeYYPxg/fW+xzZX1FLQyxwSTcpWNceu4G3+aNSmpY'. +'qmQzzwh2k8yhv2r2H23/AJ0aoy+EWh7I1ntacR3PxDtEzhjWy0wkkIwYmanU5GO6sNh7rrU8AVdTceNbhDXxNHUQvS0tZ3DzwxVA'. +'fB7hj59/XJ08cPWaKj4gvlwSQiG7dCboqvLy9NOmQT9SM7ayJrBa6K5V91hjlWorp4JGUOAglRSiMMDb82/vgaBGTpVvtNUVtyJg'. +'5+WNAh5ZCu/r2+dGrgq0pi0DhmlRsSSAfqMd+b6ZyNu3po1Rk1yNBe3/2Q==' ; + +//========================================================== +// lu-small.jpg +//========================================================== +$this->chars['u'][0]= 671 ; +$this->chars['u'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAYDBAUH/8QAJRAAAQQBAwQDAQEAAAAAAAAA'. +'AQIDBBEFAAYhBxMxYRJBURSB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAQAD/8QAGhEBAQEAAwEAAAAAAAAAAAAAAQARITFBAv/aAAwD'. +'AQACEQMRAD8A6dLkQmJzu3WVtHIqjf0duKFNuBr5UTQ45F1R8/XI1PMmsYoJyjhS9iI7BKHeKjkXZVXqhyLHP+rrHeR1pZlx1W1M'. +'wTiW0ukkrS28nn5fV2SPPFfurHUKQhzYG7pLYKEfyBhaSOS7dG/YCki/uvWn3LPDOJrwa4kyEzOYeakqkpC3Hk0bNePQHgDRpchY'. +'leIZwzUWauKtuPctTSUlCAUmrBHIKuAPV/ujQsmHdm7hya43UbbD3ZVElOQJsdTS6IQaQUqBHCk8E2Pocgam6oYwObHy0Zm0oi45'. +'T1KBPdpV2f0pom/1Ws7cmPazu98Ltvcq3VzRHfehz8a4pirFEKRZo8eQT+eCdWYfS/b+WYnxpbuVcDRMdHcyTqg2fiAfiLoi+Rf+'. +'jT7Xc74HtOYnHyUOh8yWUvKeHhy0CiPVUAPoDRrm+OeznTva6lzsyMjCYbbaiNJjJSWElagD5tRpNUSALFeNGoOCH7Bv/9k=' ; + +//========================================================== +// lw-small.jpg +//========================================================== +$this->chars['w'][0]= 673 ; +$this->chars['w'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABcDASIAAhEBAxEB/8QAGAAAAgMAAAAAAAAAAAAAAAAAAAYDBAX/xAAtEAACAQMDAgMHBQAAAAAAAAAB'. +'AgMEBREABhIhMRMUQRUiIzJRYZEWNIGx0f/EABYBAQEBAAAAAAAAAAAAAAAAAAABA//EABoRAAICAwAAAAAAAAAAAAAAAAABERIh'. +'MVH/2gAMAwEAAhEDEQA/AHXbV13ZLu6t2/uaa1JijWopVp4XUTKSAXRyc+6ehBGeoPbTSlwpql0K3GneqpZViqUhI5JzGMEZJGeh'. +'GlXfaFILDf7FQzXC426rDLTojs8sLqVkXBGcfKf40twWbdWzZY75R0s90ul3jPtKjVMJDNn4DDp8iEhW+wJ1WZG2KWt3Lv26U1tv'. +'92o7PaYkgYUbqVepYlmUBlIwqnB++O2jTDt/bBtth9jcpvEWNGqalZQryTlmeR8jPct6+mNGmRC4a1U13htzVFItB5nA/cyOUVfp'. +'7oz/ALqitJulYJKuqvFsppHALLFb3cp9FBaXr+O51bq0q6i38KK5PDVAAxSzU6SIpz3Kjjn8jUFoS7uFmut1gq17xLFQ+DxOccj8'. +'Rsn+tVpiyJnqv09YfOXu5AycgZZQEhBZjgDBOOgwO/po0sttWHdNzqLruioa4UwmdaC3kYp4IwSvJlBHKQ4OSe3po0qxM6P/2Q==' ; + +//========================================================== +// lq-small.jpg +//========================================================== +$this->chars['q'][0]= 671 ; +$this->chars['q'][1]= +'/9j/4AAQSkZJRgABAQEASgBKAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAx'. +'NDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'. +'MjIyMjIyMjL/wAARCAAeABQDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAcDBAUG/8QAKRAAAQQBBAICAQQDAAAAAAAA'. +'AQIDBBEFAAYSIQcxIlETCBQVgSNBYf/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/8QAFhEBAQEAAAAAAAAAAAAAAAAAAAER/9oADAMB'. +'AAIRAxEAPwDT3H5Qz+O3LN2vtrF/y86NYLzzVlAABJITQPv2a/17vXMboz3lDEYWPuafNx7CFrS03+2jpK2bs0CUkUa7pRvrUu63'. +'sr438yv7pLEo4XIK5Kcji0uJUkckm+uQUOVH6GsnyJv7A5vaJwuFdkONLmolgONFH4vioKRXYqyCADXvRMh0yspmZ4jyIEtDTK47'. +'aiA0lQUopBJBI/7X9aNT7amRo228e3a31iO3yUzCcdSPiKAIFdCho0TIswZ7GQlO/hlRxBooih1YXzAoKUkX0LPEBX110dJ7zbuv'. +'AORpO04cIpmxH23FSEIRwKuNnsdk0o31702XhFMKbuRUZJWP8LTQ6HBCuIB+iVWSR2BXuqK93/hDlvGzEphmG3Ml5JpDi1I7TzNA'. +'BYFlPafY+/7LBiv1CYDH4iFDOGySlMR22lFP4wCUpANfL11o1r4bxXlWMNEaE/bqlIbCFl/ANPK5Do/M0VDr2Rf3o0TX/9k=' ; + + + + } +} + +class AntiSpam { + + var $iData=''; + var $iDD=null; + + function AntiSpam($aData='') { + $this->iData = $aData; + $this->iDD = new HandDigits(); + } + + function Set($aData) { + $this->iData = $aData; + } + + function Rand($aLen) { + $d=''; + for($i=0; $i < $aLen; ++$i) { + if( rand(0,9) < 6 ) { + // Digits + $d .= chr( ord('1') + rand(0,8) ); + } + else { + // Letters + do { + $offset = rand(0,25); + } while ( $offset==14 ); + $d .= chr( ord('a') + $offset ); + } + } + $this->iData = $d; + return $d; + } + + function Stroke($aStrokeFileName="") { + + $n=strlen($this->iData); + if( $n==0 ) { + return false; + } + + for($i=0; $i < $n; ++$i ) { + if( $this->iData[$i]==='0' || strtolower($this->iData[$i])==='o') { + return false; + } + } + + $img = @imagecreatetruecolor($n*$this->iDD->iWidth, $this->iDD->iHeight); + if( $img < 1 ) { + return false; + } + + $start=0; + for($i=0; $i < $n; ++$i ) { + $dimg = imagecreatefromstring(base64_decode($this->iDD->chars[strtolower($this->iData[$i])][1])); + imagecopy($img,$dimg,$start,0,0,0,imagesx($dimg), $this->iDD->iHeight); + $start += imagesx($dimg); + } + $resimg = @imagecreatetruecolor($start+4, $this->iDD->iHeight+4); + if( $resimg < 1 ) { + return false; + } + + imagecopy($resimg,$img,2,2,0,0,$start, $this->iDD->iHeight); + + if( $aStrokeFileName!="" ) { + if( file_exists($aStrokeFileName) ) { + if( !@unlink($aStrokeFileName) ) + return false; + } + imagejpeg($resimg,$aStrokeFileName); + return; + } + + header("Content-type: image/jpeg"); + $res=imagejpeg($resimg); + return $res; + } +} + +?> diff --git a/html/includes/jpgraph/src/jpgraph_bar.php b/html/includes/jpgraph/src/jpgraph_bar.php new file mode 100644 index 0000000000..c6cbdcbaad --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_bar.php @@ -0,0 +1,1036 @@ +Plot($datay,$datax); + ++$this->numpoints; + } + +//--------------- +// PUBLIC METHODS + + // Set a drop shadow for the bar (or rather an "up-right" shadow) + function SetShadow($color="black",$hsize=3,$vsize=3,$show=true) { + $this->bar_shadow=$show; + $this->bar_shadow_color=$color; + $this->bar_shadow_vsize=$vsize; + $this->bar_shadow_hsize=$hsize; + + // Adjust the value margin to compensate for shadow + $this->value->margin += $vsize; + } + + // DEPRECATED use SetYBase instead + function SetYMin($aYStartValue) { + //die("JpGraph Error: Deprecated function SetYMin. Use SetYBase() instead."); + $this->ybase=$aYStartValue; + } + + // Specify the base value for the bars + function SetYBase($aYStartValue) { + $this->ybase=$aYStartValue; + } + + function Legend(&$graph) { + if( $this->grad && $this->legend!="" && !$this->fill ) { + $color=array($this->grad_fromcolor,$this->grad_tocolor); + // In order to differentiate between gradients and cooors specified as an RGB triple + $graph->legend->Add($this->legend,$color,"",-$this->grad_style, + $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); + } + elseif( $this->legend!="" && ($this->iPattern > -1 || is_array($this->iPattern)) ) { + if( is_array($this->iPattern) ) { + $p1 = $this->iPattern[0]; + $p2 = $this->iPatternColor[0]; + $p3 = $this->iPatternDensity[0]; + } + else { + $p1 = $this->iPattern; + $p2 = $this->iPatternColor; + $p3 = $this->iPatternDensity; + } + $color = array($p1,$p2,$p3,$this->fill_color); + // A kludge: Too mark that we add a pattern we use a type value of < 100 + $graph->legend->Add($this->legend,$color,"",-101, + $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); + } + elseif( $this->fill_color && $this->legend!="" ) { + if( is_array($this->fill_color) ) { + $graph->legend->Add($this->legend,$this->fill_color[0],"",0, + $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); + } + else { + $graph->legend->Add($this->legend,$this->fill_color,"",0, + $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); + } + } + } + + // Gets called before any axis are stroked + function PreStrokeAdjust(&$graph) { + parent::PreStrokeAdjust($graph); + + // If we are using a log Y-scale we want the base to be at the + // minimum Y-value unless the user have specifically set some other + // value than the default. + if( substr($graph->axtype,-3,3)=="log" && $this->ybase==0 ) + $this->ybase = $graph->yaxis->scale->GetMinVal(); + + // For a "text" X-axis scale we will adjust the + // display of the bars a little bit. + if( substr($graph->axtype,0,3)=="tex" ) { + // Position the ticks between the bars + $graph->xaxis->scale->ticks->SetXLabelOffset(0.5,0); + + // Center the bars + if( $this->abswidth > -1 ) { + $graph->SetTextScaleAbsCenterOff($this->abswidth); + } + else { + if( $this->align == "center" ) + $graph->SetTextScaleOff(0.5-$this->width/2); + elseif( $this->align == "right" ) + $graph->SetTextScaleOff(1-$this->width); + } + + } + /* + elseif( is_a($this,'AccBarPlot') || is_a($this,'GroupBarPlot') ) { + // We only set an absolute width for linear and int scale + // for text scale the width will be set to a fraction of + // the majstep width. + if( $this->abswidth == -1 ) { + // Not set + // set width to a visuable sensible default + $this->abswidth = $graph->img->plotwidth/(2*count($this->coords[0])); + } + } + */ + } + + function Min() { + $m = parent::Min(); + if( $m[1] >= $this->ybase ) + $m[1] = $this->ybase; + return $m; + } + + function Max() { + $m = parent::Max(); + if( $m[1] <= $this->ybase ) + $m[1] = $this->ybase; + return $m; + } + + // Specify width as fractions of the major stepo size + function SetWidth($aWidth) { + if( $aWidth > 1 ) { + // Interpret this as absolute width + $this->abswidth=$aWidth; + } + else + $this->width=$aWidth; + } + + // Specify width in absolute pixels. If specified this + // overrides SetWidth() + function SetAbsWidth($aWidth) { + $this->abswidth=$aWidth; + } + + function SetAlign($aAlign) { + $this->align=$aAlign; + } + + function SetNoFill() { + $this->grad = false; + $this->fill_color=false; + $this->fill=false; + } + + function SetFillColor($aColor) { + $this->fill = true ; + $this->fill_color = $aColor; + } + + function SetFillGradient($aFromColor,$aToColor=null,$aStyle=null) { + $this->grad = true; + $this->grad_fromcolor = $aFromColor; + $this->grad_tocolor = $aToColor; + $this->grad_style = $aStyle; + } + + function SetValuePos($aPos) { + $this->valuepos = $aPos; + } + + function SetPattern($aPattern, $aColor='black'){ + if( is_array($aPattern) ) { + $n = count($aPattern); + $this->iPattern = array(); + $this->iPatternDensity = array(); + if( is_array($aColor) ) { + $this->iPatternColor = array(); + if( count($aColor) != $n ) { + JpGraphError::RaiseL(2001);//('NUmber of colors is not the same as the number of patterns in BarPlot::SetPattern()'); + } + } + else + $this->iPatternColor = $aColor; + for( $i=0; $i < $n; ++$i ) { + $this->_SetPatternHelper($aPattern[$i], $this->iPattern[$i], $this->iPatternDensity[$i]); + if( is_array($aColor) ) { + $this->iPatternColor[$i] = $aColor[$i]; + } + } + } + else { + $this->_SetPatternHelper($aPattern, $this->iPattern, $this->iPatternDensity); + $this->iPatternColor = $aColor; + } + } + + function _SetPatternHelper($aPattern, &$aPatternValue, &$aDensity){ + switch( $aPattern ) { + case PATTERN_DIAG1: + $aPatternValue= 1; + $aDensity = 90; + break; + case PATTERN_DIAG2: + $aPatternValue= 1; + $aDensity = 75; + break; + case PATTERN_DIAG3: + $aPatternValue= 2; + $aDensity = 90; + break; + case PATTERN_DIAG4: + $aPatternValue= 2; + $aDensity = 75; + break; + case PATTERN_CROSS1: + $aPatternValue= 8; + $aDensity = 90; + break; + case PATTERN_CROSS2: + $aPatternValue= 8; + $aDensity = 78; + break; + case PATTERN_CROSS3: + $aPatternValue= 8; + $aDensity = 65; + break; + case PATTERN_CROSS4: + $aPatternValue= 7; + $aDensity = 90; + break; + case PATTERN_STRIPE1: + $aPatternValue= 5; + $aDensity = 95; + break; + case PATTERN_STRIPE2: + $aPatternValue= 5; + $aDensity = 85; + break; + default: + JpGraphError::RaiseL(2002);//('Unknown pattern specified in call to BarPlot::SetPattern()'); + } + } + + function Stroke(&$img,&$xscale,&$yscale) { + + $numpoints = count($this->coords[0]); + if( isset($this->coords[1]) ) { + if( count($this->coords[1])!=$numpoints ) + JpGraphError::RaiseL(2003,count($this->coords[1]),$numpoints); +//("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])."Number of Y-points:$numpoints"); + else + $exist_x = true; + } + else + $exist_x = false; + + + $numbars=count($this->coords[0]); + + // Use GetMinVal() instead of scale[0] directly since in the case + // of log scale we get a correct value. Log scales will have negative + // values for values < 1 while still not representing negative numbers. + if( $yscale->GetMinVal() >= 0 ) + $zp=$yscale->scale_abs[0]; + else { + $zp=$yscale->Translate(0); + } + + if( $this->abswidth > -1 ) { + $abswidth=$this->abswidth; + } + else + $abswidth=round($this->width*$xscale->scale_factor,0); + + // Count potential pattern array to avoid doing the count for each iteration + if( is_array($this->iPattern) ) { + $np = count($this->iPattern); + } + + $grad = null; + for($i=0; $i < $numbars; ++$i) { + + // If value is NULL, or 0 then don't draw a bar at all + if ($this->coords[0][$i] === null || $this->coords[0][$i] === '' ) + continue; + + if( $exist_x ) $x=$this->coords[1][$i]; + else $x=$i; + + $x=$xscale->Translate($x); + +// Comment Note: This confuses the positioning when using acc together with +// grouped bars. Workaround for fixing #191 +/* + if( !$xscale->textscale ) { + if($this->align=="center") + $x -= $abswidth/2; + elseif($this->align=="right") + $x -= $abswidth; + } + +*/ + // Stroke fill color and fill gradient + $pts=array( + $x,$zp, + $x,$yscale->Translate($this->coords[0][$i]), + $x+$abswidth,$yscale->Translate($this->coords[0][$i]), + $x+$abswidth,$zp); + if( $this->grad ) { + if( $grad === null ) + $grad = new Gradient($img); + if( is_array($this->grad_fromcolor) ) { + // The first argument (grad_fromcolor) can be either an array or a single color. If it is an array + // then we have two choices. It can either a) be a single color specified as an RGB triple or it can be + // an array to specify both (from, to style) for each individual bar. The way to know the difference is + // to investgate the first element. If this element is an integer [0,255] then we assume it is an RGB + // triple. + $ng = count($this->grad_fromcolor); + if( $ng === 3 ) { + if( is_numeric($this->grad_fromcolor[0]) && $this->grad_fromcolor[0] > 0 && $this->grad_fromcolor[0] < 256 ) { + // RGB Triple + $fromcolor = $this->grad_fromcolor; + $tocolor = $this->grad_tocolor; + $style = $this->grad_style; + } + } + else { + $fromcolor = $this->grad_fromcolor[$i % $ng][0]; + $tocolor = $this->grad_fromcolor[$i % $ng][1]; + $style = $this->grad_fromcolor[$i % $ng][2]; + } + $grad->FilledRectangle($pts[2],$pts[3], + $pts[6],$pts[7], + $fromcolor,$tocolor,$style); + } + else { + $grad->FilledRectangle($pts[2],$pts[3], + $pts[6],$pts[7], + $this->grad_fromcolor,$this->grad_tocolor,$this->grad_style); + } + + } + elseif( !empty($this->fill_color) ) { + if(is_array($this->fill_color)) { + $img->PushColor($this->fill_color[$i % count($this->fill_color)]); + } else { + $img->PushColor($this->fill_color); + } + $img->FilledPolygon($pts); + $img->PopColor(); + } + + + // Remember value of this bar + $val=$this->coords[0][$i]; + + if( !empty($val) && !is_numeric($val) ) { + JpGraphError::RaiseL(2004,$i,$val); +//('All values for a barplot must be numeric. You have specified value['.$i.'] == \''.$val.'\''); + } + + // Determine the shadow + if( $this->bar_shadow && $val != 0) { + + $ssh = $this->bar_shadow_hsize; + $ssv = $this->bar_shadow_vsize; + // Create points to create a "upper-right" shadow + if( $val > 0 ) { + $sp[0]=$pts[6]; $sp[1]=$pts[7]; + $sp[2]=$pts[4]; $sp[3]=$pts[5]; + $sp[4]=$pts[2]; $sp[5]=$pts[3]; + $sp[6]=$pts[2]+$ssh; $sp[7]=$pts[3]-$ssv; + $sp[8]=$pts[4]+$ssh; $sp[9]=$pts[5]-$ssv; + $sp[10]=$pts[6]+$ssh; $sp[11]=$pts[7]-$ssv; + } + elseif( $val < 0 ) { + $sp[0]=$pts[4]; $sp[1]=$pts[5]; + $sp[2]=$pts[6]; $sp[3]=$pts[7]; + $sp[4]=$pts[0]; $sp[5]=$pts[1]; + $sp[6]=$pts[0]+$ssh; $sp[7]=$pts[1]-$ssv; + $sp[8]=$pts[6]+$ssh; $sp[9]=$pts[7]-$ssv; + $sp[10]=$pts[4]+$ssh; $sp[11]=$pts[5]-$ssv; + } + if( is_array($this->bar_shadow_color) ) { + $numcolors = count($this->bar_shadow_color); + if( $numcolors == 0 ) { + JpGraphError::RaiseL(2005);//('You have specified an empty array for shadow colors in the bar plot.'); + } + $img->PushColor($this->bar_shadow_color[$i % $numcolors]); + } + else { + $img->PushColor($this->bar_shadow_color); + } + $img->FilledPolygon($sp); + $img->PopColor(); + } + + // Stroke the pattern + if( is_array($this->iPattern) ) { + $f = new RectPatternFactory(); + if( is_array($this->iPatternColor) ) { + $pcolor = $this->iPatternColor[$i % $np]; + } + else + $pcolor = $this->iPatternColor; + $prect = $f->Create($this->iPattern[$i % $np],$pcolor,1); + $prect->SetDensity($this->iPatternDensity[$i % $np]); + + if( $val < 0 ) { + $rx = $pts[0]; + $ry = $pts[1]; + } + else { + $rx = $pts[2]; + $ry = $pts[3]; + } + $width = abs($pts[4]-$pts[0])+1; + $height = abs($pts[1]-$pts[3])+1; + $prect->SetPos(new Rectangle($rx,$ry,$width,$height)); + $prect->Stroke($img); + } + else { + if( $this->iPattern > -1 ) { + $f = new RectPatternFactory(); + $prect = $f->Create($this->iPattern,$this->iPatternColor,1); + $prect->SetDensity($this->iPatternDensity); + if( $val < 0 ) { + $rx = $pts[0]; + $ry = $pts[1]; + } + else { + $rx = $pts[2]; + $ry = $pts[3]; + } + $width = abs($pts[4]-$pts[0])+1; + $height = abs($pts[1]-$pts[3])+1; + $prect->SetPos(new Rectangle($rx,$ry,$width,$height)); + $prect->Stroke($img); + } + } + // Stroke the outline of the bar + if( is_array($this->color) ) + $img->SetColor($this->color[$i % count($this->color)]); + else + $img->SetColor($this->color); + + $pts[] = $pts[0]; + $pts[] = $pts[1]; + + if( $this->weight > 0 ) { + $img->SetLineWeight($this->weight); + $img->Polygon($pts); + } + + // Determine how to best position the values of the individual bars + $x=$pts[2]+($pts[4]-$pts[2])/2; + $this->value->SetMargin(5); + + if( $this->valuepos=='top' ) { + $y=$pts[3]; + if( $img->a === 90 ) { + if( $val < 0 ) + $this->value->SetAlign('right','center'); + else + $this->value->SetAlign('left','center'); + + } + else { + if( $val < 0 ) { + $this->value->SetMargin(-5); + $y=$pts[1]; + $this->value->SetAlign('center','bottom'); + } + else { + $this->value->SetAlign('center','bottom'); + } + + } + $this->value->Stroke($img,$val,$x,$y); + } + elseif( $this->valuepos=='max' ) { + $y=$pts[3]; + if( $img->a === 90 ) { + if( $val < 0 ) { + $this->value->SetAlign('left','center'); + } + else { + $this->value->SetAlign('right','center'); + } + } + else { + if( $val < 0 ) { + $this->value->SetAlign('center','bottom'); + } + else { + $this->value->SetAlign('center','top'); + } + } + $this->value->SetMargin(-5); + $this->value->Stroke($img,$val,$x,$y); + } + elseif( $this->valuepos=='center' ) { + $y = ($pts[3] + $pts[1])/2; + $this->value->SetAlign('center','center'); + $this->value->SetMargin(0); + $this->value->Stroke($img,$val,$x,$y); + } + elseif( $this->valuepos=='bottom' || $this->valuepos=='min' ) { + $y=$pts[1]; + if( $img->a === 90 ) { + if( $val < 0 ) + $this->value->SetAlign('right','center'); + else + $this->value->SetAlign('left','center'); + } + $this->value->SetMargin(3); + $this->value->Stroke($img,$val,$x,$y); + } + else { + JpGraphError::RaiseL(2006,$this->valuepos); +//('Unknown position for values on bars :'.$this->valuepos); + } + if( !empty($this->csimtargets[$i]) ) { + // Create the client side image map + $rpts = $img->ArrRotate($pts); + $csimcoord=round($rpts[0]).", ".round($rpts[1]); + for( $j=1; $j < 4; ++$j){ + $csimcoord .= ", ".round($rpts[2*$j]).", ".round($rpts[2*$j+1]); + } + $this->csimareas .= 'csimareas .= " href=\"".htmlentities($this->csimtargets[$i])."\""; + + if( !empty($this->csimwintargets[$i]) ) { + $this->csimareas .= " target=\"".$this->csimwintargets[$i]."\" "; + } + + $sval=''; + if( !empty($this->csimalts[$i]) ) { + $sval=sprintf($this->csimalts[$i],$this->coords[0][$i]); + $this->csimareas .= " title=\"$sval\" alt=\"$sval\" "; + } + $this->csimareas .= " />\n"; + } + } + return true; + } +} // Class + +//=================================================== +// CLASS GroupBarPlot +// Description: Produce grouped bar plots +//=================================================== +class GroupBarPlot extends BarPlot { + var $plots=array(), $nbrplots=0; + var $numpoints; +//--------------- +// CONSTRUCTOR + function GroupBarPlot($plots) { + $this->width=0.5; + $this->plots = $plots; + $this->nbrplots = count($plots); + if( $this->nbrplots < 1 ) { + JpGraphError::RaiseL(2007);//('Cannot create GroupBarPlot from empty plot array.'); + } + for($i=0; $i < $this->nbrplots; ++$i ) { + if( empty($this->plots[$i]) || !isset($this->plots[$i]) ) { + JpGraphError::RaiseL(2008,$i);//("Group bar plot element nbr $i is undefined or empty."); + } + } + $this->numpoints = $plots[0]->numpoints; + } + +//--------------- +// PUBLIC METHODS + function Legend(&$graph) { + $n = count($this->plots); + for($i=0; $i < $n; ++$i) { + $c = get_class($this->plots[$i]); + if( !is_a($this->plots[$i],'BarPlot') ) { + JpGraphError::RaiseL(2009,$c);//('One of the objects submitted to GroupBar is not a BarPlot. Make sure that you create the Group Bar plot from an array of BarPlot or AccBarPlot objects. (Class = '.$c.')'); + } + $this->plots[$i]->DoLegend($graph); + } + } + + function Min() { + list($xmin,$ymin) = $this->plots[0]->Min(); + $n = count($this->plots); + for($i=0; $i < $n; ++$i) { + list($xm,$ym) = $this->plots[$i]->Min(); + $xmin = max($xmin,$xm); + $ymin = min($ymin,$ym); + } + return array($xmin,$ymin); + } + + function Max() { + list($xmax,$ymax) = $this->plots[0]->Max(); + $n = count($this->plots); + for($i=0; $i < $n; ++$i) { + list($xm,$ym) = $this->plots[$i]->Max(); + $xmax = max($xmax,$xm); + $ymax = max($ymax,$ym); + } + return array($xmax,$ymax); + } + + function GetCSIMareas() { + $n = count($this->plots); + $csimareas=''; + for($i=0; $i < $n; ++$i) { + $csimareas .= $this->plots[$i]->csimareas; + } + return $csimareas; + } + + // Stroke all the bars next to each other + function Stroke(&$img,&$xscale,&$yscale) { + $tmp=$xscale->off; + $n = count($this->plots); + $subwidth = $this->width/$this->nbrplots ; + + for( $i=0; $i < $n; ++$i ) { + $this->plots[$i]->ymin=$this->ybase; + $this->plots[$i]->SetWidth($subwidth); + + // If the client have used SetTextTickInterval() then + // major_step will be > 1 and the positioning will fail. + // If we assume it is always one the positioning will work + // fine with a text scale but this will not work with + // arbitrary linear scale + $xscale->off = $tmp+$i*round($xscale->scale_factor* $subwidth); + $this->plots[$i]->Stroke($img,$xscale,$yscale); + } + $xscale->off=$tmp; + } +} // Class + +//=================================================== +// CLASS AccBarPlot +// Description: Produce accumulated bar plots +//=================================================== +class AccBarPlot extends BarPlot { + var $plots=null,$nbrplots=0,$numpoints=0; +//--------------- +// CONSTRUCTOR + function AccBarPlot($plots) { + $this->plots = $plots; + $this->nbrplots = count($plots); + if( $this->nbrplots < 1 ) { + JpGraphError::RaiseL(2010);//('Cannot create AccBarPlot from empty plot array.'); + } + for($i=0; $i < $this->nbrplots; ++$i ) { + if( empty($this->plots[$i]) || !isset($this->plots[$i]) ) { + JpGraphError::RaiseL(2011,$i);//("Acc bar plot element nbr $i is undefined or empty."); + } + } + $this->numpoints = $plots[0]->numpoints; + $this->value = new DisplayValue(); + } + +//--------------- +// PUBLIC METHODS + function Legend(&$graph) { + $n = count($this->plots); + for( $i=$n-1; $i >= 0; --$i ) { + $c = get_class($this->plots[$i]); + if( !is_a($this->plots[$i],'BarPlot') ) { + JpGraphError::RaiseL(2012,$c);//('One of the objects submitted to AccBar is not a BarPlot. Make sure that you create the AccBar plot from an array of BarPlot objects.(Class='.$c.')'); + } + $this->plots[$i]->DoLegend($graph); + } + } + + function Max() { + list($xmax) = $this->plots[0]->Max(); + $nmax=0; + for($i=0; $i < count($this->plots); ++$i) { + $n = count($this->plots[$i]->coords[0]); + $nmax = max($nmax,$n); + list($x) = $this->plots[$i]->Max(); + $xmax = max($xmax,$x); + } + for( $i = 0; $i < $nmax; $i++ ) { + // Get y-value for bar $i by adding the + // individual bars from all the plots added. + // It would be wrong to just add the + // individual plots max y-value since that + // would in most cases give to large y-value. + $y=0; + if( !isset($this->plots[0]->coords[0][$i]) ) { + JpGraphError::RaiseL(2014); + } + if( $this->plots[0]->coords[0][$i] > 0 ) + $y=$this->plots[0]->coords[0][$i]; + for( $j = 1; $j < $this->nbrplots; $j++ ) { + if( !isset($this->plots[$j]->coords[0][$i]) ) { + JpGraphError::RaiseL(2014); + } + if( $this->plots[$j]->coords[0][$i] > 0 ) + $y += $this->plots[$j]->coords[0][$i]; + } + $ymax[$i] = $y; + } + $ymax = max($ymax); + + // Bar always start at baseline + if( $ymax <= $this->ybase ) + $ymax = $this->ybase; + return array($xmax,$ymax); + } + + function Min() { + $nmax=0; + list($xmin,$ysetmin) = $this->plots[0]->Min(); + for($i=0; $i < count($this->plots); ++$i) { + $n = count($this->plots[$i]->coords[0]); + $nmax = max($nmax,$n); + list($x,$y) = $this->plots[$i]->Min(); + $xmin = Min($xmin,$x); + $ysetmin = Min($y,$ysetmin); + } + for( $i = 0; $i < $nmax; $i++ ) { + // Get y-value for bar $i by adding the + // individual bars from all the plots added. + // It would be wrong to just add the + // individual plots max y-value since that + // would in most cases give to large y-value. + $y=0; + if( $this->plots[0]->coords[0][$i] < 0 ) + $y=$this->plots[0]->coords[0][$i]; + for( $j = 1; $j < $this->nbrplots; $j++ ) { + if( $this->plots[$j]->coords[0][$i] < 0 ) + $y += $this->plots[ $j ]->coords[0][$i]; + } + $ymin[$i] = $y; + } + $ymin = Min($ysetmin,Min($ymin)); + // Bar always start at baseline + if( $ymin >= $this->ybase ) + $ymin = $this->ybase; + return array($xmin,$ymin); + } + + // Stroke acc bar plot + function Stroke(&$img,&$xscale,&$yscale) { + $pattern=NULL; + $img->SetLineWeight($this->weight); + for($i=0; $i < $this->numpoints-1; $i++) { + $accy = 0; + $accy_neg = 0; + for($j=0; $j < $this->nbrplots; ++$j ) { + $img->SetColor($this->plots[$j]->color); + + if ( $this->plots[$j]->coords[0][$i] >= 0) { + $yt=$yscale->Translate($this->plots[$j]->coords[0][$i]+$accy); + $accyt=$yscale->Translate($accy); + $accy+=$this->plots[$j]->coords[0][$i]; + } + else { + //if ( $this->plots[$j]->coords[0][$i] < 0 || $accy_neg < 0 ) { + $yt=$yscale->Translate($this->plots[$j]->coords[0][$i]+$accy_neg); + $accyt=$yscale->Translate($accy_neg); + $accy_neg+=$this->plots[$j]->coords[0][$i]; + } + + $xt=$xscale->Translate($i); + + if( $this->abswidth > -1 ) + $abswidth=$this->abswidth; + else + $abswidth=round($this->width*$xscale->scale_factor,0); + + $pts=array($xt,$accyt,$xt,$yt,$xt+$abswidth,$yt,$xt+$abswidth,$accyt); + + if( $this->bar_shadow ) { + $ssh = $this->bar_shadow_hsize; + $ssv = $this->bar_shadow_vsize; + + // We must also differ if we are a positive or negative bar. + if( $j === 0 ) { + // This gets extra complicated since we have to + // see all plots to see if we are negative. It could + // for example be that all plots are 0 until the very + // last one. We therefore need to save the initial setup + // for both the negative and positive case + + // In case the final bar is positive + $sp[0]=$pts[6]+1; $sp[1]=$pts[7]; + $sp[2]=$pts[6]+$ssh; $sp[3]=$pts[7]-$ssv; + + // In case the final bar is negative + $nsp[0]=$pts[0]; $nsp[1]=$pts[1]; + $nsp[2]=$pts[0]+$ssh; $nsp[3]=$pts[1]-$ssv; + $nsp[4]=$pts[6]+$ssh; $nsp[5]=$pts[7]-$ssv; + $nsp[10]=$pts[6]+1; $nsp[11]=$pts[7]; + } + + if( $j === $this->nbrplots-1 ) { + // If this is the last plot of the bar and + // the total value is larger than 0 then we + // add the shadow. + if( is_array($this->bar_shadow_color) ) { + $numcolors = count($this->bar_shadow_color); + if( $numcolors == 0 ) { + JpGraphError::RaiseL(2013);//('You have specified an empty array for shadow colors in the bar plot.'); + } + $img->PushColor($this->bar_shadow_color[$i % $numcolors]); + } + else { + $img->PushColor($this->bar_shadow_color); + } + + if( $accy > 0 ) { + $sp[4]=$pts[4]+$ssh; $sp[5]=$pts[5]-$ssv; + $sp[6]=$pts[2]+$ssh; $sp[7]=$pts[3]-$ssv; + $sp[8]=$pts[2]; $sp[9]=$pts[3]-1; + $sp[10]=$pts[4]+1; $sp[11]=$pts[5]; + $img->FilledPolygon($sp,4); + } + elseif( $accy_neg < 0 ) { + $nsp[6]=$pts[4]+$ssh; $nsp[7]=$pts[5]-$ssv; + $nsp[8]=$pts[4]+1; $nsp[9]=$pts[5]; + $img->FilledPolygon($nsp,4); + } + $img->PopColor(); + } + } + + + // If value is NULL or 0, then don't draw a bar at all + if ($this->plots[$j]->coords[0][$i] == 0 ) continue; + + if( $this->plots[$j]->grad ) { + $grad = new Gradient($img); + $grad->FilledRectangle( + $pts[2],$pts[3], + $pts[6],$pts[7], + $this->plots[$j]->grad_fromcolor, + $this->plots[$j]->grad_tocolor, + $this->plots[$j]->grad_style); + } else { + if (is_array($this->plots[$j]->fill_color) ) { + $numcolors = count($this->plots[$j]->fill_color); + $fillcolor = $this->plots[$j]->fill_color[$i % $numcolors]; + // If the bar is specified to be non filled then the fill color is false + if( $fillcolor !== false ) + $img->SetColor($this->plots[$j]->fill_color[$i % $numcolors]); + } + else { + $fillcolor = $this->plots[$j]->fill_color; + if( $fillcolor !== false ) + $img->SetColor($this->plots[$j]->fill_color); + } + if( $fillcolor !== false ) + $img->FilledPolygon($pts); + $img->SetColor($this->plots[$j]->color); + } + + // Stroke the pattern + if( $this->plots[$j]->iPattern > -1 ) { + if( $pattern===NULL ) + $pattern = new RectPatternFactory(); + + $prect = $pattern->Create($this->plots[$j]->iPattern,$this->plots[$j]->iPatternColor,1); + $prect->SetDensity($this->plots[$j]->iPatternDensity); + if( $this->plots[$j]->coords[0][$i] < 0 ) { + $rx = $pts[0]; + $ry = $pts[1]; + } + else { + $rx = $pts[2]; + $ry = $pts[3]; + } + $width = abs($pts[4]-$pts[0])+1; + $height = abs($pts[1]-$pts[3])+1; + $prect->SetPos(new Rectangle($rx,$ry,$width,$height)); + $prect->Stroke($img); + } + + + // CSIM array + + if( $i < count($this->plots[$j]->csimtargets) ) { + // Create the client side image map + $rpts = $img->ArrRotate($pts); + $csimcoord=round($rpts[0]).", ".round($rpts[1]); + for( $k=1; $k < 4; ++$k){ + $csimcoord .= ", ".round($rpts[2*$k]).", ".round($rpts[2*$k+1]); + } + if( ! empty($this->plots[$j]->csimtargets[$i]) ) { + $this->csimareas.= 'csimareas.= " href=\"".$this->plots[$j]->csimtargets[$i]."\" "; + + if( ! empty($this->plots[$j]->csimwintargets[$i]) ) { + $this->csimareas.= " target=\"".$this->plots[$j]->csimwintargets[$i]."\" "; + } + + $sval=''; + if( !empty($this->plots[$j]->csimalts[$i]) ) { + $sval=sprintf($this->plots[$j]->csimalts[$i],$this->plots[$j]->coords[0][$i]); + $this->csimareas .= " title=\"$sval\" "; + } + $this->csimareas .= " alt=\"$sval\" />\n"; + } + } + + $pts[] = $pts[0]; + $pts[] = $pts[1]; + $img->SetLineWeight($this->plots[$j]->line_weight); + $img->Polygon($pts); + $img->SetLineWeight(1); + } + + // Draw labels for each acc.bar + + $x=$pts[2]+($pts[4]-$pts[2])/2; + if($this->bar_shadow) $x += $ssh; + + // First stroke the accumulated value for the entire bar + // This value is always placed at the top/bottom of the bars + if( $accy_neg < 0 ) { + $y=$yscale->Translate($accy_neg); + $this->value->Stroke($img,$accy_neg,$x,$y); + } + else { + $y=$yscale->Translate($accy); + $this->value->Stroke($img,$accy,$x,$y); + } + + $accy = 0; + $accy_neg = 0; + for($j=0; $j < $this->nbrplots; ++$j ) { + + // We don't print 0 values in an accumulated bar plot + if( $this->plots[$j]->coords[0][$i] == 0 ) continue; + + if ($this->plots[$j]->coords[0][$i] > 0) { + $yt=$yscale->Translate($this->plots[$j]->coords[0][$i]+$accy); + $accyt=$yscale->Translate($accy); + if( $this->plots[$j]->valuepos=='center' ) { + $y = $accyt-($accyt-$yt)/2; + } + elseif( $this->plots[$j]->valuepos=='bottom' ) { + $y = $accyt; + } + else { // top or max + $y = $accyt-($accyt-$yt); + } + $accy+=$this->plots[$j]->coords[0][$i]; + if( $this->plots[$j]->valuepos=='center' ) { + $this->plots[$j]->value->SetAlign("center","center"); + $this->plots[$j]->value->SetMargin(0); + } + elseif( $this->plots[$j]->valuepos=='bottom' ) { + $this->plots[$j]->value->SetAlign('center','bottom'); + $this->plots[$j]->value->SetMargin(2); + } + else { + $this->plots[$j]->value->SetAlign('center','top'); + $this->plots[$j]->value->SetMargin(1); + } + } else { + $yt=$yscale->Translate($this->plots[$j]->coords[0][$i]+$accy_neg); + $accyt=$yscale->Translate($accy_neg); + $accy_neg+=$this->plots[$j]->coords[0][$i]; + if( $this->plots[$j]->valuepos=='center' ) { + $y = $accyt-($accyt-$yt)/2; + } + elseif( $this->plots[$j]->valuepos=='bottom' ) { + $y = $accyt; + } + else { + $y = $accyt-($accyt-$yt); + } + if( $this->plots[$j]->valuepos=='center' ) { + $this->plots[$j]->value->SetAlign("center","center"); + $this->plots[$j]->value->SetMargin(0); + } + elseif( $this->plots[$j]->valuepos=='bottom' ) { + $this->plots[$j]->value->SetAlign('center',$j==0 ? 'bottom':'top'); + $this->plots[$j]->value->SetMargin(-2); + } + else { + $this->plots[$j]->value->SetAlign('center','bottom'); + $this->plots[$j]->value->SetMargin(-1); + } + } + $this->plots[$j]->value->Stroke($img,$this->plots[$j]->coords[0][$i],$x,$y); + } + + } + return true; + } +} // Class + +/* EOF */ +?> diff --git a/html/includes/jpgraph/src/jpgraph_canvas.php b/html/includes/jpgraph/src/jpgraph_canvas.php new file mode 100644 index 0000000000..6e6f52a26f --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_canvas.php @@ -0,0 +1,94 @@ +Graph($aWidth,$aHeight,$aCachedName,$timeout,$inline); + } + +//--------------- +// PUBLIC METHODS + + function InitFrame() { + $this->StrokePlotArea(); + } + + // Method description + function Stroke($aStrokeFileName="") { + if( $this->texts != null ) { + for($i=0; $i < count($this->texts); ++$i) { + $this->texts[$i]->Stroke($this->img); + } + } + if( $this->iTables !== null ) { + for($i=0; $i < count($this->iTables); ++$i) { + $this->iTables[$i]->Stroke($this->img); + } + } + $this->StrokeTitles(); + + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // a best we can. Therefor you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); + + // We need to know if we have stroked the plot in the + // GetCSIMareas. Otherwise the CSIM hasn't been generated + // and in the case of GetCSIM called before stroke to generate + // CSIM without storing an image to disk GetCSIM must call Stroke. + $this->iHasStroked = true; + + if( !$_csim ) { + + // Should we do any final image transformation + if( $this->iImgTrans ) { + if( !class_exists('ImgTrans') ) { + require_once('jpgraph_imgtrans.php'); + } + + $tform = new ImgTrans($this->img->img); + $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, + $this->iImgTransDirection,$this->iImgTransHighQ, + $this->iImgTransMinSize,$this->iImgTransFillColor, + $this->iImgTransBorder); + } + + + // If the filename is given as the special _IMG_HANDLER + // then the image handler is returned and the image is NOT + // streamed back + if( $aStrokeFileName == _IMG_HANDLER ) { + return $this->img->img; + } + else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName); + return true; + } + } + } +} // Class +/* EOF */ +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/jpgraph_canvtools.php b/html/includes/jpgraph/src/jpgraph_canvtools.php new file mode 100644 index 0000000000..87b4f747cc --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_canvtools.php @@ -0,0 +1,515 @@ +g = &$graph; + $this->w = $graph->img->width; + $this->h = $graph->img->height; + $this->ixmin = $xmin; + $this->ixmax = $xmax; + $this->iymin = $ymin; + $this->iymax = $ymax; + } + + function Set($xmin=0,$xmax=10,$ymin=0,$ymax=10) { + $this->ixmin = $xmin; + $this->ixmax = $xmax; + $this->iymin = $ymin; + $this->iymax = $ymax; + } + + function Translate($x,$y) { + $xp = round(($x-$this->ixmin)/($this->ixmax - $this->ixmin) * $this->w); + $yp = round(($y-$this->iymin)/($this->iymax - $this->iymin) * $this->h); + return array($xp,$yp); + } + + function TranslateX($x) { + $xp = round(($x-$this->ixmin)/($this->ixmax - $this->ixmin) * $this->w); + return $xp; + } + + function TranslateY($y) { + $yp = round(($y-$this->iymin)/($this->iymax - $this->iymin) * $this->h); + return $yp; + } + +} + + +//=================================================== +// CLASS Shape +// Description: Methods to draw shapes on canvas +//=================================================== +class Shape { + var $img,$scale; + + function Shape(&$aGraph,&$scale) { + $this->img = &$aGraph->img; + $this->img->SetColor('black'); + $this->scale = &$scale; + } + + function SetColor($aColor) { + $this->img->SetColor($aColor); + } + + function Line($x1,$y1,$x2,$y2) { + list($x1,$y1) = $this->scale->Translate($x1,$y1); + list($x2,$y2) = $this->scale->Translate($x2,$y2); + $this->img->Line($x1,$y1,$x2,$y2); + } + + function Polygon($p,$aClosed=false) { + $n=count($p); + for($i=0; $i < $n; $i+=2 ) { + $p[$i] = $this->scale->TranslateX($p[$i]); + $p[$i+1] = $this->scale->TranslateY($p[$i+1]); + } + $this->img->Polygon($p,$aClosed); + } + + function FilledPolygon($p) { + $n=count($p); + for($i=0; $i < $n; $i+=2 ) { + $p[$i] = $this->scale->TranslateX($p[$i]); + $p[$i+1] = $this->scale->TranslateY($p[$i+1]); + } + $this->img->FilledPolygon($p); + } + + + // Draw a bezier curve with defining points in the $aPnts array + // using $aSteps steps. + // 0=x0, 1=y0 + // 2=x1, 3=y1 + // 4=x2, 5=y2 + // 6=x3, 7=y3 + function Bezier($p,$aSteps=40) { + $x0 = $p[0]; + $y0 = $p[1]; + // Calculate coefficients + $cx = 3*($p[2]-$p[0]); + $bx = 3*($p[4]-$p[2])-$cx; + $ax = $p[6]-$p[0]-$cx-$bx; + $cy = 3*($p[3]-$p[1]); + $by = 3*($p[5]-$p[3])-$cy; + $ay = $p[7]-$p[1]-$cy-$by; + + // Step size + $delta = 1.0/$aSteps; + + $x_old = $x0; + $y_old = $y0; + for($t=$delta; $t<=1.0; $t+=$delta) { + $tt = $t*$t; $ttt=$tt*$t; + $x = $ax*$ttt + $bx*$tt + $cx*$t + $x0; + $y = $ay*$ttt + $by*$tt + $cy*$t + $y0; + $this->Line($x_old,$y_old,$x,$y); + $x_old = $x; + $y_old = $y; + } + $this->Line($x_old,$y_old,$p[6],$p[7]); + } + + function Rectangle($x1,$y1,$x2,$y2) { + list($x1,$y1) = $this->scale->Translate($x1,$y1); + list($x2,$y2) = $this->scale->Translate($x2,$y2); + $this->img->Rectangle($x1,$y1,$x2,$y2); + } + + function FilledRectangle($x1,$y1,$x2,$y2) { + list($x1,$y1) = $this->scale->Translate($x1,$y1); + list($x2,$y2) = $this->scale->Translate($x2,$y2); + $this->img->FilledRectangle($x1,$y1,$x2,$y2); + } + + function Circle($x1,$y1,$r) { + list($x1,$y1) = $this->scale->Translate($x1,$y1); + if( $r >= 0 ) + $r = $this->scale->TranslateX($r); + else + $r = -$r; + $this->img->Circle($x1,$y1,$r); + } + + function FilledCircle($x1,$y1,$r) { + list($x1,$y1) = $this->scale->Translate($x1,$y1); + if( $r >= 0 ) + $r = $this->scale->TranslateX($r); + else + $r = -$r; + $this->img->FilledCircle($x1,$y1,$r); + } + + function RoundedRectangle($x1,$y1,$x2,$y2,$r=null) { + list($x1,$y1) = $this->scale->Translate($x1,$y1); + list($x2,$y2) = $this->scale->Translate($x2,$y2); + + if( $r == null ) + $r = 5; + elseif( $r >= 0 ) + $r = $this->scale->TranslateX($r); + else + $r = -$r; + $this->img->RoundedRectangle($x1,$y1,$x2,$y2,$r); + } + + function FilledRoundedRectangle($x1,$y1,$x2,$y2,$r=null) { + list($x1,$y1) = $this->scale->Translate($x1,$y1); + list($x2,$y2) = $this->scale->Translate($x2,$y2); + + if( $r == null ) + $r = 5; + elseif( $r > 0 ) + $r = $this->scale->TranslateX($r); + else + $r = -$r; + $this->img->FilledRoundedRectangle($x1,$y1,$x2,$y2,$r); + } + + function ShadowRectangle($x1,$y1,$x2,$y2,$fcolor=false,$shadow_width=null,$shadow_color=array(102,102,102)) { + list($x1,$y1) = $this->scale->Translate($x1,$y1); + list($x2,$y2) = $this->scale->Translate($x2,$y2); + if( $shadow_width == null ) + $shadow_width=4; + else + $shadow_width=$this->scale->TranslateX($shadow_width); + $this->img->ShadowRectangle($x1,$y1,$x2,$y2,$fcolor,$shadow_width,$shadow_color); + } + + function SetTextAlign($halign,$valign="bottom") { + $this->img->SetTextAlign($halign,$valign="bottom"); + } + + function StrokeText($x1,$y1,$txt,$dir=0,$paragraph_align="left") { + list($x1,$y1) = $this->scale->Translate($x1,$y1); + $this->img->StrokeText($x1,$y1,$txt,$dir,$paragraph_align); + } + + // A rounded rectangle where one of the corner has been moved "into" the + // rectangle 'iw' width and 'ih' height. Corners: + // 0=Top left, 1=top right, 2=bottom right, 3=bottom left + function IndentedRectangle($xt,$yt,$w,$h,$iw=0,$ih=0,$aCorner=3,$aFillColor="",$r=4) { + + list($xt,$yt) = $this->scale->Translate($xt,$yt); + list($w,$h) = $this->scale->Translate($w,$h); + list($iw,$ih) = $this->scale->Translate($iw,$ih); + + $xr = $xt + $w - 0; + $yl = $yt + $h - 0; + + switch( $aCorner ) { + case 0: // Upper left + + // Bottom line, left & right arc + $this->img->Line($xt+$r,$yl,$xr-$r,$yl); + $this->img->Arc($xt+$r,$yl-$r,$r*2,$r*2,90,180); + $this->img->Arc($xr-$r,$yl-$r,$r*2,$r*2,0,90); + + // Right line, Top right arc + $this->img->Line($xr,$yt+$r,$xr,$yl-$r); + $this->img->Arc($xr-$r,$yt+$r,$r*2,$r*2,270,360); + + // Top line, Top left arc + $this->img->Line($xt+$iw+$r,$yt,$xr-$r,$yt); + $this->img->Arc($xt+$iw+$r,$yt+$r,$r*2,$r*2,180,270); + + // Left line + $this->img->Line($xt,$yt+$ih+$r,$xt,$yl-$r); + + // Indent horizontal, Lower left arc + $this->img->Line($xt+$r,$yt+$ih,$xt+$iw-$r,$yt+$ih); + $this->img->Arc($xt+$r,$yt+$ih+$r,$r*2,$r*2,180,270); + + // Indent vertical, Indent arc + $this->img->Line($xt+$iw,$yt+$r,$xt+$iw,$yt+$ih-$r); + $this->img->Arc($xt+$iw-$r,$yt+$ih-$r,$r*2,$r*2,0,90); + + if( $aFillColor != '' ) { + $bc = $this->img->current_color_name; + $this->img->PushColor($aFillColor); + $this->img->FillToBorder($xr-$r,$yl-$r,$bc); + $this->img->PopColor(); + } + + break; + + case 1: // Upper right + + // Bottom line, left & right arc + $this->img->Line($xt+$r,$yl,$xr-$r,$yl); + $this->img->Arc($xt+$r,$yl-$r,$r*2,$r*2,90,180); + $this->img->Arc($xr-$r,$yl-$r,$r*2,$r*2,0,90); + + // Left line, Top left arc + $this->img->Line($xt,$yt+$r,$xt,$yl-$r); + $this->img->Arc($xt+$r,$yt+$r,$r*2,$r*2,180,270); + + // Top line, Top right arc + $this->img->Line($xt+$r,$yt,$xr-$iw-$r,$yt); + $this->img->Arc($xr-$iw-$r,$yt+$r,$r*2,$r*2,270,360); + + // Right line + $this->img->Line($xr,$yt+$ih+$r,$xr,$yl-$r); + + // Indent horizontal, Lower right arc + $this->img->Line($xr-$iw+$r,$yt+$ih,$xr-$r,$yt+$ih); + $this->img->Arc($xr-$r,$yt+$ih+$r,$r*2,$r*2,270,360); + + // Indent vertical, Indent arc + $this->img->Line($xr-$iw,$yt+$r,$xr-$iw,$yt+$ih-$r); + $this->img->Arc($xr-$iw+$r,$yt+$ih-$r,$r*2,$r*2,90,180); + + if( $aFillColor != '' ) { + $bc = $this->img->current_color_name; + $this->img->PushColor($aFillColor); + $this->img->FillToBorder($xt+$r,$yl-$r,$bc); + $this->img->PopColor(); + } + + break; + + case 2: // Lower right + // Top line, Top left & Top right arc + $this->img->Line($xt+$r,$yt,$xr-$r,$yt); + $this->img->Arc($xt+$r,$yt+$r,$r*2,$r*2,180,270); + $this->img->Arc($xr-$r,$yt+$r,$r*2,$r*2,270,360); + + // Left line, Bottom left arc + $this->img->Line($xt,$yt+$r,$xt,$yl-$r); + $this->img->Arc($xt+$r,$yl-$r,$r*2,$r*2,90,180); + + // Bottom line, Bottom right arc + $this->img->Line($xt+$r,$yl,$xr-$iw-$r,$yl); + $this->img->Arc($xr-$iw-$r,$yl-$r,$r*2,$r*2,0,90); + + // Right line + $this->img->Line($xr,$yt+$r,$xr,$yl-$ih-$r); + + // Indent horizontal, Lower right arc + $this->img->Line($xr-$r,$yl-$ih,$xr-$iw+$r,$yl-$ih); + $this->img->Arc($xr-$r,$yl-$ih-$r,$r*2,$r*2,0,90); + + // Indent vertical, Indent arc + $this->img->Line($xr-$iw,$yl-$r,$xr-$iw,$yl-$ih+$r); + $this->img->Arc($xr-$iw+$r,$yl-$ih+$r,$r*2,$r*2,180,270); + + if( $aFillColor != '' ) { + $bc = $this->img->current_color_name; + $this->img->PushColor($aFillColor); + $this->img->FillToBorder($xt+$r,$yt+$r,$bc); + $this->img->PopColor(); + } + + break; + + case 3: // Lower left + // Top line, Top left & Top right arc + $this->img->Line($xt+$r,$yt,$xr-$r,$yt); + $this->img->Arc($xt+$r,$yt+$r,$r*2,$r*2,180,270); + $this->img->Arc($xr-$r,$yt+$r,$r*2,$r*2,270,360); + + // Right line, Bottom right arc + $this->img->Line($xr,$yt+$r,$xr,$yl-$r); + $this->img->Arc($xr-$r,$yl-$r,$r*2,$r*2,0,90); + + // Bottom line, Bottom left arc + $this->img->Line($xt+$iw+$r,$yl,$xr-$r,$yl); + $this->img->Arc($xt+$iw+$r,$yl-$r,$r*2,$r*2,90,180); + + // Left line + $this->img->Line($xt,$yt+$r,$xt,$yl-$ih-$r); + + // Indent horizontal, Lower left arc + $this->img->Line($xt+$r,$yl-$ih,$xt+$iw-$r,$yl-$ih); + $this->img->Arc($xt+$r,$yl-$ih-$r,$r*2,$r*2,90,180); + + // Indent vertical, Indent arc + $this->img->Line($xt+$iw,$yl-$ih+$r,$xt+$iw,$yl-$r); + $this->img->Arc($xt+$iw-$r,$yl-$ih+$r,$r*2,$r*2,270,360); + + if( $aFillColor != '' ) { + $bc = $this->img->current_color_name; + $this->img->PushColor($aFillColor); + $this->img->FillToBorder($xr-$r,$yt+$r,$bc); + $this->img->PopColor(); + } + + break; + } + } +} + + +//=================================================== +// CLASS RectangleText +// Description: Draws a text paragraph inside a +// rounded, possible filled, rectangle. +//=================================================== +class CanvasRectangleText { + var $ix,$iy,$iw,$ih,$ir=4; + var $iTxt,$iColor='black',$iFillColor='',$iFontColor='black'; + var $iParaAlign='center'; + var $iAutoBoxMargin=5; + var $iShadowWidth=3,$iShadowColor=''; + + function CanvasRectangleText($aTxt='',$xl=0,$yt=0,$w=0,$h=0) { + $this->iTxt = new Text($aTxt); + $this->ix = $xl; + $this->iy = $yt; + $this->iw = $w; + $this->ih = $h; + } + + function SetShadow($aColor='gray',$aWidth=3) { + $this->iShadowColor = $aColor; + $this->iShadowWidth = $aWidth; + } + + function SetFont($FontFam,$aFontStyle,$aFontSize=12) { + $this->iTxt->SetFont($FontFam,$aFontStyle,$aFontSize); + } + + function SetTxt($aTxt) { + $this->iTxt->Set($aTxt); + } + + function ParagraphAlign($aParaAlign) { + $this->iParaAlign = $aParaAlign; + } + + function SetFillColor($aFillColor) { + $this->iFillColor = $aFillColor; + } + + function SetAutoMargin($aMargin) { + $this->iAutoBoxMargin=$aMargin; + } + + function SetColor($aColor) { + $this->iColor = $aColor; + } + + function SetFontColor($aColor) { + $this->iFontColor = $aColor; + } + + function SetPos($xl=0,$yt=0,$w=0,$h=0) { + $this->ix = $xl; + $this->iy = $yt; + $this->iw = $w; + $this->ih = $h; + } + + function Pos($xl=0,$yt=0,$w=0,$h=0) { + $this->ix = $xl; + $this->iy = $yt; + $this->iw = $w; + $this->ih = $h; + } + + function Set($aTxt,$xl,$yt,$w=0,$h=0) { + $this->iTxt->Set($aTxt); + $this->ix = $xl; + $this->iy = $yt; + $this->iw = $w; + $this->ih = $h; + } + + function SetCornerRadius($aRad=5) { + $this->ir = $aRad; + } + + function Stroke($aImg,$scale) { + + // If coordinates are specifed as negative this means we should + // treat them as abolsute (pixels) coordinates + if( $this->ix > 0 ) { + $this->ix = $scale->TranslateX($this->ix) ; + } + else { + $this->ix = -$this->ix; + } + + if( $this->iy > 0 ) { + $this->iy = $scale->TranslateY($this->iy) ; + } + else { + $this->iy = -$this->iy; + } + + list($this->iw,$this->ih) = $scale->Translate($this->iw,$this->ih) ; + + if( $this->iw == 0 ) + $this->iw = round($this->iTxt->GetWidth($aImg) + $this->iAutoBoxMargin); + if( $this->ih == 0 ) { + $this->ih = round($this->iTxt->GetTextHeight($aImg) + $this->iAutoBoxMargin); + } + + if( $this->iShadowColor != '' ) { + $aImg->PushColor($this->iShadowColor); + $aImg->FilledRoundedRectangle($this->ix+$this->iShadowWidth, + $this->iy+$this->iShadowWidth, + $this->ix+$this->iw-1+$this->iShadowWidth, + $this->iy+$this->ih-1+$this->iShadowWidth, + $this->ir); + $aImg->PopColor(); + } + + if( $this->iFillColor != '' ) { + $aImg->PushColor($this->iFillColor); + $aImg->FilledRoundedRectangle($this->ix,$this->iy, + $this->ix+$this->iw-1, + $this->iy+$this->ih-1, + $this->ir); + $aImg->PopColor(); + } + + if( $this->iColor != '' ) { + $aImg->PushColor($this->iColor); + $aImg->RoundedRectangle($this->ix,$this->iy, + $this->ix+$this->iw-1, + $this->iy+$this->ih-1, + $this->ir); + $aImg->PopColor(); + } + + $this->iTxt->Align('center','center'); + $this->iTxt->ParagraphAlign($this->iParaAlign); + $this->iTxt->SetColor($this->iFontColor); + $this->iTxt->Stroke($aImg, $this->ix+$this->iw/2, $this->iy+$this->ih/2); + + return array($this->iw, $this->ih); + + } + +} + + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/jpgraph_date.php b/html/includes/jpgraph/src/jpgraph_date.php new file mode 100644 index 0000000000..672066a2da --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_date.php @@ -0,0 +1,497 @@ +type=$aType; + $this->scale=array($aMin,$aMax); + $this->world_size=$aMax-$aMin; + $this->ticks = new LinearTicks(); + $this->intscale=true; + } + + +//------------------------------------------------------------------------------------------ +// Utility Function AdjDate() +// Description: Will round a given time stamp to an even year, month or day +// argument. +//------------------------------------------------------------------------------------------ + + function AdjDate($aTime,$aRound=0,$aYearType=false,$aMonthType=false,$aDayType=false) { + $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); + $h=0;$i=0;$s=0; + if( $aYearType !== false ) { + $yearAdj = array(0=>1, 1=>2, 2=>5); + if( $aRound == 0 ) { + $y = floor($y/$yearAdj[$aYearType])*$yearAdj[$aYearType]; + } + else { + ++$y; + $y = ceil($y/$yearAdj[$aYearType])*$yearAdj[$aYearType]; + } + $m=1;$d=1; + } + elseif( $aMonthType !== false ) { + $monthAdj = array(0=>1, 1=>6); + if( $aRound == 0 ) { + $m = floor($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType]; + $d=1; + } + else { + ++$m; + $m = ceil($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType]; + $d=1; + } + } + elseif( $aDayType !== false ) { + if( $aDayType == 0 ) { + if( $aRound == 1 ) { + //++$d; + $h=23;$i=59;$s=59; + } + } + else { + // Adjust to an even week boundary. + $w = (int)date('w',$aTime); // Day of week 0=Sun, 6=Sat + if( true ) { // Adjust to start on Mon + if( $w==0 ) $w=6; + else --$w; + } + if( $aRound == 0 ) { + $d -= $w; + } + else { + $d += (7-$w); + $h=23;$i=59;$s=59; + } + } + } + return mktime($h,$i,$s,$m,$d,$y); + + } + +//------------------------------------------------------------------------------------------ +// Wrapper for AdjDate that will round a timestamp to an even date rounding +// it downwards. +//------------------------------------------------------------------------------------------ + function AdjStartDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) { + return $this->AdjDate($aTime,0,$aYearType,$aMonthType,$aDayType); + } + +//------------------------------------------------------------------------------------------ +// Wrapper for AdjDate that will round a timestamp to an even date rounding +// it upwards +//------------------------------------------------------------------------------------------ + function AdjEndDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) { + return $this->AdjDate($aTime,1,$aYearType,$aMonthType,$aDayType); + } + +//------------------------------------------------------------------------------------------ +// Utility Function AdjTime() +// Description: Will round a given time stamp to an even time according to +// argument. +//------------------------------------------------------------------------------------------ + + function AdjTime($aTime,$aRound=0,$aHourType=false,$aMinType=false,$aSecType=false) { + $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); + $h = (int)date('H',$aTime); $i = (int)date('i',$aTime); $s = (int)date('s',$aTime); + if( $aHourType !== false ) { + $aHourType %= 6; + $hourAdj = array(0=>1, 1=>2, 2=>3, 3=>4, 4=>6, 5=>12); + if( $aRound == 0 ) + $h = floor($h/$hourAdj[$aHourType])*$hourAdj[$aHourType]; + else { + if( ($h % $hourAdj[$aHourType]==0) && ($i > 0 || $s > 0) ) { + $h++; + } + $h = ceil($h/$hourAdj[$aHourType])*$hourAdj[$aHourType]; + if( $h >= 24 ) { + $aTime += 86400; + $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); + $h -= 24; + } + } + $i=0;$s=0; + } + elseif( $aMinType !== false ) { + $aMinType %= 5; + $minAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30); + if( $aRound == 0 ) { + $i = floor($i/$minAdj[$aMinType])*$minAdj[$aMinType]; + } + else { + if( ($i % $minAdj[$aMinType]==0) && $s > 0 ) { + $i++; + } + $i = ceil($i/$minAdj[$aMinType])*$minAdj[$aMinType]; + if( $i >= 60) { + $aTime += 3600; + $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); + $h = (int)date('H',$aTime); $i = 0; + } + } + $s=0; + } + elseif( $aSecType !== false ) { + $aSecType %= 5; + $secAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30); + if( $aRound == 0 ) { + $s = floor($s/$secAdj[$aSecType])*$secAdj[$aSecType]; + } + else { + $s = ceil($s/$secAdj[$aSecType]*1.0)*$secAdj[$aSecType]; + if( $s >= 60) { + $s=0; + $aTime += 60; + $y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime); + $h = (int)date('H',$aTime); $i = (int)date('i',$aTime); + } + } + } + return mktime($h,$i,$s,$m,$d,$y); + } + +//------------------------------------------------------------------------------------------ +// Wrapper for AdjTime that will round a timestamp to an even time rounding +// it downwards. +// Example: AdjStartTime(mktime(18,27,13,2,22,2005),false,2) => 18:20 +//------------------------------------------------------------------------------------------ + function AdjStartTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) { + return $this->AdjTime($aTime,0,$aHourType,$aMinType,$aSecType); + } + +//------------------------------------------------------------------------------------------ +// Wrapper for AdjTime that will round a timestamp to an even time rounding +// it upwards +// Example: AdjEndTime(mktime(18,27,13,2,22,2005),false,2) => 18:30 +//------------------------------------------------------------------------------------------ + function AdjEndTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) { + return $this->AdjTime($aTime,1,$aHourType,$aMinType,$aSecType); + } + +//------------------------------------------------------------------------------------------ +// DateAutoScale +// Autoscale a date axis given start and end time +// Returns an array ($start,$end,$major,$minor,$format) +//------------------------------------------------------------------------------------------ + function DoDateAutoScale($aStartTime,$aEndTime,$aDensity=0,$aAdjust=true) { + // Format of array + // array ( Decision point, array( array( Major-scale-step-array ), + // array( Minor-scale-step-array ), + // array( 0=date-adjust, 1=time-adjust, adjustment-alignment) ) + // + $scalePoints = + array( + /* Intervall larger than 10 years */ + SECPERYEAR*10,array(array(SECPERYEAR*5,SECPERYEAR*2), + array(SECPERYEAR), + array(0,YEARADJ_1, 0,YEARADJ_1) ), + + /* Intervall larger than 2 years */ + SECPERYEAR*2,array(array(SECPERYEAR),array(SECPERYEAR), + array(0,YEARADJ_1) ), + + /* Intervall larger than 90 days (approx 3 month) */ + SECPERDAY*90,array(array(SECPERDAY*30,SECPERDAY*14,SECPERDAY*7,SECPERDAY), + array(SECPERDAY*5,SECPERDAY*7,SECPERDAY,SECPERDAY), + array(0,MONTHADJ_1, 0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1)), + + /* Intervall larger than 30 days (approx 1 month) */ + SECPERDAY*30,array(array(SECPERDAY*14,SECPERDAY*7,SECPERDAY*2, SECPERDAY), + array(SECPERDAY,SECPERDAY,SECPERDAY,SECPERDAY), + array(0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1, 0,DAYADJ_1)), + + /* Intervall larger than 7 days */ + SECPERDAY*7,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2), + array(SECPERHOUR*6,SECPERHOUR*3,SECPERHOUR,SECPERHOUR), + array(0,DAYADJ_1, 1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1)), + + /* Intervall larger than 1 day */ + SECPERDAY,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR), + array(SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR,SECPERHOUR,SECPERHOUR), + array(1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1, 1,HOURADJ_1)), + + /* Intervall larger than 12 hours */ + SECPERHOUR*12,array(array(SECPERHOUR*2,SECPERHOUR,SECPERMIN*30,900,600), + array(1800,1800,900,300,300), + array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ), + + /* Intervall larger than 2 hours */ + SECPERHOUR*2,array(array(SECPERHOUR,SECPERMIN*30,900,600,300), + array(1800,900,300,120,60), + array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ), + + /* Intervall larger than 1 hours */ + SECPERHOUR,array(array(SECPERMIN*30,900,600,300),array(900,300,120,60), + array(1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ), + + /* Intervall larger than 30 min */ + SECPERMIN*30,array(array(SECPERMIN*15,SECPERMIN*10,SECPERMIN*5,SECPERMIN), + array(300,300,60,10), + array(1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5, 1,MINADJ_1)), + + /* Intervall larger than 1 min */ + SECPERMIN,array(array(SECPERMIN,15,10,5), + array(15,5,2,1), + array(1,MINADJ_1, 1,SECADJ_15, 1,SECADJ_10, 1,SECADJ_5)), + + /* Intervall larger than 10 sec */ + 10,array(array(5,2), + array(1,1), + array(1,SECADJ_5, 1,SECADJ_1)), + + /* Intervall larger than 1 sec */ + 1,array(array(1), + array(1), + array(1,SECADJ_1)), + ); + + $ns = count($scalePoints); + // Establish major and minor scale units for the date scale + $diff = $aEndTime - $aStartTime; + if( $diff < 1 ) return false; + $done=false; + $i=0; + while( ! $done ) { + if( $diff > $scalePoints[2*$i] ) { + // Get major and minor scale for this intervall + $scaleSteps = $scalePoints[2*$i+1]; + $major = $scaleSteps[0][min($aDensity,count($scaleSteps[0])-1)]; + // Try to find out which minor step looks best + $minor = $scaleSteps[1][min($aDensity,count($scaleSteps[1])-1)]; + if( $aAdjust ) { + // Find out how we should align the start and end timestamps + $idx = 2*min($aDensity,floor(count($scaleSteps[2])/2)-1); + if( $scaleSteps[2][$idx] === 0 ) { + // Use date adjustment + $adj = $scaleSteps[2][$idx+1]; + if( $adj >= 30 ) { + $start = $this->AdjStartDate($aStartTime,$adj-30); + $end = $this->AdjEndDate($aEndTime,$adj-30); + } + elseif( $adj >= 20 ) { + $start = $this->AdjStartDate($aStartTime,false,$adj-20); + $end = $this->AdjEndDate($aEndTime,false,$adj-20); + } + else { + $start = $this->AdjStartDate($aStartTime,false,false,$adj); + $end = $this->AdjEndDate($aEndTime,false,false,$adj); + // We add 1 second for date adjustment to make sure we end on 00:00 the following day + // This makes the final major tick be srawn when we step day-by-day instead of ending + // on xx:59:59 which would not draw the final major tick + $end++; + } + } + else { + // Use time adjustment + $adj = $scaleSteps[2][$idx+1]; + if( $adj >= 30 ) { + $start = $this->AdjStartTime($aStartTime,$adj-30); + $end = $this->AdjEndTime($aEndTime,$adj-30); + } + elseif( $adj >= 20 ) { + $start = $this->AdjStartTime($aStartTime,false,$adj-20); + $end = $this->AdjEndTime($aEndTime,false,$adj-20); + } + else { + $start = $this->AdjStartTime($aStartTime,false,false,$adj); + $end = $this->AdjEndTime($aEndTime,false,false,$adj); + } + } + } + // If the overall date span is larger than 1 day ten we show date + $format = ''; + if( ($end-$start) > SECPERDAY ) { + $format = 'Y-m-d '; + } + // If the major step is less than 1 day we need to whow hours + min + if( $major < SECPERDAY ) { + $format .= 'H:i'; + } + // If the major step is less than 1 min we need to show sec + if( $major < 60 ) { + $format .= ':s'; + } + $done=true; + } + ++$i; + } + return array($start,$end,$major,$minor,$format); + } + + // Overrides the automatic determined date format. Must be a valid date() format string + function SetDateFormat($aFormat) { + $this->date_format = $aFormat; + $this->ticks->SetLabelDateFormat($this->date_format); + } + + function AdjustForDST($aFlg=true) { + $this->ticks->AdjustForDST($aFlg); + } + + + function SetDateAlign($aStartAlign,$aEndAlign=false) { + if( $aEndAlign === false ) { + $aEndAlign=$aStartAlign; + } + $this->iStartAlign = $aStartAlign; + $this->iEndAlign = $aEndAlign; + } + + function SetTimeAlign($aStartAlign,$aEndAlign=false) { + if( $aEndAlign === false ) { + $aEndAlign=$aStartAlign; + } + $this->iStartTimeAlign = $aStartAlign; + $this->iEndTimeAlign = $aEndAlign; + } + + + function AutoScale(&$img,$aStartTime,$aEndTime,$aNumSteps) { + if( $aStartTime == $aEndTime ) { + // Special case when we only have one data point. + // Create a small artifical intervall to do the autoscaling + $aStartTime -= 10; + $aEndTime += 10; + } + $done=false; + $i=0; + while( ! $done && $i < 5) { + list($adjstart,$adjend,$maj,$min,$format) = $this->DoDateAutoScale($aStartTime,$aEndTime,$i); + $n = floor(($adjend-$adjstart)/$maj); + if( $n * 1.7 > $aNumSteps ) { + $done=true; + } + $i++; + } + + /* + if( 0 ) { // DEBUG + echo " Start =".date("Y-m-d H:i:s",$aStartTime)."
"; + echo " End =".date("Y-m-d H:i:s",$aEndTime)."
"; + echo "Adj Start =".date("Y-m-d H:i:s",$adjstart)."
"; + echo "Adj End =".date("Y-m-d H:i:s",$adjend)."

"; + echo "Major = $maj s, ".floor($maj/60)."min, ".floor($maj/3600)."h, ".floor($maj/86400)."day
"; + echo "Min = $min s, ".floor($min/60)."min, ".floor($min/3600)."h, ".floor($min/86400)."day
"; + echo "Format=$format

"; + } + */ + + if( $this->iStartTimeAlign !== false && $this->iStartAlign !== false ) { + JpGraphError::RaiseL(3001); +//('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both'); + } + + if( $this->iStartTimeAlign !== false ) { + if( $this->iStartTimeAlign >= 30 ) { + $adjstart = $this->AdjStartTime($aStartTime,$this->iStartTimeAlign-30); + } + elseif( $this->iStartTimeAlign >= 20 ) { + $adjstart = $this->AdjStartTime($aStartTime,false,$this->iStartTimeAlign-20); + } + else { + $adjstart = $this->AdjStartTime($aStartTime,false,false,$this->iStartTimeAlign); + } + } + if( $this->iEndTimeAlign !== false ) { + if( $this->iEndTimeAlign >= 30 ) { + $adjend = $this->AdjEndTime($aEndTime,$this->iEndTimeAlign-30); + } + elseif( $this->iEndTimeAlign >= 20 ) { + $adjend = $this->AdjEndTime($aEndTime,false,$this->iEndTimeAlign-20); + } + else { + $adjend = $this->AdjEndTime($aEndTime,false,false,$this->iEndTimeAlign); + } + } + + + + if( $this->iStartAlign !== false ) { + if( $this->iStartAlign >= 30 ) { + $adjstart = $this->AdjStartDate($aStartTime,$this->iStartAlign-30); + } + elseif( $this->iStartAlign >= 20 ) { + $adjstart = $this->AdjStartDate($aStartTime,false,$this->iStartAlign-20); + } + else { + $adjstart = $this->AdjStartDate($aStartTime,false,false,$this->iStartAlign); + } + } + if( $this->iEndAlign !== false ) { + if( $this->iEndAlign >= 30 ) { + $adjend = $this->AdjEndDate($aEndTime,$this->iEndAlign-30); + } + elseif( $this->iEndAlign >= 20 ) { + $adjend = $this->AdjEndDate($aEndTime,false,$this->iEndAlign-20); + } + else { + $adjend = $this->AdjEndDate($aEndTime,false,false,$this->iEndAlign); + } + } + $this->Update($img,$adjstart,$adjend); + if( ! $this->ticks->IsSpecified() ) + $this->ticks->Set($maj,$min); + if( $this->date_format == '' ) + $this->ticks->SetLabelDateFormat($format); + else + $this->ticks->SetLabelDateFormat($this->date_format); + } +} + + +?> diff --git a/html/includes/jpgraph/src/jpgraph_errhandler.inc.php b/html/includes/jpgraph/src/jpgraph_errhandler.inc.php new file mode 100644 index 0000000000..0afb416a56 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_errhandler.inc.php @@ -0,0 +1,277 @@ +lt = $_jpg_messages; + } + + function Get($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) { + GLOBAL $__jpg_err_locale; + if( !isset($this->lt[$errnbr]) ) { + return 'Internal error: The specified error message ('.$errnbr.') does not exist in the chosen locale ('.$__jpg_err_locale.')'; + } + $ea = $this->lt[$errnbr]; + $j=0; + if( $a1 !== null ) { + $argv[$j++] = $a1; + if( $a2 !== null ) { + $argv[$j++] = $a2; + if( $a3 !== null ) { + $argv[$j++] = $a3; + if( $a4 !== null ) { + $argv[$j++] = $a4; + if( $a5 !== null ) { + $argv[$j++] = $a5; + } + } + } + } + } + $numargs = $j; + if( $ea[1] != $numargs ) { + // Error message argument count do not match. + // Just return the error message without arguments. + return $ea[0]; + } + switch( $numargs ) { + case 1: + $msg = sprintf($ea[0],$argv[0]); + break; + case 2: + $msg = sprintf($ea[0],$argv[0],$argv[1]); + break; + case 3: + $msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2]); + break; + case 4: + $msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2],$argv[3]); + break; + case 5: + $msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2],$argv[3],$argv[4]); + break; + case 0: + default: + $msg = sprintf($ea[0]); + break; + } + return $msg; + } +} + +// +// A wrapper class that is used to access the specified error object +// (to hide the global error parameter and avoid having a GLOBAL directive +// in all methods. +// +class JpGraphError { + function Install($aErrObject) { + GLOBAL $__jpg_err; + $__jpg_err = $aErrObject; + } + function SetErrLocale($aLoc) { + GLOBAL $__jpg_err_locale ; + $__jpg_err_locale = $aLoc; + } + function Raise($aMsg,$aHalt=true){ + GLOBAL $__jpg_err; + $tmp = new $__jpg_err; + $tmp->Raise($aMsg,$aHalt); + } + function RaiseL($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) { + GLOBAL $__jpg_err; + $t = new ErrMsgText(); + $msg = $t->Get($errnbr,$a1,$a2,$a3,$a4,$a5); + $tmp = new $__jpg_err; + $tmp->Raise($msg); + } +} + +// The default trivial text error handler. +class JpGraphErrObject { + + var $iTitle = "JpGraph Error"; + var $iDest = false; + + function JpGraphErrObject() { + // Empty. Reserved for future use + } + + function SetTitle($aTitle) { + $this->iTitle = $aTitle; + } + + function SetStrokeDest($aDest) { + $this->iDest = $aDest; + } + + // If aHalt is true then execution can't continue. Typical used for fatal errors. + function Raise($aMsg,$aHalt=true) { + $aMsg = $this->iTitle.' '.$aMsg."\n"; + if ($this->iDest) { + $f = @fopen($this->iDest,'a'); + if( $f ) { + @fwrite($f,$aMsg); + @fclose($f); + } + } + else { + echo $aMsg; + } + if( $aHalt ) + die(); + } +} + +//============================================================== +// An image based error handler +//============================================================== +class JpGraphErrObjectImg extends JpGraphErrObject { + + function Raise($aMsg,$aHalt=true) { + $img_iconerror = + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAaV'. + 'BMVEX//////2Xy8mLl5V/Z2VvMzFi/v1WyslKlpU+ZmUyMjEh/'. + 'f0VyckJlZT9YWDxMTDjAwMDy8sLl5bnY2K/MzKW/v5yyspKlpY'. + 'iYmH+MjHY/PzV/f2xycmJlZVlZWU9MTEXY2Ms/PzwyMjLFTjea'. + 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'. + 'IAAAsSAdLdfvwAAAAHdElNRQfTBgISOCqusfs5AAABLUlEQVR4'. + '2tWV3XKCMBBGWfkranCIVClKLd/7P2Q3QsgCxjDTq+6FE2cPH+'. + 'xJ0Ogn2lQbsT+Wrs+buAZAV4W5T6Bs0YXBBwpKgEuIu+JERAX6'. + 'wM2rHjmDdEITmsQEEmWADgZm6rAjhXsoMGY9B/NZBwJzBvn+e3'. + 'wHntCAJdGu9SviwIwoZVDxPB9+Rc0TSEbQr0j3SA1gwdSn6Db0'. + '6Tm1KfV6yzWGQO7zdpvyKLKBDmRFjzeB3LYgK7r6A/noDAfjtS'. + 'IXaIzbJSv6WgUebTMV4EoRB8a2mQiQjgtF91HdKDKZ1gtFtQjk'. + 'YcWaR5OKOhkYt+ZsTFdJRfPAApOpQYJTNHvCRSJR6SJngQadfc'. + 'vd69OLMddVOPCGVnmrFD8bVYd3JXfxXPtLR/+mtv59/ALWiiMx'. + 'qL72fwAAAABJRU5ErkJggg==' ; + + if( function_exists("imagetypes") ) + $supported = imagetypes(); + else + $supported = 0; + + if( !function_exists('imagecreatefromstring') ) + $supported = 0; + + if( ob_get_length() || headers_sent() || !($supported & IMG_PNG) ) { + // Special case for headers already sent or that the installation doesn't support + // the PNG format (which the error icon is encoded in). + // Dont return an image since it can't be displayed + die($this->iTitle.' '.$aMsg); + } + + $aMsg = wordwrap($aMsg,55); + $lines = substr_count($aMsg,"\n"); + + // Create the error icon GD + $erricon = Image::CreateFromString(base64_decode($img_iconerror)); + + // Create an image that contains the error text. + $w=400; + $h=100 + 15*max(0,$lines-3); + + $img = new Image($w,$h); + + // Drop shadow + $img->SetColor("gray"); + $img->FilledRectangle(5,5,$w-1,$h-1,10); + $img->SetColor("gray:0.7"); + $img->FilledRectangle(5,5,$w-3,$h-3,10); + + // Window background + $img->SetColor("lightblue"); + $img->FilledRectangle(1,1,$w-5,$h-5); + $img->CopyCanvasH($img->img,$erricon,5,30,0,0,40,40); + + // Window border + $img->SetColor("black"); + $img->Rectangle(1,1,$w-5,$h-5); + $img->Rectangle(0,0,$w-4,$h-4); + + // Window top row + $img->SetColor("darkred"); + for($y=3; $y < 18; $y += 2 ) + $img->Line(1,$y,$w-6,$y); + + // "White shadow" + $img->SetColor("white"); + + // Left window edge + $img->Line(2,2,2,$h-5); + $img->Line(2,2,$w-6,2); + + // "Gray button shadow" + $img->SetColor("darkgray"); + + // Gray window shadow + $img->Line(2,$h-6,$w-5,$h-6); + $img->Line(3,$h-7,$w-5,$h-7); + + // Window title + $m = floor($w/2-5); + $l = 100; + $img->SetColor("lightgray:1.3"); + $img->FilledRectangle($m-$l,2,$m+$l,16); + + // Stroke text + $img->SetColor("darkred"); + $img->SetFont(FF_FONT2,FS_BOLD); + $img->StrokeText($m-50,15,$this->iTitle); + $img->SetColor("black"); + $img->SetFont(FF_FONT1,FS_NORMAL); + $txt = new Text($aMsg,52,25); + $txt->Align("left","top"); + $txt->Stroke($img); + if ($this->iDest) { + $img->Stream($this->iDest); + } else { + $img->Headers(); + $img->Stream(); + } + if( $aHalt ) + die(); + } +} + +// Install the default error handler in a global accessible variable +if( USE_IMAGE_ERROR_HANDLER ) { + $__jpg_err = "JpGraphErrObjectImg"; +} +else { + $__jpg_err = "JpGraphErrObject"; +} + + +?> diff --git a/html/includes/jpgraph/src/jpgraph_error.php b/html/includes/jpgraph/src/jpgraph_error.php new file mode 100644 index 0000000000..098741185a --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_error.php @@ -0,0 +1,156 @@ +Plot($datay,$datax); + $this->numpoints /= 2; + } +//--------------- +// PUBLIC METHODS + + // Gets called before any axis are stroked + function PreStrokeAdjust(&$graph) { + if( $this->center ) { + $a=0.5; $b=0.5; + ++$this->numpoints; + } else { + $a=0; $b=0; + } + $graph->xaxis->scale->ticks->SetXLabelOffset($a); + $graph->SetTextScaleOff($b); + //$graph->xaxis->scale->ticks->SupressMinorTickMarks(); + } + + // Method description + function Stroke(&$img,&$xscale,&$yscale) { + $numpoints=count($this->coords[0])/2; + $img->SetColor($this->color); + $img->SetLineWeight($this->weight); + + if( isset($this->coords[1]) ) { + if( count($this->coords[1])!=$numpoints ) + JpGraphError::RaiseL(2003,count($this->coords[1]),$numpoints); +//("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints"); + else + $exist_x = true; + } + else + $exist_x = false; + + for( $i=0; $i<$numpoints; ++$i) { + if( $exist_x ) + $x=$this->coords[1][$i]; + else + $x=$i; + + if( !is_numeric($x) || + !is_numeric($this->coords[0][$i*2]) || !is_numeric($this->coords[0][$i*2+1]) ) { + continue; + } + + $xt = $xscale->Translate($x); + $yt1 = $yscale->Translate($this->coords[0][$i*2]); + $yt2 = $yscale->Translate($this->coords[0][$i*2+1]); + $img->Line($xt,$yt1,$xt,$yt2); + $img->Line($xt-$this->errwidth,$yt1,$xt+$this->errwidth,$yt1); + $img->Line($xt-$this->errwidth,$yt2,$xt+$this->errwidth,$yt2); + } + return true; + } +} // Class + + +//=================================================== +// CLASS ErrorLinePlot +// Description: Combine a line and error plot +// THIS IS A DEPRECATED PLOT TYPE JUST KEPT FOR +// BACKWARD COMPATIBILITY +//=================================================== +class ErrorLinePlot extends ErrorPlot { + var $line=null; +//--------------- +// CONSTRUCTOR + function ErrorLinePlot(&$datay,$datax=false) { + $this->ErrorPlot($datay,$datax); + // Calculate line coordinates as the average of the error limits + $n = count($datay); + for($i=0; $i < $n; $i+=2 ) { + $ly[]=($datay[$i]+$datay[$i+1])/2; + } + $this->line=new LinePlot($ly,$datax); + } + +//--------------- +// PUBLIC METHODS + function Legend(&$graph) { + if( $this->legend != "" ) + $graph->legend->Add($this->legend,$this->color); + $this->line->Legend($graph); + } + + function Stroke(&$img,&$xscale,&$yscale) { + parent::Stroke($img,$xscale,$yscale); + $this->line->Stroke($img,$xscale,$yscale); + } +} // Class + + +//=================================================== +// CLASS LineErrorPlot +// Description: Combine a line and error plot +//=================================================== +class LineErrorPlot extends ErrorPlot { + var $line=null; +//--------------- +// CONSTRUCTOR + // Data is (val, errdeltamin, errdeltamax) + function LineErrorPlot(&$datay,$datax=false) { + $ly=array(); $ey=array(); + $n = count($datay); + if( $n % 3 != 0 ) { + JpGraphError::RaiseL(4002); +//('Error in input data to LineErrorPlot. Number of data points must be a multiple of 3'); + } + for($i=0; $i < $n; $i+=3 ) { + $ly[]=$datay[$i]; + $ey[]=$datay[$i]+$datay[$i+1]; + $ey[]=$datay[$i]+$datay[$i+2]; + } + $this->ErrorPlot($ey,$datax); + $this->line=new LinePlot($ly,$datax); + } + +//--------------- +// PUBLIC METHODS + function Legend(&$graph) { + if( $this->legend != "" ) + $graph->legend->Add($this->legend,$this->color); + $this->line->Legend($graph); + } + + function Stroke(&$img,&$xscale,&$yscale) { + parent::Stroke($img,$xscale,$yscale); + $this->line->Stroke($img,$xscale,$yscale); + } +} // Class + + +/* EOF */ +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/jpgraph_flags.php b/html/includes/jpgraph/src/jpgraph_flags.php new file mode 100644 index 0000000000..41920d2406 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_flags.php @@ -0,0 +1,376 @@ + 'afgh', + 'Republic of Angola' => 'agla', + 'Republic of Albania' => 'alba', + 'Alderney' => 'alde', + 'Democratic and Popular Republic of Algeria' => 'alge', + 'Territory of American Samoa' => 'amsa', + 'Principality of Andorra' => 'andr', + 'British Overseas Territory of Anguilla' => 'angu', + 'Antarctica' => 'anta', + 'Argentine Republic' => 'arge', + 'League of Arab States' => 'arle', + 'Republic of Armenia' => 'arme', + 'Aruba' => 'arub', + 'Commonwealth of Australia' => 'astl', + 'Republic of Austria' => 'aust', + 'Azerbaijani Republic' => 'azer', + 'Bangladesh' => 'bngl', + 'British Antarctic Territory' => 'bant', + 'Kingdom of Belgium' => 'belg', + 'British Overseas Territory of Bermuda' => 'berm', + 'Commonwealth of the Bahamas' => 'bhms', + 'Kingdom of Bahrain' => 'bhrn', + 'Republic of Belarus' => 'blru', + 'Republic of Bolivia' => 'blva', + 'Belize' => 'blze', + 'Republic of Benin' => 'bnin', + 'Republic of Botswana' => 'bots', + 'Federative Republic of Brazil' => 'braz', + 'Barbados' => 'brbd', + 'British Indian Ocean Territory' => 'brin', + 'Brunei Darussalam' => 'brun', + 'Republic of Burkina' => 'bufa', + 'Republic of Bulgaria' => 'bulg', + 'Republic of Burundi' => 'buru', + 'Overseas Territory of the British Virgin Islands' => 'bvis', + 'Central African Republic' => 'cafr', + 'Kingdom of Cambodia' => 'camb', + 'Republic of Cameroon' => 'came', + 'Dominion of Canada' => 'cana', + 'Caribbean Community' => 'cari', + 'Republic of Cape Verde' => 'cave', + 'Republic of Chad' => 'chad', + 'Republic of Chile' => 'chil', + 'Peoples Republic of China' => 'chin', + 'Territory of Christmas Island' => 'chms', + 'Commonwealth of Independent States' => 'cins', + 'Cook Islands' => 'ckis', + 'Republic of Colombia' => 'clmb', + 'Territory of Cocos Islands' => 'cois', + 'Commonwealth' => 'comn', + 'Union of the Comoros' => 'como', + 'Republic of the Congo' => 'cong', + 'Republic of Costa Rica' => 'corc', + 'Republic of Croatia' => 'croa', + 'Republic of Cuba' => 'cuba', + 'British Overseas Territory of the Cayman Islands' => 'cyis', + 'Republic of Cyprus' => 'cypr', + 'The Czech Republic' => 'czec', + 'Kingdom of Denmark' => 'denm', + 'Republic of Djibouti' => 'djib', + 'Commonwealth of Dominica' => 'domn', + 'Dominican Republic' => 'dore', + 'Republic of Ecuador' => 'ecua', + 'Arab Republic of Egypt' => 'egyp', + 'Republic of El Salvador' => 'elsa', + 'England' => 'engl', + 'Republic of Equatorial Guinea' => 'eqgu', + 'State of Eritrea' => 'erit', + 'Republic of Estonia' => 'estn', + 'Ethiopia' => 'ethp', + 'European Union' => 'euun', + 'British Overseas Territory of the Falkland Islands' => 'fais', + 'International Federation of Vexillological Associations' => 'fiav', + 'Republic of Fiji' => 'fiji', + 'Republic of Finland' => 'finl', + 'Territory of French Polynesia' => 'fpol', + 'French Republic' => 'fran', + 'Overseas Department of French Guiana' => 'frgu', + 'Gabonese Republic' => 'gabn', + 'Republic of the Gambia' => 'gamb', + 'Republic of Georgia' => 'geor', + 'Federal Republic of Germany' => 'germ', + 'Republic of Ghana' => 'ghan', + 'Gibraltar' => 'gibr', + 'Hellenic Republic' => 'grec', + 'State of Grenada' => 'gren', + 'Overseas Department of Guadeloupe' => 'guad', + 'Territory of Guam' => 'guam', + 'Republic of Guatemala' => 'guat', + 'The Bailiwick of Guernsey' => 'guer', + 'Republic of Guinea' => 'guin', + 'Republic of Haiti' => 'hait', + 'Hong Kong Special Administrative Region' => 'hokn', + 'Republic of Honduras' => 'hond', + 'Republic of Hungary' => 'hung', + 'Republic of Iceland' => 'icel', + 'International Committee of the Red Cross' => 'icrc', + 'Republic of India' => 'inda', + 'Republic of Indonesia' => 'indn', + 'Republic of Iraq' => 'iraq', + 'Republic of Ireland' => 'irel', + 'Organization of the Islamic Conference' => 'isco', + 'Isle of Man' => 'isma', + 'State of Israel' => 'isra', + 'Italian Republic' => 'ital', + 'Jamaica' => 'jama', + 'Japan' => 'japa', + 'The Bailiwick of Jersey' => 'jers', + 'Hashemite Kingdom of Jordan' => 'jord', + 'Republic of Kazakhstan' => 'kazk', + 'Republic of Kenya' => 'keny', + 'Republic of Kiribati' => 'kirb', + 'State of Kuwait' => 'kuwa', + 'Kyrgyz Republic' => 'kyrg', + 'Republic of Latvia' => 'latv', + 'Lebanese Republic' => 'leba', + 'Kingdom of Lesotho' => 'lest', + 'Republic of Liberia' => 'libe', + 'Principality of Liechtenstein' => 'liec', + 'Republic of Lithuania' => 'lith', + 'Grand Duchy of Luxembourg' => 'luxe', + 'Macao Special Administrative Region' => 'maca', + 'Republic of Macedonia' => 'mace', + 'Republic of Madagascar' => 'mada', + 'Republic of the Marshall Islands' => 'mais', + 'Republic of Mali' => 'mali', + 'Federation of Malaysia' => 'mals', + 'Republic of Malta' => 'malt', + 'Republic of Malawi' => 'malw', + 'Overseas Department of Martinique' => 'mart', + 'Islamic Republic of Mauritania' => 'maur', + 'Territorial Collectivity of Mayotte' => 'mayt', + 'United Mexican States' => 'mexc', + 'Federated States of Micronesia' => 'micr', + 'Midway Islands' => 'miis', + 'Republic of Moldova' => 'mold', + 'Principality of Monaco' => 'mona', + 'Republic of Mongolia' => 'mong', + 'British Overseas Territory of Montserrat' => 'mont', + 'Kingdom of Morocco' => 'morc', + 'Republic of Mozambique' => 'moza', + 'Republic of Mauritius' => 'mrts', + 'Union of Myanmar' => 'myan', + 'Republic of Namibia' => 'namb', + 'North Atlantic Treaty Organization' => 'nato', + 'Republic of Nauru' => 'naur', + 'Turkish Republic of Northern Cyprus' => 'ncyp', + 'Netherlands Antilles' => 'nean', + 'Kingdom of Nepal' => 'nepa', + 'Kingdom of the Netherlands' => 'neth', + 'Territory of Norfolk Island' => 'nfis', + 'Federal Republic of Nigeria' => 'ngra', + 'Republic of Nicaragua' => 'nica', + 'Republic of Niger' => 'nigr', + 'Niue' => 'niue', + 'Commonwealth of the Northern Mariana Islands' => 'nmar', + 'Province of Northern Ireland' => 'noir', + 'Nordic Council' => 'nord', + 'Kingdom of Norway' => 'norw', + 'Territory of New Caledonia and Dependencies' => 'nwca', + 'New Zealand' => 'nwze', + 'Organization of American States' => 'oast', + 'Organization of African Unity' => 'oaun', + 'International Olympic Committee' => 'olym', + 'Sultanate of Oman' => 'oman', + 'Islamic Republic of Pakistan' => 'paks', + 'Republic of Palau' => 'pala', + 'Independent State of Papua New Guinea' => 'pang', + 'Republic of Paraguay' => 'para', + 'Republic of Peru' => 'peru', + 'Republic of the Philippines' => 'phil', + 'British Overseas Territory of the Pitcairn Islands' => 'piis', + 'Republic of Poland' => 'pola', + 'Republic of Portugal' => 'port', + 'Commonwealth of Puerto Rico' => 'purc', + 'State of Qatar' => 'qata', + 'Russian Federation' => 'russ', + 'Romania' => 'rmna', + 'Republic of Rwanda' => 'rwan', + 'Kingdom of Saudi Arabia' => 'saar', + 'Republic of San Marino' => 'sama', + 'Nordic Sami Conference' => 'sami', + 'Sark' => 'sark', + 'Scotland' => 'scot', + 'Principality of Seborga' => 'sebo', + 'Republic of Serbia' => 'serb', + 'Republic of Sierra Leone' => 'sile', + 'Republic of Singapore' => 'sing', + 'Republic of Korea' => 'skor', + 'Republic of Slovenia' => 'slva', + 'Somali Republic' => 'smla', + 'Republic of Somaliland' => 'smld', + 'Republic of South Africa' => 'soaf', + 'Solomon Islands' => 'sois', + 'Kingdom of Spain' => 'span', + 'Secretariat of the Pacific Community' => 'spco', + 'Democratic Socialist Republic of Sri Lanka' => 'srla', + 'Saint Lucia' => 'stlu', + 'Republic of the Sudan' => 'suda', + 'Republic of Suriname' => 'surn', + 'Slovak Republic' => 'svka', + 'Kingdom of Sweden' => 'swdn', + 'Swiss Confederation' => 'swit', + 'Syrian Arab Republic' => 'syra', + 'Kingdom of Swaziland' => 'szld', + 'Republic of China' => 'taiw', + 'Taiwan' => 'taiw', + 'Republic of Tajikistan' => 'tajk', + 'United Republic of Tanzania' => 'tanz', + 'Kingdom of Thailand' => 'thal', + 'Autonomous Region of Tibet' => 'tibe', + 'Turkmenistan' => 'tkst', + 'Togolese Republic' => 'togo', + 'Tokelau' => 'toke', + 'Kingdom of Tonga' => 'tong', + 'Tristan da Cunha' => 'trdc', + 'Tromelin' => 'tris', + 'Republic of Tunisia' => 'tuns', + 'Republic of Turkey' => 'turk', + 'Tuvalu' => 'tuva', + 'United Arab Emirates' => 'uaem', + 'Republic of Uganda' => 'ugan', + 'Ukraine' => 'ukrn', + 'United Kingdom of Great Britain' => 'unkg', + 'United Nations' => 'unna', + 'United States of America' => 'unst', + 'Oriental Republic of Uruguay' => 'urgy', + 'Virgin Islands of the United States' => 'usvs', + 'Republic of Uzbekistan' => 'uzbk', + 'State of the Vatican City' => 'vacy', + 'Republic of Vanuatu' => 'vant', + 'Bolivarian Republic of Venezuela' => 'venz', + 'Republic of Yemen' => 'yemn', + 'Democratic Republic of Congo' => 'zare', + 'Republic of Zimbabwe' => 'zbwe' ) ; + + + var $iFlagCount = -1; + var $iFlagSetMap = array( + FLAGSIZE1 => 'flags_thumb35x35', + FLAGSIZE2 => 'flags_thumb60x60', + FLAGSIZE3 => 'flags_thumb100x100', + FLAGSIZE4 => 'flags' + ); + + var $iFlagData ; + var $iOrdIdx=array(); + + function FlagImages($aSize=FLAGSIZE1) { + switch($aSize) { + case FLAGSIZE1 : + case FLAGSIZE2 : + case FLAGSIZE3 : + case FLAGSIZE4 : + $file = dirname(__FILE__).'/'.$this->iFlagSetMap[$aSize].'.dat'; + $fp = fopen($file,'rb'); + $rawdata = fread($fp,filesize($file)); + $this->iFlagData = unserialize($rawdata); + break; + default: + JpGraphError::RaiseL(5001,$aSize); +//('Unknown flag size. ('.$aSize.')'); + } + $this->iFlagCount = count($this->iCountryNameMap); + } + + function GetNum() { + return $this->iFlagCount; + } + + function GetImgByName($aName,&$outFullName) { + $idx = $this->GetIdxByName($aName,$outFullName); + return $this->GetImgByIdx($idx); + } + + function GetImgByIdx($aIdx) { + if( array_key_exists($aIdx,$this->iFlagData) ) { + $d = $this->iFlagData[$aIdx][1]; + return Image::CreateFromString($d); + } + else { + JpGraphError::RaiseL(5002,$aIdx); +//("Flag index \" $aIdx\" does not exist."); + } + } + + function GetIdxByOrdinal($aOrd,&$outFullName) { + $aOrd--; + $n = count($this->iOrdIdx); + if( $n == 0 ) { + reset($this->iCountryNameMap); + $this->iOrdIdx=array(); + $i=0; + while( list($key,$val) = each($this->iCountryNameMap) ) { + $this->iOrdIdx[$i++] = array($val,$key); + } + $tmp=$this->iOrdIdx[$aOrd]; + $outFullName = $tmp[1]; + return $tmp[0]; + + } + elseif( $aOrd >= 0 && $aOrd < $n ) { + $tmp=$this->iOrdIdx[$aOrd]; + $outFullName = $tmp[1]; + return $tmp[0]; + } + else { + JpGraphError::RaiseL(5003,$aOrd); +//('Invalid ordinal number specified for flag index.'); + } + } + + function GetIdxByName($aName,&$outFullName) { + + if( is_integer($aName) ) { + $idx = $this->GetIdxByOrdinal($aName,$outFullName); + return $idx; + } + + $found=false; + $aName = strtolower($aName); + $nlen = strlen($aName); + reset($this->iCountryNameMap); + // Start by trying to match exact index name + while( list($key,$val) = each($this->iCountryNameMap) ) { + if( $nlen == strlen($val) && $val == $aName ) { + $found=true; + break; + } + } + if( !$found ) { + reset($this->iCountryNameMap); + // If the exact index doesn't work try a (partial) full name + while( list($key,$val) = each($this->iCountryNameMap) ) { + if( strpos(strtolower($key), $aName) !== false ) { + $found=true; + break; + } + } + } + if( $found ) { + $outFullName = $key; + return $val; + } + else { + JpGraphError::RaiseL(5004,$aName); +//("The (partial) country name \"$aName\" does not have a cooresponding flag image. The flag may still exist but under another name, e.g. insted of \"usa\" try \"united states\"."); + } + } +} + + + + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/jpgraph_gantt.php b/html/includes/jpgraph/src/jpgraph_gantt.php new file mode 100644 index 0000000000..0fd6551076 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_gantt.php @@ -0,0 +1,3808 @@ +vgrid = new LineProperty(); + } + + function Hide($aF=true) { + $this->iShow=!$aF; + } + + function Show($aF=true) { + $this->iShow=$aF; + } + + // Specify font + function SetFont($aFFamily,$aFStyle=FS_NORMAL,$aFSize=10) { + $this->iFFamily = $aFFamily; + $this->iFStyle = $aFStyle; + $this->iFSize = $aFSize; + } + + function SetStyle($aStyle) { + $this->iStyle = $aStyle; + } + + function SetColumnMargin($aLeft,$aRight) { + $this->iLeftColMargin = $aLeft; + $this->iRightColMargin = $aRight; + } + + function SetFontColor($aFontColor) { + $this->iFontColor = $aFontColor; + } + + function SetColor($aColor) { + $this->iColor = $aColor; + } + + function SetBackgroundColor($aColor) { + $this->iBackgroundColor = $aColor; + } + + function SetColTitles($aTitles,$aWidth=null) { + $this->iTitles = $aTitles; + $this->iWidth = $aWidth; + } + + function SetMinColWidth($aWidths) { + $n = min(count($this->iTitles),count($aWidths)); + for($i=0; $i < $n; ++$i ) { + if( !empty($aWidths[$i]) ) { + if( empty($this->iWidth[$i]) ) { + $this->iWidth[$i] = $aWidths[$i]; + } + else { + $this->iWidth[$i] = max($this->iWidth[$i],$aWidths[$i]); + } + } + } + } + + function GetWidth(&$aImg) { + $txt = new TextProperty(); + $txt->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); + $n = count($this->iTitles) ; + $rm=$this->iRightColMargin; + $w = 0; + for($h=0, $i=0; $i < $n; ++$i ) { + $w += $this->iLeftColMargin; + $txt->Set($this->iTitles[$i]); + if( !empty($this->iWidth[$i]) ) { + $w1 = max($txt->GetWidth($aImg)+$rm,$this->iWidth[$i]); + } + else { + $w1 = $txt->GetWidth($aImg)+$rm; + } + $this->iWidth[$i] = $w1; + $w += $w1; + $h = max($h,$txt->GetHeight($aImg)); + } + $this->iHeight = $h+$this->iTopHeaderMargin; + $txt=''; + return $w; + } + + function GetColStart(&$aImg,&$ioStart,$aAddLeftMargin=false) { + $n = count($this->iTitles) ; + $adj = $aAddLeftMargin ? $this->iLeftColMargin : 0; + $ioStart=array($aImg->left_margin+$adj); + for( $i=1; $i < $n; ++$i ) { + $ioStart[$i] = $ioStart[$i-1]+$this->iLeftColMargin+$this->iWidth[$i-1]; + } + } + + // Adjust headers left, right or centered + function SetHeaderAlign($aAlign) { + $this->iHeaderAlign=$aAlign; + } + + function Stroke(&$aImg,$aXLeft,$aYTop,$aXRight,$aYBottom,$aUseTextHeight=false) { + + if( !$this->iShow ) return; + + $txt = new TextProperty(); + $txt->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); + $txt->SetColor($this->iFontColor); + $txt->SetAlign($this->iHeaderAlign,'top'); + $n=count($this->iTitles); + + if( $n == 0 ) + return; + + $x = $aXLeft; + $h = $this->iHeight; + $yTop = $aUseTextHeight ? $aYBottom-$h-$this->iTopColMargin-$this->iBottomColMargin : $aYTop ; + + if( $h < 0 ) { + JpGraphError::RaiseL(6001); +//('Internal error. Height for ActivityTitles is < 0'); + } + + $aImg->SetLineWeight(1); + // Set background color + $aImg->SetColor($this->iBackgroundColor); + $aImg->FilledRectangle($aXLeft,$yTop,$aXRight,$aYBottom-1); + + if( $this->iStyle == 1 ) { + // Make a 3D effect + $aImg->SetColor('white'); + $aImg->Line($aXLeft,$yTop+1, + $aXRight,$yTop+1); + } + + for($i=0; $i < $n; ++$i ) { + if( $this->iStyle == 1 ) { + // Make a 3D effect + $aImg->SetColor('white'); + $aImg->Line($x+1,$yTop,$x+1,$aYBottom); + } + $x += $this->iLeftColMargin; + $txt->Set($this->iTitles[$i]); + + // Adjust the text anchor position according to the choosen alignment + $xp = $x; + if( $this->iHeaderAlign == 'center' ) { + $xp = (($x-$this->iLeftColMargin)+($x+$this->iWidth[$i]))/2; + } + elseif( $this->iHeaderAlign == 'right' ) { + $xp = $x +$this->iWidth[$i]-$this->iRightColMargin; + } + + $txt->Stroke($aImg,$xp,$yTop+$this->iTopHeaderMargin); + $x += $this->iWidth[$i]; + if( $i < $n-1 ) { + $aImg->SetColor($this->iColor); + $aImg->Line($x,$yTop,$x,$aYBottom); + } + } + + $aImg->SetColor($this->iColor); + $aImg->Line($aXLeft,$yTop, $aXRight,$yTop); + + // Stroke vertical column dividers + $cols=array(); + $this->GetColStart($aImg,$cols); + $n=count($cols); + for( $i=1; $i < $n; ++$i ) { + $this->vgrid->Stroke($aImg,$cols[$i],$aYBottom,$cols[$i], + $aImg->height - $aImg->bottom_margin); + } + } +} + + +//=================================================== +// CLASS GanttGraph +// Description: Main class to handle gantt graphs +//=================================================== +class GanttGraph extends Graph { + var $scale; // Public accessible + var $iObj=array(); // Gantt objects + var $iLabelHMarginFactor=0.2; // 10% margin on each side of the labels + var $iLabelVMarginFactor=0.4; // 40% margin on top and bottom of label + var $iLayout=GANTT_FROMTOP; // Could also be GANTT_EVEN + var $iSimpleFont = FF_FONT1,$iSimpleFontSize=11; + var $iSimpleStyle=GANTT_RDIAG,$iSimpleColor='yellow',$iSimpleBkgColor='red'; + var $iSimpleProgressBkgColor='gray',$iSimpleProgressColor='darkgreen'; + var $iSimpleProgressStyle=GANTT_SOLID; + var $hgrid=null; +//--------------- +// CONSTRUCTOR + // Create a new gantt graph + function GanttGraph($aWidth=0,$aHeight=0,$aCachedName="",$aTimeOut=0,$aInline=true) { + + // Backward compatibility + if( $aWidth == -1 ) $aWidth=0; + if( $aHeight == -1 ) $aHeight=0; + + if( $aWidth< 0 || $aHeight < 0 ) { + JpgraphError::RaiseL(6002); +//("You can't specify negative sizes for Gantt graph dimensions. Use 0 to indicate that you want the library to automatically determine a dimension."); + } + Graph::Graph($aWidth,$aHeight,$aCachedName,$aTimeOut,$aInline); + $this->scale = new GanttScale($this->img); + + // Default margins + $this->img->SetMargin(15,17,25,15); + + $this->hgrid = new HorizontalGridLine(); + + $this->scale->ShowHeaders(GANTT_HWEEK|GANTT_HDAY); + $this->SetBox(); + } + +//--------------- +// PUBLIC METHODS + + // + + function SetSimpleFont($aFont,$aSize) { + $this->iSimpleFont = $aFont; + $this->iSimpleFontSize = $aSize; + } + + function SetSimpleStyle($aBand,$aColor,$aBkgColor) { + $this->iSimpleStyle = $aBand; + $this->iSimpleColor = $aColor; + $this->iSimpleBkgColor = $aBkgColor; + } + + // A utility function to help create basic Gantt charts + function CreateSimple($data,$constrains=array(),$progress=array()) { + $num = count($data); + for( $i=0; $i < $num; ++$i) { + switch( $data[$i][1] ) { + case ACTYPE_GROUP: + // Create a slightly smaller height bar since the + // "wings" at the end will make it look taller + $a = new GanttBar($data[$i][0],$data[$i][2],$data[$i][3],$data[$i][4],'',8); + $a->title->SetFont($this->iSimpleFont,FS_BOLD,$this->iSimpleFontSize); + $a->rightMark->Show(); + $a->rightMark->SetType(MARK_RIGHTTRIANGLE); + $a->rightMark->SetWidth(8); + $a->rightMark->SetColor('black'); + $a->rightMark->SetFillColor('black'); + + $a->leftMark->Show(); + $a->leftMark->SetType(MARK_LEFTTRIANGLE); + $a->leftMark->SetWidth(8); + $a->leftMark->SetColor('black'); + $a->leftMark->SetFillColor('black'); + + $a->SetPattern(BAND_SOLID,'black'); + $csimpos = 6; + break; + + case ACTYPE_NORMAL: + $a = new GanttBar($data[$i][0],$data[$i][2],$data[$i][3],$data[$i][4],'',10); + $a->title->SetFont($this->iSimpleFont,FS_NORMAL,$this->iSimpleFontSize); + $a->SetPattern($this->iSimpleStyle,$this->iSimpleColor); + $a->SetFillColor($this->iSimpleBkgColor); + // Check if this activity should have a constrain line + $n = count($constrains); + for( $j=0; $j < $n; ++$j ) { + if( empty($constrains[$j]) || (count($constrains[$j]) != 3) ) { + JpGraphError::RaiseL(6003,$j); +//("Invalid format for Constrain parameter at index=$j in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Constrain-To,Constrain-Type)"); + } + if( $constrains[$j][0]==$data[$i][0] ) { + $a->SetConstrain($constrains[$j][1],$constrains[$j][2],'black',ARROW_S2,ARROWT_SOLID); + } + } + + // Check if this activity have a progress bar + $n = count($progress); + for( $j=0; $j < $n; ++$j ) { + + if( empty($progress[$j]) || (count($progress[$j]) != 2) ) { + JpGraphError::RaiseL(6004,$j); +//("Invalid format for Progress parameter at index=$j in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Progress)"); + } + if( $progress[$j][0]==$data[$i][0] ) { + $a->progress->Set($progress[$j][1]); + $a->progress->SetHeight(0.5); + $a->progress->SetPattern($this->iSimpleProgressStyle, + $this->iSimpleProgressColor); + $a->progress->SetFillColor($this->iSimpleProgressBkgColor); + //$a->progress->SetPattern($progress[$j][2],$progress[$j][3]); + break; + } + } + $csimpos = 6; + break; + + case ACTYPE_MILESTONE: + $a = new MileStone($data[$i][0],$data[$i][2],$data[$i][3]); + $a->title->SetFont($this->iSimpleFont,FS_NORMAL,$this->iSimpleFontSize); + $a->caption->SetFont($this->iSimpleFont,FS_NORMAL,$this->iSimpleFontSize); + $csimpos = 5; + break; + default: + die('Unknown activity type'); + break; + } + + // Setup caption + $a->caption->Set($data[$i][$csimpos-1]); + + // Check if this activity should have a CSIM target ? + if( !empty($data[$i][$csimpos]) ) { + $a->SetCSIMTarget($data[$i][$csimpos]); + $a->SetCSIMAlt($data[$i][$csimpos+1]); + } + if( !empty($data[$i][$csimpos+2]) ) { + $a->title->SetCSIMTarget($data[$i][$csimpos+2]); + $a->title->SetCSIMAlt($data[$i][$csimpos+3]); + } + + $this->Add($a); + } + } + + + // Set what headers should be shown + function ShowHeaders($aFlg) { + $this->scale->ShowHeaders($aFlg); + } + + // Specify the fraction of the font height that should be added + // as vertical margin + function SetLabelVMarginFactor($aVal) { + $this->iLabelVMarginFactor = $aVal; + } + + // Synonym to the method above + function SetVMarginFactor($aVal) { + $this->iLabelVMarginFactor = $aVal; + } + + + // Add a new Gantt object + function Add($aObject) { + if( is_array($aObject) && count($aObject) > 0 ) { + $cl = $aObject[0]; + if( is_a($cl,'IconPlot') ) { + $this->AddIcon($aObject); + } + else { + $n = count($aObject); + for($i=0; $i < $n; ++$i) + $this->iObj[] = $aObject[$i]; + } + } + else { + if( is_a($aObject,'IconPlot') ) { + $this->AddIcon($aObject); + } + else { + $this->iObj[] = $aObject; + } + } + } + + // Override inherit method from Graph and give a warning message + function SetScale() { + JpGraphError::RaiseL(6005); +//("SetScale() is not meaningfull with Gantt charts."); + } + + // Specify the date range for Gantt graphs (if this is not set it will be + // automtically determined from the input data) + function SetDateRange($aStart,$aEnd) { + // Adjust the start and end so that the indicate the + // begining and end of respective start and end days + if( strpos($aStart,':') === false ) + $aStart = date('Y-m-d 00:00',strtotime($aStart)); + if( strpos($aEnd,':') === false ) + $aEnd = date('Y-m-d 23:59',strtotime($aEnd)); + $this->scale->SetRange($aStart,$aEnd); + } + + // Get the maximum width of the activity titles columns for the bars + // The name is lightly misleading since we from now on can have + // multiple columns in the label section. When this was first written + // it only supported a single label, hence the name. + function GetMaxLabelWidth() { + $m=50; + if( $this->iObj != null ) { + $marg = $this->scale->actinfo->iLeftColMargin+$this->scale->actinfo->iRightColMargin; + $m = $this->iObj[0]->title->GetWidth($this->img)+$marg; + $n = count($this->iObj); + for($i=1; $i < $n; ++$i) { + if( !empty($this->iObj[$i]->title) ) { + if( $this->iObj[$i]->title->HasTabs() ) { + list($tot,$w) = $this->iObj[$i]->title->GetWidth($this->img,true); + $m=max($m,$tot); + } + else + $m=max($m,$this->iObj[$i]->title->GetWidth($this->img)); + } + } + } + return $m; + } + + // Get the maximum height of the titles for the bars + function GetMaxLabelHeight() { + $m=0; + if( $this->iObj != null ) { + $m = $this->iObj[0]->title->GetHeight($this->img); + $n = count($this->iObj); + for($i=1; $i < $n; ++$i) { + if( !empty($this->iObj[$i]->title) ) { + $m=max($m,$this->iObj[$i]->title->GetHeight($this->img)); + } + } + } + return $m; + } + + function GetMaxBarAbsHeight() { + $m=0; + if( $this->iObj != null ) { + $m = $this->iObj[0]->GetAbsHeight($this->img); + $n = count($this->iObj); + for($i=1; $i < $n; ++$i) { + $m=max($m,$this->iObj[$i]->GetAbsHeight($this->img)); + } + } + return $m; + } + + // Get the maximum used line number (vertical position) for bars + function GetBarMaxLineNumber() { + $m=0; + if( $this->iObj != null ) { + $m = $this->iObj[0]->GetLineNbr(); + $n = count($this->iObj); + for($i=1; $i < $n; ++$i) { + $m=max($m,$this->iObj[$i]->GetLineNbr()); + } + } + return $m; + } + + // Get the minumum and maximum used dates for all bars + function GetBarMinMax() { + $start = 0 ; + $n = count($this->iObj); + + while( $start < $n && $this->iObj[$start]->GetMaxDate() === false ) + ++$start; + if( $start >= $n ) { + JpgraphError::RaiseL(6006); +//('Cannot autoscale Gantt chart. No dated activities exist. [GetBarMinMax() start >= n]'); + } + + $max=$this->scale->NormalizeDate($this->iObj[$start]->GetMaxDate()); + $min=$this->scale->NormalizeDate($this->iObj[$start]->GetMinDate()); + + for($i=$start+1; $i < $n; ++$i) { + $rmax = $this->scale->NormalizeDate($this->iObj[$i]->GetMaxDate()); + if( $rmax != false ) + $max=Max($max,$rmax); + $rmin = $this->scale->NormalizeDate($this->iObj[$i]->GetMinDate()); + if( $rmin != false ) + $min=Min($min,$rmin); + } + $minDate = date("Y-m-d",$min); + $min = strtotime($minDate); + $maxDate = date("Y-m-d 23:59",$max); + $max = strtotime($maxDate); + return array($min,$max); + } + + // Create a new auto sized canvas if the user hasn't specified a size + // The size is determined by what scale the user has choosen and hence + // the minimum width needed to display the headers. Some margins are + // also added to make it better looking. + function AutoSize() { + if( $this->img->img == null ) { + // The predefined left, right, top, bottom margins. + // Note that the top margin might incease depending on + // the title. + $lm = $this->img->left_margin; + $rm = $this->img->right_margin; + $rm += 2 ; + $tm = $this->img->top_margin; + $bm = $this->img->bottom_margin; + $bm += 1; + if( BRAND_TIMING ) $bm += 10; + + // First find out the height + $n=$this->GetBarMaxLineNumber()+1; + $m=max($this->GetMaxLabelHeight(),$this->GetMaxBarAbsHeight()); + $height=$n*((1+$this->iLabelVMarginFactor)*$m); + + // Add the height of the scale titles + $h=$this->scale->GetHeaderHeight(); + $height += $h; + + // Calculate the top margin needed for title and subtitle + if( $this->title->t != "" ) { + $tm += $this->title->GetFontHeight($this->img); + } + if( $this->subtitle->t != "" ) { + $tm += $this->subtitle->GetFontHeight($this->img); + } + + // ...and then take the bottom and top plot margins into account + $height += $tm + $bm + $this->scale->iTopPlotMargin + $this->scale->iBottomPlotMargin; + // Now find the minimum width for the chart required + + // If day scale or smaller is shown then we use the day font width + // as the base size unit. + // If only weeks or above is displayed we use a modified unit to + // get a smaller image. + if( $this->scale->IsDisplayHour() || $this->scale->IsDisplayMinute() ) { + // Add 2 pixel margin on each side + $fw=$this->scale->day->GetFontWidth($this->img)+4; + } + elseif( $this->scale->IsDisplayWeek() ) { + $fw = 8; + } + elseif( $this->scale->IsDisplayMonth() ) { + $fw = 4; + } + else { + $fw = 2; + } + + $nd=$this->scale->GetNumberOfDays(); + + if( $this->scale->IsDisplayDay() ) { + // If the days are displayed we also need to figure out + // how much space each day's title will require. + switch( $this->scale->day->iStyle ) { + case DAYSTYLE_LONG : + $txt = "Monday"; + break; + case DAYSTYLE_LONGDAYDATE1 : + $txt = "Monday 23 Jun"; + break; + case DAYSTYLE_LONGDAYDATE2 : + $txt = "Monday 23 Jun 2003"; + break; + case DAYSTYLE_SHORT : + $txt = "Mon"; + break; + case DAYSTYLE_SHORTDAYDATE1 : + $txt = "Mon 23/6"; + break; + case DAYSTYLE_SHORTDAYDATE2 : + $txt = "Mon 23 Jun"; + break; + case DAYSTYLE_SHORTDAYDATE3 : + $txt = "Mon 23"; + break; + case DAYSTYLE_SHORTDATE1 : + $txt = "23/6"; + break; + case DAYSTYLE_SHORTDATE2 : + $txt = "23 Jun"; + break; + case DAYSTYLE_SHORTDATE3 : + $txt = "Mon 23"; + break; + case DAYSTYLE_SHORTDATE4 : + $txt = "88"; + break; + case DAYSTYLE_CUSTOM : + $txt = date($this->scale->day->iLabelFormStr, + strtotime('2003-12-20 18:00')); + break; + case DAYSTYLE_ONELETTER : + default: + $txt = "M"; + break; + } + $fw = $this->scale->day->GetStrWidth($this->img,$txt)+6; + } + + // If we have hours enabled we must make sure that each day has enough + // space to fit the number of hours to be displayed. + if( $this->scale->IsDisplayHour() ) { + // Depending on what format the user has choose we need different amount + // of space. We therefore create a typical string for the choosen format + // and determine the length of that string. + switch( $this->scale->hour->iStyle ) { + case HOURSTYLE_HMAMPM: + $txt = '12:00pm'; + break; + case HOURSTYLE_H24: + // 13 + $txt = '24'; + break; + case HOURSTYLE_HAMPM: + $txt = '12pm'; + break; + case HOURSTYLE_CUSTOM: + $txt = date($this->scale->hour->iLabelFormStr,strtotime('2003-12-20 18:00')); + break; + case HOURSTYLE_HM24: + default: + $txt = '24:00'; + break; + } + + $hfw = $this->scale->hour->GetStrWidth($this->img,$txt)+6; + $mw = $hfw; + if( $this->scale->IsDisplayMinute() ) { + // Depending on what format the user has choose we need different amount + // of space. We therefore create a typical string for the choosen format + // and determine the length of that string. + switch( $this->scale->minute->iStyle ) { + case HOURSTYLE_CUSTOM: + $txt2 = date($this->scale->minute->iLabelFormStr,strtotime('2005-05-15 18:55')); + break; + case MINUTESTYLE_MM: + default: + $txt2 = '15'; + break; + } + + $mfw = $this->scale->minute->GetStrWidth($this->img,$txt2)+6; + $n2 = ceil(60 / $this->scale->minute->GetIntervall() ); + $mw = $n2 * $mfw; + } + $hfw = $hfw < $mw ? $mw : $hfw ; + $n = ceil(24*60 / $this->scale->TimeToMinutes($this->scale->hour->GetIntervall()) ); + $hw = $n * $hfw; + $fw = $fw < $hw ? $hw : $fw ; + } + + // We need to repeat this code block here as well. + // THIS iS NOT A MISTAKE ! + // We really need it since we need to adjust for minutes both in the case + // where hour scale is shown and when it is not shown. + + if( $this->scale->IsDisplayMinute() ) { + // Depending on what format the user has choose we need different amount + // of space. We therefore create a typical string for the choosen format + // and determine the length of that string. + switch( $this->scale->minute->iStyle ) { + case HOURSTYLE_CUSTOM: + $txt = date($this->scale->minute->iLabelFormStr,strtotime('2005-05-15 18:55')); + break; + case MINUTESTYLE_MM: + default: + $txt = '15'; + break; + } + + $mfw = $this->scale->minute->GetStrWidth($this->img,$txt)+6; + $n = ceil(60 / $this->scale->TimeToMinutes($this->scale->minute->GetIntervall()) ); + $mw = $n * $mfw; + $fw = $fw < $mw ? $mw : $fw ; + } + + // If we display week we must make sure that 7*$fw is enough + // to fit up to 10 characters of the week font (if the week is enabled) + if( $this->scale->IsDisplayWeek() ) { + // Depending on what format the user has choose we need different amount + // of space + $fsw = strlen($this->scale->week->iLabelFormStr); + if( $this->scale->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR ) { + $fsw += 8; + } + elseif( $this->scale->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR ) { + $fsw += 7; + } + else { + $fsw += 4; + } + + $ww = $fsw*$this->scale->week->GetFontWidth($this->img); + if( 7*$fw < $ww ) { + $fw = ceil($ww/7); + } + } + + if( !$this->scale->IsDisplayDay() && !$this->scale->IsDisplayHour() && + !( ($this->scale->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR || + $this->scale->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR) && $this->scale->IsDisplayWeek() ) ) { + // If we don't display the individual days we can shrink the + // scale a little bit. This is a little bit pragmatic at the + // moment and should be re-written to take into account + // a) What scales exactly are shown and + // b) what format do they use so we know how wide we need to + // make each scale text space at minimum. + $fw /= 2; + if( !$this->scale->IsDisplayWeek() ) { + $fw /= 1.8; + } + } + + $cw = $this->GetMaxActInfoColWidth() ; + $this->scale->actinfo->SetMinColWidth($cw); + if( $this->img->width <= 0 ) { + // Now determine the width for the activity titles column + + // Firdst find out the maximum width of each object column + $titlewidth = max(max($this->GetMaxLabelWidth(), + $this->scale->tableTitle->GetWidth($this->img)), + $this->scale->actinfo->GetWidth($this->img)); + + // Add the width of the vertivcal divider line + $titlewidth += $this->scale->divider->iWeight*2; + + + // Now get the total width taking + // titlewidth, left and rigt margin, dayfont size + // into account + $width = $titlewidth + $nd*$fw + $lm+$rm; + } + else { + $width = $this->img->width; + } + + $width = round($width); + $height = round($height); + if( $width > MAX_GANTTIMG_SIZE_W || $height > MAX_GANTTIMG_SIZE_H ) { + JpgraphError::RaiseL(6007,$width,$height); +//("Sanity check for automatic Gantt chart size failed. Either the width (=$width) or height (=$height) is larger than MAX_GANTTIMG_SIZE. This could potentially be caused by a wrong date in one of the activities."); + } + + $this->img->CreateImgCanvas($width,$height); + $this->img->SetMargin($lm,$rm,$tm,$bm); + } + } + + // Return an array width the maximum width for each activity + // column. This is used when we autosize the columns where we need + // to find out the maximum width of each column. In order to do that we + // must walk through all the objects, sigh... + function GetMaxActInfoColWidth() { + $n = count($this->iObj); + if( $n == 0 ) return; + $w = array(); + $m = $this->scale->actinfo->iLeftColMargin + $this->scale->actinfo->iRightColMargin; + + for( $i=0; $i < $n; ++$i ) { + $tmp = $this->iObj[$i]->title->GetColWidth($this->img,$m); + $nn = count($tmp); + for( $j=0; $j < $nn; ++$j ) { + if( empty($w[$j]) ) + $w[$j] = $tmp[$j]; + else + $w[$j] = max($w[$j],$tmp[$j]); + } + } + return $w; + } + + // Stroke the gantt chart + function Stroke($aStrokeFileName="") { + + + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // a best we can. Therefor you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); + + // Should we autoscale dates? + if( !$this->scale->IsRangeSet() ) { + list($min,$max) = $this->GetBarMinMax(); + $this->scale->SetRange($min,$max); + } + + $this->scale->AdjustStartEndDay(); + + // Check if we should autoscale the image + $this->AutoSize(); + + // Should we start from the top or just spread the bars out even over the + // available height + $this->scale->SetVertLayout($this->iLayout); + if( $this->iLayout == GANTT_FROMTOP ) { + $maxheight=max($this->GetMaxLabelHeight(),$this->GetMaxBarAbsHeight()); + $this->scale->SetVertSpacing($maxheight*(1+$this->iLabelVMarginFactor)); + } + // If it hasn't been set find out the maximum line number + if( $this->scale->iVertLines == -1 ) + $this->scale->iVertLines = $this->GetBarMaxLineNumber()+1; + + $maxwidth=max($this->scale->actinfo->GetWidth($this->img), + max($this->GetMaxLabelWidth(), + $this->scale->tableTitle->GetWidth($this->img))); + + $this->scale->SetLabelWidth($maxwidth+$this->scale->divider->iWeight);//*(1+$this->iLabelHMarginFactor)); + + if( !$_csim ) { + $this->StrokePlotArea(); + if( $this->iIconDepth == DEPTH_BACK ) { + $this->StrokeIcons(); + } + } + + $this->scale->Stroke(); + + if( !$_csim ) { + // Due to a minor off by 1 bug we need to temporarily adjust the margin + $this->img->right_margin--; + $this->StrokePlotBox(); + $this->img->right_margin++; + } + + // Stroke Grid line + $this->hgrid->Stroke($this->img,$this->scale); + + $n = count($this->iObj); + for($i=0; $i < $n; ++$i) { + //$this->iObj[$i]->SetLabelLeftMargin(round($maxwidth*$this->iLabelHMarginFactor/2)); + $this->iObj[$i]->Stroke($this->img,$this->scale); + } + + $this->StrokeTitles(); + + if( !$_csim ) { + $this->StrokeConstrains(); + $this->footer->Stroke($this->img); + + if( $this->iIconDepth == DEPTH_FRONT) { + $this->StrokeIcons(); + } + + // Should we do any final image transformation + if( $this->iImgTrans ) { + if( !class_exists('ImgTrans') ) { + require_once('jpgraph_imgtrans.php'); + } + + $tform = new ImgTrans($this->img->img); + $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, + $this->iImgTransDirection,$this->iImgTransHighQ, + $this->iImgTransMinSize,$this->iImgTransFillColor, + $this->iImgTransBorder); + } + + + // If the filename is given as the special "__handle" + // then the image handler is returned and the image is NOT + // streamed back + if( $aStrokeFileName == _IMG_HANDLER ) { + return $this->img->img; + } + else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline, + $aStrokeFileName); + } + } + } + + function StrokeConstrains() { + $n = count($this->iObj); + + // Stroke all constrains + for($i=0; $i < $n; ++$i) { + + // Some gantt objects may not have constraints associated with them + // for example we can add IconPlots which doesn't have this property. + if( empty($this->iObj[$i]->constraints) ) continue; + + $numConstrains = count($this->iObj[$i]->constraints); + + for( $k = 0; $k < $numConstrains; $k++ ) { + $vpos = $this->iObj[$i]->constraints[$k]->iConstrainRow; + if( $vpos >= 0 ) { + $c1 = $this->iObj[$i]->iConstrainPos; + + // Find out which object is on the target row + $targetobj = -1; + for( $j=0; $j < $n && $targetobj == -1; ++$j ) { + if( $this->iObj[$j]->iVPos == $vpos ) { + $targetobj = $j; + } + } + if( $targetobj == -1 ) { + JpGraphError::RaiseL(6008,$this->iObj[$i]->iVPos,$vpos); +//('You have specifed a constrain from row='.$this->iObj[$i]->iVPos.' to row='.$vpos.' which does not have any activity.'); + } + $c2 = $this->iObj[$targetobj]->iConstrainPos; + if( count($c1) == 4 && count($c2 ) == 4) { + switch( $this->iObj[$i]->constraints[$k]->iConstrainType ) { + case CONSTRAIN_ENDSTART: + if( $c1[1] < $c2[1] ) { + $link = new GanttLink($c1[2],$c1[3],$c2[0],$c2[1]); + } + else { + $link = new GanttLink($c1[2],$c1[1],$c2[0],$c2[3]); + } + $link->SetPath(3); + break; + case CONSTRAIN_STARTEND: + if( $c1[1] < $c2[1] ) { + $link = new GanttLink($c1[0],$c1[3],$c2[2],$c2[1]); + } + else { + $link = new GanttLink($c1[0],$c1[1],$c2[2],$c2[3]); + } + $link->SetPath(0); + break; + case CONSTRAIN_ENDEND: + if( $c1[1] < $c2[1] ) { + $link = new GanttLink($c1[2],$c1[3],$c2[2],$c2[1]); + } + else { + $link = new GanttLink($c1[2],$c1[1],$c2[2],$c2[3]); + } + $link->SetPath(1); + break; + case CONSTRAIN_STARTSTART: + if( $c1[1] < $c2[1] ) { + $link = new GanttLink($c1[0],$c1[3],$c2[0],$c2[1]); + } + else { + $link = new GanttLink($c1[0],$c1[1],$c2[0],$c2[3]); + } + $link->SetPath(3); + break; + default: + JpGraphError::RaiseL(6009,$this->iObj[$i]->iVPos,$vpos); +//('Unknown constrain type specified from row='.$this->iObj[$i]->iVPos.' to row='.$vpos); + break; + } + + $link->SetColor($this->iObj[$i]->constraints[$k]->iConstrainColor); + $link->SetArrow($this->iObj[$i]->constraints[$k]->iConstrainArrowSize, + $this->iObj[$i]->constraints[$k]->iConstrainArrowType); + + $link->Stroke($this->img); + } + } + } + } + } + + function GetCSIMAreas() { + if( !$this->iHasStroked ) + $this->Stroke(_CSIM_SPECIALFILE); + + $csim = $this->title->GetCSIMAreas(); + $csim .= $this->subtitle->GetCSIMAreas(); + $csim .= $this->subsubtitle->GetCSIMAreas(); + + $n = count($this->iObj); + for( $i=$n-1; $i >= 0; --$i ) + $csim .= $this->iObj[$i]->GetCSIMArea(); + return $csim; + } +} + +//=================================================== +// CLASS PredefIcons +// Description: Predefined icons for use with Gantt charts +//=================================================== +DEFINE('GICON_WARNINGRED',0); +DEFINE('GICON_TEXT',1); +DEFINE('GICON_ENDCONS',2); +DEFINE('GICON_MAIL',3); +DEFINE('GICON_STARTCONS',4); +DEFINE('GICON_CALC',5); +DEFINE('GICON_MAGNIFIER',6); +DEFINE('GICON_LOCK',7); +DEFINE('GICON_STOP',8); +DEFINE('GICON_WARNINGYELLOW',9); +DEFINE('GICON_FOLDEROPEN',10); +DEFINE('GICON_FOLDER',11); +DEFINE('GICON_TEXTIMPORTANT',12); + +class PredefIcons { + var $iBuiltinIcon = null; + var $iLen = -1 ; + + function GetLen() { + return $this->iLen ; + } + + function GetImg($aIdx) { + if( $aIdx < 0 || $aIdx >= $this->iLen ) { + JpGraphError::RaiseL(6010,$aIdx); +//('Illegal icon index for Gantt builtin icon ['.$aIdx.']'); + } + return Image::CreateFromString(base64_decode($this->iBuiltinIcon[$aIdx][1])); + } + + function PredefIcons() { + //========================================================== + // warning.png + //========================================================== + $this->iBuiltinIcon[0][0]= 1043 ; + $this->iBuiltinIcon[0][1]= + 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'. + 'B3RJTUUH0wgKFSgilWPhUQAAA6BJREFUeNrtl91rHFUYh5/3zMx+Z5JNUoOamCZNaqTZ6IWIkqRiQWmi1IDetHfeiCiltgXBP8AL'. + '0SIUxf/AvfRSBS9EKILFFqyIH9CEmFZtPqrBJLs7c+b1YneT3WTTbNsUFPLCcAbmzPt73o9zzgzs2Z793231UOdv3w9k9Z2uzOdA'. + '5+2+79yNeL7Hl7hw7oeixRMZ6PJM26W18DNAm/Vh7lR8fqh97NmMF11es1iFpMATqdirwMNA/J4DpIzkr5YsAF1PO6gIMYHRdPwl'. + 'oO2elmB+qH3sm7XozbkgYvy8SzYnZPtcblyM6I+5z3jQ+0vJfgpEu56BfI9vUkbyi2HZd1QJoeWRiAjBd4SDCW8SSAOy6wBHMzF7'. + 'YdV2A+ROuvRPLfHoiSU0EMY/cDAIhxJeGngKaN1VgHyPL7NBxI1K9P4QxBzw3K1zJ/zkG8B9uwaQ7/HNsRZv9kohBGD0o7JqMYS/'. + '/ynPidQw/LrBiPBcS/yFCT95DvB2BWAy4575PaQbQKW+tPd3GCItu2odKI++YxiKu0d26oWmAD7paZU/rLz37VqIijD2YbnzNBBE'. + 'IBHf8K8qjL7vYhCGErEU8CTg3xXAeMp96GrJEqkyXkm9Bhui1xfsunjdGhcYLq+IzjsGmBt5YH/cmJkFq6gIqlon3u4LxdKGuCIo'. + 'Qu41g0E41po+2R33Xt5uz9kRIB2UTle7PnfKrROP1HD4sRjZlq0lzhwoZ6rDNeTi3nEg1si/7FT7kYQbXS6E5E65tA5uRF9tutq0'. + 'K/VwAF+/FbIYWt6+tjQM/AqUms7A4Wy6d7YSfSNxgMmzi0ycWWworio4QJvj4LpuL5BqugTnXzzqJsJwurrlNhJXFaavW67NRw3F'. + 'q+aJcCQVe9fzvJGmAY7/dPH0gi0f64OveGxa+usCuQMeZ0+kt8BVrX+qPO9Bzx0MgqBvs+a2PfDdYIf+WAjXU1ub4tqNaPPzRs8A'. + 'blrli+WVn79cXn0cWKl+tGx7HLc7pu3CSmnfitL+l1UihAhwjFkPQev4K/fSABjBM8JCaFuurJU+rgW41SroA8aNMVNAFtgHJCsn'. + 'XGy/58QVxAC9MccJtZ5kIzNlW440WrJ2ea4YPA9cAooA7i0A/gS+iqLoOpB1HOegqrYB3UBmJrAtQAJwpwPr1Ry92wVlgZsiYlW1'. + 'uX1gU36dymgqYxJIJJNJT1W9QqHgNwFQBGYqo94OwHZQUuPD7ACglSvc+5n5T9m/wfJJX4U9qzEAAAAASUVORK5CYII=' ; + + //========================================================== + // edit.png + //========================================================== + $this->iBuiltinIcon[1][0]= 959 ; + $this->iBuiltinIcon[1][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAFgAWABY9j+ZuwAAAAlwSFlz'. + 'AAALEAAACxABrSO9dQAAAAd0SU1FB9AKDAwbIEXOA6AAAAM8SURBVHicpdRPaBxlHMbx76ZvsmOTmm1dsEqQSIIsEmGVBAQjivEQ'. + 'PAUJngpWsAWlBw8egpQepKwplN4ULEG9CjkEyUFKlSJrWTG0IU51pCsdYW2ncUPjdtp9Z+f3vuNhu8nKbmhaf5cZeGc+PO8zf1Lc'. + 'm0KhkACICCKCMeaBjiLC0tLSnjNvPmuOHRpH0TZTU1M8zBi9wakzn7OFTs5sw8YYACYmJrre7HkeuVyu69qPF77hlT1XmZ0eQ03O'. + 'wOLJTvhBx1rLz18VmJ0eY+jVd2FxDkKXnvYLHgb97OgLzE4ON9Hzc1B1QaQzsed5O0Lta3Ec89OnR5h5McfQ+Mw2qgQUnfBOPbZ3'. + 'bK3l+xOvMT0+3ERLp5FNF6UEjcL32+DdVmGt5WLhDYYPZrbRqreFumXwql0S3w9tnDvLWD5PZigPpdOwuYpSCo3C8wU3UHxQdHbf'. + 'cZIkNM6dxcnlUM4k1eUFMlUPpUADbpkttFarHe6oYqeOr6yt4RzMQHYUcUsQVtGicHDwKprViuLDkkOtVnsHCHZVRVy/zcj1i5Af'. + 'h8AjdIts+hUcGcYPK3iBtKM3gD/uAzf/AdY2mmmVgy6X8YNNKmGIvyloPcB8SUin07RQ4EZHFdsdG0wkJEnEaHAJxvKEpSLeaokV'. + 'r4zWmhUZYLlY4b1D03y5eIEWCtS7vsciAgiIxkQRabWOrlQor66y4pUphoJb1jiO4uO5o0S3q6RSqVbiOmC7VCEgAhLSaDQ48dH7'. + 'vD46REY0iysegSjKQciRt99ib7qXwX0O+pG4teM6YKHLB9JMq4mTmF9/+AKA4wvLZByH7OgYL7+UY2qvw/7Bfg5kHiXjJFyv3CGO'. + 'Y1rof+BW4t/XLiPG0DCGr79d4XzRxRnIMn98huXSTYyJ6et1UNYQhRvcinpJq86H3wGPPPM0iBDd+QffD1g4eZjLvuG7S1Wef26E'. + 'J7L7eSx7gAHVg7V3MSbi6m/r93baBd6qQjerAJg/9Ql/XrvG0ON1+vv7GH3qSfY5fahUnSTpwZgIEQesaVXRPbHRG/xyJSAxMYlp'. + 'EOm71HUINiY7mGb95l/8jZCyQmJjMDGJjUmsdCROtZ0n/P/Z8v4Fs2MTUUf7vYoAAAAASUVORK5CYII=' ; + + //========================================================== + // endconstrain.png + //========================================================== + $this->iBuiltinIcon[2][0]= 666 ; + $this->iBuiltinIcon[2][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz'. + 'AAALDwAACw8BkvkDpQAAAAd0SU1FB9ALEREILkh0+eQAAAIXSURBVHictZU9aFNRFMd/N81HX77aptJUWmp1LHRpIcWhg5sIDlUQ'. + 'LAXB4t7RRUpwEhy7iQ46CCIoSHcl0CFaoVARU2MFMYktadLXJNok7x2HtCExvuYFmnO4w/3gx+Gc/z1HKRTdMEdXqHbB/sgc/sic'. + 'nDoYAI8XwDa8o1RMLT+2hAsigtTvbIGVqhX46szUifBGswUeCPgAGB7QeLk0X4Ork+HOxo1VgSqGASjMqkn8W4r4vVtEgI/RRQEL'. + 'vaoGD85cl5V3nySR/S1mxWxab7f35PnntNyMJeRr9kCMqiHTy09EoeToLwggx6ymiMOD/VwcD7Oa/MHkcIiQx026WGYto5P/U+ZZ'. + '7gD0QwDuT5z9N3LrVPi0Xs543eQPKkRzaS54eviJIp4tMFQFMllAWN2qcRZHBnixNM8NYD162xq8u7ePSQ+GX2Pjwxc2dB2cLtB8'. + '7GgamCb0anBYBeChMtl8855CarclxU1gvViiUK4w2OMkNDnGeJ8bt9fH90yOnOkCwLFTwhzykhvtYzOWoBBbY//R3dbaNTYhf2RO'. + 'QpeuUMzv188MlwuHy0H13HnE48UzMcL0WAtUHX8OxZHoG1URiFw7rnLLCswuSPD1ulze/iWjT2PSf+dBXRFtVVGIvzqph0pQL7VE'. + 'avXYaXXxPwsnt0imdttCocMmZBdK7YU9D8wuNOW0nXc6QWzPsSa5naZ1beb9BbGB6dxGtMnXAAAAAElFTkSuQmCC' ; + + //========================================================== + // mail.png + //========================================================== + $this->iBuiltinIcon[3][0]= 1122 ; + $this->iBuiltinIcon[3][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz'. + 'AAALEAAACxABrSO9dQAAAAd0SU1FB9AJHAMfFvL9OU8AAAPfSURBVHictZRdaBRXFMd/987H7tbNx8aYtGCrEexDsOBDaKHFxirb'. + 'h0qhsiY0ykppKq1osI99C4H2WSiFFMHWUhXBrjRi0uCmtSEUGgP1QWqhWjGkoW7M1kTX3WRn5p4+TJJNGolQ6IXDnDtz+N0z/3PP'. + 'UWBIpdpYa23b9g09PZ2kUrOrvmUyGVKp1Ao/mUyi56YnVgWfO/P1CihAd/dJMpmaNROIRq8BkM1m0bH6TasC3j6QXgFdXI+DR6PR'. + 'JX/Pno8B+KLnMKqlpUU8z8MYs2RBEDzWf9J+0RcRbMdxGBsbw/fmCXwPMUEYID4iAVp8wIRmDIHMo4yHSIBSASKC+CWE0C/PF9jU'. + '3B6Cp+4M07C5FUtKGNvGwQJctPgIsgD2wRhEIqAMGB+UQYkHJgYYZD7P1HwVlmWhHcfhyk83KeRGUW4t6CgoG5SNUS4KBWgQDUov'. + '7AGlwYASBVqH0Bk49dXpCviVV3dw/tI1Bvr7kMIIlh0NYUpjlF0BAYvcxSXmEVLKceHSCJm+PnbueBHbtkNwTXUNBzo6aGpq4sSZ'. + 'GwT5H7BsF6Wdf1GWHQAoM0upeI9PT1yioS7B7tdaSdSuw7KsUGMAy7HYsmUztTW1nMwM0txssX1rlHjjS5jy/Uq2YkK/eJuLl6/z'. + 'x+1xkslW6mrixGIODx8EFSlEBC0+tmXT0NhA2763iEUjnLv4C8XpUbSbAB1mKkGJ3J83Od77HW5EszvZSqK2iljMIeJaRGNuJePF'. + '6mspY7BJ1DXwQnCd2fxGRq5OUCz8xt72dyhMZcn++Cu3xu9SKhdp2b4ZHWnAtTSxmIWlhcIjlksR3lNBYzlxZsb7+f7ne+xtSzOd'. + 'u83szH1OnThOPp/n+a0beeP1l4mvq+PU2Qyd+5PY1RuwlAqLYFaBfbTbyPSdfgaH77A//QF4f1O/vpr6RJyq+C5Kc/M8FbFxXItY'. + 'xOHDrvfo/fxLDnbsJBp5BowBReVWYAzabeTh5ABDw7cWoNNL3YYYNtSv57lnn6Z+Qx01VeuIuBa2DV1HD3H63BAPZu4u1WGpeLHq'. + 'Rh7+NcjA0O+0p4+CNwXigwnbWlQQdpuEpli+n+PIkcOc//YKuckJJFh2K2anrjFw+QZt6S6kPImIF/b+cqAJD1LihWAxC61twBTo'. + 'fPcQF/oGsVW5ovHQlavs2/8+uYnRVSOUgHAmmAClBIOBwKC0gPjhIRgEIX2wg7NnwpZW3d3d4vs+vu8TBMGK51rvPM9b8hdteZxd'. + 'LBbVR8feJDs0Rlv6GFKeXJ21rNRXESxMPR+CBUl0nN7PjtO+dye7Up/8v1I88bf/ixT/AO1/hZsqW+C6AAAAAElFTkSuQmCC' ; + + //========================================================== + // startconstrain.png + //========================================================== + $this->iBuiltinIcon[4][0]= 725 ; + $this->iBuiltinIcon[4][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz'. + 'AAALDgAACw4BQL7hQQAAAAd0SU1FB9ALEREICJp5fBkAAAJSSURBVHic3dS9a1NRGMfx77kxtS+xqS9FG6p1ER3qVJpBQUUc3CRU'. + 'BwURVLB1EAuKIP0THJQiiNRJBK3iJl18AyeltRZa0bbaJMbUNmlNSm5e7s25j0NqpSSmyag/OMM9POdzDuflwn8djz8gClVRrVEV'. + 'ur4Bl1FTNSzLrSS6vbml0jUUwSXj8Qfk3PkLtLW2AeBIybmrgz3+gFzpucjlE4f4btuFTuWuCF5XDr3a3UPf6cM8GQvxzbsRAJdh'. + 'ScfxSywml5j7mVypN0eGEJ0tebIre+zxB6Tv7jPReS2hREpOvpmUXU+H5eC913JnNCSRVE60pUVbWoZjprR39Yq70bdqj4pW7PEH'. + '5FpvL9e79jOTTHM7ssDL6CJZ08LbvAGnrpZg2mI2Z/MlZfN8IkxuSwu4V9+WIrj7zFlOHfXzKrLIi2SGh5ECKjnNVNxkQEc55vOw'. + 'rb6O8JLFdHyJ+ayFElUeHvjwkfteL/V7fKTSkFvIQE4DoLI2Mz/muTkTApcBKIwaN8pwIUrKw+ajWwDknAO0d/r4zFaMuRS63sWm'. + 'RoOdm+vRIriUYjKexrQV+t1o0YEVwfZSVJmD/dIABJuO0LG3lRFx0GOfiAELE9OgCrfU0XnIp5FwGLEy5WEAOxlR5uN+ARhP7GN3'. + '5w7Gv4bQI2+xpt4jjv2nWBmIlcExE2vDAHYioszBZXw6CPE4ADoWVHmd/tuwlZR9eXYyoszBfpiNQqaAOU5+TXRN+DeeenADPT9b'. + 'EVgKVsutKPl0TGWGhwofoquaoKK4apsq/tH/e/kFwBMXLgAEKK4AAAAASUVORK5CYII=' ; + + //========================================================== + // calc.png + //========================================================== + $this->iBuiltinIcon[5][0]= 589 ; + $this->iBuiltinIcon[5][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAA4AIwBbgMF12wAAAAlwSFlz'. + 'AAALEQAACxEBf2RfkQAAAAd0SU1FB9AHBxQeFsqn0wQAAAHKSURBVHicnZWff+RAGIef3U/gcOEgUAgUCgcLhYXCwsHBQeGgUDgs'. + 'FgMHB4VA/4Bg4XChWFgIFIqBwkJhsRAYeOGF+TQHmWSTTbKd9pU37/x45jvfTDITXEynAbdWKVQB0NazcVm0alcL4rJaRVzm+w/e'. + '3iwAkzbYRcnnYgI04GCvsxxSPabYaEdt2Ra6D0atcvvvDmyrMWBX1zPq2ircP/Tk98DiJtjV/fim6ziOCL6dDHZNhxQ3arIMsox4'. + 'vejleL2Ay9+jaw6A+4OSICG2cacGKhsGxg+CxeqAQS0Y7BYJvowq7iGMOhXHEfzpvpQkA9bLKgOgWKt+4Lo1mM9hs9m17QNsJ70P'. + 'Fjc/O52joogoX8MZKiBiAFxd9Z1vcj9wfSpUlDRNMcYQxzFpmnJ0FPH8nDe1MQaWSz9woQpWSZKEojDkeaWoKAyr1tlu+s48wfVx'. + 'u7n5i7jthmGIiEGcT+36PP+gFeJrxWLhb0UA/lb4ggGs1T0rZs0zwM/ZjNfilcIY5tutPxgOW3F6dUX464LrKILLiw+A7WErrl+2'. + 'rABG1EL/BilZP8DjU2uR4U+2E49P1Z8QJmNXUzl24A9GBT0IruCfi86d9x+D12RGzt+pNAAAAABJRU5ErkJggg==' ; + + //========================================================== + // mag.png + //========================================================== + $this->iBuiltinIcon[6][0]= 1415 ; + $this->iBuiltinIcon[6][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlz'. + 'AAALDAAACwwBP0AiyAAAAAd0SU1FB9ALDxEWDY6Ul+UAAAUESURBVHicdZVrbFRFGIafsyyF0nalV1R6WiggaAptlzsr1OgEogmC'. + '0IgoBAsBgkIrBAPEhBj/AP6xRTCUFEwRI4jcgsitXMrFCJptJWvBNpXYbbXtbtttt6e7e86ec/yxadlCfZPJZDIz73zzzjfvR2VL'. + 'F7U+hf0HD2JduIzTFy6SlJRkPtkcDgdCCE65OxFC8NPV6wghyM7OptankJ2dzbSC5QghEEIgCSHog9PpNAF27dlN6miZuPgElB4/'. + 'nmY3O7ZtByA1NVUCkGWZweD1eklJScESTbqxuIjrd+/x6uIl5M19hSy7nfGOeUxf+g7VjU1sKi7C4/GYsiyz7tAJAD4/cRaA1tZW'. + 'AHIPnECUVGD1+/3U19ebG4uLeHf1akamjsIwoVnVCOvQEdLoVILYYmMo3PIxSBJflpSaDX5FAmju1QAYv/8k/s8+wLVxOU0jR2LZ'. + '8sMFAApWrCApbRRDrRZirBYSLBKaoRPQw3SFernf2sav7T0Ubt4KwL4FMwF4Vu8FoHBCKgCzDhwHwLIhZ7y5a89u4m2JhA0wTdDC'. + 'OrphEjJMNElCHxKDEjaobmvlfo/Krj27CQQCJsCGJW8C0KXqAMxMiosQA8hZWcTFx9OsaniDKh1qmG7VoFsL0x0K06kbeAMhWpRe'. + '/KpG+gwHAKUnz7Dz3BUMw6DK18nuw99wt0Nh6VdHI8RJicmETQgFg7SFwjSrGv+oKp6ghldV6dZ0ugJBlF6FmCESQ2w2AIqXLsan'. + 'BrFYLJTnTCBrdBqveeopWZiPFaBHUegJhegMqGgxEkHDwB/UaQ9rdIV06v0+TD2EEQjQFtAY0dsNgNvt5sialQAIIXh7wQKuVf6J'. + 'gTsSccPDWlQstClBGjr9eHpVWvUQncEwdYEedF8noQ4vmYmpZMTH0nTvDn25vLbrNmu7bvfnsYEbAMnhcPDgwQPzUo2LJusw/mhp'. + 'QwlHNO0KBAnoIfxtrcQMT2De1Mm891wyUzNlUlJSpIyMDBobGzlzr5rFM/Koq6vrP8ASGxsLwPmKcvIShjPGZiPOakE3VFB8hHwd'. + 'vJAxhrk5L7Ly+RQuH/sWgPdXrwFg/6HDFBUsIj09nehfbAWwPWOT9n5RYhqGwarNWxkRM5TRCfF4U1PQsDDJFk9uYhwXvzvKjm3b'. + 'KSsro3DJInNW5RXp7u2bAKSlpeH1esnPz6eqqgqLpmmcr3Fht9ulfaV7mZk1Bs+lM6T1djM9fhg5egDPpTNMy5TZsW07kydPYdWM'. + 'aXx96ixOp9O8cfUa80srmDpjOgAulytiQqZpMnvObLbt/JTtHxXj9/tRVdU0DGOAufRpevPDTeac0hJyc3NxOOawfv161lVWS6eX'. + 'z+9/UOCxu1VWVvaTRGv16NFfjB2bNeAQp9NpTpmSM4DcbrdL0WsGDKLRR+52uwe1yP8jb2lpYfikyY9t80n03UCWZeaXVjw1f+zs'. + 'Oen+/d+pqanhzp2fKSsrw+l0mi6XiyPl5ZGITdN8fAVJwjRNJEmi1qfw1kw7siyTnJxMe3s71dXV3GpoZO64DG41NPJylvxU5D/e'. + 'qJKsfWQD9IkaZ2RmUvr9aV4aGYcQgjfO3aWoYBF5eXm4ewIsu/CbdPz1aWb0/p1bNoOrQxlUiuiaFo3c3FyEEOx9+C9CCD6paaTW'. + 'p/TXyYkTJ0Xe59jf7QOyAKDWp/QXxcFQ61P4pT3ShBBcvnUHIQTjxmX19/8BCeVg+/GPpskAAAAASUVORK5CYII=' ; + + //========================================================== + // lock.png + //========================================================== + $this->iBuiltinIcon[7][0]= 963 ; + $this->iBuiltinIcon[7][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz'. + 'AAALCwAACwsBbQSEtwAAAAd0SU1FB9AKAw0XDmwMOwIAAANASURBVHic7ZXfS1t3GMY/3+PprI7aisvo2YU6h6ATA8JW4rrlsF4U'. + 'qiAsF9mhl0N2cYTRy9G/wptAYWPD9iJtRy5asDe7cYFmyjaXOLaMImOrmkRrjL9yTmIS3120JybWQgfb3R74wuc8Lzw858vLOUpE'. + 'OK6pqSm2trbY39+nu7tbPHYch7m5OcLhMIA67kWj0aMQEWk6tm17rNm2LSIie3t7ksvlJJ1OSyqVkls3Z8SyLMnlcqTTaVKpFLdu'. + 'zmBZVj1HeY2VUti2TSQSQSml2bZdi0QirK2tMT09zerqKtlslqGhISYnJ4nHv2N+foFsNquOe9FotLlxOBwmk8lgWRbhcFgymYxY'. + 'liUi0mqaJoAuIi2macrdO7fFsizx3to0Te7euV1vrXtXEgqFmJmZYWVlhXK5LB4/U9kwDL784kYV0A3DYHd3m4sXRymXywKoRi8U'. + 'Ch01DgQCJBIJLMsiEAhIIpHw2uLz+eqtYrEYIqKZpimxWEyCwaCMjY01zYPBIJpXqVQqsby8TLVabWKA/v5+RkZGMAyDrq4ulFKH'. + 'HsfjcWZnZ+ns7KTRqwcnk0mKxSKFQqGJlVKtruuSTCYB6O3trW9UI/v9/iZPB/j8s2HOnX0FgHfeXpeffnzK+fWf+fijvhLs0PtG'. + 'D/n1OJ9+MsrlSwb3733DwMCAt1EyPj6uACYmJp56168NU6nUqFSE9nZdPE7+WqC/r4NKTagcCJVqDaUUB5VDAA4Pa9x7sMLlSwan'. + 'WjRmv13D7/erpaWlo604qOp88OF7LC48rPNosMq5Th+Dgxd4/XyA1rbzADi7j8jnf2P++wdcvSr8MJ/i8eomAKlUqn41OsDAQDeD'. + 'g++yuPCwzm/2vU8+n2a7sMFfj79mp7BBuVzioFSiXHJx3SKuW2Rzy0Up9dxnQVvODALQerqNRn4ZKe0Mvtc6TpzpmqbxalcY9Ato'. + '2v06t515C73YQftZB9GLnDrt4LoujuPgOA4Ui+C6yOpXJwZrJ7r/gv4P/u+D9W7fLxTz+1ScQxrZ3atRLaVxdjbY2d184R6/sLHe'. + 'opHP7/Do90Ua+WWUyezzZHObP/7cfX54/dowE1d66s8TV3oE+Mfn+L/zb4XmHPjRG9YjAAAAAElFTkSuQmCC' ; + + //========================================================== + // stop.png + //========================================================== + $this->iBuiltinIcon[8][0]= 889 ; + $this->iBuiltinIcon[8][1]= + 'iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz'. + 'AAALDwAACw8BkvkDpQAAAAd0SU1FB9AJDwEvNyD6M/0AAAL2SURBVHic1ZTLaxVnGIefb2bO5OScHJN4oWrFNqcUJYoUEgU3/Qf6'. + 'F7gwCkIrvdBLUtqqiLhSg9bgBduFSHZdiG5ctkJ3xRDbUFwUmghNzBDanPGMkzOX79LFJGPMOSd204U/+Bbzvd/78F4H/ieJdoad'. + 'pZKxRFszAI/DcP0HazXY22v+HB01kee1PA/v3zfnjx4xgGnHcNZe7OvuNj+cOEF1ZATv5nUA4jhBSgmADCVWo8Ge2Of9wb18P/G7'. + 'oUXmYi30zqlTVEdGWLh1g2D6MYlKkXGE0Vl8aa2GEB149+4xXSzyoOIw/mimiZV/DPb25pFOj13A9gOMEChhUEqhVYqWKUk9QAUp'. + 'sT/P4s8PmKlUmNhQaIJbkDVqBbpw6wZ2zUc4Nm+ePku5p4eOrgpueQOFUoVCVxcD4+N07dpF9+5tVJeWGPBjhvr7WF1zC8ASgtcP'. + 'H8a7eZ1odh4sh50nzwCw9ZNh3M4Stutiu0X2nB/LyjZ6lcIbVTpdQU/jWVPzLADM8+ZGBRdtC7wrF/O7bR99iu26VL86iU4SAH4b'. + 'Po5d6AQhstMSvGyI4wS5FJBKSRwnzF8byx/u+PjzzMF1mfryQ1K/jnCahqp1xEopjFLoNEFJSRJHzF799gWHqa+/QKcSUXBI609f'. + 'Al5W4teQSiHDOipNUKnMI13RvnOXAIEKQixvGWya98SC560MFwPiqEG86JM8q79Q06lvhnOndy5/B6GPCUOMUu3BQgg8z0M3GmBZ'. + 'iGJn3v2VmsqnfzNx7FDueODuj8ROCFpjtG5TCmOYv32bJ09msP0ISydMfnAUgF8/O45RAA6WTPjlvXcB+Gn7FuRf/zAnNX6x3ARe'. + 'PSdmqL+P/YHkwMGDOGWDZTlQcNBRhPEComgB/YeHfq2InF1kLlXUOkpMbio1bd7aATRD/X0M1lPeSlM2vt2X1XBZjZnpLG2tmZO6'. + 'LbQVOIcP+HG2UauH3xgwBqOz9Cc3l1tC24Fz+MvUDroeGNb5if9H/1dM/wLPCYMw9fryKgAAAABJRU5ErkJggg==' ; + + //========================================================== + // error.png + //========================================================== + $this->iBuiltinIcon[9][0]= 541 ; + $this->iBuiltinIcon[9][1]= + 'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAaVBMVEX//////2Xy8mLl5V/Z2VvMzFi/v1WyslKlpU+ZmUyMjEh/'. + 'f0VyckJlZT9YWDxMTDjAwMDy8sLl5bnY2K/MzKW/v5yyspKlpYiYmH+MjHY/PzV/f2xycmJlZVlZWU9MTEXY2Ms/PzwyMjLFTjea'. + 'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTCAkUMSj9wWSOAAABLUlEQVR4'. + '2s2U3ZKCMAxGjfzJanFAXFkUle/9H9JUKA1gKTN7Yy6YMjl+kNPK5rlZVSuxf1ZRnlZxFYAm93NnIKvR+MEHUgqBXx93wZGIUrSe'. + 'h+ctEgbpiMo3iQ4kioHCGxir/ZYUbr7AgPXs9bX0BCYM8vN/cPe8oQYzom3tVsSBMVHEoOJ5dm5F1RsIe9CtqGgRacCAkUvRtevT'. + 'e2pd6vOWF+gCuc/brcuhyARakBU9FgK5bUBWdHEH8tHpDsZnRTZQGzdLVvQ3CzyYZiTAmSIODEwzFCAdJopuvbpeZDisJ4pKEcjD'. + 'ijWPJhU1MjCo9dkYfiUVjQNTDKY6CVbR6A0niUSZjRwFanR0l9i/TyvGnFdqwStq5axMfDbyBksld/FUumvxS/Bd9VyJvQDWiiMx'. + 'iOsCHgAAAABJRU5ErkJggg==' ; + + //========================================================== + // openfolder.png + //========================================================== + $this->iBuiltinIcon[10][0]= 2040 ; + $this->iBuiltinIcon[10][1]= + 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEANAAtwClFht71AAAAAlwSFlz'. + 'AAALEAAACxABrSO9dQAAAAd0SU1FB9AKDQ4RIXMeaLcAAAd1SURBVHicxZd7jBXVHcc/58zcvTNzH8vusqw8FsTsKiCUUh5WBZXG'. + 'GkOptmqwNWsWLKXFGlEpzZI0AWNKSy0WhDS22gJKtWlTsSRqzYIuLGB2WVvDIwQMZQMsy2OFfdzde+/OnHP6x907vJaFpjb9JZM5'. + 'c85Mfp/f9/s7Jxn4P4e41gtSyp78WGvtfdEAcqDFYUOH9HS0NhGk9tPb/ilSyp789UUB2AMuqhQy3Uzm7HGkE6W3dTNZMRI3EcWO'. + 'jf9ClLmWBT3dzW8jUsevWHCG3UpWl+IkHSxnbDh/Mcz12NevBcuWXTmf6TjnXvJ88gDmVB3pw3+nt3UzHa1NqMzBS2zqPLGFjtMN'. + 'ZNr3XdW+qyqwZcFk76HX/tHWfuQvyO4W7qhaHwL8efkMRlRUpPv7rqD0RrJ+FgAjLy1a20OIxZJEEuNCRfIApj+om4bGM3u2/sYU'. + '9J41d8973f3Dhg1pISTV1dXXBRNJxPGFCzhou+DCQrScZOkktNaeDZjamgeZ9MgiYmVDccvHhjAzJw0NTh8/alyZMaVJicp0iTHj'. + 'JpgNv38tjWUhhGROdbUL9W5/MH5XCkjlcibi+KIop5LVHLKEu8A/f4r286doa9pGrGwYAAsfqbbH3b8MgO/Nqgy6WvdbbXHMkEFJ'. + '4xUOMVEvaTZu3BgmvF4Yk4hz9rO/Ulr5cE9owae/rcGxohSOuiWkC2IjcIqKyPZm+OmCH7GhoZEF077EEzVVweAbJ+riEeO0Ey8y'. + 'UubqOHn0AOgMwvf59txnBrSp9dgxKmf/+kIP1NY8SFk0jh5ajmNHAWg5b2E5EexojGHjbiVRMoRMNs0LC+Yz46vTuH3enN7BI8fr'. + 'qFdo0BoVZNC9aVSQ4fNjBzEmQJiARxb+/AqYPMAVB5FsPU5v37g9OxgLhe14ZM5/ju052E6MNZvf5pmHHuLmmWOkEysxUtpGAtme'. + 'dtHTflJkezqQto3jFRnLssyf1jydxiiM7zNnye/c3ZsqLu2BN5fcMfzrv/hby1tPzmRUoihcTJ87CwQI2yLtDcIqsIjYUf51qBlf'. + 'OnScOSrdQUOMURkiXsLUzJnvbGhoBGDHH5cGyZLhOpYoNl5hqYnYEXOu5fDl9eYAHntx98n8hFHZcPHUuTSxSASAeK/CGIOxJJ0f'. + 'bOGNPU280dgkq6Y2yu8vfjCIlwwzr+/ZQ/PHO0gOLuO5qsftDQ2NbN+4OCgqG6WTxWVaq6zpF+DiSHWnicdylp3r6aZTWthIOrNp'. + 'ktHcvBu0sHX1Sm6ozB3B42d90zZA9bQp7PvgPSzXZfnqX/HS4DKKK2+x69Y/HURs26iBAN5ccsfw7774UcumF37C6f07KSt2OHji'. + 'DEUJD0tISjyPrrSPlAKvN0JP/U4O1NfjuhG2rvklN1SOpfXwftpbTqAyKRrff5fb7rs9V1R7m4wlz2ihA3HpmXflUWyOH2umpLiY'. + 'ui3v8M+6bWzfsRNbSgqkxaCkiy0simMuEWEhpcRzIhQWOIAh6tiAwS4owInFiTou5dOnMnl2NR++ujBwXEc9terD6M43nrj6LgAB'. + 'QnDPA9/irtkP8JRS7Hr/3T6YekDQ1pEiEXOwpUVJzCVlZZFS4mZtkpEo9ChAkDp/jtLMBACy6S4RiQghLyv5cgBRPnKUOX6smUGF'. + 'hSil0MYw9d77mPy1e5mnFE3batm3czvb6nYgEJztSFGU9LCRlMRdUjIH0+lnEMIwPNXD3NumoVJnrMCJaiciMUZfvQnz4QcBSvV1'. + 'vjE5GK358t0zmXDnDB79saLpo20c+aSRD+t25JTp7GZQwsEWFiVxl6hlUf/WO9z32CxmL1rOe6u/I2KuwGhzLQCB7/sYY9Bah3el'. + 'FKbvrrVm4vS7GH/7ncx+chEHGz7myCeNbPtoO0JI2jq78WIRLGkzsqs7V5SfFV5EovXACoiqqsfNpk2vo5VCWtYFBfoU0VoTBAFa'. + 'a7TRaK2p+MoURk+cxMzq+Rzbv49DDbuo27UTW9h0dedssPxuK+kIfN8XxhgDYPVXf2Fh4XKtFIl4AiklAlBKAYRKKK36wHIweTCt'. + 'NfHiEkaOn8j0+7/BmDFjaT30GbHywSxcuZkpFfFg+m1jjZ/NmnVvNfRvwd69e8WBA/uNFAIh4JVXXmHsmDHE4vEQQgjQ2lxQIm9N'. + 'nz35q3BEOZOHzaG2thaA4mRU+L29It+IV21CpbRQfeMFC35gRB/M2rVrubnyZmLxWJhECBEmz/eHyo/7lMlH3LFFujsthNFCCGOu'. + '+WNyeUgpjSVzMKtWraKyshLPdcPEeYWCIEBdpIxSivr6eta8vI7d6+cGnhdV06pe1QP+F/QXWmuRL+jZZ58LlVmxYgUVFRV4rhtu'. + '4TzMxXAA6XRaRAtsYUkx8I/JtSJQOlSwpmZpCLN8+fPcdNNoHMfB9/0QJgRoP295TlR7UVv8xxZcHMuWIZ9/Hn35vG3JEGZpzVJG'. + 'jx5N1IlitKahsZE1L69j69qHgx+urFX/lQL9JYdLlfnZihUhzOLFi8N3Ml1dthOxVH/f/8/CtqSJ2JaJ2JZ59J7RPsC/AViJsQS/'. + 'dBntAAAAAElFTkSuQmCC' ; + + //========================================================== + // folder.png + //========================================================== + $this->iBuiltinIcon[11][0]= 1824 ; + $this->iBuiltinIcon[11][1]= + 'iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz'. + 'AAALEAAACxABrSO9dQAAAAd0SU1FB9ECAQgFFyd9cRUAAAadSURBVHiczdhvbBP3Hcfx9/2xfefEOA5JoCNNnIT8AdtZmYBETJsI'. + '6+jQOlQihT1AYgytqzZpD1atfyYqlT1h0lRpT7aRJ4NQpRvZGELVuo5Ua9jEJDIETQsNQyPBsUJMWGPnj//e+e72wNg4xElMR6ed'. + 'ZNln3933dZ/f93f6yfB/sgmrHdDV1WXlPg8NDZUDScD8LFFFEZZlWYZhWMFg0Orq6sq/gDJAfFy1iiZy9OjrVnj4JzQ1rMWqfxm/'. + '309jYyNtbW0kEgnu3bvH4cOH88c/jqSKQl4/XGkd+eVtAN46up1LH92ktqYS++ZX8Pv9NDQ0sGnTJlKpFOFwmO7u7vy5IyMjeVRd'. + 'XV1+WEOh0IrY4pDnq6wXX/sTiCJaMkFZdRNqxefoe7VtCSqXVDqdZnZ2ltraWkzTpKqqijt3JpFlG7dvj7NzZ1f++qFQyA3EClHL'. + 'Ql743nFkhxPDtJAd5eTaYSVUfX09lZWVlJWVIUnSg7sVQMBCUcu4ceMGe/bsIRQK1QAzOcyykIM9P0KyudAyCWyqG8nhwqa4SkLt'. + '3r0bVVVxu924XC40TUOWZUQxe97CwgIdHR2LMHIxSCaVInVvFElxE0vMY1Pd2NUKJMWNTXHlUfF//4vETJCelwbpFm3MjP2dt37x'. + 'AlN+PzU1NViWRSwW4+7du3g8HjweD4qi5EFAJzAExIpCANbooxhplfB0FJvTg6xWIqsVRVF6MopkU3FXPcnkJxGU0VEAdF2noqKC'. + 'W3/8DpnqLjzep2lubsblcjE8PExHR8fboVDID9xYFpLBDpJF0jDQIncQpWlkm31FlFLtp9PfyuW/vYQj1kPSuRW/38+lj27S2Q7v'. + '/aWXUBVUffVNtm3blivVCEwsC5Eyc5iiApEpDEAXMqQdldhSiWVQHjJagud+8Fuexck/zv+K82dfoSbSCsDe75/km+4GVPd6+l5t'. + '4zJHcqVUYN2yEEtZQDCSJCueRAYsPY49HsFIZVG6p25JUumFafT4DKJN4amtT7Nz38sk5+5A70HMtEYyMkFiZhxzjQ/poXrLQrRU'. + 'DFGEeFpAlkQkm4pRiCpIKodKzk0T/2QMh+piPjxKZPwiSkUtu/b9mNnJEWS7E8nhAmvpM60oJDkXJxqNozxRRUxPIesispBBlsXV'. + 'UaKEFo8gzoaJhz8s2lOmrpUG+WBhJ9/60g+Z+fDXTAXfxllRjl1VkO0OFATsYhYliiK21ZKKhhHnFveUqSdKgwAEOp7F2v51vvw8'. + 'XH7/N1wd/BlTweuUV65BdtgfoLTSkipsdD3tRi0VYpommUwGwzDwdT5HYEc3giAwcvH3jLz3BlPB67jWeZBEKYsSBWwpHZtNKo4q'. + 'aHTDsJeeiGEYWJaFZVmYpommaRiGQdPnv0bb1m8gSRL/vPIOV979aR4lmAJ2p4qCgCxksNuKJ6VNpx4NYhgGpmkuQhmGQTqdxjAM'. + 'qr2d7HtxEEEQuH1tkKvvvkF44tqDnrIcKJKAPf1g+LAUElq8dIiu60sApmnm93Pfzc7OYhgGrie+wFe++ztcLhcT1wf54PzPCU9c'. + 'w7XWjWS3IdsdOAUBWZAxrRJnTQ6SG5bce2FCpmkughmGQSqVYm5uDtnj44sH38TtdhP6+Dwf//V4ttHXrkGURZJaic8RgHQ6jWma'. + 'SJKUL5RLKNfIOczDKF3XSSaTRCIRhLJWntp3nGfWrSMxc5OLf3iNP4+68T9Ub9nF76lTpxgfHycajZJKpdA0LZ9GbjYV7hcDWZaF'. + 'pmnMz88Ti8UYunSLmu1HFi2aVkxkaGjINTY2ttDb24vX6+XQoUNs3ryZ8vJyIDu1BUFYkkxhgxeiWlpaOHPmDE1NTdTX1xe98eWG'. + 'JnF/9dQZCoXUYDA4AOD1ejlw4ACtra2Ul5fniwmCkEcUJiUIAoFAgL6+Pnw+H21tbfT39z8SxCS7hHsfWH9/8dL4MKqnp4eWlhac'. + 'TmcekEvMNE2am5s5ceIEgUCA9vZ2Tp48ic/nY3j4UsmQHCYOjJHtpeBKqL1799Lc3IzT6UTXdRobGxkYGKC9vZ3W1tZ8Ko86NJ8a'. + 'tXHjRo4dO8bp06fZsmULGzZsoL+/n0AggNfr5ezZs/8VpGTU5OSkc//+/acBfD4f1dXV7Nq1i4aGBs6dO4fP5+Pq1SuPBbIiyjTN'. + 'RUnV1dUNXLhwAa/Xy44dO4jFYgBEo9FFF1r134BPuYlk16LrAYXsAlmtq6sbKDwoFAp9m+ykuP5ZQVZF3f8tCdwCov8LyHIoAANI'. + 'AXf/A1TI0XCDh7OWAAAAAElFTkSuQmCC' ; + + //========================================================== + // file_important.png + //========================================================== + $this->iBuiltinIcon[12][0]= 1785 ; + $this->iBuiltinIcon[12][1]= + 'iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlz'. + 'AAALDwAACw8BkvkDpQAAAAd0SU1FB9ECDAcjDeD3lKsAAAZ2SURBVHicrZhPaFzHHcc/897s7lutJCsr2VHsOHWMk0MPbsBUrcnF'. + 'OFRdSo6FNhdB6SGHlpDmYtJCDyoxyKe6EBxKQkt7KKL0T6ABo0NbciqigtC6PhWKI2NFqqxdSd7V2/dmftPDvPd212t55dCBYfbN'. + 'zpvfZ77z+/1mdhUjytWrV93Hf/24eD5z9gwiMlDjOKbb7dLtdhER2u02u7u73Lp1CxEZBw4AeZwdNQqkMd9wbziFGINJUt6rRbz5'. + '1ptUq1XK5TJBEAAUMHt7e+zu7gKwvLzMysoKwAng/uNg9CgQgFKlgg1DUJ67Vqtx6tQpZmdniaIIpRTOOZRSdDoddnZ2aLfbLC8v'. + 's7S0xJUrV7ZGwQSj1PhhfRodVdDlMrpc5vup5Z2fvMPdu3fZ29vDWjvwztjYGPV6nVqtRqVS4dKlSywtLQFsAdOH2XwsCEApg3jl'. + 'w98Rak2gvYjNZpNms0mSJDjnHgkDMDc3dySYQ0Ea8w139YUX0OUKulzyg7UmCEO+l1huvHuDra0t9vf3h1TJYSqVypFhHquIrlQI'. + 'S5qv/uIDAC7/4bcEQYAKvK+0Wq1DVQGIoog7d+4cCeaRII35hrt+8SsEOkRlUaEyR0UpFIrXHxyMVKVUKnHv3r0jwRwaNelBjBjL'. + 'Sz/7KYuLiwAsLi7y4z/9kY9e+TpkCuSqjI+Po7XuAWeKXLt2DWNMUZMkwRjDhQsXWFtbK6JpCCT3jfQgxomPtPX19YHWicM5x3c2'. + '73Pj3Ru8/aO3mZqaolKpoHVvyuvXr/Ppnf/Q7uzz380NPtu4y/qnG+ztd1hfX2dtbQ3gIvDnRyqSxl1UoPjyz98D4PTp0wPtq39Z'. + '4fdzLxegrVaLVqvF5OQkYRgWqpRKJZ77wvNsbW1RG5tgfKLOTH2G7Z1twqBQrgrMDvhInjfSOCY5iIv+hYWFgRZArEWsZWF941Bf'. + 'SdMUgMnJCWpjVU4cn+HUyePM1Gc4+fRUPkzBI5w1jbukcczLv/5l0XfmzJmBFuCba38r/CRXpT+CrDUoZ0jjB4RYonJAOYRobJKT'. + 'z5zgqfqxAbsFSH6mpHFM2qdGXh4VnoViD6mSJF2cTQeqDqBaKVHWmonJCWpZjhkC6anR5WsffTgwaHV1FaUUq6urA/2v3f5k4LnV'. + 'arG9tUn3oI2YBCcWHYAxMVYs1qZEZY2SFB2aYZDGfMN9d7uJiWPSeFiNo5Rclc3NTXZbO6RpF7EJVixYA9agwwDnUiqlEPdQ3imi'. + 'Jo27BGHIt/7x9yEjc3Nzh27Na7c/4TdffKl4bja3ae5MUIu0T/HOEIaOpJt4gwoSsVTK4SBIY77hFtY3ABBjBiZ90rKwvsH77/+K'. + 't37wOhO1iPpTk4SBw1mLsz6CnKQ4l3qV+kE+t9XHlNZOk+bUJLVIE1VCcIJWQmJ6qjj30NbcXLkZMt8YPig+Z3n1G5fZ39/j/vY2'. + '9ckqZT2Ochbn0p4qNkU/dDfUADdXbh4HXgRO4zNdEU0XL1784PLly5w9e7Z4SazFOfGrEotDcOKrcoJPmrYIXf/Zop3QNd1skuGt'. + 'cUAb2MgAxvHZTgFUq1Wmp6eZnZ0F8JlTjDduDThBnDeECEoJtbGIp6enqEblzCcEZ1PECU4yVRiOGgd0gc+AB0CZvkv1sWPHOHfu'. + 'HOfPn8da41cpkkltEBEPJhYnBkTQJcdYVKGkgRxCfBsq5xXNgAa2Bn+hjTOgHEKBP8pzRUxykIH4ifLJRTJAl+UMBJzPHQ6bfe/f'. + 'cWIzPxlUpD+zugzIZtVk1d8znBAqRxgoQuVQgSJQ3h9C5QhDRYgjUILCAzlnEdsHYTKfMTEBcP7F54YUGVmc2GLlIn6ve6v0ahSt'. + '8X25TzjJ+rIx1grKpQPWR4LkGVVsMgghvS0qjPdvm5OeceOTWA5Evo2mFzkjQfL7hZPUy5yvvF/uPFQL3+nbDmsLCEmT3sTmCTNr'. + 'rogT6yFsOix3ftw7OwQhkvSU6CuinhCk0+kAkFoBazEEICHaHHiPVmU0gnUp4EAc1mYrF0EBVpwPi34VrBkwPxKk3W5ju/e5/c+d'. + 'bGUHIAIuydTIE5zfc5Wr4lJcahHnHTP3CVGm78DrgY38N+DEibp7dmYKdAQmBh1hjEFjis+9CTWYGK21H6PxPyOI0DobYwzZF/z7'. + '7jadTvJtYG0kCD7lfwl49ijgT1gc0AH+dZSJA/xB+Mz/GSIvFoj/B7H1mAd8CO/zAAAAAElFTkSuQmCC' ; + + $this->iLen = count($this->iBuiltinIcon); + } +} + +//=================================================== +// Global cache for builtin images +//=================================================== +$_gPredefIcons = new PredefIcons(); + +//=================================================== +// CLASS IconImage +// Description: Holds properties for an icon image +//=================================================== +class IconImage { + var $iGDImage=null; + var $iWidth,$iHeight; + var $ixalign='left',$iyalign='center'; + var $iScale=1.0; + + function IconImage($aIcon,$aScale=1) { + GLOBAL $_gPredefIcons ; + if( is_string($aIcon) ) { + $this->iGDImage = Graph::LoadBkgImage('',$aIcon); + } + elseif( is_integer($aIcon) ) { + // Builtin image + $this->iGDImage = $_gPredefIcons->GetImg($aIcon); + } + else { + JpGraphError::RaiseL(6011); +//('Argument to IconImage must be string or integer'); + } + $this->iScale = $aScale; + $this->iWidth = Image::GetWidth($this->iGDImage); + $this->iHeight = Image::GetHeight($this->iGDImage); + } + + function GetWidth() { + return round($this->iScale*$this->iWidth); + } + + function GetHeight() { + return round($this->iScale*$this->iHeight); + } + + function SetAlign($aX='left',$aY='center') { + + $this->ixalign = $aX; + $this->iyalign = $aY; + + } + + function Stroke(&$aImg,$x,$y) { + + if( $this->ixalign == 'right' ) { + $x -= $this->iWidth; + } + elseif( $this->ixalign == 'center' ) { + $x -= round($this->iWidth/2*$this->iScale); + } + + if( $this->iyalign == 'bottom' ) { + $y -= $this->iHeight; + } + elseif( $this->iyalign == 'center' ) { + $y -= round($this->iHeight/2*$this->iScale); + } + + $aImg->Copy($this->iGDImage, + $x,$y,0,0, + round($this->iWidth*$this->iScale),round($this->iHeight*$this->iScale), + $this->iWidth,$this->iHeight); + } +} + + +//=================================================== +// CLASS TextProperty +// Description: Holds properties for a text +//=================================================== +class TextProperty { + var $iFFamily=FF_FONT1,$iFStyle=FS_NORMAL,$iFSize=10; + var $iColor="black"; + var $iShow=true; + var $iText=""; + var $iHAlign="left",$iVAlign="bottom"; + var $csimtarget='',$csimwintarget='',$csimalt=''; + +//--------------- +// CONSTRUCTOR + function TextProperty($aTxt='') { + $this->iText = $aTxt; + } + +//--------------- +// PUBLIC METHODS + function Set($aTxt) { + $this->iText = $aTxt; + } + + function SetCSIMTarget($aTarget,$aAltText='',$aWinTarget='') { + if( is_string($aTarget) ) + $aTarget = array($aTarget); + $this->csimtarget=$aTarget; + + if( is_string($aWinTarget) ) + $aWinTarget = array($aWinTarget); + $this->csimwintarget=$aWinTarget; + + if( is_string($aAltText) ) + $aAltText = array($aAltText); + $this->csimalt=$aAltText; + + } + + function SetCSIMAlt($aAltText) { + if( is_string($aAltText) ) + $aAltText = array($aAltText); + $this->csimalt=$aAltText; + } + + // Set text color + function SetColor($aColor) { + $this->iColor = $aColor; + } + + function HasTabs() { + if( is_string($this->iText) ) { + return substr_count($this->iText,"\t") > 0; + } + elseif( is_array($this->iText) ) { + return false; + } + } + + // Get number of tabs in string + function GetNbrTabs() { + if( is_string($this->iText) ) { + return substr_count($this->iText,"\t") ; + } + else{ + return 0; + } + } + + // Set alignment + function Align($aHAlign,$aVAlign="bottom") { + $this->iHAlign=$aHAlign; + $this->iVAlign=$aVAlign; + } + + // Synonym + function SetAlign($aHAlign,$aVAlign="bottom") { + $this->iHAlign=$aHAlign; + $this->iVAlign=$aVAlign; + } + + // Specify font + function SetFont($aFFamily,$aFStyle=FS_NORMAL,$aFSize=10) { + $this->iFFamily = $aFFamily; + $this->iFStyle = $aFStyle; + $this->iFSize = $aFSize; + } + + function IsColumns() { + return is_array($this->iText) ; + } + + // Get width of text. If text contains several columns separated by + // tabs then return both the total width as well as an array with a + // width for each column. + function GetWidth(&$aImg,$aUseTabs=false,$aTabExtraMargin=1.1) { + $extra_margin=4; + $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); + if( is_string($this->iText) ) { + if( strlen($this->iText) == 0 ) return 0; + $tmp = split("\t",$this->iText); + if( count($tmp) <= 1 || !$aUseTabs ) { + $w = $aImg->GetTextWidth($this->iText); + return $w + 2*$extra_margin; + } + else { + $tot=0; + $n = count($tmp); + for($i=0; $i < $n; ++$i) { + $res[$i] = $aImg->GetTextWidth($tmp[$i]); + $tot += $res[$i]*$aTabExtraMargin; + } + return array(round($tot),$res); + } + } + elseif( is_object($this->iText) ) { + // A single icon + return $this->iText->GetWidth()+2*$extra_margin; + } + elseif( is_array($this->iText) ) { + // Must be an array of texts. In this case we return the sum of the + // length + a fixed margin of 4 pixels on each text string + $n = count($this->iText); + for( $i=0, $w=0; $i < $n; ++$i ) { + $tmp = $this->iText[$i]; + if( is_string($tmp) ) { + $w += $aImg->GetTextWidth($tmp)+$extra_margin; + } + else { + if( is_object($tmp) === false ) { + JpGraphError::RaiseL(6012); + } + $w += $tmp->GetWidth()+$extra_margin; + } + } + return $w; + } + else { + JpGraphError::RaiseL(6012); + } + } + + // for the case where we have multiple columns this function returns the width of each + // column individually. If there is no columns just return the width of the single + // column as an array of one + function GetColWidth(&$aImg,$aMargin=0) { + $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); + if( is_array($this->iText) ) { + $n = count($this->iText); + for( $i=0, $w=array(); $i < $n; ++$i ) { + $tmp = $this->iText[$i]; + if( is_string($tmp) ) { + $w[$i] = $aImg->GetTextWidth($this->iText[$i])+$aMargin; + } + else { + if( is_object($tmp) === false ) { + JpGraphError::RaiseL(6012); + } + $w[$i] = $tmp->GetWidth()+$aMargin; + } + } + return $w; + } + else { + return array($this->GetWidth($aImg)); + } + } + + // Get total height of text + function GetHeight(&$aImg) { + $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); + return $aImg->GetFontHeight(); + } + + // Unhide/hide the text + function Show($aShow=true) { + $this->iShow=$aShow; + } + + // Stroke text at (x,y) coordinates. If the text contains tabs then the + // x parameter should be an array of positions to be used for each successive + // tab mark. If no array is supplied then the tabs will be ignored. + function Stroke(&$aImg,$aX,$aY) { + if( $this->iShow ) { + $aImg->SetColor($this->iColor); + $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); + $aImg->SetTextAlign($this->iHAlign,$this->iVAlign); + if( $this->GetNbrTabs() <= 1 ) { + if( is_string($this->iText) ) { + // Get rid of any "\t" characters and stroke string + if( is_array($aX) ) $aX=$aX[0]; + if( is_array($aY) ) $aY=$aY[0]; + $aImg->StrokeText($aX,$aY,str_replace("\t"," ",$this->iText)); + } + elseif( is_array($this->iText) && ($n = count($this->iText)) > 0 ) { + $ax = is_array($aX) ; + $ay = is_array($aY) ; + if( $ax && $ay ) { + // Nothing; both are already arrays + } + elseif( $ax ) { + $aY = array_fill(0,$n,$aY); + } + elseif( $ay ) { + $aX = array_fill(0,$n,$aX); + } + else { + $aX = array_fill(0,$n,$aX); + $aY = array_fill(0,$n,$aY); + } + $n = min($n, count($aX) ) ; + $n = min($n, count($aY) ) ; + for($i=0; $i < $n; ++$i ) { + $tmp = $this->iText[$i]; + if( is_object($tmp) ) { + $tmp->Stroke($aImg,$aX[$i],$aY[$i]); + } + else + $aImg->StrokeText($aX[$i],$aY[$i],str_replace("\t"," ",$tmp)); + } + } + } + else { + $tmp = split("\t",$this->iText); + $n = min(count($tmp),count($aX)); + for($i=0; $i < $n; ++$i) { + $aImg->StrokeText($aX[$i],$aY,$tmp[$i]); + } + } + } + } +} + +//=================================================== +// CLASS HeaderProperty +// Description: Data encapsulating class to hold property +// for each type of the scale headers +//=================================================== +class HeaderProperty { + var $iTitleVertMargin=3,$iFFamily=FF_FONT0,$iFStyle=FS_NORMAL,$iFSize=8; + var $iFrameColor="black",$iFrameWeight=1; + var $iShowLabels=true,$iShowGrid=true; + var $iBackgroundColor="white"; + var $iWeekendBackgroundColor="lightgray",$iSundayTextColor="red"; // these are only used with day scale + var $iTextColor="black"; + var $iLabelFormStr="%d"; + var $grid,$iStyle=0; + var $iIntervall = 1; + +//--------------- +// CONSTRUCTOR + function HeaderProperty() { + $this->grid = new LineProperty(); + } + +//--------------- +// PUBLIC METHODS + function Show($aShow=true) { + $this->iShowLabels = $aShow; + } + + function SetIntervall($aInt) { + $this->iIntervall = $aInt; + } + + function GetIntervall() { + return $this->iIntervall ; + } + + function SetFont($aFFamily,$aFStyle=FS_NORMAL,$aFSize=10) { + $this->iFFamily = $aFFamily; + $this->iFStyle = $aFStyle; + $this->iFSize = $aFSize; + } + + function SetFontColor($aColor) { + $this->iTextColor = $aColor; + } + + function GetFontHeight(&$aImg) { + $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); + return $aImg->GetFontHeight(); + } + + function GetFontWidth(&$aImg) { + $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); + return $aImg->GetFontWidth(); + } + + function GetStrWidth(&$aImg,$aStr) { + $aImg->SetFont($this->iFFamily,$this->iFStyle,$this->iFSize); + return $aImg->GetTextWidth($aStr); + } + + function SetStyle($aStyle) { + $this->iStyle = $aStyle; + } + + function SetBackgroundColor($aColor) { + $this->iBackgroundColor=$aColor; + } + + function SetFrameWeight($aWeight) { + $this->iFrameWeight=$aWeight; + } + + function SetFrameColor($aColor) { + $this->iFrameColor=$aColor; + } + + // Only used by day scale + function SetWeekendColor($aColor) { + $this->iWeekendBackgroundColor=$aColor; + } + + // Only used by day scale + function SetSundayFontColor($aColor) { + $this->iSundayTextColor=$aColor; + } + + function SetTitleVertMargin($aMargin) { + $this->iTitleVertMargin=$aMargin; + } + + function SetLabelFormatString($aStr) { + $this->iLabelFormStr=$aStr; + } + + function SetFormatString($aStr) { + $this->SetLabelFormatString($aStr); + } + + +} + +//=================================================== +// CLASS GanttScale +// Description: Responsible for calculating and showing +// the scale in a gantt chart. This includes providing methods for +// converting dates to position in the chart as well as stroking the +// date headers (days, week, etc). +//=================================================== +class GanttScale { + var $minute,$hour,$day,$week,$month,$year; + var $divider,$dividerh,$tableTitle; + var $iStartDate=-1,$iEndDate=-1; + // Number of gantt bar position (n.b not necessariliy the same as the number of bars) + // we could have on bar in position 1, and one bar in position 5 then there are two + // bars but the number of bar positions is 5 + var $iVertLines=-1; + // The width of the labels (defaults to the widest of all labels) + var $iLabelWidth; + // Out image to stroke the scale to + var $iImg; + var $iTableHeaderBackgroundColor="white",$iTableHeaderFrameColor="black"; + var $iTableHeaderFrameWeight=1; + var $iAvailableHeight=-1,$iVertSpacing=-1,$iVertHeaderSize=-1; + var $iDateLocale; + var $iVertLayout=GANTT_EVEN; + var $iTopPlotMargin=10,$iBottomPlotMargin=15; + var $iUsePlotWeekendBackground=true; + var $iWeekStart = 1; // Default to have weekends start on Monday + var $actinfo; + +//--------------- +// CONSTRUCTOR + function GanttScale(&$aImg) { + $this->iImg = &$aImg; + $this->iDateLocale = new DateLocale(); + + $this->minute = new HeaderProperty(); + $this->minute->SetIntervall(15); + $this->minute->SetLabelFormatString('i'); + $this->minute->SetFont(FF_FONT0); + $this->minute->grid->SetColor("gray"); + + $this->hour = new HeaderProperty(); + $this->hour->SetFont(FF_FONT0); + $this->hour->SetIntervall(6); + $this->hour->SetStyle(HOURSTYLE_HM24); + $this->hour->SetLabelFormatString('H:i'); + $this->hour->grid->SetColor("gray"); + + $this->day = new HeaderProperty(); + $this->day->grid->SetColor("gray"); + $this->day->SetLabelFormatString('l'); + + $this->week = new HeaderProperty(); + $this->week->SetLabelFormatString("w%d"); + $this->week->SetFont(FF_FONT1); + + $this->month = new HeaderProperty(); + $this->month->SetFont(FF_FONT1,FS_BOLD); + + $this->year = new HeaderProperty(); + $this->year->SetFont(FF_FONT1,FS_BOLD); + + $this->divider=new LineProperty(); + $this->dividerh=new LineProperty(); + $this->dividerh->SetWeight(2); + $this->divider->SetWeight(6); + $this->divider->SetColor('gray'); + $this->divider->SetStyle('fancy'); + + $this->tableTitle=new TextProperty(); + $this->tableTitle->Show(false); + $this->actinfo = new GanttActivityInfo(); + } + +//--------------- +// PUBLIC METHODS + // Specify what headers should be visible + function ShowHeaders($aFlg) { + $this->day->Show($aFlg & GANTT_HDAY); + $this->week->Show($aFlg & GANTT_HWEEK); + $this->month->Show($aFlg & GANTT_HMONTH); + $this->year->Show($aFlg & GANTT_HYEAR); + $this->hour->Show($aFlg & GANTT_HHOUR); + $this->minute->Show($aFlg & GANTT_HMIN); + + // Make some default settings of gridlines whihc makes sense + if( $aFlg & GANTT_HWEEK ) { + $this->month->grid->Show(false); + $this->year->grid->Show(false); + } + if( $aFlg & GANTT_HHOUR ) { + $this->day->grid->SetColor("black"); + } + } + + // Should the weekend background stretch all the way down in the plotarea + function UseWeekendBackground($aShow) { + $this->iUsePlotWeekendBackground = $aShow; + } + + // Have a range been specified? + function IsRangeSet() { + return $this->iStartDate!=-1 && $this->iEndDate!=-1; + } + + // Should the layout be from top or even? + function SetVertLayout($aLayout) { + $this->iVertLayout = $aLayout; + } + + // Which locale should be used? + function SetDateLocale($aLocale) { + $this->iDateLocale->Set($aLocale); + } + + // Number of days we are showing + function GetNumberOfDays() { + return round(($this->iEndDate-$this->iStartDate)/SECPERDAY); + } + + // The width of the actual plot area + function GetPlotWidth() { + $img=$this->iImg; + return $img->width - $img->left_margin - $img->right_margin; + } + + // Specify the width of the titles(labels) for the activities + // (This is by default set to the minimum width enought for the + // widest title) + function SetLabelWidth($aLabelWidth) { + $this->iLabelWidth=$aLabelWidth; + } + + // Which day should the week start? + // 0==Sun, 1==Monday, 2==Tuesday etc + function SetWeekStart($aStartDay) { + $this->iWeekStart = $aStartDay % 7; + + //Recalculate the startday since this will change the week start + $this->SetRange($this->iStartDate,$this->iEndDate); + } + + // Do we show min scale? + function IsDisplayMinute() { + return $this->minute->iShowLabels; + } + + // Do we show day scale? + function IsDisplayHour() { + return $this->hour->iShowLabels; + } + + + // Do we show day scale? + function IsDisplayDay() { + return $this->day->iShowLabels; + } + + // Do we show week scale? + function IsDisplayWeek() { + return $this->week->iShowLabels; + } + + // Do we show month scale? + function IsDisplayMonth() { + return $this->month->iShowLabels; + } + + // Do we show year scale? + function IsDisplayYear() { + return $this->year->iShowLabels; + } + + // Specify spacing (in percent of bar height) between activity bars + function SetVertSpacing($aSpacing) { + $this->iVertSpacing = $aSpacing; + } + + // Specify scale min and max date either as timestamp or as date strings + // Always round to the nearest week boundary + function SetRange($aMin,$aMax) { + $this->iStartDate = $this->NormalizeDate($aMin); + $this->iEndDate = $this->NormalizeDate($aMax); + } + + + // Adjust the start and end date so they fit to beginning/ending + // of the week taking the specified week start day into account. + function AdjustStartEndDay() { + + if( !($this->IsDisplayYear() ||$this->IsDisplayMonth() || $this->IsDisplayWeek()) ) { + // Don't adjust + return; + } + + // Get day in week for start and ending date (Sun==0) + $ds=strftime("%w",$this->iStartDate); + $de=strftime("%w",$this->iEndDate); + + // We want to start on iWeekStart day. But first we subtract a week + // if the startdate is "behind" the day the week start at. + // This way we ensure that the given start date is always included + // in the range. If we don't do this the nearest correct weekday in the week + // to start at might be later than the start date. + if( $ds < $this->iWeekStart ) + $d = strtotime('-7 day',$this->iStartDate); + else + $d = $this->iStartDate; + $adjdate = strtotime(($this->iWeekStart-$ds).' day',$d /*$this->iStartDate*/ ); + $this->iStartDate = $adjdate; + + // We want to end on the last day of the week + $preferredEndDay = ($this->iWeekStart+6)%7; + if( $preferredEndDay != $de ) { + // Solve equivalence eq: $de + x ~ $preferredDay (mod 7) + $adj = (7+($preferredEndDay - $de)) % 7; + $adjdate = strtotime("+$adj day",$this->iEndDate); + $this->iEndDate = $adjdate; + } + } + + // Specify background for the table title area (upper left corner of the table) + function SetTableTitleBackground($aColor) { + $this->iTableHeaderBackgroundColor = $aColor; + } + +/////////////////////////////////////// +// PRIVATE Methods + + // Determine the height of all the scale headers combined + function GetHeaderHeight() { + $img=$this->iImg; + $height=1; + if( $this->minute->iShowLabels ) { + $height += $this->minute->GetFontHeight($img); + $height += $this->minute->iTitleVertMargin; + } + if( $this->hour->iShowLabels ) { + $height += $this->hour->GetFontHeight($img); + $height += $this->hour->iTitleVertMargin; + } + if( $this->day->iShowLabels ) { + $height += $this->day->GetFontHeight($img); + $height += $this->day->iTitleVertMargin; + } + if( $this->week->iShowLabels ) { + $height += $this->week->GetFontHeight($img); + $height += $this->week->iTitleVertMargin; + } + if( $this->month->iShowLabels ) { + $height += $this->month->GetFontHeight($img); + $height += $this->month->iTitleVertMargin; + } + if( $this->year->iShowLabels ) { + $height += $this->year->GetFontHeight($img); + $height += $this->year->iTitleVertMargin; + } + return $height; + } + + // Get width (in pixels) for a single day + function GetDayWidth() { + return ($this->GetPlotWidth()-$this->iLabelWidth+1)/$this->GetNumberOfDays(); + } + + // Get width (in pixels) for a single hour + function GetHourWidth() { + return $this->GetDayWidth() / 24 ; + } + + function GetMinuteWidth() { + return $this->GetHourWidth() / 60 ; + } + + // Nuber of days in a year + function GetNumDaysInYear($aYear) { + if( $this->IsLeap($aYear) ) + return 366; + else + return 365; + } + + // Get week number + function GetWeekNbr($aDate,$aSunStart=true) { + // We can't use the internal strftime() since it gets the weeknumber + // wrong since it doesn't follow ISO on all systems since this is + // system linrary dependent. + // Even worse is that this works differently if we are on a Windows + // or UNIX box (it even differs between UNIX boxes how strftime() + // is natively implemented) + // + // Credit to Nicolas Hoizey for this elegant + // version of Week Nbr calculation. + + $day = $this->NormalizeDate($aDate) ; + if( $aSunStart ) + $day += 60*60*24; + + /*------------------------------------------------------------------------- + According to ISO-8601 : + "Week 01 of a year is per definition the first week that has the Thursday in this year, + which is equivalent to the week that contains the fourth day of January. + In other words, the first week of a new year is the week that has the majority of its + days in the new year." + + Be carefull, with PHP, -3 % 7 = -3, instead of 4 !!! + + day of year = date("z", $day) + 1 + offset to thursday = 3 - (date("w", $day) + 6) % 7 + first thursday of year = 1 + (11 - date("w", mktime(0, 0, 0, 1, 1, date("Y", $day)))) % 7 + week number = (thursday's day of year - first thursday's day of year) / 7 + 1 + ---------------------------------------------------------------------------*/ + + $thursday = $day + 60 * 60 * 24 * (3 - (date("w", $day) + 6) % 7); // take week's thursday + $week = 1 + (date("z", $thursday) - (11 - date("w", mktime(0, 0, 0, 1, 1, date("Y", $thursday)))) % 7) / 7; + + return $week; + } + + // Is year a leap year? + function IsLeap($aYear) { + // Is the year a leap year? + //$year = 0+date("Y",$aDate); + if( $aYear % 4 == 0) + if( !($aYear % 100 == 0) || ($aYear % 400 == 0) ) + return true; + return false; + } + + // Get current year + function GetYear($aDate) { + return 0+Date("Y",$aDate); + } + + // Return number of days in a year + function GetNumDaysInMonth($aMonth,$aYear) { + $days=array(31,28,31,30,31,30,31,31,30,31,30,31); + $daysl=array(31,29,31,30,31,30,31,31,30,31,30,31); + if( $this->IsLeap($aYear)) + return $daysl[$aMonth]; + else + return $days[$aMonth]; + } + + // Get day in month + function GetMonthDayNbr($aDate) { + return 0+strftime("%d",$aDate); + } + + // Get day in year + function GetYearDayNbr($aDate) { + return 0+strftime("%j",$aDate); + } + + // Get month number + function GetMonthNbr($aDate) { + return 0+strftime("%m",$aDate); + } + + // Translate a date to screen coordinates (horizontal scale) + function TranslateDate($aDate) { + // + // In order to handle the problem with Daylight savings time + // the scale written with equal number of seconds per day beginning + // with the start date. This means that we "cement" the state of + // DST as it is in the start date. If later the scale includes the + // switchover date (depends on the locale) we need to adjust back + // if the date we try to translate has a different DST status since + // we would otherwise be off by one hour. + $aDate = $this->NormalizeDate($aDate); + $tmp = localtime($aDate); + $cloc = $tmp[8]; + $tmp = localtime($this->iStartDate); + $sloc = $tmp[8]; + $offset = 0; + if( $sloc != $cloc) { + if( $sloc ) + $offset = 3600; + else + $offset = -3600; + } + $img=$this->iImg; + return ($aDate-$this->iStartDate-$offset)/SECPERDAY*$this->GetDayWidth()+$img->left_margin+$this->iLabelWidth;; + } + + // Get screen coordinatesz for the vertical position for a bar + function TranslateVertPos($aPos) { + $img=$this->iImg; + $ph=$this->iAvailableHeight; + if( $aPos > $this->iVertLines ) + JpGraphError::RaiseL(6015,$aPos); +// 'Illegal vertical position %d' + if( $this->iVertLayout == GANTT_EVEN ) { + // Position the top bar at 1 vert spacing from the scale + return round($img->top_margin + $this->iVertHeaderSize + ($aPos+1)*$this->iVertSpacing); + } + else { + // position the top bar at 1/2 a vert spacing from the scale + return round($img->top_margin + $this->iVertHeaderSize + $this->iTopPlotMargin + ($aPos+1)*$this->iVertSpacing); + } + } + + // What is the vertical spacing? + function GetVertSpacing() { + return $this->iVertSpacing; + } + + // Convert a date to timestamp + function NormalizeDate($aDate) { + if( $aDate === false ) return false; + if( is_string($aDate) ) { + $t = strtotime($aDate); + if( $t === FALSE || $t === -1 ) { + JpGraphError::RaiseL(6016,$aDate); +//("Date string ($aDate) specified for Gantt activity can not be interpretated. Please make sure it is a valid time string, e.g. 2005-04-23 13:30"); + } + return $t; + } + elseif( is_int($aDate) || is_float($aDate) ) + return $aDate; + else + JpGraphError::RaiseL(6017,$aDate); +//Unknown date format in GanttScale ($aDate)."); + } + + + // Convert a time string to minutes + + function TimeToMinutes($aTimeString) { + // Split in hours and minutes + $pos=strpos($aTimeString,':'); + $minint=60; + if( $pos === false ) { + $hourint = $aTimeString; + $minint = 0; + } + else { + $hourint = floor(substr($aTimeString,0,$pos)); + $minint = floor(substr($aTimeString,$pos+1)); + } + $minint += 60 * $hourint; + return $minint; + } + + // Stroke the day scale (including gridlines) + function StrokeMinutes($aYCoord,$getHeight=false) { + $img=$this->iImg; + $xt=$img->left_margin+$this->iLabelWidth; + $yt=$aYCoord+$img->top_margin; + if( $this->minute->iShowLabels ) { + $img->SetFont($this->minute->iFFamily,$this->minute->iFStyle,$this->minute->iFSize); + $yb = $yt + $img->GetFontHeight() + + $this->minute->iTitleVertMargin + $this->minute->iFrameWeight; + if( $getHeight ) { + return $yb - $img->top_margin; + } + $xb = $img->width-$img->right_margin+1; + $img->SetColor($this->minute->iBackgroundColor); + $img->FilledRectangle($xt,$yt,$xb,$yb); + + $x = $xt; + $img->SetTextAlign("center"); + $day = date('w',$this->iStartDate); + $minint = $this->minute->GetIntervall() ; + + if( 60 % $minint !== 0 ) { + JpGraphError::RaiseL(6018,$minint); +//'Intervall for minutes must divide the hour evenly, e.g. 1,5,10,12,15,20,30 etc You have specified an intervall of '.$minint.' minutes.'); + } + + + $n = 60 / $minint; + $datestamp = $this->iStartDate; + $width = $this->GetHourWidth() / $n ; + if( $width < 8 ) { + // TO small width to draw minute scale + JpGraphError::RaiseL(6019,$width); +//('The available width ('.$width.') for minutes are to small for this scale to be displayed. Please use auto-sizing or increase the width of the graph.'); + } + + $nh = ceil(24*60 / $this->TimeToMinutes($this->hour->GetIntervall()) ); + $nd = $this->GetNumberOfDays(); + // Convert to intervall to seconds + $minint *= 60; + for($j=0; $j < $nd; ++$j, $day += 1, $day %= 7) { + for( $k=0; $k < $nh; ++$k ) { + for($i=0; $i < $n ;++$i, $x+=$width, $datestamp += $minint ) { + if( $day==6 || $day==0 ) { + + $img->PushColor($this->day->iWeekendBackgroundColor); + if( $this->iUsePlotWeekendBackground ) + $img->FilledRectangle($x,$yt+$this->day->iFrameWeight,$x+$width,$img->height-$img->bottom_margin); + else + $img->FilledRectangle($x,$yt+$this->day->iFrameWeight,$x+$width,$yb-$this->day->iFrameWeight); + $img->PopColor(); + + } + + if( $day==0 ) + $img->SetColor($this->day->iSundayTextColor); + else + $img->SetColor($this->day->iTextColor); + + switch( $this->minute->iStyle ) { + case MINUTESTYLE_CUSTOM: + $txt = date($this->minute->iLabelFormStr,$datestamp); + break; + case MINUTESTYLE_MM: + default: + // 15 + $txt = date('i',$datestamp); + break; + } + $img->StrokeText(round($x+$width/2),round($yb-$this->minute->iTitleVertMargin),$txt); + + // FIXME: The rounding problem needs to be solved properly ... + // + // Fix a rounding problem the wrong way .. + // If we also have hour scale then don't draw the firsta or last + // gridline since that will be overwritten by the hour scale gridline if such exists. + // However, due to the propagation of rounding of the 'x+=width' term in the loop + // this might sometimes be one pixel of so we fix this by not drawing it. + // The proper way to fix it would be to re-calculate the scale for each step and + // not using the additive term. + if( !(($i == $n || $i==0) && $this->hour->iShowLabels && $this->hour->grid->iShow) ) { + $img->SetColor($this->minute->grid->iColor); + $img->SetLineWeight($this->minute->grid->iWeight); + $img->Line($x,$yt,$x,$yb); + $this->minute->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); + } + } + } + } + $img->SetColor($this->minute->iFrameColor); + $img->SetLineWeight($this->minute->iFrameWeight); + $img->Rectangle($xt,$yt,$xb,$yb); + return $yb - $img->top_margin; + } + return $aYCoord; + } + + // Stroke the day scale (including gridlines) + function StrokeHours($aYCoord,$getHeight=false) { + $img=$this->iImg; + $xt=$img->left_margin+$this->iLabelWidth; + $yt=$aYCoord+$img->top_margin; + if( $this->hour->iShowLabels ) { + $img->SetFont($this->hour->iFFamily,$this->hour->iFStyle,$this->hour->iFSize); + $yb = $yt + $img->GetFontHeight() + + $this->hour->iTitleVertMargin + $this->hour->iFrameWeight; + if( $getHeight ) { + return $yb - $img->top_margin; + } + $xb = $img->width-$img->right_margin+1; + $img->SetColor($this->hour->iBackgroundColor); + $img->FilledRectangle($xt,$yt,$xb,$yb); + + $x = $xt; + $img->SetTextAlign("center"); + $tmp = $this->hour->GetIntervall() ; + $minint = $this->TimeToMinutes($tmp); + if( 1440 % $minint !== 0 ) { + JpGraphError::RaiseL(6020,$tmp); +//('Intervall for hours must divide the day evenly, e.g. 0:30, 1:00, 1:30, 4:00 etc. You have specified an intervall of '.$tmp); + } + + $n = ceil(24*60 / $minint ); + $datestamp = $this->iStartDate; + $day = date('w',$this->iStartDate); + $doback = !$this->minute->iShowLabels; + $width = $this->GetDayWidth() / $n ; + for($j=0; $j < $this->GetNumberOfDays(); ++$j, $day += 1,$day %= 7) { + for($i=0; $i < $n ;++$i, $x+=$width) { + if( $day==6 || $day==0 ) { + + $img->PushColor($this->day->iWeekendBackgroundColor); + if( $this->iUsePlotWeekendBackground && $doback ) + $img->FilledRectangle($x,$yt+$this->day->iFrameWeight,$x+$width,$img->height-$img->bottom_margin); + else + $img->FilledRectangle($x,$yt+$this->day->iFrameWeight,$x+$width,$yb-$this->day->iFrameWeight); + $img->PopColor(); + + } + + if( $day==0 ) + $img->SetColor($this->day->iSundayTextColor); + else + $img->SetColor($this->day->iTextColor); + + switch( $this->hour->iStyle ) { + case HOURSTYLE_HMAMPM: + // 1:35pm + $txt = date('g:ia',$datestamp); + break; + case HOURSTYLE_H24: + // 13 + $txt = date('H',$datestamp); + break; + case HOURSTYLE_HAMPM: + $txt = date('ga',$datestamp); + break; + case HOURSTYLE_CUSTOM: + $txt = date($this->hour->iLabelFormStr,$datestamp); + break; + case HOURSTYLE_HM24: + default: + $txt = date('H:i',$datestamp); + break; + } + $img->StrokeText(round($x+$width/2),round($yb-$this->hour->iTitleVertMargin),$txt); + $img->SetColor($this->hour->grid->iColor); + $img->SetLineWeight($this->hour->grid->iWeight); + $img->Line($x,$yt,$x,$yb); + $this->hour->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); + //$datestamp += $minint*60 + $datestamp = mktime(date('H',$datestamp),date('i',$datestamp)+$minint,0, + date("m",$datestamp),date("d",$datestamp)+1,date("Y",$datestamp)); + + } + } + $img->SetColor($this->hour->iFrameColor); + $img->SetLineWeight($this->hour->iFrameWeight); + $img->Rectangle($xt,$yt,$xb,$yb); + return $yb - $img->top_margin; + } + return $aYCoord; + } + + + // Stroke the day scale (including gridlines) + function StrokeDays($aYCoord,$getHeight=false) { + $img=$this->iImg; + $daywidth=$this->GetDayWidth(); + $xt=$img->left_margin+$this->iLabelWidth; + $yt=$aYCoord+$img->top_margin; + if( $this->day->iShowLabels ) { + $img->SetFont($this->day->iFFamily,$this->day->iFStyle,$this->day->iFSize); + $yb=$yt + $img->GetFontHeight() + $this->day->iTitleVertMargin + $this->day->iFrameWeight; + if( $getHeight ) { + return $yb - $img->top_margin; + } + $xb=$img->width-$img->right_margin+1; + $img->SetColor($this->day->iBackgroundColor); + $img->FilledRectangle($xt,$yt,$xb,$yb); + + $x = $xt; + $img->SetTextAlign("center"); + $day = date('w',$this->iStartDate); + $datestamp = $this->iStartDate; + + $doback = !($this->hour->iShowLabels || $this->minute->iShowLabels); + + setlocale(LC_TIME,$this->iDateLocale->iLocale); + + for($i=0; $i < $this->GetNumberOfDays(); ++$i, $x+=$daywidth, $day += 1,$day %= 7) { + if( $day==6 || $day==0 ) { + $img->SetColor($this->day->iWeekendBackgroundColor); + if( $this->iUsePlotWeekendBackground && $doback) + $img->FilledRectangle($x,$yt+$this->day->iFrameWeight, + $x+$daywidth,$img->height-$img->bottom_margin); + else + $img->FilledRectangle($x,$yt+$this->day->iFrameWeight, + $x+$daywidth,$yb-$this->day->iFrameWeight); + } + + $mn = strftime('%m',$datestamp); + if( $mn[0]=='0' ) + $mn = $mn[1]; + + switch( $this->day->iStyle ) { + case DAYSTYLE_LONG: + // "Monday" + $txt = strftime('%A',$datestamp); + break; + case DAYSTYLE_SHORT: + // "Mon" + $txt = strftime('%a',$datestamp); + break; + case DAYSTYLE_SHORTDAYDATE1: + // "Mon 23/6" + $txt = strftime('%a %d/'.$mn,$datestamp); + break; + case DAYSTYLE_SHORTDAYDATE2: + // "Mon 23 Jun" + $txt = strftime('%a %d %b',$datestamp); + break; + case DAYSTYLE_SHORTDAYDATE3: + // "Mon 23 Jun 2003" + $txt = strftime('%a %d %b %Y',$datestamp); + break; + case DAYSTYLE_LONGDAYDATE1: + // "Monday 23 Jun" + $txt = strftime('%A %d %b',$datestamp); + break; + case DAYSTYLE_LONGDAYDATE2: + // "Monday 23 Jun 2003" + $txt = strftime('%A %d %b %Y',$datestamp); + break; + case DAYSTYLE_SHORTDATE1: + // "23/6" + $txt = strftime('%d/'.$mn,$datestamp); + break; + case DAYSTYLE_SHORTDATE2: + // "23 Jun" + $txt = strftime('%d %b',$datestamp); + break; + case DAYSTYLE_SHORTDATE3: + // "Mon 23" + $txt = strftime('%a %d',$datestamp); + break; + case DAYSTYLE_SHORTDATE4: + // "23" + $txt = strftime('%d',$datestamp); + break; + case DAYSTYLE_CUSTOM: + // Custom format + $txt = strftime($this->day->iLabelFormStr,$datestamp); + break; + case DAYSTYLE_ONELETTER: + default: + // "M" + $txt = strftime('%A',$datestamp); + $txt = strtoupper($txt[0]); + break; + } + + if( $day==0 ) + $img->SetColor($this->day->iSundayTextColor); + else + $img->SetColor($this->day->iTextColor); + $img->StrokeText(round($x+$daywidth/2+1), + round($yb-$this->day->iTitleVertMargin),$txt); + $img->SetColor($this->day->grid->iColor); + $img->SetLineWeight($this->day->grid->iWeight); + $img->Line($x,$yt,$x,$yb); + $this->day->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); + $datestamp = mktime(0,0,0,date("m",$datestamp),date("d",$datestamp)+1,date("Y",$datestamp)); + //$datestamp += SECPERDAY; + + } + $img->SetColor($this->day->iFrameColor); + $img->SetLineWeight($this->day->iFrameWeight); + $img->Rectangle($xt,$yt,$xb,$yb); + return $yb - $img->top_margin; + } + return $aYCoord; + } + + // Stroke week header and grid + function StrokeWeeks($aYCoord,$getHeight=false) { + if( $this->week->iShowLabels ) { + $img=$this->iImg; + $yt=$aYCoord+$img->top_margin; + $img->SetFont($this->week->iFFamily,$this->week->iFStyle,$this->week->iFSize); + $yb=$yt + $img->GetFontHeight() + $this->week->iTitleVertMargin + $this->week->iFrameWeight; + + if( $getHeight ) { + return $yb - $img->top_margin; + } + + $xt=$img->left_margin+$this->iLabelWidth; + $weekwidth=$this->GetDayWidth()*7; + $wdays=$this->iDateLocale->GetDayAbb(); + $xb=$img->width-$img->right_margin+1; + $week = $this->iStartDate; + $weeknbr=$this->GetWeekNbr($week); + $img->SetColor($this->week->iBackgroundColor); + $img->FilledRectangle($xt,$yt,$xb,$yb); + $img->SetColor($this->week->grid->iColor); + $x = $xt; + if( $this->week->iStyle==WEEKSTYLE_WNBR ) { + $img->SetTextAlign("center"); + $txtOffset = $weekwidth/2+1; + } + elseif( $this->week->iStyle==WEEKSTYLE_FIRSTDAY || + $this->week->iStyle==WEEKSTYLE_FIRSTDAY2 || + $this->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR || + $this->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR ) { + $img->SetTextAlign("left"); + $txtOffset = 3; + } + else + JpGraphError::RaiseL(6021); +//("Unknown formatting style for week."); + + for($i=0; $i<$this->GetNumberOfDays()/7; ++$i, $x+=$weekwidth) { + $img->PushColor($this->week->iTextColor); + + if( $this->week->iStyle==WEEKSTYLE_WNBR ) + $txt = sprintf($this->week->iLabelFormStr,$weeknbr); + elseif( $this->week->iStyle==WEEKSTYLE_FIRSTDAY || + $this->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR ) + $txt = date("j/n",$week); + elseif( $this->week->iStyle==WEEKSTYLE_FIRSTDAY2 || + $this->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR ) { + $monthnbr = date("n",$week)-1; + $shortmonth = $this->iDateLocale->GetShortMonthName($monthnbr); + $txt = Date("j",$week)." ".$shortmonth; + } + + if( $this->week->iStyle==WEEKSTYLE_FIRSTDAYWNBR || + $this->week->iStyle==WEEKSTYLE_FIRSTDAY2WNBR ) { + $w = sprintf($this->week->iLabelFormStr,$weeknbr); + $txt .= ' '.$w; + } + + $img->StrokeText(round($x+$txtOffset), + round($yb-$this->week->iTitleVertMargin),$txt); + + $week = strtotime('+7 day',$week); + $weeknbr = $this->GetWeekNbr($week); + $img->PopColor(); + $img->SetLineWeight($this->week->grid->iWeight); + $img->Line($x,$yt,$x,$yb); + $this->week->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); + } + $img->SetColor($this->week->iFrameColor); + $img->SetLineWeight($this->week->iFrameWeight); + $img->Rectangle($xt,$yt,$xb,$yb); + return $yb-$img->top_margin; + } + return $aYCoord; + } + + // Format the mont scale header string + function GetMonthLabel($aMonthNbr,$year) { + $sn = $this->iDateLocale->GetShortMonthName($aMonthNbr); + $ln = $this->iDateLocale->GetLongMonthName($aMonthNbr); + switch($this->month->iStyle) { + case MONTHSTYLE_SHORTNAME: + $m=$sn; + break; + case MONTHSTYLE_LONGNAME: + $m=$ln; + break; + case MONTHSTYLE_SHORTNAMEYEAR2: + $m=$sn." '".substr("".$year,2); + break; + case MONTHSTYLE_SHORTNAMEYEAR4: + $m=$sn." ".$year; + break; + case MONTHSTYLE_LONGNAMEYEAR2: + $m=$ln." '".substr("".$year,2); + break; + case MONTHSTYLE_LONGNAMEYEAR4: + $m=$ln." ".$year; + break; + case MONTHSTYLE_FIRSTLETTER: + $m=$sn[0]; + break; + } + return $m; + } + + // Stroke month scale and gridlines + function StrokeMonths($aYCoord,$getHeight=false) { + if( $this->month->iShowLabels ) { + $img=$this->iImg; + $img->SetFont($this->month->iFFamily,$this->month->iFStyle,$this->month->iFSize); + $yt=$aYCoord+$img->top_margin; + $yb=$yt + $img->GetFontHeight() + $this->month->iTitleVertMargin + $this->month->iFrameWeight; + if( $getHeight ) { + return $yb - $img->top_margin; + } + $monthnbr = $this->GetMonthNbr($this->iStartDate)-1; + $xt=$img->left_margin+$this->iLabelWidth; + $xb=$img->width-$img->right_margin+1; + + $img->SetColor($this->month->iBackgroundColor); + $img->FilledRectangle($xt,$yt,$xb,$yb); + + $img->SetLineWeight($this->month->grid->iWeight); + $img->SetColor($this->month->iTextColor); + $year = 0+strftime("%Y",$this->iStartDate); + $img->SetTextAlign("center"); + if( $this->GetMonthNbr($this->iStartDate) == $this->GetMonthNbr($this->iEndDate) + && $this->GetYear($this->iStartDate)==$this->GetYear($this->iEndDate) ) { + $monthwidth=$this->GetDayWidth()*($this->GetMonthDayNbr($this->iEndDate) - $this->GetMonthDayNbr($this->iStartDate) + 1); + } + else { + $monthwidth=$this->GetDayWidth()*($this->GetNumDaysInMonth($monthnbr,$year)-$this->GetMonthDayNbr($this->iStartDate)+1); + } + // Is it enough space to stroke the first month? + $monthName = $this->GetMonthLabel($monthnbr,$year); + if( $monthwidth >= 1.2*$img->GetTextWidth($monthName) ) { + $img->SetColor($this->month->iTextColor); + $img->StrokeText(round($xt+$monthwidth/2+1), + round($yb-$this->month->iTitleVertMargin), + $monthName); + } + $x = $xt + $monthwidth; + while( $x < $xb ) { + $img->SetColor($this->month->grid->iColor); + $img->Line($x,$yt,$x,$yb); + $this->month->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); + $monthnbr++; + if( $monthnbr==12 ) { + $monthnbr=0; + $year++; + } + $monthName = $this->GetMonthLabel($monthnbr,$year); + $monthwidth=$this->GetDayWidth()*$this->GetNumDaysInMonth($monthnbr,$year); + if( $x + $monthwidth < $xb ) + $w = $monthwidth; + else + $w = $xb-$x; + if( $w >= 1.2*$img->GetTextWidth($monthName) ) { + $img->SetColor($this->month->iTextColor); + $img->StrokeText(round($x+$w/2+1), + round($yb-$this->month->iTitleVertMargin),$monthName); + } + $x += $monthwidth; + } + $img->SetColor($this->month->iFrameColor); + $img->SetLineWeight($this->month->iFrameWeight); + $img->Rectangle($xt,$yt,$xb,$yb); + return $yb-$img->top_margin; + } + return $aYCoord; + } + + // Stroke year scale and gridlines + function StrokeYears($aYCoord,$getHeight=false) { + if( $this->year->iShowLabels ) { + $img=$this->iImg; + $yt=$aYCoord+$img->top_margin; + $img->SetFont($this->year->iFFamily,$this->year->iFStyle,$this->year->iFSize); + $yb=$yt + $img->GetFontHeight() + $this->year->iTitleVertMargin + $this->year->iFrameWeight; + + if( $getHeight ) { + return $yb - $img->top_margin; + } + + $xb=$img->width-$img->right_margin+1; + $xt=$img->left_margin+$this->iLabelWidth; + $year = $this->GetYear($this->iStartDate); + $img->SetColor($this->year->iBackgroundColor); + $img->FilledRectangle($xt,$yt,$xb,$yb); + $img->SetLineWeight($this->year->grid->iWeight); + $img->SetTextAlign("center"); + if( $year == $this->GetYear($this->iEndDate) ) + $yearwidth=$this->GetDayWidth()*($this->GetYearDayNbr($this->iEndDate)-$this->GetYearDayNbr($this->iStartDate)+1); + else + $yearwidth=$this->GetDayWidth()*($this->GetNumDaysInYear($year)-$this->GetYearDayNbr($this->iStartDate)+1); + + // The space for a year must be at least 20% bigger than the actual text + // so we allow 10% margin on each side + if( $yearwidth >= 1.20*$img->GetTextWidth("".$year) ) { + $img->SetColor($this->year->iTextColor); + $img->StrokeText(round($xt+$yearwidth/2+1), + round($yb-$this->year->iTitleVertMargin), + $year); + } + $x = $xt + $yearwidth; + while( $x < $xb ) { + $img->SetColor($this->year->grid->iColor); + $img->Line($x,$yt,$x,$yb); + $this->year->grid->Stroke($img,$x,$yb,$x,$img->height-$img->bottom_margin); + $year += 1; + $yearwidth=$this->GetDayWidth()*$this->GetNumDaysInYear($year); + if( $x + $yearwidth < $xb ) + $w = $yearwidth; + else + $w = $xb-$x; + if( $w >= 1.2*$img->GetTextWidth("".$year) ) { + $img->SetColor($this->year->iTextColor); + $img->StrokeText(round($x+$w/2+1), + round($yb-$this->year->iTitleVertMargin), + $year); + } + $x += $yearwidth; + } + $img->SetColor($this->year->iFrameColor); + $img->SetLineWeight($this->year->iFrameWeight); + $img->Rectangle($xt,$yt,$xb,$yb); + return $yb-$img->top_margin; + } + return $aYCoord; + } + + // Stroke table title (upper left corner) + function StrokeTableHeaders($aYBottom) { + $img=$this->iImg; + $xt=$img->left_margin; + $yt=$img->top_margin; + $xb=$xt+$this->iLabelWidth; + $yb=$aYBottom+$img->top_margin; + + if( $this->tableTitle->iShow ) { + $img->SetColor($this->iTableHeaderBackgroundColor); + $img->FilledRectangle($xt,$yt,$xb,$yb); + $this->tableTitle->Align("center","top"); + $this->tableTitle->Stroke($img,$xt+($xb-$xt)/2+1,$yt+2); + $img->SetColor($this->iTableHeaderFrameColor); + $img->SetLineWeight($this->iTableHeaderFrameWeight); + $img->Rectangle($xt,$yt,$xb,$yb); + } + + $this->actinfo->Stroke($img,$xt,$yt,$xb,$yb,$this->tableTitle->iShow); + + + // Draw the horizontal dividing line + $this->dividerh->Stroke($img,$xt,$yb,$img->width-$img->right_margin,$yb); + + // Draw the vertical dividing line + // We do the width "manually" since we want the line only to grow + // to the left + $fancy = $this->divider->iStyle == 'fancy' ; + if( $fancy ) { + $this->divider->iStyle = 'solid'; + } + + $tmp = $this->divider->iWeight; + $this->divider->iWeight=1; + $y = $img->height-$img->bottom_margin; + for($i=0; $i < $tmp; ++$i ) { + $this->divider->Stroke($img,$xb-$i,$yt,$xb-$i,$y); + } + + // Should we draw "fancy" divider + if( $fancy ) { + $img->SetLineWeight(1); + $img->SetColor($this->iTableHeaderFrameColor); + $img->Line($xb,$yt,$xb,$y); + $img->Line($xb-$tmp+1,$yt,$xb-$tmp+1,$y); + $img->SetColor('white'); + $img->Line($xb-$tmp+2,$yt,$xb-$tmp+2,$y); + } + } + + // Main entry point to stroke scale + function Stroke() { + if( !$this->IsRangeSet() ) + JpGraphError::RaiseL(6022); +//("Gantt scale has not been specified."); + $img=$this->iImg; + + // If minutes are displayed then hour interval must be 1 + if( $this->IsDisplayMinute() && $this->hour->GetIntervall() > 1 ) { + JpGraphError::RaiseL(6023); +//('If you display both hour and minutes the hour intervall must be 1 (Otherwise it doesn\' make sense to display minutes).'); + } + + // Stroke all headers. As argument we supply the offset from the + // top which depends on any previous headers + + // First find out the height of each header + $offy=$this->StrokeYears(0,true); + $offm=$this->StrokeMonths($offy,true); + $offw=$this->StrokeWeeks($offm,true); + $offd=$this->StrokeDays($offw,true); + $offh=$this->StrokeHours($offd,true); + $offmin=$this->StrokeMinutes($offh,true); + + + // ... then we can stroke them in the "backwards order to ensure that + // the larger scale gridlines is stroked over the smaller scale gridline + $this->StrokeMinutes($offh); + $this->StrokeHours($offd); + $this->StrokeDays($offw); + $this->StrokeWeeks($offm); + $this->StrokeMonths($offy); + $this->StrokeYears(0); + + // Now when we now the oaverall size of the scale headers + // we can stroke the overall table headers + $this->StrokeTableHeaders($offmin); + + // Now we can calculate the correct scaling factor for each vertical position + $this->iAvailableHeight = $img->height - $img->top_margin - $img->bottom_margin - $offd; + $this->iVertHeaderSize = $offmin; + if( $this->iVertSpacing == -1 ) + $this->iVertSpacing = $this->iAvailableHeight / $this->iVertLines; + } +} + + +//=================================================== +// CLASS GanttConstraint +// Just a structure to store all the values for a constraint +//=================================================== +class GanttConstraint { + var $iConstrainType; + var $iConstrainRow; + var $iConstrainColor; + var $iConstrainArrowSize; + var $iConstrainArrowType; + +//--------------- +// CONSTRUCTOR + function GanttConstraint($aRow,$aType,$aColor,$aArrowSize,$aArrowType){ + $this->iConstrainType = $aType; + $this->iConstrainRow = $aRow; + $this->iConstrainColor=$aColor; + $this->iConstrainArrowSize=$aArrowSize; + $this->iConstrainArrowType=$aArrowType; + } +} + + +//=================================================== +// CLASS GanttPlotObject +// The common signature for a Gantt object +//=================================================== +class GanttPlotObject { + var $iVPos=0; // Vertical position + var $iLabelLeftMargin=2; // Title margin + var $iStart=""; // Start date + var $title,$caption; + var $iCaptionMargin=5; + var $csimarea='',$csimtarget='',$csimwintarget='',$csimalt=''; + + var $constraints = array(); + var $iConstrainPos=array(); + + function GanttPlotObject() { + $this->title = new TextProperty(); + $this->title->Align("left","center"); + $this->caption = new TextProperty(); + } + + function GetCSIMArea() { + return $this->csimarea; + } + + function SetCSIMTarget($aTarget,$aAlt='',$aWinTarget='') { + if( !is_string($aTarget) ) { + $tv = substr(var_export($aTarget,true),0,40); + JpGraphError::RaiseL(6024,$tv); +//('CSIM Target must be specified as a string.'."\nStart of target is:\n$tv"); + } + if( !is_string($aAlt) ) { + $tv = substr(var_export($aAlt,true),0,40); + JpGraphError::RaiseL(6025,$tv); +//('CSIM Alt text must be specified as a string.'."\nStart of alt text is:\n$tv"); + } + + $this->csimtarget=$aTarget; + $this->csimwintarget=$aWinTarget; + $this->csimalt=$aAlt; + } + + function SetCSIMAlt($aAlt) { + if( !is_string($aAlt) ) { + $tv = substr(var_export($aAlt,true),0,40); + JpGraphError::RaiseL(6025,$tv); +//('CSIM Alt text must be specified as a string.'."\nStart of alt text is:\n$tv"); + } + $this->csimalt=$aAlt; + } + + function SetConstrain($aRow,$aType,$aColor='black',$aArrowSize=ARROW_S2,$aArrowType=ARROWT_SOLID) { + $this->constraints[] = new GanttConstraint($aRow, $aType, $aColor, $aArrowSize, $aArrowType); + } + + function SetConstrainPos($xt,$yt,$xb,$yb) { + $this->iConstrainPos = array($xt,$yt,$xb,$yb); + } + + /* + function GetConstrain() { + return array($this->iConstrainRow,$this->iConstrainType); + } + */ + + function GetMinDate() { + return $this->iStart; + } + + function GetMaxDate() { + return $this->iStart; + } + + function SetCaptionMargin($aMarg) { + $this->iCaptionMargin=$aMarg; + } + + function GetAbsHeight(&$aImg) { + return 0; + } + + function GetLineNbr() { + return $this->iVPos; + } + + function SetLabelLeftMargin($aOff) { + $this->iLabelLeftMargin=$aOff; + } + + function StrokeActInfo(&$aImg,$aScale,$aYPos) { + $cols=array(); + $aScale->actinfo->GetColStart($aImg,$cols,true); + $this->title->Stroke($aImg,$cols,$aYPos); + } +} + +//=================================================== +// CLASS Progress +// Holds parameters for the progress indicator +// displyed within a bar +//=================================================== +class Progress { + var $iProgress=-1, $iColor="black", $iFillColor='black'; + var $iPattern=GANTT_SOLID; + var $iDensity=98, $iHeight=0.65; + + function Set($aProg) { + if( $aProg < 0.0 || $aProg > 1.0 ) + JpGraphError::RaiseL(6027); +//("Progress value must in range [0, 1]"); + $this->iProgress = $aProg; + } + + function SetPattern($aPattern,$aColor="blue",$aDensity=98) { + $this->iPattern = $aPattern; + $this->iColor = $aColor; + $this->iDensity = $aDensity; + } + + function SetFillColor($aColor) { + $this->iFillColor = $aColor; + } + + function SetHeight($aHeight) { + $this->iHeight = $aHeight; + } +} + +DEFINE('GANTT_HGRID1',0); +DEFINE('GANTT_HGRID2',1); + +//=================================================== +// CLASS HorizontalGridLine +// Responsible for drawinf horizontal gridlines and filled alternatibg rows +//=================================================== +class HorizontalGridLine { + var $iGraph=NULL; + var $iRowColor1 = '', $iRowColor2 = ''; + var $iShow=false; + var $line=null; + var $iStart=0; // 0=from left margin, 1=just along header + + function HorizontalGridLine() { + $this->line = new LineProperty(); + $this->line->SetColor('gray@0.4'); + $this->line->SetStyle('dashed'); + } + + function Show($aShow=true) { + $this->iShow = $aShow; + } + + function SetRowFillColor($aColor1,$aColor2='') { + $this->iRowColor1 = $aColor1; + $this->iRowColor2 = $aColor2; + } + + function SetStart($aStart) { + $this->iStart = $aStart; + } + + function Stroke(&$aImg,$aScale) { + + if( ! $this->iShow ) return; + + // Get horizontal width of line + /* + $limst = $aScale->iStartDate; + $limen = $aScale->iEndDate; + $xt = round($aScale->TranslateDate($aScale->iStartDate)); + $xb = round($aScale->TranslateDate($limen)); + */ + + if( $this->iStart === 0 ) { + $xt = $aImg->left_margin-1; + } + else { + $xt = round($aScale->TranslateDate($aScale->iStartDate))+1; + } + + $xb = $aImg->width-$aImg->right_margin; + + $yt = round($aScale->TranslateVertPos(0)); + $yb = round($aScale->TranslateVertPos(1)); + $height = $yb - $yt; + + // Loop around for all lines in the chart + for($i=0; $i < $aScale->iVertLines; ++$i ) { + $yb = $yt - $height; + $this->line->Stroke($aImg,$xt,$yb,$xb,$yb); + if( $this->iRowColor1 !== '' ) { + if( $i % 2 == 0 ) { + $aImg->PushColor($this->iRowColor1); + $aImg->FilledRectangle($xt,$yt,$xb,$yb); + $aImg->PopColor(); + } + elseif( $this->iRowColor2 !== '' ) { + $aImg->PushColor($this->iRowColor2); + $aImg->FilledRectangle($xt,$yt,$xb,$yb); + $aImg->PopColor(); + } + } + $yt = round($aScale->TranslateVertPos($i+1)); + } + $yb = $yt - $height; + $this->line->Stroke($aImg,$xt,$yb,$xb,$yb); + } +} + + +//=================================================== +// CLASS GanttBar +// Responsible for formatting individual gantt bars +//=================================================== +class GanttBar extends GanttPlotObject { + var $iEnd; + var $iHeightFactor=0.5; + var $iFillColor="white",$iFrameColor="black"; + var $iShadow=false,$iShadowColor="darkgray",$iShadowWidth=1,$iShadowFrame="black"; + var $iPattern=GANTT_RDIAG,$iPatternColor="blue",$iPatternDensity=95; + var $leftMark,$rightMark; + var $progress; +//--------------- +// CONSTRUCTOR + function GanttBar($aPos,$aLabel,$aStart,$aEnd,$aCaption="",$aHeightFactor=0.6) { + parent::GanttPlotObject(); + $this->iStart = $aStart; + // Is the end date given as a date or as number of days added to start date? + if( is_string($aEnd) ) { + // If end date has been specified without a time we will asssume + // end date is at the end of that date + if( strpos($aEnd,':') === false ) + $this->iEnd = strtotime($aEnd)+SECPERDAY-1; + else + $this->iEnd = $aEnd; + } + elseif(is_int($aEnd) || is_float($aEnd) ) + $this->iEnd = strtotime($aStart)+round($aEnd*SECPERDAY); + $this->iVPos = $aPos; + $this->iHeightFactor = $aHeightFactor; + $this->title->Set($aLabel); + $this->caption = new TextProperty($aCaption); + $this->caption->Align("left","center"); + $this->leftMark =new PlotMark(); + $this->leftMark->Hide(); + $this->rightMark=new PlotMark(); + $this->rightMark->Hide(); + $this->progress = new Progress(); + } + +//--------------- +// PUBLIC METHODS + function SetShadow($aShadow=true,$aColor="gray") { + $this->iShadow=$aShadow; + $this->iShadowColor=$aColor; + } + + function GetMaxDate() { + return $this->iEnd; + } + + function SetHeight($aHeight) { + $this->iHeightFactor = $aHeight; + } + + function SetColor($aColor) { + $this->iFrameColor = $aColor; + } + + function SetFillColor($aColor) { + $this->iFillColor = $aColor; + } + + function GetAbsHeight(&$aImg) { + if( is_int($this->iHeightFactor) || $this->leftMark->show || $this->rightMark->show ) { + $m=-1; + if( is_int($this->iHeightFactor) ) + $m = $this->iHeightFactor; + if( $this->leftMark->show ) + $m = max($m,$this->leftMark->width*2); + if( $this->rightMark->show ) + $m = max($m,$this->rightMark->width*2); + return $m; + } + else + return -1; + } + + function SetPattern($aPattern,$aColor="blue",$aDensity=95) { + $this->iPattern = $aPattern; + $this->iPatternColor = $aColor; + $this->iPatternDensity = $aDensity; + } + + function Stroke(&$aImg,$aScale) { + $factory = new RectPatternFactory(); + $prect = $factory->Create($this->iPattern,$this->iPatternColor); + $prect->SetDensity($this->iPatternDensity); + + // If height factor is specified as a float between 0,1 then we take it as meaning + // percetage of the scale width between horizontal line. + // If it is an integer > 1 we take it to mean the absolute height in pixels + if( $this->iHeightFactor > -0.0 && $this->iHeightFactor <= 1.1) + $vs = $aScale->GetVertSpacing()*$this->iHeightFactor; + elseif(is_int($this->iHeightFactor) && $this->iHeightFactor>2 && $this->iHeightFactor < 200 ) + $vs = $this->iHeightFactor; + else + JpGraphError::RaiseL(6028,$this->iHeightFactor); +//("Specified height (".$this->iHeightFactor.") for gantt bar is out of range."); + + // Clip date to min max dates to show + $st = $aScale->NormalizeDate($this->iStart); + $en = $aScale->NormalizeDate($this->iEnd); + + + $limst = max($st,$aScale->iStartDate); + $limen = min($en,$aScale->iEndDate); + + $xt = round($aScale->TranslateDate($limst)); + $xb = round($aScale->TranslateDate($limen)); + $yt = round($aScale->TranslateVertPos($this->iVPos)-$vs-($aScale->GetVertSpacing()/2-$vs/2)); + $yb = round($aScale->TranslateVertPos($this->iVPos)-($aScale->GetVertSpacing()/2-$vs/2)); + $middle = round($yt+($yb-$yt)/2); + $this->StrokeActInfo($aImg,$aScale,$middle); + + // CSIM for title + if( ! empty($this->title->csimtarget) ) { + $colwidth = $this->title->GetColWidth($aImg); + $colstarts=array(); + $aScale->actinfo->GetColStart($aImg,$colstarts,true); + $n = min(count($colwidth),count($this->title->csimtarget)); + for( $i=0; $i < $n; ++$i ) { + $title_xt = $colstarts[$i]; + $title_xb = $title_xt + $colwidth[$i]; + $coords = "$title_xt,$yt,$title_xb,$yt,$title_xb,$yb,$title_xt,$yb"; + + if( ! empty($this->title->csimtarget[$i]) ) { + $this->csimarea .= "title->csimtarget[$i]."\""; + + if( ! empty($this->title->csimwintarget[$i]) ) { + $this->csimarea .= "target=\"".$this->title->csimwintarget[$i]."\" "; + } + + if( ! empty($this->title->csimalt[$i]) ) { + $tmp = $this->title->csimalt[$i]; + $this->csimarea .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimarea .= " />\n"; + } + } + } + + // Check if the bar is totally outside the current scale range + if( $en < $aScale->iStartDate || $st > $aScale->iEndDate ) + return; + + + // Remember the positions for the bar + $this->SetConstrainPos($xt,$yt,$xb,$yb); + + $prect->ShowFrame(false); + $prect->SetBackground($this->iFillColor); + if( $this->iShadow ) { + $aImg->SetColor($this->iFrameColor); + $aImg->ShadowRectangle($xt,$yt,$xb,$yb,$this->iFillColor,$this->iShadowWidth,$this->iShadowColor); + $prect->SetPos(new Rectangle($xt+1,$yt+1,$xb-$xt-$this->iShadowWidth-2,$yb-$yt-$this->iShadowWidth-2)); + $prect->Stroke($aImg); + } + else { + $prect->SetPos(new Rectangle($xt,$yt,$xb-$xt+1,$yb-$yt+1)); + $prect->Stroke($aImg); + $aImg->SetColor($this->iFrameColor); + $aImg->Rectangle($xt,$yt,$xb,$yb); + } + + // CSIM for bar + if( ! empty($this->csimtarget) ) { + + $coords = "$xt,$yt,$xb,$yt,$xb,$yb,$xt,$yb"; + $this->csimarea .= "csimtarget."\""; + + if( !empty($this->csimwintarget) ) { + $this->csimarea .= " target=\"".$this->csimwintarget."\" "; + } + + if( $this->csimalt != '' ) { + $tmp = $this->csimalt; + $this->csimarea .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimarea .= " />\n"; + } + + // Draw progress bar inside activity bar + if( $this->progress->iProgress > 0 ) { + + $xtp = $aScale->TranslateDate($st); + $xbp = $aScale->TranslateDate($en); + $len = ($xbp-$xtp)*$this->progress->iProgress; + + $endpos = $xtp+$len; + + // Is the the progress bar visible after the start date? + if( $endpos > $xt ) { + + // Take away the length of the progress that is not visible (before the start date) + $len -= ($xt-$xtp); + + // Is the the progress bar visible after the start date? + if( $xtp < $xt ) + $xtp = $xt; + + // Make sure that the progess bar doesn't extend over the end date + if( $xtp+$len-1 > $xb ) + $len = $xb - $xtp ; + + $prog = $factory->Create($this->progress->iPattern,$this->progress->iColor); + $prog->SetDensity($this->progress->iDensity); + $prog->SetBackground($this->progress->iFillColor); + $barheight = ($yb-$yt+1); + if( $this->iShadow ) + $barheight -= $this->iShadowWidth; + $progressheight = floor($barheight*$this->progress->iHeight); + $marg = ceil(($barheight-$progressheight)/2); + $pos = new Rectangle($xtp,$yt + $marg, $len,$barheight-2*$marg); + $prog->SetPos($pos); + $prog->Stroke($aImg); + } + } + + // We don't plot the end mark if the bar has been capped + if( $limst == $st ) { + $y = $middle; + // We treat the RIGHT and LEFT triangle mark a little bi + // special so that these marks are placed right under the + // bar. + if( $this->leftMark->GetType() == MARK_LEFTTRIANGLE ) { + $y = $yb ; + } + $this->leftMark->Stroke($aImg,$xt,$y); + } + if( $limen == $en ) { + $y = $middle; + // We treat the RIGHT and LEFT triangle mark a little bi + // special so that these marks are placed right under the + // bar. + if( $this->rightMark->GetType() == MARK_RIGHTTRIANGLE ) { + $y = $yb ; + } + $this->rightMark->Stroke($aImg,$xb,$y); + + $margin = $this->iCaptionMargin; + if( $this->rightMark->show ) + $margin += $this->rightMark->GetWidth(); + $this->caption->Stroke($aImg,$xb+$margin,$middle); + } + } +} + +//=================================================== +// CLASS MileStone +// Responsible for formatting individual milestones +//=================================================== +class MileStone extends GanttPlotObject { + var $mark; + +//--------------- +// CONSTRUCTOR + function MileStone($aVPos,$aLabel,$aDate,$aCaption="") { + GanttPlotObject::GanttPlotObject(); + $this->caption->Set($aCaption); + $this->caption->Align("left","center"); + $this->caption->SetFont(FF_FONT1,FS_BOLD); + $this->title->Set($aLabel); + $this->title->SetColor("darkred"); + $this->mark = new PlotMark(); + $this->mark->SetWidth(10); + $this->mark->SetType(MARK_DIAMOND); + $this->mark->SetColor("darkred"); + $this->mark->SetFillColor("darkred"); + $this->iVPos = $aVPos; + $this->iStart = $aDate; + } + +//--------------- +// PUBLIC METHODS + + function GetAbsHeight(&$aImg) { + return max($this->title->GetHeight($aImg),$this->mark->GetWidth()); + } + + function Stroke(&$aImg,$aScale) { + // Put the mark in the middle at the middle of the day + $d = $aScale->NormalizeDate($this->iStart)+SECPERDAY/2; + $x = $aScale->TranslateDate($d); + $y = $aScale->TranslateVertPos($this->iVPos)-($aScale->GetVertSpacing()/2); + + $this->StrokeActInfo($aImg,$aScale,$y); + + // CSIM for title + if( ! empty($this->title->csimtarget) ) { + + $yt = round($y - $this->title->GetHeight($aImg)/2); + $yb = round($y + $this->title->GetHeight($aImg)/2); + + $colwidth = $this->title->GetColWidth($aImg); + $colstarts=array(); + $aScale->actinfo->GetColStart($aImg,$colstarts,true); + $n = min(count($colwidth),count($this->title->csimtarget)); + for( $i=0; $i < $n; ++$i ) { + $title_xt = $colstarts[$i]; + $title_xb = $title_xt + $colwidth[$i]; + $coords = "$title_xt,$yt,$title_xb,$yt,$title_xb,$yb,$title_xt,$yb"; + + if( !empty($this->title->csimtarget[$i]) ) { + + $this->csimarea .= "title->csimtarget[$i]."\""; + + if( !empty($this->title->csimwintarget[$i]) ) { + $this->csimarea .= "target=\"".$this->title->csimwintarget[$i]."\""; + } + + if( ! empty($this->title->csimalt[$i]) ) { + $tmp = $this->title->csimalt[$i]; + $this->csimarea .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimarea .= " />\n"; + + } + } + } + + if( $d < $aScale->iStartDate || $d > $aScale->iEndDate ) + return; + + // Remember the coordinates for any constrains linking to + // this milestone + $w = $this->mark->GetWidth()/2; + $this->SetConstrainPos($x,round($y-$w),$x,round($y+$w)); + + // Setup CSIM + if( $this->csimtarget != '' ) { + $this->mark->SetCSIMTarget( $this->csimtarget ); + $this->mark->SetCSIMAlt( $this->csimalt ); + } + + $this->mark->Stroke($aImg,$x,$y); + $this->caption->Stroke($aImg,$x+$this->mark->width/2+$this->iCaptionMargin,$y); + + $this->csimarea .= $this->mark->GetCSIMAreas(); + } +} + + +//=================================================== +// CLASS GanttVLine +// Responsible for formatting individual milestones +//=================================================== + +class TextPropertyBelow extends TextProperty { + function TextPropertyBelow($aTxt='') { + parent::TextProperty($aTxt); + } + + function GetColWidth(&$aImg,$margin) { + // Since we are not stroking the title in the columns + // but rather under the graph we want this to return 0. + return array(0); + } +} + +class GanttVLine extends GanttPlotObject { + + var $iLine,$title_margin=3; + var $iDayOffset=1; // Defult to right edge of day + +//--------------- +// CONSTRUCTOR + function GanttVLine($aDate,$aTitle="",$aColor="black",$aWeight=3,$aStyle="dashed") { + GanttPlotObject::GanttPlotObject(); + $this->iLine = new LineProperty(); + $this->iLine->SetColor($aColor); + $this->iLine->SetWeight($aWeight); + $this->iLine->SetStyle($aStyle); + $this->iStart = $aDate; + $this->title = new TextPropertyBelow(); + $this->title->Set($aTitle); + } + +//--------------- +// PUBLIC METHODS + + function SetDayOffset($aOff=0.5) { + if( $aOff < 0.0 || $aOff > 1.0 ) + JpGraphError::RaiseL(6029); +//("Offset for vertical line must be in range [0,1]"); + $this->iDayOffset = $aOff; + } + + function SetTitleMargin($aMarg) { + $this->title_margin = $aMarg; + } + + function Stroke(&$aImg,$aScale) { + $d = $aScale->NormalizeDate($this->iStart); + if( $d < $aScale->iStartDate || $d > $aScale->iEndDate ) + return; + if($this->iDayOffset != 0.0) + $d += 24*60*60*$this->iDayOffset; + $x = $aScale->TranslateDate($d); + $y1 = $aScale->iVertHeaderSize+$aImg->top_margin; + $y2 = $aImg->height - $aImg->bottom_margin; + $this->iLine->Stroke($aImg,$x,$y1,$x,$y2); + $this->title->Align("center","top"); + $this->title->Stroke($aImg,$x,$y2+$this->title_margin); + } +} + +//=================================================== +// CLASS LinkArrow +// Handles the drawing of a an arrow +//=================================================== +class LinkArrow { + var $ix,$iy; + var $isizespec = array( + array(2,3),array(3,5),array(3,8),array(6,15),array(8,22)); + var $iDirection=ARROW_DOWN,$iType=ARROWT_SOLID,$iSize=ARROW_S2; + var $iColor='black'; + + function LinkArrow($x,$y,$aDirection,$aType=ARROWT_SOLID,$aSize=ARROW_S2) { + $this->iDirection = $aDirection; + $this->iType = $aType; + $this->iSize = $aSize; + $this->ix = $x; + $this->iy = $y; + } + + function SetColor($aColor) { + $this->iColor = $aColor; + } + + function SetSize($aSize) { + $this->iSize = $aSize; + } + + function SetType($aType) { + $this->iType = $aType; + } + + function Stroke(&$aImg) { + list($dx,$dy) = $this->isizespec[$this->iSize]; + $x = $this->ix; + $y = $this->iy; + switch ( $this->iDirection ) { + case ARROW_DOWN: + $c = array($x,$y,$x-$dx,$y-$dy,$x+$dx,$y-$dy,$x,$y); + break; + case ARROW_UP: + $c = array($x,$y,$x-$dx,$y+$dy,$x+$dx,$y+$dy,$x,$y); + break; + case ARROW_LEFT: + $c = array($x,$y,$x+$dy,$y-$dx,$x+$dy,$y+$dx,$x,$y); + break; + case ARROW_RIGHT: + $c = array($x,$y,$x-$dy,$y-$dx,$x-$dy,$y+$dx,$x,$y); + break; + default: + JpGraphError::RaiseL(6030); +//('Unknown arrow direction for link.'); + die(); + break; + } + $aImg->SetColor($this->iColor); + switch( $this->iType ) { + case ARROWT_SOLID: + $aImg->FilledPolygon($c); + break; + case ARROWT_OPEN: + $aImg->Polygon($c); + break; + default: + JpGraphError::RaiseL(6031); +//('Unknown arrow type for link.'); + die(); + break; + } + } +} + +//=================================================== +// CLASS GanttLink +// Handles the drawing of a link line between 2 points +//=================================================== + +class GanttLink { + var $ix1,$ix2,$iy1,$iy2; + var $iPathType=2,$iPathExtend=15; + var $iColor='black',$iWeight=1; + var $iArrowSize=ARROW_S2,$iArrowType=ARROWT_SOLID; + + function GanttLink($x1=0,$y1=0,$x2=0,$y2=0) { + $this->ix1 = $x1; + $this->ix2 = $x2; + $this->iy1 = $y1; + $this->iy2 = $y2; + } + + function SetPos($x1,$y1,$x2,$y2) { + $this->ix1 = $x1; + $this->ix2 = $x2; + $this->iy1 = $y1; + $this->iy2 = $y2; + } + + function SetPath($aPath) { + $this->iPathType = $aPath; + } + + function SetColor($aColor) { + $this->iColor = $aColor; + } + + function SetArrow($aSize,$aType=ARROWT_SOLID) { + $this->iArrowSize = $aSize; + $this->iArrowType = $aType; + } + + function SetWeight($aWeight) { + $this->iWeight = $aWeight; + } + + function Stroke(&$aImg) { + // The way the path for the arrow is constructed is partly based + // on some heuristics. This is not an exact science but draws the + // path in a way that, for me, makes esthetic sence. For example + // if the start and end activities are very close we make a small + // detour to endter the target horixontally. If there are more + // space between axctivities then no suh detour is made and the + // target is "hit" directly vertical. I have tried to keep this + // simple. no doubt this could become almost infinitive complex + // and have some real AI. Feel free to modify this. + // This will no-doubt be tweaked as times go by. One design aim + // is to avoid having the user choose what types of arrow + // he wants. + + // The arrow is drawn between (x1,y1) to (x2,y2) + $x1 = $this->ix1 ; + $x2 = $this->ix2 ; + $y1 = $this->iy1 ; + $y2 = $this->iy2 ; + + // Depending on if the target is below or above we have to + // handle thi different. + if( $y2 > $y1 ) { + $arrowtype = ARROW_DOWN; + $midy = round(($y2-$y1)/2+$y1); + if( $x2 > $x1 ) { + switch ( $this->iPathType ) { + case 0: + $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); + break; + case 1: + case 2: + case 3: + $c = array($x1,$y1,$x2,$y1,$x2,$y2); + break; + default: + JpGraphError::RaiseL(6032,$this->iPathType); +//('Internal error: Unknown path type (='.$this->iPathType .') specified for link.'); + exit(1); + break; + } + } + else { + switch ( $this->iPathType ) { + case 0: + case 1: + $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); + break; + case 2: + // Always extend out horizontally a bit from the first point + // If we draw a link back in time (end to start) and the bars + // are very close we also change the path so it comes in from + // the left on the activity + $c = array($x1,$y1,$x1+$this->iPathExtend,$y1, + $x1+$this->iPathExtend,$midy, + $x2,$midy,$x2,$y2); + break; + case 3: + if( $y2-$midy < 6 ) { + $c = array($x1,$y1,$x1,$midy, + $x2-$this->iPathExtend,$midy, + $x2-$this->iPathExtend,$y2, + $x2,$y2); + $arrowtype = ARROW_RIGHT; + } + else { + $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); + } + break; + default: + JpGraphError::RaiseL(6032,$this->iPathType); +//('Internal error: Unknown path type specified for link.'); + exit(1); + break; + } + } + $arrow = new LinkArrow($x2,$y2,$arrowtype); + } + else { + // Y2 < Y1 + $arrowtype = ARROW_UP; + $midy = round(($y1-$y2)/2+$y2); + if( $x2 > $x1 ) { + switch ( $this->iPathType ) { + case 0: + case 1: + $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); + break; + case 3: + if( $midy-$y2 < 8 ) { + $arrowtype = ARROW_RIGHT; + $c = array($x1,$y1,$x1,$y2,$x2,$y2); + } + else { + $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); + } + break; + default: + JpGraphError::RaiseL(6032,$this->iPathType); +//('Internal error: Unknown path type specified for link.'); + break; + } + } + else { + switch ( $this->iPathType ) { + case 0: + case 1: + $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); + break; + case 2: + // Always extend out horizontally a bit from the first point + $c = array($x1,$y1,$x1+$this->iPathExtend,$y1, + $x1+$this->iPathExtend,$midy, + $x2,$midy,$x2,$y2); + break; + case 3: + if( $midy-$y2 < 16 ) { + $arrowtype = ARROW_RIGHT; + $c = array($x1,$y1,$x1,$midy,$x2-$this->iPathExtend,$midy, + $x2-$this->iPathExtend,$y2, + $x2,$y2); + } + else { + $c = array($x1,$y1,$x1,$midy,$x2,$midy,$x2,$y2); + } + break; + default: + JpGraphError::RaiseL(6032,$this->iPathType); +//('Internal error: Unknown path type specified for link.'); + break; + } + } + $arrow = new LinkArrow($x2,$y2,$arrowtype); + } + $aImg->SetColor($this->iColor); + $aImg->SetLineWeight($this->iWeight); + $aImg->Polygon($c); + $aImg->SetLineWeight(1); + $arrow->SetColor($this->iColor); + $arrow->SetSize($this->iArrowSize); + $arrow->SetType($this->iArrowType); + $arrow->Stroke($aImg); + } +} + +// +?> diff --git a/html/includes/jpgraph/src/jpgraph_gb2312.php b/html/includes/jpgraph/src/jpgraph_gb2312.php new file mode 100644 index 0000000000..729a02c728 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_gb2312.php @@ -0,0 +1,1552 @@ + 12288, 8482 => 12289, 8483 => 12290, 8484 => 12539, 8485 => 713, + 8486 => 711, 8487 => 168, 8488 => 12291, 8489 => 12293, 8490 => 8213, + 8491 => 65374, 8492 => 8214, 8493 => 8230, 8494 => 8216, 8495 => 8217, + 8496 => 8220, 8497 => 8221, 8498 => 12308, 8499 => 12309, 8500 => 12296, + 8501 => 12297, 8502 => 12298, 8503 => 12299, 8504 => 12300, 8505 => 12301, + 8506 => 12302, 8507 => 12303, 8508 => 12310, 8509 => 12311, 8510 => 12304, + 8511 => 12305, 8512 => 177, 8513 => 215, 8514 => 247, 8515 => 8758, + 8516 => 8743, 8517 => 8744, 8518 => 8721, 8519 => 8719, 8520 => 8746, + 8521 => 8745, 8522 => 8712, 8523 => 8759, 8524 => 8730, 8525 => 8869, + 8526 => 8741, 8527 => 8736, 8528 => 8978, 8529 => 8857, 8530 => 8747, + 8531 => 8750, 8532 => 8801, 8533 => 8780, 8534 => 8776, 8535 => 8765, + 8536 => 8733, 8537 => 8800, 8538 => 8814, 8539 => 8815, 8540 => 8804, + 8541 => 8805, 8542 => 8734, 8543 => 8757, 8544 => 8756, 8545 => 9794, + 8546 => 9792, 8547 => 176, 8548 => 8242, 8549 => 8243, 8550 => 8451, + 8551 => 65284, 8552 => 164, 8553 => 65504, 8554 => 65505, 8555 => 8240, + 8556 => 167, 8557 => 8470, 8558 => 9734, 8559 => 9733, 8560 => 9675, + 8561 => 9679, 8562 => 9678, 8563 => 9671, 8564 => 9670, 8565 => 9633, + 8566 => 9632, 8567 => 9651, 8568 => 9650, 8569 => 8251, 8570 => 8594, + 8571 => 8592, 8572 => 8593, 8573 => 8595, 8574 => 12307, 8753 => 9352, + 8754 => 9353, 8755 => 9354, 8756 => 9355, 8757 => 9356, 8758 => 9357, + 8759 => 9358, 8760 => 9359, 8761 => 9360, 8762 => 9361, 8763 => 9362, + 8764 => 9363, 8765 => 9364, 8766 => 9365, 8767 => 9366, 8768 => 9367, + 8769 => 9368, 8770 => 9369, 8771 => 9370, 8772 => 9371, 8773 => 9332, + 8774 => 9333, 8775 => 9334, 8776 => 9335, 8777 => 9336, 8778 => 9337, + 8779 => 9338, 8780 => 9339, 8781 => 9340, 8782 => 9341, 8783 => 9342, + 8784 => 9343, 8785 => 9344, 8786 => 9345, 8787 => 9346, 8788 => 9347, + 8789 => 9348, 8790 => 9349, 8791 => 9350, 8792 => 9351, 8793 => 9312, + 8794 => 9313, 8795 => 9314, 8796 => 9315, 8797 => 9316, 8798 => 9317, + 8799 => 9318, 8800 => 9319, 8801 => 9320, 8802 => 9321, 8805 => 12832, + 8806 => 12833, 8807 => 12834, 8808 => 12835, 8809 => 12836, 8810 => 12837, + 8811 => 12838, 8812 => 12839, 8813 => 12840, 8814 => 12841, 8817 => 8544, + 8818 => 8545, 8819 => 8546, 8820 => 8547, 8821 => 8548, 8822 => 8549, + 8823 => 8550, 8824 => 8551, 8825 => 8552, 8826 => 8553, 8827 => 8554, + 8828 => 8555, 8993 => 65281, 8994 => 65282, 8995 => 65283, 8996 => 65509, + 8997 => 65285, 8998 => 65286, 8999 => 65287, 9000 => 65288, 9001 => 65289, + 9002 => 65290, 9003 => 65291, 9004 => 65292, 9005 => 65293, 9006 => 65294, + 9007 => 65295, 9008 => 65296, 9009 => 65297, 9010 => 65298, 9011 => 65299, + 9012 => 65300, 9013 => 65301, 9014 => 65302, 9015 => 65303, 9016 => 65304, + 9017 => 65305, 9018 => 65306, 9019 => 65307, 9020 => 65308, 9021 => 65309, + 9022 => 65310, 9023 => 65311, 9024 => 65312, 9025 => 65313, 9026 => 65314, + 9027 => 65315, 9028 => 65316, 9029 => 65317, 9030 => 65318, 9031 => 65319, + 9032 => 65320, 9033 => 65321, 9034 => 65322, 9035 => 65323, 9036 => 65324, + 9037 => 65325, 9038 => 65326, 9039 => 65327, 9040 => 65328, 9041 => 65329, + 9042 => 65330, 9043 => 65331, 9044 => 65332, 9045 => 65333, 9046 => 65334, + 9047 => 65335, 9048 => 65336, 9049 => 65337, 9050 => 65338, 9051 => 65339, + 9052 => 65340, 9053 => 65341, 9054 => 65342, 9055 => 65343, 9056 => 65344, + 9057 => 65345, 9058 => 65346, 9059 => 65347, 9060 => 65348, 9061 => 65349, + 9062 => 65350, 9063 => 65351, 9064 => 65352, 9065 => 65353, 9066 => 65354, + 9067 => 65355, 9068 => 65356, 9069 => 65357, 9070 => 65358, 9071 => 65359, + 9072 => 65360, 9073 => 65361, 9074 => 65362, 9075 => 65363, 9076 => 65364, + 9077 => 65365, 9078 => 65366, 9079 => 65367, 9080 => 65368, 9081 => 65369, + 9082 => 65370, 9083 => 65371, 9084 => 65372, 9085 => 65373, 9086 => 65507, + 9249 => 12353, 9250 => 12354, 9251 => 12355, 9252 => 12356, 9253 => 12357, + 9254 => 12358, 9255 => 12359, 9256 => 12360, 9257 => 12361, 9258 => 12362, + 9259 => 12363, 9260 => 12364, 9261 => 12365, 9262 => 12366, 9263 => 12367, + 9264 => 12368, 9265 => 12369, 9266 => 12370, 9267 => 12371, 9268 => 12372, + 9269 => 12373, 9270 => 12374, 9271 => 12375, 9272 => 12376, 9273 => 12377, + 9274 => 12378, 9275 => 12379, 9276 => 12380, 9277 => 12381, 9278 => 12382, + 9279 => 12383, 9280 => 12384, 9281 => 12385, 9282 => 12386, 9283 => 12387, + 9284 => 12388, 9285 => 12389, 9286 => 12390, 9287 => 12391, 9288 => 12392, + 9289 => 12393, 9290 => 12394, 9291 => 12395, 9292 => 12396, 9293 => 12397, + 9294 => 12398, 9295 => 12399, 9296 => 12400, 9297 => 12401, 9298 => 12402, + 9299 => 12403, 9300 => 12404, 9301 => 12405, 9302 => 12406, 9303 => 12407, + 9304 => 12408, 9305 => 12409, 9306 => 12410, 9307 => 12411, 9308 => 12412, + 9309 => 12413, 9310 => 12414, 9311 => 12415, 9312 => 12416, 9313 => 12417, + 9314 => 12418, 9315 => 12419, 9316 => 12420, 9317 => 12421, 9318 => 12422, + 9319 => 12423, 9320 => 12424, 9321 => 12425, 9322 => 12426, 9323 => 12427, + 9324 => 12428, 9325 => 12429, 9326 => 12430, 9327 => 12431, 9328 => 12432, + 9329 => 12433, 9330 => 12434, 9331 => 12435, 9505 => 12449, 9506 => 12450, + 9507 => 12451, 9508 => 12452, 9509 => 12453, 9510 => 12454, 9511 => 12455, + 9512 => 12456, 9513 => 12457, 9514 => 12458, 9515 => 12459, 9516 => 12460, + 9517 => 12461, 9518 => 12462, 9519 => 12463, 9520 => 12464, 9521 => 12465, + 9522 => 12466, 9523 => 12467, 9524 => 12468, 9525 => 12469, 9526 => 12470, + 9527 => 12471, 9528 => 12472, 9529 => 12473, 9530 => 12474, 9531 => 12475, + 9532 => 12476, 9533 => 12477, 9534 => 12478, 9535 => 12479, 9536 => 12480, + 9537 => 12481, 9538 => 12482, 9539 => 12483, 9540 => 12484, 9541 => 12485, + 9542 => 12486, 9543 => 12487, 9544 => 12488, 9545 => 12489, 9546 => 12490, + 9547 => 12491, 9548 => 12492, 9549 => 12493, 9550 => 12494, 9551 => 12495, + 9552 => 12496, 9553 => 12497, 9554 => 12498, 9555 => 12499, 9556 => 12500, + 9557 => 12501, 9558 => 12502, 9559 => 12503, 9560 => 12504, 9561 => 12505, + 9562 => 12506, 9563 => 12507, 9564 => 12508, 9565 => 12509, 9566 => 12510, + 9567 => 12511, 9568 => 12512, 9569 => 12513, 9570 => 12514, 9571 => 12515, + 9572 => 12516, 9573 => 12517, 9574 => 12518, 9575 => 12519, 9576 => 12520, + 9577 => 12521, 9578 => 12522, 9579 => 12523, 9580 => 12524, 9581 => 12525, + 9582 => 12526, 9583 => 12527, 9584 => 12528, 9585 => 12529, 9586 => 12530, + 9587 => 12531, 9588 => 12532, 9589 => 12533, 9590 => 12534, 9761 => 913, + 9762 => 914, 9763 => 915, 9764 => 916, 9765 => 917, 9766 => 918, + 9767 => 919, 9768 => 920, 9769 => 921, 9770 => 922, 9771 => 923, + 9772 => 924, 9773 => 925, 9774 => 926, 9775 => 927, 9776 => 928, + 9777 => 929, 9778 => 931, 9779 => 932, 9780 => 933, 9781 => 934, + 9782 => 935, 9783 => 936, 9784 => 937, 9793 => 945, 9794 => 946, + 9795 => 947, 9796 => 948, 9797 => 949, 9798 => 950, 9799 => 951, + 9800 => 952, 9801 => 953, 9802 => 954, 9803 => 955, 9804 => 956, + 9805 => 957, 9806 => 958, 9807 => 959, 9808 => 960, 9809 => 961, + 9810 => 963, 9811 => 964, 9812 => 965, 9813 => 966, 9814 => 967, + 9815 => 968, 9816 => 969, 10017 => 1040, 10018 => 1041, 10019 => 1042, + 10020 => 1043, 10021 => 1044, 10022 => 1045, 10023 => 1025, 10024 => 1046, + 10025 => 1047, 10026 => 1048, 10027 => 1049, 10028 => 1050, 10029 => 1051, + 10030 => 1052, 10031 => 1053, 10032 => 1054, 10033 => 1055, 10034 => 1056, + 10035 => 1057, 10036 => 1058, 10037 => 1059, 10038 => 1060, 10039 => 1061, + 10040 => 1062, 10041 => 1063, 10042 => 1064, 10043 => 1065, 10044 => 1066, + 10045 => 1067, 10046 => 1068, 10047 => 1069, 10048 => 1070, 10049 => 1071, + 10065 => 1072, 10066 => 1073, 10067 => 1074, 10068 => 1075, 10069 => 1076, + 10070 => 1077, 10071 => 1105, 10072 => 1078, 10073 => 1079, 10074 => 1080, + 10075 => 1081, 10076 => 1082, 10077 => 1083, 10078 => 1084, 10079 => 1085, + 10080 => 1086, 10081 => 1087, 10082 => 1088, 10083 => 1089, 10084 => 1090, + 10085 => 1091, 10086 => 1092, 10087 => 1093, 10088 => 1094, 10089 => 1095, + 10090 => 1096, 10091 => 1097, 10092 => 1098, 10093 => 1099, 10094 => 1100, + 10095 => 1101, 10096 => 1102, 10097 => 1103, 10273 => 257, 10274 => 225, + 10275 => 462, 10276 => 224, 10277 => 275, 10278 => 233, 10279 => 283, + 10280 => 232, 10281 => 299, 10282 => 237, 10283 => 464, 10284 => 236, + 10285 => 333, 10286 => 243, 10287 => 466, 10288 => 242, 10289 => 363, + 10290 => 250, 10291 => 468, 10292 => 249, 10293 => 470, 10294 => 472, + 10295 => 474, 10296 => 476, 10297 => 252, 10298 => 234, 10309 => 12549, + 10310 => 12550, 10311 => 12551, 10312 => 12552, 10313 => 12553, 10314 => 12554, + 10315 => 12555, 10316 => 12556, 10317 => 12557, 10318 => 12558, 10319 => 12559, + 10320 => 12560, 10321 => 12561, 10322 => 12562, 10323 => 12563, 10324 => 12564, + 10325 => 12565, 10326 => 12566, 10327 => 12567, 10328 => 12568, 10329 => 12569, + 10330 => 12570, 10331 => 12571, 10332 => 12572, 10333 => 12573, 10334 => 12574, + 10335 => 12575, 10336 => 12576, 10337 => 12577, 10338 => 12578, 10339 => 12579, + 10340 => 12580, 10341 => 12581, 10342 => 12582, 10343 => 12583, 10344 => 12584, + 10345 => 12585, 10532 => 9472, 10533 => 9473, 10534 => 9474, 10535 => 9475, + 10536 => 9476, 10537 => 9477, 10538 => 9478, 10539 => 9479, 10540 => 9480, + 10541 => 9481, 10542 => 9482, 10543 => 9483, 10544 => 9484, 10545 => 9485, + 10546 => 9486, 10547 => 9487, 10548 => 9488, 10549 => 9489, 10550 => 9490, + 10551 => 9491, 10552 => 9492, 10553 => 9493, 10554 => 9494, 10555 => 9495, + 10556 => 9496, 10557 => 9497, 10558 => 9498, 10559 => 9499, 10560 => 9500, + 10561 => 9501, 10562 => 9502, 10563 => 9503, 10564 => 9504, 10565 => 9505, + 10566 => 9506, 10567 => 9507, 10568 => 9508, 10569 => 9509, 10570 => 9510, + 10571 => 9511, 10572 => 9512, 10573 => 9513, 10574 => 9514, 10575 => 9515, + 10576 => 9516, 10577 => 9517, 10578 => 9518, 10579 => 9519, 10580 => 9520, + 10581 => 9521, 10582 => 9522, 10583 => 9523, 10584 => 9524, 10585 => 9525, + 10586 => 9526, 10587 => 9527, 10588 => 9528, 10589 => 9529, 10590 => 9530, + 10591 => 9531, 10592 => 9532, 10593 => 9533, 10594 => 9534, 10595 => 9535, + 10596 => 9536, 10597 => 9537, 10598 => 9538, 10599 => 9539, 10600 => 9540, + 10601 => 9541, 10602 => 9542, 10603 => 9543, 10604 => 9544, 10605 => 9545, + 10606 => 9546, 10607 => 9547, 12321 => 21834, 12322 => 38463, 12323 => 22467, + 12324 => 25384, 12325 => 21710, 12326 => 21769, 12327 => 21696, 12328 => 30353, + 12329 => 30284, 12330 => 34108, 12331 => 30702, 12332 => 33406, 12333 => 30861, + 12334 => 29233, 12335 => 38552, 12336 => 38797, 12337 => 27688, 12338 => 23433, + 12339 => 20474, 12340 => 25353, 12341 => 26263, 12342 => 23736, 12343 => 33018, + 12344 => 26696, 12345 => 32942, 12346 => 26114, 12347 => 30414, 12348 => 20985, + 12349 => 25942, 12350 => 29100, 12351 => 32753, 12352 => 34948, 12353 => 20658, + 12354 => 22885, 12355 => 25034, 12356 => 28595, 12357 => 33453, 12358 => 25420, + 12359 => 25170, 12360 => 21485, 12361 => 21543, 12362 => 31494, 12363 => 20843, + 12364 => 30116, 12365 => 24052, 12366 => 25300, 12367 => 36299, 12368 => 38774, + 12369 => 25226, 12370 => 32793, 12371 => 22365, 12372 => 38712, 12373 => 32610, + 12374 => 29240, 12375 => 30333, 12376 => 26575, 12377 => 30334, 12378 => 25670, + 12379 => 20336, 12380 => 36133, 12381 => 25308, 12382 => 31255, 12383 => 26001, + 12384 => 29677, 12385 => 25644, 12386 => 25203, 12387 => 33324, 12388 => 39041, + 12389 => 26495, 12390 => 29256, 12391 => 25198, 12392 => 25292, 12393 => 20276, + 12394 => 29923, 12395 => 21322, 12396 => 21150, 12397 => 32458, 12398 => 37030, + 12399 => 24110, 12400 => 26758, 12401 => 27036, 12402 => 33152, 12403 => 32465, + 12404 => 26834, 12405 => 30917, 12406 => 34444, 12407 => 38225, 12408 => 20621, + 12409 => 35876, 12410 => 33502, 12411 => 32990, 12412 => 21253, 12413 => 35090, + 12414 => 21093, 12577 => 34180, 12578 => 38649, 12579 => 20445, 12580 => 22561, + 12581 => 39281, 12582 => 23453, 12583 => 25265, 12584 => 25253, 12585 => 26292, + 12586 => 35961, 12587 => 40077, 12588 => 29190, 12589 => 26479, 12590 => 30865, + 12591 => 24754, 12592 => 21329, 12593 => 21271, 12594 => 36744, 12595 => 32972, + 12596 => 36125, 12597 => 38049, 12598 => 20493, 12599 => 29384, 12600 => 22791, + 12601 => 24811, 12602 => 28953, 12603 => 34987, 12604 => 22868, 12605 => 33519, + 12606 => 26412, 12607 => 31528, 12608 => 23849, 12609 => 32503, 12610 => 29997, + 12611 => 27893, 12612 => 36454, 12613 => 36856, 12614 => 36924, 12615 => 40763, + 12616 => 27604, 12617 => 37145, 12618 => 31508, 12619 => 24444, 12620 => 30887, + 12621 => 34006, 12622 => 34109, 12623 => 27605, 12624 => 27609, 12625 => 27606, + 12626 => 24065, 12627 => 24199, 12628 => 30201, 12629 => 38381, 12630 => 25949, + 12631 => 24330, 12632 => 24517, 12633 => 36767, 12634 => 22721, 12635 => 33218, + 12636 => 36991, 12637 => 38491, 12638 => 38829, 12639 => 36793, 12640 => 32534, + 12641 => 36140, 12642 => 25153, 12643 => 20415, 12644 => 21464, 12645 => 21342, + 12646 => 36776, 12647 => 36777, 12648 => 36779, 12649 => 36941, 12650 => 26631, + 12651 => 24426, 12652 => 33176, 12653 => 34920, 12654 => 40150, 12655 => 24971, + 12656 => 21035, 12657 => 30250, 12658 => 24428, 12659 => 25996, 12660 => 28626, + 12661 => 28392, 12662 => 23486, 12663 => 25672, 12664 => 20853, 12665 => 20912, + 12666 => 26564, 12667 => 19993, 12668 => 31177, 12669 => 39292, 12670 => 28851, + 12833 => 30149, 12834 => 24182, 12835 => 29627, 12836 => 33760, 12837 => 25773, + 12838 => 25320, 12839 => 38069, 12840 => 27874, 12841 => 21338, 12842 => 21187, + 12843 => 25615, 12844 => 38082, 12845 => 31636, 12846 => 20271, 12847 => 24091, + 12848 => 33334, 12849 => 33046, 12850 => 33162, 12851 => 28196, 12852 => 27850, + 12853 => 39539, 12854 => 25429, 12855 => 21340, 12856 => 21754, 12857 => 34917, + 12858 => 22496, 12859 => 19981, 12860 => 24067, 12861 => 27493, 12862 => 31807, + 12863 => 37096, 12864 => 24598, 12865 => 25830, 12866 => 29468, 12867 => 35009, + 12868 => 26448, 12869 => 25165, 12870 => 36130, 12871 => 30572, 12872 => 36393, + 12873 => 37319, 12874 => 24425, 12875 => 33756, 12876 => 34081, 12877 => 39184, + 12878 => 21442, 12879 => 34453, 12880 => 27531, 12881 => 24813, 12882 => 24808, + 12883 => 28799, 12884 => 33485, 12885 => 33329, 12886 => 20179, 12887 => 27815, + 12888 => 34255, 12889 => 25805, 12890 => 31961, 12891 => 27133, 12892 => 26361, + 12893 => 33609, 12894 => 21397, 12895 => 31574, 12896 => 20391, 12897 => 20876, + 12898 => 27979, 12899 => 23618, 12900 => 36461, 12901 => 25554, 12902 => 21449, + 12903 => 33580, 12904 => 33590, 12905 => 26597, 12906 => 30900, 12907 => 25661, + 12908 => 23519, 12909 => 23700, 12910 => 24046, 12911 => 35815, 12912 => 25286, + 12913 => 26612, 12914 => 35962, 12915 => 25600, 12916 => 25530, 12917 => 34633, + 12918 => 39307, 12919 => 35863, 12920 => 32544, 12921 => 38130, 12922 => 20135, + 12923 => 38416, 12924 => 39076, 12925 => 26124, 12926 => 29462, 13089 => 22330, + 13090 => 23581, 13091 => 24120, 13092 => 38271, 13093 => 20607, 13094 => 32928, + 13095 => 21378, 13096 => 25950, 13097 => 30021, 13098 => 21809, 13099 => 20513, + 13100 => 36229, 13101 => 25220, 13102 => 38046, 13103 => 26397, 13104 => 22066, + 13105 => 28526, 13106 => 24034, 13107 => 21557, 13108 => 28818, 13109 => 36710, + 13110 => 25199, 13111 => 25764, 13112 => 25507, 13113 => 24443, 13114 => 28552, + 13115 => 37108, 13116 => 33251, 13117 => 36784, 13118 => 23576, 13119 => 26216, + 13120 => 24561, 13121 => 27785, 13122 => 38472, 13123 => 36225, 13124 => 34924, + 13125 => 25745, 13126 => 31216, 13127 => 22478, 13128 => 27225, 13129 => 25104, + 13130 => 21576, 13131 => 20056, 13132 => 31243, 13133 => 24809, 13134 => 28548, + 13135 => 35802, 13136 => 25215, 13137 => 36894, 13138 => 39563, 13139 => 31204, +13140 => 21507, 13141 => 30196, 13142 => 25345, 13143 => 21273, 13144 => 27744, +13145 => 36831, 13146 => 24347, 13147 => 39536, 13148 => 32827, 13149 => 40831, +13150 => 20360, 13151 => 23610, 13152 => 36196, 13153 => 32709, 13154 => 26021, +13155 => 28861, 13156 => 20805, 13157 => 20914, 13158 => 34411, 13159 => 23815, +13160 => 23456, 13161 => 25277, 13162 => 37228, 13163 => 30068, 13164 => 36364, +13165 => 31264, 13166 => 24833, 13167 => 31609, 13168 => 20167, 13169 => 32504, +13170 => 30597, 13171 => 19985, 13172 => 33261, 13173 => 21021, 13174 => 20986, +13175 => 27249, 13176 => 21416, 13177 => 36487, 13178 => 38148, 13179 => 38607, +13180 => 28353, 13181 => 38500, 13182 => 26970, 13345 => 30784, 13346 => 20648, +13347 => 30679, 13348 => 25616, 13349 => 35302, 13350 => 22788, 13351 => 25571, +13352 => 24029, 13353 => 31359, 13354 => 26941, 13355 => 20256, 13356 => 33337, +13357 => 21912, 13358 => 20018, 13359 => 30126, 13360 => 31383, 13361 => 24162, +13362 => 24202, 13363 => 38383, 13364 => 21019, 13365 => 21561, 13366 => 28810, +13367 => 25462, 13368 => 38180, 13369 => 22402, 13370 => 26149, 13371 => 26943, +13372 => 37255, 13373 => 21767, 13374 => 28147, 13375 => 32431, 13376 => 34850, +13377 => 25139, 13378 => 32496, 13379 => 30133, 13380 => 33576, 13381 => 30913, +13382 => 38604, 13383 => 36766, 13384 => 24904, 13385 => 29943, 13386 => 35789, +13387 => 27492, 13388 => 21050, 13389 => 36176, 13390 => 27425, 13391 => 32874, +13392 => 33905, 13393 => 22257, 13394 => 21254, 13395 => 20174, 13396 => 19995, +13397 => 20945, 13398 => 31895, 13399 => 37259, 13400 => 31751, 13401 => 20419, +13402 => 36479, 13403 => 31713, 13404 => 31388, 13405 => 25703, 13406 => 23828, +13407 => 20652, 13408 => 33030, 13409 => 30209, 13410 => 31929, 13411 => 28140, +13412 => 32736, 13413 => 26449, 13414 => 23384, 13415 => 23544, 13416 => 30923, +13417 => 25774, 13418 => 25619, 13419 => 25514, 13420 => 25387, 13421 => 38169, +13422 => 25645, 13423 => 36798, 13424 => 31572, 13425 => 30249, 13426 => 25171, +13427 => 22823, 13428 => 21574, 13429 => 27513, 13430 => 20643, 13431 => 25140, +13432 => 24102, 13433 => 27526, 13434 => 20195, 13435 => 36151, 13436 => 34955, +13437 => 24453, 13438 => 36910, 13601 => 24608, 13602 => 32829, 13603 => 25285, +13604 => 20025, 13605 => 21333, 13606 => 37112, 13607 => 25528, 13608 => 32966, +13609 => 26086, 13610 => 27694, 13611 => 20294, 13612 => 24814, 13613 => 28129, +13614 => 35806, 13615 => 24377, 13616 => 34507, 13617 => 24403, 13618 => 25377, +13619 => 20826, 13620 => 33633, 13621 => 26723, 13622 => 20992, 13623 => 25443, +13624 => 36424, 13625 => 20498, 13626 => 23707, 13627 => 31095, 13628 => 23548, +13629 => 21040, 13630 => 31291, 13631 => 24764, 13632 => 36947, 13633 => 30423, +13634 => 24503, 13635 => 24471, 13636 => 30340, 13637 => 36460, 13638 => 28783, +13639 => 30331, 13640 => 31561, 13641 => 30634, 13642 => 20979, 13643 => 37011, +13644 => 22564, 13645 => 20302, 13646 => 28404, 13647 => 36842, 13648 => 25932, +13649 => 31515, 13650 => 29380, 13651 => 28068, 13652 => 32735, 13653 => 23265, +13654 => 25269, 13655 => 24213, 13656 => 22320, 13657 => 33922, 13658 => 31532, +13659 => 24093, 13660 => 24351, 13661 => 36882, 13662 => 32532, 13663 => 39072, +13664 => 25474, 13665 => 28359, 13666 => 30872, 13667 => 28857, 13668 => 20856, +13669 => 38747, 13670 => 22443, 13671 => 30005, 13672 => 20291, 13673 => 30008, +13674 => 24215, 13675 => 24806, 13676 => 22880, 13677 => 28096, 13678 => 27583, +13679 => 30857, 13680 => 21500, 13681 => 38613, 13682 => 20939, 13683 => 20993, +13684 => 25481, 13685 => 21514, 13686 => 38035, 13687 => 35843, 13688 => 36300, +13689 => 29241, 13690 => 30879, 13691 => 34678, 13692 => 36845, 13693 => 35853, +13694 => 21472, 13857 => 19969, 13858 => 30447, 13859 => 21486, 13860 => 38025, +13861 => 39030, 13862 => 40718, 13863 => 38189, 13864 => 23450, 13865 => 35746, +13866 => 20002, 13867 => 19996, 13868 => 20908, 13869 => 33891, 13870 => 25026, +13871 => 21160, 13872 => 26635, 13873 => 20375, 13874 => 24683, 13875 => 20923, +13876 => 27934, 13877 => 20828, 13878 => 25238, 13879 => 26007, 13880 => 38497, +13881 => 35910, 13882 => 36887, 13883 => 30168, 13884 => 37117, 13885 => 30563, +13886 => 27602, 13887 => 29322, 13888 => 29420, 13889 => 35835, 13890 => 22581, +13891 => 30585, 13892 => 36172, 13893 => 26460, 13894 => 38208, 13895 => 32922, +13896 => 24230, 13897 => 28193, 13898 => 22930, 13899 => 31471, 13900 => 30701, +13901 => 38203, 13902 => 27573, 13903 => 26029, 13904 => 32526, 13905 => 22534, +13906 => 20817, 13907 => 38431, 13908 => 23545, 13909 => 22697, 13910 => 21544, +13911 => 36466, 13912 => 25958, 13913 => 39039, 13914 => 22244, 13915 => 38045, +13916 => 30462, 13917 => 36929, 13918 => 25479, 13919 => 21702, 13920 => 22810, +13921 => 22842, 13922 => 22427, 13923 => 36530, 13924 => 26421, 13925 => 36346, +13926 => 33333, 13927 => 21057, 13928 => 24816, 13929 => 22549, 13930 => 34558, +13931 => 23784, 13932 => 40517, 13933 => 20420, 13934 => 39069, 13935 => 35769, +13936 => 23077, 13937 => 24694, 13938 => 21380, 13939 => 25212, 13940 => 36943, +13941 => 37122, 13942 => 39295, 13943 => 24681, 13944 => 32780, 13945 => 20799, +13946 => 32819, 13947 => 23572, 13948 => 39285, 13949 => 27953, 13950 => 20108, +14113 => 36144, 14114 => 21457, 14115 => 32602, 14116 => 31567, 14117 => 20240, +14118 => 20047, 14119 => 38400, 14120 => 27861, 14121 => 29648, 14122 => 34281, +14123 => 24070, 14124 => 30058, 14125 => 32763, 14126 => 27146, 14127 => 30718, +14128 => 38034, 14129 => 32321, 14130 => 20961, 14131 => 28902, 14132 => 21453, +14133 => 36820, 14134 => 33539, 14135 => 36137, 14136 => 29359, 14137 => 39277, +14138 => 27867, 14139 => 22346, 14140 => 33459, 14141 => 26041, 14142 => 32938, +14143 => 25151, 14144 => 38450, 14145 => 22952, 14146 => 20223, 14147 => 35775, +14148 => 32442, 14149 => 25918, 14150 => 33778, 14151 => 38750, 14152 => 21857, +14153 => 39134, 14154 => 32933, 14155 => 21290, 14156 => 35837, 14157 => 21536, +14158 => 32954, 14159 => 24223, 14160 => 27832, 14161 => 36153, 14162 => 33452, +14163 => 37210, 14164 => 21545, 14165 => 27675, 14166 => 20998, 14167 => 32439, +14168 => 22367, 14169 => 28954, 14170 => 27774, 14171 => 31881, 14172 => 22859, +14173 => 20221, 14174 => 24575, 14175 => 24868, 14176 => 31914, 14177 => 20016, +14178 => 23553, 14179 => 26539, 14180 => 34562, 14181 => 23792, 14182 => 38155, +14183 => 39118, 14184 => 30127, 14185 => 28925, 14186 => 36898, 14187 => 20911, +14188 => 32541, 14189 => 35773, 14190 => 22857, 14191 => 20964, 14192 => 20315, +14193 => 21542, 14194 => 22827, 14195 => 25975, 14196 => 32932, 14197 => 23413, +14198 => 25206, 14199 => 25282, 14200 => 36752, 14201 => 24133, 14202 => 27679, +14203 => 31526, 14204 => 20239, 14205 => 20440, 14206 => 26381, 14369 => 28014, +14370 => 28074, 14371 => 31119, 14372 => 34993, 14373 => 24343, 14374 => 29995, +14375 => 25242, 14376 => 36741, 14377 => 20463, 14378 => 37340, 14379 => 26023, +14380 => 33071, 14381 => 33105, 14382 => 24220, 14383 => 33104, 14384 => 36212, +14385 => 21103, 14386 => 35206, 14387 => 36171, 14388 => 22797, 14389 => 20613, +14390 => 20184, 14391 => 38428, 14392 => 29238, 14393 => 33145, 14394 => 36127, +14395 => 23500, 14396 => 35747, 14397 => 38468, 14398 => 22919, 14399 => 32538, +14400 => 21648, 14401 => 22134, 14402 => 22030, 14403 => 35813, 14404 => 25913, +14405 => 27010, 14406 => 38041, 14407 => 30422, 14408 => 28297, 14409 => 24178, +14410 => 29976, 14411 => 26438, 14412 => 26577, 14413 => 31487, 14414 => 32925, +14415 => 36214, 14416 => 24863, 14417 => 31174, 14418 => 25954, 14419 => 36195, +14420 => 20872, 14421 => 21018, 14422 => 38050, 14423 => 32568, 14424 => 32923, +14425 => 32434, 14426 => 23703, 14427 => 28207, 14428 => 26464, 14429 => 31705, +14430 => 30347, 14431 => 39640, 14432 => 33167, 14433 => 32660, 14434 => 31957, +14435 => 25630, 14436 => 38224, 14437 => 31295, 14438 => 21578, 14439 => 21733, +14440 => 27468, 14441 => 25601, 14442 => 25096, 14443 => 40509, 14444 => 33011, +14445 => 30105, 14446 => 21106, 14447 => 38761, 14448 => 33883, 14449 => 26684, +14450 => 34532, 14451 => 38401, 14452 => 38548, 14453 => 38124, 14454 => 20010, +14455 => 21508, 14456 => 32473, 14457 => 26681, 14458 => 36319, 14459 => 32789, +14460 => 26356, 14461 => 24218, 14462 => 32697, 14625 => 22466, 14626 => 32831, +14627 => 26775, 14628 => 24037, 14629 => 25915, 14630 => 21151, 14631 => 24685, +14632 => 40858, 14633 => 20379, 14634 => 36524, 14635 => 20844, 14636 => 23467, +14637 => 24339, 14638 => 24041, 14639 => 27742, 14640 => 25329, 14641 => 36129, +14642 => 20849, 14643 => 38057, 14644 => 21246, 14645 => 27807, 14646 => 33503, +14647 => 29399, 14648 => 22434, 14649 => 26500, 14650 => 36141, 14651 => 22815, +14652 => 36764, 14653 => 33735, 14654 => 21653, 14655 => 31629, 14656 => 20272, +14657 => 27837, 14658 => 23396, 14659 => 22993, 14660 => 40723, 14661 => 21476, +14662 => 34506, 14663 => 39592, 14664 => 35895, 14665 => 32929, 14666 => 25925, +14667 => 39038, 14668 => 22266, 14669 => 38599, 14670 => 21038, 14671 => 29916, +14672 => 21072, 14673 => 23521, 14674 => 25346, 14675 => 35074, 14676 => 20054, +14677 => 25296, 14678 => 24618, 14679 => 26874, 14680 => 20851, 14681 => 23448, +14682 => 20896, 14683 => 35266, 14684 => 31649, 14685 => 39302, 14686 => 32592, +14687 => 24815, 14688 => 28748, 14689 => 36143, 14690 => 20809, 14691 => 24191, +14692 => 36891, 14693 => 29808, 14694 => 35268, 14695 => 22317, 14696 => 30789, +14697 => 24402, 14698 => 40863, 14699 => 38394, 14700 => 36712, 14701 => 39740, +14702 => 35809, 14703 => 30328, 14704 => 26690, 14705 => 26588, 14706 => 36330, +14707 => 36149, 14708 => 21053, 14709 => 36746, 14710 => 28378, 14711 => 26829, +14712 => 38149, 14713 => 37101, 14714 => 22269, 14715 => 26524, 14716 => 35065, +14717 => 36807, 14718 => 21704, 14881 => 39608, 14882 => 23401, 14883 => 28023, +14884 => 27686, 14885 => 20133, 14886 => 23475, 14887 => 39559, 14888 => 37219, +14889 => 25000, 14890 => 37039, 14891 => 38889, 14892 => 21547, 14893 => 28085, +14894 => 23506, 14895 => 20989, 14896 => 21898, 14897 => 32597, 14898 => 32752, +14899 => 25788, 14900 => 25421, 14901 => 26097, 14902 => 25022, 14903 => 24717, +14904 => 28938, 14905 => 27735, 14906 => 27721, 14907 => 22831, 14908 => 26477, +14909 => 33322, 14910 => 22741, 14911 => 22158, 14912 => 35946, 14913 => 27627, +14914 => 37085, 14915 => 22909, 14916 => 32791, 14917 => 21495, 14918 => 28009, +14919 => 21621, 14920 => 21917, 14921 => 33655, 14922 => 33743, 14923 => 26680, +14924 => 31166, 14925 => 21644, 14926 => 20309, 14927 => 21512, 14928 => 30418, +14929 => 35977, 14930 => 38402, 14931 => 27827, 14932 => 28088, 14933 => 36203, +14934 => 35088, 14935 => 40548, 14936 => 36154, 14937 => 22079, 14938 => 40657, +14939 => 30165, 14940 => 24456, 14941 => 29408, 14942 => 24680, 14943 => 21756, +14944 => 20136, 14945 => 27178, 14946 => 34913, 14947 => 24658, 14948 => 36720, +14949 => 21700, 14950 => 28888, 14951 => 34425, 14952 => 40511, 14953 => 27946, +14954 => 23439, 14955 => 24344, 14956 => 32418, 14957 => 21897, 14958 => 20399, +14959 => 29492, 14960 => 21564, 14961 => 21402, 14962 => 20505, 14963 => 21518, +14964 => 21628, 14965 => 20046, 14966 => 24573, 14967 => 29786, 14968 => 22774, +14969 => 33899, 14970 => 32993, 14971 => 34676, 14972 => 29392, 14973 => 31946, +14974 => 28246, 15137 => 24359, 15138 => 34382, 15139 => 21804, 15140 => 25252, +15141 => 20114, 15142 => 27818, 15143 => 25143, 15144 => 33457, 15145 => 21719, +15146 => 21326, 15147 => 29502, 15148 => 28369, 15149 => 30011, 15150 => 21010, +15151 => 21270, 15152 => 35805, 15153 => 27088, 15154 => 24458, 15155 => 24576, +15156 => 28142, 15157 => 22351, 15158 => 27426, 15159 => 29615, 15160 => 26707, +15161 => 36824, 15162 => 32531, 15163 => 25442, 15164 => 24739, 15165 => 21796, +15166 => 30186, 15167 => 35938, 15168 => 28949, 15169 => 28067, 15170 => 23462, +15171 => 24187, 15172 => 33618, 15173 => 24908, 15174 => 40644, 15175 => 30970, +15176 => 34647, 15177 => 31783, 15178 => 30343, 15179 => 20976, 15180 => 24822, +15181 => 29004, 15182 => 26179, 15183 => 24140, 15184 => 24653, 15185 => 35854, +15186 => 28784, 15187 => 25381, 15188 => 36745, 15189 => 24509, 15190 => 24674, +15191 => 34516, 15192 => 22238, 15193 => 27585, 15194 => 24724, 15195 => 24935, +15196 => 21321, 15197 => 24800, 15198 => 26214, 15199 => 36159, 15200 => 31229, +15201 => 20250, 15202 => 28905, 15203 => 27719, 15204 => 35763, 15205 => 35826, +15206 => 32472, 15207 => 33636, 15208 => 26127, 15209 => 23130, 15210 => 39746, +15211 => 27985, 15212 => 28151, 15213 => 35905, 15214 => 27963, 15215 => 20249, +15216 => 28779, 15217 => 33719, 15218 => 25110, 15219 => 24785, 15220 => 38669, +15221 => 36135, 15222 => 31096, 15223 => 20987, 15224 => 22334, 15225 => 22522, +15226 => 26426, 15227 => 30072, 15228 => 31293, 15229 => 31215, 15230 => 31637, +15393 => 32908, 15394 => 39269, 15395 => 36857, 15396 => 28608, 15397 => 35749, +15398 => 40481, 15399 => 23020, 15400 => 32489, 15401 => 32521, 15402 => 21513, +15403 => 26497, 15404 => 26840, 15405 => 36753, 15406 => 31821, 15407 => 38598, +15408 => 21450, 15409 => 24613, 15410 => 30142, 15411 => 27762, 15412 => 21363, +15413 => 23241, 15414 => 32423, 15415 => 25380, 15416 => 20960, 15417 => 33034, +15418 => 24049, 15419 => 34015, 15420 => 25216, 15421 => 20864, 15422 => 23395, +15423 => 20238, 15424 => 31085, 15425 => 21058, 15426 => 24760, 15427 => 27982, +15428 => 23492, 15429 => 23490, 15430 => 35745, 15431 => 35760, 15432 => 26082, +15433 => 24524, 15434 => 38469, 15435 => 22931, 15436 => 32487, 15437 => 32426, +15438 => 22025, 15439 => 26551, 15440 => 22841, 15441 => 20339, 15442 => 23478, +15443 => 21152, 15444 => 33626, 15445 => 39050, 15446 => 36158, 15447 => 30002, +15448 => 38078, 15449 => 20551, 15450 => 31292, 15451 => 20215, 15452 => 26550, +15453 => 39550, 15454 => 23233, 15455 => 27516, 15456 => 30417, 15457 => 22362, +15458 => 23574, 15459 => 31546, 15460 => 38388, 15461 => 29006, 15462 => 20860, +15463 => 32937, 15464 => 33392, 15465 => 22904, 15466 => 32516, 15467 => 33575, +15468 => 26816, 15469 => 26604, 15470 => 30897, 15471 => 30839, 15472 => 25315, +15473 => 25441, 15474 => 31616, 15475 => 20461, 15476 => 21098, 15477 => 20943, +15478 => 33616, 15479 => 27099, 15480 => 37492, 15481 => 36341, 15482 => 36145, +15483 => 35265, 15484 => 38190, 15485 => 31661, 15486 => 20214, 15649 => 20581, +15650 => 33328, 15651 => 21073, 15652 => 39279, 15653 => 28176, 15654 => 28293, +15655 => 28071, 15656 => 24314, 15657 => 20725, 15658 => 23004, 15659 => 23558, +15660 => 27974, 15661 => 27743, 15662 => 30086, 15663 => 33931, 15664 => 26728, +15665 => 22870, 15666 => 35762, 15667 => 21280, 15668 => 37233, 15669 => 38477, +15670 => 34121, 15671 => 26898, 15672 => 30977, 15673 => 28966, 15674 => 33014, +15675 => 20132, 15676 => 37066, 15677 => 27975, 15678 => 39556, 15679 => 23047, +15680 => 22204, 15681 => 25605, 15682 => 38128, 15683 => 30699, 15684 => 20389, +15685 => 33050, 15686 => 29409, 15687 => 35282, 15688 => 39290, 15689 => 32564, +15690 => 32478, 15691 => 21119, 15692 => 25945, 15693 => 37237, 15694 => 36735, +15695 => 36739, 15696 => 21483, 15697 => 31382, 15698 => 25581, 15699 => 25509, +15700 => 30342, 15701 => 31224, 15702 => 34903, 15703 => 38454, 15704 => 25130, +15705 => 21163, 15706 => 33410, 15707 => 26708, 15708 => 26480, 15709 => 25463, +15710 => 30571, 15711 => 31469, 15712 => 27905, 15713 => 32467, 15714 => 35299, +15715 => 22992, 15716 => 25106, 15717 => 34249, 15718 => 33445, 15719 => 30028, +15720 => 20511, 15721 => 20171, 15722 => 30117, 15723 => 35819, 15724 => 23626, +15725 => 24062, 15726 => 31563, 15727 => 26020, 15728 => 37329, 15729 => 20170, +15730 => 27941, 15731 => 35167, 15732 => 32039, 15733 => 38182, 15734 => 20165, +15735 => 35880, 15736 => 36827, 15737 => 38771, 15738 => 26187, 15739 => 31105, +15740 => 36817, 15741 => 28908, 15742 => 28024, 15905 => 23613, 15906 => 21170, +15907 => 33606, 15908 => 20834, 15909 => 33550, 15910 => 30555, 15911 => 26230, +15912 => 40120, 15913 => 20140, 15914 => 24778, 15915 => 31934, 15916 => 31923, +15917 => 32463, 15918 => 20117, 15919 => 35686, 15920 => 26223, 15921 => 39048, +15922 => 38745, 15923 => 22659, 15924 => 25964, 15925 => 38236, 15926 => 24452, +15927 => 30153, 15928 => 38742, 15929 => 31455, 15930 => 31454, 15931 => 20928, +15932 => 28847, 15933 => 31384, 15934 => 25578, 15935 => 31350, 15936 => 32416, +15937 => 29590, 15938 => 38893, 15939 => 20037, 15940 => 28792, 15941 => 20061, +15942 => 37202, 15943 => 21417, 15944 => 25937, 15945 => 26087, 15946 => 33276, +15947 => 33285, 15948 => 21646, 15949 => 23601, 15950 => 30106, 15951 => 38816, +15952 => 25304, 15953 => 29401, 15954 => 30141, 15955 => 23621, 15956 => 39545, +15957 => 33738, 15958 => 23616, 15959 => 21632, 15960 => 30697, 15961 => 20030, +15962 => 27822, 15963 => 32858, 15964 => 25298, 15965 => 25454, 15966 => 24040, +15967 => 20855, 15968 => 36317, 15969 => 36382, 15970 => 38191, 15971 => 20465, +15972 => 21477, 15973 => 24807, 15974 => 28844, 15975 => 21095, 15976 => 25424, +15977 => 40515, 15978 => 23071, 15979 => 20518, 15980 => 30519, 15981 => 21367, +15982 => 32482, 15983 => 25733, 15984 => 25899, 15985 => 25225, 15986 => 25496, +15987 => 20500, 15988 => 29237, 15989 => 35273, 15990 => 20915, 15991 => 35776, +15992 => 32477, 15993 => 22343, 15994 => 33740, 15995 => 38055, 15996 => 20891, +15997 => 21531, 15998 => 23803, 16161 => 20426, 16162 => 31459, 16163 => 27994, +16164 => 37089, 16165 => 39567, 16166 => 21888, 16167 => 21654, 16168 => 21345, +16169 => 21679, 16170 => 24320, 16171 => 25577, 16172 => 26999, 16173 => 20975, +16174 => 24936, 16175 => 21002, 16176 => 22570, 16177 => 21208, 16178 => 22350, +16179 => 30733, 16180 => 30475, 16181 => 24247, 16182 => 24951, 16183 => 31968, +16184 => 25179, 16185 => 25239, 16186 => 20130, 16187 => 28821, 16188 => 32771, +16189 => 25335, 16190 => 28900, 16191 => 38752, 16192 => 22391, 16193 => 33499, +16194 => 26607, 16195 => 26869, 16196 => 30933, 16197 => 39063, 16198 => 31185, +16199 => 22771, 16200 => 21683, 16201 => 21487, 16202 => 28212, 16203 => 20811, +16204 => 21051, 16205 => 23458, 16206 => 35838, 16207 => 32943, 16208 => 21827, +16209 => 22438, 16210 => 24691, 16211 => 22353, 16212 => 21549, 16213 => 31354, +16214 => 24656, 16215 => 23380, 16216 => 25511, 16217 => 25248, 16218 => 21475, +16219 => 25187, 16220 => 23495, 16221 => 26543, 16222 => 21741, 16223 => 31391, +16224 => 33510, 16225 => 37239, 16226 => 24211, 16227 => 35044, 16228 => 22840, +16229 => 22446, 16230 => 25358, 16231 => 36328, 16232 => 33007, 16233 => 22359, +16234 => 31607, 16235 => 20393, 16236 => 24555, 16237 => 23485, 16238 => 27454, +16239 => 21281, 16240 => 31568, 16241 => 29378, 16242 => 26694, 16243 => 30719, +16244 => 30518, 16245 => 26103, 16246 => 20917, 16247 => 20111, 16248 => 30420, +16249 => 23743, 16250 => 31397, 16251 => 33909, 16252 => 22862, 16253 => 39745, +16254 => 20608, 16417 => 39304, 16418 => 24871, 16419 => 28291, 16420 => 22372, +16421 => 26118, 16422 => 25414, 16423 => 22256, 16424 => 25324, 16425 => 25193, +16426 => 24275, 16427 => 38420, 16428 => 22403, 16429 => 25289, 16430 => 21895, +16431 => 34593, 16432 => 33098, 16433 => 36771, 16434 => 21862, 16435 => 33713, +16436 => 26469, 16437 => 36182, 16438 => 34013, 16439 => 23146, 16440 => 26639, +16441 => 25318, 16442 => 31726, 16443 => 38417, 16444 => 20848, 16445 => 28572, +16446 => 35888, 16447 => 25597, 16448 => 35272, 16449 => 25042, 16450 => 32518, +16451 => 28866, 16452 => 28389, 16453 => 29701, 16454 => 27028, 16455 => 29436, +16456 => 24266, 16457 => 37070, 16458 => 26391, 16459 => 28010, 16460 => 25438, +16461 => 21171, 16462 => 29282, 16463 => 32769, 16464 => 20332, 16465 => 23013, +16466 => 37226, 16467 => 28889, 16468 => 28061, 16469 => 21202, 16470 => 20048, +16471 => 38647, 16472 => 38253, 16473 => 34174, 16474 => 30922, 16475 => 32047, +16476 => 20769, 16477 => 22418, 16478 => 25794, 16479 => 32907, 16480 => 31867, +16481 => 27882, 16482 => 26865, 16483 => 26974, 16484 => 20919, 16485 => 21400, +16486 => 26792, 16487 => 29313, 16488 => 40654, 16489 => 31729, 16490 => 29432, +16491 => 31163, 16492 => 28435, 16493 => 29702, 16494 => 26446, 16495 => 37324, +16496 => 40100, 16497 => 31036, 16498 => 33673, 16499 => 33620, 16500 => 21519, +16501 => 26647, 16502 => 20029, 16503 => 21385, 16504 => 21169, 16505 => 30782, +16506 => 21382, 16507 => 21033, 16508 => 20616, 16509 => 20363, 16510 => 20432, +16673 => 30178, 16674 => 31435, 16675 => 31890, 16676 => 27813, 16677 => 38582, +16678 => 21147, 16679 => 29827, 16680 => 21737, 16681 => 20457, 16682 => 32852, +16683 => 33714, 16684 => 36830, 16685 => 38256, 16686 => 24265, 16687 => 24604, +16688 => 28063, 16689 => 24088, 16690 => 25947, 16691 => 33080, 16692 => 38142, +16693 => 24651, 16694 => 28860, 16695 => 32451, 16696 => 31918, 16697 => 20937, +16698 => 26753, 16699 => 31921, 16700 => 33391, 16701 => 20004, 16702 => 36742, +16703 => 37327, 16704 => 26238, 16705 => 20142, 16706 => 35845, 16707 => 25769, +16708 => 32842, 16709 => 20698, 16710 => 30103, 16711 => 29134, 16712 => 23525, +16713 => 36797, 16714 => 28518, 16715 => 20102, 16716 => 25730, 16717 => 38243, +16718 => 24278, 16719 => 26009, 16720 => 21015, 16721 => 35010, 16722 => 28872, +16723 => 21155, 16724 => 29454, 16725 => 29747, 16726 => 26519, 16727 => 30967, +16728 => 38678, 16729 => 20020, 16730 => 37051, 16731 => 40158, 16732 => 28107, +16733 => 20955, 16734 => 36161, 16735 => 21533, 16736 => 25294, 16737 => 29618, +16738 => 33777, 16739 => 38646, 16740 => 40836, 16741 => 38083, 16742 => 20278, +16743 => 32666, 16744 => 20940, 16745 => 28789, 16746 => 38517, 16747 => 23725, +16748 => 39046, 16749 => 21478, 16750 => 20196, 16751 => 28316, 16752 => 29705, +16753 => 27060, 16754 => 30827, 16755 => 39311, 16756 => 30041, 16757 => 21016, +16758 => 30244, 16759 => 27969, 16760 => 26611, 16761 => 20845, 16762 => 40857, +16763 => 32843, 16764 => 21657, 16765 => 31548, 16766 => 31423, 16929 => 38534, +16930 => 22404, 16931 => 25314, 16932 => 38471, 16933 => 27004, 16934 => 23044, +16935 => 25602, 16936 => 31699, 16937 => 28431, 16938 => 38475, 16939 => 33446, +16940 => 21346, 16941 => 39045, 16942 => 24208, 16943 => 28809, 16944 => 25523, +16945 => 21348, 16946 => 34383, 16947 => 40065, 16948 => 40595, 16949 => 30860, +16950 => 38706, 16951 => 36335, 16952 => 36162, 16953 => 40575, 16954 => 28510, +16955 => 31108, 16956 => 24405, 16957 => 38470, 16958 => 25134, 16959 => 39540, +16960 => 21525, 16961 => 38109, 16962 => 20387, 16963 => 26053, 16964 => 23653, +16965 => 23649, 16966 => 32533, 16967 => 34385, 16968 => 27695, 16969 => 24459, +16970 => 29575, 16971 => 28388, 16972 => 32511, 16973 => 23782, 16974 => 25371, +16975 => 23402, 16976 => 28390, 16977 => 21365, 16978 => 20081, 16979 => 25504, +16980 => 30053, 16981 => 25249, 16982 => 36718, 16983 => 20262, 16984 => 20177, +16985 => 27814, 16986 => 32438, 16987 => 35770, 16988 => 33821, 16989 => 34746, +16990 => 32599, 16991 => 36923, 16992 => 38179, 16993 => 31657, 16994 => 39585, +16995 => 35064, 16996 => 33853, 16997 => 27931, 16998 => 39558, 16999 => 32476, +17000 => 22920, 17001 => 40635, 17002 => 29595, 17003 => 30721, 17004 => 34434, +17005 => 39532, 17006 => 39554, 17007 => 22043, 17008 => 21527, 17009 => 22475, +17010 => 20080, 17011 => 40614, 17012 => 21334, 17013 => 36808, 17014 => 33033, +17015 => 30610, 17016 => 39314, 17017 => 34542, 17018 => 28385, 17019 => 34067, +17020 => 26364, 17021 => 24930, 17022 => 28459, 17185 => 35881, 17186 => 33426, +17187 => 33579, 17188 => 30450, 17189 => 27667, 17190 => 24537, 17191 => 33725, +17192 => 29483, 17193 => 33541, 17194 => 38170, 17195 => 27611, 17196 => 30683, +17197 => 38086, 17198 => 21359, 17199 => 33538, 17200 => 20882, 17201 => 24125, +17202 => 35980, 17203 => 36152, 17204 => 20040, 17205 => 29611, 17206 => 26522, +17207 => 26757, 17208 => 37238, 17209 => 38665, 17210 => 29028, 17211 => 27809, +17212 => 30473, 17213 => 23186, 17214 => 38209, 17215 => 27599, 17216 => 32654, +17217 => 26151, 17218 => 23504, 17219 => 22969, 17220 => 23194, 17221 => 38376, +17222 => 38391, 17223 => 20204, 17224 => 33804, 17225 => 33945, 17226 => 27308, +17227 => 30431, 17228 => 38192, 17229 => 29467, 17230 => 26790, 17231 => 23391, +17232 => 30511, 17233 => 37274, 17234 => 38753, 17235 => 31964, 17236 => 36855, +17237 => 35868, 17238 => 24357, 17239 => 31859, 17240 => 31192, 17241 => 35269, +17242 => 27852, 17243 => 34588, 17244 => 23494, 17245 => 24130, 17246 => 26825, +17247 => 30496, 17248 => 32501, 17249 => 20885, 17250 => 20813, 17251 => 21193, +17252 => 23081, 17253 => 32517, 17254 => 38754, 17255 => 33495, 17256 => 25551, +17257 => 30596, 17258 => 34256, 17259 => 31186, 17260 => 28218, 17261 => 24217, +17262 => 22937, 17263 => 34065, 17264 => 28781, 17265 => 27665, 17266 => 25279, +17267 => 30399, 17268 => 25935, 17269 => 24751, 17270 => 38397, 17271 => 26126, +17272 => 34719, 17273 => 40483, 17274 => 38125, 17275 => 21517, 17276 => 21629, +17277 => 35884, 17278 => 25720, 17441 => 25721, 17442 => 34321, 17443 => 27169, +17444 => 33180, 17445 => 30952, 17446 => 25705, 17447 => 39764, 17448 => 25273, +17449 => 26411, 17450 => 33707, 17451 => 22696, 17452 => 40664, 17453 => 27819, +17454 => 28448, 17455 => 23518, 17456 => 38476, 17457 => 35851, 17458 => 29279, +17459 => 26576, 17460 => 25287, 17461 => 29281, 17462 => 20137, 17463 => 22982, +17464 => 27597, 17465 => 22675, 17466 => 26286, 17467 => 24149, 17468 => 21215, +17469 => 24917, 17470 => 26408, 17471 => 30446, 17472 => 30566, 17473 => 29287, +17474 => 31302, 17475 => 25343, 17476 => 21738, 17477 => 21584, 17478 => 38048, +17479 => 37027, 17480 => 23068, 17481 => 32435, 17482 => 27670, 17483 => 20035, +17484 => 22902, 17485 => 32784, 17486 => 22856, 17487 => 21335, 17488 => 30007, +17489 => 38590, 17490 => 22218, 17491 => 25376, 17492 => 33041, 17493 => 24700, +17494 => 38393, 17495 => 28118, 17496 => 21602, 17497 => 39297, 17498 => 20869, +17499 => 23273, 17500 => 33021, 17501 => 22958, 17502 => 38675, 17503 => 20522, +17504 => 27877, 17505 => 23612, 17506 => 25311, 17507 => 20320, 17508 => 21311, +17509 => 33147, 17510 => 36870, 17511 => 28346, 17512 => 34091, 17513 => 25288, +17514 => 24180, 17515 => 30910, 17516 => 25781, 17517 => 25467, 17518 => 24565, +17519 => 23064, 17520 => 37247, 17521 => 40479, 17522 => 23615, 17523 => 25423, +17524 => 32834, 17525 => 23421, 17526 => 21870, 17527 => 38218, 17528 => 38221, +17529 => 28037, 17530 => 24744, 17531 => 26592, 17532 => 29406, 17533 => 20957, +17534 => 23425, 17697 => 25319, 17698 => 27870, 17699 => 29275, 17700 => 25197, +17701 => 38062, 17702 => 32445, 17703 => 33043, 17704 => 27987, 17705 => 20892, +17706 => 24324, 17707 => 22900, 17708 => 21162, 17709 => 24594, 17710 => 22899, +17711 => 26262, 17712 => 34384, 17713 => 30111, 17714 => 25386, 17715 => 25062, +17716 => 31983, 17717 => 35834, 17718 => 21734, 17719 => 27431, 17720 => 40485, +17721 => 27572, 17722 => 34261, 17723 => 21589, 17724 => 20598, 17725 => 27812, +17726 => 21866, 17727 => 36276, 17728 => 29228, 17729 => 24085, 17730 => 24597, +17731 => 29750, 17732 => 25293, 17733 => 25490, 17734 => 29260, 17735 => 24472, +17736 => 28227, 17737 => 27966, 17738 => 25856, 17739 => 28504, 17740 => 30424, +17741 => 30928, 17742 => 30460, 17743 => 30036, 17744 => 21028, 17745 => 21467, +17746 => 20051, 17747 => 24222, 17748 => 26049, 17749 => 32810, 17750 => 32982, +17751 => 25243, 17752 => 21638, 17753 => 21032, 17754 => 28846, 17755 => 34957, +17756 => 36305, 17757 => 27873, 17758 => 21624, 17759 => 32986, 17760 => 22521, +17761 => 35060, 17762 => 36180, 17763 => 38506, 17764 => 37197, 17765 => 20329, +17766 => 27803, 17767 => 21943, 17768 => 30406, 17769 => 30768, 17770 => 25256, +17771 => 28921, 17772 => 28558, 17773 => 24429, 17774 => 34028, 17775 => 26842, +17776 => 30844, 17777 => 31735, 17778 => 33192, 17779 => 26379, 17780 => 40527, +17781 => 25447, 17782 => 30896, 17783 => 22383, 17784 => 30738, 17785 => 38713, +17786 => 25209, 17787 => 25259, 17788 => 21128, 17789 => 29749, 17790 => 27607, +17953 => 21860, 17954 => 33086, 17955 => 30130, 17956 => 30382, 17957 => 21305, +17958 => 30174, 17959 => 20731, 17960 => 23617, 17961 => 35692, 17962 => 31687, +17963 => 20559, 17964 => 29255, 17965 => 39575, 17966 => 39128, 17967 => 28418, +17968 => 29922, 17969 => 31080, 17970 => 25735, 17971 => 30629, 17972 => 25340, +17973 => 39057, 17974 => 36139, 17975 => 21697, 17976 => 32856, 17977 => 20050, +17978 => 22378, 17979 => 33529, 17980 => 33805, 17981 => 24179, 17982 => 20973, +17983 => 29942, 17984 => 35780, 17985 => 23631, 17986 => 22369, 17987 => 27900, +17988 => 39047, 17989 => 23110, 17990 => 30772, 17991 => 39748, 17992 => 36843, +17993 => 31893, 17994 => 21078, 17995 => 25169, 17996 => 38138, 17997 => 20166, +17998 => 33670, 17999 => 33889, 18000 => 33769, 18001 => 33970, 18002 => 22484, +18003 => 26420, 18004 => 22275, 18005 => 26222, 18006 => 28006, 18007 => 35889, +18008 => 26333, 18009 => 28689, 18010 => 26399, 18011 => 27450, 18012 => 26646, +18013 => 25114, 18014 => 22971, 18015 => 19971, 18016 => 20932, 18017 => 28422, +18018 => 26578, 18019 => 27791, 18020 => 20854, 18021 => 26827, 18022 => 22855, +18023 => 27495, 18024 => 30054, 18025 => 23822, 18026 => 33040, 18027 => 40784, +18028 => 26071, 18029 => 31048, 18030 => 31041, 18031 => 39569, 18032 => 36215, +18033 => 23682, 18034 => 20062, 18035 => 20225, 18036 => 21551, 18037 => 22865, +18038 => 30732, 18039 => 22120, 18040 => 27668, 18041 => 36804, 18042 => 24323, +18043 => 27773, 18044 => 27875, 18045 => 35755, 18046 => 25488, 18209 => 24688, +18210 => 27965, 18211 => 29301, 18212 => 25190, 18213 => 38030, 18214 => 38085, +18215 => 21315, 18216 => 36801, 18217 => 31614, 18218 => 20191, 18219 => 35878, +18220 => 20094, 18221 => 40660, 18222 => 38065, 18223 => 38067, 18224 => 21069, +18225 => 28508, 18226 => 36963, 18227 => 27973, 18228 => 35892, 18229 => 22545, +18230 => 23884, 18231 => 27424, 18232 => 27465, 18233 => 26538, 18234 => 21595, +18235 => 33108, 18236 => 32652, 18237 => 22681, 18238 => 34103, 18239 => 24378, +18240 => 25250, 18241 => 27207, 18242 => 38201, 18243 => 25970, 18244 => 24708, +18245 => 26725, 18246 => 30631, 18247 => 20052, 18248 => 20392, 18249 => 24039, +18250 => 38808, 18251 => 25772, 18252 => 32728, 18253 => 23789, 18254 => 20431, +18255 => 31373, 18256 => 20999, 18257 => 33540, 18258 => 19988, 18259 => 24623, +18260 => 31363, 18261 => 38054, 18262 => 20405, 18263 => 20146, 18264 => 31206, +18265 => 29748, 18266 => 21220, 18267 => 33465, 18268 => 25810, 18269 => 31165, +18270 => 23517, 18271 => 27777, 18272 => 38738, 18273 => 36731, 18274 => 27682, +18275 => 20542, 18276 => 21375, 18277 => 28165, 18278 => 25806, 18279 => 26228, +18280 => 27696, 18281 => 24773, 18282 => 39031, 18283 => 35831, 18284 => 24198, +18285 => 29756, 18286 => 31351, 18287 => 31179, 18288 => 19992, 18289 => 37041, +18290 => 29699, 18291 => 27714, 18292 => 22234, 18293 => 37195, 18294 => 27845, +18295 => 36235, 18296 => 21306, 18297 => 34502, 18298 => 26354, 18299 => 36527, +18300 => 23624, 18301 => 39537, 18302 => 28192, 18465 => 21462, 18466 => 23094, +18467 => 40843, 18468 => 36259, 18469 => 21435, 18470 => 22280, 18471 => 39079, +18472 => 26435, 18473 => 37275, 18474 => 27849, 18475 => 20840, 18476 => 30154, +18477 => 25331, 18478 => 29356, 18479 => 21048, 18480 => 21149, 18481 => 32570, +18482 => 28820, 18483 => 30264, 18484 => 21364, 18485 => 40522, 18486 => 27063, +18487 => 30830, 18488 => 38592, 18489 => 35033, 18490 => 32676, 18491 => 28982, +18492 => 29123, 18493 => 20873, 18494 => 26579, 18495 => 29924, 18496 => 22756, +18497 => 25880, 18498 => 22199, 18499 => 35753, 18500 => 39286, 18501 => 25200, +18502 => 32469, 18503 => 24825, 18504 => 28909, 18505 => 22764, 18506 => 20161, +18507 => 20154, 18508 => 24525, 18509 => 38887, 18510 => 20219, 18511 => 35748, +18512 => 20995, 18513 => 22922, 18514 => 32427, 18515 => 25172, 18516 => 20173, +18517 => 26085, 18518 => 25102, 18519 => 33592, 18520 => 33993, 18521 => 33635, +18522 => 34701, 18523 => 29076, 18524 => 28342, 18525 => 23481, 18526 => 32466, +18527 => 20887, 18528 => 25545, 18529 => 26580, 18530 => 32905, 18531 => 33593, +18532 => 34837, 18533 => 20754, 18534 => 23418, 18535 => 22914, 18536 => 36785, +18537 => 20083, 18538 => 27741, 18539 => 20837, 18540 => 35109, 18541 => 36719, +18542 => 38446, 18543 => 34122, 18544 => 29790, 18545 => 38160, 18546 => 38384, +18547 => 28070, 18548 => 33509, 18549 => 24369, 18550 => 25746, 18551 => 27922, +18552 => 33832, 18553 => 33134, 18554 => 40131, 18555 => 22622, 18556 => 36187, +18557 => 19977, 18558 => 21441, 18721 => 20254, 18722 => 25955, 18723 => 26705, +18724 => 21971, 18725 => 20007, 18726 => 25620, 18727 => 39578, 18728 => 25195, +18729 => 23234, 18730 => 29791, 18731 => 33394, 18732 => 28073, 18733 => 26862, +18734 => 20711, 18735 => 33678, 18736 => 30722, 18737 => 26432, 18738 => 21049, +18739 => 27801, 18740 => 32433, 18741 => 20667, 18742 => 21861, 18743 => 29022, +18744 => 31579, 18745 => 26194, 18746 => 29642, 18747 => 33515, 18748 => 26441, +18749 => 23665, 18750 => 21024, 18751 => 29053, 18752 => 34923, 18753 => 38378, +18754 => 38485, 18755 => 25797, 18756 => 36193, 18757 => 33203, 18758 => 21892, +18759 => 27733, 18760 => 25159, 18761 => 32558, 18762 => 22674, 18763 => 20260, +18764 => 21830, 18765 => 36175, 18766 => 26188, 18767 => 19978, 18768 => 23578, +18769 => 35059, 18770 => 26786, 18771 => 25422, 18772 => 31245, 18773 => 28903, +18774 => 33421, 18775 => 21242, 18776 => 38902, 18777 => 23569, 18778 => 21736, +18779 => 37045, 18780 => 32461, 18781 => 22882, 18782 => 36170, 18783 => 34503, +18784 => 33292, 18785 => 33293, 18786 => 36198, 18787 => 25668, 18788 => 23556, +18789 => 24913, 18790 => 28041, 18791 => 31038, 18792 => 35774, 18793 => 30775, +18794 => 30003, 18795 => 21627, 18796 => 20280, 18797 => 36523, 18798 => 28145, +18799 => 23072, 18800 => 32453, 18801 => 31070, 18802 => 27784, 18803 => 23457, +18804 => 23158, 18805 => 29978, 18806 => 32958, 18807 => 24910, 18808 => 28183, +18809 => 22768, 18810 => 29983, 18811 => 29989, 18812 => 29298, 18813 => 21319, +18814 => 32499, 18977 => 30465, 18978 => 30427, 18979 => 21097, 18980 => 32988, +18981 => 22307, 18982 => 24072, 18983 => 22833, 18984 => 29422, 18985 => 26045, +18986 => 28287, 18987 => 35799, 18988 => 23608, 18989 => 34417, 18990 => 21313, +18991 => 30707, 18992 => 25342, 18993 => 26102, 18994 => 20160, 18995 => 39135, +18996 => 34432, 18997 => 23454, 18998 => 35782, 18999 => 21490, 19000 => 30690, +19001 => 20351, 19002 => 23630, 19003 => 39542, 19004 => 22987, 19005 => 24335, +19006 => 31034, 19007 => 22763, 19008 => 19990, 19009 => 26623, 19010 => 20107, +19011 => 25325, 19012 => 35475, 19013 => 36893, 19014 => 21183, 19015 => 26159, +19016 => 21980, 19017 => 22124, 19018 => 36866, 19019 => 20181, 19020 => 20365, +19021 => 37322, 19022 => 39280, 19023 => 27663, 19024 => 24066, 19025 => 24643, +19026 => 23460, 19027 => 35270, 19028 => 35797, 19029 => 25910, 19030 => 25163, +19031 => 39318, 19032 => 23432, 19033 => 23551, 19034 => 25480, 19035 => 21806, +19036 => 21463, 19037 => 30246, 19038 => 20861, 19039 => 34092, 19040 => 26530, +19041 => 26803, 19042 => 27530, 19043 => 25234, 19044 => 36755, 19045 => 21460, +19046 => 33298, 19047 => 28113, 19048 => 30095, 19049 => 20070, 19050 => 36174, +19051 => 23408, 19052 => 29087, 19053 => 34223, 19054 => 26257, 19055 => 26329, +19056 => 32626, 19057 => 34560, 19058 => 40653, 19059 => 40736, 19060 => 23646, +19061 => 26415, 19062 => 36848, 19063 => 26641, 19064 => 26463, 19065 => 25101, +19066 => 31446, 19067 => 22661, 19068 => 24246, 19069 => 25968, 19070 => 28465, +19233 => 24661, 19234 => 21047, 19235 => 32781, 19236 => 25684, 19237 => 34928, +19238 => 29993, 19239 => 24069, 19240 => 26643, 19241 => 25332, 19242 => 38684, +19243 => 21452, 19244 => 29245, 19245 => 35841, 19246 => 27700, 19247 => 30561, +19248 => 31246, 19249 => 21550, 19250 => 30636, 19251 => 39034, 19252 => 33308, +19253 => 35828, 19254 => 30805, 19255 => 26388, 19256 => 28865, 19257 => 26031, +19258 => 25749, 19259 => 22070, 19260 => 24605, 19261 => 31169, 19262 => 21496, +19263 => 19997, 19264 => 27515, 19265 => 32902, 19266 => 23546, 19267 => 21987, +19268 => 22235, 19269 => 20282, 19270 => 20284, 19271 => 39282, 19272 => 24051, +19273 => 26494, 19274 => 32824, 19275 => 24578, 19276 => 39042, 19277 => 36865, +19278 => 23435, 19279 => 35772, 19280 => 35829, 19281 => 25628, 19282 => 33368, +19283 => 25822, 19284 => 22013, 19285 => 33487, 19286 => 37221, 19287 => 20439, +19288 => 32032, 19289 => 36895, 19290 => 31903, 19291 => 20723, 19292 => 22609, +19293 => 28335, 19294 => 23487, 19295 => 35785, 19296 => 32899, 19297 => 37240, +19298 => 33948, 19299 => 31639, 19300 => 34429, 19301 => 38539, 19302 => 38543, +19303 => 32485, 19304 => 39635, 19305 => 30862, 19306 => 23681, 19307 => 31319, +19308 => 36930, 19309 => 38567, 19310 => 31071, 19311 => 23385, 19312 => 25439, +19313 => 31499, 19314 => 34001, 19315 => 26797, 19316 => 21766, 19317 => 32553, +19318 => 29712, 19319 => 32034, 19320 => 38145, 19321 => 25152, 19322 => 22604, +19323 => 20182, 19324 => 23427, 19325 => 22905, 19326 => 22612, 19489 => 29549, +19490 => 25374, 19491 => 36427, 19492 => 36367, 19493 => 32974, 19494 => 33492, +19495 => 25260, 19496 => 21488, 19497 => 27888, 19498 => 37214, 19499 => 22826, +19500 => 24577, 19501 => 27760, 19502 => 22349, 19503 => 25674, 19504 => 36138, +19505 => 30251, 19506 => 28393, 19507 => 22363, 19508 => 27264, 19509 => 30192, +19510 => 28525, 19511 => 35885, 19512 => 35848, 19513 => 22374, 19514 => 27631, +19515 => 34962, 19516 => 30899, 19517 => 25506, 19518 => 21497, 19519 => 28845, +19520 => 27748, 19521 => 22616, 19522 => 25642, 19523 => 22530, 19524 => 26848, +19525 => 33179, 19526 => 21776, 19527 => 31958, 19528 => 20504, 19529 => 36538, +19530 => 28108, 19531 => 36255, 19532 => 28907, 19533 => 25487, 19534 => 28059, +19535 => 28372, 19536 => 32486, 19537 => 33796, 19538 => 26691, 19539 => 36867, +19540 => 28120, 19541 => 38518, 19542 => 35752, 19543 => 22871, 19544 => 29305, +19545 => 34276, 19546 => 33150, 19547 => 30140, 19548 => 35466, 19549 => 26799, +19550 => 21076, 19551 => 36386, 19552 => 38161, 19553 => 25552, 19554 => 39064, +19555 => 36420, 19556 => 21884, 19557 => 20307, 19558 => 26367, 19559 => 22159, +19560 => 24789, 19561 => 28053, 19562 => 21059, 19563 => 23625, 19564 => 22825, +19565 => 28155, 19566 => 22635, 19567 => 30000, 19568 => 29980, 19569 => 24684, +19570 => 33300, 19571 => 33094, 19572 => 25361, 19573 => 26465, 19574 => 36834, +19575 => 30522, 19576 => 36339, 19577 => 36148, 19578 => 38081, 19579 => 24086, +19580 => 21381, 19581 => 21548, 19582 => 28867, 19745 => 27712, 19746 => 24311, +19747 => 20572, 19748 => 20141, 19749 => 24237, 19750 => 25402, 19751 => 33351, +19752 => 36890, 19753 => 26704, 19754 => 37230, 19755 => 30643, 19756 => 21516, +19757 => 38108, 19758 => 24420, 19759 => 31461, 19760 => 26742, 19761 => 25413, +19762 => 31570, 19763 => 32479, 19764 => 30171, 19765 => 20599, 19766 => 25237, +19767 => 22836, 19768 => 36879, 19769 => 20984, 19770 => 31171, 19771 => 31361, +19772 => 22270, 19773 => 24466, 19774 => 36884, 19775 => 28034, 19776 => 23648, +19777 => 22303, 19778 => 21520, 19779 => 20820, 19780 => 28237, 19781 => 22242, +19782 => 25512, 19783 => 39059, 19784 => 33151, 19785 => 34581, 19786 => 35114, +19787 => 36864, 19788 => 21534, 19789 => 23663, 19790 => 33216, 19791 => 25302, +19792 => 25176, 19793 => 33073, 19794 => 40501, 19795 => 38464, 19796 => 39534, +19797 => 39548, 19798 => 26925, 19799 => 22949, 19800 => 25299, 19801 => 21822, +19802 => 25366, 19803 => 21703, 19804 => 34521, 19805 => 27964, 19806 => 23043, +19807 => 29926, 19808 => 34972, 19809 => 27498, 19810 => 22806, 19811 => 35916, +19812 => 24367, 19813 => 28286, 19814 => 29609, 19815 => 39037, 19816 => 20024, +19817 => 28919, 19818 => 23436, 19819 => 30871, 19820 => 25405, 19821 => 26202, +19822 => 30358, 19823 => 24779, 19824 => 23451, 19825 => 23113, 19826 => 19975, +19827 => 33109, 19828 => 27754, 19829 => 29579, 19830 => 20129, 19831 => 26505, +19832 => 32593, 19833 => 24448, 19834 => 26106, 19835 => 26395, 19836 => 24536, +19837 => 22916, 19838 => 23041, 20001 => 24013, 20002 => 24494, 20003 => 21361, +20004 => 38886, 20005 => 36829, 20006 => 26693, 20007 => 22260, 20008 => 21807, +20009 => 24799, 20010 => 20026, 20011 => 28493, 20012 => 32500, 20013 => 33479, +20014 => 33806, 20015 => 22996, 20016 => 20255, 20017 => 20266, 20018 => 23614, +20019 => 32428, 20020 => 26410, 20021 => 34074, 20022 => 21619, 20023 => 30031, +20024 => 32963, 20025 => 21890, 20026 => 39759, 20027 => 20301, 20028 => 28205, +20029 => 35859, 20030 => 23561, 20031 => 24944, 20032 => 21355, 20033 => 30239, +20034 => 28201, 20035 => 34442, 20036 => 25991, 20037 => 38395, 20038 => 32441, +20039 => 21563, 20040 => 31283, 20041 => 32010, 20042 => 38382, 20043 => 21985, +20044 => 32705, 20045 => 29934, 20046 => 25373, 20047 => 34583, 20048 => 28065, +20049 => 31389, 20050 => 25105, 20051 => 26017, 20052 => 21351, 20053 => 25569, +20054 => 27779, 20055 => 24043, 20056 => 21596, 20057 => 38056, 20058 => 20044, +20059 => 27745, 20060 => 35820, 20061 => 23627, 20062 => 26080, 20063 => 33436, +20064 => 26791, 20065 => 21566, 20066 => 21556, 20067 => 27595, 20068 => 27494, +20069 => 20116, 20070 => 25410, 20071 => 21320, 20072 => 33310, 20073 => 20237, +20074 => 20398, 20075 => 22366, 20076 => 25098, 20077 => 38654, 20078 => 26212, +20079 => 29289, 20080 => 21247, 20081 => 21153, 20082 => 24735, 20083 => 35823, +20084 => 26132, 20085 => 29081, 20086 => 26512, 20087 => 35199, 20088 => 30802, +20089 => 30717, 20090 => 26224, 20091 => 22075, 20092 => 21560, 20093 => 38177, +20094 => 29306, 20257 => 31232, 20258 => 24687, 20259 => 24076, 20260 => 24713, +20261 => 33181, 20262 => 22805, 20263 => 24796, 20264 => 29060, 20265 => 28911, +20266 => 28330, 20267 => 27728, 20268 => 29312, 20269 => 27268, 20270 => 34989, +20271 => 24109, 20272 => 20064, 20273 => 23219, 20274 => 21916, 20275 => 38115, +20276 => 27927, 20277 => 31995, 20278 => 38553, 20279 => 25103, 20280 => 32454, +20281 => 30606, 20282 => 34430, 20283 => 21283, 20284 => 38686, 20285 => 36758, +20286 => 26247, 20287 => 23777, 20288 => 20384, 20289 => 29421, 20290 => 19979, +20291 => 21414, 20292 => 22799, 20293 => 21523, 20294 => 25472, 20295 => 38184, +20296 => 20808, 20297 => 20185, 20298 => 40092, 20299 => 32420, 20300 => 21688, +20301 => 36132, 20302 => 34900, 20303 => 33335, 20304 => 38386, 20305 => 28046, +20306 => 24358, 20307 => 23244, 20308 => 26174, 20309 => 38505, 20310 => 29616, +20311 => 29486, 20312 => 21439, 20313 => 33146, 20314 => 39301, 20315 => 32673, +20316 => 23466, 20317 => 38519, 20318 => 38480, 20319 => 32447, 20320 => 30456, +20321 => 21410, 20322 => 38262, 20323 => 39321, 20324 => 31665, 20325 => 35140, +20326 => 28248, 20327 => 20065, 20328 => 32724, 20329 => 31077, 20330 => 35814, +20331 => 24819, 20332 => 21709, 20333 => 20139, 20334 => 39033, 20335 => 24055, +20336 => 27233, 20337 => 20687, 20338 => 21521, 20339 => 35937, 20340 => 33831, +20341 => 30813, 20342 => 38660, 20343 => 21066, 20344 => 21742, 20345 => 22179, +20346 => 38144, 20347 => 28040, 20348 => 23477, 20349 => 28102, 20350 => 26195, +20513 => 23567, 20514 => 23389, 20515 => 26657, 20516 => 32918, 20517 => 21880, +20518 => 31505, 20519 => 25928, 20520 => 26964, 20521 => 20123, 20522 => 27463, +20523 => 34638, 20524 => 38795, 20525 => 21327, 20526 => 25375, 20527 => 25658, +20528 => 37034, 20529 => 26012, 20530 => 32961, 20531 => 35856, 20532 => 20889, +20533 => 26800, 20534 => 21368, 20535 => 34809, 20536 => 25032, 20537 => 27844, +20538 => 27899, 20539 => 35874, 20540 => 23633, 20541 => 34218, 20542 => 33455, +20543 => 38156, 20544 => 27427, 20545 => 36763, 20546 => 26032, 20547 => 24571, +20548 => 24515, 20549 => 20449, 20550 => 34885, 20551 => 26143, 20552 => 33125, +20553 => 29481, 20554 => 24826, 20555 => 20852, 20556 => 21009, 20557 => 22411, +20558 => 24418, 20559 => 37026, 20560 => 34892, 20561 => 37266, 20562 => 24184, +20563 => 26447, 20564 => 24615, 20565 => 22995, 20566 => 20804, 20567 => 20982, +20568 => 33016, 20569 => 21256, 20570 => 27769, 20571 => 38596, 20572 => 29066, +20573 => 20241, 20574 => 20462, 20575 => 32670, 20576 => 26429, 20577 => 21957, +20578 => 38152, 20579 => 31168, 20580 => 34966, 20581 => 32483, 20582 => 22687, +20583 => 25100, 20584 => 38656, 20585 => 34394, 20586 => 22040, 20587 => 39035, +20588 => 24464, 20589 => 35768, 20590 => 33988, 20591 => 37207, 20592 => 21465, +20593 => 26093, 20594 => 24207, 20595 => 30044, 20596 => 24676, 20597 => 32110, +20598 => 23167, 20599 => 32490, 20600 => 32493, 20601 => 36713, 20602 => 21927, +20603 => 23459, 20604 => 24748, 20605 => 26059, 20606 => 29572, 20769 => 36873, +20770 => 30307, 20771 => 30505, 20772 => 32474, 20773 => 38772, 20774 => 34203, +20775 => 23398, 20776 => 31348, 20777 => 38634, 20778 => 34880, 20779 => 21195, +20780 => 29071, 20781 => 24490, 20782 => 26092, 20783 => 35810, 20784 => 23547, +20785 => 39535, 20786 => 24033, 20787 => 27529, 20788 => 27739, 20789 => 35757, +20790 => 35759, 20791 => 36874, 20792 => 36805, 20793 => 21387, 20794 => 25276, +20795 => 40486, 20796 => 40493, 20797 => 21568, 20798 => 20011, 20799 => 33469, +20800 => 29273, 20801 => 34460, 20802 => 23830, 20803 => 34905, 20804 => 28079, +20805 => 38597, 20806 => 21713, 20807 => 20122, 20808 => 35766, 20809 => 28937, +20810 => 21693, 20811 => 38409, 20812 => 28895, 20813 => 28153, 20814 => 30416, +20815 => 20005, 20816 => 30740, 20817 => 34578, 20818 => 23721, 20819 => 24310, +20820 => 35328, 20821 => 39068, 20822 => 38414, 20823 => 28814, 20824 => 27839, +20825 => 22852, 20826 => 25513, 20827 => 30524, 20828 => 34893, 20829 => 28436, +20830 => 33395, 20831 => 22576, 20832 => 29141, 20833 => 21388, 20834 => 30746, +20835 => 38593, 20836 => 21761, 20837 => 24422, 20838 => 28976, 20839 => 23476, +20840 => 35866, 20841 => 39564, 20842 => 27523, 20843 => 22830, 20844 => 40495, +20845 => 31207, 20846 => 26472, 20847 => 25196, 20848 => 20335, 20849 => 30113, +20850 => 32650, 20851 => 27915, 20852 => 38451, 20853 => 27687, 20854 => 20208, +20855 => 30162, 20856 => 20859, 20857 => 26679, 20858 => 28478, 20859 => 36992, +20860 => 33136, 20861 => 22934, 20862 => 29814, 21025 => 25671, 21026 => 23591, +21027 => 36965, 21028 => 31377, 21029 => 35875, 21030 => 23002, 21031 => 21676, +21032 => 33280, 21033 => 33647, 21034 => 35201, 21035 => 32768, 21036 => 26928, +21037 => 22094, 21038 => 32822, 21039 => 29239, 21040 => 37326, 21041 => 20918, +21042 => 20063, 21043 => 39029, 21044 => 25494, 21045 => 19994, 21046 => 21494, +21047 => 26355, 21048 => 33099, 21049 => 22812, 21050 => 28082, 21051 => 19968, +21052 => 22777, 21053 => 21307, 21054 => 25558, 21055 => 38129, 21056 => 20381, +21057 => 20234, 21058 => 34915, 21059 => 39056, 21060 => 22839, 21061 => 36951, +21062 => 31227, 21063 => 20202, 21064 => 33008, 21065 => 30097, 21066 => 27778, +21067 => 23452, 21068 => 23016, 21069 => 24413, 21070 => 26885, 21071 => 34433, +21072 => 20506, 21073 => 24050, 21074 => 20057, 21075 => 30691, 21076 => 20197, +21077 => 33402, 21078 => 25233, 21079 => 26131, 21080 => 37009, 21081 => 23673, +21082 => 20159, 21083 => 24441, 21084 => 33222, 21085 => 36920, 21086 => 32900, +21087 => 30123, 21088 => 20134, 21089 => 35028, 21090 => 24847, 21091 => 27589, +21092 => 24518, 21093 => 20041, 21094 => 30410, 21095 => 28322, 21096 => 35811, +21097 => 35758, 21098 => 35850, 21099 => 35793, 21100 => 24322, 21101 => 32764, +21102 => 32716, 21103 => 32462, 21104 => 33589, 21105 => 33643, 21106 => 22240, +21107 => 27575, 21108 => 38899, 21109 => 38452, 21110 => 23035, 21111 => 21535, +21112 => 38134, 21113 => 28139, 21114 => 23493, 21115 => 39278, 21116 => 23609, +21117 => 24341, 21118 => 38544, 21281 => 21360, 21282 => 33521, 21283 => 27185, +21284 => 23156, 21285 => 40560, 21286 => 24212, 21287 => 32552, 21288 => 33721, +21289 => 33828, 21290 => 33829, 21291 => 33639, 21292 => 34631, 21293 => 36814, +21294 => 36194, 21295 => 30408, 21296 => 24433, 21297 => 39062, 21298 => 30828, +21299 => 26144, 21300 => 21727, 21301 => 25317, 21302 => 20323, 21303 => 33219, +21304 => 30152, 21305 => 24248, 21306 => 38605, 21307 => 36362, 21308 => 34553, +21309 => 21647, 21310 => 27891, 21311 => 28044, 21312 => 27704, 21313 => 24703, +21314 => 21191, 21315 => 29992, 21316 => 24189, 21317 => 20248, 21318 => 24736, +21319 => 24551, 21320 => 23588, 21321 => 30001, 21322 => 37038, 21323 => 38080, +21324 => 29369, 21325 => 27833, 21326 => 28216, 21327 => 37193, 21328 => 26377, +21329 => 21451, 21330 => 21491, 21331 => 20305, 21332 => 37321, 21333 => 35825, +21334 => 21448, 21335 => 24188, 21336 => 36802, 21337 => 28132, 21338 => 20110, +21339 => 30402, 21340 => 27014, 21341 => 34398, 21342 => 24858, 21343 => 33286, +21344 => 20313, 21345 => 20446, 21346 => 36926, 21347 => 40060, 21348 => 24841, +21349 => 28189, 21350 => 28180, 21351 => 38533, 21352 => 20104, 21353 => 23089, +21354 => 38632, 21355 => 19982, 21356 => 23679, 21357 => 31161, 21358 => 23431, +21359 => 35821, 21360 => 32701, 21361 => 29577, 21362 => 22495, 21363 => 33419, +21364 => 37057, 21365 => 21505, 21366 => 36935, 21367 => 21947, 21368 => 23786, +21369 => 24481, 21370 => 24840, 21371 => 27442, 21372 => 29425, 21373 => 32946, +21374 => 35465, 21537 => 28020, 21538 => 23507, 21539 => 35029, 21540 => 39044, +21541 => 35947, 21542 => 39533, 21543 => 40499, 21544 => 28170, 21545 => 20900, +21546 => 20803, 21547 => 22435, 21548 => 34945, 21549 => 21407, 21550 => 25588, +21551 => 36757, 21552 => 22253, 21553 => 21592, 21554 => 22278, 21555 => 29503, +21556 => 28304, 21557 => 32536, 21558 => 36828, 21559 => 33489, 21560 => 24895, +21561 => 24616, 21562 => 38498, 21563 => 26352, 21564 => 32422, 21565 => 36234, +21566 => 36291, 21567 => 38053, 21568 => 23731, 21569 => 31908, 21570 => 26376, +21571 => 24742, 21572 => 38405, 21573 => 32792, 21574 => 20113, 21575 => 37095, +21576 => 21248, 21577 => 38504, 21578 => 20801, 21579 => 36816, 21580 => 34164, +21581 => 37213, 21582 => 26197, 21583 => 38901, 21584 => 23381, 21585 => 21277, +21586 => 30776, 21587 => 26434, 21588 => 26685, 21589 => 21705, 21590 => 28798, +21591 => 23472, 21592 => 36733, 21593 => 20877, 21594 => 22312, 21595 => 21681, +21596 => 25874, 21597 => 26242, 21598 => 36190, 21599 => 36163, 21600 => 33039, +21601 => 33900, 21602 => 36973, 21603 => 31967, 21604 => 20991, 21605 => 34299, +21606 => 26531, 21607 => 26089, 21608 => 28577, 21609 => 34468, 21610 => 36481, +21611 => 22122, 21612 => 36896, 21613 => 30338, 21614 => 28790, 21615 => 29157, +21616 => 36131, 21617 => 25321, 21618 => 21017, 21619 => 27901, 21620 => 36156, +21621 => 24590, 21622 => 22686, 21623 => 24974, 21624 => 26366, 21625 => 36192, +21626 => 25166, 21627 => 21939, 21628 => 28195, 21629 => 26413, 21630 => 36711, +21793 => 38113, 21794 => 38392, 21795 => 30504, 21796 => 26629, 21797 => 27048, +21798 => 21643, 21799 => 20045, 21800 => 28856, 21801 => 35784, 21802 => 25688, +21803 => 25995, 21804 => 23429, 21805 => 31364, 21806 => 20538, 21807 => 23528, +21808 => 30651, 21809 => 27617, 21810 => 35449, 21811 => 31896, 21812 => 27838, +21813 => 30415, 21814 => 26025, 21815 => 36759, 21816 => 23853, 21817 => 23637, +21818 => 34360, 21819 => 26632, 21820 => 21344, 21821 => 25112, 21822 => 31449, +21823 => 28251, 21824 => 32509, 21825 => 27167, 21826 => 31456, 21827 => 24432, +21828 => 28467, 21829 => 24352, 21830 => 25484, 21831 => 28072, 21832 => 26454, +21833 => 19976, 21834 => 24080, 21835 => 36134, 21836 => 20183, 21837 => 32960, +21838 => 30260, 21839 => 38556, 21840 => 25307, 21841 => 26157, 21842 => 25214, +21843 => 27836, 21844 => 36213, 21845 => 29031, 21846 => 32617, 21847 => 20806, +21848 => 32903, 21849 => 21484, 21850 => 36974, 21851 => 25240, 21852 => 21746, +21853 => 34544, 21854 => 36761, 21855 => 32773, 21856 => 38167, 21857 => 34071, +21858 => 36825, 21859 => 27993, 21860 => 29645, 21861 => 26015, 21862 => 30495, +21863 => 29956, 21864 => 30759, 21865 => 33275, 21866 => 36126, 21867 => 38024, +21868 => 20390, 21869 => 26517, 21870 => 30137, 21871 => 35786, 21872 => 38663, +21873 => 25391, 21874 => 38215, 21875 => 38453, 21876 => 33976, 21877 => 25379, +21878 => 30529, 21879 => 24449, 21880 => 29424, 21881 => 20105, 21882 => 24596, +21883 => 25972, 21884 => 25327, 21885 => 27491, 21886 => 25919, 22049 => 24103, +22050 => 30151, 22051 => 37073, 22052 => 35777, 22053 => 33437, 22054 => 26525, +22055 => 25903, 22056 => 21553, 22057 => 34584, 22058 => 30693, 22059 => 32930, +22060 => 33026, 22061 => 27713, 22062 => 20043, 22063 => 32455, 22064 => 32844, +22065 => 30452, 22066 => 26893, 22067 => 27542, 22068 => 25191, 22069 => 20540, +22070 => 20356, 22071 => 22336, 22072 => 25351, 22073 => 27490, 22074 => 36286, +22075 => 21482, 22076 => 26088, 22077 => 32440, 22078 => 24535, 22079 => 25370, +22080 => 25527, 22081 => 33267, 22082 => 33268, 22083 => 32622, 22084 => 24092, +22085 => 23769, 22086 => 21046, 22087 => 26234, 22088 => 31209, 22089 => 31258, +22090 => 36136, 22091 => 28825, 22092 => 30164, 22093 => 28382, 22094 => 27835, +22095 => 31378, 22096 => 20013, 22097 => 30405, 22098 => 24544, 22099 => 38047, +22100 => 34935, 22101 => 32456, 22102 => 31181, 22103 => 32959, 22104 => 37325, +22105 => 20210, 22106 => 20247, 22107 => 33311, 22108 => 21608, 22109 => 24030, +22110 => 27954, 22111 => 35788, 22112 => 31909, 22113 => 36724, 22114 => 32920, +22115 => 24090, 22116 => 21650, 22117 => 30385, 22118 => 23449, 22119 => 26172, +22120 => 39588, 22121 => 29664, 22122 => 26666, 22123 => 34523, 22124 => 26417, +22125 => 29482, 22126 => 35832, 22127 => 35803, 22128 => 36880, 22129 => 31481, +22130 => 28891, 22131 => 29038, 22132 => 25284, 22133 => 30633, 22134 => 22065, +22135 => 20027, 22136 => 33879, 22137 => 26609, 22138 => 21161, 22139 => 34496, +22140 => 36142, 22141 => 38136, 22142 => 31569, 22305 => 20303, 22306 => 27880, +22307 => 31069, 22308 => 39547, 22309 => 25235, 22310 => 29226, 22311 => 25341, +22312 => 19987, 22313 => 30742, 22314 => 36716, 22315 => 25776, 22316 => 36186, +22317 => 31686, 22318 => 26729, 22319 => 24196, 22320 => 35013, 22321 => 22918, +22322 => 25758, 22323 => 22766, 22324 => 29366, 22325 => 26894, 22326 => 38181, +22327 => 36861, 22328 => 36184, 22329 => 22368, 22330 => 32512, 22331 => 35846, +22332 => 20934, 22333 => 25417, 22334 => 25305, 22335 => 21331, 22336 => 26700, +22337 => 29730, 22338 => 33537, 22339 => 37196, 22340 => 21828, 22341 => 30528, +22342 => 28796, 22343 => 27978, 22344 => 20857, 22345 => 21672, 22346 => 36164, +22347 => 23039, 22348 => 28363, 22349 => 28100, 22350 => 23388, 22351 => 32043, +22352 => 20180, 22353 => 31869, 22354 => 28371, 22355 => 23376, 22356 => 33258, +22357 => 28173, 22358 => 23383, 22359 => 39683, 22360 => 26837, 22361 => 36394, +22362 => 23447, 22363 => 32508, 22364 => 24635, 22365 => 32437, 22366 => 37049, +22367 => 36208, 22368 => 22863, 22369 => 25549, 22370 => 31199, 22371 => 36275, +22372 => 21330, 22373 => 26063, 22374 => 31062, 22375 => 35781, 22376 => 38459, +22377 => 32452, 22378 => 38075, 22379 => 32386, 22380 => 22068, 22381 => 37257, +22382 => 26368, 22383 => 32618, 22384 => 23562, 22385 => 36981, 22386 => 26152, +22387 => 24038, 22388 => 20304, 22389 => 26590, 22390 => 20570, 22391 => 20316, +22392 => 22352, 22393 => 24231, 22561 => 20109, 22562 => 19980, 22563 => 20800, +22564 => 19984, 22565 => 24319, 22566 => 21317, 22567 => 19989, 22568 => 20120, +22569 => 19998, 22570 => 39730, 22571 => 23404, 22572 => 22121, 22573 => 20008, +22574 => 31162, 22575 => 20031, 22576 => 21269, 22577 => 20039, 22578 => 22829, +22579 => 29243, 22580 => 21358, 22581 => 27664, 22582 => 22239, 22583 => 32996, +22584 => 39319, 22585 => 27603, 22586 => 30590, 22587 => 40727, 22588 => 20022, +22589 => 20127, 22590 => 40720, 22591 => 20060, 22592 => 20073, 22593 => 20115, +22594 => 33416, 22595 => 23387, 22596 => 21868, 22597 => 22031, 22598 => 20164, +22599 => 21389, 22600 => 21405, 22601 => 21411, 22602 => 21413, 22603 => 21422, +22604 => 38757, 22605 => 36189, 22606 => 21274, 22607 => 21493, 22608 => 21286, +22609 => 21294, 22610 => 21310, 22611 => 36188, 22612 => 21350, 22613 => 21347, +22614 => 20994, 22615 => 21000, 22616 => 21006, 22617 => 21037, 22618 => 21043, +22619 => 21055, 22620 => 21056, 22621 => 21068, 22622 => 21086, 22623 => 21089, +22624 => 21084, 22625 => 33967, 22626 => 21117, 22627 => 21122, 22628 => 21121, +22629 => 21136, 22630 => 21139, 22631 => 20866, 22632 => 32596, 22633 => 20155, +22634 => 20163, 22635 => 20169, 22636 => 20162, 22637 => 20200, 22638 => 20193, +22639 => 20203, 22640 => 20190, 22641 => 20251, 22642 => 20211, 22643 => 20258, +22644 => 20324, 22645 => 20213, 22646 => 20261, 22647 => 20263, 22648 => 20233, +22649 => 20267, 22650 => 20318, 22651 => 20327, 22652 => 25912, 22653 => 20314, +22654 => 20317, 22817 => 20319, 22818 => 20311, 22819 => 20274, 22820 => 20285, +22821 => 20342, 22822 => 20340, 22823 => 20369, 22824 => 20361, 22825 => 20355, +22826 => 20367, 22827 => 20350, 22828 => 20347, 22829 => 20394, 22830 => 20348, +22831 => 20396, 22832 => 20372, 22833 => 20454, 22834 => 20456, 22835 => 20458, +22836 => 20421, 22837 => 20442, 22838 => 20451, 22839 => 20444, 22840 => 20433, +22841 => 20447, 22842 => 20472, 22843 => 20521, 22844 => 20556, 22845 => 20467, +22846 => 20524, 22847 => 20495, 22848 => 20526, 22849 => 20525, 22850 => 20478, +22851 => 20508, 22852 => 20492, 22853 => 20517, 22854 => 20520, 22855 => 20606, +22856 => 20547, 22857 => 20565, 22858 => 20552, 22859 => 20558, 22860 => 20588, +22861 => 20603, 22862 => 20645, 22863 => 20647, 22864 => 20649, 22865 => 20666, +22866 => 20694, 22867 => 20742, 22868 => 20717, 22869 => 20716, 22870 => 20710, +22871 => 20718, 22872 => 20743, 22873 => 20747, 22874 => 20189, 22875 => 27709, +22876 => 20312, 22877 => 20325, 22878 => 20430, 22879 => 40864, 22880 => 27718, +22881 => 31860, 22882 => 20846, 22883 => 24061, 22884 => 40649, 22885 => 39320, +22886 => 20865, 22887 => 22804, 22888 => 21241, 22889 => 21261, 22890 => 35335, +22891 => 21264, 22892 => 20971, 22893 => 22809, 22894 => 20821, 22895 => 20128, +22896 => 20822, 22897 => 20147, 22898 => 34926, 22899 => 34980, 22900 => 20149, +22901 => 33044, 22902 => 35026, 22903 => 31104, 22904 => 23348, 22905 => 34819, +22906 => 32696, 22907 => 20907, 22908 => 20913, 22909 => 20925, 22910 => 20924, +23073 => 20935, 23074 => 20886, 23075 => 20898, 23076 => 20901, 23077 => 35744, +23078 => 35750, 23079 => 35751, 23080 => 35754, 23081 => 35764, 23082 => 35765, +23083 => 35767, 23084 => 35778, 23085 => 35779, 23086 => 35787, 23087 => 35791, +23088 => 35790, 23089 => 35794, 23090 => 35795, 23091 => 35796, 23092 => 35798, +23093 => 35800, 23094 => 35801, 23095 => 35804, 23096 => 35807, 23097 => 35808, +23098 => 35812, 23099 => 35816, 23100 => 35817, 23101 => 35822, 23102 => 35824, +23103 => 35827, 23104 => 35830, 23105 => 35833, 23106 => 35836, 23107 => 35839, +23108 => 35840, 23109 => 35842, 23110 => 35844, 23111 => 35847, 23112 => 35852, +23113 => 35855, 23114 => 35857, 23115 => 35858, 23116 => 35860, 23117 => 35861, +23118 => 35862, 23119 => 35865, 23120 => 35867, 23121 => 35864, 23122 => 35869, +23123 => 35871, 23124 => 35872, 23125 => 35873, 23126 => 35877, 23127 => 35879, +23128 => 35882, 23129 => 35883, 23130 => 35886, 23131 => 35887, 23132 => 35890, +23133 => 35891, 23134 => 35893, 23135 => 35894, 23136 => 21353, 23137 => 21370, +23138 => 38429, 23139 => 38434, 23140 => 38433, 23141 => 38449, 23142 => 38442, +23143 => 38461, 23144 => 38460, 23145 => 38466, 23146 => 38473, 23147 => 38484, +23148 => 38495, 23149 => 38503, 23150 => 38508, 23151 => 38514, 23152 => 38516, +23153 => 38536, 23154 => 38541, 23155 => 38551, 23156 => 38576, 23157 => 37015, +23158 => 37019, 23159 => 37021, 23160 => 37017, 23161 => 37036, 23162 => 37025, +23163 => 37044, 23164 => 37043, 23165 => 37046, 23166 => 37050, 23329 => 37048, +23330 => 37040, 23331 => 37071, 23332 => 37061, 23333 => 37054, 23334 => 37072, +23335 => 37060, 23336 => 37063, 23337 => 37075, 23338 => 37094, 23339 => 37090, +23340 => 37084, 23341 => 37079, 23342 => 37083, 23343 => 37099, 23344 => 37103, +23345 => 37118, 23346 => 37124, 23347 => 37154, 23348 => 37150, 23349 => 37155, +23350 => 37169, 23351 => 37167, 23352 => 37177, 23353 => 37187, 23354 => 37190, +23355 => 21005, 23356 => 22850, 23357 => 21154, 23358 => 21164, 23359 => 21165, +23360 => 21182, 23361 => 21759, 23362 => 21200, 23363 => 21206, 23364 => 21232, +23365 => 21471, 23366 => 29166, 23367 => 30669, 23368 => 24308, 23369 => 20981, +23370 => 20988, 23371 => 39727, 23372 => 21430, 23373 => 24321, 23374 => 30042, +23375 => 24047, 23376 => 22348, 23377 => 22441, 23378 => 22433, 23379 => 22654, +23380 => 22716, 23381 => 22725, 23382 => 22737, 23383 => 22313, 23384 => 22316, +23385 => 22314, 23386 => 22323, 23387 => 22329, 23388 => 22318, 23389 => 22319, +23390 => 22364, 23391 => 22331, 23392 => 22338, 23393 => 22377, 23394 => 22405, +23395 => 22379, 23396 => 22406, 23397 => 22396, 23398 => 22395, 23399 => 22376, +23400 => 22381, 23401 => 22390, 23402 => 22387, 23403 => 22445, 23404 => 22436, +23405 => 22412, 23406 => 22450, 23407 => 22479, 23408 => 22439, 23409 => 22452, +23410 => 22419, 23411 => 22432, 23412 => 22485, 23413 => 22488, 23414 => 22490, +23415 => 22489, 23416 => 22482, 23417 => 22456, 23418 => 22516, 23419 => 22511, +23420 => 22520, 23421 => 22500, 23422 => 22493, 23585 => 22539, 23586 => 22541, +23587 => 22525, 23588 => 22509, 23589 => 22528, 23590 => 22558, 23591 => 22553, +23592 => 22596, 23593 => 22560, 23594 => 22629, 23595 => 22636, 23596 => 22657, +23597 => 22665, 23598 => 22682, 23599 => 22656, 23600 => 39336, 23601 => 40729, +23602 => 25087, 23603 => 33401, 23604 => 33405, 23605 => 33407, 23606 => 33423, +23607 => 33418, 23608 => 33448, 23609 => 33412, 23610 => 33422, 23611 => 33425, +23612 => 33431, 23613 => 33433, 23614 => 33451, 23615 => 33464, 23616 => 33470, +23617 => 33456, 23618 => 33480, 23619 => 33482, 23620 => 33507, 23621 => 33432, +23622 => 33463, 23623 => 33454, 23624 => 33483, 23625 => 33484, 23626 => 33473, +23627 => 33449, 23628 => 33460, 23629 => 33441, 23630 => 33450, 23631 => 33439, +23632 => 33476, 23633 => 33486, 23634 => 33444, 23635 => 33505, 23636 => 33545, +23637 => 33527, 23638 => 33508, 23639 => 33551, 23640 => 33543, 23641 => 33500, +23642 => 33524, 23643 => 33490, 23644 => 33496, 23645 => 33548, 23646 => 33531, +23647 => 33491, 23648 => 33553, 23649 => 33562, 23650 => 33542, 23651 => 33556, +23652 => 33557, 23653 => 33504, 23654 => 33493, 23655 => 33564, 23656 => 33617, +23657 => 33627, 23658 => 33628, 23659 => 33544, 23660 => 33682, 23661 => 33596, +23662 => 33588, 23663 => 33585, 23664 => 33691, 23665 => 33630, 23666 => 33583, +23667 => 33615, 23668 => 33607, 23669 => 33603, 23670 => 33631, 23671 => 33600, +23672 => 33559, 23673 => 33632, 23674 => 33581, 23675 => 33594, 23676 => 33587, +23677 => 33638, 23678 => 33637, 23841 => 33640, 23842 => 33563, 23843 => 33641, +23844 => 33644, 23845 => 33642, 23846 => 33645, 23847 => 33646, 23848 => 33712, +23849 => 33656, 23850 => 33715, 23851 => 33716, 23852 => 33696, 23853 => 33706, +23854 => 33683, 23855 => 33692, 23856 => 33669, 23857 => 33660, 23858 => 33718, +23859 => 33705, 23860 => 33661, 23861 => 33720, 23862 => 33659, 23863 => 33688, +23864 => 33694, 23865 => 33704, 23866 => 33722, 23867 => 33724, 23868 => 33729, +23869 => 33793, 23870 => 33765, 23871 => 33752, 23872 => 22535, 23873 => 33816, +23874 => 33803, 23875 => 33757, 23876 => 33789, 23877 => 33750, 23878 => 33820, +23879 => 33848, 23880 => 33809, 23881 => 33798, 23882 => 33748, 23883 => 33759, +23884 => 33807, 23885 => 33795, 23886 => 33784, 23887 => 33785, 23888 => 33770, +23889 => 33733, 23890 => 33728, 23891 => 33830, 23892 => 33776, 23893 => 33761, +23894 => 33884, 23895 => 33873, 23896 => 33882, 23897 => 33881, 23898 => 33907, +23899 => 33927, 23900 => 33928, 23901 => 33914, 23902 => 33929, 23903 => 33912, +23904 => 33852, 23905 => 33862, 23906 => 33897, 23907 => 33910, 23908 => 33932, +23909 => 33934, 23910 => 33841, 23911 => 33901, 23912 => 33985, 23913 => 33997, +23914 => 34000, 23915 => 34022, 23916 => 33981, 23917 => 34003, 23918 => 33994, +23919 => 33983, 23920 => 33978, 23921 => 34016, 23922 => 33953, 23923 => 33977, +23924 => 33972, 23925 => 33943, 23926 => 34021, 23927 => 34019, 23928 => 34060, +23929 => 29965, 23930 => 34104, 23931 => 34032, 23932 => 34105, 23933 => 34079, +23934 => 34106, 24097 => 34134, 24098 => 34107, 24099 => 34047, 24100 => 34044, +24101 => 34137, 24102 => 34120, 24103 => 34152, 24104 => 34148, 24105 => 34142, +24106 => 34170, 24107 => 30626, 24108 => 34115, 24109 => 34162, 24110 => 34171, +24111 => 34212, 24112 => 34216, 24113 => 34183, 24114 => 34191, 24115 => 34169, +24116 => 34222, 24117 => 34204, 24118 => 34181, 24119 => 34233, 24120 => 34231, +24121 => 34224, 24122 => 34259, 24123 => 34241, 24124 => 34268, 24125 => 34303, +24126 => 34343, 24127 => 34309, 24128 => 34345, 24129 => 34326, 24130 => 34364, +24131 => 24318, 24132 => 24328, 24133 => 22844, 24134 => 22849, 24135 => 32823, +24136 => 22869, 24137 => 22874, 24138 => 22872, 24139 => 21263, 24140 => 23586, +24141 => 23589, 24142 => 23596, 24143 => 23604, 24144 => 25164, 24145 => 25194, +24146 => 25247, 24147 => 25275, 24148 => 25290, 24149 => 25306, 24150 => 25303, +24151 => 25326, 24152 => 25378, 24153 => 25334, 24154 => 25401, 24155 => 25419, +24156 => 25411, 24157 => 25517, 24158 => 25590, 24159 => 25457, 24160 => 25466, +24161 => 25486, 24162 => 25524, 24163 => 25453, 24164 => 25516, 24165 => 25482, +24166 => 25449, 24167 => 25518, 24168 => 25532, 24169 => 25586, 24170 => 25592, +24171 => 25568, 24172 => 25599, 24173 => 25540, 24174 => 25566, 24175 => 25550, +24176 => 25682, 24177 => 25542, 24178 => 25534, 24179 => 25669, 24180 => 25665, +24181 => 25611, 24182 => 25627, 24183 => 25632, 24184 => 25612, 24185 => 25638, +24186 => 25633, 24187 => 25694, 24188 => 25732, 24189 => 25709, 24190 => 25750, +24353 => 25722, 24354 => 25783, 24355 => 25784, 24356 => 25753, 24357 => 25786, +24358 => 25792, 24359 => 25808, 24360 => 25815, 24361 => 25828, 24362 => 25826, +24363 => 25865, 24364 => 25893, 24365 => 25902, 24366 => 24331, 24367 => 24530, +24368 => 29977, 24369 => 24337, 24370 => 21343, 24371 => 21489, 24372 => 21501, +24373 => 21481, 24374 => 21480, 24375 => 21499, 24376 => 21522, 24377 => 21526, +24378 => 21510, 24379 => 21579, 24380 => 21586, 24381 => 21587, 24382 => 21588, +24383 => 21590, 24384 => 21571, 24385 => 21537, 24386 => 21591, 24387 => 21593, +24388 => 21539, 24389 => 21554, 24390 => 21634, 24391 => 21652, 24392 => 21623, +24393 => 21617, 24394 => 21604, 24395 => 21658, 24396 => 21659, 24397 => 21636, +24398 => 21622, 24399 => 21606, 24400 => 21661, 24401 => 21712, 24402 => 21677, +24403 => 21698, 24404 => 21684, 24405 => 21714, 24406 => 21671, 24407 => 21670, +24408 => 21715, 24409 => 21716, 24410 => 21618, 24411 => 21667, 24412 => 21717, +24413 => 21691, 24414 => 21695, 24415 => 21708, 24416 => 21721, 24417 => 21722, +24418 => 21724, 24419 => 21673, 24420 => 21674, 24421 => 21668, 24422 => 21725, +24423 => 21711, 24424 => 21726, 24425 => 21787, 24426 => 21735, 24427 => 21792, +24428 => 21757, 24429 => 21780, 24430 => 21747, 24431 => 21794, 24432 => 21795, +24433 => 21775, 24434 => 21777, 24435 => 21799, 24436 => 21802, 24437 => 21863, +24438 => 21903, 24439 => 21941, 24440 => 21833, 24441 => 21869, 24442 => 21825, +24443 => 21845, 24444 => 21823, 24445 => 21840, 24446 => 21820, 24609 => 21815, +24610 => 21846, 24611 => 21877, 24612 => 21878, 24613 => 21879, 24614 => 21811, +24615 => 21808, 24616 => 21852, 24617 => 21899, 24618 => 21970, 24619 => 21891, +24620 => 21937, 24621 => 21945, 24622 => 21896, 24623 => 21889, 24624 => 21919, +24625 => 21886, 24626 => 21974, 24627 => 21905, 24628 => 21883, 24629 => 21983, +24630 => 21949, 24631 => 21950, 24632 => 21908, 24633 => 21913, 24634 => 21994, +24635 => 22007, 24636 => 21961, 24637 => 22047, 24638 => 21969, 24639 => 21995, +24640 => 21996, 24641 => 21972, 24642 => 21990, 24643 => 21981, 24644 => 21956, +24645 => 21999, 24646 => 21989, 24647 => 22002, 24648 => 22003, 24649 => 21964, +24650 => 21965, 24651 => 21992, 24652 => 22005, 24653 => 21988, 24654 => 36756, +24655 => 22046, 24656 => 22024, 24657 => 22028, 24658 => 22017, 24659 => 22052, +24660 => 22051, 24661 => 22014, 24662 => 22016, 24663 => 22055, 24664 => 22061, +24665 => 22104, 24666 => 22073, 24667 => 22103, 24668 => 22060, 24669 => 22093, +24670 => 22114, 24671 => 22105, 24672 => 22108, 24673 => 22092, 24674 => 22100, +24675 => 22150, 24676 => 22116, 24677 => 22129, 24678 => 22123, 24679 => 22139, +24680 => 22140, 24681 => 22149, 24682 => 22163, 24683 => 22191, 24684 => 22228, +24685 => 22231, 24686 => 22237, 24687 => 22241, 24688 => 22261, 24689 => 22251, +24690 => 22265, 24691 => 22271, 24692 => 22276, 24693 => 22282, 24694 => 22281, +24695 => 22300, 24696 => 24079, 24697 => 24089, 24698 => 24084, 24699 => 24081, +24700 => 24113, 24701 => 24123, 24702 => 24124, 24865 => 24119, 24866 => 24132, +24867 => 24148, 24868 => 24155, 24869 => 24158, 24870 => 24161, 24871 => 23692, +24872 => 23674, 24873 => 23693, 24874 => 23696, 24875 => 23702, 24876 => 23688, +24877 => 23704, 24878 => 23705, 24879 => 23697, 24880 => 23706, 24881 => 23708, +24882 => 23733, 24883 => 23714, 24884 => 23741, 24885 => 23724, 24886 => 23723, +24887 => 23729, 24888 => 23715, 24889 => 23745, 24890 => 23735, 24891 => 23748, +24892 => 23762, 24893 => 23780, 24894 => 23755, 24895 => 23781, 24896 => 23810, +24897 => 23811, 24898 => 23847, 24899 => 23846, 24900 => 23854, 24901 => 23844, +24902 => 23838, 24903 => 23814, 24904 => 23835, 24905 => 23896, 24906 => 23870, +24907 => 23860, 24908 => 23869, 24909 => 23916, 24910 => 23899, 24911 => 23919, +24912 => 23901, 24913 => 23915, 24914 => 23883, 24915 => 23882, 24916 => 23913, +24917 => 23924, 24918 => 23938, 24919 => 23961, 24920 => 23965, 24921 => 35955, +24922 => 23991, 24923 => 24005, 24924 => 24435, 24925 => 24439, 24926 => 24450, +24927 => 24455, 24928 => 24457, 24929 => 24460, 24930 => 24469, 24931 => 24473, +24932 => 24476, 24933 => 24488, 24934 => 24493, 24935 => 24501, 24936 => 24508, +24937 => 34914, 24938 => 24417, 24939 => 29357, 24940 => 29360, 24941 => 29364, +24942 => 29367, 24943 => 29368, 24944 => 29379, 24945 => 29377, 24946 => 29390, +24947 => 29389, 24948 => 29394, 24949 => 29416, 24950 => 29423, 24951 => 29417, +24952 => 29426, 24953 => 29428, 24954 => 29431, 24955 => 29441, 24956 => 29427, +24957 => 29443, 24958 => 29434, 25121 => 29435, 25122 => 29463, 25123 => 29459, +25124 => 29473, 25125 => 29450, 25126 => 29470, 25127 => 29469, 25128 => 29461, +25129 => 29474, 25130 => 29497, 25131 => 29477, 25132 => 29484, 25133 => 29496, +25134 => 29489, 25135 => 29520, 25136 => 29517, 25137 => 29527, 25138 => 29536, +25139 => 29548, 25140 => 29551, 25141 => 29566, 25142 => 33307, 25143 => 22821, +25144 => 39143, 25145 => 22820, 25146 => 22786, 25147 => 39267, 25148 => 39271, +25149 => 39272, 25150 => 39273, 25151 => 39274, 25152 => 39275, 25153 => 39276, +25154 => 39284, 25155 => 39287, 25156 => 39293, 25157 => 39296, 25158 => 39300, +25159 => 39303, 25160 => 39306, 25161 => 39309, 25162 => 39312, 25163 => 39313, +25164 => 39315, 25165 => 39316, 25166 => 39317, 25167 => 24192, 25168 => 24209, +25169 => 24203, 25170 => 24214, 25171 => 24229, 25172 => 24224, 25173 => 24249, +25174 => 24245, 25175 => 24254, 25176 => 24243, 25177 => 36179, 25178 => 24274, +25179 => 24273, 25180 => 24283, 25181 => 24296, 25182 => 24298, 25183 => 33210, +25184 => 24516, 25185 => 24521, 25186 => 24534, 25187 => 24527, 25188 => 24579, +25189 => 24558, 25190 => 24580, 25191 => 24545, 25192 => 24548, 25193 => 24574, +25194 => 24581, 25195 => 24582, 25196 => 24554, 25197 => 24557, 25198 => 24568, +25199 => 24601, 25200 => 24629, 25201 => 24614, 25202 => 24603, 25203 => 24591, +25204 => 24589, 25205 => 24617, 25206 => 24619, 25207 => 24586, 25208 => 24639, +25209 => 24609, 25210 => 24696, 25211 => 24697, 25212 => 24699, 25213 => 24698, +25214 => 24642, 25377 => 24682, 25378 => 24701, 25379 => 24726, 25380 => 24730, +25381 => 24749, 25382 => 24733, 25383 => 24707, 25384 => 24722, 25385 => 24716, +25386 => 24731, 25387 => 24812, 25388 => 24763, 25389 => 24753, 25390 => 24797, +25391 => 24792, 25392 => 24774, 25393 => 24794, 25394 => 24756, 25395 => 24864, +25396 => 24870, 25397 => 24853, 25398 => 24867, 25399 => 24820, 25400 => 24832, +25401 => 24846, 25402 => 24875, 25403 => 24906, 25404 => 24949, 25405 => 25004, +25406 => 24980, 25407 => 24999, 25408 => 25015, 25409 => 25044, 25410 => 25077, +25411 => 24541, 25412 => 38579, 25413 => 38377, 25414 => 38379, 25415 => 38385, +25416 => 38387, 25417 => 38389, 25418 => 38390, 25419 => 38396, 25420 => 38398, +25421 => 38403, 25422 => 38404, 25423 => 38406, 25424 => 38408, 25425 => 38410, +25426 => 38411, 25427 => 38412, 25428 => 38413, 25429 => 38415, 25430 => 38418, +25431 => 38421, 25432 => 38422, 25433 => 38423, 25434 => 38425, 25435 => 38426, +25436 => 20012, 25437 => 29247, 25438 => 25109, 25439 => 27701, 25440 => 27732, +25441 => 27740, 25442 => 27722, 25443 => 27811, 25444 => 27781, 25445 => 27792, +25446 => 27796, 25447 => 27788, 25448 => 27752, 25449 => 27753, 25450 => 27764, +25451 => 27766, 25452 => 27782, 25453 => 27817, 25454 => 27856, 25455 => 27860, +25456 => 27821, 25457 => 27895, 25458 => 27896, 25459 => 27889, 25460 => 27863, +25461 => 27826, 25462 => 27872, 25463 => 27862, 25464 => 27898, 25465 => 27883, +25466 => 27886, 25467 => 27825, 25468 => 27859, 25469 => 27887, 25470 => 27902, +25633 => 27961, 25634 => 27943, 25635 => 27916, 25636 => 27971, 25637 => 27976, +25638 => 27911, 25639 => 27908, 25640 => 27929, 25641 => 27918, 25642 => 27947, +25643 => 27981, 25644 => 27950, 25645 => 27957, 25646 => 27930, 25647 => 27983, +25648 => 27986, 25649 => 27988, 25650 => 27955, 25651 => 28049, 25652 => 28015, +25653 => 28062, 25654 => 28064, 25655 => 27998, 25656 => 28051, 25657 => 28052, +25658 => 27996, 25659 => 28000, 25660 => 28028, 25661 => 28003, 25662 => 28186, +25663 => 28103, 25664 => 28101, 25665 => 28126, 25666 => 28174, 25667 => 28095, +25668 => 28128, 25669 => 28177, 25670 => 28134, 25671 => 28125, 25672 => 28121, +25673 => 28182, 25674 => 28075, 25675 => 28172, 25676 => 28078, 25677 => 28203, +25678 => 28270, 25679 => 28238, 25680 => 28267, 25681 => 28338, 25682 => 28255, +25683 => 28294, 25684 => 28243, 25685 => 28244, 25686 => 28210, 25687 => 28197, +25688 => 28228, 25689 => 28383, 25690 => 28337, 25691 => 28312, 25692 => 28384, +25693 => 28461, 25694 => 28386, 25695 => 28325, 25696 => 28327, 25697 => 28349, +25698 => 28347, 25699 => 28343, 25700 => 28375, 25701 => 28340, 25702 => 28367, +25703 => 28303, 25704 => 28354, 25705 => 28319, 25706 => 28514, 25707 => 28486, +25708 => 28487, 25709 => 28452, 25710 => 28437, 25711 => 28409, 25712 => 28463, +25713 => 28470, 25714 => 28491, 25715 => 28532, 25716 => 28458, 25717 => 28425, +25718 => 28457, 25719 => 28553, 25720 => 28557, 25721 => 28556, 25722 => 28536, +25723 => 28530, 25724 => 28540, 25725 => 28538, 25726 => 28625, 25889 => 28617, +25890 => 28583, 25891 => 28601, 25892 => 28598, 25893 => 28610, 25894 => 28641, +25895 => 28654, 25896 => 28638, 25897 => 28640, 25898 => 28655, 25899 => 28698, +25900 => 28707, 25901 => 28699, 25902 => 28729, 25903 => 28725, 25904 => 28751, +25905 => 28766, 25906 => 23424, 25907 => 23428, 25908 => 23445, 25909 => 23443, +25910 => 23461, 25911 => 23480, 25912 => 29999, 25913 => 39582, 25914 => 25652, +25915 => 23524, 25916 => 23534, 25917 => 35120, 25918 => 23536, 25919 => 36423, +25920 => 35591, 25921 => 36790, 25922 => 36819, 25923 => 36821, 25924 => 36837, +25925 => 36846, 25926 => 36836, 25927 => 36841, 25928 => 36838, 25929 => 36851, +25930 => 36840, 25931 => 36869, 25932 => 36868, 25933 => 36875, 25934 => 36902, +25935 => 36881, 25936 => 36877, 25937 => 36886, 25938 => 36897, 25939 => 36917, +25940 => 36918, 25941 => 36909, 25942 => 36911, 25943 => 36932, 25944 => 36945, +25945 => 36946, 25946 => 36944, 25947 => 36968, 25948 => 36952, 25949 => 36962, +25950 => 36955, 25951 => 26297, 25952 => 36980, 25953 => 36989, 25954 => 36994, +25955 => 37000, 25956 => 36995, 25957 => 37003, 25958 => 24400, 25959 => 24407, +25960 => 24406, 25961 => 24408, 25962 => 23611, 25963 => 21675, 25964 => 23632, +25965 => 23641, 25966 => 23409, 25967 => 23651, 25968 => 23654, 25969 => 32700, +25970 => 24362, 25971 => 24361, 25972 => 24365, 25973 => 33396, 25974 => 24380, +25975 => 39739, 25976 => 23662, 25977 => 22913, 25978 => 22915, 25979 => 22925, +25980 => 22953, 25981 => 22954, 25982 => 22947, 26145 => 22935, 26146 => 22986, +26147 => 22955, 26148 => 22942, 26149 => 22948, 26150 => 22994, 26151 => 22962, +26152 => 22959, 26153 => 22999, 26154 => 22974, 26155 => 23045, 26156 => 23046, +26157 => 23005, 26158 => 23048, 26159 => 23011, 26160 => 23000, 26161 => 23033, +26162 => 23052, 26163 => 23049, 26164 => 23090, 26165 => 23092, 26166 => 23057, +26167 => 23075, 26168 => 23059, 26169 => 23104, 26170 => 23143, 26171 => 23114, +26172 => 23125, 26173 => 23100, 26174 => 23138, 26175 => 23157, 26176 => 33004, +26177 => 23210, 26178 => 23195, 26179 => 23159, 26180 => 23162, 26181 => 23230, +26182 => 23275, 26183 => 23218, 26184 => 23250, 26185 => 23252, 26186 => 23224, +26187 => 23264, 26188 => 23267, 26189 => 23281, 26190 => 23254, 26191 => 23270, +26192 => 23256, 26193 => 23260, 26194 => 23305, 26195 => 23319, 26196 => 23318, +26197 => 23346, 26198 => 23351, 26199 => 23360, 26200 => 23573, 26201 => 23580, +26202 => 23386, 26203 => 23397, 26204 => 23411, 26205 => 23377, 26206 => 23379, +26207 => 23394, 26208 => 39541, 26209 => 39543, 26210 => 39544, 26211 => 39546, +26212 => 39551, 26213 => 39549, 26214 => 39552, 26215 => 39553, 26216 => 39557, +26217 => 39560, 26218 => 39562, 26219 => 39568, 26220 => 39570, 26221 => 39571, +26222 => 39574, 26223 => 39576, 26224 => 39579, 26225 => 39580, 26226 => 39581, +26227 => 39583, 26228 => 39584, 26229 => 39586, 26230 => 39587, 26231 => 39589, +26232 => 39591, 26233 => 32415, 26234 => 32417, 26235 => 32419, 26236 => 32421, +26237 => 32424, 26238 => 32425, 26401 => 32429, 26402 => 32432, 26403 => 32446, +26404 => 32448, 26405 => 32449, 26406 => 32450, 26407 => 32457, 26408 => 32459, +26409 => 32460, 26410 => 32464, 26411 => 32468, 26412 => 32471, 26413 => 32475, +26414 => 32480, 26415 => 32481, 26416 => 32488, 26417 => 32491, 26418 => 32494, +26419 => 32495, 26420 => 32497, 26421 => 32498, 26422 => 32525, 26423 => 32502, +26424 => 32506, 26425 => 32507, 26426 => 32510, 26427 => 32513, 26428 => 32514, +26429 => 32515, 26430 => 32519, 26431 => 32520, 26432 => 32523, 26433 => 32524, +26434 => 32527, 26435 => 32529, 26436 => 32530, 26437 => 32535, 26438 => 32537, +26439 => 32540, 26440 => 32539, 26441 => 32543, 26442 => 32545, 26443 => 32546, +26444 => 32547, 26445 => 32548, 26446 => 32549, 26447 => 32550, 26448 => 32551, +26449 => 32554, 26450 => 32555, 26451 => 32556, 26452 => 32557, 26453 => 32559, +26454 => 32560, 26455 => 32561, 26456 => 32562, 26457 => 32563, 26458 => 32565, +26459 => 24186, 26460 => 30079, 26461 => 24027, 26462 => 30014, 26463 => 37013, +26464 => 29582, 26465 => 29585, 26466 => 29614, 26467 => 29602, 26468 => 29599, +26469 => 29647, 26470 => 29634, 26471 => 29649, 26472 => 29623, 26473 => 29619, +26474 => 29632, 26475 => 29641, 26476 => 29640, 26477 => 29669, 26478 => 29657, +26479 => 39036, 26480 => 29706, 26481 => 29673, 26482 => 29671, 26483 => 29662, +26484 => 29626, 26485 => 29682, 26486 => 29711, 26487 => 29738, 26488 => 29787, +26489 => 29734, 26490 => 29733, 26491 => 29736, 26492 => 29744, 26493 => 29742, +26494 => 29740, 26657 => 29723, 26658 => 29722, 26659 => 29761, 26660 => 29788, +26661 => 29783, 26662 => 29781, 26663 => 29785, 26664 => 29815, 26665 => 29805, +26666 => 29822, 26667 => 29852, 26668 => 29838, 26669 => 29824, 26670 => 29825, +26671 => 29831, 26672 => 29835, 26673 => 29854, 26674 => 29864, 26675 => 29865, +26676 => 29840, 26677 => 29863, 26678 => 29906, 26679 => 29882, 26680 => 38890, +26681 => 38891, 26682 => 38892, 26683 => 26444, 26684 => 26451, 26685 => 26462, +26686 => 26440, 26687 => 26473, 26688 => 26533, 26689 => 26503, 26690 => 26474, +26691 => 26483, 26692 => 26520, 26693 => 26535, 26694 => 26485, 26695 => 26536, +26696 => 26526, 26697 => 26541, 26698 => 26507, 26699 => 26487, 26700 => 26492, +26701 => 26608, 26702 => 26633, 26703 => 26584, 26704 => 26634, 26705 => 26601, +26706 => 26544, 26707 => 26636, 26708 => 26585, 26709 => 26549, 26710 => 26586, +26711 => 26547, 26712 => 26589, 26713 => 26624, 26714 => 26563, 26715 => 26552, +26716 => 26594, 26717 => 26638, 26718 => 26561, 26719 => 26621, 26720 => 26674, +26721 => 26675, 26722 => 26720, 26723 => 26721, 26724 => 26702, 26725 => 26722, +26726 => 26692, 26727 => 26724, 26728 => 26755, 26729 => 26653, 26730 => 26709, +26731 => 26726, 26732 => 26689, 26733 => 26727, 26734 => 26688, 26735 => 26686, +26736 => 26698, 26737 => 26697, 26738 => 26665, 26739 => 26805, 26740 => 26767, +26741 => 26740, 26742 => 26743, 26743 => 26771, 26744 => 26731, 26745 => 26818, +26746 => 26990, 26747 => 26876, 26748 => 26911, 26749 => 26912, 26750 => 26873, +26913 => 26916, 26914 => 26864, 26915 => 26891, 26916 => 26881, 26917 => 26967, +26918 => 26851, 26919 => 26896, 26920 => 26993, 26921 => 26937, 26922 => 26976, +26923 => 26946, 26924 => 26973, 26925 => 27012, 26926 => 26987, 26927 => 27008, +26928 => 27032, 26929 => 27000, 26930 => 26932, 26931 => 27084, 26932 => 27015, +26933 => 27016, 26934 => 27086, 26935 => 27017, 26936 => 26982, 26937 => 26979, +26938 => 27001, 26939 => 27035, 26940 => 27047, 26941 => 27067, 26942 => 27051, +26943 => 27053, 26944 => 27092, 26945 => 27057, 26946 => 27073, 26947 => 27082, +26948 => 27103, 26949 => 27029, 26950 => 27104, 26951 => 27021, 26952 => 27135, +26953 => 27183, 26954 => 27117, 26955 => 27159, 26956 => 27160, 26957 => 27237, +26958 => 27122, 26959 => 27204, 26960 => 27198, 26961 => 27296, 26962 => 27216, +26963 => 27227, 26964 => 27189, 26965 => 27278, 26966 => 27257, 26967 => 27197, +26968 => 27176, 26969 => 27224, 26970 => 27260, 26971 => 27281, 26972 => 27280, +26973 => 27305, 26974 => 27287, 26975 => 27307, 26976 => 29495, 26977 => 29522, +26978 => 27521, 26979 => 27522, 26980 => 27527, 26981 => 27524, 26982 => 27538, +26983 => 27539, 26984 => 27533, 26985 => 27546, 26986 => 27547, 26987 => 27553, +26988 => 27562, 26989 => 36715, 26990 => 36717, 26991 => 36721, 26992 => 36722, +26993 => 36723, 26994 => 36725, 26995 => 36726, 26996 => 36728, 26997 => 36727, +26998 => 36729, 26999 => 36730, 27000 => 36732, 27001 => 36734, 27002 => 36737, +27003 => 36738, 27004 => 36740, 27005 => 36743, 27006 => 36747, 27169 => 36749, +27170 => 36750, 27171 => 36751, 27172 => 36760, 27173 => 36762, 27174 => 36558, +27175 => 25099, 27176 => 25111, 27177 => 25115, 27178 => 25119, 27179 => 25122, +27180 => 25121, 27181 => 25125, 27182 => 25124, 27183 => 25132, 27184 => 33255, +27185 => 29935, 27186 => 29940, 27187 => 29951, 27188 => 29967, 27189 => 29969, +27190 => 29971, 27191 => 25908, 27192 => 26094, 27193 => 26095, 27194 => 26096, +27195 => 26122, 27196 => 26137, 27197 => 26482, 27198 => 26115, 27199 => 26133, +27200 => 26112, 27201 => 28805, 27202 => 26359, 27203 => 26141, 27204 => 26164, +27205 => 26161, 27206 => 26166, 27207 => 26165, 27208 => 32774, 27209 => 26207, +27210 => 26196, 27211 => 26177, 27212 => 26191, 27213 => 26198, 27214 => 26209, +27215 => 26199, 27216 => 26231, 27217 => 26244, 27218 => 26252, 27219 => 26279, +27220 => 26269, 27221 => 26302, 27222 => 26331, 27223 => 26332, 27224 => 26342, +27225 => 26345, 27226 => 36146, 27227 => 36147, 27228 => 36150, 27229 => 36155, +27230 => 36157, 27231 => 36160, 27232 => 36165, 27233 => 36166, 27234 => 36168, +27235 => 36169, 27236 => 36167, 27237 => 36173, 27238 => 36181, 27239 => 36185, +27240 => 35271, 27241 => 35274, 27242 => 35275, 27243 => 35276, 27244 => 35278, +27245 => 35279, 27246 => 35280, 27247 => 35281, 27248 => 29294, 27249 => 29343, +27250 => 29277, 27251 => 29286, 27252 => 29295, 27253 => 29310, 27254 => 29311, +27255 => 29316, 27256 => 29323, 27257 => 29325, 27258 => 29327, 27259 => 29330, +27260 => 25352, 27261 => 25394, 27262 => 25520, 27425 => 25663, 27426 => 25816, +27427 => 32772, 27428 => 27626, 27429 => 27635, 27430 => 27645, 27431 => 27637, +27432 => 27641, 27433 => 27653, 27434 => 27655, 27435 => 27654, 27436 => 27661, +27437 => 27669, 27438 => 27672, 27439 => 27673, 27440 => 27674, 27441 => 27681, +27442 => 27689, 27443 => 27684, 27444 => 27690, 27445 => 27698, 27446 => 25909, +27447 => 25941, 27448 => 25963, 27449 => 29261, 27450 => 29266, 27451 => 29270, +27452 => 29232, 27453 => 34402, 27454 => 21014, 27455 => 32927, 27456 => 32924, +27457 => 32915, 27458 => 32956, 27459 => 26378, 27460 => 32957, 27461 => 32945, +27462 => 32939, 27463 => 32941, 27464 => 32948, 27465 => 32951, 27466 => 32999, +27467 => 33000, 27468 => 33001, 27469 => 33002, 27470 => 32987, 27471 => 32962, +27472 => 32964, 27473 => 32985, 27474 => 32973, 27475 => 32983, 27476 => 26384, +27477 => 32989, 27478 => 33003, 27479 => 33009, 27480 => 33012, 27481 => 33005, +27482 => 33037, 27483 => 33038, 27484 => 33010, 27485 => 33020, 27486 => 26389, +27487 => 33042, 27488 => 35930, 27489 => 33078, 27490 => 33054, 27491 => 33068, +27492 => 33048, 27493 => 33074, 27494 => 33096, 27495 => 33100, 27496 => 33107, +27497 => 33140, 27498 => 33113, 27499 => 33114, 27500 => 33137, 27501 => 33120, +27502 => 33129, 27503 => 33148, 27504 => 33149, 27505 => 33133, 27506 => 33127, +27507 => 22605, 27508 => 23221, 27509 => 33160, 27510 => 33154, 27511 => 33169, +27512 => 28373, 27513 => 33187, 27514 => 33194, 27515 => 33228, 27516 => 26406, +27517 => 33226, 27518 => 33211, 27681 => 33217, 27682 => 33190, 27683 => 27428, +27684 => 27447, 27685 => 27449, 27686 => 27459, 27687 => 27462, 27688 => 27481, +27689 => 39121, 27690 => 39122, 27691 => 39123, 27692 => 39125, 27693 => 39129, +27694 => 39130, 27695 => 27571, 27696 => 24384, 27697 => 27586, 27698 => 35315, +27699 => 26000, 27700 => 40785, 27701 => 26003, 27702 => 26044, 27703 => 26054, +27704 => 26052, 27705 => 26051, 27706 => 26060, 27707 => 26062, 27708 => 26066, +27709 => 26070, 27710 => 28800, 27711 => 28828, 27712 => 28822, 27713 => 28829, +27714 => 28859, 27715 => 28864, 27716 => 28855, 27717 => 28843, 27718 => 28849, +27719 => 28904, 27720 => 28874, 27721 => 28944, 27722 => 28947, 27723 => 28950, +27724 => 28975, 27725 => 28977, 27726 => 29043, 27727 => 29020, 27728 => 29032, +27729 => 28997, 27730 => 29042, 27731 => 29002, 27732 => 29048, 27733 => 29050, +27734 => 29080, 27735 => 29107, 27736 => 29109, 27737 => 29096, 27738 => 29088, +27739 => 29152, 27740 => 29140, 27741 => 29159, 27742 => 29177, 27743 => 29213, +27744 => 29224, 27745 => 28780, 27746 => 28952, 27747 => 29030, 27748 => 29113, +27749 => 25150, 27750 => 25149, 27751 => 25155, 27752 => 25160, 27753 => 25161, +27754 => 31035, 27755 => 31040, 27756 => 31046, 27757 => 31049, 27758 => 31067, +27759 => 31068, 27760 => 31059, 27761 => 31066, 27762 => 31074, 27763 => 31063, +27764 => 31072, 27765 => 31087, 27766 => 31079, 27767 => 31098, 27768 => 31109, +27769 => 31114, 27770 => 31130, 27771 => 31143, 27772 => 31155, 27773 => 24529, +27774 => 24528, 27937 => 24636, 27938 => 24669, 27939 => 24666, 27940 => 24679, +27941 => 24641, 27942 => 24665, 27943 => 24675, 27944 => 24747, 27945 => 24838, +27946 => 24845, 27947 => 24925, 27948 => 25001, 27949 => 24989, 27950 => 25035, +27951 => 25041, 27952 => 25094, 27953 => 32896, 27954 => 32895, 27955 => 27795, +27956 => 27894, 27957 => 28156, 27958 => 30710, 27959 => 30712, 27960 => 30720, +27961 => 30729, 27962 => 30743, 27963 => 30744, 27964 => 30737, 27965 => 26027, +27966 => 30765, 27967 => 30748, 27968 => 30749, 27969 => 30777, 27970 => 30778, +27971 => 30779, 27972 => 30751, 27973 => 30780, 27974 => 30757, 27975 => 30764, +27976 => 30755, 27977 => 30761, 27978 => 30798, 27979 => 30829, 27980 => 30806, +27981 => 30807, 27982 => 30758, 27983 => 30800, 27984 => 30791, 27985 => 30796, +27986 => 30826, 27987 => 30875, 27988 => 30867, 27989 => 30874, 27990 => 30855, +27991 => 30876, 27992 => 30881, 27993 => 30883, 27994 => 30898, 27995 => 30905, +27996 => 30885, 27997 => 30932, 27998 => 30937, 27999 => 30921, 28000 => 30956, +28001 => 30962, 28002 => 30981, 28003 => 30964, 28004 => 30995, 28005 => 31012, +28006 => 31006, 28007 => 31028, 28008 => 40859, 28009 => 40697, 28010 => 40699, +28011 => 40700, 28012 => 30449, 28013 => 30468, 28014 => 30477, 28015 => 30457, +28016 => 30471, 28017 => 30472, 28018 => 30490, 28019 => 30498, 28020 => 30489, +28021 => 30509, 28022 => 30502, 28023 => 30517, 28024 => 30520, 28025 => 30544, +28026 => 30545, 28027 => 30535, 28028 => 30531, 28029 => 30554, 28030 => 30568, +28193 => 30562, 28194 => 30565, 28195 => 30591, 28196 => 30605, 28197 => 30589, +28198 => 30592, 28199 => 30604, 28200 => 30609, 28201 => 30623, 28202 => 30624, +28203 => 30640, 28204 => 30645, 28205 => 30653, 28206 => 30010, 28207 => 30016, +28208 => 30030, 28209 => 30027, 28210 => 30024, 28211 => 30043, 28212 => 30066, +28213 => 30073, 28214 => 30083, 28215 => 32600, 28216 => 32609, 28217 => 32607, +28218 => 35400, 28219 => 32616, 28220 => 32628, 28221 => 32625, 28222 => 32633, +28223 => 32641, 28224 => 32638, 28225 => 30413, 28226 => 30437, 28227 => 34866, +28228 => 38021, 28229 => 38022, 28230 => 38023, 28231 => 38027, 28232 => 38026, +28233 => 38028, 28234 => 38029, 28235 => 38031, 28236 => 38032, 28237 => 38036, +28238 => 38039, 28239 => 38037, 28240 => 38042, 28241 => 38043, 28242 => 38044, +28243 => 38051, 28244 => 38052, 28245 => 38059, 28246 => 38058, 28247 => 38061, +28248 => 38060, 28249 => 38063, 28250 => 38064, 28251 => 38066, 28252 => 38068, +28253 => 38070, 28254 => 38071, 28255 => 38072, 28256 => 38073, 28257 => 38074, +28258 => 38076, 28259 => 38077, 28260 => 38079, 28261 => 38084, 28262 => 38088, +28263 => 38089, 28264 => 38090, 28265 => 38091, 28266 => 38092, 28267 => 38093, +28268 => 38094, 28269 => 38096, 28270 => 38097, 28271 => 38098, 28272 => 38101, +28273 => 38102, 28274 => 38103, 28275 => 38105, 28276 => 38104, 28277 => 38107, +28278 => 38110, 28279 => 38111, 28280 => 38112, 28281 => 38114, 28282 => 38116, +28283 => 38117, 28284 => 38119, 28285 => 38120, 28286 => 38122, 28449 => 38121, +28450 => 38123, 28451 => 38126, 28452 => 38127, 28453 => 38131, 28454 => 38132, +28455 => 38133, 28456 => 38135, 28457 => 38137, 28458 => 38140, 28459 => 38141, +28460 => 38143, 28461 => 38147, 28462 => 38146, 28463 => 38150, 28464 => 38151, +28465 => 38153, 28466 => 38154, 28467 => 38157, 28468 => 38158, 28469 => 38159, +28470 => 38162, 28471 => 38163, 28472 => 38164, 28473 => 38165, 28474 => 38166, +28475 => 38168, 28476 => 38171, 28477 => 38173, 28478 => 38174, 28479 => 38175, +28480 => 38178, 28481 => 38186, 28482 => 38187, 28483 => 38185, 28484 => 38188, +28485 => 38193, 28486 => 38194, 28487 => 38196, 28488 => 38198, 28489 => 38199, +28490 => 38200, 28491 => 38204, 28492 => 38206, 28493 => 38207, 28494 => 38210, +28495 => 38197, 28496 => 38212, 28497 => 38213, 28498 => 38214, 28499 => 38217, +28500 => 38220, 28501 => 38222, 28502 => 38223, 28503 => 38226, 28504 => 38227, +28505 => 38228, 28506 => 38230, 28507 => 38231, 28508 => 38232, 28509 => 38233, +28510 => 38235, 28511 => 38238, 28512 => 38239, 28513 => 38237, 28514 => 38241, +28515 => 38242, 28516 => 38244, 28517 => 38245, 28518 => 38246, 28519 => 38247, +28520 => 38248, 28521 => 38249, 28522 => 38250, 28523 => 38251, 28524 => 38252, +28525 => 38255, 28526 => 38257, 28527 => 38258, 28528 => 38259, 28529 => 38202, +28530 => 30695, 28531 => 30700, 28532 => 38601, 28533 => 31189, 28534 => 31213, +28535 => 31203, 28536 => 31211, 28537 => 31238, 28538 => 23879, 28539 => 31235, +28540 => 31234, 28541 => 31262, 28542 => 31252, 28705 => 31289, 28706 => 31287, +28707 => 31313, 28708 => 40655, 28709 => 39333, 28710 => 31344, 28711 => 30344, +28712 => 30350, 28713 => 30355, 28714 => 30361, 28715 => 30372, 28716 => 29918, +28717 => 29920, 28718 => 29996, 28719 => 40480, 28720 => 40482, 28721 => 40488, +28722 => 40489, 28723 => 40490, 28724 => 40491, 28725 => 40492, 28726 => 40498, +28727 => 40497, 28728 => 40502, 28729 => 40504, 28730 => 40503, 28731 => 40505, +28732 => 40506, 28733 => 40510, 28734 => 40513, 28735 => 40514, 28736 => 40516, +28737 => 40518, 28738 => 40519, 28739 => 40520, 28740 => 40521, 28741 => 40523, +28742 => 40524, 28743 => 40526, 28744 => 40529, 28745 => 40533, 28746 => 40535, +28747 => 40538, 28748 => 40539, 28749 => 40540, 28750 => 40542, 28751 => 40547, +28752 => 40550, 28753 => 40551, 28754 => 40552, 28755 => 40553, 28756 => 40554, +28757 => 40555, 28758 => 40556, 28759 => 40561, 28760 => 40557, 28761 => 40563, +28762 => 30098, 28763 => 30100, 28764 => 30102, 28765 => 30112, 28766 => 30109, +28767 => 30124, 28768 => 30115, 28769 => 30131, 28770 => 30132, 28771 => 30136, +28772 => 30148, 28773 => 30129, 28774 => 30128, 28775 => 30147, 28776 => 30146, +28777 => 30166, 28778 => 30157, 28779 => 30179, 28780 => 30184, 28781 => 30182, +28782 => 30180, 28783 => 30187, 28784 => 30183, 28785 => 30211, 28786 => 30193, +28787 => 30204, 28788 => 30207, 28789 => 30224, 28790 => 30208, 28791 => 30213, +28792 => 30220, 28793 => 30231, 28794 => 30218, 28795 => 30245, 28796 => 30232, +28797 => 30229, 28798 => 30233, 28961 => 30235, 28962 => 30268, 28963 => 30242, +28964 => 30240, 28965 => 30272, 28966 => 30253, 28967 => 30256, 28968 => 30271, +28969 => 30261, 28970 => 30275, 28971 => 30270, 28972 => 30259, 28973 => 30285, +28974 => 30302, 28975 => 30292, 28976 => 30300, 28977 => 30294, 28978 => 30315, +28979 => 30319, 28980 => 32714, 28981 => 31462, 28982 => 31352, 28983 => 31353, +28984 => 31360, 28985 => 31366, 28986 => 31368, 28987 => 31381, 28988 => 31398, +28989 => 31392, 28990 => 31404, 28991 => 31400, 28992 => 31405, 28993 => 31411, +28994 => 34916, 28995 => 34921, 28996 => 34930, 28997 => 34941, 28998 => 34943, +28999 => 34946, 29000 => 34978, 29001 => 35014, 29002 => 34999, 29003 => 35004, +29004 => 35017, 29005 => 35042, 29006 => 35022, 29007 => 35043, 29008 => 35045, +29009 => 35057, 29010 => 35098, 29011 => 35068, 29012 => 35048, 29013 => 35070, +29014 => 35056, 29015 => 35105, 29016 => 35097, 29017 => 35091, 29018 => 35099, +29019 => 35082, 29020 => 35124, 29021 => 35115, 29022 => 35126, 29023 => 35137, +29024 => 35174, 29025 => 35195, 29026 => 30091, 29027 => 32997, 29028 => 30386, +29029 => 30388, 29030 => 30684, 29031 => 32786, 29032 => 32788, 29033 => 32790, +29034 => 32796, 29035 => 32800, 29036 => 32802, 29037 => 32805, 29038 => 32806, +29039 => 32807, 29040 => 32809, 29041 => 32808, 29042 => 32817, 29043 => 32779, +29044 => 32821, 29045 => 32835, 29046 => 32838, 29047 => 32845, 29048 => 32850, +29049 => 32873, 29050 => 32881, 29051 => 35203, 29052 => 39032, 29053 => 39040, +29054 => 39043, 29217 => 39049, 29218 => 39052, 29219 => 39053, 29220 => 39055, +29221 => 39060, 29222 => 39066, 29223 => 39067, 29224 => 39070, 29225 => 39071, +29226 => 39073, 29227 => 39074, 29228 => 39077, 29229 => 39078, 29230 => 34381, +29231 => 34388, 29232 => 34412, 29233 => 34414, 29234 => 34431, 29235 => 34426, +29236 => 34428, 29237 => 34427, 29238 => 34472, 29239 => 34445, 29240 => 34443, +29241 => 34476, 29242 => 34461, 29243 => 34471, 29244 => 34467, 29245 => 34474, +29246 => 34451, 29247 => 34473, 29248 => 34486, 29249 => 34500, 29250 => 34485, +29251 => 34510, 29252 => 34480, 29253 => 34490, 29254 => 34481, 29255 => 34479, +29256 => 34505, 29257 => 34511, 29258 => 34484, 29259 => 34537, 29260 => 34545, +29261 => 34546, 29262 => 34541, 29263 => 34547, 29264 => 34512, 29265 => 34579, +29266 => 34526, 29267 => 34548, 29268 => 34527, 29269 => 34520, 29270 => 34513, +29271 => 34563, 29272 => 34567, 29273 => 34552, 29274 => 34568, 29275 => 34570, +29276 => 34573, 29277 => 34569, 29278 => 34595, 29279 => 34619, 29280 => 34590, +29281 => 34597, 29282 => 34606, 29283 => 34586, 29284 => 34622, 29285 => 34632, +29286 => 34612, 29287 => 34609, 29288 => 34601, 29289 => 34615, 29290 => 34623, +29291 => 34690, 29292 => 34594, 29293 => 34685, 29294 => 34686, 29295 => 34683, +29296 => 34656, 29297 => 34672, 29298 => 34636, 29299 => 34670, 29300 => 34699, +29301 => 34643, 29302 => 34659, 29303 => 34684, 29304 => 34660, 29305 => 34649, +29306 => 34661, 29307 => 34707, 29308 => 34735, 29309 => 34728, 29310 => 34770, +29473 => 34758, 29474 => 34696, 29475 => 34693, 29476 => 34733, 29477 => 34711, +29478 => 34691, 29479 => 34731, 29480 => 34789, 29481 => 34732, 29482 => 34741, +29483 => 34739, 29484 => 34763, 29485 => 34771, 29486 => 34749, 29487 => 34769, +29488 => 34752, 29489 => 34762, 29490 => 34779, 29491 => 34794, 29492 => 34784, +29493 => 34798, 29494 => 34838, 29495 => 34835, 29496 => 34814, 29497 => 34826, +29498 => 34843, 29499 => 34849, 29500 => 34873, 29501 => 34876, 29502 => 32566, +29503 => 32578, 29504 => 32580, 29505 => 32581, 29506 => 33296, 29507 => 31482, +29508 => 31485, 29509 => 31496, 29510 => 31491, 29511 => 31492, 29512 => 31509, +29513 => 31498, 29514 => 31531, 29515 => 31503, 29516 => 31559, 29517 => 31544, +29518 => 31530, 29519 => 31513, 29520 => 31534, 29521 => 31537, 29522 => 31520, +29523 => 31525, 29524 => 31524, 29525 => 31539, 29526 => 31550, 29527 => 31518, +29528 => 31576, 29529 => 31578, 29530 => 31557, 29531 => 31605, 29532 => 31564, +29533 => 31581, 29534 => 31584, 29535 => 31598, 29536 => 31611, 29537 => 31586, +29538 => 31602, 29539 => 31601, 29540 => 31632, 29541 => 31654, 29542 => 31655, +29543 => 31672, 29544 => 31660, 29545 => 31645, 29546 => 31656, 29547 => 31621, +29548 => 31658, 29549 => 31644, 29550 => 31650, 29551 => 31659, 29552 => 31668, +29553 => 31697, 29554 => 31681, 29555 => 31692, 29556 => 31709, 29557 => 31706, +29558 => 31717, 29559 => 31718, 29560 => 31722, 29561 => 31756, 29562 => 31742, +29563 => 31740, 29564 => 31759, 29565 => 31766, 29566 => 31755, 29729 => 31775, +29730 => 31786, 29731 => 31782, 29732 => 31800, 29733 => 31809, 29734 => 31808, +29735 => 33278, 29736 => 33281, 29737 => 33282, 29738 => 33284, 29739 => 33260, +29740 => 34884, 29741 => 33313, 29742 => 33314, 29743 => 33315, 29744 => 33325, +29745 => 33327, 29746 => 33320, 29747 => 33323, 29748 => 33336, 29749 => 33339, +29750 => 33331, 29751 => 33332, 29752 => 33342, 29753 => 33348, 29754 => 33353, +29755 => 33355, 29756 => 33359, 29757 => 33370, 29758 => 33375, 29759 => 33384, +29760 => 34942, 29761 => 34949, 29762 => 34952, 29763 => 35032, 29764 => 35039, +29765 => 35166, 29766 => 32669, 29767 => 32671, 29768 => 32679, 29769 => 32687, +29770 => 32688, 29771 => 32690, 29772 => 31868, 29773 => 25929, 29774 => 31889, +29775 => 31901, 29776 => 31900, 29777 => 31902, 29778 => 31906, 29779 => 31922, +29780 => 31932, 29781 => 31933, 29782 => 31937, 29783 => 31943, 29784 => 31948, +29785 => 31949, 29786 => 31944, 29787 => 31941, 29788 => 31959, 29789 => 31976, +29790 => 33390, 29791 => 26280, 29792 => 32703, 29793 => 32718, 29794 => 32725, +29795 => 32741, 29796 => 32737, 29797 => 32742, 29798 => 32745, 29799 => 32750, +29800 => 32755, 29801 => 31992, 29802 => 32119, 29803 => 32166, 29804 => 32174, +29805 => 32327, 29806 => 32411, 29807 => 40632, 29808 => 40628, 29809 => 36211, +29810 => 36228, 29811 => 36244, 29812 => 36241, 29813 => 36273, 29814 => 36199, +29815 => 36205, 29816 => 35911, 29817 => 35913, 29818 => 37194, 29819 => 37200, +29820 => 37198, 29821 => 37199, 29822 => 37220, 29985 => 37218, 29986 => 37217, +29987 => 37232, 29988 => 37225, 29989 => 37231, 29990 => 37245, 29991 => 37246, +29992 => 37234, 29993 => 37236, 29994 => 37241, 29995 => 37260, 29996 => 37253, +29997 => 37264, 29998 => 37261, 29999 => 37265, 30000 => 37282, 30001 => 37283, +30002 => 37290, 30003 => 37293, 30004 => 37294, 30005 => 37295, 30006 => 37301, +30007 => 37300, 30008 => 37306, 30009 => 35925, 30010 => 40574, 30011 => 36280, +30012 => 36331, 30013 => 36357, 30014 => 36441, 30015 => 36457, 30016 => 36277, +30017 => 36287, 30018 => 36284, 30019 => 36282, 30020 => 36292, 30021 => 36310, +30022 => 36311, 30023 => 36314, 30024 => 36318, 30025 => 36302, 30026 => 36303, +30027 => 36315, 30028 => 36294, 30029 => 36332, 30030 => 36343, 30031 => 36344, +30032 => 36323, 30033 => 36345, 30034 => 36347, 30035 => 36324, 30036 => 36361, +30037 => 36349, 30038 => 36372, 30039 => 36381, 30040 => 36383, 30041 => 36396, +30042 => 36398, 30043 => 36387, 30044 => 36399, 30045 => 36410, 30046 => 36416, +30047 => 36409, 30048 => 36405, 30049 => 36413, 30050 => 36401, 30051 => 36425, +30052 => 36417, 30053 => 36418, 30054 => 36433, 30055 => 36434, 30056 => 36426, +30057 => 36464, 30058 => 36470, 30059 => 36476, 30060 => 36463, 30061 => 36468, +30062 => 36485, 30063 => 36495, 30064 => 36500, 30065 => 36496, 30066 => 36508, +30067 => 36510, 30068 => 35960, 30069 => 35970, 30070 => 35978, 30071 => 35973, +30072 => 35992, 30073 => 35988, 30074 => 26011, 30075 => 35286, 30076 => 35294, +30077 => 35290, 30078 => 35292, 30241 => 35301, 30242 => 35307, 30243 => 35311, +30244 => 35390, 30245 => 35622, 30246 => 38739, 30247 => 38633, 30248 => 38643, +30249 => 38639, 30250 => 38662, 30251 => 38657, 30252 => 38664, 30253 => 38671, +30254 => 38670, 30255 => 38698, 30256 => 38701, 30257 => 38704, 30258 => 38718, +30259 => 40832, 30260 => 40835, 30261 => 40837, 30262 => 40838, 30263 => 40839, +30264 => 40840, 30265 => 40841, 30266 => 40842, 30267 => 40844, 30268 => 40702, +30269 => 40715, 30270 => 40717, 30271 => 38585, 30272 => 38588, 30273 => 38589, +30274 => 38606, 30275 => 38610, 30276 => 30655, 30277 => 38624, 30278 => 37518, +30279 => 37550, 30280 => 37576, 30281 => 37694, 30282 => 37738, 30283 => 37834, +30284 => 37775, 30285 => 37950, 30286 => 37995, 30287 => 40063, 30288 => 40066, +30289 => 40069, 30290 => 40070, 30291 => 40071, 30292 => 40072, 30293 => 31267, +30294 => 40075, 30295 => 40078, 30296 => 40080, 30297 => 40081, 30298 => 40082, +30299 => 40084, 30300 => 40085, 30301 => 40090, 30302 => 40091, 30303 => 40094, +30304 => 40095, 30305 => 40096, 30306 => 40097, 30307 => 40098, 30308 => 40099, +30309 => 40101, 30310 => 40102, 30311 => 40103, 30312 => 40104, 30313 => 40105, +30314 => 40107, 30315 => 40109, 30316 => 40110, 30317 => 40112, 30318 => 40113, +30319 => 40114, 30320 => 40115, 30321 => 40116, 30322 => 40117, 30323 => 40118, +30324 => 40119, 30325 => 40122, 30326 => 40123, 30327 => 40124, 30328 => 40125, +30329 => 40132, 30330 => 40133, 30331 => 40134, 30332 => 40135, 30333 => 40138, +30334 => 40139, 30497 => 40140, 30498 => 40141, 30499 => 40142, 30500 => 40143, +30501 => 40144, 30502 => 40147, 30503 => 40148, 30504 => 40149, 30505 => 40151, +30506 => 40152, 30507 => 40153, 30508 => 40156, 30509 => 40157, 30510 => 40159, +30511 => 40162, 30512 => 38780, 30513 => 38789, 30514 => 38801, 30515 => 38802, +30516 => 38804, 30517 => 38831, 30518 => 38827, 30519 => 38819, 30520 => 38834, +30521 => 38836, 30522 => 39601, 30523 => 39600, 30524 => 39607, 30525 => 40536, +30526 => 39606, 30527 => 39610, 30528 => 39612, 30529 => 39617, 30530 => 39616, +30531 => 39621, 30532 => 39618, 30533 => 39627, 30534 => 39628, 30535 => 39633, +30536 => 39749, 30537 => 39747, 30538 => 39751, 30539 => 39753, 30540 => 39752, +30541 => 39757, 30542 => 39761, 30543 => 39144, 30544 => 39181, 30545 => 39214, +30546 => 39253, 30547 => 39252, 30548 => 39647, 30549 => 39649, 30550 => 39654, +30551 => 39663, 30552 => 39659, 30553 => 39675, 30554 => 39661, 30555 => 39673, +30556 => 39688, 30557 => 39695, 30558 => 39699, 30559 => 39711, 30560 => 39715, +30561 => 40637, 30562 => 40638, 30563 => 32315, 30564 => 40578, 30565 => 40583, +30566 => 40584, 30567 => 40587, 30568 => 40594, 30569 => 37846, 30570 => 40605, +30571 => 40607, 30572 => 40667, 30573 => 40668, 30574 => 40669, 30575 => 40672, +30576 => 40671, 30577 => 40674, 30578 => 40681, 30579 => 40679, 30580 => 40677, +30581 => 40682, 30582 => 40687, 30583 => 40738, 30584 => 40748, 30585 => 40751, +30586 => 40761, 30587 => 40759, 30588 => 40765, 30589 => 40766, 30590 => 40772, +0 => 0 ); + + function gb2utf8($gb) { + if( !trim($gb) ) return $gb; + $utf8=''; + while($gb) { + if( ord(substr($gb,0,1)) > 127 ) { + $t=substr($gb,0,2); + $gb=substr($gb,2); + $utf8 .= $this->u2utf8($this->codetable[hexdec(bin2hex($t))-0x8080]); + } + else { + $t=substr($gb,0,1); + $gb=substr($gb,1); + $utf8 .= $this->u2utf8($t); + } + } + return $utf8; + } + + function u2utf8($c) { + $str=''; + if ($c < 0x80) { + $str.=$c; + } + else if ($c < 0x800) { + $str.=chr(0xC0 | $c>>6); + $str.=chr(0x80 | $c & 0x3F); + } + else if ($c < 0x10000) { + $str.=chr(0xE0 | $c>>12); + $str.=chr(0x80 | $c>>6 & 0x3F); + $str.=chr(0x80 | $c & 0x3F); + } + else if ($c < 0x200000) { + $str.=chr(0xF0 | $c>>18); + $str.=chr(0x80 | $c>>12 & 0x3F); + $str.=chr(0x80 | $c>>6 & 0x3F); + $str.=chr(0x80 | $c & 0x3F); + } + return $str; + } + +} // END Class + +?> diff --git a/html/includes/jpgraph/src/jpgraph_gradient.php b/html/includes/jpgraph/src/jpgraph_gradient.php new file mode 100644 index 0000000000..46144b6e6c --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_gradient.php @@ -0,0 +1,424 @@ +img = &$img; + } + + + function SetNumColors($aNum) { + $this->numcolors=$aNum; + } +//--------------- +// PUBLIC METHODS + // Produce a gradient filled rectangle with a smooth transition between + // two colors. + // ($xl,$yt) Top left corner + // ($xr,$yb) Bottom right + // $from_color Starting color in gradient + // $to_color End color in the gradient + // $style Which way is the gradient oriented? + function FilledRectangle($xl,$yt,$xr,$yb,$from_color,$to_color,$style=1) { + switch( $style ) { + case GRAD_VER: + $steps = ceil(abs($xr-$xl)); + $delta = $xr>=$xl ? 1 : -1; + $this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors); + for( $i=0, $x=$xl; $i < $steps; ++$i ) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x,$yt,$x,$yb); + $x += $delta; + } + break; + + case GRAD_HOR: + $steps = ceil(abs($yb-$yt)); + $delta = $yb>=$yt ? 1 : -1; + $this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors); + for($i=0,$y=$yt; $i < $steps; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($xl,$y,$xr,$y); + $y += $delta; + } + break; + + case GRAD_MIDHOR: + $steps = ceil(abs($yb-$yt)/2); + $delta = $yb >= $yt ? 1 : -1; + $this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors); + for($y=$yt, $i=0; $i < $steps; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($xl,$y,$xr,$y); + $y += $delta; + } + --$i; + if( abs($yb-$yt) % 2 == 1 ) --$steps; + for($j=0; $j < $steps; ++$j, --$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($xl,$y,$xr,$y); + $y += $delta; + } + $this->img->Line($xl,$y,$xr,$y); + break; + + case GRAD_MIDVER: + $steps = ceil(abs($xr-$xl)/2); + $delta = $xr>=$xl ? 1 : -1; + $this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors); + for($x=$xl, $i=0; $i < $steps; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + --$i; + if( abs($xr-$xl) % 2 == 1 ) --$steps; + for($j=0; $j < $steps; ++$j, --$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + $this->img->Line($x,$yb,$x,$yt); + break; + + case GRAD_WIDE_MIDVER: + $diff = ceil(abs($xr-$xl)); + $steps = floor(abs($diff)/3); + $firststep = $diff - 2*$steps ; + $delta = $xr >= $xl ? 1 : -1; + $this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors); + for($x=$xl, $i=0; $i < $firststep; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + --$i; + $this->img->current_color = $colors[$i]; + for($j=0; $j< $steps; ++$j) { + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + + for($j=0; $j < $steps; ++$j, --$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + break; + + case GRAD_WIDE_MIDHOR: + $diff = ceil(abs($yb-$yt)); + $steps = floor(abs($diff)/3); + $firststep = $diff - 2*$steps ; + $delta = $yb >= $yt? 1 : -1; + $this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors); + for($y=$yt, $i=0; $i < $firststep; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($xl,$y,$xr,$y); + $y += $delta; + } + --$i; + $this->img->current_color = $colors[$i]; + for($j=0; $j < $steps; ++$j) { + $this->img->Line($xl,$y,$xr,$y); + $y += $delta; + } + for($j=0; $j < $steps; ++$j, --$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($xl,$y,$xr,$y); + $y += $delta; + } + break; + + case GRAD_LEFT_REFLECTION: + $steps1 = ceil(0.3*abs($xr-$xl)); + $delta = $xr>=$xl ? 1 : -1; + + $from_color = $this->img->rgb->Color($from_color); + $adj = 1.4; + $m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2])))); + $from_color2 = array(min(255,$from_color[0]+$m), + min(255,$from_color[1]+$m), min(255,$from_color[2]+$m)); + + $this->GetColArray($from_color2,$to_color,$steps1,$colors,$this->numcolors); + $n = count($colors); + for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + $steps2 = max(1,round(0.08*abs($xr-$xl))); + $this->img->SetColor($to_color); + for($j=0; $j< $steps2; ++$j) { + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + $steps = abs($xr-$xl)-$steps1-$steps2; + $this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors); + $n = count($colors); + for($i=0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + break; + + case GRAD_RIGHT_REFLECTION: + $steps1 = ceil(0.7*abs($xr-$xl)); + $delta = $xr>=$xl ? 1 : -1; + + $this->GetColArray($from_color,$to_color,$steps1,$colors,$this->numcolors); + $n = count($colors); + for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + $steps2 = max(1,round(0.08*abs($xr-$xl))); + $this->img->SetColor($to_color); + for($j=0; $j< $steps2; ++$j) { + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + + $from_color = $this->img->rgb->Color($from_color); + $adj = 1.4; + $m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2])))); + $from_color = array(min(255,$from_color[0]+$m), + min(255,$from_color[1]+$m), min(255,$from_color[2]+$m)); + + $steps = abs($xr-$xl)-$steps1-$steps2; + $this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors); + $n = count($colors); + for($i=0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + break; + + case GRAD_CENTER: + $steps = ceil(min(($yb-$yt)+1,($xr-$xl)+1)/2); + $this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors); + $dx = ($xr-$xl)/2; + $dy = ($yb-$yt)/2; + $x=$xl;$y=$yt;$x2=$xr;$y2=$yb; + $n = count($colors); + for($x=$xl, $i=0; $x < $xl+$dx && $y < $yt+$dy && $i < $n; ++$x, ++$y, --$x2, --$y2, ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Rectangle($x,$y,$x2,$y2); + } + $this->img->Line($x,$y,$x2,$y2); + break; + + case GRAD_RAISED_PANEL: + // right to left + $steps1 = $xr-$xl; + $delta = $xr>=$xl ? 1 : -1; + $this->GetColArray($to_color,$from_color,$steps1,$colors,$this->numcolors); + $n = count($colors); + for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + + // left to right + $xr -= 3; + $xl += 3; + $yb -= 3; + $yt += 3; + $steps2 = $xr-$xl; + $delta = $xr>=$xl ? 1 : -1; + for($x=$xl, $j=$steps2; $j >= 0; --$j) { + $this->img->current_color = $colors[$j]; + $this->img->Line($x,$yb,$x,$yt); + $x += $delta; + } + break; + + case GRAD_DIAGONAL: + // use the longer dimension to determine the required number of steps. + // first loop draws from one corner to the mid-diagonal and the second + // loop draws from the mid-diagonal to the opposing corner. + if($xr-$xl > $yb - $yt) { + // width is greater than height -> use x-dimension for steps + $steps = $xr-$xl; + $delta = $xr>=$xl ? 1 : -1; + $this->GetColArray($from_color,$to_color,$steps*2,$colors,$this->numcolors); + $n = count($colors); + + for($x=$xl, $i=0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $y = $yt+($i/$steps)*($yb-$yt)*$delta; + $this->img->Line($x,$yt,$xl,$y); + $x += $delta; + } + + for($x=$xl, $i = 0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$steps+$i]; + $y = $yt+($i/$steps)*($yb-$yt)*$delta; + $this->img->Line($x,$yb,$xr,$y); + $x += $delta; + } + } else { + // height is greater than width -> use y-dimension for steps + $steps = $yb-$yt; + $delta = $yb>=$yt ? 1 : -1; + $this->GetColArray($from_color,$to_color,$steps*2,$colors,$this->numcolors); + $n = count($colors); + + for($y=$yt, $i=0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$i]; + $x = $xl+($i/$steps)*($xr-$xl)*$delta; + $this->img->Line($x,$yt,$xl,$y); + $y += $delta; + } + + for($y=$yt, $i = 0; $i < $steps && $i < $n; ++$i) { + $this->img->current_color = $colors[$steps+$i]; + $x = $xl+($i/$steps)*($xr-$xl)*$delta; + $this->img->Line($x,$yb,$xr,$y); + $x += $delta; + } + + } + break; + + default: + JpGraphError::RaiseL(7001,$style); +//("Unknown gradient style (=$style)."); + break; + } + } + + // Fill a special case of a polygon with a flat bottom + // with a gradient. Can be used for filled line plots. + // Please note that this is NOT a generic gradient polygon fill + // routine. It assumes that the bottom is flat (like a drawing + // of a mountain) + function FilledFlatPolygon($pts,$from_color,$to_color) { + if( count($pts) == 0 ) return; + + $maxy=$pts[1]; + $miny=$pts[1]; + $n = count($pts) ; + for( $i=0, $idx=0; $i < $n; $i += 2) { + $x = floor($pts[$i]); + $y = floor($pts[$i+1]); + $miny = min($miny,$y); + $maxy = max($maxy,$y); + } + + $colors = array(); + $this->GetColArray($from_color,$to_color,abs($maxy-$miny)+1,$colors,$this->numcolors); + for($i=$miny, $idx=0; $i <= $maxy; ++$i ) { + $colmap[$i] = $colors[$idx++]; + } + + $n = count($pts)/2 ; + $idx = 0 ; + while( $idx < $n-1 ) { + $p1 = array(round($pts[$idx*2]),round($pts[$idx*2+1])); + $p2 = array(round($pts[++$idx*2]),round($pts[$idx*2+1])); + + // Find the largest rectangle we can fill + $y = max($p1[1],$p2[1]) ; + for($yy=$maxy; $yy > $y; --$yy) { + $this->img->current_color = $colmap[$yy]; + $this->img->Line($p1[0],$yy,$p2[0]-1,$yy); + } + + if( $p1[1] == $p2[1] ) continue; + + // Fill the rest using lines (slow...) + $slope = ($p2[0]-$p1[0])/($p1[1]-$p2[1]); + $x1 = $p1[0]; + $x2 = $p2[0]-1; + $start = $y; + if( $p1[1] > $p2[1] ) { + while( $y >= $p2[1] ) { + $x1=$slope*($start-$y)+$p1[0]; + $this->img->current_color = $colmap[$y]; + $this->img->Line($x1,$y,$x2,$y); + --$y; + } + } + else { + while( $y >= $p1[1] ) { + $x2=$p2[0]+$slope*($start-$y); + $this->img->current_color = $colmap[$y]; + $this->img->Line($x1,$y,$x2,$y); + --$y; + } + } + } + } + +//--------------- +// PRIVATE METHODS + // Add to the image color map the necessary colors to do the transition + // between the two colors using $numcolors intermediate colors + function GetColArray($from_color,$to_color,$arr_size,&$colors,$numcols=100) { + if( $arr_size==0 ) return; + // If color is given as text get it's corresponding r,g,b values + $from_color = $this->img->rgb->Color($from_color); + $to_color = $this->img->rgb->Color($to_color); + + $rdelta=($to_color[0]-$from_color[0])/$numcols; + $gdelta=($to_color[1]-$from_color[1])/$numcols; + $bdelta=($to_color[2]-$from_color[2])/$numcols; + $colorsperstep = $numcols/$arr_size; + $prevcolnum = -1; + $from_alpha = $from_color[3]; + $to_alpha = $to_color[3]; + $adelta = ( $to_alpha - $from_alpha ) / $numcols ; + for ($i=0; $i < $arr_size; ++$i) { + $colnum = floor($colorsperstep*$i); + if ( $colnum == $prevcolnum ) + $colors[$i] = $colidx; + else { + $r = floor($from_color[0] + $colnum*$rdelta); + $g = floor($from_color[1] + $colnum*$gdelta); + $b = floor($from_color[2] + $colnum*$bdelta); + $alpha = $from_alpha + $colnum*$adelta; + $colidx = $this->img->rgb->Allocate(sprintf("#%02x%02x%02x",$r,$g,$b),$alpha); + $colors[$i] = $colidx; + } + $prevcolnum = $colnum; + } + } +} // Class + +?> diff --git a/html/includes/jpgraph/src/jpgraph_iconplot.php b/html/includes/jpgraph/src/jpgraph_iconplot.php new file mode 100644 index 0000000000..c57db15c14 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_iconplot.php @@ -0,0 +1,189 @@ +iFile = $aFile; + $this->iX=$aX; + $this->iY=$aY; + $this->iScale= $aScale; + if( $aMix < 0 || $aMix > 100 ) { + JpGraphError::RaiseL(8001); //('Mix value for icon must be between 0 and 100.'); + } + $this->iMix = $aMix ; + } + + function CreateFromString($aStr) { + $this->iImgString = $aStr; + } + + function SetCountryFlag($aFlag,$aX=0,$aY=0,$aScale=1.0,$aMix=100,$aStdSize=3) { + $this->iCountryFlag = $aFlag; + $this->iX=$aX; + $this->iY=$aY; + $this->iScale= $aScale; + if( $aMix < 0 || $aMix > 100 ) { + JpGraphError::RaiseL(8001);//'Mix value for icon must be between 0 and 100.'); + } + $this->iMix = $aMix; + $this->iCountryStdSize = $aStdSize; + } + + function SetPos($aX,$aY) { + $this->iX=$aX; + $this->iY=$aY; + } + + function SetScalePos($aX,$aY) { + $this->iScalePosX = $aX; + $this->iScalePosY = $aY; + } + + function SetScale($aScale) { + $this->iScale = $aScale; + } + + function SetMix($aMix) { + if( $aMix < 0 || $aMix > 100 ) { + JpGraphError::RaiseL(8001);//('Mix value for icon must be between 0 and 100.'); + } + $this->iMix = $aMix ; + } + + function SetAnchor($aXAnchor='left',$aYAnchor='center') { + if( !in_array($aXAnchor,$this->iAnchors) || + !in_array($aYAnchor,$this->iAnchors) ) { + JpGraphError::RaiseL(8002);//("Anchor position for icons must be one of 'top', 'bottom', 'left', 'right' or 'center'"); + } + $this->iHorAnchor=$aXAnchor; + $this->iVertAnchor=$aYAnchor; + } + + function PreStrokeAdjust($aGraph) { + // Nothing to do ... + } + + function DoLegend($aGraph) { + // Nothing to do ... + } + + function Max() { + return array(false,false); + } + + + // The next four function are framework function tht gets called + // from Gantt and is not menaiungfull in the context of Icons but + // they must be implemented to avoid errors. + function GetMaxDate() { return false; } + function GetMinDate() { return false; } + function GetLineNbr() { return 0; } + function GetAbsHeight() {return 0; } + + + function Min() { + return array(false,false); + } + + function StrokeMargin(&$aImg) { + return true; + } + + function Stroke(&$aImg,&$axscale,&$ayscale) { + $this->StrokeWithScale($aImg,$axscale,$ayscale); + } + + function StrokeWithScale(&$aImg,&$axscale,&$ayscale) { + if( $this->iScalePosX === null || + $this->iScalePosY === null ) { + $this->_Stroke($aImg); + } + else { + $this->_Stroke($aImg, + round($axscale->Translate($this->iScalePosX)), + round($ayscale->Translate($this->iScalePosY))); + } + } + + function GetWidthHeight() { + $dummy=0; + return $this->_Stroke($dummy,null,null,true); + } + + function _Stroke(&$aImg,$x=null,$y=null,$aReturnWidthHeight=false) { + if( $this->iFile != '' && $this->iCountryFlag != '' ) { + JpGraphError::RaiseL(8003);//('It is not possible to specify both an image file and a country flag for the same icon.'); + } + if( $this->iFile != '' ) { + $gdimg = Graph::LoadBkgImage('',$this->iFile); + } + elseif( $this->iImgString != '') { + $gdimg = Image::CreateFromString($this->iImgString); + } + else { + if( ! class_exists('FlagImages') ) { + JpGraphError::RaiseL(8004);//('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.'); + } + $fobj = new FlagImages($this->iCountryStdSize); + $dummy=''; + $gdimg = $fobj->GetImgByName($this->iCountryFlag,$dummy); + } + + $iconw = imagesx($gdimg); + $iconh = imagesy($gdimg); + + if( $aReturnWidthHeight ) { + return array(round($iconw*$this->iScale),round($iconh*$this->iScale)); + } + + if( $x !== null && $y !== null ) { + $this->iX = $x; $this->iY = $y; + } + if( $this->iX >= 0 && $this->iX <= 1.0 ) { + $w = imagesx($aImg->img); + $this->iX = round($w*$this->iX); + } + if( $this->iY >= 0 && $this->iY <= 1.0 ) { + $h = imagesy($aImg->img); + $this->iY = round($h*$this->iY); + } + + if( $this->iHorAnchor == 'center' ) + $this->iX -= round($iconw*$this->iScale/2); + if( $this->iHorAnchor == 'right' ) + $this->iX -= round($iconw*$this->iScale); + if( $this->iVertAnchor == 'center' ) + $this->iY -= round($iconh*$this->iScale/2); + if( $this->iVertAnchor == 'bottom' ) + $this->iY -= round($iconh*$this->iScale); + + $aImg->CopyMerge($gdimg,$this->iX,$this->iY,0,0, + round($iconw*$this->iScale),round($iconh*$this->iScale), + $iconw,$iconh, + $this->iMix); + } +} + +?> diff --git a/html/includes/jpgraph/src/jpgraph_imgtrans.php b/html/includes/jpgraph/src/jpgraph_imgtrans.php new file mode 100644 index 0000000000..cca04cb5c6 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_imgtrans.php @@ -0,0 +1,223 @@ +gdImg = $aGdImg; + } + + // -------------------------------------------------------------------- + // _TransVert3D() and _TransHor3D() are helper methods to + // Skew3D(). + // -------------------------------------------------------------------- + function _TransVert3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_DOWN,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) { + + + // Parameter check + if( $aHorizonPos < 0 || $aHorizonPos > 1.0 ) { + JpGraphError::RaiseL(9001); +//("Value for image transformation out of bounds.\nVanishing point on horizon must be specified as a value between 0 and 1."); + } + + $w = imagesx($aGdImg); + $h = imagesy($aGdImg); + + // Create new image + $ww = $w; + if( $aMinSize ) + $hh = ceil($h * $aHorizon / ($aSkewDist+$h)); + else + $hh = $h; + + $newgdh = imagecreatetruecolor($ww,$hh); + $crgb = new RGB( $newgdh ); + $fillColor = $crgb->Allocate($aFillColor); + imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor); + + if( $aBorder ) { + $colidx = $crgb->Allocate($aBorder); + imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx); + } + + $mid = round($w * $aHorizonPos); + + $last=$h; + for($y=0; $y < $h; ++$y) { + + $yp = $h-$y-1; + $yt = floor($yp * $aHorizon / ($aSkewDist + $yp)); + + if( !$aQuality ) { + if( $last <= $yt ) continue ; + $last = $yt; + } + + for($x=0; $x < $w; ++$x) { + $xt = ($x-$mid) * $aSkewDist / ($aSkewDist + $yp); + if( $aDir == SKEW3D_UP ) + $rgb = imagecolorat($aGdImg,$x,$h-$y-1); + else + $rgb = imagecolorat($aGdImg,$x,$y); + $r = ($rgb >> 16) & 0xFF; + $g = ($rgb >> 8) & 0xFF; + $b = $rgb & 0xFF; + $colidx = imagecolorallocate($newgdh,$r,$g,$b); + $xt = round($xt+$mid); + if( $aDir == SKEW3D_UP ) { + $syt = $yt; + } + else { + $syt = $hh-$yt-1; + } + + if( !empty($set[$yt]) ) { + $nrgb = imagecolorat($newgdh,$xt,$syt); + $nr = ($nrgb >> 16) & 0xFF; + $ng = ($nrgb >> 8) & 0xFF; + $nb = $nrgb & 0xFF; + $colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2), + floor(($g+$ng)/2),floor(($b+$nb)/2)); + } + + imagesetpixel($newgdh,$xt,$syt,$colidx); + } + + $set[$yt] = true; + } + + return $newgdh; + } + + // -------------------------------------------------------------------- + // _TransVert3D() and _TransHor3D() are helper methods to + // Skew3D(). + // -------------------------------------------------------------------- + function _TransHor3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_LEFT,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) { + + $w = imagesx($aGdImg); + $h = imagesy($aGdImg); + + // Create new image + $hh = $h; + if( $aMinSize ) + $ww = ceil($w * $aHorizon / ($aSkewDist+$w)); + else + $ww = $w; + + $newgdh = imagecreatetruecolor($ww,$hh); + $crgb = new RGB( $newgdh ); + $fillColor = $crgb->Allocate($aFillColor); + imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor); + + if( $aBorder ) { + $colidx = $crgb->Allocate($aBorder); + imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx); + } + + $mid = round($h * $aHorizonPos); + + $last = -1; + for($x=0; $x < $w-1; ++$x) { + $xt = floor($x * $aHorizon / ($aSkewDist + $x)); + if( !$aQuality ) { + if( $last >= $xt ) continue ; + $last = $xt; + } + + for($y=0; $y < $h; ++$y) { + $yp = $h-$y-1; + $yt = ($yp-$mid) * $aSkewDist / ($aSkewDist + $x); + + if( $aDir == SKEW3D_RIGHT ) + $rgb = imagecolorat($aGdImg,$w-$x-1,$y); + else + $rgb = imagecolorat($aGdImg,$x,$y); + $r = ($rgb >> 16) & 0xFF; + $g = ($rgb >> 8) & 0xFF; + $b = $rgb & 0xFF; + $colidx = imagecolorallocate($newgdh,$r,$g,$b); + $yt = floor($hh-$yt-$mid-1); + if( $aDir == SKEW3D_RIGHT ) { + $sxt = $ww-$xt-1; + } + else + $sxt = $xt ; + + if( !empty($set[$xt]) ) { + $nrgb = imagecolorat($newgdh,$sxt,$yt); + $nr = ($nrgb >> 16) & 0xFF; + $ng = ($nrgb >> 8) & 0xFF; + $nb = $nrgb & 0xFF; + $colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2), + floor(($g+$ng)/2),floor(($b+$nb)/2)); + } + imagesetpixel($newgdh,$sxt,$yt,$colidx); + } + + $set[$xt] = true; + } + + return $newgdh; + } + + // -------------------------------------------------------------------- + // Skew image for the apperance of a 3D effect + // This transforms an image into a 3D-skewed version + // of the image. The transformation is specified by giving the height + // of the artificial horizon and specifying a "skew" factor which + // is the distance on the horizon line between the point of + // convergence and perspective line. + // + // The function returns the GD handle of the transformed image + // leaving the original image untouched. + // + // Parameters: + // * $aGdImg, GD handle to the image to be transformed + // * $aHorizon, Distance to the horizon + // * $aSkewDist, Distance from the horizon point of convergence + // on the horizon line to the perspective points. A larger + // value will fore-shorten the image more + // * $aDir, parameter specifies type of convergence. This of this + // as the walls in a room you are looking at. This specifies if the + // image should be applied on the left,right,top or bottom walls. + // * $aMinSize, true=make the new image just as big as needed, + // false = keep the image the same size as the original image + // * $aFillColor, Background fill color in the image + // * $aHiQuality, true=performa some interpolation that improves + // the image quality but at the expense of performace. Enabling + // high quality will have a dramatic effect on the time it takes + // to transform an image. + // * $aBorder, if set to anything besides false this will draw a + // a border of the speciied color around the image + // -------------------------------------------------------------------- + function Skew3D($aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) { + return $this->_Skew3D($this->gdImg,$aHorizon,$aSkewDist,$aDir,$aHiQuality, + $aMinSize,$aFillColor,$aBorder); + } + + function _Skew3D($aGdImg,$aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) { + if( $aDir == SKEW3D_DOWN || $aDir == SKEW3D_UP ) + return $this->_TransVert3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder); + else + return $this->_TransHor3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder); + + } + +} + + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/jpgraph_led.php b/html/includes/jpgraph/src/jpgraph_led.php new file mode 100644 index 0000000000..a388afe2a5 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_led.php @@ -0,0 +1,316 @@ + 'L', Cyrilic, other symbols and special symbols for +// simulation some latin and cyrilic chars. +// Added: New Color schemas. +// Deleted: Some minor bugs (StrokeNumber first parameter may be eq empty string, +// false or null - added check see line 294; +// change color schema check for easy maintenance: 291; +// change check on key exist in chars array: moved from StrokeNumber +// function to _GetLED: 251; +// +//======================================================================== + +// Samples for troubled chars: "Ô¡ Ø\r Ù\r Û| ÞÎ Ì\r >\n< W\r" +// Ô Ø Ù Û Þ Ì Æ W + +//---------------------------------------------------------------------------- +// Each character is encoded line by line with the "On"-LEDs corresponding to +// a '1' in the bianry mask of 4 bits. +// +// 4-bit mask: +// +// 0 ____ +// 1 ___x +// 2 __x_ +// 3 __xx +// 4 _x__ +// 5 _x_x +// 6 _xx_ +// 7 _xxx +// 8 x___ +// 9 x__x +// 10 x_x_ +// 11 x_xx +// 12 xx__ +// 13 xx_x +// 14 xxx_ +// 15 xxxx +//---------------------------------------------------------------------------- + +// Constants for color schema. See definition of iColorSchema below +DEFINE('LEDC_RED', 0); +DEFINE('LEDC_GREEN', 1); +DEFINE('LEDC_BLUE', 2); +DEFINE('LEDC_YELLOW', 3); +DEFINE('LEDC_GRAY', 4); +DEFINE('LEDC_CHOCOLATE', 5); +DEFINE('LEDC_PERU', 6); +DEFINE('LEDC_GOLDENROD', 7); +DEFINE('LEDC_KHAKI', 8); +DEFINE('LEDC_OLIVE', 9); +DEFINE('LEDC_LIMEGREEN', 10); +DEFINE('LEDC_FORESTGREEN', 11); +DEFINE('LEDC_TEAL', 12); +DEFINE('LEDC_STEELBLUE', 13); +DEFINE('LEDC_NAVY', 14); +DEFINE('LEDC_INVERTGRAY', 15); +// ! It correlate with two-dimensional array $iColorSchema + +//======================================================================== +// CLASS DigitalLED74 +// Description: +// Construct a number as an image that looks like LED numbers in a +// 7x4 digital matrix +//======================================================================== +class DigitalLED74 +{ + var $iLED_X = 4, $iLED_Y=7, + + // fg-up, fg-down, bg + $iColorSchema = array( + LEDC_RED => array('red','darkred:0.9','red:0.3'),// 0 + LEDC_GREEN => array('green','darkgreen','green:0.3'),// 1 + LEDC_BLUE => array('lightblue:0.9','darkblue:0.85','darkblue:0.7'),// 2 + LEDC_YELLOW => array('yellow','yellow:0.4','yellow:0.3'),// 3 + LEDC_GRAY => array('gray:1.4','darkgray:0.85','darkgray:0.7'), + LEDC_CHOCOLATE => array('chocolate','chocolate:0.7','chocolate:0.5'), + LEDC_PERU => array('peru:0.95','peru:0.6','peru:0.5'), + LEDC_GOLDENROD => array('goldenrod','goldenrod:0.6','goldenrod:0.5'), + LEDC_KHAKI => array('khaki:0.7','khaki:0.4','khaki:0.3'), + LEDC_OLIVE => array('#808000','#808000:0.7','#808000:0.6'), + LEDC_LIMEGREEN => array('limegreen:0.9','limegreen:0.5','limegreen:0.4'), + LEDC_FORESTGREEN => array('forestgreen','forestgreen:0.7','forestgreen:0.5'), + LEDC_TEAL => array('teal','teal:0.7','teal:0.5'), + LEDC_STEELBLUE => array('steelblue','steelblue:0.65','steelblue:0.5'), + LEDC_NAVY => array('navy:1.3','navy:0.95','navy:0.8'),//14 + LEDC_INVERTGRAY => array('darkgray','lightgray:1.5','white')//15 + ), + + $iLEDSpec = array( + 0 => array(6,9,11,15,13,9,6), + //0 => array(6,9,9,9,9,9,6), + //0 => array(15,9,9,9,9,9,15), + 1 => array(2,6,10,2,2,2,2), + 2 => array(6,9,1,2,4,8,15), + 3 => array(6,9,1,6,1,9,6), + 4 => array(1,3,5,9,15,1,1), + 5 => array(15,8,8,14,1,9,6), + 6 => array(6,8,8,14,9,9,6), + 7 => array(15,1,1,2,4,4,4), + 8 => array(6,9,9,6,9,9,6), + 9 => array(6,9,9,7,1,1,6), + '!' => array(4,4,4,4,4,0,4), + '?' => array(6,9,1,2,2,0,2), + '#' => array(0,9,15,9,15,9,0), + '@' => array(6,9,11,11,10,9,6), + '-' => array(0,0,0,15,0,0,0), + '_' => array(0,0,0,0,0,0,15), + '=' => array(0,0,15,0,15,0,0), + '+' => array(0,0,4,14,4,0,0), + '|' => array(4,4,4,4,4,4,4), //vertical line, used for simulate rus 'Û' + ',' => array(0,0,0,0,0,12,4), + '.' => array(0,0,0,0,0,12,12), + ':' => array(12,12,0,0,0,12,12), + ';' => array(12,12,0,0,0,12,4), + '[' => array(3,2,2,2,2,2,3), + ']' => array(12,4,4,4,4,4,12), + '(' => array(1,2,2,2,2,2,1), + ')' => array(8,4,4,4,4,4,8), + '{' => array(3,2,2,6,2,2,3), + '}' => array(12,4,4,6,4,4,12), + '<' => array(1,2,4,8,4,2,1), + '>' => array(8,4,2,1,2,4,8), + '*' => array(9,6,15,6,9,0,0), + '"' => array(10,10,0,0,0,0,0), + '\'' => array(4,4,0,0,0,0,0), + '`' => array(4,2,0,0,0,0,0), + '~' => array(13,11,0,0,0,0,0), + '^' => array(4,10,0,0,0,0,0), + '\\' => array(8,8,4,6,2,1,1), + '/' => array(1,1,2,6,4,8,8), + '%' => array(1,9,2,6,4,9,8), + '&' => array(0,4,10,4,11,10,5), + '$' => array(2,7,8,6,1,14,4), + ' ' => array(0,0,0,0,0,0,0), + '•' => array(0,0,6,6,0,0,0), //149 + '°' => array(14,10,14,0,0,0,0), //176 + '†' => array(4,4,14,4,4,4,4), //134 + '‡' => array(4,4,14,4,14,4,4), //135 + '±' => array(0,4,14,4,0,14,0), //177 + '‰' => array(0,4,2,15,2,4,0), //137 show right arrow + '™' => array(0,2,4,15,4,2,0), //156 show left arrow + '¡' => array(0,0,8,8,0,0,0), //159 show small hi-stick - that need for simulate rus 'Ô' + "\t" => array(8,8,8,0,0,0,0), //show hi-stick - that need for simulate rus 'Ó' + "\r" => array(8,8,8,8,8,8,8), //vertical line - that need for simulate 'M', 'W' and rus 'Ì','Ø' ,'Ù' + "\n" => array(15,15,15,15,15,15,15), //fill up - that need for simulate rus 'Æ' + "¥" => array(10,5,10,5,10,5,10), //chess + "µ" => array(15,0,15,0,15,0,15), //4 horizontal lines +// latin + 'A' => array(6,9,9,15,9,9,9), + 'B' => array(14,9,9,14,9,9,14), + 'C' => array(6,9,8,8,8,9,6), + 'D' => array(14,9,9,9,9,9,14), + 'E' => array(15,8,8,14,8,8,15), + 'F' => array(15,8,8,14,8,8,8), + 'G' => array(6,9,8,8,11,9,6), + 'H' => array(9,9,9,15,9,9,9), + 'I' => array(14,4,4,4,4,4,14), + 'J' => array(15,1,1,1,1,9,6), + 'K' => array(8,9,10,12,12,10,9), + 'L' => array(8,8,8,8,8,8,15), + 'M' => array(8,13,10,8,8,8,8),// need to add \r + 'N' => array(9,9,13,11,9,9,9), + //'O' => array(0,6,9,9,9,9,6), + 'O' => array(6,9,9,9,9,9,6), + 'P' => array(14,9,9,14,8,8,8), + 'Q' => array(6,9,9,9,13,11,6), + 'R' => array(14,9,9,14,12,10,9), + 'S' => array(6,9,8,6,1,9,6), + 'T' => array(14,4,4,4,4,4,4), + 'U' => array(9,9,9,9,9,9,6), + 'V' => array(0,0,0,10,10,10,4), + 'W' => array(8,8,8,8,10,13,8),// need to add \r + 'X' => array(9,9,6,6,6,9,9), + //'Y' => array(9,9,9,9,6,6,6), + 'Y' => array(10,10,10,10,4,4,4), + 'Z' => array(15,1,2,6,4,8,15), +// russian cp1251 + 'À' => array(6,9,9,15,9,9,9), + 'Á' => array(14,8,8,14,9,9,14), + 'Â' => array(14,9,9,14,9,9,14), + 'Ã' => array(15,8,8,8,8,8,8), + 'Ä' => array(14,9,9,9,9,9,14), + 'Å' => array(15,8,8,14,8,8,15), + '¨' => array(6,15,8,14,8,8,15), + //Æ is combine: >\n< + 'Ç' => array(6,9,1,2,1,9,6), + 'È' => array(9,9,9,11,13,9,9), + 'É' => array(13,9,9,11,13,9,9), + 'Ê' => array(9,10,12,10,9,9,9), + 'Ë' => array(7,9,9,9,9,9,9), + 'Ì' => array(8,13,10,8,8,8,8),// need to add \r + 'Í' => array(9,9,9,15,9,9,9), + 'Î' => array(6,9,9,9,9,9,6), + 'Ï' => array(15,9,9,9,9,9,9), + 'Ð' => array(14,9,9,14,8,8,8), + 'Ñ' => array(6,9,8,8,8,9,6), + 'Ò' => array(14,4,4,4,4,4,4), + 'Ó' => array(9,9,9,7,1,9,6), + 'Ô' => array(2,7,10,10,7,2,2),// need to add ¡ + 'Õ' => array(9,9,6,6,6,9,9), + 'Ö' => array(10,10,10,10,10,15,1), + '×' => array(9,9,9,7,1,1,1), + 'Ø' => array(10,10,10,10,10,10,15),// \r + 'Ù' => array(10,10,10,10,10,15,0),// need to add \r + 'Ú' => array(12,4,4,6,5,5,6), + 'Û' => array(8,8,8,14,9,9,14),// need to add | + 'Ü' => array(8,8,8,14,9,9,14), + 'Ý' => array(6,9,1,7,1,9,6), + 'Þ' => array(2,2,2,3,2,2,2),// need to add O + 'ß' => array(7,9,9,7,3,5,9) + ), + + $iSuperSampling = 3, $iMarg = 1, $iRad = 4; + + function DigitalLED74($aRadius = 2, $aMargin= 0.6) { + $this->iRad = $aRadius; + $this->iMarg = $aMargin; + } + + function SetSupersampling($aSuperSampling = 2) { + $this->iSuperSampling = $aSuperSampling; + } + + function _GetLED($aLedIdx, $aColor = 0) { + $width= $this->iLED_X*$this->iRad*2 + ($this->iLED_X+1)*$this->iMarg + $this->iRad ; + $height= $this->iLED_Y*$this->iRad*2 + ($this->iLED_Y)*$this->iMarg + $this->iRad * 2; + + // Adjust radious for supersampling + $rad = $this->iRad * $this->iSuperSampling; + + // Margin in between "Led" dots + $marg = $this->iMarg * $this->iSuperSampling; + + $swidth = $width*$this->iSuperSampling; + $sheight = $height*$this->iSuperSampling; + + $simg = new RotImage($swidth, $sheight, 0, DEFAULT_GFORMAT, false); + $simg->SetColor($this->iColorSchema[$aColor][2]); + $simg->FilledRectangle(0, 0, $swidth-1, $sheight-1); + + if(array_key_exists($aLedIdx, $this->iLEDSpec)) { + $d = $this->iLEDSpec[$aLedIdx]; + } + else { + $d = array(0,0,0,0,0,0,0); + } + + for($r = 0; $r < 7; ++$r) { + $dr = $d[$r]; + for($c = 0; $c < 4; ++$c) { + if( ($dr & pow(2,3-$c)) !== 0 ) { + $color = $this->iColorSchema[$aColor][0]; + } + else { + $color = $this->iColorSchema[$aColor][1]; + } + + $x = 2*$rad*$c+$rad + ($c+1)*$marg + $rad ; + $y = 2*$rad*$r+$rad + ($r+1)*$marg + $rad ; + + $simg->SetColor($color); + $simg->FilledCircle($x,$y,$rad); + } + } + + $img = new Image($width, $height, DEFAULT_GFORMAT, false); + $img->Copy($simg->img, 0, 0, 0, 0, $width, $height, $swidth, $sheight); + $simg->Destroy(); + unset($simg); + return $img; + } + + function StrokeNumber($aValStr, $aColor = 0) { + if($aColor < 0 || $aColor >= sizeof($this->iColorSchema)) + $aColor = 0; + + if(($n = strlen($aValStr)) == 0) { + $aValStr = ' '; + $n = 1; + } + + for($i = 0; $i < $n; ++$i) { + $d = substr($aValStr, $i, 1); + if( $d >= '0' && $d <= '9' ) { + $d = (int)$d; + } + else { + $d = strtoupper($d); + } + $digit_img[$i] = $this->_GetLED($d, $aColor); + } + + $w = imagesx($digit_img[0]->img); + $h = imagesy($digit_img[0]->img); + + $number_img = new Image($w*$n, $h, DEFAULT_GFORMAT, false); + + for($i = 0; $i < $n; ++$i) { + $number_img->Copy($digit_img[$i]->img, $i*$w, 0, 0, 0, $w, $h, $w, $h); + } + + $number_img->Headers(); + $number_img->Stream(); + } +} +?> diff --git a/html/includes/jpgraph/src/jpgraph_line.php b/html/includes/jpgraph/src/jpgraph_line.php new file mode 100644 index 0000000000..5b48826087 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_line.php @@ -0,0 +1,635 @@ +Plot($datay,$datax); + $this->mark = new PlotMark(); + } +//--------------- +// PUBLIC METHODS + + // Set style, filled or open + function SetFilled($aFlag=true) { + JpGraphError::RaiseL(10001);//('LinePlot::SetFilled() is deprecated. Use SetFillColor()'); + } + + function SetBarCenter($aFlag=true) { + $this->barcenter=$aFlag; + } + + function SetStyle($aStyle) { + $this->line_style=$aStyle; + } + + function SetStepStyle($aFlag=true) { + $this->step_style = $aFlag; + } + + function SetColor($aColor) { + parent::SetColor($aColor); + } + + function SetFillFromYMin($f=true) { + $this->fillFromMin = $f ; + } + + function SetFillColor($aColor,$aFilled=true) { + $this->fill_color=$aColor; + $this->filled=$aFilled; + } + + function SetFillGradient($aFromColor,$aToColor,$aNumColors=100,$aFilled=true) { + $this->fillgrad_fromcolor = $aFromColor; + $this->fillgrad_tocolor = $aToColor; + $this->fillgrad_numcolors = $aNumColors; + $this->filled = $aFilled; + $this->fillgrad = true; + } + + function Legend(&$graph) { + if( $this->legend!="" ) { + if( $this->filled && !$this->fillgrad ) { + $graph->legend->Add($this->legend, + $this->fill_color,$this->mark,0, + $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); + } + elseif( $this->fillgrad ) { + $color=array($this->fillgrad_fromcolor,$this->fillgrad_tocolor); + // In order to differentiate between gradients and cooors specified as an RGB triple + $graph->legend->Add($this->legend,$color,"",-2 /* -GRAD_HOR */, + $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); + } + else { + $graph->legend->Add($this->legend, + $this->color,$this->mark,$this->line_style, + $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); + } + } + } + + function AddArea($aMin=0,$aMax=0,$aFilled=LP_AREA_NOT_FILLED,$aColor="gray9",$aBorder=LP_AREA_BORDER) { + if($aMin > $aMax) { + // swap + $tmp = $aMin; + $aMin = $aMax; + $aMax = $tmp; + } + $this->filledAreas[] = array($aMin,$aMax,$aColor,$aFilled,$aBorder); + } + + // Gets called before any axis are stroked + function PreStrokeAdjust(&$graph) { + + // If another plot type have already adjusted the + // offset we don't touch it. + // (We check for empty in case the scale is a log scale + // and hence doesn't contain any xlabel_offset) + if( empty($graph->xaxis->scale->ticks->xlabel_offset) || + $graph->xaxis->scale->ticks->xlabel_offset == 0 ) { + if( $this->center ) { + ++$this->numpoints; + $a=0.5; $b=0.5; + } else { + $a=0; $b=0; + } + $graph->xaxis->scale->ticks->SetXLabelOffset($a); + $graph->SetTextScaleOff($b); + //$graph->xaxis->scale->ticks->SupressMinorTickMarks(); + } + } + + function SetFastStroke($aFlg=true) { + $this->iFastStroke = $aFlg; + } + + function FastStroke(&$img,&$xscale,&$yscale,$aStartPoint=0,$exist_x=true) { + // An optimized stroke for many data points with no extra + // features but 60% faster. You can't have values or line styles, or null + // values in plots. + $numpoints=count($this->coords[0]); + if( $this->barcenter ) + $textadj = 0.5-$xscale->text_scale_off; + else + $textadj = 0; + + $img->SetColor($this->color); + $img->SetLineWeight($this->weight); + $pnts=$aStartPoint; + while( $pnts < $numpoints ) { + if( $exist_x ) $x=$this->coords[1][$pnts]; + else $x=$pnts+$textadj; + $xt = $xscale->Translate($x); + $y=$this->coords[0][$pnts]; + $yt = $yscale->Translate($y); + if( is_numeric($y) ) { + $cord[] = $xt; + $cord[] = $yt; + } + elseif( $y == '-' && $pnts > 0 ) { + // Just ignore + } + else { + JpGraphError::RaiseL(10002);//('Plot too complicated for fast line Stroke. Use standard Stroke()'); + return; + } + ++$pnts; + } // WHILE + + $img->Polygon($cord,false,true); + + } + + function Stroke(&$img,&$xscale,&$yscale) { + $idx=0; + $numpoints=count($this->coords[0]); + if( isset($this->coords[1]) ) { + if( count($this->coords[1])!=$numpoints ) + JpGraphError::RaiseL(2003,count($this->coords[1]),$numpoints); +//("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints"); + else + $exist_x = true; + } + else + $exist_x = false; + + if( $this->barcenter ) + $textadj = 0.5-$xscale->text_scale_off; + else + $textadj = 0; + + // Find the first numeric data point + $startpoint=0; + while( $startpoint < $numpoints && !is_numeric($this->coords[0][$startpoint]) ) + ++$startpoint; + + // Bail out if no data points + if( $startpoint == $numpoints ) + return; + + if( $this->iFastStroke ) { + $this->FastStroke($img,$xscale,$yscale,$startpoint,$exist_x); + return; + } + + if( $exist_x ) + $xs=$this->coords[1][$startpoint]; + else + $xs= $textadj+$startpoint; + + $img->SetStartPoint($xscale->Translate($xs), + $yscale->Translate($this->coords[0][$startpoint])); + + if( $this->filled ) { + $min = $yscale->GetMinVal(); + if( $min > 0 || $this->fillFromMin ) + $fillmin = $yscale->scale_abs[0];//Translate($min); + else + $fillmin = $yscale->Translate(0); + + $cord[$idx++] = $xscale->Translate($xs); + $cord[$idx++] = $fillmin; + } + $xt = $xscale->Translate($xs); + $yt = $yscale->Translate($this->coords[0][$startpoint]); + $cord[$idx++] = $xt; + $cord[$idx++] = $yt; + $yt_old = $yt; + $xt_old = $xt; + $y_old = $this->coords[0][$startpoint]; + + $this->value->Stroke($img,$this->coords[0][$startpoint],$xt,$yt); + + $img->SetColor($this->color); + $img->SetLineWeight($this->weight); + $img->SetLineStyle($this->line_style); + $pnts=$startpoint+1; + $firstnonumeric = false; + while( $pnts < $numpoints ) { + + if( $exist_x ) $x=$this->coords[1][$pnts]; + else $x=$pnts+$textadj; + $xt = $xscale->Translate($x); + $yt = $yscale->Translate($this->coords[0][$pnts]); + + $y=$this->coords[0][$pnts]; + if( $this->step_style ) { + // To handle null values within step style we need to record the + // first non numeric value so we know from where to start if the + // non value is '-'. + if( is_numeric($y) ) { + $firstnonumeric = false; + if( is_numeric($y_old) ) { + $img->StyleLine($xt_old,$yt_old,$xt,$yt_old); + $img->StyleLine($xt,$yt_old,$xt,$yt); + } + elseif( $y_old == '-' ) { + $img->StyleLine($xt_first,$yt_first,$xt,$yt_first); + $img->StyleLine($xt,$yt_first,$xt,$yt); + } + else { + $yt_old = $yt; + $xt_old = $xt; + } + $cord[$idx++] = $xt; + $cord[$idx++] = $yt_old; + $cord[$idx++] = $xt; + $cord[$idx++] = $yt; + } + elseif( $firstnonumeric==false ) { + $firstnonumeric = true; + $yt_first = $yt_old; + $xt_first = $xt_old; + } + } + else { + $tmp1=$y; + $prev=$this->coords[0][$pnts-1]; + if( $tmp1==='' || $tmp1===NULL || $tmp1==='X' ) $tmp1 = 'x'; + if( $prev==='' || $prev===null || $prev==='X' ) $prev = 'x'; + + if( is_numeric($y) || (is_string($y) && $y != '-') ) { + if( is_numeric($y) && (is_numeric($prev) || $prev === '-' ) ) { + $img->StyleLineTo($xt,$yt); + } + else { + $img->SetStartPoint($xt,$yt); + } + } + if( $this->filled && $tmp1 !== '-' ) { + if( $tmp1 === 'x' ) { + $cord[$idx++] = $cord[$idx-3]; + $cord[$idx++] = $fillmin; + } + elseif( $prev === 'x' ) { + $cord[$idx++] = $xt; + $cord[$idx++] = $fillmin; + $cord[$idx++] = $xt; + $cord[$idx++] = $yt; + } + else { + $cord[$idx++] = $xt; + $cord[$idx++] = $yt; + } + } + else { + if( is_numeric($tmp1) && (is_numeric($prev) || $prev === '-' ) ) { + $cord[$idx++] = $xt; + $cord[$idx++] = $yt; + } + } + } + $yt_old = $yt; + $xt_old = $xt; + $y_old = $y; + + $this->StrokeDataValue($img,$this->coords[0][$pnts],$xt,$yt); + + ++$pnts; + } + + if( $this->filled ) { + $cord[$idx++] = $xt; + if( $min > 0 || $this->fillFromMin ) + $cord[$idx++] = $yscale->Translate($min); + else + $cord[$idx++] = $yscale->Translate(0); + if( $this->fillgrad ) { + $img->SetLineWeight(1); + $grad = new Gradient($img); + $grad->SetNumColors($this->fillgrad_numcolors); + $grad->FilledFlatPolygon($cord,$this->fillgrad_fromcolor,$this->fillgrad_tocolor); + $img->SetLineWeight($this->weight); + } + else { + $img->SetColor($this->fill_color); + $img->FilledPolygon($cord); + } + if( $this->line_weight > 0 ) { + $img->SetColor($this->color); + $img->Polygon($cord); + } + } + + if(!empty($this->filledAreas)) { + + $minY = $yscale->Translate($yscale->GetMinVal()); + $factor = ($this->step_style ? 4 : 2); + + for($i = 0; $i < sizeof($this->filledAreas); ++$i) { + // go through all filled area elements ordered by insertion + // fill polygon array + $areaCoords[] = $cord[$this->filledAreas[$i][0] * $factor]; + $areaCoords[] = $minY; + + $areaCoords = + array_merge($areaCoords, + array_slice($cord, + $this->filledAreas[$i][0] * $factor, + ($this->filledAreas[$i][1] - $this->filledAreas[$i][0] + ($this->step_style ? 0 : 1)) * $factor)); + $areaCoords[] = $areaCoords[sizeof($areaCoords)-2]; // last x + $areaCoords[] = $minY; // last y + + if($this->filledAreas[$i][3]) { + $img->SetColor($this->filledAreas[$i][2]); + $img->FilledPolygon($areaCoords); + $img->SetColor($this->color); + } + // Check if we should draw the frame. + // If not we still re-draw the line since it might have been + // partially overwritten by the filled area and it doesn't look + // very good. + // TODO: The behaviour is undefined if the line does not have + // any line at the position of the area. + if( $this->filledAreas[$i][4] ) + $img->Polygon($areaCoords); + else + $img->Polygon($cord); + + $areaCoords = array(); + } + } + + if( $this->mark->type == -1 || $this->mark->show == false ) + return; + + for( $pnts=0; $pnts<$numpoints; ++$pnts) { + + if( $exist_x ) $x=$this->coords[1][$pnts]; + else $x=$pnts+$textadj; + $xt = $xscale->Translate($x); + $yt = $yscale->Translate($this->coords[0][$pnts]); + + if( is_numeric($this->coords[0][$pnts]) ) { + if( !empty($this->csimtargets[$pnts]) ) { + if( !empty($this->csimwintargets[$pnts]) ) { + $this->mark->SetCSIMTarget($this->csimtargets[$pnts],$this->csimwintargets[$pnts]); + } + else { + $this->mark->SetCSIMTarget($this->csimtargets[$pnts]); + } + $this->mark->SetCSIMAlt($this->csimalts[$pnts]); + } + if( $exist_x ) + $x=$this->coords[1][$pnts]; + else + $x=$pnts; + $this->mark->SetCSIMAltVal($this->coords[0][$pnts],$x); + $this->mark->Stroke($img,$xt,$yt); + $this->csimareas .= $this->mark->GetCSIMAreas(); + } + } + + + } +} // Class + + +//=================================================== +// CLASS AccLinePlot +// Description: +//=================================================== +class AccLinePlot extends Plot { + var $plots=null,$nbrplots=0,$numpoints=0; + var $iStartEndZero=true; +//--------------- +// CONSTRUCTOR + function AccLinePlot($plots) { + $this->plots = $plots; + $this->nbrplots = count($plots); + $this->numpoints = $plots[0]->numpoints; + + // Verify that all plots have the same number of data points + for( $i=1; $i < $this->nbrplots; ++$i ) { + if( $plots[$i]->numpoints != $this->numpoints ) { + JpGraphError::RaiseL(10003);//('Each plot in an accumulated lineplot must have the same number of data points',0) + } + } + + for($i=0; $i < $this->nbrplots; ++$i ) { + $this->LineInterpolate($this->plots[$i]->coords[0]); + } + } + +//--------------- +// PUBLIC METHODS + function Legend(&$graph) { + $n=count($this->plots); + for($i=0; $i < $n; ++$i ) + $this->plots[$i]->DoLegend($graph); + } + + function Max() { + list($xmax) = $this->plots[0]->Max(); + $nmax=0; + $n = count($this->plots); + for($i=0; $i < $n; ++$i) { + $nc = count($this->plots[$i]->coords[0]); + $nmax = max($nmax,$nc); + list($x) = $this->plots[$i]->Max(); + $xmax = Max($xmax,$x); + } + for( $i = 0; $i < $nmax; $i++ ) { + // Get y-value for line $i by adding the + // individual bars from all the plots added. + // It would be wrong to just add the + // individual plots max y-value since that + // would in most cases give to large y-value. + $y=$this->plots[0]->coords[0][$i]; + for( $j = 1; $j < $this->nbrplots; $j++ ) { + $y += $this->plots[ $j ]->coords[0][$i]; + } + $ymax[$i] = $y; + } + $ymax = max($ymax); + return array($xmax,$ymax); + } + + function Min() { + $nmax=0; + list($xmin,$ysetmin) = $this->plots[0]->Min(); + $n = count($this->plots); + for($i=0; $i < $n; ++$i) { + $nc = count($this->plots[$i]->coords[0]); + $nmax = max($nmax,$nc); + list($x,$y) = $this->plots[$i]->Min(); + $xmin = Min($xmin,$x); + $ysetmin = Min($y,$ysetmin); + } + for( $i = 0; $i < $nmax; $i++ ) { + // Get y-value for line $i by adding the + // individual bars from all the plots added. + // It would be wrong to just add the + // individual plots min y-value since that + // would in most cases give to small y-value. + $y=$this->plots[0]->coords[0][$i]; + for( $j = 1; $j < $this->nbrplots; $j++ ) { + $y += $this->plots[ $j ]->coords[0][$i]; + } + $ymin[$i] = $y; + } + $ymin = Min($ysetmin,Min($ymin)); + return array($xmin,$ymin); + } + + // Gets called before any axis are stroked + function PreStrokeAdjust(&$graph) { + + // If another plot type have already adjusted the + // offset we don't touch it. + // (We check for empty in case the scale is a log scale + // and hence doesn't contain any xlabel_offset) + + if( empty($graph->xaxis->scale->ticks->xlabel_offset) || + $graph->xaxis->scale->ticks->xlabel_offset == 0 ) { + if( $this->center ) { + ++$this->numpoints; + $a=0.5; $b=0.5; + } else { + $a=0; $b=0; + } + $graph->xaxis->scale->ticks->SetXLabelOffset($a); + $graph->SetTextScaleOff($b); + $graph->xaxis->scale->ticks->SupressMinorTickMarks(); + } + + } + + function SetInterpolateMode($aIntMode) { + $this->iStartEndZero=$aIntMode; + } + + // Replace all '-' with an interpolated value. We use straightforward + // linear interpolation. If the data starts with one or several '-' they + // will be replaced by the the first valid data point + function LineInterpolate(&$aData) { + + $n=count($aData); + $i=0; + + // If first point is undefined we will set it to the same as the first + // valid data + if( $aData[$i]==='-' ) { + // Find the first valid data + while( $i < $n && $aData[$i]==='-' ) { + ++$i; + } + if( $i < $n ) { + for($j=0; $j < $i; ++$j ) { + if( $this->iStartEndZero ) + $aData[$i] = 0; + else + $aData[$j] = $aData[$i]; + } + } + else { + // All '-' => Error + return false; + } + } + + while($i < $n) { + while( $i < $n && $aData[$i] !== '-' ) { + ++$i; + } + if( $i < $n ) { + $pstart=$i-1; + + // Now see how long this segment of '-' are + while( $i < $n && $aData[$i] === '-' ) + ++$i; + if( $i < $n ) { + $pend=$i; + $size=$pend-$pstart; + $k=($aData[$pend]-$aData[$pstart])/$size; + // Replace the segment of '-' with a linear interpolated value. + for($j=1; $j < $size; ++$j ) { + $aData[$pstart+$j] = $aData[$pstart] + $j*$k ; + } + } + else { + // There are no valid end point. The '-' goes all the way to the end + // In that case we just set all the remaining values the the same as the + // last valid data point. + for( $j=$pstart+1; $j < $n; ++$j ) + if( $this->iStartEndZero ) + $aData[$j] = 0; + else + $aData[$j] = $aData[$pstart] ; + } + } + } + return true; + } + + + + // To avoid duplicate of line drawing code here we just + // change the y-values for each plot and then restore it + // after we have made the stroke. We must do this copy since + // it wouldn't be possible to create an acc line plot + // with the same graphs, i.e AccLinePlot(array($pl,$pl,$pl)); + // since this method would have a side effect. + function Stroke(&$img,&$xscale,&$yscale) { + $img->SetLineWeight($this->weight); + $this->numpoints = count($this->plots[0]->coords[0]); + // Allocate array + $coords[$this->nbrplots][$this->numpoints]=0; + for($i=0; $i<$this->numpoints; $i++) { + $coords[0][$i]=$this->plots[0]->coords[0][$i]; + $accy=$coords[0][$i]; + for($j=1; $j<$this->nbrplots; ++$j ) { + $coords[$j][$i] = $this->plots[$j]->coords[0][$i]+$accy; + $accy = $coords[$j][$i]; + } + } + for($j=$this->nbrplots-1; $j>=0; --$j) { + $p=$this->plots[$j]; + for( $i=0; $i<$this->numpoints; ++$i) { + $tmp[$i]=$p->coords[0][$i]; + $p->coords[0][$i]=$coords[$j][$i]; + } + $p->Stroke($img,$xscale,$yscale); + for( $i=0; $i<$this->numpoints; ++$i) + $p->coords[0][$i]=$tmp[$i]; + $p->coords[0][]=$tmp; + } + } +} // Class + + +/* EOF */ +?> diff --git a/html/includes/jpgraph/src/jpgraph_log.php b/html/includes/jpgraph/src/jpgraph_log.php new file mode 100644 index 0000000000..36b1a8210e --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_log.php @@ -0,0 +1,282 @@ +LinearScale($min,$max,$type); + $this->ticks = new LogTicks(); + $this->name = 'log'; + } + +//---------------- +// PUBLIC METHODS + + // Translate between world and screen + function Translate($a) { + if( !is_numeric($a) ) { + if( $a != '' && $a != '-' && $a != 'x' ) + JpGraphError::RaiseL(11001); +//('Your data contains non-numeric values.'); + return 1; + } + if( $a < 0 ) { + JpGraphError::RaiseL(11002); +//("Negative data values can not be used in a log scale."); + exit(1); + } + if( $a==0 ) $a=1; + $a=log10($a); + return ceil($this->off + ($a*1.0 - $this->scale[0]) * $this->scale_factor); + } + + // Relative translate (don't include offset) usefull when we just want + // to know the relative position (in pixels) on the axis + function RelTranslate($a) { + if( !is_numeric($a) ) { + if( $a != '' && $a != '-' && $a != 'x' ) + JpGraphError::RaiseL(11001); +//('Your data contains non-numeric values.'); + return 1; + } + if( $a==0 ) $a=1; + $a=log10($a); + return round(($a*1.0 - $this->scale[0]) * $this->scale_factor); + } + + // Use bcpow() for increased precision + function GetMinVal() { + if( function_exists("bcpow") ) + return round(bcpow(10,$this->scale[0],15),14); + else + return round(pow(10,$this->scale[0]),14); + } + + function GetMaxVal() { + if( function_exists("bcpow") ) + return round(bcpow(10,$this->scale[1],15),14); + else + return round(pow(10,$this->scale[1]),14); + } + + // Logarithmic autoscaling is much simplier since we just + // set the min and max to logs of the min and max values. + // Note that for log autoscale the "maxstep" the fourth argument + // isn't used. This is just included to give the method the same + // signature as the linear counterpart. + function AutoScale(&$img,$min,$max,$dummy) { + if( $min==0 ) $min=1; + + if( $max <= 0 ) { + JpGraphError::RaiseL(11004); +//('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.'); + } + if( is_numeric($this->autoscale_min) ) { + $smin = round($this->autoscale_min); + $smax = ceil(log10($max)); + if( $min >= $max ) { + JpGraphError::RaiseL(25071);//('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.'); + } + } + else { + $smin = floor(log10($min)); + if( is_numeric($this->autoscale_max) ) { + $smax = round($this->autoscale_max); + if( $smin >= $smax ) { + JpGraphError::RaiseL(25072);//('You have specified a max value with SetAutoMax() which is smaller than the miminum value used for the scale. This is not possible.'); + } + } + else + $smax = ceil(log10($max)); + } + $this->Update($img,$smin,$smax); + } +//--------------- +// PRIVATE METHODS +} // Class + +//=================================================== +// CLASS LogTicks +// Description: +//=================================================== +class LogTicks extends Ticks{ + var $label_logtype=LOGLABELS_MAGNITUDE; +//--------------- +// CONSTRUCTOR + function LogTicks() { + } +//--------------- +// PUBLIC METHODS + function IsSpecified() { + return true; + } + + function SetLabelLogType($aType) { + $this->label_logtype = $aType; + } + + // For log scale it's meaningless to speak about a major step + // We just return -1 to make the framework happy (specifically + // StrokeLabels() ) + function GetMajor() { + return -1; + } + + function SetTextLabelStart($aStart) { + JpGraphError::RaiseL(11005); +//('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.'); + } + + function SetXLabelOffset($dummy) { + // For log scales we dont care about XLabel offset + } + + // Draw ticks on image "img" using scale "scale". The axis absolute + // position in the image is specified in pos, i.e. for an x-axis + // it specifies the absolute y-coord and for Y-ticks it specified the + // absolute x-position. + function Stroke(&$img,&$scale,$pos) { + $start = $scale->GetMinVal(); + $limit = $scale->GetMaxVal(); + $nextMajor = 10*$start; + $step = $nextMajor / 10.0; + + + $img->SetLineWeight($this->weight); + + if( $scale->type == "y" ) { + // member direction specified if the ticks should be on + // left or right side. + $a=$pos + $this->direction*$this->GetMinTickAbsSize(); + $a2=$pos + $this->direction*$this->GetMajTickAbsSize(); + + $count=1; + $this->maj_ticks_pos[0]=$scale->Translate($start); + $this->maj_ticklabels_pos[0]=$scale->Translate($start); + if( $this->supress_first ) + $this->maj_ticks_label[0]=""; + else { + if( $this->label_formfunc != '' ) { + $f = $this->label_formfunc; + $this->maj_ticks_label[0]=call_user_func($f,$start); + } + elseif( $this->label_logtype == LOGLABELS_PLAIN ) + $this->maj_ticks_label[0]=$start; + else + $this->maj_ticks_label[0]='10^'.round(log10($start)); + } + $i=1; + for($y=$start; $y<=$limit; $y+=$step,++$count ) { + $ys=$scale->Translate($y); + $this->ticks_pos[]=$ys; + $this->ticklabels_pos[]=$ys; + if( $count % 10 == 0 ) { + if( !$this->supress_tickmarks ) { + if( $this->majcolor!="" ) { + $img->PushColor($this->majcolor); + $img->Line($pos,$ys,$a2,$ys); + $img->PopColor(); + } + else + $img->Line($pos,$ys,$a2,$ys); + } + + $this->maj_ticks_pos[$i]=$ys; + $this->maj_ticklabels_pos[$i]=$ys; + + if( $this->label_formfunc != '' ) { + $f = $this->label_formfunc; + $this->maj_ticks_label[$i]=call_user_func($f,$nextMajor); + } + elseif( $this->label_logtype == 0 ) + $this->maj_ticks_label[$i]=$nextMajor; + else + $this->maj_ticks_label[$i]='10^'.round(log10($nextMajor)); + ++$i; + $nextMajor *= 10; + $step *= 10; + $count=1; + } + else { + if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) { + if( $this->mincolor!="" ) $img->PushColor($this->mincolor); + $img->Line($pos,$ys,$a,$ys); + if( $this->mincolor!="" ) $img->PopColor(); + } + } + } + } + else { + $a=$pos - $this->direction*$this->GetMinTickAbsSize(); + $a2=$pos - $this->direction*$this->GetMajTickAbsSize(); + $count=1; + $this->maj_ticks_pos[0]=$scale->Translate($start); + $this->maj_ticklabels_pos[0]=$scale->Translate($start); + if( $this->supress_first ) + $this->maj_ticks_label[0]=""; + else { + if( $this->label_formfunc != '' ) { + $f = $this->label_formfunc; + $this->maj_ticks_label[0]=call_user_func($f,$start); + } + elseif( $this->label_logtype == 0 ) + $this->maj_ticks_label[0]=$start; + else + $this->maj_ticks_label[0]='10^'.round(log10($start)); + } + $i=1; + for($x=$start; $x<=$limit; $x+=$step,++$count ) { + $xs=$scale->Translate($x); + $this->ticks_pos[]=$xs; + $this->ticklabels_pos[]=$xs; + if( $count % 10 == 0 ) { + if( !$this->supress_tickmarks ) { + $img->Line($xs,$pos,$xs,$a2); + } + $this->maj_ticks_pos[$i]=$xs; + $this->maj_ticklabels_pos[$i]=$xs; + + if( $this->label_formfunc != '' ) { + $f = $this->label_formfunc; + $this->maj_ticks_label[$i]=call_user_func($f,$nextMajor); + } + elseif( $this->label_logtype == 0 ) + $this->maj_ticks_label[$i]=$nextMajor; + else + $this->maj_ticks_label[$i]='10^'.round(log10($nextMajor)); + ++$i; + $nextMajor *= 10; + $step *= 10; + $count=1; + } + else { + if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) { + $img->Line($xs,$pos,$xs,$a); + } + } + } + } + return true; + } +} // Class +/* EOF */ +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/jpgraph_mgraph.php b/html/includes/jpgraph/src/jpgraph_mgraph.php new file mode 100644 index 0000000000..f53db9f7b6 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_mgraph.php @@ -0,0 +1,381 @@ +iWidth = $aWidth; + $this->iHeight = $aHeight; + } + + // Specify background fill color for the combined graph + function SetFillColor($aColor) { + $this->iFillColor = $aColor; + } + + // Add a frame around the combined graph + function SetFrame($aFlg,$aColor='black',$aWeight=1) { + $this->iDoFrame = $aFlg; + $this->iFrameColor = $aColor; + $this->iFrameWeight = $aWeight; + } + + // Specify a background image blend + function SetBackgroundImageMix($aMix) { + $this->background_image_mix = $aMix ; + } + + // Specify a background image + function SetBackgroundImage($aFileName,$aCenter_aX=NULL,$aY=NULL) { + // Second argument can be either a boolean value or + // a numeric + $aCenter=TRUE; + $aX=NULL; + + if( is_numeric($aCenter_aX) ) { + $aX=$aCenter_aX; + } + + // Get extension to determine image type + $e = explode('.',$aFileName); + if( !$e ) { + JpGraphError::RaiseL(12002,$aFileName); +//('Incorrect file name for MGraph::SetBackgroundImage() : '.$aFileName.' Must have a valid image extension (jpg,gif,png) when using autodetection of image type'); + } + + $valid_formats = array('png', 'jpg', 'gif'); + $aImgFormat = strtolower($e[count($e)-1]); + if ($aImgFormat == 'jpeg') { + $aImgFormat = 'jpg'; + } + elseif (!in_array($aImgFormat, $valid_formats) ) { + JpGraphError::RaiseL(12003,$aImgFormat,$aFileName); +//('Unknown file extension ($aImgFormat) in MGraph::SetBackgroundImage() for filename: '.$aFileName); + } + + $this->background_image = $aFileName; + $this->background_image_center=$aCenter; + $this->background_image_format=$aImgFormat; + $this->background_image_x = $aX; + $this->background_image_y = $aY; + } + + + // Private helper function for backgound image + function _loadBkgImage($aFile='') { + if( $aFile == '' ) + $aFile = $this->background_image; + + // Remove case sensitivity and setup appropriate function to create image + // Get file extension. This should be the LAST '.' separated part of the filename + $e = explode('.',$aFile); + $ext = strtolower($e[count($e)-1]); + if ($ext == "jpeg") { + $ext = "jpg"; + } + + if( trim($ext) == '' ) + $ext = 'png'; // Assume PNG if no extension specified + + $supported = imagetypes(); + if( ( $ext == 'jpg' && !($supported & IMG_JPG) ) || + ( $ext == 'gif' && !($supported & IMG_GIF) ) || + ( $ext == 'png' && !($supported & IMG_PNG) ) ) { + JpGraphError::RaiseL(12004,$aFile);//('The image format of your background image ('.$aFile.') is not supported in your system configuration. '); + } + + if( $ext == "jpg" || $ext == "jpeg") { + $f = "imagecreatefromjpeg"; + $ext = "jpg"; + } + else { + $f = "imagecreatefrom".$ext; + } + + $img = @$f($aFile); + if( !$img ) { + JpGraphError::RaiseL(12005,$aFile); +//(" Can't read background image: '".$aFile."'"); + } + return $img; + } + + function _strokeBackgroundImage() { + if( $this->background_image == '' ) + return; + + $bkgimg = $this->_loadBkgImage(); + // Background width & Heoght + $bw = imagesx($bkgimg); + $bh = imagesy($bkgimg); + // Canvas width and height + $cw = imagesx($this->img); + $ch = imagesy($this->img); + + if( $this->background_image_x === NULL || $this->background_image_y === NULL ) { + if( $this->background_image_center ) { + // Center original image in the plot area + $x = round($cw/2-$bw/2); $y = round($ch/2-$bh/2); + } + else { + // Just copy the image from left corner, no resizing + $x=0; $y=0; + } + } + else { + $x = $this->background_image_x; + $y = $this->background_image_y; + } + $this->_imageCp($bkgimg,$x,$y,0,0,$bw,$bh,$this->background_image_mix); + } + + function _imageCp($aSrcImg,$x,$y,$fx,$fy,$w,$h,$mix=100) { + imagecopymerge($this->img,$aSrcImg,$x,$y,$fx,$fy,$w,$h,$mix); + } + + function _imageCreate($aWidth,$aHeight) { + if( $aWidth <= 1 || $aHeight <= 1 ) { + JpGraphError::RaiseL(12006,$aWidth,$aHeight); +//("Illegal sizes specified for width or height when creating an image, (width=$aWidth, height=$aHeight)"); + } + $this->img = @imagecreatetruecolor($aWidth, $aHeight); + if( $this->img < 1 ) { + JpGraphError::RaiseL(12011); +// die("JpGraph Error: Can't create truecolor image. Check that you really have GD2 library installed."); + } + ImageAlphaBlending($this->img,true); + } + + function _polygon($p,$closed=FALSE) { + if( $this->iLineWeight==0 ) return; + $n=count($p); + $oldx = $p[0]; + $oldy = $p[1]; + for( $i=2; $i < $n; $i+=2 ) { + imageline($this->img,$oldx,$oldy,$p[$i],$p[$i+1],$this->iCurrentColor); + $oldx = $p[$i]; + $oldy = $p[$i+1]; + } + if( $closed ) { + imageline($this->img,$p[$n*2-2],$p[$n*2-1],$p[0],$p[1],$this->iCurrentColor); + } + } + + function _filledPolygon($pts) { + $n=count($pts); + for($i=0; $i < $n; ++$i) + $pts[$i] = round($pts[$i]); + imagefilledpolygon($this->img,$pts,count($pts)/2,$this->iCurrentColor); + } + + function _rectangle($xl,$yu,$xr,$yl) { + for($i=0; $i < $this->iLineWeight; ++$i ) + $this->_polygon(array($xl+$i,$yu+$i,$xr-$i,$yu+$i, + $xr-$i,$yl-$i,$xl+$i,$yl-$i, + $xl+$i,$yu+$i)); + } + + function _filledRectangle($xl,$yu,$xr,$yl) { + $this->_filledPolygon(array($xl,$yu,$xr,$yu,$xr,$yl,$xl,$yl)); + } + + function _setColor($aColor) { + $this->iCurrentColor = $this->iRGB->Allocate($aColor); + } + + function AddMix($aGraph,$x=0,$y=0,$mix=100,$fx=0,$fy=0,$w=0,$h=0) { + $this->_gdImgHandle($aGraph->Stroke( _IMG_HANDLER),$x,$y,$fx=0,$fy=0,$w,$h,$mix); + } + + function Add($aGraph,$x=0,$y=0,$fx=0,$fy=0,$w=0,$h=0) { + $this->_gdImgHandle($aGraph->Stroke( _IMG_HANDLER),$x,$y,$fx=0,$fy=0,$w,$h); + } + + function _gdImgHandle($agdCanvas,$x,$y,$fx=0,$fy=0,$w=0,$h=0,$mix=100) { + if( $w == 0 ) $w = @imagesx($agdCanvas); + if( $w === NULL ) { + JpGraphError::RaiseL(12007); +//('Argument to MGraph::Add() is not a valid GD image handle.'); + return; + } + if( $h == 0 ) $h = @imagesy($agdCanvas); + $this->iGraphs[$this->iCnt++] = array($agdCanvas,$x,$y,$fx,$fy,$w,$h,$mix); + } + + function SetMargin($lm,$rm,$tm,$bm) { + $this->lm = $lm; + $this->rm = $rm; + $this->tm = $tm; + $this->bm = $bm; + } + + function SetExpired($aFlg=true) { + $this->expired = $aFlg; + } + + // Generate image header + function Headers() { + + // In case we are running from the command line with the client version of + // PHP we can't send any headers. + $sapi = php_sapi_name(); + if( $sapi == 'cli' ) + return; + + if( headers_sent() ) { + + echo "
JpGraph Error: +HTTP headers have already been sent.
Explanation:
HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it's image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).

Most likely you have some text in your script before the call to Graph::Stroke(). If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser.

For example it is a common mistake to leave a blank line before the opening \"<?php\".

"; + + die(); + + } + + + if ($this->expired) { + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); + header("Cache-Control: no-cache, must-revalidate"); + header("Pragma: no-cache"); + } + header("Content-type: image/$this->img_format"); + } + + function SetImgFormat($aFormat,$aQuality=75) { + $this->image_quality = $aQuality; + $aFormat = strtolower($aFormat); + $tst = true; + $supported = imagetypes(); + if( $aFormat=="auto" ) { + if( $supported & IMG_PNG ) + $this->img_format="png"; + elseif( $supported & IMG_JPG ) + $this->img_format="jpeg"; + elseif( $supported & IMG_GIF ) + $this->img_format="gif"; + else + JpGraphError::RaiseL(12008); +//(" Your PHP (and GD-lib) installation does not appear to support any known graphic formats.". + return true; + } + else { + if( $aFormat=="jpeg" || $aFormat=="png" || $aFormat=="gif" ) { + if( $aFormat=="jpeg" && !($supported & IMG_JPG) ) + $tst=false; + elseif( $aFormat=="png" && !($supported & IMG_PNG) ) + $tst=false; + elseif( $aFormat=="gif" && !($supported & IMG_GIF) ) + $tst=false; + else { + $this->img_format=$aFormat; + return true; + } + } + else + $tst=false; + if( !$tst ) + JpGraphError::RaiseL(12009,$aFormat); +//(" Your PHP installation does not support the chosen graphic format: $aFormat"); + } + } + + // Stream image to browser or to file + function Stream($aFile="") { + $func="image".$this->img_format; + if( $this->img_format=="jpeg" && $this->image_quality != null ) { + $res = @$func($this->img,$aFile,$this->image_quality); + } + else { + if( $aFile != "" ) { + $res = @$func($this->img,$aFile); + } + else + $res = @$func($this->img); + } + if( !$res ) + JpGraphError::RaiseL(12010,$aFile); +//("Can't create or stream image to file $aFile Check that PHP has enough permission to write a file to the current directory."); + } + + function Stroke($aFileName='') { + // Find out the necessary size for the container image + $w=0; $h=0; + for($i=0; $i < $this->iCnt; ++$i ) { + $maxw = $this->iGraphs[$i][1]+$this->iGraphs[$i][5]; + $maxh = $this->iGraphs[$i][2]+$this->iGraphs[$i][6]; + $w = max( $w, $maxw ); + $h = max( $h, $maxh ); + } + $w += $this->lm+$this->rm; + $h += $this->tm+$this->bm; + + // User specified width,height overrides + if( $this->iWidth !== NULL ) $w = $this->iWidth; + if( $this->iHeight!== NULL ) $h = $this->iHeight; + + $this->_imageCreate($w,$h); + $this->iRGB = new RGB($this->img); + + $this->_setcolor($this->iFillColor); + $this->_filledRectangle(0,0,$w-1,$h-1); + + $this->_strokeBackgroundImage(); + + if( $this->iDoFrame ) { + $this->_setColor($this->iFrameColor); + $this->iLineWeight=$this->iFrameWeight; + $this->_rectangle(0,0,$w-1,$h-1); + } + + // Copy all sub graphs to the container + for($i=0; $i < $this->iCnt; ++$i ) { + $this->_imageCp($this->iGraphs[$i][0], + $this->iGraphs[$i][1]+$this->lm,$this->iGraphs[$i][2]+$this->tm, + $this->iGraphs[$i][3],$this->iGraphs[$i][4], + $this->iGraphs[$i][5],$this->iGraphs[$i][6], + $this->iGraphs[$i][7]); + } + + // Output image + if( $aFileName == _IMG_HANDLER ) { + return $this->img; + } + else { + if( $aFileName != '' ) { + $this->Stream($aFileName); + } + else { + $this->Headers(); + $this->Stream(); + } + } + } +} + +?> diff --git a/html/includes/jpgraph/src/jpgraph_pie.php b/html/includes/jpgraph/src/jpgraph_pie.php new file mode 100644 index 0000000000..f52b59e71a --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_pie.php @@ -0,0 +1,1437 @@ + array(136,34,40,45,46,62,63,134,74,10,120,136,141,168,180,77,209,218,346,395,89,430), + "pastel" => array(27,415,128,59,66,79,105,110,42,147,152,230,236,240,331,337,405,38), + "water" => array(8,370,24,40,335,56,213,237,268,14,326,387,10,388), + "sand" => array(27,168,34,170,19,50,65,72,131,209,46,393)); + var $theme="earth"; + var $setslicecolors=array(); + var $labeltype=0; // Default to percentage + var $pie_border=true,$pie_interior_border=true; + var $value; + var $ishadowcolor='',$ishadowdrop=4; + var $ilabelposadj=1; + var $legendcsimtargets = array(); + var $legendcsimwintargets = array(); + var $legendcsimalts = array(); + var $adjusted_data = array(); + var $guideline = null,$guidelinemargin=10; + var $iShowGuideLineForSingle = false; + var $iGuideLineCurve = false,$iGuideVFactor=1.4,$iGuideLineRFactor=0.8; + var $la = array(); // Holds the angle for each label +//--------------- +// CONSTRUCTOR + function PiePlot($data) { + $this->data = array_reverse($data); + $this->title = new Text(""); + $this->title->SetFont(FF_FONT1,FS_BOLD); + $this->value = new DisplayValue(); + $this->value->Show(); + $this->value->SetFormat('%.1f%%'); + $this->guideline = new LineProperty(); + } + +//--------------- +// PUBLIC METHODS + function SetCenter($x,$y=0.5) { + $this->posx = $x; + $this->posy = $y; + } + + // Enable guideline and set drwaing policy + function SetGuideLines($aFlg=true,$aCurved=true,$aAlways=false) { + $this->guideline->Show($aFlg); + $this->iShowGuideLineForSingle = $aAlways; + $this->iGuideLineCurve = $aCurved; + } + + // Adjuste the distance between labels and labels and pie + function SetGuideLinesAdjust($aVFactor,$aRFactor=0.8) { + $this->iGuideVFactor=$aVFactor; + $this->iGuideLineRFactor=$aRFactor; + } + + function SetColor($aColor) { + $this->color = $aColor; + } + + function SetSliceColors($aColors) { + $this->setslicecolors = $aColors; + } + + function SetShadow($aColor='darkgray',$aDropWidth=4) { + $this->ishadowcolor = $aColor; + $this->ishadowdrop = $aDropWidth; + } + + function SetCSIMTargets($aTargets,$aAlts='',$aWinTargets='') { + $this->csimtargets=array_reverse($aTargets); + if( is_array($aWinTargets) ) + $this->csimwintargets=array_reverse($aWinTargets); + if( is_array($aAlts) ) + $this->csimalts=array_reverse($aAlts); + } + + function GetCSIMareas() { + return $this->csimareas; + } + + function AddSliceToCSIM($i,$xc,$yc,$radius,$sa,$ea) { + + //Slice number, ellipse centre (x,y), height, width, start angle, end angle + while( $sa > 2*M_PI ) $sa = $sa - 2*M_PI; + while( $ea > 2*M_PI ) $ea = $ea - 2*M_PI; + + $sa = 2*M_PI - $sa; + $ea = 2*M_PI - $ea; + + // Special case when we have only one slice since then both start and end + // angle will be == 0 + if( abs($sa - $ea) < 0.0001 ) { + $sa=2*M_PI; $ea=0; + } + + //add coordinates of the centre to the map + $xc = floor($xc);$yc=floor($yc); + $coords = "$xc, $yc"; + + //add coordinates of the first point on the arc to the map + $xp = floor(($radius*cos($ea))+$xc); + $yp = floor($yc-$radius*sin($ea)); + $coords.= ", $xp, $yp"; + //add coordinates every 0.2 radians + $a=$ea+0.2; + + // If we cross the 260-limit with a slice we need to handle + // the fact that end angle is smaller than start + if( $sa < $ea ) { + while ($a <= 2*M_PI) { + $xp = floor($radius*cos($a)+$xc); + $yp = floor($yc-$radius*sin($a)); + $coords.= ", $xp, $yp"; + $a += 0.2; + } + $a -= 2*M_PI; + } + + while ($a < $sa) { + $xp = floor($radius*cos($a)+$xc); + $yp = floor($yc-$radius*sin($a)); + $coords.= ", $xp, $yp"; + $a += 0.2; + } + + //Add the last point on the arc + $xp = floor($radius*cos($sa)+$xc); + $yp = floor($yc-$radius*sin($sa)); + $coords.= ", $xp, $yp"; + if( !empty($this->csimtargets[$i]) ) { + $this->csimareas .= "csimtargets[$i]."\""; + $tmp=""; + if( !empty($this->csimwintargets[$i]) ) { + $this->csimareas .= " target=\"".$this->csimwintargets[$i]."\" "; + } + if( !empty($this->csimalts[$i]) ) { + $tmp=sprintf($this->csimalts[$i],$this->data[$i]); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + } + + + function SetTheme($aTheme) { + if( in_array($aTheme,array_keys($this->themearr)) ) + $this->theme = $aTheme; + else + JpGraphError::RaiseL(15001,$aTheme);//("PiePLot::SetTheme() Unknown theme: $aTheme"); + } + + function ExplodeSlice($e,$radius=20) { + if( ! is_integer($e) ) + JpGraphError::RaiseL(15002);//('Argument to PiePlot::ExplodeSlice() must be an integer'); + $this->explode_radius[$e]=$radius; + } + + function ExplodeAll($radius=20) { + $this->explode_all=true; + $this->explode_r = $radius; + } + + function Explode($aExplodeArr) { + if( !is_array($aExplodeArr) ) { + JpGraphError::RaiseL(15003); +//("Argument to PiePlot::Explode() must be an array with integer distances."); + } + $this->explode_radius = $aExplodeArr; + } + + function SetStartAngle($aStart) { + if( $aStart < 0 || $aStart > 360 ) { + JpGraphError::RaiseL(15004);//('Slice start angle must be between 0 and 360 degrees.'); + } + $this->startangle = 360-$aStart; + $this->startangle *= M_PI/180; + } + + function SetFont($family,$style=FS_NORMAL,$size=10) { + JpGraphError::RaiseL(15005);//('PiePlot::SetFont() is deprecated. Use PiePlot->value->SetFont() instead.'); + } + + // Size in percentage + function SetSize($aSize) { + if( ($aSize>0 && $aSize<=0.5) || ($aSize>10 && $aSize<1000) ) + $this->radius = $aSize; + else + JpGraphError::RaiseL(15006); +//("PiePlot::SetSize() Radius for pie must either be specified as a fraction [0, 0.5] of the size of the image or as an absolute size in pixels in the range [10, 1000]"); + } + + function SetFontColor($aColor) { + JpGraphError::RaiseL(15007); +//('PiePlot::SetFontColor() is deprecated. Use PiePlot->value->SetColor() instead.'); + } + + // Set label arrays + function SetLegends($aLegend) { + $this->legends = $aLegend; + } + + // Set text labels for slices + function SetLabels($aLabels,$aLblPosAdj="auto") { + $this->labels = array_reverse($aLabels); + $this->ilabelposadj=$aLblPosAdj; + } + + function SetLabelPos($aLblPosAdj) { + $this->ilabelposadj=$aLblPosAdj; + } + + // Should we display actual value or percentage? + function SetLabelType($t) { + if( $t < 0 || $t > 2 ) + JpGraphError::RaiseL(15008,$t); +//("PiePlot::SetLabelType() Type for pie plots must be 0 or 1 (not $t)."); + $this->labeltype=$t; + } + + // Deprecated. + function SetValueType($aType) { + $this->SetLabelType($aType); + } + + // Should the circle around a pie plot be displayed + function ShowBorder($exterior=true,$interior=true) { + $this->pie_border = $exterior; + $this->pie_interior_border = $interior; + } + + // Setup the legends (Framework method) + function Legend(&$graph) { + $colors = array_keys($graph->img->rgb->rgb_table); + sort($colors); + $ta=$this->themearr[$this->theme]; + $n = count($this->data); + + if( $this->setslicecolors==null ) { + $numcolors=count($ta); + if( is_a($this,'PiePlot3D') ) { + $ta = array_reverse(array_slice($ta,0,$n)); + } + } + else { + $this->setslicecolors = array_slice($this->setslicecolors,0,$n); + $numcolors=count($this->setslicecolors); + if( $graph->pieaa && !is_a($this,'PiePlot3D') ) { + $this->setslicecolors = array_reverse($this->setslicecolors); + } + } + + $sum=0; + for($i=0; $i < $n; ++$i) + $sum += $this->data[$i]; + + // Bail out with error if the sum is 0 + if( $sum==0 ) + JpGraphError::RaiseL(15009);//("Illegal pie plot. Sum of all data is zero for Pie!"); + + // Make sure we don't plot more values than data points + // (in case the user added more legends than data points) + $n = min(count($this->legends),count($this->data)); + if( $this->legends != "" ) { + $this->legends = array_reverse(array_slice($this->legends,0,$n)); + } + for( $i=$n-1; $i >= 0; --$i ) { + $l = $this->legends[$i]; + // Replace possible format with actual values + if( count($this->csimalts) > $i ) { + $fmt = $this->csimalts[$i]; + } + else { + $fmt = "%d"; // Deafult Alt if no other has been specified + } + if( $this->labeltype==0 ) { + $l = sprintf($l,100*$this->data[$i]/$sum); + $alt = sprintf($fmt,$this->data[$i]); + + } + elseif( $this->labeltype == 1) { + $l = sprintf($l,$this->data[$i]); + $alt = sprintf($fmt,$this->data[$i]); + + } + else { + $l = sprintf($l,$this->adjusted_data[$i]); + $alt = sprintf($fmt,$this->adjusted_data[$i]); + } + + if( empty($this->csimwintargets[$i]) ) { + $wintarg = ''; + } + else { + $wintarg = $this->csimwintargets[$i]; + } + + if( $this->setslicecolors==null ) { + $graph->legend->Add($l,$colors[$ta[$i%$numcolors]],"",0,$this->csimtargets[$i],$alt,$wintarg); + } + else { + $graph->legend->Add($l,$this->setslicecolors[$i%$numcolors],"",0,$this->csimtargets[$i],$alt,$wintarg); + } + } + } + + // Adjust the rounded percetage value so that the sum of + // of the pie slices are always 100% + // Using the Hare/Niemeyer method + function AdjPercentage($aData,$aPrec=0) { + $mul=100; + if( $aPrec > 0 && $aPrec < 3 ) { + if( $aPrec == 1 ) + $mul=1000; + else + $mul=10000; + } + + $tmp = array(); + $result = array(); + $quote_sum=0; + $n = count($aData) ; + for( $i=0, $sum=0; $i < $n; ++$i ) + $sum+=$aData[$i]; + foreach($aData as $index => $value) { + $tmp_percentage=$value/$sum*$mul; + $result[$index]=floor($tmp_percentage); + $tmp[$index]=$tmp_percentage-$result[$index]; + $quote_sum+=$result[$index]; + } + if( $quote_sum == $mul) { + if( $mul > 100 ) { + $tmp = $mul / 100; + for( $i=0; $i < $n; ++$i ) { + $result[$i] /= $tmp ; + } + } + return $result; + } + arsort($tmp,SORT_NUMERIC); + reset($tmp); + for($i=0; $i < $mul-$quote_sum; $i++) + { + $result[key($tmp)]++; + next($tmp); + } + if( $mul > 100 ) { + $tmp = $mul / 100; + for( $i=0; $i < $n; ++$i ) { + $result[$i] /= $tmp ; + } + } + return $result; + } + + + function Stroke(&$img,$aaoption=0) { + // aaoption is used to handle antialias + // aaoption == 0 a normal pie + // aaoption == 1 just the body + // aaoption == 2 just the values + + // Explode scaling. If anti anti alias we scale the image + // twice and we also need to scale the exploding distance + $expscale = $aaoption === 1 ? 2 : 1; + + if( $this->labeltype == 2 ) { + // Adjust the data so that it will add up to 100% + $this->adjusted_data = $this->AdjPercentage($this->data); + } + + $colors = array_keys($img->rgb->rgb_table); + sort($colors); + $ta=$this->themearr[$this->theme]; + $n = count($this->data); + + if( $this->setslicecolors==null ) { + $numcolors=count($ta); + } + else { + $this->setslicecolors = array_reverse(array_slice($this->setslicecolors,0,$n)); + $numcolors=count($this->setslicecolors); + $tt = array_slice($this->setslicecolors,$n % $numcolors); + $tt2 = array_slice($this->setslicecolors,0,$n % $numcolors); + $tt2 = array_merge($tt, $tt2); + $this->setslicecolors = $tt + $tt2; + } + + // Draw the slices + $sum=0; + for($i=0; $i < $n; ++$i) + $sum += $this->data[$i]; + + // Bail out with error if the sum is 0 + if( $sum==0 ) + JpGraphError::RaiseL(15009);//("Sum of all data is 0 for Pie."); + + // Set up the pie-circle + if( $this->radius <= 1 ) + $radius = floor($this->radius*min($img->width,$img->height)); + else { + $radius = $aaoption === 1 ? $this->radius*2 : $this->radius; + } + + if( $this->posx <= 1 && $this->posx > 0 ) + $xc = round($this->posx*$img->width); + else + $xc = $this->posx ; + + if( $this->posy <= 1 && $this->posy > 0 ) + $yc = round($this->posy*$img->height); + else + $yc = $this->posy ; + + $n = count($this->data); + + if( $this->explode_all ) + for($i=0; $i < $n; ++$i) + $this->explode_radius[$i]=$this->explode_r; + + // If we have a shadow and not just drawing the labels + if( $this->ishadowcolor != "" && $aaoption !== 2) { + $accsum=0; + $angle2 = $this->startangle; + $img->SetColor($this->ishadowcolor); + for($i=0; $sum > 0 && $i < $n; ++$i) { + $j = $n-$i-1; + $d = $this->data[$i]; + $angle1 = $angle2; + $accsum += $d; + $angle2 = $this->startangle+2*M_PI*$accsum/$sum; + if( empty($this->explode_radius[$j]) ) + $this->explode_radius[$j]=0; + + if( $d < 0.00001 ) continue; + + $la = 2*M_PI - (abs($angle2-$angle1)/2.0+$angle1); + + $xcm = $xc + $this->explode_radius[$j]*cos($la)*$expscale; + $ycm = $yc - $this->explode_radius[$j]*sin($la)*$expscale; + + $xcm += $this->ishadowdrop*$expscale; + $ycm += $this->ishadowdrop*$expscale; + + $_sa = round($angle1*180/M_PI); + $_ea = round($angle2*180/M_PI); + + // The CakeSlice method draws a full circle in case of start angle = end angle + // for pie slices we don't want this behaviour unless we only have one + // slice in the pie in case it is the wanted behaviour + if( $_ea-$_sa > 0.1 || $n==1 ) { + $img->CakeSlice($xcm,$ycm,$radius-1,$radius-1, + $angle1*180/M_PI,$angle2*180/M_PI,$this->ishadowcolor); + } + } + } + + //-------------------------------------------------------------------------------- + // This is the main loop to draw each cake slice + //-------------------------------------------------------------------------------- + + // Set up the accumulated sum, start angle for first slice and border color + $accsum=0; + $angle2 = $this->startangle; + $img->SetColor($this->color); + + // Loop though all the slices if there is a pie to draw (sum>0) + // There are n slices in total + for($i=0; $sum>0 && $i < $n; ++$i) { + + // $j is the actual index used for the slice + $j = $n-$i-1; + + // Make sure we havea valid distance to explode the slice + if( empty($this->explode_radius[$j]) ) + $this->explode_radius[$j]=0; + + // The actual numeric value for the slice + $d = $this->data[$i]; + + $angle1 = $angle2; + + // Accumlate the sum + $accsum += $d; + + // The new angle when we add the "size" of this slice + // angle1 is then the start and angle2 the end of this slice + $angle2 = $this->NormAngle($this->startangle+2*M_PI*$accsum/$sum); + + // We avoid some trouble by not allowing end angle to be 0, in that case + // we translate to 360 + + + // la is used to hold the label angle, which is centered on the slice + if( $angle2 < 0.0001 && $angle1 > 0.0001 ) { + $this->la[$i] = 2*M_PI - (abs(2*M_PI-$angle1)/2.0+$angle1); + } + elseif( $angle1 > $angle2 ) { + // The case where the slice crosses the 3 a'clock line + $this->la[$i] = 2*M_PI-$this->NormAngle($angle1 + ((2*M_PI - $angle1)+$angle2)/2); + } + else { + $this->la[$i] = 2*M_PI - (abs($angle2-$angle1)/2.0+$angle1); + } + + //$_sa = round($angle1*180/M_PI); + //$_ea = round($angle2*180/M_PI); + //$_la = round($this->la[$i]*180/M_PI); + //echo "ang1=$_sa , ang2=$_ea - la=$_la
"; + + // Too avoid rounding problems we skip the slice if it is too small + if( $d < 0.00001 ) continue; + + // If the user has specified an array of colors for each slice then use + // that a color otherwise use the theme array (ta) of colors + if( $this->setslicecolors==null ) + $slicecolor=$colors[$ta[$i%$numcolors]]; + else + $slicecolor=$this->setslicecolors[$i%$numcolors]; + + // If we have enabled antialias then we don't draw any border so + // make the bordedr color the same as the slice color + if( $this->pie_interior_border && $aaoption===0 ) + $img->SetColor($this->color); + else + $img->SetColor($slicecolor); + $arccolor = $this->pie_border && $aaoption===0 ? $this->color : ""; + + // Calculate the x,y coordinates for the base of this slice taking + // the exploded distance into account. Here we use the mid angle as the + // ray of extension and we have the mid angle handy as it is also the + // label angle + $xcm = $xc + $this->explode_radius[$j]*cos($this->la[$i])*$expscale; + $ycm = $yc - $this->explode_radius[$j]*sin($this->la[$i])*$expscale; + + // If we are not just drawing the labels then draw this cake slice + if( $aaoption !== 2 ) { + + + $_sa = round($angle1*180/M_PI); + $_ea = round($angle2*180/M_PI); + $_la = round($this->la[$i]*180/M_PI); + //echo "[$i] sa=$_sa, ea=$_ea, la[$i]=$_la, (color=$slicecolor)
"; + + + // The CakeSlice method draws a full circle in case of start angle = end angle + // for pie slices we don't want this behaviour unless we only have one + // slice in the pie in case it is the wanted behaviour + if( abs($_ea-$_sa) > 0.1 || $n==1 ) { + $img->CakeSlice($xcm,$ycm,$radius-1,$radius-1,$_sa,$_ea,$slicecolor,$arccolor); + } + } + + // If the CSIM is used then make sure we register a CSIM area for this slice as well + if( $this->csimtargets && $aaoption !== 1 ) { + $this->AddSliceToCSIM($i,$xcm,$ycm,$radius,$angle1,$angle2); + } + } + + // Format the titles for each slice + if( $aaoption!==2) { + for( $i=0; $i < $n; ++$i) { + if( $this->labeltype==0 ) { + if( $sum != 0 ) + $l = 100.0*$this->data[$i]/$sum; + else + $l = 0.0; + } + elseif( $this->labeltype==1 ) { + $l = $this->data[$i]*1.0; + } + else { + $l = $this->adjusted_data[$i]; + } + if( isset($this->labels[$i]) && is_string($this->labels[$i]) ) + $this->labels[$i]=sprintf($this->labels[$i],$l); + else + $this->labels[$i]=$l; + } + } + + If( $this->value->show && $aaoption !== 1 ) { + $this->StrokeAllLabels($img,$xc,$yc,$radius); + } + + // Adjust title position + if( $aaoption !== 1 ) { + $this->title->Pos($xc, + $yc-$this->title->GetFontHeight($img)-$radius-$this->title->margin, + "center","bottom"); + $this->title->Stroke($img); + } + + } + +//--------------- +// PRIVATE METHODS + + function NormAngle($a) { + while( $a < 0 ) $a += 2*M_PI; + while( $a > 2*M_PI ) $a -= 2*M_PI; + return $a; + } + + function Quadrant($a) { + $a=$this->NormAngle($a); + if( $a > 0 && $a <= M_PI/2 ) + return 0; + if( $a > M_PI/2 && $a <= M_PI ) + return 1; + if( $a > M_PI && $a <= 1.5*M_PI ) + return 2; + if( $a > 1.5*M_PI ) + return 3; + } + + function StrokeGuideLabels(&$img,$xc,$yc,$radius) { + $n = count($this->labels); + + //----------------------------------------------------------------------- + // Step 1 of the algorithm is to construct a number of clusters + // a cluster is defined as all slices within the same quadrant (almost) + // that has an angular distance less than the treshold + //----------------------------------------------------------------------- + $tresh_hold=25 * M_PI/180; // 25 degrees difference to be in a cluster + $incluster=false; // flag if we are currently in a cluster or not + $clusters = array(); // array of clusters + $cidx=-1; // running cluster index + + // Go through all the labels and construct a number of clusters + for($i=0; $i < $n-1; ++$i) { + // Calc the angle distance between two consecutive slices + $a1=$this->la[$i]; + $a2=$this->la[$i+1]; + $q1 = $this->Quadrant($a1); + $q2 = $this->Quadrant($a2); + $diff = abs($a1-$a2); + if( $diff < $tresh_hold ) { + if( $incluster ) { + $clusters[$cidx][1]++; + // Each cluster can only cover one quadrant + // Do we cross a quadrant ( and must break the cluster) + if( $q1 != $q2 ) { + // If we cross a quadrant boundary we normally start a + // new cluster. However we need to take the 12'a clock + // and 6'a clock positions into a special consideration. + // Case 1: WE go from q=1 to q=2 if the last slice on + // the cluster for q=1 is close to 12'a clock and the + // first slice in q=0 is small we extend the previous + // cluster + if( $q1 == 1 && $q2 == 0 && $a2 > (90-15)*M_PI/180 ) { + if( $i < $n-2 ) { + $a3 = $this->la[$i+2]; + // If there isn't a cluster coming up with the next-next slice + // we extend the previous cluster to cover this slice as well + if( abs($a3-$a2) >= $tresh_hold ) { + $clusters[$cidx][1]++; + $i++; + } + } + } + elseif( $q1 == 3 && $q2 == 2 && $a2 > (270-15)*M_PI/180 ) { + if( $i < $n-2 ) { + $a3 = $this->la[$i+2]; + // If there isn't a cluster coming up with the next-next slice + // we extend the previous cluster to cover this slice as well + if( abs($a3-$a2) >= $tresh_hold ) { + $clusters[$cidx][1]++; + $i++; + } + } + } + + if( $q1==2 && $q2==1 && $a2 > (180-15)*M_PI/180 ) { + $clusters[$cidx][1]++; + $i++; + } + + $incluster = false; + } + } + elseif( $q1 == $q2) { + $incluster = true; + // Now we have a special case for quadrant 0. If we previously + // have a cluster of one in quadrant 0 we just extend that + // cluster. If we don't do this then we risk that the label + // for the cluster of one will cross the guide-line + if( $q1 == 0 && $cidx > -1 && + $clusters[$cidx][1] == 1 && + $this->Quadrant($this->la[$clusters[$cidx][0]]) == 0 ) { + $clusters[$cidx][1]++; + } + else { + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + } + else { + // Create a "cluster" of one since we are just crossing + // a quadrant + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + } + else { + if( $incluster ) { + // Add the last slice + $clusters[$cidx][1]++; + $incluster = false; + } + else { // Create a "cluster" of one + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + } + } + // Handle the very last slice + if( $incluster ) { + $clusters[$cidx][1]++; + } + else { // Create a "cluster" of one + $cidx++; + $clusters[$cidx][0] = $i; + $clusters[$cidx][1] = 1; + } + + /* + if( true ) { + // Debug printout in labels + for( $i=0; $i <= $cidx; ++$i ) { + for( $j=0; $j < $clusters[$i][1]; ++$j ) { + $a = $this->la[$clusters[$i][0]+$j]; + $aa = round($a*180/M_PI); + $q = $this->Quadrant($a); + $this->labels[$clusters[$i][0]+$j]="[$q:$aa] $i:$j"; + } + } + } + */ + + //----------------------------------------------------------------------- + // Step 2 of the algorithm is use the clusters and draw the labels + // and guidelines + //----------------------------------------------------------------------- + + // We use the font height as the base factor for how far we need to + // spread the labels in the Y-direction. + $img->SetFont($this->value->ff,$this->value->fs,$this->value->fsize); + $fh = $img->GetFontHeight(); + $origvstep=$fh*$this->iGuideVFactor; + $this->value->SetMargin(0); + + // Number of clusters found + $nc = count($clusters); + + // Walk through all the clusters + for($i=0; $i < $nc; ++$i) { + + // Start angle and number of slices in this cluster + $csize = $clusters[$i][1]; + $a = $this->la[$clusters[$i][0]]; + $q = $this->Quadrant($a); + + // Now set up the start and end conditions to make sure that + // in each cluster we walk through the all the slices starting with the slice + // closest to the equator. Since all slices are numbered clockwise from "3'a clock" + // we have different conditions depending on in which quadrant the slice lies within. + if( $q == 0 ) { + $start = $csize-1; $idx = $start; $step = -1; $vstep = -$origvstep; + } + elseif( $q == 1 ) { + $start = 0; $idx = $start; $step = 1; $vstep = -$origvstep; + } + elseif( $q == 2 ) { + $start = $csize-1; $idx = $start; $step = -1; $vstep = $origvstep; + } + elseif( $q == 3 ) { + $start = 0; $idx = $start; $step = 1; $vstep = $origvstep; + } + + // Walk through all slices within this cluster + for($j=0; $j < $csize; ++$j) { + // Now adjust the position of the labels in each cluster starting + // with the slice that is closest to the equator of the pie + $a = $this->la[$clusters[$i][0]+$idx]; + + // Guide line start in the center of the arc of the slice + $r = $radius+$this->explode_radius[$n-1-($clusters[$i][0]+$idx)]; + $x = round($r*cos($a)+$xc); + $y = round($yc-$r*sin($a)); + + // The distance from the arc depends on chosen font and the "R-Factor" + $r += $fh*$this->iGuideLineRFactor; + + // Should the labels be placed curved along the pie or in straight columns + // outside the pie? + if( $this->iGuideLineCurve ) + $xt=round($r*cos($a)+$xc); + + // If this is the first slice in the cluster we need some first time + // proessing + if( $idx == $start ) { + if( ! $this->iGuideLineCurve ) + $xt=round($r*cos($a)+$xc); + $yt=round($yc-$r*sin($a)); + + // Some special consideration in case this cluster starts + // in quadrant 1 or 3 very close to the "equator" (< 20 degrees) + // and the previous clusters last slice is within the tolerance. + // In that case we add a font height to this labels Y-position + // so it doesn't collide with + // the slice in the previous cluster + $prevcluster = ($i + ($nc-1) ) % $nc; + $previdx=$clusters[$prevcluster][0]+$clusters[$prevcluster][1]-1; + if( $q == 1 && $a > 160*M_PI/180 ) { + // Get the angle for the previous clusters last slice + $diff = abs($a-$this->la[$previdx]); + if( $diff < $tresh_hold ) { + $yt -= $fh; + } + } + elseif( $q == 3 && $a > 340*M_PI/180 ) { + // We need to subtract 360 to compare angle distance between + // q=0 and q=3 + $diff = abs($a-$this->la[$previdx]-360*M_PI/180); + if( $diff < $tresh_hold ) { + $yt += $fh; + } + } + + } + else { + // The step is at minimum $vstep but if the slices are relatively large + // we make sure that we add at least a step that corresponds to the vertical + // distance between the centers at the arc on the slice + $prev_a = $this->la[$clusters[$i][0]+($idx-$step)]; + $dy = abs($radius*(sin($a)-sin($prev_a))*1.2); + if( $vstep > 0 ) + $yt += max($vstep,$dy); + else + $yt += min($vstep,-$dy); + } + + $label = $this->labels[$clusters[$i][0]+$idx]; + + if( $csize == 1 ) { + // A "meta" cluster with only one slice + $r = $radius+$this->explode_radius[$n-1-($clusters[$i][0]+$idx)]; + $rr = $r+$img->GetFontHeight()/2; + $xt=round($rr*cos($a)+$xc); + $yt=round($yc-$rr*sin($a)); + $this->StrokeLabel($label,$img,$xc,$yc,$a,$r); + if( $this->iShowGuideLineForSingle ) + $this->guideline->Stroke($img,$x,$y,$xt,$yt); + } + else { + $this->guideline->Stroke($img,$x,$y,$xt,$yt); + if( $q==1 || $q==2 ) { + // Left side of Pie + $this->guideline->Stroke($img,$xt,$yt,$xt-$this->guidelinemargin,$yt); + $lbladj = -$this->guidelinemargin-5; + $this->value->halign = "right"; + $this->value->valign = "center"; + } + else { + // Right side of pie + $this->guideline->Stroke($img,$xt,$yt,$xt+$this->guidelinemargin,$yt); + $lbladj = $this->guidelinemargin+5; + $this->value->halign = "left"; + $this->value->valign = "center"; + } + $this->value->Stroke($img,$label,$xt+$lbladj,$yt); + } + + // Udate idx to point to next slice in the cluster to process + $idx += $step; + } + } + } + + function StrokeAllLabels(&$img,$xc,$yc,$radius) { + // First normalize all angles for labels + $n = count($this->la); + for($i=0; $i < $n; ++$i) { + $this->la[$i] = $this->NormAngle($this->la[$i]); + } + if( $this->guideline->iShow ) { + $this->StrokeGuideLabels($img,$xc,$yc,$radius); + } + else { + $n = count($this->labels); + for($i=0; $i < $n; ++$i) { + $this->StrokeLabel($this->labels[$i],$img,$xc,$yc, + $this->la[$i], + $radius + $this->explode_radius[$n-1-$i]); + } + } + } + + // Position the labels of each slice + function StrokeLabel($label,&$img,$xc,$yc,$a,$radius) { + + // Default value + if( $this->ilabelposadj === 'auto' ) + $this->ilabelposadj = 0.65; + $r = $radius; + + // We position the values diferently depending on if they are inside + // or outside the pie + if( $this->ilabelposadj < 1.0 ) { + + $this->value->SetAlign('center','center'); + $this->value->margin = 0; + + $xt=round($this->ilabelposadj*$r*cos($a)+$xc); + $yt=round($yc-$this->ilabelposadj*$r*sin($a)); + + $this->value->Stroke($img,$label,$xt,$yt); + } + else { + + $this->value->halign = "left"; + $this->value->valign = "top"; + $this->value->margin = 0; + + // Position the axis title. + // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text + // that intersects with the extension of the corresponding axis. The code looks a little + // bit messy but this is really the only way of having a reasonable position of the + // axis titles. + $img->SetFont($this->value->ff,$this->value->fs,$this->value->fsize); + $h=$img->GetTextHeight($label); + // For numeric values the format of the display value + // must be taken into account + if( is_numeric($label) ) { + if( $label > 0 ) + $w=$img->GetTextWidth(sprintf($this->value->format,$label)); + else + $w=$img->GetTextWidth(sprintf($this->value->negformat,$label)); + } + else + $w=$img->GetTextWidth($label); + if( $this->ilabelposadj > 1.0 && $this->ilabelposadj < 5.0) { + $r *= $this->ilabelposadj; + } + + $r += $img->GetFontHeight()/1.5; + + $xt=round($r*cos($a)+$xc); + $yt=round($yc-$r*sin($a)); + + // Normalize angle + while( $a < 0 ) $a += 2*M_PI; + while( $a > 2*M_PI ) $a -= 2*M_PI; + + if( $a>=7*M_PI/4 || $a <= M_PI/4 ) $dx=0; + if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dx=($a-M_PI/4)*2/M_PI; + if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dx=1; + if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dx=(1-($a-M_PI*5/4)*2/M_PI); + + if( $a>=7*M_PI/4 ) $dy=(($a-M_PI)-3*M_PI/4)*2/M_PI; + if( $a<=M_PI/4 ) $dy=(1-$a*2/M_PI); + if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dy=1; + if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dy=(1-($a-3*M_PI/4)*2/M_PI); + if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dy=0; + + $this->value->Stroke($img,$label,$xt-$dx*$w,$yt-$dy*$h); + } + } +} // Class + + +//=================================================== +// CLASS PiePlotC +// Description: Same as a normal pie plot but with a +// filled circle in the center +//=================================================== +class PiePlotC extends PiePlot { + var $imidsize=0.5; // Fraction of total width + var $imidcolor='white'; + var $midtitle=''; + var $middlecsimtarget='',$middlecsimwintarget='',$middlecsimalt=''; + + function PiePlotC($data,$aCenterTitle='') { + parent::PiePlot($data); + $this->midtitle = new Text(); + $this->midtitle->ParagraphAlign('center'); + } + + function SetMid($aTitle,$aColor='white',$aSize=0.5) { + $this->midtitle->Set($aTitle); + + $this->imidsize = $aSize ; + $this->imidcolor = $aColor ; + } + + function SetMidTitle($aTitle) { + $this->midtitle->Set($aTitle); + } + + function SetMidSize($aSize) { + $this->imidsize = $aSize ; + } + + function SetMidColor($aColor) { + $this->imidcolor = $aColor ; + } + + function SetMidCSIM($aTarget,$aAlt='',$aWinTarget='') { + $this->middlecsimtarget = $aTarget; + $this->middlecsimwintarget = $aWinTarget; + $this->middlecsimalt = $aAlt; + } + + function AddSliceToCSIM($i,$xc,$yc,$radius,$sa,$ea) { + + //Slice number, ellipse centre (x,y), radius, start angle, end angle + while( $sa > 2*M_PI ) $sa = $sa - 2*M_PI; + while( $ea > 2*M_PI ) $ea = $ea - 2*M_PI; + + $sa = 2*M_PI - $sa; + $ea = 2*M_PI - $ea; + + // Special case when we have only one slice since then both start and end + // angle will be == 0 + if( abs($sa - $ea) < 0.0001 ) { + $sa=2*M_PI; $ea=0; + } + + // Add inner circle first point + $xp = floor(($this->imidsize*$radius*cos($ea))+$xc); + $yp = floor($yc-($this->imidsize*$radius*sin($ea))); + $coords = "$xp, $yp"; + + //add coordinates every 0.25 radians + $a=$ea+0.25; + + // If we cross the 260-limit with a slice we need to handle + // the fact that end angle is smaller than start + if( $sa < $ea ) { + while ($a <= 2*M_PI) { + $xp = floor($radius*cos($a)+$xc); + $yp = floor($yc-$radius*sin($a)); + $coords.= ", $xp, $yp"; + $a += 0.25; + } + $a -= 2*M_PI; + } + + while ($a < $sa) { + $xp = floor(($this->imidsize*$radius*cos($a)+$xc)); + $yp = floor($yc-($this->imidsize*$radius*sin($a))); + $coords.= ", $xp, $yp"; + $a += 0.25; + } + + // Make sure we end at the last point + $xp = floor(($this->imidsize*$radius*cos($sa)+$xc)); + $yp = floor($yc-($this->imidsize*$radius*sin($sa))); + $coords.= ", $xp, $yp"; + + // Straight line to outer circle + $xp = floor($radius*cos($sa)+$xc); + $yp = floor($yc-$radius*sin($sa)); + $coords.= ", $xp, $yp"; + + //add coordinates every 0.25 radians + $a=$sa - 0.25; + while ($a > $ea) { + $xp = floor($radius*cos($a)+$xc); + $yp = floor($yc-$radius*sin($a)); + $coords.= ", $xp, $yp"; + $a -= 0.25; + } + + //Add the last point on the arc + $xp = floor($radius*cos($ea)+$xc); + $yp = floor($yc-$radius*sin($ea)); + $coords.= ", $xp, $yp"; + + // Close the arc + $xp = floor(($this->imidsize*$radius*cos($ea))+$xc); + $yp = floor($yc-($this->imidsize*$radius*sin($ea))); + $coords .= ", $xp, $yp"; + + if( !empty($this->csimtargets[$i]) ) { + $this->csimareas .= "csimtargets[$i]."\""; + if( !empty($this->csimwintargets[$i]) ) { + $this->csimareas .= " target=\"".$this->csimwintargets[$i]."\" "; + } + if( !empty($this->csimalts[$i]) ) { + $tmp=sprintf($this->csimalts[$i],$this->data[$i]); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + } + + + function Stroke(&$img,$aaoption=0) { + + // Stroke the pie but don't stroke values + $tmp = $this->value->show; + $this->value->show = false; + parent::Stroke($img,$aaoption); + $this->value->show = $tmp; + + $xc = round($this->posx*$img->width); + $yc = round($this->posy*$img->height); + + $radius = floor($this->radius * min($img->width,$img->height)) ; + + + if( $this->imidsize > 0 && $aaoption !== 2 ) { + + if( $this->ishadowcolor != "" ) { + $img->SetColor($this->ishadowcolor); + $img->FilledCircle($xc+$this->ishadowdrop,$yc+$this->ishadowdrop, + round($radius*$this->imidsize)); + } + + $img->SetColor($this->imidcolor); + $img->FilledCircle($xc,$yc,round($radius*$this->imidsize)); + + if( $this->pie_border && $aaoption === 0 ) { + $img->SetColor($this->color); + $img->Circle($xc,$yc,round($radius*$this->imidsize)); + } + + if( !empty($this->middlecsimtarget) ) + $this->AddMiddleCSIM($xc,$yc,round($radius*$this->imidsize)); + + } + + if( $this->value->show && $aaoption !== 1) { + $this->StrokeAllLabels($img,$xc,$yc,$radius); + $this->midtitle->Pos($xc,$yc,'center','center'); + $this->midtitle->Stroke($img); + } + + } + + function AddMiddleCSIM($xc,$yc,$r) { + $xc=round($xc);$yc=round($yc);$r=round($r); + $this->csimareas .= "middlecsimtarget."\""; + if( !empty($this->middlecsimwintarget) ) { + $this->csimareas .= " target=\"".$this->middlecsimwintarget."\""; + } + if( !empty($this->middlecsimalt) ) { + $tmp = $this->middlecsimalt; + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + + function StrokeLabel($label,$img,$xc,$yc,$a,$r) { + + if( $this->ilabelposadj === 'auto' ) + $this->ilabelposadj = (1-$this->imidsize)/2+$this->imidsize; + + parent::StrokeLabel($label,$img,$xc,$yc,$a,$r); + + } + +} + + +//=================================================== +// CLASS PieGraph +// Description: +//=================================================== +class PieGraph extends Graph { + var $posx, $posy, $radius; + var $legends=array(); + var $plots=array(); + var $pieaa = false ; +//--------------- +// CONSTRUCTOR + function PieGraph($width=300,$height=200,$cachedName="",$timeout=0,$inline=1) { + $this->Graph($width,$height,$cachedName,$timeout,$inline); + $this->posx=$width/2; + $this->posy=$height/2; + $this->SetColor(array(255,255,255)); + } + +//--------------- +// PUBLIC METHODS + function Add($aObj) { + + if( is_array($aObj) && count($aObj) > 0 ) + $cl = $aObj[0]; + else + $cl = $aObj; + + if( is_a($cl,'Text') ) + $this->AddText($aObj); + elseif( is_a($cl,'IconPlot') ) + $this->AddIcon($aObj); + else { + if( is_array($aObj) ) { + $n = count($aObj); + for($i=0; $i < $n; ++$i ) { + $this->plots[] = $aObj[$i]; + } + } + else { + $this->plots[] = $aObj; + } + } + } + + function SetAntiAliasing($aFlg=true) { + $this->pieaa = $aFlg; + } + + function SetColor($c) { + $this->SetMarginColor($c); + } + + function DisplayCSIMAreas() { + $csim=""; + foreach($this->plots as $p ) { + $csim .= $p->GetCSIMareas(); + } + //$csim.= $this->legend->GetCSIMareas(); + if (preg_match_all("/area shape=\"(\w+)\" coords=\"([0-9\, ]+)\"/", $csim, $coords)) { + $this->img->SetColor($this->csimcolor); + $n = count($coords[0]); + for ($i=0; $i < $n; $i++) { + if ($coords[1][$i]=="poly") { + preg_match_all('/\s*([0-9]+)\s*,\s*([0-9]+)\s*,*/',$coords[2][$i],$pts); + $this->img->SetStartPoint($pts[1][count($pts[0])-1],$pts[2][count($pts[0])-1]); + $m = count($pts[0]); + for ($j=0; $j < $m; $j++) { + $this->img->LineTo($pts[1][$j],$pts[2][$j]); + } + } else if ($coords[1][$i]=="rect") { + $pts = preg_split('/,/', $coords[2][$i]); + $this->img->SetStartPoint($pts[0],$pts[1]); + $this->img->LineTo($pts[2],$pts[1]); + $this->img->LineTo($pts[2],$pts[3]); + $this->img->LineTo($pts[0],$pts[3]); + $this->img->LineTo($pts[0],$pts[1]); + + } + } + } + } + + // Method description + function Stroke($aStrokeFileName="") { + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // a best we can. Therefor you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); + + // We need to know if we have stroked the plot in the + // GetCSIMareas. Otherwise the CSIM hasn't been generated + // and in the case of GetCSIM called before stroke to generate + // CSIM without storing an image to disk GetCSIM must call Stroke. + $this->iHasStroked = true; + + $n = count($this->plots); + + if( $this->pieaa ) { + + if( !$_csim ) { + if( $this->background_image != "" ) { + $this->StrokeFrameBackground(); + } + else { + $this->StrokeFrame(); + } + } + + + $w = $this->img->width; + $h = $this->img->height; + $oldimg = $this->img->img; + + $this->img->CreateImgCanvas(2*$w,2*$h); + + $this->img->SetColor( $this->margin_color ); + $this->img->FilledRectangle(0,0,2*$w-1,2*$h-1); + + // Make all icons *2 i size since we will be scaling down the + // image to do the anti aliasing + $ni = count($this->iIcons); + for($i=0; $i < $ni; ++$i) { + $this->iIcons[$i]->iScale *= 2 ; + if( $this->iIcons[$i]->iX > 1 ) + $this->iIcons[$i]->iX *= 2 ; + if( $this->iIcons[$i]->iY > 1 ) + $this->iIcons[$i]->iY *= 2 ; + } + + $this->StrokeIcons(); + + for($i=0; $i < $n; ++$i) { + if( $this->plots[$i]->posx > 1 ) + $this->plots[$i]->posx *= 2 ; + if( $this->plots[$i]->posy > 1 ) + $this->plots[$i]->posy *= 2 ; + + $this->plots[$i]->Stroke($this->img,1); + + if( $this->plots[$i]->posx > 1 ) + $this->plots[$i]->posx /= 2 ; + if( $this->plots[$i]->posy > 1 ) + $this->plots[$i]->posy /= 2 ; + } + $indent = $this->doframe ? ($this->frame_weight + ($this->doshadow ? $this->shadow_width : 0 )) : 0 ; + $indent += $this->framebevel ? $this->framebeveldepth + 1 : 0 ; + $this->img->CopyCanvasH($oldimg,$this->img->img,$indent,$indent,$indent,$indent, + $w-2*$indent,$h-2*$indent,2*($w-$indent),2*($h-$indent)); + + $this->img->img = $oldimg ; + $this->img->width = $w ; + $this->img->height = $h ; + + for($i=0; $i < $n; ++$i) { + $this->plots[$i]->Stroke($this->img,2); // Stroke labels + $this->plots[$i]->Legend($this); + } + + } + else { + // No antialias + if( !$_csim ) { + if( $this->background_image != "" ) { + $this->StrokeFrameBackground(); + } + else { + $this->StrokeFrame(); + $this->StrokeBackgroundGrad(); + } + } + + $this->StrokeIcons(); + for($i=0; $i < $n; ++$i) { + $this->plots[$i]->Stroke($this->img); + $this->plots[$i]->Legend($this); + } + } + + $this->legend->Stroke($this->img); + $this->footer->Stroke($this->img); + $this->StrokeTitles(); + + if( !$_csim ) { + + // Stroke texts + if( $this->texts != null ) { + $n = count($this->texts); + for($i=0; $i < $n; ++$i ) { + $this->texts[$i]->Stroke($this->img); + } + } + + if( _JPG_DEBUG ) { + $this->DisplayCSIMAreas(); + } + + // Should we do any final image transformation + if( $this->iImgTrans ) { + if( !class_exists('ImgTrans') ) { + require_once('jpgraph_imgtrans.php'); + //JpGraphError::Raise('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.'); + } + + $tform = new ImgTrans($this->img->img); + $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, + $this->iImgTransDirection,$this->iImgTransHighQ, + $this->iImgTransMinSize,$this->iImgTransFillColor, + $this->iImgTransBorder); + } + + + // If the filename is given as the special "__handle" + // then the image handler is returned and the image is NOT + // streamed back + if( $aStrokeFileName == _IMG_HANDLER ) { + return $this->img->img; + } + else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline, + $aStrokeFileName); + } + } + } +} // Class + +/* EOF */ +?> diff --git a/html/includes/jpgraph/src/jpgraph_pie3d.php b/html/includes/jpgraph/src/jpgraph_pie3d.php new file mode 100644 index 0000000000..82afcdc803 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_pie3d.php @@ -0,0 +1,923 @@ +radius = 0.5; + $this->data = $data; + $this->title = new Text(""); + $this->title->SetFont(FF_FONT1,FS_BOLD); + $this->value = new DisplayValue(); + $this->value->Show(); + $this->value->SetFormat('%.0f%%'); + } + +//--------------- +// PUBLIC METHODS + + // Set label arrays + function SetLegends($aLegend) { + $this->legends = array_reverse(array_slice($aLegend,0,count($this->data))); + } + + function SetSliceColors($aColors) { + $this->setslicecolors = $aColors; + } + + function Legend(&$aGraph) { + parent::Legend($aGraph); + $aGraph->legend->txtcol = array_reverse($aGraph->legend->txtcol); + } + + function SetCSIMTargets($aTargets,$aAlts='',$aWinTargets='') { + $this->csimtargets = $aTargets; + $this->csimwintargets = $aWinTargets; + $this->csimalts = $aAlts; + } + + // Should the slices be separated by a line? If color is specified as "" no line + // will be used to separate pie slices. + function SetEdge($aColor='black',$aWeight=1) { + $this->edgecolor = $aColor; + $this->edgeweight = $aWeight; + } + + // Dummy function to make Pie3D behave in a similair way to 2D + function ShowBorder($exterior=true,$interior=true) { + JpGraphError::RaiseL(14001); +//('Pie3D::ShowBorder() . Deprecated function. Use Pie3D::SetEdge() to control the edges around slices.'); + } + + // Specify projection angle for 3D in degrees + // Must be between 20 and 70 degrees + function SetAngle($a) { + if( $a<5 || $a>90 ) + JpGraphError::RaiseL(14002); +//("PiePlot3D::SetAngle() 3D Pie projection angle must be between 5 and 85 degrees."); + else + $this->angle = $a; + } + + function AddSliceToCSIM($i,$xc,$yc,$height,$width,$thick,$sa,$ea) { //Slice number, ellipse centre (x,y), height, width, start angle, end angle + + $sa *= M_PI/180; + $ea *= M_PI/180; + + //add coordinates of the centre to the map + $coords = "$xc, $yc"; + + //add coordinates of the first point on the arc to the map + $xp = floor($width*cos($sa)/2+$xc); + $yp = floor($yc-$height*sin($sa)/2); + $coords.= ", $xp, $yp"; + + //If on the front half, add the thickness offset + if ($sa >= M_PI && $sa <= 2*M_PI*1.01) { + $yp = floor($yp+$thick); + $coords.= ", $xp, $yp"; + } + + //add coordinates every 0.2 radians + $a=$sa+0.2; + while ($a<$ea) { + $xp = floor($width*cos($a)/2+$xc); + if ($a >= M_PI && $a <= 2*M_PI*1.01) { + $yp = floor($yc-($height*sin($a)/2)+$thick); + } else { + $yp = floor($yc-$height*sin($a)/2); + } + $coords.= ", $xp, $yp"; + $a += 0.2; + } + + //Add the last point on the arc + $xp = floor($width*cos($ea)/2+$xc); + $yp = floor($yc-$height*sin($ea)/2); + + + if ($ea >= M_PI && $ea <= 2*M_PI*1.01) { + $coords.= ", $xp, ".floor($yp+$thick); + } + $coords.= ", $xp, $yp"; + $alt=''; + + if( !empty($this->csimtargets[$i]) ) { + $this->csimareas .= "csimtargets[$i]."\""; + + if( !empty($this->csimwintargets[$i]) ) { + $this->csimareas .= " target=\"".$this->csimwintargets[$i]."\" "; + } + + if( !empty($this->csimalts[$i]) ) { + $tmp=sprintf($this->csimalts[$i],$this->data[$i]); + $this->csimareas .= "alt=\"$tmp\" title=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + + } + + function SetLabels($aLabels,$aLblPosAdj="auto") { + $this->labels = $aLabels; + $this->ilabelposadj=$aLblPosAdj; + } + + + // Distance from the pie to the labels + function SetLabelMargin($m) { + $this->value->SetMargin($m); + } + + // Show a thin line from the pie to the label for a specific slice + function ShowLabelHint($f=true) { + $this->showlabelhint=$f; + } + + // Set color of hint line to label for each slice + function SetLabelHintColor($c) { + $this->labelhintcolor=$c; + } + + function SetHeight($aHeight) { + $this->iThickness = $aHeight; + } + + +// Normalize Angle between 0-360 + function NormAngle($a) { + // Normalize anle to 0 to 2M_PI + // + if( $a > 0 ) { + while($a > 360) $a -= 360; + } + else { + while($a < 0) $a += 360; + } + if( $a < 0 ) + $a = 360 + $a; + + if( $a == 360 ) $a=0; + return $a; + } + + + +// Draw one 3D pie slice at position ($xc,$yc) with height $z + function Pie3DSlice(&$img,$xc,$yc,$w,$h,$sa,$ea,$z,$fillcolor,$shadow=0.65) { + + // Due to the way the 3D Pie algorithm works we are + // guaranteed that any slice we get into this method + // belongs to either the left or right side of the + // pie ellipse. Hence, no slice will cross 90 or 270 + // point. + if( ($sa < 90 && $ea > 90) || ( ($sa > 90 && $sa < 270) && $ea > 270) ) { + JpGraphError::RaiseL(14003);//('Internal assertion failed. Pie3D::Pie3DSlice'); + exit(1); + } + + $p[] = array(); + + // Setup pre-calculated values + $rsa = $sa/180*M_PI; // to Rad + $rea = $ea/180*M_PI; // to Rad + $sinsa = sin($rsa); + $cossa = cos($rsa); + $sinea = sin($rea); + $cosea = cos($rea); + + // p[] is the points for the overall slice and + // pt[] is the points for the top pie + + // Angular step when approximating the arc with a polygon train. + $step = 0.05; + + if( $sa >= 270 ) { + if( $ea > 360 || ($ea > 0 && $ea <= 90) ) { + if( $ea > 0 && $ea <= 90 ) { + // Adjust angle to simplify conditions in loops + $rea += 2*M_PI; + } + + $p = array($xc,$yc,$xc,$yc+$z, + $xc+$w*$cossa,$z+$yc-$h*$sinsa); + $pt = array($xc,$yc,$xc+$w*$cossa,$yc-$h*$sinsa); + + for( $a=$rsa; $a < 2*M_PI; $a += $step ) { + $tca = cos($a); + $tsa = sin($a); + $p[] = $xc+$w*$tca; + $p[] = $z+$yc-$h*$tsa; + $pt[] = $xc+$w*$tca; + $pt[] = $yc-$h*$tsa; + } + + $pt[] = $xc+$w; + $pt[] = $yc; + + $p[] = $xc+$w; + $p[] = $z+$yc; + $p[] = $xc+$w; + $p[] = $yc; + $p[] = $xc; + $p[] = $yc; + + for( $a=2*M_PI+$step; $a < $rea; $a += $step ) { + $pt[] = $xc + $w*cos($a); + $pt[] = $yc - $h*sin($a); + } + + $pt[] = $xc+$w*$cosea; + $pt[] = $yc-$h*$sinea; + $pt[] = $xc; + $pt[] = $yc; + + } + else { + $p = array($xc,$yc,$xc,$yc+$z, + $xc+$w*$cossa,$z+$yc-$h*$sinsa); + $pt = array($xc,$yc,$xc+$w*$cossa,$yc-$h*$sinsa); + + $rea = $rea == 0.0 ? 2*M_PI : $rea; + for( $a=$rsa; $a < $rea; $a += $step ) { + $tca = cos($a); + $tsa = sin($a); + $p[] = $xc+$w*$tca; + $p[] = $z+$yc-$h*$tsa; + $pt[] = $xc+$w*$tca; + $pt[] = $yc-$h*$tsa; + } + + $pt[] = $xc+$w*$cosea; + $pt[] = $yc-$h*$sinea; + $pt[] = $xc; + $pt[] = $yc; + + $p[] = $xc+$w*$cosea; + $p[] = $z+$yc-$h*$sinea; + $p[] = $xc+$w*$cosea; + $p[] = $yc-$h*$sinea; + $p[] = $xc; + $p[] = $yc; + } + } + elseif( $sa >= 180 ) { + $p = array($xc,$yc,$xc,$yc+$z,$xc+$w*$cosea,$z+$yc-$h*$sinea); + $pt = array($xc,$yc,$xc+$w*$cosea,$yc-$h*$sinea); + + for( $a=$rea; $a>$rsa; $a -= $step ) { + $tca = cos($a); + $tsa = sin($a); + $p[] = $xc+$w*$tca; + $p[] = $z+$yc-$h*$tsa; + $pt[] = $xc+$w*$tca; + $pt[] = $yc-$h*$tsa; + } + + $pt[] = $xc+$w*$cossa; + $pt[] = $yc-$h*$sinsa; + $pt[] = $xc; + $pt[] = $yc; + + $p[] = $xc+$w*$cossa; + $p[] = $z+$yc-$h*$sinsa; + $p[] = $xc+$w*$cossa; + $p[] = $yc-$h*$sinsa; + $p[] = $xc; + $p[] = $yc; + + } + elseif( $sa >= 90 ) { + if( $ea > 180 ) { + $p = array($xc,$yc,$xc,$yc+$z,$xc+$w*$cosea,$z+$yc-$h*$sinea); + $pt = array($xc,$yc,$xc+$w*$cosea,$yc-$h*$sinea); + + for( $a=$rea; $a > M_PI; $a -= $step ) { + $tca = cos($a); + $tsa = sin($a); + $p[] = $xc+$w*$tca; + $p[] = $z + $yc - $h*$tsa; + $pt[] = $xc+$w*$tca; + $pt[] = $yc-$h*$tsa; + } + + $p[] = $xc-$w; + $p[] = $z+$yc; + $p[] = $xc-$w; + $p[] = $yc; + $p[] = $xc; + $p[] = $yc; + + $pt[] = $xc-$w; + $pt[] = $z+$yc; + $pt[] = $xc-$w; + $pt[] = $yc; + + for( $a=M_PI-$step; $a > $rsa; $a -= $step ) { + $pt[] = $xc + $w*cos($a); + $pt[] = $yc - $h*sin($a); + } + + $pt[] = $xc+$w*$cossa; + $pt[] = $yc-$h*$sinsa; + $pt[] = $xc; + $pt[] = $yc; + + } + else { // $sa >= 90 && $ea <= 180 + $p = array($xc,$yc,$xc,$yc+$z, + $xc+$w*$cosea,$z+$yc-$h*$sinea, + $xc+$w*$cosea,$yc-$h*$sinea, + $xc,$yc); + + $pt = array($xc,$yc,$xc+$w*$cosea,$yc-$h*$sinea); + + for( $a=$rea; $a>$rsa; $a -= $step ) { + $pt[] = $xc + $w*cos($a); + $pt[] = $yc - $h*sin($a); + } + + $pt[] = $xc+$w*$cossa; + $pt[] = $yc-$h*$sinsa; + $pt[] = $xc; + $pt[] = $yc; + + } + } + else { // sa > 0 && ea < 90 + + $p = array($xc,$yc,$xc,$yc+$z, + $xc+$w*$cossa,$z+$yc-$h*$sinsa, + $xc+$w*$cossa,$yc-$h*$sinsa, + $xc,$yc); + + $pt = array($xc,$yc,$xc+$w*$cossa,$yc-$h*$sinsa); + + for( $a=$rsa; $a < $rea; $a += $step ) { + $pt[] = $xc + $w*cos($a); + $pt[] = $yc - $h*sin($a); + } + + $pt[] = $xc+$w*$cosea; + $pt[] = $yc-$h*$sinea; + $pt[] = $xc; + $pt[] = $yc; + } + + $img->PushColor($fillcolor.":".$shadow); + $img->FilledPolygon($p); + $img->PopColor(); + + $img->PushColor($fillcolor); + $img->FilledPolygon($pt); + $img->PopColor(); + } + + function SetStartAngle($aStart) { + if( $aStart < 0 || $aStart > 360 ) { + JpGraphError::RaiseL(14004);//('Slice start angle must be between 0 and 360 degrees.'); + } + $this->startangle = $aStart; + } + +// Draw a 3D Pie + function Pie3D($aaoption,&$img,$data,$colors,$xc,$yc,$d,$angle,$z, + $shadow=0.65,$startangle=0,$edgecolor="",$edgeweight=1) { + + //--------------------------------------------------------------------------- + // As usual the algorithm get more complicated than I originally + // envisioned. I believe that this is as simple as it is possible + // to do it with the features I want. It's a good exercise to start + // thinking on how to do this to convince your self that all this + // is really needed for the general case. + // + // The algorithm two draw 3D pies without "real 3D" is done in + // two steps. + // First imagine the pie cut in half through a thought line between + // 12'a clock and 6'a clock. It now easy to imagine that we can plot + // the individual slices for each half by starting with the topmost + // pie slice and continue down to 6'a clock. + // + // In the algortithm this is done in three principal steps + // Step 1. Do the knife cut to ensure by splitting slices that extends + // over the cut line. This is done by splitting the original slices into + // upto 3 subslices. + // Step 2. Find the top slice for each half + // Step 3. Draw the slices from top to bottom + // + // The thing that slightly complicates this scheme with all the + // angle comparisons below is that we can have an arbitrary start + // angle so we must take into account the different equivalence classes. + // For the same reason we must walk through the angle array in a + // modulo fashion. + // + // Limitations of algorithm: + // * A small exploded slice which crosses the 270 degree point + // will get slightly nagged close to the center due to the fact that + // we print the slices in Z-order and that the slice left part + // get printed first and might get slightly nagged by a larger + // slice on the right side just before the right part of the small + // slice. Not a major problem though. + //--------------------------------------------------------------------------- + + + // Determine the height of the ellippse which gives an + // indication of the inclination angle + $h = ($angle/90.0)*$d; + $sum = 0; + for($i=0; $ilabeltype == 2 ) { + $this->adjusted_data = $this->AdjPercentage($data); + } + + // Setup the start + $accsum = 0; + $a = $startangle; + $a = $this->NormAngle($a); + + // + // Step 1 . Split all slices that crosses 90 or 270 + // + $idx=0; + $adjexplode=array(); + $numcolors = count($colors); + for($i=0; $iexplode_radius[$i]) ) + $this->explode_radius[$i]=0; + + $expscale=1; + if( $aaoption == 1 ) + $expscale=2; + + $la = $a + $da/2; + $explode = array( $xc + $this->explode_radius[$i]*cos($la*M_PI/180)*$expscale, + $yc - $this->explode_radius[$i]*sin($la*M_PI/180) * ($h/$d) *$expscale ); + $adjexplode[$idx] = $explode; + $labeldata[$i] = array($la,$explode[0],$explode[1]); + $originalangles[$i] = array($a,$a+$da); + + $ne = $this->NormAngle($a+$da); + if( $da <= 180 ) { + // If the slice size is <= 90 it can at maximum cut across + // one boundary (either 90 or 270) where it needs to be split + $split=-1; // no split + if( ($da<=90 && ($a <= 90 && $ne > 90)) || + (($da <= 180 && $da >90) && (($a < 90 || $a >= 270) && $ne > 90)) ) { + $split = 90; + } + elseif( ($da<=90 && ($a <= 270 && $ne > 270)) || + (($da<=180 && $da>90) && ($a >= 90 && $a < 270 && ($a+$da) > 270 )) ) { + $split = 270; + } + if( $split > 0 ) { // split in two + $angles[$idx] = array($a,$split); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + $angles[++$idx] = array($split,$ne); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + } + else { // no split + $angles[$idx] = array($a,$ne); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + } + } + else { + // da>180 + // Slice may, depending on position, cross one or two + // bonudaries + + if( $a < 90 ) + $split = 90; + elseif( $a <= 270 ) + $split = 270; + else + $split = 90; + + $angles[$idx] = array($a,$split); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + //if( $a+$da > 360-$split ) { + // For slices larger than 270 degrees we might cross + // another boundary as well. This means that we must + // split the slice further. The comparison gets a little + // bit complicated since we must take into accound that + // a pie might have a startangle >0 and hence a slice might + // wrap around the 0 angle. + // Three cases: + // a) Slice starts before 90 and hence gets a split=90, but + // we must also check if we need to split at 270 + // b) Slice starts after 90 but before 270 and slices + // crosses 90 (after a wrap around of 0) + // c) If start is > 270 (hence the firstr split is at 90) + // and the slice is so large that it goes all the way + // around 270. + if( ($a < 90 && ($a+$da > 270)) || + ($a > 90 && $a<=270 && ($a+$da>360+90) ) || + ($a > 270 && $this->NormAngle($a+$da)>270) ) { + $angles[++$idx] = array($split,360-$split); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + $angles[++$idx] = array(360-$split,$ne); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + } + else { + // Just a simple split to the previous decided + // angle. + $angles[++$idx] = array($split,$ne); + $adjcolors[$idx] = $colors[$i % $numcolors]; + $adjexplode[$idx] = $explode; + } + } + $a += $da; + $a = $this->NormAngle($a); + } + + // Total number of slices + $n = count($angles); + + for($i=0; $i<$n; ++$i) { + list($dbgs,$dbge) = $angles[$i]; + } + + // + // Step 2. Find start index (first pie that starts in upper left quadrant) + // + $minval = $angles[0][0]; + $min = 0; + for( $i=0; $i<$n; ++$i ) { + if( $angles[$i][0] < $minval ) { + $minval = $angles[$i][0]; + $min = $i; + } + } + $j = $min; + $cnt = 0; + while( $angles[$j][1] <= 90 ) { + $j++; + if( $j>=$n) { + $j=0; + } + if( $cnt > $n ) { + JpGraphError::RaiseL(14005); +//("Pie3D Internal error (#1). Trying to wrap twice when looking for start index"); + } + ++$cnt; + } + $start = $j; + + // + // Step 3. Print slices in z-order + // + $cnt = 0; + + // First stroke all the slices between 90 and 270 (left half circle) + // counterclockwise + + while( $angles[$j][0] < 270 && $aaoption !== 2 ) { + + list($x,$y) = $adjexplode[$j]; + + $this->Pie3DSlice($img,$x,$y,$d,$h,$angles[$j][0],$angles[$j][1], + $z,$adjcolors[$j],$shadow); + + $last = array($x,$y,$j); + + $j++; + if( $j >= $n ) $j=0; + if( $cnt > $n ) { + JpGraphError::RaiseL(14006); +//("Pie3D Internal Error: Z-Sorting algorithm for 3D Pies is not working properly (2). Trying to wrap twice while stroking."); + } + ++$cnt; + } + + $slice_left = $n-$cnt; + $j=$start-1; + if($j<0) $j=$n-1; + $cnt = 0; + + // The stroke all slices from 90 to -90 (right half circle) + // clockwise + while( $cnt < $slice_left && $aaoption !== 2 ) { + + list($x,$y) = $adjexplode[$j]; + + $this->Pie3DSlice($img,$x,$y,$d,$h,$angles[$j][0],$angles[$j][1], + $z,$adjcolors[$j],$shadow); + $j--; + if( $cnt > $n ) { + JpGraphError::RaiseL(14006); +//("Pie3D Internal Error: Z-Sorting algorithm for 3D Pies is not working properly (2). Trying to wrap twice while stroking."); + } + if($j<0) $j=$n-1; + $cnt++; + } + + // Now do a special thing. Stroke the last slice on the left + // halfcircle one more time. This is needed in the case where + // the slice close to 270 have been exploded. In that case the + // part of the slice close to the center of the pie might be + // slightly nagged. + if( $aaoption !== 2 ) + $this->Pie3DSlice($img,$last[0],$last[1],$d,$h,$angles[$last[2]][0], + $angles[$last[2]][1],$z,$adjcolors[$last[2]],$shadow); + + + if( $aaoption !== 1 ) { + // Now print possible labels and add csim + $img->SetFont($this->value->ff,$this->value->fs); + $margin = $img->GetFontHeight()/2 + $this->value->margin ; + for($i=0; $i < count($data); ++$i ) { + $la = $labeldata[$i][0]; + $x = $labeldata[$i][1] + cos($la*M_PI/180)*($d+$margin)*$this->ilabelposadj; + $y = $labeldata[$i][2] - sin($la*M_PI/180)*($h+$margin)*$this->ilabelposadj; + if( $this->ilabelposadj >= 1.0 ) { + if( $la > 180 && $la < 360 ) $y += $z; + } + if( $this->labeltype == 0 ) { + if( $sum > 0 ) + $l = 100*$data[$i]/$sum; + else + $l = 0; + } + elseif( $this->labeltype == 1 ) { + $l = $data[$i]; + } + else { + $l = $this->adjusted_data[$i]; + } + if( isset($this->labels[$i]) && is_string($this->labels[$i]) ) + $l=sprintf($this->labels[$i],$l); + + $this->StrokeLabels($l,$img,$labeldata[$i][0]*M_PI/180,$x,$y,$z); + + $this->AddSliceToCSIM($i,$labeldata[$i][1],$labeldata[$i][2],$h*2,$d*2,$z, + $originalangles[$i][0],$originalangles[$i][1]); + } + } + + // + // Finally add potential lines in pie + // + + if( $edgecolor=="" || $aaoption !== 0 ) return; + + $accsum = 0; + $a = $startangle; + $a = $this->NormAngle($a); + + $a *= M_PI/180.0; + + $idx=0; + $img->PushColor($edgecolor); + $img->SetLineWeight($edgeweight); + + $fulledge = true; + for($i=0; $i < count($data) && $fulledge; ++$i ) { + if( empty($this->explode_radius[$i]) ) + $this->explode_radius[$i]=0; + if( $this->explode_radius[$i] > 0 ) { + $fulledge = false; + } + } + + + for($i=0; $i < count($data); ++$i, ++$idx ) { + + $da = $data[$i]/$sum * 2*M_PI; + $this->StrokeFullSliceFrame($img,$xc,$yc,$a,$a+$da,$d,$h,$z,$edgecolor, + $this->explode_radius[$i],$fulledge); + $a += $da; + } + $img->PopColor(); + } + + function StrokeFullSliceFrame(&$img,$xc,$yc,$sa,$ea,$w,$h,$z,$edgecolor,$exploderadius,$fulledge) { + $step = 0.02; + + if( $exploderadius > 0 ) { + $la = ($sa+$ea)/2; + $xc += $exploderadius*cos($la); + $yc -= $exploderadius*sin($la) * ($h/$w) ; + + } + + $p = array($xc,$yc,$xc+$w*cos($sa),$yc-$h*sin($sa)); + + for($a=$sa; $a < $ea; $a += $step ) { + $p[] = $xc + $w*cos($a); + $p[] = $yc - $h*sin($a); + } + + $p[] = $xc+$w*cos($ea); + $p[] = $yc-$h*sin($ea); + $p[] = $xc; + $p[] = $yc; + + $img->SetColor($edgecolor); + $img->Polygon($p); + + // Unfortunately we can't really draw the full edge around the whole of + // of the slice if any of the slices are exploded. The reason is that + // this algorithm is to simply. There are cases where the edges will + // "overwrite" other slices when they have been exploded. + // Doing the full, proper 3D hidden lines stiff is actually quite + // tricky. So for exploded pies we only draw the top edge. Not perfect + // but the "real" solution is much more complicated. + if( $fulledge && !( $sa > 0 && $sa < M_PI && $ea < M_PI) ) { + + if($sa < M_PI && $ea > M_PI) + $sa = M_PI; + + if($sa < 2*M_PI && (($ea >= 2*M_PI) || ($ea > 0 && $ea < $sa ) ) ) + $ea = 2*M_PI; + + if( $sa >= M_PI && $ea <= 2*M_PI ) { + $p = array($xc + $w*cos($sa),$yc - $h*sin($sa), + $xc + $w*cos($sa),$z + $yc - $h*sin($sa)); + + for($a=$sa+$step; $a < $ea; $a += $step ) { + $p[] = $xc + $w*cos($a); + $p[] = $z + $yc - $h*sin($a); + } + $p[] = $xc + $w*cos($ea); + $p[] = $z + $yc - $h*sin($ea); + $p[] = $xc + $w*cos($ea); + $p[] = $yc - $h*sin($ea); + $img->SetColor($edgecolor); + $img->Polygon($p); + } + } + } + + function Stroke(&$img,$aaoption=0) { + $n = count($this->data); + + // If user hasn't set the colors use the theme array + if( $this->setslicecolors==null ) { + $colors = array_keys($img->rgb->rgb_table); + sort($colors); + $idx_a=$this->themearr[$this->theme]; + $ca = array(); + $m = count($idx_a); + for($i=0; $i < $m; ++$i) + $ca[$i] = $colors[$idx_a[$i]]; + $ca = array_reverse(array_slice($ca,0,$n)); + } + else { + $ca = $this->setslicecolors; + } + + + if( $this->posx <= 1 && $this->posx > 0 ) + $xc = round($this->posx*$img->width); + else + $xc = $this->posx ; + + if( $this->posy <= 1 && $this->posy > 0 ) + $yc = round($this->posy*$img->height); + else + $yc = $this->posy ; + + if( $this->radius <= 1 ) { + $width = floor($this->radius*min($img->width,$img->height)); + // Make sure that the pie doesn't overflow the image border + // The 0.9 factor is simply an extra margin to leave some space + // between the pie an the border of the image. + $width = min($width,min($xc*0.9,($yc*90/$this->angle-$width/4)*0.9)); + } + else { + $width = $this->radius * ($aaoption === 1 ? 2 : 1 ) ; + } + + // Add a sanity check for width + if( $width < 1 ) { + JpGraphError::RaiseL(14007);//("Width for 3D Pie is 0. Specify a size > 0"); + } + + // Establish a thickness. By default the thickness is a fifth of the + // pie slice width (=pie radius) but since the perspective depends + // on the inclination angle we use some heuristics to make the edge + // slightly thicker the less the angle. + + // Has user specified an absolute thickness? In that case use + // that instead + + if( $this->iThickness ) { + $thick = $this->iThickness; + $thick *= ($aaoption === 1 ? 2 : 1 ); + } + else + $thick = $width/12; + $a = $this->angle; + if( $a <= 30 ) $thick *= 1.6; + elseif( $a <= 40 ) $thick *= 1.4; + elseif( $a <= 50 ) $thick *= 1.2; + elseif( $a <= 60 ) $thick *= 1.0; + elseif( $a <= 70 ) $thick *= 0.8; + elseif( $a <= 80 ) $thick *= 0.7; + else $thick *= 0.6; + + $thick = floor($thick); + + if( $this->explode_all ) + for($i=0; $i < $n; ++$i) + $this->explode_radius[$i]=$this->explode_r; + + $this->Pie3D($aaoption,$img,$this->data, $ca, $xc, $yc, $width, $this->angle, + $thick, 0.65, $this->startangle, $this->edgecolor, $this->edgeweight); + + // Adjust title position + if( $aaoption != 1 ) { + $this->title->Pos($xc,$yc-$this->title->GetFontHeight($img)-$width/2-$this->title->margin, "center","bottom"); + $this->title->Stroke($img); + } + } + +//--------------- +// PRIVATE METHODS + + // Position the labels of each slice + function StrokeLabels($label,&$img,$a,$xp,$yp,$z) { + $this->value->halign="left"; + $this->value->valign="top"; + + // Position the axis title. + // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text + // that intersects with the extension of the corresponding axis. The code looks a little + // bit messy but this is really the only way of having a reasonable position of the + // axis titles. + $img->SetFont($this->value->ff,$this->value->fs,$this->value->fsize); + $h=$img->GetTextHeight($label); + // For numeric values the format of the display value + // must be taken into account + if( is_numeric($label) ) { + if( $label >= 0 ) + $w=$img->GetTextWidth(sprintf($this->value->format,$label)); + else + $w=$img->GetTextWidth(sprintf($this->value->negformat,$label)); + } + else + $w=$img->GetTextWidth($label); + while( $a > 2*M_PI ) $a -= 2*M_PI; + if( $a>=7*M_PI/4 || $a <= M_PI/4 ) $dx=0; + if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dx=($a-M_PI/4)*2/M_PI; + if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dx=1; + if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dx=(1-($a-M_PI*5/4)*2/M_PI); + + if( $a>=7*M_PI/4 ) $dy=(($a-M_PI)-3*M_PI/4)*2/M_PI; + if( $a<=M_PI/4 ) $dy=(1-$a*2/M_PI); + if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dy=1; + if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dy=(1-($a-3*M_PI/4)*2/M_PI); + if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dy=0; + + $x = round($xp-$dx*$w); + $y = round($yp-$dy*$h); + + + // Mark anchor point for debugging + /* + $img->SetColor('red'); + $img->Line($xp-10,$yp,$xp+10,$yp); + $img->Line($xp,$yp-10,$xp,$yp+10); + */ + $oldmargin = $this->value->margin; + $this->value->margin=0; + $this->value->Stroke($img,$label,$x,$y); + $this->value->margin=$oldmargin; + + } +} // Class + +/* EOF */ +?> diff --git a/html/includes/jpgraph/src/jpgraph_plotband.php b/html/includes/jpgraph/src/jpgraph_plotband.php new file mode 100644 index 0000000000..33e5d05754 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_plotband.php @@ -0,0 +1,634 @@ +x=$aX; + $this->y=$aY; + $this->w=$aWidth; + $this->h=$aHeight; + $this->xe=$aX+$aWidth-1; + $this->ye=$aY+$aHeight-1; + } +} + +//===================================================================== +// Class RectPattern +// Base class for pattern hierarchi that is used to display patterned +// bands on the graph. Any subclass that doesn't override Stroke() +// must at least implement method DoPattern(&$aImg) which is responsible +// for drawing the pattern onto the graph. +//===================================================================== +class RectPattern { + var $color; + var $weight; + var $rect=null; + var $doframe=true; + var $linespacing; // Line spacing in pixels + var $iBackgroundColor=-1; // Default is no background fill + + function RectPattern($aColor,$aWeight=1) { + $this->color = $aColor; + $this->weight = $aWeight; + } + + function SetBackground($aBackgroundColor) { + $this->iBackgroundColor=$aBackgroundColor; + } + + function SetPos(&$aRect) { + $this->rect = $aRect; + } + + function ShowFrame($aShow=true) { + $this->doframe=$aShow; + } + + function SetDensity($aDens) { + if( $aDens < 1 || $aDens > 100 ) + JpGraphError::RaiseL(16001,$aDens); +//(" Desity for pattern must be between 1 and 100. (You tried $aDens)"); + // 1% corresponds to linespacing=50 + // 100 % corresponds to linespacing 1 + $this->linespacing = floor(((100-$aDens)/100.0)*50)+1; + + } + + function Stroke(&$aImg) { + if( $this->rect == null ) + JpGraphError::RaiseL(16002); +//(" No positions specified for pattern."); + + if( !(is_numeric($this->iBackgroundColor) && $this->iBackgroundColor==-1) ) { + $aImg->SetColor($this->iBackgroundColor); + $aImg->FilledRectangle($this->rect->x,$this->rect->y,$this->rect->xe,$this->rect->ye); + } + + $aImg->SetColor($this->color); + $aImg->SetLineWeight($this->weight); + + // Virtual function implemented by subclass + $this->DoPattern($aImg); + + // Frame around the pattern area + if( $this->doframe ) + $aImg->Rectangle($this->rect->x,$this->rect->y,$this->rect->xe,$this->rect->ye); + } + +} + + +//===================================================================== +// Class RectPatternSolid +// Implements a solid band +//===================================================================== +class RectPatternSolid extends RectPattern { + + function RectPatternSolid($aColor="black",$aWeight=1) { + parent::RectPattern($aColor,$aWeight); + } + + function DoPattern(&$aImg) { + $aImg->SetColor($this->color); + $aImg->FilledRectangle($this->rect->x,$this->rect->y, + $this->rect->xe,$this->rect->ye); + } +} + +//===================================================================== +// Class RectPatternHor +// Implements horizontal line pattern +//===================================================================== +class RectPatternHor extends RectPattern { + + function RectPatternHor($aColor="black",$aWeight=1,$aLineSpacing=7) { + parent::RectPattern($aColor,$aWeight); + $this->linespacing = $aLineSpacing; + } + + function DoPattern(&$aImg) { + $x0 = $this->rect->x; + $x1 = $this->rect->xe; + $y = $this->rect->y; + while( $y < $this->rect->ye ) { + $aImg->Line($x0,$y,$x1,$y); + $y += $this->linespacing; + } + } +} + +//===================================================================== +// Class RectPatternVert +// Implements vertical line pattern +//===================================================================== +class RectPatternVert extends RectPattern { + var $linespacing=10; // Line spacing in pixels + + function RectPatternVert($aColor="black",$aWeight=1,$aLineSpacing=7) { + parent::RectPattern($aColor,$aWeight); + $this->linespacing = $aLineSpacing; + } + + //-------------------- + // Private methods + // + function DoPattern(&$aImg) { + $x = $this->rect->x; + $y0 = $this->rect->y; + $y1 = $this->rect->ye; + while( $x < $this->rect->xe ) { + $aImg->Line($x,$y0,$x,$y1); + $x += $this->linespacing; + } + } +} + + +//===================================================================== +// Class RectPatternRDiag +// Implements right diagonal pattern +//===================================================================== +class RectPatternRDiag extends RectPattern { + var $linespacing; // Line spacing in pixels + + function RectPatternRDiag($aColor="black",$aWeight=1,$aLineSpacing=12) { + parent::RectPattern($aColor,$aWeight); + $this->linespacing = $aLineSpacing; + } + + function DoPattern(&$aImg) { + // -------------------- + // | / / / / /| + // |/ / / / / | + // | / / / / | + // -------------------- + $xe = $this->rect->xe; + $ye = $this->rect->ye; + $x0 = $this->rect->x + round($this->linespacing/2); + $y0 = $this->rect->y; + $x1 = $this->rect->x; + $y1 = $this->rect->y + round($this->linespacing/2); + + while($x0<=$xe && $y1<=$ye) { + $aImg->Line($x0,$y0,$x1,$y1); + $x0 += $this->linespacing; + $y1 += $this->linespacing; + } + + if( $xe-$x1 > $ye-$y0 ) { + // Width larger than height + $x1 = $this->rect->x + ($y1-$ye); + $y1 = $ye; + $y0 = $this->rect->y; + while( $x0 <= $xe ) { + $aImg->Line($x0,$y0,$x1,$y1); + $x0 += $this->linespacing; + $x1 += $this->linespacing; + } + + $y0=$this->rect->y + ($x0-$xe); + $x0=$xe; + } + else { + // Height larger than width + $diff = $x0-$xe; + $y0 = $diff+$this->rect->y; + $x0 = $xe; + $x1 = $this->rect->x; + while( $y1 <= $ye ) { + $aImg->Line($x0,$y0,$x1,$y1); + $y1 += $this->linespacing; + $y0 += $this->linespacing; + } + + $diff = $y1-$ye; + $y1 = $ye; + $x1 = $diff + $this->rect->x; + } + + while( $y0 <= $ye ) { + $aImg->Line($x0,$y0,$x1,$y1); + $y0 += $this->linespacing; + $x1 += $this->linespacing; + } + } +} + +//===================================================================== +// Class RectPatternLDiag +// Implements left diagonal pattern +//===================================================================== +class RectPatternLDiag extends RectPattern { + var $linespacing; // Line spacing in pixels + + function RectPatternLDiag($aColor="black",$aWeight=1,$aLineSpacing=12) { + $this->linespacing = $aLineSpacing; + parent::RectPattern($aColor,$aWeight); + } + + function DoPattern(&$aImg) { + // -------------------- + // |\ \ \ \ \ | + // | \ \ \ \ \| + // | \ \ \ \ | + // |------------------| + $xe = $this->rect->xe; + $ye = $this->rect->ye; + $x0 = $this->rect->x + round($this->linespacing/2); + $y0 = $this->rect->ye; + $x1 = $this->rect->x; + $y1 = $this->rect->ye - round($this->linespacing/2); + + while($x0<=$xe && $y1>=$this->rect->y) { + $aImg->Line($x0,$y0,$x1,$y1); + $x0 += $this->linespacing; + $y1 -= $this->linespacing; + } + if( $xe-$x1 > $ye-$this->rect->y ) { + // Width larger than height + $x1 = $this->rect->x + ($this->rect->y-$y1); + $y0=$ye; $y1=$this->rect->y; + while( $x0 <= $xe ) { + $aImg->Line($x0,$y0,$x1,$y1); + $x0 += $this->linespacing; + $x1 += $this->linespacing; + } + + $y0=$this->rect->ye - ($x0-$xe); + $x0=$xe; + } + else { + // Height larger than width + $diff = $x0-$xe; + $y0 = $ye-$diff; + $x0 = $xe; + while( $y1 >= $this->rect->y ) { + $aImg->Line($x0,$y0,$x1,$y1); + $y0 -= $this->linespacing; + $y1 -= $this->linespacing; + } + $diff = $this->rect->y - $y1; + $x1 = $this->rect->x + $diff; + $y1 = $this->rect->y; + } + while( $y0 >= $this->rect->y ) { + $aImg->Line($x0,$y0,$x1,$y1); + $y0 -= $this->linespacing; + $x1 += $this->linespacing; + } + } +} + +//===================================================================== +// Class RectPattern3DPlane +// Implements "3D" plane pattern +//===================================================================== +class RectPattern3DPlane extends RectPattern { + var $alpha=50; // Parameter that specifies the distance + // to "simulated" horizon in pixel from the + // top of the band. Specifies how fast the lines + // converge. + + function RectPattern3DPlane($aColor="black",$aWeight=1) { + parent::RectPattern($aColor,$aWeight); + $this->SetDensity(10); // Slightly larger default + } + + function SetHorizon($aHorizon) { + $this->alpha=$aHorizon; + } + + function DoPattern(&$aImg) { + // "Fake" a nice 3D grid-effect. + $x0 = $this->rect->x + $this->rect->w/2; + $y0 = $this->rect->y; + $x1 = $x0; + $y1 = $this->rect->ye; + $x0_right = $x0; + $x1_right = $x1; + + // BTW "apa" means monkey in Swedish but is really a shortform for + // "alpha+a" which was the labels I used on paper when I derived the + // geometric to get the 3D perspective right. + // $apa is the height of the bounding rectangle plus the distance to the + // artifical horizon (alpha) + $apa = $this->rect->h + $this->alpha; + + // Three cases and three loops + // 1) The endpoint of the line ends on the bottom line + // 2) The endpoint ends on the side + // 3) Horizontal lines + + // Endpoint falls on bottom line + $middle=$this->rect->x + $this->rect->w/2; + $dist=$this->linespacing; + $factor=$this->alpha /($apa); + while($x1>$this->rect->x) { + $aImg->Line($x0,$y0,$x1,$y1); + $aImg->Line($x0_right,$y0,$x1_right,$y1); + $x1 = $middle - $dist; + $x0 = $middle - $dist * $factor; + $x1_right = $middle + $dist; + $x0_right = $middle + $dist * $factor; + $dist += $this->linespacing; + } + + // Endpoint falls on sides + $dist -= $this->linespacing; + $d=$this->rect->w/2; + $c = $apa - $d*$apa/$dist; + while( $x0>$this->rect->x ) { + $aImg->Line($x0,$y0,$this->rect->x,$this->rect->ye-$c); + $aImg->Line($x0_right,$y0,$this->rect->xe,$this->rect->ye-$c); + $dist += $this->linespacing; + $x0 = $middle - $dist * $factor; + $x1 = $middle - $dist; + $x0_right = $middle + $dist * $factor; + $c = $apa - $d*$apa/$dist; + } + + // Horizontal lines + // They need some serious consideration since they are a function + // of perspective depth (alpha) and density (linespacing) + $x0=$this->rect->x; + $x1=$this->rect->xe; + $y=$this->rect->ye; + + // The first line is drawn directly. Makes the loop below slightly + // more readable. + $aImg->Line($x0,$y,$x1,$y); + $hls = $this->linespacing; + + // A correction factor for vertical "brick" line spacing to account for + // a) the difference in number of pixels hor vs vert + // b) visual apperance to make the first layer of "bricks" look more + // square. + $vls = $this->linespacing*0.6; + + $ds = $hls*($apa-$vls)/$apa; + // Get the slope for the "perspective line" going from bottom right + // corner to top left corner of the "first" brick. + + // Uncomment the following lines if you want to get a visual understanding + // of what this helpline does. BTW this mimics the way you would get the + // perspective right when drawing on paper. + /* + $x0 = $middle; + $y0 = $this->rect->ye; + $len=floor(($this->rect->ye-$this->rect->y)/$vls); + $x1 = $middle+round($len*$ds); + $y1 = $this->rect->ye-$len*$vls; + $aImg->PushColor("red"); + $aImg->Line($x0,$y0,$x1,$y1); + $aImg->PopColor(); + */ + + $y -= $vls; + $k=($this->rect->ye-($this->rect->ye-$vls))/($middle-($middle-$ds)); + $dist = $hls; + while( $y>$this->rect->y ) { + $aImg->Line($this->rect->x,$y,$this->rect->xe,$y); + $adj = $k*$dist/(1+$dist*$k/$apa); + if( $adj < 2 ) $adj=1; + $y = $this->rect->ye - round($adj); + $dist += $hls; + } + } +} + +//===================================================================== +// Class RectPatternCross +// Vert/Hor crosses +//===================================================================== +class RectPatternCross extends RectPattern { + var $vert=null; + var $hor=null; + function RectPatternCross($aColor="black",$aWeight=1) { + parent::RectPattern($aColor,$aWeight); + $this->vert = new RectPatternVert($aColor,$aWeight); + $this->hor = new RectPatternHor($aColor,$aWeight); + } + + function SetOrder($aDepth) { + $this->vert->SetOrder($aDepth); + $this->hor->SetOrder($aDepth); + } + + function SetPos(&$aRect) { + parent::SetPos($aRect); + $this->vert->SetPos($aRect); + $this->hor->SetPos($aRect); + } + + function SetDensity($aDens) { + $this->vert->SetDensity($aDens); + $this->hor->SetDensity($aDens); + } + + function DoPattern(&$aImg) { + $this->vert->DoPattern($aImg); + $this->hor->DoPattern($aImg); + } +} + +//===================================================================== +// Class RectPatternDiagCross +// Vert/Hor crosses +//===================================================================== + +class RectPatternDiagCross extends RectPattern { + var $left=null; + var $right=null; + function RectPatternDiagCross($aColor="black",$aWeight=1) { + parent::RectPattern($aColor,$aWeight); + $this->right = new RectPatternRDiag($aColor,$aWeight); + $this->left = new RectPatternLDiag($aColor,$aWeight); + } + + function SetOrder($aDepth) { + $this->left->SetOrder($aDepth); + $this->right->SetOrder($aDepth); + } + + function SetPos(&$aRect) { + parent::SetPos($aRect); + $this->left->SetPos($aRect); + $this->right->SetPos($aRect); + } + + function SetDensity($aDens) { + $this->left->SetDensity($aDens); + $this->right->SetDensity($aDens); + } + + function DoPattern(&$aImg) { + $this->left->DoPattern($aImg); + $this->right->DoPattern($aImg); + } + +} + +//===================================================================== +// Class RectPatternFactory +// Factory class for rectangular pattern +//===================================================================== +class RectPatternFactory { + function RectPatternFactory() { + // Empty + } + function Create($aPattern,$aColor,$aWeight=1) { + switch($aPattern) { + case BAND_RDIAG: + $obj = new RectPatternRDiag($aColor,$aWeight); + break; + case BAND_LDIAG: + $obj = new RectPatternLDiag($aColor,$aWeight); + break; + case BAND_SOLID: + $obj = new RectPatternSolid($aColor,$aWeight); + break; + case BAND_VLINE: + $obj = new RectPatternVert($aColor,$aWeight); + break; + case BAND_HLINE: + $obj = new RectPatternHor($aColor,$aWeight); + break; + case BAND_3DPLANE: + $obj = new RectPattern3DPlane($aColor,$aWeight); + break; + case BAND_HVCROSS: + $obj = new RectPatternCross($aColor,$aWeight); + break; + case BAND_DIAGCROSS: + $obj = new RectPatternDiagCross($aColor,$aWeight); + break; + default: + JpGraphError::RaiseL(16003,$aPattern); +//(" Unknown pattern specification ($aPattern)"); + } + return $obj; + } +} + + +//===================================================================== +// Class PlotBand +// Factory class which is used by the client. +// It is responsible for factoring the corresponding pattern +// concrete class. +//===================================================================== +class PlotBand { + var $prect=null; + var $depth; + var $dir, $min, $max; + + function PlotBand($aDir,$aPattern,$aMin,$aMax,$aColor="black",$aWeight=1,$aDepth=DEPTH_BACK) { + $f = new RectPatternFactory(); + $this->prect = $f->Create($aPattern,$aColor,$aWeight); + if( is_numeric($aMin) && is_numeric($aMax) && ($aMin > $aMax) ) + JpGraphError::RaiseL(16004); +//('Min value for plotband is larger than specified max value. Please correct.'); + $this->dir = $aDir; + $this->min = $aMin; + $this->max = $aMax; + $this->depth=$aDepth; + } + + // Set position. aRect contains absolute image coordinates + function SetPos(&$aRect) { + assert( $this->prect != null ) ; + $this->prect->SetPos($aRect); + } + + function ShowFrame($aFlag=true) { + $this->prect->ShowFrame($aFlag); + } + + // Set z-order. In front of pplot or in the back + function SetOrder($aDepth) { + $this->depth=$aDepth; + } + + function SetDensity($aDens) { + $this->prect->SetDensity($aDens); + } + + function GetDir() { + return $this->dir; + } + + function GetMin() { + return $this->min; + } + + function GetMax() { + return $this->max; + } + + // Display band + function Stroke(&$aImg,&$aXScale,&$aYScale) { + assert( $this->prect != null ) ; + if( $this->dir == HORIZONTAL ) { + if( $this->min === 'min' ) $this->min = $aYScale->GetMinVal(); + if( $this->max === 'max' ) $this->max = $aYScale->GetMaxVal(); + + // Only draw the bar if it actually appears in the range + if ($this->min < $aYScale->GetMaxVal() && $this->max > $aYScale->GetMinVal()) { + + // Trucate to limit of axis + $this->min = max($this->min, $aYScale->GetMinVal()); + $this->max = min($this->max, $aYScale->GetMaxVal()); + + $x=$aXScale->scale_abs[0]; + $y=$aYScale->Translate($this->max); + $width=$aXScale->scale_abs[1]-$aXScale->scale_abs[0]+1; + $height=abs($y-$aYScale->Translate($this->min))+1; + $this->prect->SetPos(new Rectangle($x,$y,$width,$height)); + $this->prect->Stroke($aImg); + } + } + else { // VERTICAL + if( $this->min === 'min' ) $this->min = $aXScale->GetMinVal(); + if( $this->max === 'max' ) $this->max = $aXScale->GetMaxVal(); + + // Only draw the bar if it actually appears in the range + if ($this->min < $aXScale->GetMaxVal() && $this->max > $aXScale->GetMinVal()) { + + // Trucate to limit of axis + $this->min = max($this->min, $aXScale->GetMinVal()); + $this->max = min($this->max, $aXScale->GetMaxVal()); + + $y=$aYScale->scale_abs[1]; + $x=$aXScale->Translate($this->min); + $height=abs($aYScale->scale_abs[1]-$aYScale->scale_abs[0]); + $width=abs($x-$aXScale->Translate($this->max)); + $this->prect->SetPos(new Rectangle($x,$y,$width,$height)); + $this->prect->Stroke($aImg); + } + } + } +} + + +?> diff --git a/html/includes/jpgraph/src/jpgraph_plotmark.inc.php b/html/includes/jpgraph/src/jpgraph_plotmark.inc.php new file mode 100644 index 0000000000..bf1e151489 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_plotmark.inc.php @@ -0,0 +1,496 @@ +an[$aMark]; + if( is_string($aIdx) ) { + if( !in_array($aIdx,$this->colors) ) { + JpGraphError::RaiseL(23001,$this->name,$aIdx); //('This marker "'.($this->name).'" does not exist in color: '.$aIdx); + } + $idx = $this->index[$aIdx]; + } + elseif( !is_integer($aIdx) || + (is_integer($aIdx) && $aIdx > $this->maxidx ) ) { + JpGraphError::RaiseL(23002,$this->name); +//('Mark color index too large for marker "'.($this->name).'"'); + } + else + $idx = $aIdx ; + return Image::CreateFromString(base64_decode($this->{$n}[$idx][1])); + } + function GetAnchor() { + return array($this->anchor_x,$this->anchor_y); + } +} + + +// Keep a global flag cache to reduce memory usage +$_gFlagCache=array( + 1 => null, + 2 => null, + 3 => null, + 4 => null, +); +// Only supposed to b called as statics +class FlagCache { + function GetFlagImgByName($aSize,$aName) { + global $_gFlagCache; + require_once('jpgraph_flags.php'); + if( $_gFlagCache[$aSize] === null ) { + $_gFlagCache[$aSize] =& new FlagImages($aSize); + } + $f =& $_gFlagCache[$aSize]; + $idx = $f->GetIdxByName($aName,$aFullName); + return $f->GetImgByIdx($idx); + } +} + +//=================================================== +// CLASS PlotMark +// Description: Handles the plot marks in graphs +//=================================================== +class PlotMark { + var $title, $show=true; + var $type,$weight=1; + var $color="black", $width=4, $fill_color="blue"; + var $yvalue,$xvalue='',$csimtarget='',$csimwintarget='',$csimalt='',$csimareas; + var $iFormatCallback=""; + var $iFormatCallback2=""; + var $markimg='',$iScale=1.0; + var $oldfilename='',$iFileName=''; + var $imgdata_balls = null; + var $imgdata_diamonds = null; + var $imgdata_squares = null; + var $imgdata_bevels = null; + var $imgdata_stars = null; + var $imgdata_pushpins = null; + +//-------------- +// CONSTRUCTOR + function PlotMark() { + $this->title = new Text(); + $this->title->Hide(); + $this->csimareas = ''; + $this->type=-1; + } +//--------------- +// PUBLIC METHODS + function SetType($aType,$aFileName='',$aScale=1.0) { + $this->type = $aType; + if( $aType == MARK_IMG && $aFileName=='' ) { + JpGraphError::RaiseL(23003);//('A filename must be specified if you set the mark type to MARK_IMG.'); + } + $this->iFileName = $aFileName; + $this->iScale = $aScale; + } + + function SetCallback($aFunc) { + $this->iFormatCallback = $aFunc; + } + + function SetCallbackYX($aFunc) { + $this->iFormatCallback2 = $aFunc; + } + + function GetType() { + return $this->type; + } + + function SetColor($aColor) { + $this->color=$aColor; + } + + function SetFillColor($aFillColor) { + $this->fill_color = $aFillColor; + } + + function SetWeight($aWeight) { + $this->weight = $aWeight; + } + + // Synonym for SetWidth() + function SetSize($aWidth) { + $this->width=$aWidth; + } + + function SetWidth($aWidth) { + $this->width=$aWidth; + } + + function SetDefaultWidth() { + switch( $this->type ) { + case MARK_CIRCLE: + case MARK_FILLEDCIRCLE: + $this->width=4; + break; + default: + $this->width=7; + } + } + + function GetWidth() { + return $this->width; + } + + function Hide($aHide=true) { + $this->show = !$aHide; + } + + function Show($aShow=true) { + $this->show = $aShow; + } + + function SetCSIMAltVal($aY,$aX='') { + $this->yvalue=$aY; + $this->xvalue=$aX; + } + + function SetCSIMTarget($aTarget,$aWinTarget='') { + $this->csimtarget=$aTarget; + $this->csimwintarget=$aWinTarget; + } + + function SetCSIMAlt($aAlt) { + $this->csimalt=$aAlt; + } + + function GetCSIMAreas(){ + return $this->csimareas; + } + + function AddCSIMPoly($aPts) { + $coords = round($aPts[0]).", ".round($aPts[1]); + $n = count($aPts)/2; + for( $i=1; $i < $n; ++$i){ + $coords .= ", ".round($aPts[2*$i]).", ".round($aPts[2*$i+1]); + } + $this->csimareas=""; + if( !empty($this->csimtarget) ) { + $this->csimareas .= "csimtarget)."\""; + + if( !empty($this->csimwintarget) ) { + $this->csimareas .= " target=\"".$this->csimwintarget."\" "; + } + + if( !empty($this->csimalt) ) { + $tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + } + + function AddCSIMCircle($x,$y,$r) { + $x = round($x); $y=round($y); $r=round($r); + $this->csimareas=""; + if( !empty($this->csimtarget) ) { + $this->csimareas .= "csimtarget)."\""; + + if( !empty($this->csimwintarget) ) { + $this->csimareas .= " target=\"".$this->csimwintarget."\" "; + } + + if( !empty($this->csimalt) ) { + $tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + } + + function Stroke(&$img,$x,$y) { + if( !$this->show ) return; + + if( $this->iFormatCallback != '' || $this->iFormatCallback2 != '' ) { + + if( $this->iFormatCallback != '' ) { + $f = $this->iFormatCallback; + list($width,$color,$fcolor) = call_user_func($f,$this->yvalue); + $filename = $this->iFileName; + $imgscale = $this->iScale; + } + else { + $f = $this->iFormatCallback2; + list($width,$color,$fcolor,$filename,$imgscale) = call_user_func($f,$this->yvalue,$this->xvalue); + if( $filename=="" ) $filename = $this->iFileName; + if( $imgscale=="" ) $imgscale = $this->iScale; + } + + if( $width=="" ) $width = $this->width; + if( $color=="" ) $color = $this->color; + if( $fcolor=="" ) $fcolor = $this->fill_color; + + } + else { + $fcolor = $this->fill_color; + $color = $this->color; + $width = $this->width; + $filename = $this->iFileName; + $imgscale = $this->iScale; + } + + if( $this->type == MARK_IMG || + ($this->type >= MARK_FLAG1 && $this->type <= MARK_FLAG4 ) || + $this->type >= MARK_IMG_PUSHPIN ) { + + // Note: For the builtin images we use the "filename" parameter + // to denote the color + $anchor_x = 0.5; + $anchor_y = 0.5; + switch( $this->type ) { + case MARK_FLAG1: + case MARK_FLAG2: + case MARK_FLAG3: + case MARK_FLAG4: + $this->markimg = FlagCache::GetFlagImgByName($this->type-MARK_FLAG1+1,$filename); + break; + + case MARK_IMG : + // Load an image and use that as a marker + // Small optimization, if we have already read an image don't + // waste time reading it again. + if( $this->markimg == '' || !($this->oldfilename === $filename) ) { + $this->markimg = Graph::LoadBkgImage('',$filename); + $this->oldfilename = $filename ; + } + break; + + case MARK_IMG_PUSHPIN: + case MARK_IMG_SPUSHPIN: + case MARK_IMG_LPUSHPIN: + if( $this->imgdata_pushpins == null ) { + require_once 'imgdata_pushpins.inc.php'; + $this->imgdata_pushpins = new ImgData_PushPins(); + } + $this->markimg = $this->imgdata_pushpins->GetImg($this->type,$filename); + list($anchor_x,$anchor_y) = $this->imgdata_pushpins->GetAnchor(); + break; + + case MARK_IMG_SQUARE: + if( $this->imgdata_squares == null ) { + require_once 'imgdata_squares.inc.php'; + $this->imgdata_squares = new ImgData_Squares(); + } + $this->markimg = $this->imgdata_squares->GetImg($this->type,$filename); + list($anchor_x,$anchor_y) = $this->imgdata_squares->GetAnchor(); + break; + + case MARK_IMG_STAR: + if( $this->imgdata_stars == null ) { + require_once 'imgdata_stars.inc.php'; + $this->imgdata_stars = new ImgData_Stars(); + } + $this->markimg = $this->imgdata_stars->GetImg($this->type,$filename); + list($anchor_x,$anchor_y) = $this->imgdata_stars->GetAnchor(); + break; + + case MARK_IMG_BEVEL: + if( $this->imgdata_bevels == null ) { + require_once 'imgdata_bevels.inc.php'; + $this->imgdata_bevels = new ImgData_Bevels(); + } + $this->markimg = $this->imgdata_bevels->GetImg($this->type,$filename); + list($anchor_x,$anchor_y) = $this->imgdata_bevels->GetAnchor(); + break; + + case MARK_IMG_DIAMOND: + if( $this->imgdata_diamonds == null ) { + require_once 'imgdata_diamonds.inc.php'; + $this->imgdata_diamonds = new ImgData_Diamonds(); + } + $this->markimg = $this->imgdata_diamonds->GetImg($this->type,$filename); + list($anchor_x,$anchor_y) = $this->imgdata_diamonds->GetAnchor(); + break; + + case MARK_IMG_BALL: + case MARK_IMG_SBALL: + case MARK_IMG_MBALL: + case MARK_IMG_LBALL: + if( $this->imgdata_balls == null ) { + require_once 'imgdata_balls.inc.php'; + $this->imgdata_balls = new ImgData_Balls(); + } + $this->markimg = $this->imgdata_balls->GetImg($this->type,$filename); + list($anchor_x,$anchor_y) = $this->imgdata_balls->GetAnchor(); + break; + } + + $w = $img->GetWidth($this->markimg); + $h = $img->GetHeight($this->markimg); + + $dw = round($imgscale * $w ); + $dh = round($imgscale * $h ); + + // Do potential rotation + list($x,$y) = $img->Rotate($x,$y); + + $dx = round($x-$dw*$anchor_x); + $dy = round($y-$dh*$anchor_y); + + $this->width = max($dx,$dy); + + $img->Copy($this->markimg,$dx,$dy,0,0,$dw,$dh,$w,$h); + if( !empty($this->csimtarget) ) { + $this->csimareas = "csimtarget)."\""; + + if( !empty($this->csimwintarget) ) { + $this->csimareas .= " target=\"".$this->csimwintarget."\" "; + } + + if( !empty($this->csimalt) ) { + $tmp=sprintf($this->csimalt,$this->yvalue,$this->xvalue); + $this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" "; + } + $this->csimareas .= " />\n"; + } + + // Stroke title + $this->title->Align("center","top"); + $this->title->Stroke($img,$x,$y+round($dh/2)); + return; + } + + $weight = $this->weight; + $dx=round($width/2,0); + $dy=round($width/2,0); + $pts=0; + + switch( $this->type ) { + case MARK_SQUARE: + $c[]=$x-$dx;$c[]=$y-$dy; + $c[]=$x+$dx;$c[]=$y-$dy; + $c[]=$x+$dx;$c[]=$y+$dy; + $c[]=$x-$dx;$c[]=$y+$dy; + $c[]=$x-$dx;$c[]=$y-$dy; + $pts=5; + break; + case MARK_UTRIANGLE: + ++$dx;++$dy; + $c[]=$x-$dx;$c[]=$y+0.87*$dy; // tan(60)/2*$dx + $c[]=$x;$c[]=$y-0.87*$dy; + $c[]=$x+$dx;$c[]=$y+0.87*$dy; + $c[]=$x-$dx;$c[]=$y+0.87*$dy; // tan(60)/2*$dx + $pts=4; + break; + case MARK_DTRIANGLE: + ++$dx;++$dy; + $c[]=$x;$c[]=$y+0.87*$dy; // tan(60)/2*$dx + $c[]=$x-$dx;$c[]=$y-0.87*$dy; + $c[]=$x+$dx;$c[]=$y-0.87*$dy; + $c[]=$x;$c[]=$y+0.87*$dy; // tan(60)/2*$dx + $pts=4; + break; + case MARK_DIAMOND: + $c[]=$x;$c[]=$y+$dy; + $c[]=$x-$dx;$c[]=$y; + $c[]=$x;$c[]=$y-$dy; + $c[]=$x+$dx;$c[]=$y; + $c[]=$x;$c[]=$y+$dy; + $pts=5; + break; + case MARK_LEFTTRIANGLE: + $c[]=$x;$c[]=$y; + $c[]=$x;$c[]=$y+2*$dy; + $c[]=$x+$dx*2;$c[]=$y; + $c[]=$x;$c[]=$y; + $pts=4; + break; + case MARK_RIGHTTRIANGLE: + $c[]=$x-$dx*2;$c[]=$y; + $c[]=$x;$c[]=$y+2*$dy; + $c[]=$x;$c[]=$y; + $c[]=$x-$dx*2;$c[]=$y; + $pts=4; + break; + case MARK_FLASH: + $dy *= 2; + $c[]=$x+$dx/2; $c[]=$y-$dy; + $c[]=$x-$dx+$dx/2; $c[]=$y+$dy*0.7-$dy; + $c[]=$x+$dx/2; $c[]=$y+$dy*1.3-$dy; + $c[]=$x-$dx+$dx/2; $c[]=$y+2*$dy-$dy; + $img->SetLineWeight($weight); + $img->SetColor($color); + $img->Polygon($c); + $img->SetLineWeight(1); + $this->AddCSIMPoly($c); + break; + } + + if( $pts>0 ) { + $this->AddCSIMPoly($c); + $img->SetLineWeight($weight); + $img->SetColor($fcolor); + $img->FilledPolygon($c); + $img->SetColor($color); + $img->Polygon($c); + $img->SetLineWeight(1); + } + elseif( $this->type==MARK_CIRCLE ) { + $img->SetColor($color); + $img->Circle($x,$y,$width); + $this->AddCSIMCircle($x,$y,$width); + } + elseif( $this->type==MARK_FILLEDCIRCLE ) { + $img->SetColor($fcolor); + $img->FilledCircle($x,$y,$width); + $img->SetColor($color); + $img->Circle($x,$y,$width); + $this->AddCSIMCircle($x,$y,$width); + } + elseif( $this->type==MARK_CROSS ) { + // Oversize by a pixel to match the X + $img->SetColor($color); + $img->SetLineWeight($weight); + $img->Line($x,$y+$dy+1,$x,$y-$dy-1); + $img->Line($x-$dx-1,$y,$x+$dx+1,$y); + $this->AddCSIMCircle($x,$y,$dx); + } + elseif( $this->type==MARK_X ) { + $img->SetColor($color); + $img->SetLineWeight($weight); + $img->Line($x+$dx,$y+$dy,$x-$dx,$y-$dy); + $img->Line($x-$dx,$y+$dy,$x+$dx,$y-$dy); + $this->AddCSIMCircle($x,$y,$dx+$dy); + } + elseif( $this->type==MARK_STAR ) { + $img->SetColor($color); + $img->SetLineWeight($weight); + $img->Line($x+$dx,$y+$dy,$x-$dx,$y-$dy); + $img->Line($x-$dx,$y+$dy,$x+$dx,$y-$dy); + // Oversize by a pixel to match the X + $img->Line($x,$y+$dy+1,$x,$y-$dy-1); + $img->Line($x-$dx-1,$y,$x+$dx+1,$y); + $this->AddCSIMCircle($x,$y,$dx+$dy); + } + + // Stroke title + $this->title->Align("center","center"); + $this->title->Stroke($img,$x,$y); + } +} // Class + + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/jpgraph_polar.php b/html/includes/jpgraph/src/jpgraph_polar.php new file mode 100644 index 0000000000..346ffcb0b5 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_polar.php @@ -0,0 +1,839 @@ +numpoints = $n/2; + $this->coord = $aData; + $this->mark = new PlotMark(); + } + + function SetWeight($aWeight) { + $this->iLineWeight = $aWeight; + } + + function SetColor($aColor){ + $this->iColor = $aColor; + } + + function SetFillColor($aColor){ + $this->iFillColor = $aColor; + } + + function Max() { + $m = $this->coord[1]; + $i=1; + while( $i < $this->numpoints ) { + $m = max($m,$this->coord[2*$i+1]); + ++$i; + } + return $m; + } + // Set href targets for CSIM + function SetCSIMTargets($aTargets,$aAlts=null) { + $this->csimtargets=$aTargets; + $this->csimalts=$aAlts; + } + + // Get all created areas + function GetCSIMareas() { + return $this->csimareas; + } + + function SetLegend($aLegend,$aCSIM="",$aCSIMAlt="") { + $this->legend = $aLegend; + $this->legendcsimtarget = $aCSIM; + $this->legendcsimalt = $aCSIMAlt; + } + + // Private methods + + function Legend(&$aGraph) { + $color = $this->iColor ; + if( $this->legend != "" ) { + if( $this->iFillColor!='' ) { + $color = $this->iFillColor; + $aGraph->legend->Add($this->legend,$color,$this->mark,0, + $this->legendcsimtarget,$this->legendcsimalt); + } + else { + $aGraph->legend->Add($this->legend,$color,$this->mark,$this->line_style, + $this->legendcsimtarget,$this->legendcsimalt); + } + } + } + + function Stroke(&$img,$scale) { + + $i=0; + $p=array(); + $this->csimareas=''; + while($i < $this->numpoints) { + list($x1,$y1) = $scale->PTranslate($this->coord[2*$i],$this->coord[2*$i+1]); + $p[2*$i] = $x1; + $p[2*$i+1] = $y1; + + if( isset($this->csimtargets[$i]) ) { + $this->mark->SetCSIMTarget($this->csimtargets[$i]); + $this->mark->SetCSIMAlt($this->csimalts[$i]); + $this->mark->SetCSIMAltVal($this->coord[2*$i], $this->coord[2*$i+1]); + $this->mark->Stroke($img,$x1,$y1); + $this->csimareas .= $this->mark->GetCSIMAreas(); + } + else + $this->mark->Stroke($img,$x1,$y1); + + ++$i; + } + + if( $this->iFillColor != '' ) { + $img->SetColor($this->iFillColor); + $img->FilledPolygon($p); + } + $img->SetLineWeight($this->iLineWeight); + $img->SetColor($this->iColor); + $img->Polygon($p,$this->iFillColor!=''); + } +} + +//-------------------------------------------------------------------------- +// class PolarAxis +//-------------------------------------------------------------------------- +class PolarAxis extends Axis { + var $angle_step=15,$angle_color='lightgray',$angle_label_color='black'; + var $angle_fontfam=FF_FONT1,$angle_fontstyle=FS_NORMAL,$angle_fontsize=10; + var $angle_fontcolor = 'navy'; + var $gridminor_color='lightgray',$gridmajor_color='lightgray'; + var $show_minor_grid = false, $show_major_grid = true ; + var $show_angle_mark=true, $show_angle_grid=true, $show_angle_label=true; + var $angle_tick_len=3, $angle_tick_len2=3, $angle_tick_color='black'; + var $show_angle_tick=true; + var $radius_tick_color='black'; + + function PolarAxis(&$img,&$aScale) { + parent::Axis($img,$aScale); + } + + function ShowAngleDegreeMark($aFlg=true) { + $this->show_angle_mark = $aFlg; + } + + function SetAngleStep($aStep) { + $this->angle_step=$aStep; + } + + function HideTicks($aFlg=true,$aAngleFlg=true) { + parent::HideTicks($aFlg,$aFlg); + $this->show_angle_tick = !$aAngleFlg; + } + + function ShowAngleLabel($aFlg=true) { + $this->show_angle_label = $aFlg; + } + + function ShowGrid($aMajor=true,$aMinor=false,$aAngle=true) { + $this->show_minor_grid = $aMinor; + $this->show_major_grid = $aMajor; + $this->show_angle_grid = $aAngle ; + } + + function SetAngleFont($aFontFam,$aFontStyle=FS_NORMAL,$aFontSize=10) { + $this->angle_fontfam = $aFontFam; + $this->angle_fontstyle = $aFontStyle; + $this->angle_fontsize = $aFontSize; + } + + function SetColor($aColor,$aRadColor='',$aAngleColor='') { + if( $aAngleColor == '' ) + $aAngleColor=$aColor; + parent::SetColor($aColor,$aRadColor); + $this->angle_fontcolor = $aAngleColor; + } + + function SetGridColor($aMajorColor,$aMinorColor='',$aAngleColor='') { + if( $aMinorColor == '' ) + $aMinorColor = $aMajorColor; + if( $aAngleColor == '' ) + $aAngleColor = $aMajorColor; + + $this->gridminor_color = $aMinorColor; + $this->gridmajor_color = $aMajorColor; + $this->angle_color = $aAngleColor; + } + + function SetTickColors($aRadColor,$aAngleColor='') { + $this->radius_tick_color = $aRadColor; + $this->angle_tick_color = $aAngleColor; + } + + // Private methods + function StrokeGrid($pos) { + $x = round($this->img->left_margin + $this->img->plotwidth/2); + $this->scale->ticks->Stroke($this->img,$this->scale,$pos); + + // Stroke the minor arcs + $pmin = array(); + $p = $this->scale->ticks->ticks_pos; + $n = count($p); + $i = 0; + $this->img->SetColor($this->gridminor_color); + while( $i < $n ) { + $r = $p[$i]-$x+1; + $pmin[]=$r; + if( $this->show_minor_grid ) { + $this->img->Circle($x,$pos,$r); + } + $i++; + } + + $limit = max($this->img->plotwidth,$this->img->plotheight)*1.4 ; + while( $r < $limit ) { + $off = $r; + $i=1; + $r = $off + round($p[$i]-$x+1); + while( $r < $limit && $i < $n ) { + $r = $off+$p[$i]-$x; + $pmin[]=$r; + if( $this->show_minor_grid ) { + $this->img->Circle($x,$pos,$r); + } + $i++; + } + } + + // Stroke the major arcs + if( $this->show_major_grid ) { + // First determine how many minor step on + // every major step. We have recorded the minor radius + // in pmin and use these values. This is done in order + // to avoid rounding errors if we were to recalculate the + // different major radius. + $pmaj = $this->scale->ticks->maj_ticks_pos; + $p = $this->scale->ticks->ticks_pos; + if( $this->scale->name == 'lin' ) { + $step=round(($pmaj[1] - $pmaj[0])/($p[1] - $p[0])); + } + else { + $step=9; + } + $n = round(count($pmin)/$step); + $i = 0; + $this->img->SetColor($this->gridmajor_color); + $limit = max($this->img->plotwidth,$this->img->plotheight)*1.4 ; + $off = $r; + $i=0; + $r = $pmin[$i*$step]; + while( $r < $limit && $i < $n ) { + $r = $pmin[$i*$step]; + $this->img->Circle($x,$pos,$r); + $i++; + } + } + + // Draw angles + if( $this->show_angle_grid ) { + $this->img->SetColor($this->angle_color); + $d = max($this->img->plotheight,$this->img->plotwidth)*1.4 ; + $a = 0; + $p = $this->scale->ticks->ticks_pos; + $start_radius = $p[1]-$x; + while( $a < 360 ) { + if( $a == 90 || $a == 270 ) { + // Make sure there are no rounding problem with + // exactly vertical lines + $this->img->Line($x+$start_radius*cos($a/180*M_PI)+1, + $pos-$start_radius*sin($a/180*M_PI), + $x+$start_radius*cos($a/180*M_PI)+1, + $pos-$d*sin($a/180*M_PI)); + + } + else { + $this->img->Line($x+$start_radius*cos($a/180*M_PI)+1, + $pos-$start_radius*sin($a/180*M_PI), + $x+$d*cos($a/180*M_PI), + $pos-$d*sin($a/180*M_PI)); + } + $a += $this->angle_step; + } + } + } + + function StrokeAngleLabels($pos,$type) { + + if( !$this->show_angle_label ) + return; + + $x0 = round($this->img->left_margin+$this->img->plotwidth/2)+1; + + $d = max($this->img->plotwidth,$this->img->plotheight)*1.42; + $a = $this->angle_step; + $t = new Text(); + $t->SetColor($this->angle_fontcolor); + $t->SetFont($this->angle_fontfam,$this->angle_fontstyle,$this->angle_fontsize); + $xright = $this->img->width - $this->img->right_margin; + $ytop = $this->img->top_margin; + $xleft = $this->img->left_margin; + $ybottom = $this->img->height - $this->img->bottom_margin; + $ha = 'left'; + $va = 'center'; + $w = $this->img->plotwidth/2; + $h = $this->img->plotheight/2; + $xt = $x0; $yt = $pos; + $margin=5; + + $tl = $this->angle_tick_len ; // Outer len + $tl2 = $this->angle_tick_len2 ; // Interior len + + $this->img->SetColor($this->angle_tick_color); + $rot90 = $this->img->a == 90 ; + + if( $type == POLAR_360 ) { + $ca1 = atan($h/$w)/M_PI*180; + $ca2 = 180-$ca1; + $ca3 = $ca1+180; + $ca4 = 360-$ca1; + $end = 360; + while( $a < $end ) { + $ca = cos($a/180*M_PI); + $sa = sin($a/180*M_PI); + $x = $d*$ca; + $y = $d*$sa; + $xt=1000;$yt=1000; + if( $a <= $ca1 || $a >= $ca4 ) { + $yt = $pos - $w * $y/$x; + $xt = $xright + $margin; + if( $rot90 ) { + $ha = 'center'; + $va = 'top'; + } + else { + $ha = 'left'; + $va = 'center'; + } + $x1=$xright-$tl2; $x2=$xright+$tl; + $y1=$y2=$yt; + } + elseif( $a > $ca1 && $a < $ca2 ) { + $xt = $x0 + $h * $x/$y; + $yt = $ytop - $margin; + if( $rot90 ) { + $ha = 'left'; + $va = 'center'; + } + else { + $ha = 'center'; + $va = 'bottom'; + } + $y1=$ytop+$tl2;$y2=$ytop-$tl; + $x1=$x2=$xt; + } + elseif( $a >= $ca2 && $a <= $ca3 ) { + $yt = $pos + $w * $y/$x; + $xt = $xleft - $margin; + if( $rot90 ) { + $ha = 'center'; + $va = 'bottom'; + } + else { + $ha = 'right'; + $va = 'center'; + } + $x1=$xleft+$tl2;$x2=$xleft-$tl; + $y1=$y2=$yt; + } + else { + $xt = $x0 - $h * $x/$y; + $yt = $ybottom + $margin; + if( $rot90 ) { + $ha = 'right'; + $va = 'center'; + } + else { + $ha = 'center'; + $va = 'top'; + } + $y1=$ybottom-$tl2;$y2=$ybottom+$tl; + $x1=$x2=$xt; + } + if( $a != 0 && $a != 180 ) { + $t->Align($ha,$va); + if( $this->show_angle_mark ) + $a .= '°'; + $t->Set($a); + $t->Stroke($this->img,$xt,$yt); + if( $this->show_angle_tick ) + $this->img->Line($x1,$y1,$x2,$y2); + } + $a += $this->angle_step; + } + } + else { + // POLAR_HALF + $ca1 = atan($h/$w*2)/M_PI*180; + $ca2 = 180-$ca1; + $end = 180; + while( $a < $end ) { + $ca = cos($a/180*M_PI); + $sa = sin($a/180*M_PI); + $x = $d*$ca; + $y = $d*$sa; + if( $a <= $ca1 ) { + $yt = $pos - $w * $y/$x; + $xt = $xright + $margin; + if( $rot90 ) { + $ha = 'center'; + $va = 'top'; + } + else { + $ha = 'left'; + $va = 'center'; + } + $x1=$xright-$tl2; $x2=$xright+$tl; + $y1=$y2=$yt; + } + elseif( $a > $ca1 && $a < $ca2 ) { + $xt = $x0 + 2*$h * $x/$y; + $yt = $ytop - $margin; + if( $rot90 ) { + $ha = 'left'; + $va = 'center'; + } + else { + $ha = 'center'; + $va = 'bottom'; + } + $y1=$ytop+$tl2;$y2=$ytop-$tl; + $x1=$x2=$xt; + } + elseif( $a >= $ca2 ) { + $yt = $pos + $w * $y/$x; + $xt = $xleft - $margin; + if( $rot90 ) { + $ha = 'center'; + $va = 'bottom'; + } + else { + $ha = 'right'; + $va = 'center'; + } + $x1=$xleft+$tl2;$x2=$xleft-$tl; + $y1=$y2=$yt; + } + $t->Align($ha,$va); + if( $this->show_angle_mark ) + $a .= '°'; + $t->Set($a); + $t->Stroke($this->img,$xt,$yt); + if( $this->show_angle_tick ) + $this->img->Line($x1,$y1,$x2,$y2); + $a += $this->angle_step; + } + } + } + + function Stroke($pos) { + + $this->img->SetLineWeight($this->weight); + $this->img->SetColor($this->color); + $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); + if( !$this->hide_line ) + $this->img->FilledRectangle($this->img->left_margin,$pos, + $this->img->width-$this->img->right_margin,$pos+$this->weight-1); + $y=$pos+$this->img->GetFontHeight()+$this->title_margin+$this->title->margin; + if( $this->title_adjust=="high" ) + $this->title->Pos($this->img->width-$this->img->right_margin,$y,"right","top"); + elseif( $this->title_adjust=="middle" || $this->title_adjust=="center" ) + $this->title->Pos(($this->img->width-$this->img->left_margin- + $this->img->right_margin)/2+$this->img->left_margin, + $y,"center","top"); + elseif($this->title_adjust=="low") + $this->title->Pos($this->img->left_margin,$y,"left","top"); + else { + JpGraphError::RaiseL(17002,$this->title_adjust); +//('Unknown alignment specified for X-axis title. ('.$this->title_adjust.')'); + } + + + if (!$this->hide_labels) { + $this->StrokeLabels($pos,false); + } + $this->img->SetColor($this->radius_tick_color); + $this->scale->ticks->Stroke($this->img,$this->scale,$pos); + + // + // Mirror the positions for the left side of the scale + // + $mid = 2*($this->img->left_margin+$this->img->plotwidth/2); + $n = count($this->scale->ticks->ticks_pos); + $i=0; + while( $i < $n ) { + $this->scale->ticks->ticks_pos[$i] = + $mid-$this->scale->ticks->ticks_pos[$i] ; + ++$i; + } + + $n = count($this->scale->ticks->maj_ticks_pos); + $i=0; + while( $i < $n ) { + $this->scale->ticks->maj_ticks_pos[$i] = + $mid-$this->scale->ticks->maj_ticks_pos[$i] ; + ++$i; + } + + $n = count($this->scale->ticks->maj_ticklabels_pos); + $i=1; + while( $i < $n ) { + $this->scale->ticks->maj_ticklabels_pos[$i] = + $mid-$this->scale->ticks->maj_ticklabels_pos[$i] ; + ++$i; + } + + // Draw the left side of the scale + $n = count($this->scale->ticks->ticks_pos); + $yu = $pos - $this->scale->ticks->direction*$this->scale->ticks->GetMinTickAbsSize(); + + + // Minor ticks + if( ! $this->scale->ticks->supress_minor_tickmarks ) { + $i=1; + while( $i < $n/2 ) { + $x = round($this->scale->ticks->ticks_pos[$i]) ; + $this->img->Line($x,$pos,$x,$yu); + ++$i; + } + } + + $n = count($this->scale->ticks->maj_ticks_pos); + $yu = $pos - $this->scale->ticks->direction*$this->scale->ticks->GetMajTickAbsSize(); + + + // Major ticks + if( ! $this->scale->ticks->supress_tickmarks ) { + $i=1; + while( $i < $n/2 ) { + $x = round($this->scale->ticks->maj_ticks_pos[$i]) ; + $this->img->Line($x,$pos,$x,$yu); + ++$i; + } + } + if (!$this->hide_labels) { + $this->StrokeLabels($pos,false); + } + $this->title->Stroke($this->img); + } +} + +class PolarScale extends LinearScale { + var $graph; + function PolarScale($aMax=0,&$graph) { + parent::LinearScale(0,$aMax,'x'); + $this->graph = &$graph; + } + + function _Translate($v) { + return parent::Translate($v); + } + + function PTranslate($aAngle,$aRad) { + + $m = $this->scale[1]; + $w = $this->graph->img->plotwidth/2; + $aRad = $aRad/$m*$w; + + $x = cos( $aAngle/180 * M_PI ) * $aRad; + $y = sin( $aAngle/180 * M_PI ) * $aRad; + + $x += $this->_Translate(0); + + if( $this->graph->iType == POLAR_360 ) { + $y = ($this->graph->img->top_margin + $this->graph->img->plotheight/2) - $y; + } + else { + $y = ($this->graph->img->top_margin + $this->graph->img->plotheight) - $y; + } + return array($x,$y); + } +} + +class PolarLogScale extends LogScale { + var $graph; + function PolarLogScale($aMax=1,&$graph) { + parent::LogScale(0,$aMax,'x'); + $this->graph = &$graph; + $this->ticks->SetLabelLogType(LOGLABELS_MAGNITUDE); + + } + + function PTranslate($aAngle,$aRad) { + + if( $aRad == 0 ) + $aRad = 1; + $aRad = log10($aRad); + $m = $this->scale[1]; + $w = $this->graph->img->plotwidth/2; + $aRad = $aRad/$m*$w; + + $x = cos( $aAngle/180 * M_PI ) * $aRad; + $y = sin( $aAngle/180 * M_PI ) * $aRad; + + $x += $w+$this->graph->img->left_margin;//$this->_Translate(0); + if( $this->graph->iType == POLAR_360 ) { + $y = ($this->graph->img->top_margin + $this->graph->img->plotheight/2) - $y; + } + else { + $y = ($this->graph->img->top_margin + $this->graph->img->plotheight) - $y; + } + return array($x,$y); + } +} + +class PolarGraph extends Graph { + var $scale; + var $iType=POLAR_360; + var $axis; + + function PolarGraph($aWidth=300,$aHeight=200,$aCachedName="",$aTimeOut=0,$aInline=true) { + parent::Graph($aWidth,$aHeight,$aCachedName,$aTimeOut,$aInline) ; + $this->SetDensity(TICKD_DENSE); + $this->SetBox(); + $this->SetMarginColor('white'); + } + + function SetDensity($aDense) { + $this->SetTickDensity(TICKD_NORMAL,$aDense); + } + + function Set90AndMargin($lm=0,$rm=0,$tm=0,$bm=0) { + $adj = ($this->img->height - $this->img->width)/2; + $this->SetAngle(90); + $this->img->SetMargin($lm-$adj,$rm-$adj,$tm+$adj,$bm+$adj); + $this->img->SetCenter(floor($this->img->width/2),floor($this->img->height/2)); + $this->axis->SetLabelAlign('right','center'); + //JpGraphError::Raise('Set90AndMargin() is not supported for polar graphs.'); + } + + function SetScale($aScale,$rmax=0) { + if( $aScale == 'lin' ) + $this->scale = new PolarScale($rmax,$this); + elseif( $aScale == 'log' ) { + $this->scale = new PolarLogScale($rmax,$this); + } + else { + JpGraphError::RaiseL(17004);//('Unknown scale type for polar graph. Must be "lin" or "log"'); + } + + $this->axis = new PolarAxis($this->img,$this->scale); + $this->SetMargin(40,40,50,40); + } + + function SetType($aType) { + $this->iType = $aType; + } + + function SetPlotSize($w,$h) { + $this->SetMargin(($this->img->width-$w)/2,($this->img->width-$w)/2, + ($this->img->height-$h)/2,($this->img->height-$h)/2); + } + + // Private methods + function GetPlotsMax() { + $n = count($this->plots); + $m = $this->plots[0]->Max(); + $i=1; + while($i < $n) { + $m = max($this->plots[$i]->Max(),$m); + ++$i; + } + return $m; + } + + function Stroke($aStrokeFileName="") { + + // Start by adjusting the margin so that potential titles will fit. + $this->AdjustMarginsForTitles(); + + // If the filename is the predefined value = '_csim_special_' + // we assume that the call to stroke only needs to do enough + // to correctly generate the CSIM maps. + // We use this variable to skip things we don't strictly need + // to do to generate the image map to improve performance + // a best we can. Therefor you will see a lot of tests !$_csim in the + // code below. + $_csim = ($aStrokeFileName===_CSIM_SPECIALFILE); + + // We need to know if we have stroked the plot in the + // GetCSIMareas. Otherwise the CSIM hasn't been generated + // and in the case of GetCSIM called before stroke to generate + // CSIM without storing an image to disk GetCSIM must call Stroke. + $this->iHasStroked = true; + + //Check if we should autoscale axis + if( !$this->scale->IsSpecified() && count($this->plots)>0 ) { + $max = $this->GetPlotsMax(); + $t1 = $this->img->plotwidth; + $this->img->plotwidth /= 2; + $t2 = $this->img->left_margin; + $this->img->left_margin += $this->img->plotwidth+1; + $this->scale->AutoScale($this->img,0,$max, + $this->img->plotwidth/$this->xtick_factor/2); + $this->img->plotwidth = $t1; + $this->img->left_margin = $t2; + } + else { + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + //$min = 0; + $max = $this->scale->scale[1]; + $t1 = $this->img->plotwidth; + $this->img->plotwidth /= 2; + $t2 = $this->img->left_margin; + $this->img->left_margin += $this->img->plotwidth+1; + $this->scale->AutoScale($this->img,0,$max, + $this->img->plotwidth/$this->xtick_factor/2); + $this->img->plotwidth = $t1; + $this->img->left_margin = $t2; + } + + if( $this->iType == POLAR_180 ) + $pos = $this->img->height - $this->img->bottom_margin; + else + $pos = $this->img->plotheight/2 + $this->img->top_margin; + + + if( !$_csim ) { + $this->StrokePlotArea(); + } + + $this->iDoClipping = true; + + if( $this->iDoClipping ) { + $oldimage = $this->img->CloneCanvasH(); + } + + if( !$_csim ) { + $this->axis->StrokeGrid($pos); + } + + // Stroke all plots for Y1 axis + for($i=0; $i < count($this->plots); ++$i) { + $this->plots[$i]->Stroke($this->img,$this->scale); + } + + + if( $this->iDoClipping ) { + // Clipping only supports graphs at 0 and 90 degrees + if( $this->img->a == 0 ) { + $this->img->CopyCanvasH($oldimage,$this->img->img, + $this->img->left_margin,$this->img->top_margin, + $this->img->left_margin,$this->img->top_margin, + $this->img->plotwidth+1,$this->img->plotheight+1); + } + elseif( $this->img->a == 90 ) { + $adj = round(($this->img->height - $this->img->width)/2); + $this->img->CopyCanvasH($oldimage,$this->img->img, + $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, + $this->img->bottom_margin-$adj,$this->img->left_margin+$adj, + $this->img->plotheight,$this->img->plotwidth); + } + $this->img->Destroy(); + $this->img->SetCanvasH($oldimage); + } + + if( !$_csim ) { + $this->axis->Stroke($pos); + $this->axis->StrokeAngleLabels($pos,$this->iType); + } + + if( !$_csim ) { + $this->StrokePlotBox(); + $this->footer->Stroke($this->img); + + // The titles and legends never gets rotated so make sure + // that the angle is 0 before stroking them + $aa = $this->img->SetAngle(0); + $this->StrokeTitles(); + } + + for($i=0; $i < count($this->plots) ; ++$i ) { + $this->plots[$i]->Legend($this); + } + + $this->legend->Stroke($this->img); + + if( !$_csim ) { + + $this->StrokeTexts(); + $this->img->SetAngle($aa); + + // Draw an outline around the image map + if(_JPG_DEBUG) + $this->DisplayClientSideaImageMapAreas(); + + // If the filename is given as the special "__handle" + // then the image handler is returned and the image is NOT + // streamed back + if( $aStrokeFileName == _IMG_HANDLER ) { + return $this->img->img; + } + else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline, + $aStrokeFileName); + } + } + } +} + + + +?> diff --git a/html/includes/jpgraph/src/jpgraph_radar.php b/html/includes/jpgraph/src/jpgraph_radar.php new file mode 100644 index 0000000000..9be10f47aa --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_radar.php @@ -0,0 +1,667 @@ +GetMinVal(); + $limit = $aScale->GetMaxVal(); + $nextMajor = 10*$start; + $step = $nextMajor / 10.0; + $count=1; + + $ticklen_maj=5; + $dx_maj=round(sin($aAxisAngle)*$ticklen_maj); + $dy_maj=round(cos($aAxisAngle)*$ticklen_maj); + $ticklen_min=3; + $dx_min=round(sin($aAxisAngle)*$ticklen_min); + $dy_min=round(cos($aAxisAngle)*$ticklen_min); + + $aMajPos=array(); + $aMajLabel=array(); + + if( $this->supress_first ) + $aMajLabel[]=""; + else + $aMajLabel[]=$start; + $yr=$aScale->RelTranslate($start); + $xt=round($yr*cos($aAxisAngle))+$aScale->scale_abs[0]; + $yt=$aPos-round($yr*sin($aAxisAngle)); + $aMajPos[]=$xt+2*$dx_maj; + $aMajPos[]=$yt-$aImg->GetFontheight()/2; + $grid[]=$xt; + $grid[]=$yt; + + $aImg->SetLineWeight($this->weight); + + for($y=$start; $y<=$limit; $y+=$step,++$count ) { + $yr=$aScale->RelTranslate($y); + $xt=round($yr*cos($aAxisAngle))+$aScale->scale_abs[0]; + $yt=$aPos-round($yr*sin($aAxisAngle)); + if( $count % 10 == 0 ) { + $grid[]=$xt; + $grid[]=$yt; + $aMajPos[]=$xt+2*$dx_maj; + $aMajPos[]=$yt-$aImg->GetFontheight()/2; + if( !$this->supress_tickmarks ) { + if( $this->majcolor!="" ) $aImg->PushColor($this->majcolor); + $aImg->Line($xt+$dx_maj,$yt+$dy_maj,$xt-$dx_maj,$yt-$dy_maj); + if( $this->majcolor!="" ) $aImg->PopColor(); + } + if( $this->label_formfunc != "" ) { + $f=$this->label_formfunc; + $l = call_user_func($f,$nextMajor); + } + else + $l = $nextMajor; + $aMajLabel[]=$l; + $nextMajor *= 10; + $step *= 10; + $count=1; + } + else + if( !$this->supress_minor_tickmarks ) { + if( $this->mincolor!="" ) $aImg->PushColor($this->mincolor); + $aImg->Line($xt+$dx_min,$yt+$dy_min,$xt-$dx_min,$yt-$dy_min); + if( $this->mincolor!="" ) $aImg->PopColor(); + } + } + } +} + +class RadarLinearTicks extends LinearTicks { +//--------------- +// CONSTRUCTOR + function RadarLinearTicks() { + // Empty + } + +//--------------- +// PUBLIC METHODS + + // TODO: Add argument grid + function Stroke(&$aImg,&$grid,$aPos,$aAxisAngle,&$aScale,&$aMajPos,&$aMajLabel) { + // Prepare to draw linear ticks + $maj_step_abs = abs($aScale->scale_factor*$this->major_step); + $min_step_abs = abs($aScale->scale_factor*$this->minor_step); + $nbrmaj = floor(($aScale->world_abs_size)/$maj_step_abs); + $nbrmin = floor(($aScale->world_abs_size)/$min_step_abs); + $skip = round($nbrmin/$nbrmaj); // Don't draw minor ontop of major + + // Draw major ticks + $ticklen2=$this->major_abs_size; + $dx=round(sin($aAxisAngle)*$ticklen2); + $dy=round(cos($aAxisAngle)*$ticklen2); + $label=$aScale->scale[0]+$this->major_step; + + $aImg->SetLineWeight($this->weight); + + for($i=1; $i<=$nbrmaj; ++$i) { + $xt=round($i*$maj_step_abs*cos($aAxisAngle))+$aScale->scale_abs[0]; + $yt=$aPos-round($i*$maj_step_abs*sin($aAxisAngle)); + + if( $this->label_formfunc != "" ) { + $f=$this->label_formfunc; + $l = call_user_func($f,$label); + } + else + $l = $label; + + $aMajLabel[]=$l; + $label += $this->major_step; + $grid[]=$xt; + $grid[]=$yt; + $aMajPos[($i-1)*2]=$xt+2*$dx; + $aMajPos[($i-1)*2+1]=$yt-$aImg->GetFontheight()/2; + if( !$this->supress_tickmarks ) { + if( $this->majcolor!="" ) $aImg->PushColor($this->majcolor); + $aImg->Line($xt+$dx,$yt+$dy,$xt-$dx,$yt-$dy); + if( $this->majcolor!="" ) $aImg->PopColor(); + } + } + + // Draw minor ticks + $ticklen2=$this->minor_abs_size; + $dx=round(sin($aAxisAngle)*$ticklen2); + $dy=round(cos($aAxisAngle)*$ticklen2); + if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) { + if( $this->mincolor!="" ) $aImg->PushColor($this->mincolor); + for($i=1; $i<=$nbrmin; ++$i) { + if( ($i % $skip) == 0 ) continue; + $xt=round($i*$min_step_abs*cos($aAxisAngle))+$aScale->scale_abs[0]; + $yt=$aPos-round($i*$min_step_abs*sin($aAxisAngle)); + $aImg->Line($xt+$dx,$yt+$dy,$xt-$dx,$yt-$dy); + } + if( $this->mincolor!="" ) $aImg->PopColor(); + } + } +} + + + +//=================================================== +// CLASS RadarAxis +// Description: Implements axis for the radar graph +//=================================================== +class RadarAxis extends Axis { + var $title_color="navy"; + var $title=null; +//--------------- +// CONSTRUCTOR + function RadarAxis(&$img,&$aScale,$color=array(0,0,0)) { + parent::Axis($img,$aScale,$color); + $this->len=$img->plotheight; + $this->title = new Text(); + $this->title->SetFont(FF_FONT1,FS_BOLD); + $this->color = array(0,0,0); + } +//--------------- +// PUBLIC METHODS + function SetTickLabels($l) { + $this->ticks_label = $l; + } + + + // Stroke the axis + // $pos = Vertical position of axis + // $aAxisAngle = Axis angle + // $grid = Returns an array with positions used to draw the grid + // $lf = Label flag, TRUE if the axis should have labels + function Stroke($pos,$aAxisAngle,&$grid,$title,$lf) { + $this->img->SetColor($this->color); + + // Determine end points for the axis + $x=round($this->scale->world_abs_size*cos($aAxisAngle)+$this->scale->scale_abs[0]); + $y=round($pos-$this->scale->world_abs_size*sin($aAxisAngle)); + + // Draw axis + $this->img->SetColor($this->color); + $this->img->SetLineWeight($this->weight); + if( !$this->hide ) + $this->img->Line($this->scale->scale_abs[0],$pos,$x,$y); + + $this->scale->ticks->Stroke($this->img,$grid,$pos,$aAxisAngle,$this->scale,$majpos,$majlabel); + + // Draw labels + if( $lf && !$this->hide ) { + $this->img->SetFont($this->font_family,$this->font_style,$this->font_size); + $this->img->SetTextAlign("left","top"); + $this->img->SetColor($this->label_color); + + // majpos contains (x,y) coordinates for labels + if( ! $this->hide_labels ) { + $n = floor(count($majpos)/2); + for($i=0; $i < $n; ++$i) { + if( $this->ticks_label != null && isset($this->ticks_label[$i]) ) + $this->img->StrokeText($majpos[$i*2],$majpos[$i*2+1],$this->ticks_label[$i]); + else + $this->img->StrokeText($majpos[$i*2],$majpos[$i*2+1],$majlabel[$i]); + } + } + } + $this->_StrokeAxisTitle($pos,$aAxisAngle,$title); + } +//--------------- +// PRIVATE METHODS + + function _StrokeAxisTitle($pos,$aAxisAngle,$title) { + $this->title->Set($title); + $marg=6+$this->title->margin; + $xt=round(($this->scale->world_abs_size+$marg)*cos($aAxisAngle)+$this->scale->scale_abs[0]); + $yt=round($pos-($this->scale->world_abs_size+$marg)*sin($aAxisAngle)); + + // Position the axis title. + // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text + // that intersects with the extension of the corresponding axis. The code looks a little + // bit messy but this is really the only way of having a reasonable position of the + // axis titles. + if( $this->title->iWordwrap > 0 ) { + $title = wordwrap($title,$this->title->iWordwrap,"\n"); + } + + $h=$this->img->GetTextHeight($title)*1.2; + $w=$this->img->GetTextWidth($title)*1.2; + while( $aAxisAngle > 2*M_PI ) $aAxisAngle -= 2*M_PI; + + + // Around 3 a'clock + if( $aAxisAngle>=7*M_PI/4 || $aAxisAngle <= M_PI/4 ) $dx=-0.15; // Small trimming to make the dist to the axis more even + // Around 12 a'clock + if( $aAxisAngle>=M_PI/4 && $aAxisAngle <= 3*M_PI/4 ) $dx=($aAxisAngle-M_PI/4)*2/M_PI; + // Around 9 a'clock + if( $aAxisAngle>=3*M_PI/4 && $aAxisAngle <= 5*M_PI/4 ) $dx=1; + // Around 6 a'clock + if( $aAxisAngle>=5*M_PI/4 && $aAxisAngle <= 7*M_PI/4 ) $dx=(1-($aAxisAngle-M_PI*5/4)*2/M_PI); + + + if( $aAxisAngle>=7*M_PI/4 ) $dy=(($aAxisAngle-M_PI)-3*M_PI/4)*2/M_PI; + if( $aAxisAngle<=M_PI/12 ) $dy=(0.5-$aAxisAngle*2/M_PI); + if( $aAxisAngle<=M_PI/4 && $aAxisAngle > M_PI/12) $dy=(1-$aAxisAngle*2/M_PI); + if( $aAxisAngle>=M_PI/4 && $aAxisAngle <= 3*M_PI/4 ) $dy=1; + if( $aAxisAngle>=3*M_PI/4 && $aAxisAngle <= 5*M_PI/4 ) $dy=(1-($aAxisAngle-3*M_PI/4)*2/M_PI); + if( $aAxisAngle>=5*M_PI/4 && $aAxisAngle <= 7*M_PI/4 ) $dy=0; + + if( !$this->hide ) { + $this->title->Stroke($this->img,$xt-$dx*$w,$yt-$dy*$h,$title); + } + } + + +} // Class + + +//=================================================== +// CLASS RadarGrid +// Description: Draws grid for the radar graph +//=================================================== +class RadarGrid extends Grid { +//------------ +// CONSTRUCTOR + function RadarGrid() { + } + +//---------------- +// PRIVATE METHODS + function Stroke(&$img,&$grid) { + if( !$this->show ) return; + $nbrticks = count($grid[0])/2; + $nbrpnts = count($grid); + $img->SetColor($this->grid_color); + $img->SetLineWeight($this->weight); + for($i=0; $i<$nbrticks; ++$i) { + for($j=0; $j<$nbrpnts; ++$j) { + $pnts[$j*2]=$grid[$j][$i*2]; + $pnts[$j*2+1]=$grid[$j][$i*2+1]; + } + for($k=0; $k<$nbrpnts; ++$k ){ + $l=($k+1)%$nbrpnts; + if( $this->type == "solid" ) + $img->Line($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1]); + elseif( $this->type == "dotted" ) + $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],1,6); + elseif( $this->type == "dashed" ) + $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],2,4); + elseif( $this->type == "longdashed" ) + $img->DashedLine($pnts[$k*2],$pnts[$k*2+1],$pnts[$l*2],$pnts[$l*2+1],8,6); + } + $pnts=array(); + } + } +} // Class + + +//=================================================== +// CLASS RadarPlot +// Description: Plot a radarplot +//=================================================== +class RadarPlot { + var $data=array(); + var $fill=false, $fill_color=array(200,170,180); + var $color=array(0,0,0); + var $legend=""; + var $weight=1; + var $linestyle='solid'; + var $mark=null; +//--------------- +// CONSTRUCTOR + function RadarPlot($data) { + $this->data = $data; + $this->mark = new PlotMark(); + } + +//--------------- +// PUBLIC METHODS + function Min() { + return Min($this->data); + } + + function Max() { + return Max($this->data); + } + + function SetLegend($legend) { + $this->legend=$legend; + } + + function SetLineStyle($aStyle) { + $this->linestyle=$aStyle; + } + + function SetLineWeight($w) { + $this->weight=$w; + } + + function SetFillColor($aColor) { + $this->fill_color = $aColor; + $this->fill = true; + } + + function SetFill($f=true) { + $this->fill = $f; + } + + function SetColor($aColor,$aFillColor=false) { + $this->color = $aColor; + if( $aFillColor ) { + $this->SetFillColor($aFillColor); + $this->fill = true; + } + } + + function GetCSIMareas() { + JpGraphError::RaiseL(18001); +//("Client side image maps not supported for RadarPlots."); + } + + function Stroke(&$img, $pos, &$scale, $startangle) { + $nbrpnts = count($this->data); + $astep=2*M_PI/$nbrpnts; + $a=$startangle; + + // Rotate each point to the correct axis-angle + // TODO: Update for LogScale + for($i=0; $i<$nbrpnts; ++$i) { + //$c=$this->data[$i]; + $cs=$scale->RelTranslate($this->data[$i]); + $x=round($cs*cos($a)+$scale->scale_abs[0]); + $y=round($pos-$cs*sin($a)); + /* + $c=log10($c); + $x=round(($c-$scale->scale[0])*$scale->scale_factor*cos($a)+$scale->scale_abs[0]); + $y=round($pos-($c-$scale->scale[0])*$scale->scale_factor*sin($a)); + */ + $pnts[$i*2]=$x; + $pnts[$i*2+1]=$y; + $a += $astep; + } + if( $this->fill ) { + $img->SetColor($this->fill_color); + $img->FilledPolygon($pnts); + } + $img->SetLineWeight($this->weight); + $img->SetColor($this->color); + $img->SetLineStyle($this->linestyle); + $pnts[]=$pnts[0]; + $pnts[]=$pnts[1]; + $img->Polygon($pnts); + $img->SetLineStyle('solid'); // Reset line style to default + // Add plotmarks on top + if( $this->mark->show ) { + for($i=0; $i < $nbrpnts; ++$i) { + $this->mark->Stroke($img,$pnts[$i*2],$pnts[$i*2+1]); + } + } + + } + +//--------------- +// PRIVATE METHODS + function GetCount() { + return count($this->data); + } + + function Legend(&$graph) { + if( $this->legend=="" ) return; + if( $this->fill ) + $graph->legend->Add($this->legend,$this->fill_color,$this->mark); + else + $graph->legend->Add($this->legend,$this->color,$this->mark); + } + +} // Class + +//=================================================== +// CLASS RadarGraph +// Description: Main container for a radar graph +//=================================================== +class RadarGraph extends Graph { + var $posx; + var $posy; + var $len; + var $plots=null, $axis_title=null; + var $grid,$axis=null; +//--------------- +// CONSTRUCTOR + function RadarGraph($width=300,$height=200,$cachedName="",$timeout=0,$inline=1) { + $this->Graph($width,$height,$cachedName,$timeout,$inline); + $this->posx=$width/2; + $this->posy=$height/2; + $this->len=min($width,$height)*0.35; + $this->SetColor(array(255,255,255)); + $this->SetTickDensity(TICKD_NORMAL); + $this->SetScale("lin"); + $this->SetGridDepth(DEPTH_FRONT); + + } + +//--------------- +// PUBLIC METHODS + function SupressTickMarks($f=true) { + if( ERR_DEPRECATED ) + JpGraphError::RaiseL(18002); +//('RadarGraph::SupressTickMarks() is deprecated. Use HideTickMarks() instead.'); + $this->axis->scale->ticks->SupressTickMarks($f); + } + + function HideTickMarks($aFlag=true) { + $this->axis->scale->ticks->SupressTickMarks($aFlag); + } + + function ShowMinorTickmarks($aFlag=true) { + $this->yscale->ticks->SupressMinorTickMarks(!$aFlag); + } + + function SetScale($axtype,$ymin=1,$ymax=1) { + if( $axtype != "lin" && $axtype != "log" ) { + JpGraphError::RaiseL(18003,$axtype); +//("Illegal scale for radarplot ($axtype). Must be \"lin\" or \"log\""); + } + if( $axtype=="lin" ) { + $this->yscale = & new LinearScale($ymin,$ymax); + $this->yscale->ticks = & new RadarLinearTicks(); + $this->yscale->ticks->SupressMinorTickMarks(); + } + elseif( $axtype=="log" ) { + $this->yscale = & new LogScale($ymin,$ymax); + $this->yscale->ticks = & new RadarLogTicks(); + } + + $this->axis = & new RadarAxis($this->img,$this->yscale); + $this->grid = & new RadarGrid(); + } + + function SetSize($aSize) { + if( $aSize < 0.1 || $aSize>1 ) + JpGraphError::RaiseL(18004,$aSize); +//("Radar Plot size must be between 0.1 and 1. (Your value=$s)"); + $this->len=min($this->img->width,$this->img->height)*$aSize/2; + } + + function SetPlotSize($aSize) { + $this->SetSize($aSize); + } + + function SetTickDensity($densy=TICKD_NORMAL) { + $this->ytick_factor=25; + switch( $densy ) { + case TICKD_DENSE: + $this->ytick_factor=12; + break; + case TICKD_NORMAL: + $this->ytick_factor=25; + break; + case TICKD_SPARSE: + $this->ytick_factor=40; + break; + case TICKD_VERYSPARSE: + $this->ytick_factor=70; + break; + default: + JpGraphError::RaiseL(18005,$densy); +//("RadarPlot Unsupported Tick density: $densy"); + } + } + + function SetPos($px,$py=0.5) { + $this->SetCenter($px,$py); + } + + function SetCenter($px,$py=0.5) { + assert($px > 0 && $py > 0 ); + $this->posx=$this->img->width*$px; + $this->posy=$this->img->height*$py; + } + + function SetColor($c) { + $this->SetMarginColor($c); + } + + function SetTitles($title) { + $this->axis_title = $title; + } + + function Add(&$splot) { + $this->plots[]=$splot; + } + + function GetPlotsYMinMax() { + $min=$this->plots[0]->Min(); + $max=$this->plots[0]->Max(); + foreach( $this->plots as $p ) { + $max=max($max,$p->Max()); + $min=min($min,$p->Min()); + } + if( $min < 0 ) + JpGraphError::RaiseL(18006,$min); +//("Minimum data $min (Radar plots should only be used when all data points > 0)"); + return array($min,$max); + } + + // Stroke the Radar graph + function Stroke($aStrokeFileName="") { + $n = count($this->plots); + // Set Y-scale + if( !$this->yscale->IsSpecified() && count($this->plots)>0 ) { + list($min,$max) = $this->GetPlotsYMinMax(); + $this->yscale->AutoScale($this->img,0,$max,$this->len/$this->ytick_factor); + } + elseif( $this->yscale->IsSpecified() && + ( $this->yscale->auto_ticks || !$this->yscale->ticks->IsSpecified()) ) { + // The tick calculation will use the user suplied min/max values to determine + // the ticks. If auto_ticks is false the exact user specifed min and max + // values will be used for the scale. + // If auto_ticks is true then the scale might be slightly adjusted + // so that the min and max values falls on an even major step. + $min = $this->yscale->scale[0]; + $max = $this->yscale->scale[1]; + $this->yscale->AutoScale($this->img,$min,$max, + $this->len/$this->ytick_factor, + $this->yscale->auto_ticks); + } + + // Set start position end length of scale (in absolute pixels) + $this->yscale->SetConstants($this->posx,$this->len); + + // We need as many axis as there are data points + $nbrpnts=$this->plots[0]->GetCount(); + + // If we have no titles just number the axis 1,2,3,... + if( $this->axis_title==null ) { + for($i=0; $i < $nbrpnts; ++$i ) + $this->axis_title[$i] = $i+1; + } + elseif(count($this->axis_title)<$nbrpnts) + JpGraphError::RaiseL(18007); +//("Number of titles does not match number of points in plot."); + for($i=0; $i < $n; ++$i ) + if( $nbrpnts != $this->plots[$i]->GetCount() ) + JpGraphError::RaiseL(18008); +//("Each radar plot must have the same number of data points."); + + if( $this->background_image != "" ) { + $this->StrokeFrameBackground(); + } + else { + $this->StrokeFrame(); + } + $astep=2*M_PI/$nbrpnts; + + // Prepare legends + for($i=0; $i < $n; ++$i) + $this->plots[$i]->Legend($this); + $this->legend->Stroke($this->img); + $this->footer->Stroke($this->img); + + if( $this->grid_depth == DEPTH_BACK ) { + // Draw axis and grid + for( $i=0,$a=M_PI/2; $i < $nbrpnts; ++$i, $a += $astep ) { + $this->axis->Stroke($this->posy,$a,$grid[$i],$this->axis_title[$i],$i==0); + } + } + + // Plot points + $a=M_PI/2; + for($i=0; $i < $n; ++$i ) + $this->plots[$i]->Stroke($this->img, $this->posy, $this->yscale, $a); + + if( $this->grid_depth != DEPTH_BACK ) { + // Draw axis and grid + for( $i=0,$a=M_PI/2; $i < $nbrpnts; ++$i, $a += $astep ) { + $this->axis->Stroke($this->posy,$a,$grid[$i],$this->axis_title[$i],$i==0); + } + } + $this->grid->Stroke($this->img,$grid); + $this->StrokeTitles(); + + // Stroke texts + if( $this->texts != null ) { + foreach( $this->texts as $t) + $t->Stroke($this->img); + } + + // Should we do any final image transformation + if( $this->iImgTrans ) { + if( !class_exists('ImgTrans') ) { + require_once('jpgraph_imgtrans.php'); + } + + $tform = new ImgTrans($this->img->img); + $this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist, + $this->iImgTransDirection,$this->iImgTransHighQ, + $this->iImgTransMinSize,$this->iImgTransFillColor, + $this->iImgTransBorder); + } + + // If the filename is given as the special "__handle" + // then the image handler is returned and the image is NOT + // streamed back + if( $aStrokeFileName == _IMG_HANDLER ) { + return $this->img->img; + } + else { + // Finally stream the generated picture + $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline, + $aStrokeFileName); + } + } +} // Class + +/* EOF */ +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/jpgraph_regstat.php b/html/includes/jpgraph/src/jpgraph_regstat.php new file mode 100644 index 0000000000..8a46e19ced --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_regstat.php @@ -0,0 +1,202 @@ +y2 = array(); + $this->xdata = $xdata; + $this->ydata = $ydata; + + $n = count($ydata); + $this->n = $n; + if( $this->n !== count($xdata) ) { + JpGraphError::RaiseL(19001); +//('Spline: Number of X and Y coordinates must be the same'); + } + + // Natural spline 2:derivate == 0 at endpoints + $this->y2[0] = 0.0; + $this->y2[$n-1] = 0.0; + $delta[0] = 0.0; + + // Calculate 2:nd derivate + for($i=1; $i < $n-1; ++$i) { + $d = ($xdata[$i+1]-$xdata[$i-1]); + if( $d == 0 ) { + JpGraphError::RaiseL(19002); +//('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.'); + } + $s = ($xdata[$i]-$xdata[$i-1])/$d; + $p = $s*$this->y2[$i-1]+2.0; + $this->y2[$i] = ($s-1.0)/$p; + $delta[$i] = ($ydata[$i+1]-$ydata[$i])/($xdata[$i+1]-$xdata[$i]) - + ($ydata[$i]-$ydata[$i-1])/($xdata[$i]-$xdata[$i-1]); + $delta[$i] = (6.0*$delta[$i]/($xdata[$i+1]-$xdata[$i-1])-$s*$delta[$i-1])/$p; + } + + // Backward substitution + for( $j=$n-2; $j >= 0; --$j ) { + $this->y2[$j] = $this->y2[$j]*$this->y2[$j+1] + $delta[$j]; + } + } + + // Return the two new data vectors + function Get($num=50) { + $n = $this->n ; + $step = ($this->xdata[$n-1]-$this->xdata[0]) / ($num-1); + $xnew=array(); + $ynew=array(); + $xnew[0] = $this->xdata[0]; + $ynew[0] = $this->ydata[0]; + for( $j=1; $j < $num; ++$j ) { + $xnew[$j] = $xnew[0]+$j*$step; + $ynew[$j] = $this->Interpolate($xnew[$j]); + } + return array($xnew,$ynew); + } + + // Return a single interpolated Y-value from an x value + function Interpolate($xpoint) { + + $max = $this->n-1; + $min = 0; + + // Binary search to find interval + while( $max-$min > 1 ) { + $k = ($max+$min) / 2; + if( $this->xdata[$k] > $xpoint ) + $max=$k; + else + $min=$k; + } + + // Each interval is interpolated by a 3:degree polynom function + $h = $this->xdata[$max]-$this->xdata[$min]; + + if( $h == 0 ) { + JpGraphError::RaiseL(19002); +//('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.'); + } + + + $a = ($this->xdata[$max]-$xpoint)/$h; + $b = ($xpoint-$this->xdata[$min])/$h; + return $a*$this->ydata[$min]+$b*$this->ydata[$max]+ + (($a*$a*$a-$a)*$this->y2[$min]+($b*$b*$b-$b)*$this->y2[$max])*($h*$h)/6.0; + } +} + +//------------------------------------------------------------------------ +// CLASS Bezier +// Create a new data array from a number of control points +//------------------------------------------------------------------------ +class Bezier { +/** + * @author Thomas Despoix, openXtrem company + * @license released under QPL + * @abstract Bezier interoplated point generation, + * computed from control points data sets, based on Paul Bourke algorithm : + * http://astronomy.swin.edu.au/~pbourke/curves/bezier/ + */ + var $datax = array(); + var $datay = array(); + var $n=0; + + function Bezier($datax, $datay, $attraction_factor = 1) { + // Adding control point multiple time will raise their attraction power over the curve + $this->n = count($datax); + if( $this->n !== count($datay) ) { + JpGraphError::RaiseL(19003); +//('Bezier: Number of X and Y coordinates must be the same'); + } + $idx=0; + foreach($datax as $datumx) { + for ($i = 0; $i < $attraction_factor; $i++) { + $this->datax[$idx++] = $datumx; + } + } + $idx=0; + foreach($datay as $datumy) { + for ($i = 0; $i < $attraction_factor; $i++) { + $this->datay[$idx++] = $datumy; + } + } + $this->n *= $attraction_factor; + } + + function Get($steps) { + $datax = array(); + $datay = array(); + for ($i = 0; $i < $steps; $i++) { + list($datumx, $datumy) = $this->GetPoint((double) $i / (double) $steps); + $datax[] = $datumx; + $datay[] = $datumy; + } + + $datax[] = end($this->datax); + $datay[] = end($this->datay); + + return array($datax, $datay); + } + + function GetPoint($mu) { + $n = $this->n - 1; + $k = 0; + $kn = 0; + $nn = 0; + $nkn = 0; + $blend = 0.0; + $newx = 0.0; + $newy = 0.0; + + $muk = 1.0; + $munk = (double) pow(1-$mu,(double) $n); + + for ($k = 0; $k <= $n; $k++) { + $nn = $n; + $kn = $k; + $nkn = $n - $k; + $blend = $muk * $munk; + $muk *= $mu; + $munk /= (1-$mu); + while ($nn >= 1) { + $blend *= $nn; + $nn--; + if ($kn > 1) { + $blend /= (double) $kn; + $kn--; + } + if ($nkn > 1) { + $blend /= (double) $nkn; + $nkn--; + } + } + $newx += $this->datax[$k] * $blend; + $newy += $this->datay[$k] * $blend; + } + + return array($newx, $newy); + } +} + +// EOF +?> diff --git a/html/includes/jpgraph/src/jpgraph_scatter.php b/html/includes/jpgraph/src/jpgraph_scatter.php new file mode 100644 index 0000000000..9ad37472a9 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_scatter.php @@ -0,0 +1,228 @@ +iSize = $aSize; + $this->iArrowSize = $aArrowSize; + } + + function SetColor($aColor) { + $this->iColor = $aColor; + } + + function Stroke(&$aImg,$x,$y,$a) { + // First rotate the center coordinates + list($x,$y) = $aImg->Rotate($x,$y); + + $old_origin = $aImg->SetCenter($x,$y); + $old_a = $aImg->a; + $aImg->SetAngle(-$a+$old_a); + + $dx = round($this->iSize/2); + $c = array($x-$dx,$y,$x+$dx,$y); + $x += $dx; + + list($dx,$dy) = $this->isizespec[$this->iArrowSize]; + $ca = array($x,$y,$x-$dx,$y-$dy,$x-$dx,$y+$dy,$x,$y); + + $aImg->SetColor($this->iColor); + $aImg->Polygon($c); + $aImg->FilledPolygon($ca); + + $aImg->SetCenter($old_origin[0],$old_origin[1]); + $aImg->SetAngle($old_a); + } +} + +//=================================================== +// CLASS FieldPlot +// Description: Render a field plot +//=================================================== +class FieldPlot extends Plot { + var $iAngles; + var $iCallback=''; + function FieldPlot($datay,$datax,$angles) { + if( (count($datax) != count($datay)) ) + JpGraphError::RaiseL(20001);//("Fieldplots must have equal number of X and Y points."); + if( (count($datax) != count($angles)) ) + JpGraphError::RaiseL(20002);//("Fieldplots must have an angle specified for each X and Y points."); + + $this->iAngles = $angles; + + $this->Plot($datay,$datax); + $this->value->SetAlign('center','center'); + $this->value->SetMargin(15); + + $this->arrow = new FieldArrow(); + } + + function SetCallback($aFunc) { + $this->iCallback = $aFunc; + } + + function Stroke(&$img,&$xscale,&$yscale) { + + // Remeber base color and size + $bc = $this->arrow->iColor; + $bs = $this->arrow->iSize; + $bas = $this->arrow->iArrowSize; + + for( $i=0; $i<$this->numpoints; ++$i ) { + // Skip null values + if( $this->coords[0][$i]==="" ) + continue; + + $f = $this->iCallback; + if( $f != "" ) { + list($cc,$cs,$cas) = call_user_func($f,$this->coords[1][$i],$this->coords[0][$i],$this->iAngles[$i]); + // Fall back on global data if the callback isn't set + if( $cc == "" ) $cc = $bc; + if( $cs == "" ) $cs = $bs; + if( $cas == "" ) $cas = $bas; + $this->arrow->SetColor($cc); + $this->arrow->SetSize($cs,$cas); + } + + $xt = $xscale->Translate($this->coords[1][$i]); + $yt = $yscale->Translate($this->coords[0][$i]); + + $this->arrow->Stroke($img,$xt,$yt,$this->iAngles[$i]); + $this->value->Stroke($img,$this->coords[0][$i],$xt,$yt); + } + } + + // Framework function + function Legend(&$aGraph) { + if( $this->legend != "" ) { + $aGraph->legend->Add($this->legend,$this->mark->fill_color,$this->mark,0, + $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); + } + } +} + +//=================================================== +// CLASS ScatterPlot +// Description: Render X and Y plots +//=================================================== +class ScatterPlot extends Plot { + var $impuls = false; + var $linkpoints = false, $linkpointweight=1, $linkpointcolor="black"; +//--------------- +// CONSTRUCTOR + function ScatterPlot($datay,$datax=false) { + if( (count($datax) != count($datay)) && is_array($datax)) + JpGraphError::RaiseL(20003);//("Scatterplot must have equal number of X and Y points."); + $this->Plot($datay,$datax); + $this->mark = new PlotMark(); + $this->mark->SetType(MARK_SQUARE); + $this->mark->SetColor($this->color); + $this->value->SetAlign('center','center'); + $this->value->SetMargin(0); + } + +//--------------- +// PUBLIC METHODS + function SetImpuls($f=true) { + $this->impuls = $f; + } + + // Combine the scatter plot points with a line + function SetLinkPoints($aFlag=true,$aColor="black",$aWeight=1) { + $this->linkpoints=$aFlag; + $this->linkpointcolor=$aColor; + $this->linkpointweight=$aWeight; + } + + function Stroke(&$img,&$xscale,&$yscale) { + + $ymin=$yscale->scale_abs[0]; + if( $yscale->scale[0] < 0 ) + $yzero=$yscale->Translate(0); + else + $yzero=$yscale->scale_abs[0]; + + $this->csimareas = ''; + for( $i=0; $i < $this->numpoints; ++$i ) { + + // Skip null values + if( $this->coords[0][$i]==="" || $this->coords[0][$i]==='-' || $this->coords[0][$i]==='x') + continue; + + if( isset($this->coords[1]) ) + $xt = $xscale->Translate($this->coords[1][$i]); + else + $xt = $xscale->Translate($i); + $yt = $yscale->Translate($this->coords[0][$i]); + + + if( $this->linkpoints && isset($yt_old) ) { + $img->SetColor($this->linkpointcolor); + $img->SetLineWeight($this->linkpointweight); + $img->Line($xt_old,$yt_old,$xt,$yt); + } + + if( $this->impuls ) { + $img->SetColor($this->color); + $img->SetLineWeight($this->weight); + $img->Line($xt,$yzero,$xt,$yt); + } + + if( !empty($this->csimtargets[$i]) ) { + if( !empty($this->csimwintargets[$i]) ) { + $this->mark->SetCSIMTarget($this->csimtargets[$i],$this->csimwintargets[$i]); + } + else { + $this->mark->SetCSIMTarget($this->csimtargets[$i]); + } + $this->mark->SetCSIMAlt($this->csimalts[$i]); + } + + if( isset($this->coords[1]) ) { + $this->mark->SetCSIMAltVal($this->coords[0][$i],$this->coords[1][$i]); + } + else { + $this->mark->SetCSIMAltVal($this->coords[0][$i],$i); + } + + $this->mark->Stroke($img,$xt,$yt); + + $this->csimareas .= $this->mark->GetCSIMAreas(); + $this->value->Stroke($img,$this->coords[0][$i],$xt,$yt); + + $xt_old = $xt; + $yt_old = $yt; + } + } + + // Framework function + function Legend(&$aGraph) { + if( $this->legend != "" ) { + $aGraph->legend->Add($this->legend,$this->mark->fill_color,$this->mark,0, + $this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget); + } + } +} // Class +/* EOF */ +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/jpgraph_stock.php b/html/includes/jpgraph/src/jpgraph_stock.php new file mode 100644 index 0000000000..77e1c4648b --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_stock.php @@ -0,0 +1,182 @@ +iTupleSize ) { + JpGraphError::RaiseL(21001,$this->iTupleSize);//('Data values for Stock charts must contain an even multiple of '.$this->iTupleSize.' data points.'); + } + $this->Plot($datay,$datax); + $this->numpoints /= $this->iTupleSize; + } +//--------------- +// PUBLIC METHODS + + function SetColor($aColor,$aColor1='white',$aColor2='darkred',$aColor3='darkred') { + $this->color = $aColor; + $this->iStockColor1 = $aColor1; + $this->iStockColor2 = $aColor2; + $this->iStockColor3 = $aColor3; + } + + function SetWidth($aWidth) { + // Make sure it's odd + $this->iWidth = 2*floor($aWidth/2)+1; + } + + function HideEndLines($aHide=true) { + $this->iEndLines = !$aHide; + } + + // Gets called before any axis are stroked + function PreStrokeAdjust(&$graph) { + if( $this->center ) { + $a=0.5; $b=0.5; + $this->numpoints++; + } else { + $a=0; $b=0; + } + $graph->xaxis->scale->ticks->SetXLabelOffset($a); + $graph->SetTextScaleOff($b); + } + + // Stroke stock plot + function Stroke(&$img,$xscale,$yscale) { + $n=$this->numpoints; + if( $this->center ) $n--; + if( isset($this->coords[1]) ) { + if( count($this->coords[1])!=$n ) + JpGraphError::RaiseL(2003,count($this->coords[1]),$n); +//("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints"); + else + $exist_x = true; + } + else + $exist_x = false; + + if( $exist_x ) + $xs=$this->coords[1][0]; + else + $xs=0; + + $ts = $this->iTupleSize; + $this->csimareas = ''; + for( $i=0; $i<$n; ++$i) { + + //If value is NULL, then don't draw a bar at all + if ($this->coords[0][$i] === null) continue; + + if( $exist_x ) $x=$this->coords[1][$i]; + else $x=$i; + $xt = $xscale->Translate($x); + + $neg = $this->coords[0][$i*$ts] > $this->coords[0][$i*$ts+1] ; + $yopen = $yscale->Translate($this->coords[0][$i*$ts]); + $yclose = $yscale->Translate($this->coords[0][$i*$ts+1]); + $ymin = $yscale->Translate($this->coords[0][$i*$ts+2]); + $ymax = $yscale->Translate($this->coords[0][$i*$ts+3]); + + $dx = floor($this->iWidth/2); + $xl = $xt - $dx; + $xr = $xt + $dx; + + if( $neg ) + $img->SetColor($this->iStockColor3); + else + $img->SetColor($this->iStockColor1); + $img->FilledRectangle($xl,$yopen,$xr,$yclose); + $img->SetLineWeight($this->weight); + if( $neg ) + $img->SetColor($this->iStockColor2); + else + $img->SetColor($this->color); + + $img->Rectangle($xl,$yopen,$xr,$yclose); + + if( $yopen < $yclose ) { + $ytop = $yopen ; + $ybottom = $yclose ; + } + else { + $ytop = $yclose ; + $ybottom = $yopen ; + } + $img->SetColor($this->color); + $img->Line($xt,$ytop,$xt,$ymax); + $img->Line($xt,$ybottom,$xt,$ymin); + + if( $this->iEndLines ) { + $img->Line($xl,$ymax,$xr,$ymax); + $img->Line($xl,$ymin,$xr,$ymin); + } + + // A chance for subclasses to add things to the bar + // for data point i + $this->ModBox($img,$xscale,$yscale,$i,$xl,$xr,$neg); + + // Setup image maps + if( !empty($this->csimtargets[$i]) ) { + $this->csimareas.= 'csimareas .= ' href="'.$this->csimtargets[$i].'"'; + if( !empty($this->csimalts[$i]) ) { + $sval=$this->csimalts[$i]; + $this->csimareas .= " title=\"$sval\" alt=\"$sval\" "; + } + $this->csimareas.= " />\n"; + } + } + return true; + } + + // A hook for subclasses to modify the plot + function ModBox($img,$xscale,$yscale,$i,$xl,$xr,$neg) {} + +} // Class + +//=================================================== +// CLASS BoxPlot +//=================================================== +class BoxPlot extends StockPlot { + var $iPColor='black',$iNColor='white'; + function BoxPlot($datay,$datax=false) { + $this->iTupleSize=5; + parent::StockPlot($datay,$datax); + } + + function SetMedianColor($aPos,$aNeg) { + $this->iPColor = $aPos; + $this->iNColor = $aNeg; + } + + function ModBox(&$img,$xscale,$yscale,$i,$xl,$xr,$neg) { + if( $neg ) + $img->SetColor($this->iNColor); + else + $img->SetColor($this->iPColor); + + $y = $yscale->Translate($this->coords[0][$i*5+4]); + $img->Line($xl,$y,$xr,$y); + } +} + +/* EOF */ +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/jpgraph_ttf.inc.php b/html/includes/jpgraph/src/jpgraph_ttf.inc.php new file mode 100644 index 0000000000..02e2a27ee2 --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_ttf.inc.php @@ -0,0 +1,379 @@ +g2312 == null ) { + include_once 'jpgraph_gb2312.php' ; + $this->g2312 = new GB2312toUTF8(); + } + return $this->g2312->gb2utf8($aTxt); + } + elseif( $aFF === FF_CHINESE ) { + if( !function_exists('iconv') ) { + JpGraphError::RaiseL(25006); +//('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).'); + } + return iconv('BIG5','UTF-8',$aTxt); + } + elseif( ASSUME_EUCJP_ENCODING && + ($aFF == FF_MINCHO || $aFF == FF_GOTHIC || $aFF == FF_PMINCHO || $aFF == FF_PGOTHIC) ) { + if( !function_exists('mb_convert_encoding') ) { + JpGraphError::RaiseL(25127); + } + return mb_convert_encoding($aTxt, 'UTF-8','EUC-JP'); + } + elseif( $aFF == FF_DAVID || $aFF == FF_MIRIAM || $aFF == FF_AHRON ) { + return $this->heb_iso2uni($aTxt); + } + else + return $aTxt; + } + + // Translate iso encoding to unicode + function iso2uni ($isoline){ + $uniline=''; + for ($i=0; $i < strlen($isoline); $i++){ + $thischar = substr($isoline,$i,1); + $charcode = ord($thischar); + $uniline .= ($charcode>175) ? "&#" . (1040+($charcode-176)). ";" : $thischar; + } + return $uniline; + } + + // Translate greek iso encoding to unicode + function gr_iso2uni ($isoline) { + $uniline=''; + for ($i=0; $i < strlen($isoline); $i++) { + $thischar=substr($isoline,$i,1); + $charcode=ord($thischar); + $uniline.=($charcode>179 && $charcode!=183 && $charcode!=187 && $charcode!=189) ? "&#" . (900+($charcode-180)). ";" : $thischar; + } + return $uniline; + } + + // Translate greek win encoding to unicode + function gr_win2uni ($winline) { + $uniline=''; + $n = strlen($winline); + for ($i=0; $i < $n; $i++) { + $thischar=substr($winline,$i,1); + $charcode=ord($thischar); + if ($charcode==161 || $charcode==162) { + $uniline.="&#" . (740+$charcode). ";"; + } + else { + $uniline.=(($charcode>183 && $charcode!=187 && $charcode!=189) || $charcode==180) ? "&#" . (900+($charcode-180)). ";" : $thischar; + } + } + return $uniline; + } + + function heb_iso2uni($isoline) { + $isoline = hebrev($isoline); + $o = ''; + + $n = strlen($isoline); + for($i=0; $i < $n; $i++) { + $c=ord( substr($isoline,$i,1) ); + $o .= ($c > 223) && ($c < 251) ? '&#'.(1264+$c).';' : chr($c); + } + return utf8_encode($o); + } +} + +//================================================================= +// CLASS TTF +// Description: Handle TTF font names and loading of font files +//================================================================= +class TTF { + var $font_files,$style_names; + +//--------------- +// CONSTRUCTOR + function TTF() { + + // String names for font styles to be used in error messages + $this->style_names=array(FS_NORMAL =>'normal', + FS_BOLD =>'bold', + FS_ITALIC =>'italic', + FS_BOLDITALIC =>'bolditalic'); + + // File names for available fonts + $this->font_files=array( + FF_COURIER => array(FS_NORMAL =>'cour.ttf', + FS_BOLD =>'courbd.ttf', + FS_ITALIC =>'couri.ttf', + FS_BOLDITALIC =>'courbi.ttf' ), + FF_GEORGIA => array(FS_NORMAL =>'georgia.ttf', + FS_BOLD =>'georgiab.ttf', + FS_ITALIC =>'georgiai.ttf', + FS_BOLDITALIC =>'' ), + FF_TREBUCHE =>array(FS_NORMAL =>'trebuc.ttf', + FS_BOLD =>'trebucbd.ttf', + FS_ITALIC =>'trebucit.ttf', + FS_BOLDITALIC =>'trebucbi.ttf' ), + FF_VERDANA => array(FS_NORMAL =>'verdana.ttf', + FS_BOLD =>'verdanab.ttf', + FS_ITALIC =>'verdanai.ttf', + FS_BOLDITALIC =>'' ), + FF_TIMES => array(FS_NORMAL =>'times.ttf', + FS_BOLD =>'timesbd.ttf', + FS_ITALIC =>'timesi.ttf', + FS_BOLDITALIC =>'timesbi.ttf' ), + FF_COMIC => array(FS_NORMAL =>'comic.ttf', + FS_BOLD =>'comicbd.ttf', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + FF_ARIAL => array(FS_NORMAL =>'arial.ttf', + FS_BOLD =>'arialbd.ttf', + FS_ITALIC =>'ariali.ttf', + FS_BOLDITALIC =>'arialbi.ttf' ) , + FF_VERA => array(FS_NORMAL =>'Vera.ttf', + FS_BOLD =>'VeraBd.ttf', + FS_ITALIC =>'VeraIt.ttf', + FS_BOLDITALIC =>'VeraBI.ttf' ), + FF_VERAMONO => array(FS_NORMAL =>'VeraMono.ttf', + FS_BOLD =>'VeraMoBd.ttf', + FS_ITALIC =>'VeraMoIt.ttf', + FS_BOLDITALIC =>'VeraMoBI.ttf' ), + FF_VERASERIF=> array(FS_NORMAL =>'VeraSe.ttf', + FS_BOLD =>'VeraSeBd.ttf', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ) , + + /* Chinese fonts */ + FF_SIMSUN => array(FS_NORMAL =>'simsun.ttc', + FS_BOLD =>'simhei.ttf', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + FF_CHINESE => array(FS_NORMAL =>CHINESE_TTF_FONT, + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + + /* Japanese fonts */ + FF_MINCHO => array(FS_NORMAL =>MINCHO_TTF_FONT, + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + FF_PMINCHO => array(FS_NORMAL =>PMINCHO_TTF_FONT, + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + FF_GOTHIC => array(FS_NORMAL =>GOTHIC_TTF_FONT, + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + FF_PGOTHIC => array(FS_NORMAL =>PGOTHIC_TTF_FONT, + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + FF_MINCHO => array(FS_NORMAL =>PMINCHO_TTF_FONT, + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + + /* Hebrew fonts */ + FF_DAVID => array(FS_NORMAL =>'DAVIDNEW.TTF', + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + + FF_MIRIAM => array(FS_NORMAL =>'MRIAMY.TTF', + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + + FF_AHRON => array(FS_NORMAL =>'ahronbd.ttf', + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + + /* Dejavu fonts */ + FF_DV_SANSSERIF => array(FS_NORMAL =>'DejaVuSans.ttf', + FS_BOLD =>'DejaVuSans-Bold.ttf', + FS_ITALIC =>'DejaVuSans-Oblique.ttf', + FS_BOLDITALIC =>'DejaVuSans-BoldOblique.ttf' ), + + FF_DV_SANSSERIFMONO => array(FS_NORMAL =>'DejaVuSansMono.ttf', + FS_BOLD =>'DejaVuSansMono-Bold.ttf', + FS_ITALIC =>'DejaVuSansMono-Oblique.ttf', + FS_BOLDITALIC =>'DejaVuSansMono-BoldOblique.ttf' ), + + FF_DV_SANSSERIFCOND => array(FS_NORMAL =>'DejaVuSansCondensed.ttf', + FS_BOLD =>'DejaVuSansCondensed-Bold.ttf', + FS_ITALIC =>'DejaVuSansCondensed-Oblique.ttf', + FS_BOLDITALIC =>'DejaVuSansCondensed-BoldOblique.ttf' ), + + FF_DV_SERIF => array(FS_NORMAL =>'DejaVuSerif.ttf', + FS_BOLD =>'DejaVuSerif-Bold.ttf', + FS_ITALIC =>'DejaVuSerif-Italic.ttf', + FS_BOLDITALIC =>'DejaVuSerif-BoldItalic.ttf' ), + + FF_DV_SERIFCOND => array(FS_NORMAL =>'DejaVuSerifCondensed.ttf', + FS_BOLD =>'DejaVuSerifCondensed-Bold.ttf', + FS_ITALIC =>'DejaVuSerifCondensed-Italic.ttf', + FS_BOLDITALIC =>'DejaVuSerifCondensed-BoldItalic.ttf' ), + + /* Misc fonts */ + FF_DIGITAL => array(FS_NORMAL =>'DIGIRU__.TTF', + FS_BOLD =>'Digirtu_.ttf', + FS_ITALIC =>'Digir___.ttf', + FS_BOLDITALIC =>'DIGIRT__.TTF' ), + FF_SPEEDO => array(FS_NORMAL =>'Speedo.ttf', + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + FF_COMPUTER => array(FS_NORMAL =>'COMPUTER.TTF', + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + FF_CALCULATOR =>array(FS_NORMAL =>'Triad_xs.ttf', + FS_BOLD =>'', + FS_ITALIC =>'', + FS_BOLDITALIC =>'' ), + ); + } + +//--------------- +// PUBLIC METHODS + // Create the TTF file from the font specification + function File($family,$style=FS_NORMAL) { + + if( $family == FF_HANDWRT || $family==FF_BOOK ) { + JpGraphError::RaiseL(25045);//('Font families FF_HANDWRT and FF_BOOK are no longer available due to copyright problem with these fonts. Fonts can no longer be distributed with JpGraph. Please download fonts from http://corefonts.sourceforge.net/'); + } + + $fam = @$this->font_files[$family]; + if( !$fam ) { + JpGraphError::RaiseL(25046,$family);//("Specified TTF font family (id=$family) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/"); + } + $f = @$fam[$style]; + + if( $f==='' ) + JpGraphError::RaiseL(25047,$this->style_names[$style],$this->font_files[$family][FS_NORMAL]);//('Style "'.$this->style_names[$style].'" is not available for font family '.$this->font_files[$family][FS_NORMAL].'.'); + if( !$f ) { + JpGraphError::RaiseL(25048,$fam);//("Unknown font style specification [$fam]."); + } + + if ($family >= FF_MINCHO && $family <= FF_PGOTHIC) { + $f = MBTTF_DIR.$f; + } else { + $f = TTF_DIR.$f; + } + + if( file_exists($f) === false || is_readable($f) === false ) { + JpGraphError::RaiseL(25049,$f);//("Font file \"$f\" is not readable or does not exist."); + } + return $f; + } +} // Class + +?> diff --git a/html/includes/jpgraph/src/jpgraph_utils.inc.php b/html/includes/jpgraph/src/jpgraph_utils.inc.php new file mode 100644 index 0000000000..8f301990dd --- /dev/null +++ b/html/includes/jpgraph/src/jpgraph_utils.inc.php @@ -0,0 +1,523 @@ +iFunc = $aFunc; + $this->iXFunc = $aXFunc; + } + + function E($aXMin,$aXMax,$aSteps=50) { + $this->iMin = $aXMin; + $this->iMax = $aXMax; + $this->iStepSize = ($aXMax-$aXMin)/$aSteps; + + if( $this->iXFunc != '' ) + $t = 'for($i='.$aXMin.'; $i<='.$aXMax.'; $i += '.$this->iStepSize.') {$ya[]='.$this->iFunc.';$xa[]='.$this->iXFunc.';}'; + elseif( $this->iFunc != '' ) + $t = 'for($x='.$aXMin.'; $x<='.$aXMax.'; $x += '.$this->iStepSize.') {$ya[]='.$this->iFunc.';$xa[]=$x;} $x='.$aXMax.';$ya[]='.$this->iFunc.';$xa[]=$x;'; + else + JpGraphError::RaiseL(24001);//('FuncGenerator : No function specified. '); + + @eval($t); + + // If there is an error in the function specifcation this is the only + // way we can discover that. + if( empty($xa) || empty($ya) ) + JpGraphError::RaiseL(24002);//('FuncGenerator : Syntax error in function specification '); + + return array($xa,$ya); + } +} + +//============================================================================= +// CLASS SymChar +// Description: Code values for some commonly used characters that +// normally isn't available directly on the keyboard, for example +// mathematical and greek symbols. +//============================================================================= +class SymChar { + function Get($aSymb,$aCapital=FALSE) { + static $iSymbols = array( + /* Greek */ + array('alpha','03B1','0391'), + array('beta','03B2','0392'), + array('gamma','03B3','0393'), + array('delta','03B4','0394'), + array('epsilon','03B5','0395'), + array('zeta','03B6','0396'), + array('ny','03B7','0397'), + array('eta','03B8','0398'), + array('theta','03B8','0398'), + array('iota','03B9','0399'), + array('kappa','03BA','039A'), + array('lambda','03BB','039B'), + array('mu','03BC','039C'), + array('nu','03BD','039D'), + array('xi','03BE','039E'), + array('omicron','03BF','039F'), + array('pi','03C0','03A0'), + array('rho','03C1','03A1'), + array('sigma','03C3','03A3'), + array('tau','03C4','03A4'), + array('upsilon','03C5','03A5'), + array('phi','03C6','03A6'), + array('chi','03C7','03A7'), + array('psi','03C8','03A8'), + array('omega','03C9','03A9'), + /* Money */ + array('euro','20AC'), + array('yen','00A5'), + array('pound','20A4'), + /* Math */ + array('approx','2248'), + array('neq','2260'), + array('not','2310'), + array('def','2261'), + array('inf','221E'), + array('sqrt','221A'), + array('int','222B'), + /* Misc */ + array('copy','00A9'), + array('para','00A7'), + array('tm','2122'), /* Trademark symbol */ + array('rtm','00AE') /* Registered trademark */ +); + + $n = count($iSymbols); + $i=0; + $found = false; + $aSymb = strtolower($aSymb); + while( $i < $n && !$found ) { + $found = $aSymb === $iSymbols[$i++][0]; + } + if( $found ) { + $ca = $iSymbols[--$i]; + if( $aCapital && count($ca)==3 ) + $s = $ca[2]; + else + $s = $ca[1]; + return sprintf('&#%04d;',hexdec($s)); + } + else + return ''; + } +} + + +//============================================================================= +// CLASS DateScaleUtils +// Description: Help to create a manual date scale +//============================================================================= +DEFINE('DSUTILS_MONTH',1); // Major and minor ticks on a monthly basis +DEFINE('DSUTILS_MONTH1',1); // Major and minor ticks on a monthly basis +DEFINE('DSUTILS_MONTH2',2); // Major ticks on a bi-monthly basis +DEFINE('DSUTILS_MONTH3',3); // Major icks on a tri-monthly basis +DEFINE('DSUTILS_MONTH6',4); // Major on a six-monthly basis +DEFINE('DSUTILS_WEEK1',5); // Major ticks on a weekly basis +DEFINE('DSUTILS_WEEK2',6); // Major ticks on a bi-weekly basis +DEFINE('DSUTILS_WEEK4',7); // Major ticks on a quod-weekly basis +DEFINE('DSUTILS_DAY1',8); // Major ticks on a daily basis +DEFINE('DSUTILS_DAY2',9); // Major ticks on a bi-daily basis +DEFINE('DSUTILS_DAY4',10); // Major ticks on a qoud-daily basis +DEFINE('DSUTILS_YEAR1',11); // Major ticks on a yearly basis +DEFINE('DSUTILS_YEAR2',12); // Major ticks on a bi-yearly basis +DEFINE('DSUTILS_YEAR5',13); // Major ticks on a five-yearly basis + + +class DateScaleUtils { + var $iMin=0, $iMax=0; + var $starthour,$startmonth, $startday, $startyear; + var $endmonth, $endyear, $endday; + var $tickPositions=array(),$minTickPositions=array(); + var $iUseWeeks = true; + + function UseWeekFormat($aFlg) { + $this->iUseWeeks = $aFlg; + } + + function doYearly($aType,$aMinor=false) { + $i=0; $j=0; + $m = $this->startmonth; + $y = $this->startyear; + + if( $this->startday == 1 ) { + $this->tickPositions[$i++] = mktime(0,0,0,$m,1,$y); + } + ++$m; + + switch( $aType ) { + case DSUTILS_YEAR1: + for($y=$this->startyear; $y <= $this->endyear; ++$y ) { + if( $aMinor ) { + while( $m <= 12 ) { + if( !($y == $this->endyear && $m > $this->endmonth) ) { + $this->minTickPositions[$j++] = mktime(0,0,0,$m,1,$y); + } + ++$m; + } + $m=1; + } + $this->tickPositions[$i++] = mktime(0,0,0,1,1,$y); + } + break; + case DSUTILS_YEAR2: + $y=$this->startyear; + while( $y <= $this->endyear ) { + $this->tickPositions[$i++] = mktime(0,0,0,1,1,$y); + for($k=0; $k < 1; ++$k ) { + ++$y; + if( $aMinor ) { + $this->minTickPositions[$j++] = mktime(0,0,0,1,1,$y); + } + } + ++$y; + } + break; + case DSUTILS_YEAR5: + $y=$this->startyear; + while( $y <= $this->endyear ) { + $this->tickPositions[$i++] = mktime(0,0,0,1,1,$y); + for($k=0; $k < 4; ++$k ) { + ++$y; + if( $aMinor ) { + $this->minTickPositions[$j++] = mktime(0,0,0,1,1,$y); + } + } + ++$y; + } + break; + } + } + + function doDaily($aType,$aMinor=false) { + $m = $this->startmonth; + $y = $this->startyear; + $d = $this->startday; + $h = $this->starthour; + $i=0;$j=0; + + if( $h == 0 ) { + $this->tickPositions[$i++] = mktime(0,0,0,$m,$d,$y); + } + $t = mktime(0,0,0,$m,$d,$y); + switch($aType) { + case DSUTILS_DAY1: + while( $t <= self::$iMax ) { + $t = strtotime('+1 day',$t); + $this->tickPositions[$i++] = $t; + if( $aMinor ) { + $this->minTickPositions[$j++] = strtotime('+12 hours',$t); + } + } + break; + case DSUTILS_DAY2: + while( $t <= $this->iMax ) { + $t = strtotime('+1 day',$t); + if( $aMinor ) { + $this->minTickPositions[$j++] = $t; + } + $t = strtotime('+1 day',$t); + $this->tickPositions[$i++] = $t; + } + break; + case DSUTILS_DAY4: + while( $t <= $this->iMax ) { + for($k=0; $k < 3; ++$k ) { + $t = strtotime('+1 day',$t); + if( $aMinor ) { + $this->minTickPositions[$j++] = $t; + } + } + $t = strtotime('+1 day',$t); + $this->tickPositions[$i++] = $t; + } + break; + } + } + + function doWeekly($aType,$aMinor=false) { + $hpd = 3600*24; + $hpw = 3600*24*7; + // Find out week number of min date + $thursday = $this->iMin + $hpd * (3 - (date('w', $this->iMin) + 6) % 7); + $week = 1 + (date('z', $thursday) - (11 - date('w', mktime(0, 0, 0, 1, 1, date('Y', $thursday)))) % 7) / 7; + $daynumber = date('w',$this->iMin); + if( $daynumber == 0 ) $daynumber = 7; + $m = $this->startmonth; + $y = $this->startyear; + $d = $this->startday; + $i=0;$j=0; + // The assumption is that the weeks start on Monday. If the first day + // is later in the week then the first week tick has to be on the following + // week. + if( $daynumber == 1 ) { + $this->tickPositions[$i++] = mktime(0,0,0,$m,$d,$y); + $t = mktime(0,0,0,$m,$d,$y) + $hpw; + } + else { + $t = mktime(0,0,0,$m,$d,$y) + $hpd*(8-$daynumber); + } + + switch($aType) { + case DSUTILS_WEEK1: + $cnt=0; + break; + case DSUTILS_WEEK2: + $cnt=1; + break; + case DSUTILS_WEEK4: + $cnt=3; + break; + } + while( $t <= $this->iMax ) { + $this->tickPositions[$i++] = $t; + for($k=0; $k < $cnt; ++$k ) { + $t += $hpw; + if( $aMinor ) { + $this->minTickPositions[$j++] = $t; + } + } + $t += $hpw; + } + } + + function doMonthly($aType,$aMinor=false) { + $monthcount=0; + $m = $this->startmonth; + $y = $this->startyear; + $i=0; $j=0; + + // Skip the first month label if it is before the startdate + if( $this->startday == 1 ) { + $this->tickPositions[$i++] = mktime(0,0,0,$m,1,$y); + $monthcount=1; + } + if( $aType == 1 ) { + if( $this->startday < 15 ) { + $this->minTickPositions[$j++] = mktime(0,0,0,$m,15,$y); + } + } + ++$m; + + // Loop through all the years included in the scale + for($y=$this->startyear; $y <= $this->endyear; ++$y ) { + // Loop through all the months. There are three cases to consider: + // 1. We are in the first year and must start with the startmonth + // 2. We are in the end year and we must stop at last month of the scale + // 3. A year in between where we run through all the 12 months + $stopmonth = $y == $this->endyear ? $this->endmonth : 12; + while( $m <= $stopmonth ) { + switch( $aType ) { + case DSUTILS_MONTH1: + // Set minor tick at the middle of the month + if( $aMinor ) { + if( $m <= $stopmonth ) { + if( !($y==$this->endyear && $m==$stopmonth && $this->endday < 15) ) + $this->minTickPositions[$j++] = mktime(0,0,0,$m,15,$y); + } + } + // Major at month + // Get timestamp of first hour of first day in each month + $this->tickPositions[$i++] = mktime(0,0,0,$m,1,$y); + + break; + case DSUTILS_MONTH2: + if( $aMinor ) { + // Set minor tick at start of each month + $this->minTickPositions[$j++] = mktime(0,0,0,$m,1,$y); + } + + // Major at every second month + // Get timestamp of first hour of first day in each month + if( $monthcount % 2 == 0 ) { + $this->tickPositions[$i++] = mktime(0,0,0,$m,1,$y); + } + break; + case DSUTILS_MONTH3: + if( $aMinor ) { + // Set minor tick at start of each month + $this->minTickPositions[$j++] = mktime(0,0,0,$m,1,$y); + } + // Major at every third month + // Get timestamp of first hour of first day in each month + if( $monthcount % 3 == 0 ) { + $this->tickPositions[$i++] = mktime(0,0,0,$m,1,$y); + } + break; + case DSUTILS_MONTH6: + if( $aMinor ) { + // Set minor tick at start of each month + $this->minTickPositions[$j++] = mktime(0,0,0,$m,1,$y); + } + // Major at every third month + // Get timestamp of first hour of first day in each month + if( $monthcount % 6 == 0 ) { + $this->tickPositions[$i++] = mktime(0,0,0,$m,1,$y); + } + break; + } + ++$m; + ++$monthcount; + } + $m=1; + } + + // For the case where all dates are within the same month + // we want to make sure we have at least two ticks on the scale + // since the scale want work properly otherwise + if($this->startmonth == $this->endmonth && $this->startyear == $this->endyear && $aType==1 ) { + $this->tickPositions[$i++] = mktime(0 ,0 ,0, $this->startmonth + 1, 1, $this->startyear); + } + + return array($this->tickPositions,$this->minTickPositions); + } + + function GetTicks($aData,$aType=1,$aMinor=false,$aEndPoints=false) { + $n = count($aData); + return $this->GetTicksFromMinMax($aData[0],$aData[$n-1],$aType,$aMinor,$aEndPoints); + } + + function GetAutoTicks($aMin,$aMax,$aMaxTicks=10,$aMinor=false) { + $diff = $aMax - $aMin; + $spd = 3600*24; + $spw = $spd*7; + $spm = $spd*30; + $spy = $spd*352; + + if( $this->iUseWeeks ) + $w = 'W'; + else + $w = 'd M'; + + // Decision table for suitable scales + // First value: Main decision point + // Second value: Array of formatting depending on divisor for wanted max number of ticks. ,.. + $tt = array( + array($spw, array(1,DSUTILS_DAY1,'d M',2,DSUTILS_DAY2,'d M',-1,DSUTILS_DAY4,'d M')), + array($spm, array(1,DSUTILS_DAY1,'d M',2,DSUTILS_DAY2,'d M',4,DSUTILS_DAY4,'d M', + 7,DSUTILS_WEEK1,$w,-1,DSUTILS_WEEK2,$w)), + array($spy, array(1,DSUTILS_DAY1,'d M',2,DSUTILS_DAY2,'d M',4,DSUTILS_DAY4,'d M', + 7,DSUTILS_WEEK1,$w,14,DSUTILS_WEEK2,$w, + 30,DSUTILS_MONTH1,'M',60,DSUTILS_MONTH2,'M',-1,DSUTILS_MONTH3,'M')), + array(-1, array(30,DSUTILS_MONTH1,'M-Y',60,DSUTILS_MONTH2,'M-Y',90,DSUTILS_MONTH3,'M-Y', + 180,DSUTILS_MONTH6,'M-Y',352,DSUTILS_YEAR1,'Y',704,DSUTILS_YEAR2,'Y',-1,DSUTILS_YEAR5,'Y'))); + + $ntt = count($tt); + $nd = floor($diff/$spd); + for($i=0; $i < $ntt; ++$i ) { + if( $diff <= $tt[$i][0] || $i==$ntt-1) { + $t = $tt[$i][1]; + $n = count($t)/3; + for( $j=0; $j < $n; ++$j ) { + if( $nd/$t[3*$j] <= $aMaxTicks || $j==$n-1) { + $type = $t[3*$j+1]; + $fs = $t[3*$j+2]; + list($tickPositions,$minTickPositions) = $this->GetTicksFromMinMax($aMin,$aMax,$type,$aMinor); + return array($fs,$tickPositions,$minTickPositions,$type); + } + } + } + } + } + + function GetTicksFromMinMax($aMin,$aMax,$aType,$aMinor=false,$aEndPoints=false) { + $this->starthour = date('G',$aMin); + $this->startmonth = date('n',$aMin); + $this->startday = date('j',$aMin); + $this->startyear = date('Y',$aMin); + $this->endmonth = date('n',$aMax); + $this->endyear = date('Y',$aMax); + $this->endday = date('j',$aMax); + $this->iMin = $aMin; + $this->iMax = $aMax; + + if( $aType <= DSUTILS_MONTH6 ) { + $this->doMonthly($aType,$aMinor); + } + elseif( $aType <= DSUTILS_WEEK4 ) { + $this->doWeekly($aType,$aMinor); + } + elseif( $aType <= DSUTILS_DAY4 ) { + $this->doDaily($aType,$aMinor); + } + elseif( $aType <= DSUTILS_YEAR5 ) { + $this->doYearly($aType,$aMinor); + } + else { + JpGraphError::RaiseL(24003); + } + // put a label at the very left data pos + if( $aEndPoints ) { + $tickPositions[$i++] = $aData[0]; + } + + // put a label at the very right data pos + if( $aEndPoints ) { + $tickPositions[$i] = $aData[$n-1]; + } + + return array($this->tickPositions,$this->minTickPositions); + } + +} + +//============================================================================= +// Class ReadFileData +//============================================================================= +Class ReadFileData { + + //---------------------------------------------------------------------------- + // Desciption: + // Read numeric data from a file. + // Each value should be separated by either a new line or by a specified + // separator character (default is ','). + // Before returning the data each value is converted to a proper float + // value. The routine is robust in the sense that non numeric data in the + // file will be discarded. + // + // Returns: + // The number of data values read on success, FALSE on failure + //---------------------------------------------------------------------------- + function FromCSV($aFile,&$aData,$aSepChar=',',$aMaxLineLength=1024) { + $rh = fopen($aFile,'r'); + if( $rh === false ) + return false; + $tmp = array(); + $lineofdata = fgetcsv($rh, 1000, ','); + while ( $lineofdata !== FALSE) { + $tmp = array_merge($tmp,$lineofdata); + $lineofdata = fgetcsv($rh, $aMaxLineLength, $aSepChar); + } + fclose($rh); + + // Now make sure that all data is numeric. By default + // all data is read as strings + $n = count($tmp); + $aData = array(); + $cnt=0; + for($i=0; $i < $n; ++$i) { + if( $tmp[$i] !== "" ) { + $aData[$cnt++] = floatval($tmp[$i]); + } + } + return $cnt; + } +} + +?> \ No newline at end of file diff --git a/html/includes/jpgraph/src/lang/de.inc.php b/html/includes/jpgraph/src/lang/de.inc.php new file mode 100644 index 0000000000..339b0ec58c --- /dev/null +++ b/html/includes/jpgraph/src/lang/de.inc.php @@ -0,0 +1,498 @@ +,) +$_jpg_messages = array( + +/* +** Headers wurden bereits gesendet - Fehler. Dies wird als HTML formatiert, weil es direkt als text zurueckgesendet wird +*/ +10 => array('
JpGraph Fehler: +HTTP header wurden bereits gesendet.
Fehler in der Datei %s in der Zeile %d.
Erklärung:
HTTP header wurden bereits zum Browser gesendet, wobei die Daten als Text gekennzeichnet wurden, bevor die Bibliothek die Chance hatte, seinen Bild-HTTP-Header zum Browser zu schicken. Dies verhindert, dass die Bibliothek Bilddaten zum Browser schicken kann (weil sie vom Browser als Text interpretiert würden und daher nur Mist dargestellt würde).

Wahrscheinlich steht Text im Skript bevor Graph::Stroke() aufgerufen wird. Wenn dieser Text zum Browser gesendet wird, nimmt dieser an, dass die gesamten Daten aus Text bestehen. Such nach irgendwelchem Text, auch nach Leerzeichen und Zeilenumbrüchen, die eventuell bereits zum Browser gesendet wurden.

Zum Beispiel ist ein oft auftretender Fehler, eine Leerzeile am Anfang der Datei oder vor Graph::Stroke() zu lassen."<?php".

',2), + +/* +** Setup Fehler +*/ +11 => array('Es wurde kein Pfad für CACHE_DIR angegeben. Bitte gib einen Pfad CACHE_DIR in der Datei jpg-config.inc an.',0), +12 => array('Es wurde kein Pfad für TTF_DIR angegeben und der Pfad kann nicht automatisch ermittelt werden. Bitte gib den Pfad in der Datei jpg-config.inc an.',0), +13 => array('The installed PHP version (%s) is not compatible with this release of the library. The library requires at least PHP version %s',2), + +/* +** jpgraph_bar +*/ + +2001 => array('Die Anzahl der Farben ist nicht gleich der Anzahl der Vorlagen in BarPlot::SetPattern().',0), +2002 => array('Unbekannte Vorlage im Aufruf von BarPlot::SetPattern().',0), +2003 => array('Anzahl der X- und Y-Koordinaten sind nicht identisch. Anzahl der X-Koordinaten: %d; Anzahl der Y-Koordinaten: %d.',2), +2004 => array('Alle Werte für ein Balkendiagramm (barplot) müssen numerisch sein. Du hast den Wert nr [%d] == %s angegeben.',2), +2005 => array('Du hast einen leeren Vektor für die Schattierungsfarben im Balkendiagramm (barplot) angegeben.',0), +2006 => array('Unbekannte Position für die Werte der Balken: %s.',1), +2007 => array('Kann GroupBarPlot nicht aus einem leeren Vektor erzeugen.',0), +2008 => array('GroupBarPlot Element nbr %d wurde nicht definiert oder ist leer.',0), +2009 => array('Eins der Objekte, das an GroupBar weitergegeben wurde ist kein Balkendiagramm (BarPlot). Versichere Dich, dass Du den GroupBarPlot aus einem Vektor von Balkendiagrammen (barplot) oder AccBarPlot-Objekten erzeugst. (Class = %s)',1), +2010 => array('Kann AccBarPlot nicht aus einem leeren Vektor erzeugen.',0), +2011 => array('AccBarPlot-Element nbr %d wurde nicht definiert oder ist leer.',1), +2012 => array('Eins der Objekte, das an AccBar weitergegeben wurde ist kein Balkendiagramm (barplot). Versichere Dich, dass Du den AccBar-Plot aus einem Vektor von Balkendiagrammen (barplot) erzeugst. (Class=%s)',1), +2013 => array('Du hast einen leeren Vektor für die Schattierungsfarben im Balkendiagramm (barplot) angegeben.',0), +2014 => array('Die Anzahl der Datenpunkte jeder Datenreihe in AccBarPlot muss gleich sein.',0), + + +/* +** jpgraph_date +*/ + +3001 => array('Es ist nur möglich, entweder SetDateAlign() oder SetTimeAlign() zu benutzen, nicht beides!',0), + +/* +** jpgraph_error +*/ + +4002 => array('Fehler bei den Eingabedaten von LineErrorPlot. Die Anzahl der Datenpunkte mus ein Mehrfaches von drei sein!',0), + +/* +** jpgraph_flags +*/ + +5001 => array('Unbekannte Flaggen-Größe (%d).',1), +5002 => array('Der Flaggen-Index %s existiert nicht.',1), +5003 => array('Es wurde eine ungültige Ordnungszahl (%d) für den Flaggen-Index angegeben.',1), +5004 => array('Der Landesname %s hat kein korrespondierendes Flaggenbild. Die Flagge mag existieren, abr eventuell unter einem anderen Namen, z.B. versuche "united states" statt "usa".',1), + + +/* +** jpgraph_gantt +*/ + +6001 => array('Interner Fehler. Die Höhe für ActivityTitles ist < 0.',0), +6002 => array('Es dürfen keine negativen Werte für die Gantt-Diagramm-Dimensionen angegeben werden. Verwende 0, wenn die Dimensionen automatisch ermittelt werden sollen.',0), +6003 => array('Ungültiges Format für den Bedingungs-Parameter bei Index=%d in CreateSimple(). Der Parameter muss bei index 0 starten und Vektoren in der Form (Row,Constrain-To,Constrain-Type) enthalten.',1), +6004 => array('Ungültiges Format für den Fortschritts-Parameter bei Index=%d in CreateSimple(). Der Parameter muss bei Index 0 starten und Vektoren in der Form (Row,Progress) enthalten.',1), +6005 => array('SetScale() ist nicht sinnvoll bei Gantt-Diagrammen.',0), +6006 => array('Das Gantt-Diagramm kann nicht automatisch skaliert werden. Es existieren keine Aktivitäten mit Termin. [GetBarMinMax() start >= n]',0), +6007 => array('Plausibiltätsprüfung für die automatische Gantt-Diagramm-Größe schlug fehl. Entweder die Breite (=%d) oder die Höhe (=%d) ist größer als MAX_GANTTIMG_SIZE. Dies kann möglicherweise durch einen falschen Wert bei einer Aktivität hervorgerufen worden sein.',2), +6008 => array('Du hast eine Bedingung angegeben von Reihe=%d bis Reihe=%d, die keine Aktivität hat.',2), +6009 => array('Unbekannter Bedingungstyp von Reihe=%d bis Reihe=%d',2), +6010 => array('Ungültiger Icon-Index für das eingebaute Gantt-Icon [%d]',1), +6011 => array('Argument für IconImage muss entweder ein String oder ein Integer sein.',0), +6012 => array('Unbekannter Typ bei der Gantt-Objekt-Title-Definition.',0), +6015 => array('Ungültige vertikale Position %d',1), +6016 => array('Der eingegebene Datums-String (%s) für eine Gantt-Aktivität kann nicht interpretiert werden. Versichere Dich, dass es ein gültiger Datumsstring ist, z.B. 2005-04-23 13:30',1), +6017 => array('Unbekannter Datumstyp in GanttScale (%s).',1), +6018 => array('Intervall für Minuten muss ein gerader Teiler einer Stunde sein, z.B. 1,5,10,12,15,20,30, etc. Du hast ein Intervall von %d Minuten angegeben.',1), +6019 => array('Die vorhandene Breite (%d) für die Minuten ist zu klein, um angezeigt zu werden. Bitte benutze die automatische Größenermittlung oder vergrößere die Breite des Diagramms.',1), +6020 => array('Das Intervall für die Stunden muss ein gerader Teiler eines Tages sein, z.B. 0:30, 1:00, 1:30, 4:00, etc. Du hast ein Intervall von %d eingegeben.',1), +6021 => array('Unbekanntes Format für die Woche.',0), +6022 => array('Die Gantt-Skala wurde nicht eingegeben.',0), +6023 => array('Wenn Du sowohl Stunden als auch Minuten anzeigen lassen willst, muss das Stunden-Interval gleich 1 sein (anderenfalls ist es nicht sinnvoll, Minuten anzeigen zu lassen).',0), +6024 => array('Das CSIM-Ziel muss als String angegeben werden. Der Start des Ziels ist: %d',1), +6025 => array('Der CSIM-Alt-Text muss als String angegeben werden. Der Beginn des Alt-Textes ist: %d',1), +6027 => array('Der Fortschrittswert muss im Bereich [0, 1] liegen.',0), +6028 => array('Die eingegebene Höhe (%d) für GanttBar ist nicht im zulässigen Bereich.',1), +6029 => array('Der Offset für die vertikale Linie muss im Bereich [0,1] sein.',0), +6030 => array('Unbekannte Pfeilrichtung für eine Verbindung.',0), +6031 => array('Unbekannter Pfeiltyp für eine Verbindung.',0), +6032 => array('Interner Fehler: Unbekannter Pfadtyp (=%d) für eine Verbindung.',1), + +/* +** jpgraph_gradient +*/ + +7001 => array('Unbekannter Gradiententyp (=%d).',1), + +/* +** jpgraph_iconplot +*/ + +8001 => array('Der Mix-Wert für das Icon muss zwischen 0 und 100 sein.',0), +8002 => array('Die Ankerposition für Icons muss entweder "top", "bottom", "left", "right" oder "center" sein.',0), +8003 => array('Es ist nicht möglich, gleichzeitig ein Bild und eine Landesflagge für dasselbe Icon zu definieren',0), +8004 => array('Wenn Du Landesflaggen benutzen willst, musst Du die Datei "jpgraph_flags.php" hinzufügen (per include).',0), + +/* +** jpgraph_imgtrans +*/ + +9001 => array('Der Wert für die Bildtransformation ist außerhalb des zulässigen Bereichs. Der verschwindende Punkt am Horizont muss als Wert zwischen 0 und 1 angegeben werden.',0), + +/* +** jpgraph_lineplot +*/ + +10001 => array('Die Methode LinePlot::SetFilled() sollte nicht mehr benutzt werden. Benutze lieber SetFillColor()',0), +10002 => array('Der Plot ist zu kompliziert für FastLineStroke. Benutze lieber den StandardStroke()',0), +10003 => array('Each plot in an accumulated lineplot must have the same number of data points.',0), +/* +** jpgraph_log +*/ + +11001 => array('Deine Daten enthalten nicht-numerische Werte.',0), +11002 => array('Negative Werte können nicht für logarithmische Achsen verwendet werden.',0), +11003 => array('Deine Daten enthalten nicht-numerische Werte.',0), +11004 => array('Skalierungsfehler für die logarithmische Achse. Es gibt ein Problem mit den Daten der Achse. Der größte Wert muss größer sein als Null. Es ist mathematisch nicht möglich, einen Wert gleich Null in der Skala zu haben.',0), +11005 => array('Das Tick-Intervall für die logarithmische Achse ist nicht definiert. Lösche jeden Aufruf von SetTextLabelStart() oder SetTextTickInterval() bei der logarithmischen Achse.',0), + +/* +** jpgraph_mgraph +*/ + +12001 => array("Du benutzt GD 2.x und versuchst ein Nicht-Truecolor-Bild als Hintergrundbild zu benutzen. Um Hintergrundbilder mit GD 2.x zu benutzen, ist es notwendig Truecolor zu aktivieren, indem die USE_TRUECOLOR-Konstante auf TRUE gesetzt wird. Wegen eines Bugs in GD 2.0.1 ist die Qualität der Truetype-Schriften sehr schlecht, wenn man Truetype-Schriften mit Truecolor-Bildern verwendet.",0), +12002 => array('Ungültiger Dateiname für MGraph::SetBackgroundImage() : %s. Die Datei muss eine gültige Dateierweiterung haben (jpg,gif,png), wenn die automatische Typerkennung verwendet wird.',1), +12003 => array('Unbekannte Dateierweiterung (%s) in MGraph::SetBackgroundImage() für Dateiname: %s',2), +12004 => array('Das Bildformat des Hintergrundbildes (%s) wird von Deiner System-Konfiguration nicht unterstützt. ',1), +12005 => array('Das Hintergrundbild kann nicht gelesen werden: %s',1), +12006 => array('Es wurden ungültige Größen für Breite oder Höhe beim Erstellen des Bildes angegeben, (Breite=%d, Höhe=%d)',2), +12007 => array('Das Argument für MGraph::Add() ist nicht gültig für GD.',0), +12008 => array('Deine PHP- (und GD-lib-) Installation scheint keine bekannten Bildformate zu unterstützen.',0), +12009 => array('Deine PHP-Installation unterstützt das gewählte Bildformat nicht: %s',1), +12010 => array('Es konnte kein Bild als Datei %s erzeugt werden. Überprüfe, ob Du die entsprechenden Schreibrechte im aktuellen Verzeichnis hast.',1), +12011 => array('Es konnte kein Truecolor-Bild erzeugt werden. Überprüfe, ob Du wirklich die GD2-Bibliothek installiert hast.',0), +12012 => array('Es konnte kein Bild erzeugt werden. Überprüfe, ob Du wirklich die GD2-Bibliothek installiert hast.',0), + +/* +** jpgraph_pie3d +*/ + +14001 => array('Pie3D::ShowBorder(). Missbilligte Funktion. Benutze Pie3D::SetEdge(), um die Ecken der Tortenstücke zu kontrollieren.',0), +14002 => array('PiePlot3D::SetAngle() 3D-Torten-Projektionswinkel muss zwischen 5 und 85 Grad sein.',0), +14003 => array('Interne Festlegung schlug fehl. Pie3D::Pie3DSlice',0), +14004 => array('Tortenstück-Startwinkel muss zwischen 0 und 360 Grad sein.',0), +14005 => array('Pie3D Interner Fehler: Versuch, zweimal zu umhüllen bei der Suche nach dem Startindex.',0,), +14006 => array('Pie3D Interner Fehler: Z-Sortier-Algorithmus für 3D-Tortendiagramme funktioniert nicht einwandfrei (2). Versuch, zweimal zu umhüllen beim Erstellen des Bildes.',0), +14007 => array('Die Breite für das 3D-Tortendiagramm ist 0. Gib eine Breite > 0 an.',0), + +/* +** jpgraph_pie +*/ + +15001 => array('PiePLot::SetTheme() Unbekannter Stil: %s',1), +15002 => array('Argument für PiePlot::ExplodeSlice() muss ein Integer-Wert sein',0), +15003 => array('Argument für PiePlot::Explode() muss ein Vektor mit Integer-Werten sein.',0), +15004 => array('Tortenstück-Startwinkel muss zwischen 0 und 360 Grad sein.',0), +15005 => array('PiePlot::SetFont() sollte nicht mehr verwendet werden. Benutze stattdessen PiePlot->value->SetFont().',0), +15006 => array('PiePlot::SetSize() Radius für Tortendiagramm muss entweder als Bruch [0, 0.5] der Bildgröße oder als Absoluwert in Pixel im Bereich [10, 1000] angegeben werden.',0), +15007 => array('PiePlot::SetFontColor() sollte nicht mehr verwendet werden. Benutze stattdessen PiePlot->value->SetColor()..',0), +15008 => array('PiePlot::SetLabelType() der Typ für Tortendiagramme muss entweder 0 or 1 sein (nicht %d).',1), +15009 => array('Ungültiges Tortendiagramm. Die Summe aller Daten ist Null.',0), +15010 => array('Die Summe aller Daten ist Null.',0), +15011 => array('Um Bildtransformationen benutzen zu können, muss die Datei jpgraph_imgtrans.php eingefügt werden (per include).',0), + +/* +** jpgraph_plotband +*/ + +16001 => array('Die Dichte für das Pattern muss zwischen 1 und 100 sein. (Du hast %f eingegeben)',1), +16002 => array('Es wurde keine Position für das Pattern angegeben.',0), +16003 => array('Unbekannte Pattern-Definition (%d)',0), +16004 => array('Der Mindeswert für das PlotBand ist größer als der Maximalwert. Bitte korrigiere dies!',0), + + +/* +** jpgraph_polar +*/ + +17001 => array('PolarPlots müssen eine gerade Anzahl von Datenpunkten haben. Jeder Datenpunkt ist ein Tupel (Winkel, Radius).',0), +17002 => array('Unbekannte Ausrichtung für X-Achsen-Titel. (%s)',1), +//17003 => array('Set90AndMargin() wird für PolarGraph nicht unterstützt.',0), +17004 => array('Unbekannter Achsentyp für PolarGraph. Er muss entweder \'lin\' oder \'log\' sein.',0), + +/* +** jpgraph_radar +*/ + +18001 => array('ClientSideImageMaps werden für RadarPlots nicht unterstützt.',0), +18002 => array('RadarGraph::SupressTickMarks() sollte nicht mehr verwendet werden. Benutze stattdessen HideTickMarks().',0), +18003 => array('Ungültiger Achsentyp für RadarPlot (%s). Er muss entweder \'lin\' oder \'log\' sein.',1), +18004 => array('Die RadarPlot-Größe muss zwischen 0.1 und 1 sein. (Dein Wert=%f)',1), +18005 => array('RadarPlot: nicht unterstützte Tick-Dichte: %d',1), +18006 => array('Minimum Daten %f (RadarPlots sollten nur verwendet werden, wenn alle Datenpunkte einen Wert > 0 haben).',1), +18007 => array('Die Anzahl der Titel entspricht nicht der Anzahl der Datenpunkte.',0), +18008 => array('Jeder RadarPlot muss die gleiche Anzahl von Datenpunkten haben.',0), + +/* +** jpgraph_regstat +*/ + +19001 => array('Spline: Anzahl der X- und Y-Koordinaten muss gleich sein.',0), +19002 => array('Ungültige Dateneingabe für Spline. Zwei oder mehr aufeinanderfolgende X-Werte sind identisch. Jeder eigegebene X-Wert muss unterschiedlich sein, weil vom mathematischen Standpunkt ein Eins-zu-Eins-Mapping vorliegen muss, d.h. jeder X-Wert korrespondiert mit exakt einem Y-Wert.',0), +19003 => array('Bezier: Anzahl der X- und Y-Koordinaten muss gleich sein.',0), + +/* +** jpgraph_scatter +*/ + +20001 => array('Fieldplots müssen die gleiche Anzahl von X und Y Datenpunkten haben.',0), +20002 => array('Bei Fieldplots muss ein Winkel für jeden X und Y Datenpunkt angegeben werden.',0), +20003 => array('Scatterplots müssen die gleiche Anzahl von X- und Y-Datenpunkten haben.',0), + +/* +** jpgraph_stock +*/ + +21001 => array('Die Anzahl der Datenwerte für Stock-Charts müssen ein Mehrfaches von %d Datenpunkten sein.',1), + +/* +** jpgraph_plotmark +*/ + +23001 => array('Der Marker "%s" existiert nicht in der Farbe: %d',2), +23002 => array('Der Farb-Index ist zu hoch für den Marker "%s"',1), +23003 => array('Ein Dateiname muss angegeben werden, wenn Du den Marker-Typ auf MARK_IMG setzt.',0), + +/* +** jpgraph_utils +*/ + +24001 => array('FuncGenerator : Keine Funktion definiert. ',0), +24002 => array('FuncGenerator : Syntax-Fehler in der Funktionsdefinition ',0), +24003 => array('DateScaleUtils: Unknown tick type specified in call to GetTicks()',0), + +/* +** jpgraph +*/ + +25001 => array('Diese PHP-Installation ist nicht mit der GD-Bibliothek kompiliert. Bitte kompiliere PHP mit GD-Unterstützung neu, damit JpGraph funktioniert. (Weder die Funktion imagetypes() noch imagecreatefromstring() existiert!)',0), +25002 => array('Diese PHP-Installation scheint nicht die benötigte GD-Bibliothek zu unterstützen. Bitte schau in der PHP-Dokumentation nach, wie man die GD-Bibliothek installiert und aktiviert.',0), +25003 => array('Genereller PHP Fehler : Bei %s:%d : %s',3), +25004 => array('Genereller PHP Fehler : %s ',1), +25005 => array('PHP_SELF, die PHP-Global-Variable kann nicht ermittelt werden. PHP kann nicht von der Kommandozeile gestartet werden, wenn der Cache oder die Bilddateien automatisch benannt werden sollen.',0), +25006 => array('Die Benutzung der FF_CHINESE (FF_BIG5) Schriftfamilie benötigt die iconv() Funktion in Deiner PHP-Konfiguration. Dies wird nicht defaultmäßig in PHP kompiliert (benötigt "--width-iconv" bei der Konfiguration).',0), +25007 => array('Du versuchst das lokale (%s) zu verwenden, was von Deiner PHP-Installation nicht unterstützt wird. Hinweis: Benutze \'\', um das defaultmäßige Lokale für diese geographische Region festzulegen.',1), +25008 => array('Die Bild-Breite und Höhe in Graph::Graph() müssen numerisch sein',0), +25009 => array('Die Skalierung der Achsen muss angegeben werden mit Graph::SetScale()',0), + +25010 => array('Graph::Add() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0), +25011 => array('Graph::AddY2() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0), +25012 => array('Graph::AddYN() Du hast versucht, einen leeren Plot zum Graph hinzuzufügen.',0), +25013 => array('Es können nur Standard-Plots zu multiplen Y-Achsen hinzugefügt werden',0), +25014 => array('Graph::AddText() Du hast versucht, einen leeren Text zum Graph hinzuzufügen.',0), +25015 => array('Graph::AddLine() Du hast versucht, eine leere Linie zum Graph hinzuzufügen.',0), +25016 => array('Graph::AddBand() Du hast versucht, ein leeres Band zum Graph hinzuzufügen.',0), +25017 => array('Du benutzt GD 2.x und versuchst, ein Hintergrundbild in einem Truecolor-Bild zu verwenden. Um Hintergrundbilder mit GD 2.x zu verwenden, ist es notwendig, Truecolor zu aktivieren, indem die USE_TRUECOLOR-Konstante auf TRUE gesetzt wird. Wegen eines Bugs in GD 2.0.1 ist die Qualität der Schrift sehr schlecht, wenn Truetype-Schrift in Truecolor-Bildern verwendet werden.',0), +25018 => array('Falscher Dateiname für Graph::SetBackgroundImage() : "%s" muss eine gültige Dateinamenerweiterung (jpg,gif,png) haben, wenn die automatische Dateityperkennung verwenndet werden soll.',1), +25019 => array('Unbekannte Dateinamenerweiterung (%s) in Graph::SetBackgroundImage() für Dateiname: "%s"',2), + +25020 => array('Graph::SetScale(): Dar Maximalwert muss größer sein als der Mindestwert.',0), +25021 => array('Unbekannte Achsendefinition für die Y-Achse. (%s)',1), +25022 => array('Unbekannte Achsendefinition für die X-Achse. (%s)',1), +25023 => array('Nicht unterstützter Y2-Achsentyp: "%s" muss einer von (lin,log,int) sein.',1), +25024 => array('Nicht unterstützter X-Achsentyp: "%s" muss einer von (lin,log,int) sein.',1), +25025 => array('Nicht unterstützte Tick-Dichte: %d',1), +25026 => array('Nicht unterstützter Typ der nicht angegebenen Y-Achse. Du hast entweder: 1. einen Y-Achsentyp für automatisches Skalieren definiert, aber keine Plots angegeben. 2. eine Achse direkt definiert, aber vergessen, die Tick-Dichte zu festzulegen.',0), +25027 => array('Kann cached CSIM "%s" zum Lesen nicht öffnen.',1), +25028 => array('Apache/PHP hat keine Schreibrechte, in das CSIM-Cache-Verzeichnis (%s) zu schreiben. Überprüfe die Rechte.',1), +25029 => array('Kann nicht in das CSIM "%s" schreiben. Überprüfe die Schreibrechte und den freien Speicherplatz.',1), + +25030 => array('Fehlender Skriptname für StrokeCSIM(). Der Name des aktuellen Skriptes muss als erster Parameter von StrokeCSIM() angegeben werden.',0), +25031 => array('Der Achsentyp muss mittels Graph::SetScale() angegeben werden.',0), +25032 => array('Es existieren keine Plots für die Y-Achse nbr:%d',1), +25033 => array('',0), +25034 => array('Undefinierte X-Achse kann nicht gezeichnet werden. Es wurden keine Plots definiert.',0), +25035 => array('Du hast Clipping aktiviert. Clipping wird nur für Diagramme mit 0 oder 90 Grad Rotation unterstützt. Bitte verändere Deinen Rotationswinkel (=%d Grad) dementsprechend oder deaktiviere Clipping.',1), +25036 => array('Unbekannter Achsentyp AxisStyle() : %s',1), +25037 => array('Das Bildformat Deines Hintergrundbildes (%s) wird von Deiner System-Konfiguration nicht unterstützt. ',1), +25038 => array('Das Hintergrundbild scheint von einem anderen Typ (unterschiedliche Dateierweiterung) zu sein als der angegebene Typ. Angegebenen: %s; Datei: %s',2), +25039 => array('Hintergrundbild kann nicht gelesen werden: "%s"',1), + +25040 => array('Es ist nicht möglich, sowohl ein Hintergrundbild als auch eine Hintergrund-Landesflagge anzugeben.',0), +25041 => array('Um Landesflaggen als Hintergrund benutzen zu können, muss die Datei "jpgraph_flags.php" eingefügt werden (per include).',0), +25042 => array('Unbekanntes Hintergrundbild-Layout',0), +25043 => array('Unbekannter Titelhintergrund-Stil.',0), +25044 => array('Automatisches Skalieren kann nicht verwendet werden, weil es unmöglich ist, einen gültigen min/max Wert für die Y-Achse zu ermitteln (nur Null-Werte).',0), +25045 => array('Die Schriftfamilien FF_HANDWRT und FF_BOOK sind wegen Copyright-Problemen nicht mehr verfügbar. Diese Schriften können nicht mehr mit JpGraph verteilt werden. Bitte lade Dir Schriften von http://corefonts.sourceforge.net/ herunter.',0), +25046 => array('Angegebene TTF-Schriftfamilie (id=%d) ist unbekannt oder existiert nicht. Bitte merke Dir, dass TTF-Schriften wegen Copyright-Problemen nicht mit JpGraph mitgeliefert werden. Du findest MS-TTF-Internetschriften (arial, courier, etc.) zum Herunterladen unter http://corefonts.sourceforge.net/',1), +25047 => array('Stil %s ist nicht verfügbar für Schriftfamilie %s',2), +25048 => array('Unbekannte Schriftstildefinition [%s].',1), +25049 => array('Schriftdatei "%s" ist nicht lesbar oder existiert nicht.',1), + +25050 => array('Erstes Argument für Text::Text() muss ein String sein.',0), +25051 => array('Ungültige Richtung angegeben für Text.',0), +25052 => array('PANIK: Interner Fehler in SuperScript::Stroke(). Unbekannte vertikale Ausrichtung für Text.',0), +25053 => array('PANIK: Interner Fehler in SuperScript::Stroke(). Unbekannte horizontale Ausrichtung für Text.',0), +25054 => array('Interner Fehler: Unbekannte Grid-Achse %s',1), +25055 => array('Axis::SetTickDirection() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetTickSide().',0), +25056 => array('SetTickLabelMargin() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetLabelMargin().',0), +25057 => array('SetTextTicks() sollte nicht mehr verwendet werden. Benutze stattdessen SetTextTickInterval().',0), +25058 => array('TextLabelIntevall >= 1 muss angegeben werden.',0), +25059 => array('SetLabelPos() sollte nicht mehr verwendet werden. Benutze stattdessen Axis::SetLabelSide().',0), + +25060 => array('Unbekannte Ausrichtung angegeben für X-Achsentitel (%s).',1), +25061 => array('Unbekannte Ausrichtung angegeben für Y-Achsentitel (%s).',1), +25062 => array('Label unter einem Winkel werden für die Y-Achse nicht unterstützt.',0), +25063 => array('Ticks::SetPrecision() sollte nicht mehr verwendet werden. Benutze stattdessen Ticks::SetLabelFormat() (oder Ticks::SetFormatCallback()).',0), +25064 => array('Kleinere oder größere Schrittgröße ist 0. Überprüfe, ob Du fälschlicherweise SetTextTicks(0) in Deinem Skript hast. Wenn dies nicht der Fall ist, bist Du eventuell über einen Bug in JpGraph gestolpert. Bitte sende einen Report und füge den Code an, der den Fehler verursacht hat.',0), +25065 => array('Tick-Positionen müssen als array() angegeben werden',0), +25066 => array('Wenn die Tick-Positionen und -Label von Hand eingegeben werden, muss die Anzahl der Ticks und der Label gleich sein.',0), +25067 => array('Deine von Hand eingegebene Achse und Ticks sind nicht korrekt. Die Skala scheint zu klein zu sein für den Tickabstand.',0), +25068 => array('Ein Plot hat eine ungültige Achse. Dies kann beispielsweise der Fall sein, wenn Du automatisches Text-Skalieren verwendest, um ein Liniendiagramm zu zeichnen mit nur einem Datenpunkt, oder wenn die Bildfläche zu klein ist. Es kann auch der Fall sein, dass kein Datenpunkt einen numerischen Wert hat (vielleicht nur \'-\' oder \'x\').',0), +25069 => array('Grace muss größer sein als 0',0), + +25070 => array('Deine Daten enthalten nicht-numerische Werte.',0), +25071 => array('Du hast mit SetAutoMin() einen Mindestwert angegeben, der größer ist als der Maximalwert für die Achse. Dies ist nicht möglich.',0), +25072 => array('Du hast mit SetAutoMax() einen Maximalwert angegeben, der kleiner ist als der Minimalwert der Achse. Dies ist nicht möglich.',0), +25073 => array('Interner Fehler. Der Integer-Skalierungs-Algorithmus-Vergleich ist außerhalb der Grenzen (r=%f).',1), +25074 => array('Interner Fehler. Der Skalierungsbereich ist negativ (%f) [für %s Achse]. Dieses Problem könnte verursacht werden durch den Versuch, \'ungültige\' Werte in die Daten-Vektoren einzugeben (z.B. nur String- oder NULL-Werte), was beim automatischen Skalieren einen Fehler erzeugt.',2), +25075 => array('Die automatischen Ticks können nicht gesetzt werden, weil min==max.',0), +25077 => array('Einstellfaktor für die Farbe muss größer sein als 0',0), +25078 => array('Unbekannte Farbe: %s',1), +25079 => array('Unbekannte Farbdefinition: %s, Größe=%d',2), + +25080 => array('Der Alpha-Parameter für Farben muss zwischen 0.0 und 1.0 liegen.',0), +25081 => array('Das ausgewählte Grafikformat wird entweder nicht unterstützt oder ist unbekannt [%s]',1), +25082 => array('Es wurden ungültige Größen für Breite und Höhe beim Erstellen des Bildes definiert (Breite=%d, Höhe=%d).',2), +25083 => array('Es wurde eine ungültige Größe beim Kopieren des Bildes angegeben. Die Größe für das kopierte Bild wurde auf 1 Pixel oder weniger gesetzt.',0), +25084 => array('Fehler beim Erstellen eines temporären GD-Canvas. Möglicherweise liegt ein Arbeitsspeicherproblem vor.',0), +25085 => array('Ein Bild kann nicht aus dem angegebenen String erzeugt werden. Er ist entweder in einem nicht unterstützen Format oder er represäntiert ein kaputtes Bild.',0), +25086 => array('Du scheinst nur GD 1.x installiert zu haben. Um Alphablending zu aktivieren, ist GD 2.x oder höher notwendig. Bitte installiere GD 2.x oder versichere Dich, dass die Konstante USE_GD2 richtig gesetzt ist. Standardmäßig wird die installierte GD-Version automatisch erkannt. Ganz selten wird GD2 erkannt, obwohl nur GD1 installiert ist. Die Konstante USE_GD2 muss dann zu "false" gesetzt werden.',0), +25087 => array('Diese PHP-Version wurde ohne TTF-Unterstützung konfiguriert. PHP muss mit TTF-Unterstützung neu kompiliert und installiert werden.',0), +25088 => array('Die GD-Schriftunterstützung wurde falsch konfiguriert. Der Aufruf von imagefontwidth() ist fehlerhaft.',0), +25089 => array('Die GD-Schriftunterstützung wurde falsch konfiguriert. Der Aufruf von imagefontheight() ist fehlerhaft.',0), + +25090 => array('Unbekannte Richtung angegeben im Aufruf von StrokeBoxedText() [%s].',1), +25091 => array('Die interne Schrift untestützt das Schreiben von Text in einem beliebigen Winkel nicht. Benutze stattdessen TTF-Schriften.',0), +25092 => array('Es liegt entweder ein Konfigurationsproblem mit TrueType oder ein Problem beim Lesen der Schriftdatei "%s" vor. Versichere Dich, dass die Datei existiert und Leserechte und -pfad vergeben sind. (wenn \'basedir\' restriction in PHP aktiviert ist, muss die Schriftdatei im Dokumentwurzelverzeichnis abgelegt werden). Möglicherweise ist die FreeType-Bibliothek falsch installiert. Versuche, mindestens zur FreeType-Version 2.1.13 zu aktualisieren und kompiliere GD mit einem korrekten Setup neu, damit die FreeType-Bibliothek gefunden werden kann.',1), +25093 => array('Die Schriftdatei "%s" kann nicht gelesen werden beim Aufruf von Image::GetBBoxTTF. Bitte versichere Dich, dass die Schrift gesetzt wurde, bevor diese Methode aufgerufen wird, und dass die Schrift im TTF-Verzeichnis installiert ist.',1), +25094 => array('Die Textrichtung muss in einem Winkel zwischen 0 und 90 engegeben werden.',0), +25095 => array('Unbekannte Schriftfamilien-Definition. ',0), +25096 => array('Der Farbpalette können keine weiteren Farben zugewiesen werden. Dem Bild wurde bereits die größtmögliche Anzahl von Farben (%d) zugewiesen und die Palette ist voll. Verwende stattdessen ein TrueColor-Bild',0), +25097 => array('Eine Farbe wurde als leerer String im Aufruf von PushColor() angegegeben.',0), +25098 => array('Negativer Farbindex. Unpassender Aufruf von PopColor().',0), +25099 => array('Die Parameter für Helligkeit und Kontrast sind außerhalb des zulässigen Bereichs [-1,1]',0), + +25100 => array('Es liegt ein Problem mit der Farbpalette und dem GD-Setup vor. Bitte deaktiviere anti-aliasing oder verwende GD2 mit TrueColor. Wenn die GD2-Bibliothek installiert ist, versichere Dich, dass die Konstante USE_GD2 auf "true" gesetzt und TrueColor aktiviert ist.',0), +25101 => array('Ungültiges numerisches Argument für SetLineStyle(): (%d)',1), +25102 => array('Ungültiges String-Argument für SetLineStyle(): %s',1), +25103 => array('Ungültiges Argument für SetLineStyle %s',1), +25104 => array('Unbekannter Linientyp: %s',1), +25105 => array('Es wurden NULL-Daten für ein gefülltes Polygon angegeben. Sorge dafür, dass keine NULL-Daten angegeben werden.',0), +25106 => array('Image::FillToBorder : es können keine weiteren Farben zugewiesen werden.',0), +25107 => array('In Datei "%s" kann nicht geschrieben werden. Überprüfe die aktuellen Schreibrechte.',1), +25108 => array('Das Bild kann nicht gestreamt werden. Möglicherweise liegt ein Fehler im PHP/GD-Setup vor. Kompiliere PHP neu und verwende die eingebaute GD-Bibliothek, die mit PHP angeboten wird.',0), +25109 => array('Deine PHP- (und GD-lib-) Installation scheint keine bekannten Grafikformate zu unterstützen. Sorge zunächst dafür, dass GD als PHP-Modul kompiliert ist. Wenn Du außerdem JPEG-Bilder verwenden willst, musst Du die JPEG-Bibliothek installieren. Weitere Details sind in der PHP-Dokumentation zu finden.',0), + +25110 => array('Dein PHP-Installation unterstützt das gewählte Grafikformat nicht: %s',1), +25111 => array('Das gecachete Bild %s kann nicht gelöscht werden. Problem mit den Rechten?',1), +25112 => array('Das Datum der gecacheten Datei (%s) liegt in der Zukunft.',1), +25113 => array('Das gecachete Bild %s kann nicht gelöscht werden. Problem mit den Rechten?',1), +25114 => array('PHP hat nicht die erforderlichen Rechte, um in die Cache-Datei %s zu schreiben. Bitte versichere Dich, dass der Benutzer, der PHP anwendet, die entsprechenden Schreibrechte für die Datei hat, wenn Du das Cache-System in JPGraph verwenden willst.',1), +25115 => array('Berechtigung für gecachetes Bild %s kann nicht gesetzt werden. Problem mit den Rechten?',1), +25116 => array('Datei kann nicht aus dem Cache %s geöffnet werden',1), +25117 => array('Gecachetes Bild %s kann nicht zum Lesen geöffnet werden.',1), +25118 => array('Verzeichnis %s kann nicht angelegt werden. Versichere Dich, dass PHP die Schreibrechte in diesem Verzeichnis hat.',1), +25119 => array('Rechte für Datei %s können nicht gesetzt werden. Problem mit den Rechten?',1), + +25120 => array('Die Position für die Legende muss als Prozentwert im Bereich 0-1 angegeben werden.',0), +25121 => array('Eine leerer Datenvektor wurde für den Plot eingegeben. Es muss wenigstens ein Datenpunkt vorliegen.',0), +25122 => array('Stroke() muss als Subklasse der Klasse Plot definiert sein.',0), +25123 => array('Du kannst keine Text-X-Achse mit X-Koordinaten verwenden. Benutze stattdessen eine "int" oder "lin" Achse.',0), +25124 => array('Der Eingabedatenvektor mus aufeinanderfolgende Werte von 0 aufwärts beinhalten. Der angegebene Y-Vektor beginnt mit leeren Werten (NULL).',0), +25125 => array('Ungültige Richtung für statische Linie.',0), +25126 => array('Es kann kein TrueColor-Bild erzeugt werden. Überprüfe, ob die GD2-Bibliothek und PHP korrekt aufgesetzt wurden.',0), +25127 => array('The library has been configured for automatic encoding conversion of Japanese fonts. This requires that PHP has the mb_convert_encoding() function. Your PHP installation lacks this function (PHP needs the "--enable-mbstring" when compiled).',0), + +/* +**--------------------------------------------------------------------------------------------- +** Pro-version strings +**--------------------------------------------------------------------------------------------- +*/ + +/* +** jpgraph_table +*/ + +27001 => array('GTextTable: Ungültiges Argument für Set(). Das Array-Argument muss 2-- dimensional sein.',0), +27002 => array('GTextTable: Ungültiges Argument für Set()',0), +27003 => array('GTextTable: Falsche Anzahl von Argumenten für GTextTable::SetColor()',0), +27004 => array('GTextTable: Angegebener Zellenbereich, der verschmolzen werden soll, ist ungültig.',0), +27005 => array('GTextTable: Bereits verschmolzene Zellen im Bereich (%d,%d) bis (%d,%d) können nicht ein weiteres Mal verschmolzen werden.',4), +27006 => array('GTextTable: Spalten-Argument = %d liegt außerhalb der festgelegten Tabellengröße.',1), +27007 => array('GTextTable: Zeilen-Argument = %d liegt außerhalb der festgelegten Tabellengröße.',1), +27008 => array('GTextTable: Spalten- und Zeilengröße müssen zu den Dimensionen der Tabelle passen.',0), +27009 => array('GTextTable: Die Anzahl der Tabellenspalten oder -zeilen ist 0. Versichere Dich, dass die Methoden Init() oder Set() aufgerufen werden.',0), +27010 => array('GTextTable: Es wurde keine Ausrichtung beim Aufruf von SetAlign() angegeben.',0), +27011 => array('GTextTable: Es wurde eine unbekannte Ausrichtung beim Aufruf von SetAlign() abgegeben. Horizontal=%s, Vertikal=%s',2), +27012 => array('GTextTable: Interner Fehler. Es wurde ein ungültiges Argument festgeleget %s',1), +27013 => array('GTextTable: Das Argument für FormatNumber() muss ein String sein.',0), +27014 => array('GTextTable: Die Tabelle wurde weder mit einem Aufruf von Set() noch von Init() initialisiert.',0), +27015 => array('GTextTable: Der Zellenbildbedingungstyp muss entweder TIMG_WIDTH oder TIMG_HEIGHT sein.',0), + +/* +** jpgraph_windrose +*/ + +22001 => array('Die Gesamtsumme der prozentualen Anteile aller Windrosenarme darf 100%% nicht überschreiten!\n(Aktuell max: %d)',1), +22002 => array('Das Bild ist zu klein für eine Skala. Bitte vergrößere das Bild.',0), +22004 => array('Die Etikettendefinition für Windrosenrichtungen müssen 16 Werte haben (eine für jede Kompassrichtung).',0), +22005 => array('Der Linientyp für radiale Linien muss einer von ("solid","dotted","dashed","longdashed") sein.',0), +22006 => array('Es wurde ein ungültiger Windrosentyp angegeben.',0), +22007 => array('Es wurden zu wenig Werte für die Bereichslegende angegeben.',0), +22008 => array('Interner Fehler: Versuch, eine freie Windrose zu plotten, obwohl der Typ keine freie Windrose ist.',0), +22009 => array('Du hast die gleiche Richtung zweimal angegeben, einmal mit einem Winkel und einmal mit einer Kompassrichtung (%f Grad).',0), +22010 => array('Die Richtung muss entweder ein numerischer Wert sein oder eine der 16 Kompassrichtungen',0), +22011 => array('Der Windrosenindex muss ein numerischer oder Richtungswert sein. Du hast angegeben Index=%d',1), +22012 => array('Die radiale Achsendefinition für die Windrose enthält eine nicht aktivierte Richtung.',0), +22013 => array('Du hast dasselbe Look&Feel für die gleiche Kompassrichtung zweimal engegeben, einmal mit Text und einmal mit einem Index (Index=%d)',1), +22014 => array('Der Index für eine Kompassrichtung muss zwischen 0 und 15 sein.',0), +22015 => array('Du hast einen unbekannten Windrosenplottyp angegeben.',0), +22016 => array('Der Windrosenarmindex muss ein numerischer oder ein Richtungswert sein.',0), +22017 => array('Die Windrosendaten enthalten eine Richtung, die nicht aktiviert ist. Bitte berichtige, welche Label angezeigt werden sollen.',0), +22018 => array('Du hast für dieselbe Kompassrichtung zweimal Daten angegeben, einmal mit Text und einmal mit einem Index (Index=%d)',1), +22019 => array('Der Index für eine Richtung muss zwischen 0 und 15 sein. Winkel dürfen nicht für einen regelmäßigen Windplot angegeben werden, sondern entweder ein Index oder eine Kompassrichtung.',0), +22020 => array('Der Windrosenplot ist zu groß für die angegebene Bildgröße. Benutze entweder WindrosePlot::SetSize(), um den Plot kleiner zu machen oder vergrößere das Bild im ursprünglichen Aufruf von WindroseGraph().',0), +22021 => array('It is only possible to add Text, IconPlot or WindrosePlot to a Windrose Graph',0), +/* +** jpgraph_odometer +*/ + +13001 => array('Unbekannter Nadeltypstil (%d).',1), +13002 => array('Ein Wert für das Odometer (%f) ist außerhalb des angegebenen Bereichs [%f,%f]',3), + +/* +** jpgraph_barcode +*/ + +1001 => array('Unbekannte Kodier-Specifikation: %s',1), +1002 => array('datenvalidierung schlug fehl. [%s] kann nicht mittels der Kodierung "%s" kodiert werden',2), +1003 => array('Interner Kodierfehler. Kodieren von %s ist nicht möglich in Code 128',1), +1004 => array('Interner barcode Fehler. Unbekannter UPC-E Kodiertyp: %s',1), +1005 => array('Interner Fehler. Das Textzeichen-Tupel (%s, %s) kann nicht im Code-128 Zeichensatz C kodiert werden.',2), +1006 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, CTRL in CHARSET != A zu kodieren.',0), +1007 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, DEL in CHARSET != B zu kodieren.',0), +1008 => array('Interner Kodierfehler für CODE 128. Es wurde versucht, kleine Buchstaben in CHARSET != B zu kodieren.',0), +1009 => array('Kodieren mittels CODE 93 wird noch nicht unterstützt.',0), +1010 => array('Kodieren mittels POSTNET wird noch nicht unterstützt.',0), +1011 => array('Nicht untrstütztes Barcode-Backend für den Typ %s',1), + +/* +** PDF417 +*/ + +26001 => array('PDF417: Die Anzahl der Spalten muss zwischen 1 und 30 sein.',0), +26002 => array('PDF417: Der Fehler-Level muss zwischen 0 und 8 sein.',0), +26003 => array('PDF417: Ungültiges Format für Eingabedaten, um sie mit PDF417 zu kodieren.',0), +26004 => array('PDF417: die eigebenen Daten können nicht mit Fehler-Level %d und %d spalten kodiert werden, weil daraus zu viele Symbole oder mehr als 90 Zeilen resultieren.',2), +26005 => array('PDF417: Die Datei "%s" kann nicht zum Schreiben geöffnet werden.',1), +26006 => array('PDF417: Interner Fehler. Die Eingabedatendatei für PDF417-Cluster %d ist fehlerhaft.',1), +26007 => array('PDF417: Interner Fehler. GetPattern: Ungültiger Code-Wert %d (Zeile %d)',2), +26008 => array('PDF417: Interner Fehler. Modus wurde nicht in der Modusliste!! Modus %d',1), +26009 => array('PDF417: Kodierfehler: Ungültiges Zeichen. Zeichen kann nicht mit ASCII-Code %d kodiert werden.',1), +26010 => array('PDF417: Interner Fehler: Keine Eingabedaten beim Dekodieren.',0), +26011 => array('PDF417: Kodierfehler. Numerisches Kodieren bei nicht-numerischen Daten nicht möglich.',0), +26012 => array('PDF417: Interner Fehler. Es wurden für den Binary-Kompressor keine Daten zum Dekodieren eingegeben.',0), +26013 => array('PDF417: Interner Fehler. Checksum Fehler. Koeffiziententabellen sind fehlerhaft.',0), +26014 => array('PDF417: Interner Fehler. Es wurden keine Daten zum Berechnen von Kodewörtern eingegeben.',0), +26015 => array('PDF417: Interner Fehler. Ein Eintrag 0 in die Statusübertragungstabellen ist nicht NULL. Eintrag 1 = (%s)',1), +26016 => array('PDF417: Interner Fehler: Nichtregistrierter Statusübertragungsmodus beim Dekodieren.',0), + + +); + +?> diff --git a/html/includes/jpgraph/src/lang/en.inc.php b/html/includes/jpgraph/src/lang/en.inc.php new file mode 100644 index 0000000000..4844dc8681 --- /dev/null +++ b/html/includes/jpgraph/src/lang/en.inc.php @@ -0,0 +1,501 @@ +,) +// The argument placeholders in the error strings are in printf() - format + +$_jpg_messages = array( + +/* +** Headers already sent error. This is formatted as HTML different since this will be sent back directly as text +*/ +10 => array('
JpGraph Error: +HTTP headers have already been sent.
Caused by output from file %s at line %d.
Explanation:
HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it\'s image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).

Most likely you have some text in your script before the call to Graph::Stroke(). If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser.

For example it is a common mistake to leave a blank line before the opening "<?php".

',2), + +/* +** Setup errors +*/ +11 => array('No path specified for CACHE_DIR. Please specify CACHE_DIR manually in jpg-config.inc',0), +12 => array('No path specified for TTF_DIR and path can not be determined automatically. Please specify TTF_DIR manually (in jpg-config.inc).',0), +13 => array('The installed PHP version (%s) is not compatible with this release of the library. The library requires at least PHP version %s',2), +/* +** jpgraph_bar +*/ + +2001 => array('Number of colors is not the same as the number of patterns in BarPlot::SetPattern()',0), +2002 => array('Unknown pattern specified in call to BarPlot::SetPattern()',0), +2003 => array('Number of X and Y points are not equal. Number of X-points: %d Number of Y-points: %d',2), +2004 => array('All values for a barplot must be numeric. You have specified value nr [%d] == %s',2), +2005 => array('You have specified an empty array for shadow colors in the bar plot.',0), +2006 => array('Unknown position for values on bars : %s',1), +2007 => array('Cannot create GroupBarPlot from empty plot array.',0), +2008 => array('Group bar plot element nbr %d is undefined or empty.',0), +2009 => array('One of the objects submitted to GroupBar is not a BarPlot. Make sure that you create the GroupBar plot from an array of BarPlot or AccBarPlot objects. (Class = %s)',1), +2010 => array('Cannot create AccBarPlot from empty plot array.',0), +2011 => array('Acc bar plot element nbr %d is undefined or empty.',1), +2012 => array('One of the objects submitted to AccBar is not a BarPlot. Make sure that you create the AccBar plot from an array of BarPlot objects. (Class=%s)',1), +2013 => array('You have specified an empty array for shadow colors in the bar plot.',0), +2014 => array('Number of datapoints for each data set in accbarplot must be the same',0), + + +/* +** jpgraph_date +*/ + +3001 => array('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both',0), + +/* +** jpgraph_error +*/ + +4002 => array('Error in input data to LineErrorPlot. Number of data points must be a multiple of 3',0), + +/* +** jpgraph_flags +*/ + +5001 => array('Unknown flag size (%d).',1), +5002 => array('Flag index %s does not exist.',1), +5003 => array('Invalid ordinal number (%d) specified for flag index.',1), +5004 => array('The (partial) country name %s does not have a corresponding flag image. The flag may still exist but under another name, e.g. instead of "usa" try "united states".',1), + + +/* +** jpgraph_gantt +*/ + +6001 => array('Internal error. Height for ActivityTitles is < 0',0), +6002 => array('You can\'t specify negative sizes for Gantt graph dimensions. Use 0 to indicate that you want the library to automatically determine a dimension.',0), +6003 => array('Invalid format for Constrain parameter at index=%d in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Constrain-To,Constrain-Type)',1), +6004 => array('Invalid format for Progress parameter at index=%d in CreateSimple(). Parameter must start with index 0 and contain arrays of (Row,Progress)',1), +6005 => array('SetScale() is not meaningful with Gantt charts.',0), +6006 => array('Cannot autoscale Gantt chart. No dated activities exist. [GetBarMinMax() start >= n]',0), +6007 => array('Sanity check for automatic Gantt chart size failed. Either the width (=%d) or height (=%d) is larger than MAX_GANTTIMG_SIZE. This could potentially be caused by a wrong date in one of the activities.',2), +6008 => array('You have specified a constrain from row=%d to row=%d which does not have any activity',2), +6009 => array('Unknown constrain type specified from row=%d to row=%d',2), +6010 => array('Illegal icon index for Gantt builtin icon [%d]',1), +6011 => array('Argument to IconImage must be string or integer',0), +6012 => array('Unknown type in Gantt object title specification',0), +6015 => array('Illegal vertical position %d',1), +6016 => array('Date string (%s) specified for Gantt activity can not be interpretated. Please make sure it is a valid time string, e.g. 2005-04-23 13:30',1), +6017 => array('Unknown date format in GanttScale (%s).',1), +6018 => array('Interval for minutes must divide the hour evenly, e.g. 1,5,10,12,15,20,30 etc You have specified an interval of %d minutes.',1), +6019 => array('The available width (%d) for minutes are to small for this scale to be displayed. Please use auto-sizing or increase the width of the graph.',1), +6020 => array('Interval for hours must divide the day evenly, e.g. 0:30, 1:00, 1:30, 4:00 etc. You have specified an interval of %d',1), +6021 => array('Unknown formatting style for week.',0), +6022 => array('Gantt scale has not been specified.',0), +6023 => array('If you display both hour and minutes the hour interval must be 1 (Otherwise it doesn\'t make sense to display minutes).',0), +6024 => array('CSIM Target must be specified as a string. Start of target is: %d',1), +6025 => array('CSIM Alt text must be specified as a string. Start of alt text is: %d',1), +6027 => array('Progress value must in range [0, 1]',0), +6028 => array('Specified height (%d) for gantt bar is out of range.',1), +6029 => array('Offset for vertical line must be in range [0,1]',0), +6030 => array('Unknown arrow direction for link.',0), +6031 => array('Unknown arrow type for link.',0), +6032 => array('Internal error: Unknown path type (=%d) specified for link.',1), + +/* +** jpgraph_gradient +*/ + +7001 => array('Unknown gradient style (=%d).',1), + +/* +** jpgraph_iconplot +*/ + +8001 => array('Mix value for icon must be between 0 and 100.',0), +8002 => array('Anchor position for icons must be one of "top", "bottom", "left", "right" or "center"',0), +8003 => array('It is not possible to specify both an image file and a country flag for the same icon.',0), +8004 => array('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.',0), + +/* +** jpgraph_imgtrans +*/ + +9001 => array('Value for image transformation out of bounds. Vanishing point on horizon must be specified as a value between 0 and 1.',0), + +/* +** jpgraph_lineplot +*/ + +10001 => array('LinePlot::SetFilled() is deprecated. Use SetFillColor()',0), +10002 => array('Plot too complicated for fast line Stroke. Use standard Stroke()',0), +10003 => array('Each plot in an accumulated lineplot must have the same number of data points.',0), +/* +** jpgraph_log +*/ + +11001 => array('Your data contains non-numeric values.',0), +11002 => array('Negative data values can not be used in a log scale.',0), +11003 => array('Your data contains non-numeric values.',0), +11004 => array('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.',0), +11005 => array('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.',0), + +/* +** jpgraph_mgraph +*/ + +/* 12001 => array("You are using GD 2.x and are trying to use a background images on a non truecolor image. To use background images with GD 2.x it is necessary to enable truecolor by setting the USE_TRUECOLOR constant to TRUE. Due to a bug in GD 2.0.1 using any truetype fonts with truecolor images will result in very poor quality fonts.",0),*/ + +12002 => array('Incorrect file name for MGraph::SetBackgroundImage() : %s Must have a valid image extension (jpg,gif,png) when using auto detection of image type',1), +12003 => array('Unknown file extension (%s) in MGraph::SetBackgroundImage() for filename: %s',2), +12004 => array('The image format of your background image (%s) is not supported in your system configuration. ',1), +12005 => array('Can\'t read background image: %s',1), +12006 => array('Illegal sizes specified for width or height when creating an image, (width=%d, height=%d)',2), +12007 => array('Argument to MGraph::Add() is not a valid GD image handle.',0), +12008 => array('Your PHP (and GD-lib) installation does not appear to support any known graphic formats.',0), +12009 => array('Your PHP installation does not support the chosen graphic format: %s',1), +12010 => array('Can\'t create or stream image to file %s Check that PHP has enough permission to write a file to the current directory.',1), +12011 => array('Can\'t create truecolor image. Check that you really have GD2 library installed.',0), + +/* +** jpgraph_pie3d +*/ + +14001 => array('Pie3D::ShowBorder() . Deprecated function. Use Pie3D::SetEdge() to control the edges around slices.',0), +14002 => array('PiePlot3D::SetAngle() 3D Pie projection angle must be between 5 and 85 degrees.',0), +14003 => array('Internal assertion failed. Pie3D::Pie3DSlice',0), +14004 => array('Slice start angle must be between 0 and 360 degrees.',0), +14005 => array('Pie3D Internal error: Trying to wrap twice when looking for start index',0,), +14006 => array('Pie3D Internal Error: Z-Sorting algorithm for 3D Pies is not working properly (2). Trying to wrap twice while stroking.',0), +14007 => array('Width for 3D Pie is 0. Specify a size > 0',0), + +/* +** jpgraph_pie +*/ + +15001 => array('PiePLot::SetTheme() Unknown theme: %s',1), +15002 => array('Argument to PiePlot::ExplodeSlice() must be an integer',0), +15003 => array('Argument to PiePlot::Explode() must be an array with integer distances.',0), +15004 => array('Slice start angle must be between 0 and 360 degrees.',0), +15005 => array('PiePlot::SetFont() is deprecated. Use PiePlot->value->SetFont() instead.',0), +15006 => array('PiePlot::SetSize() Radius for pie must either be specified as a fraction [0, 0.5] of the size of the image or as an absolute size in pixels in the range [10, 1000]',0), +15007 => array('PiePlot::SetFontColor() is deprecated. Use PiePlot->value->SetColor() instead.',0), +15008 => array('PiePlot::SetLabelType() Type for pie plots must be 0 or 1 (not %d).',1), +15009 => array('Illegal pie plot. Sum of all data is zero for Pie Plot',0), +15010 => array('Sum of all data is 0 for Pie.',0), +15011 => array('In order to use image transformation you must include the file jpgraph_imgtrans.php in your script.',0), + +/* +** jpgraph_plotband +*/ + +16001 => array('Density for pattern must be between 1 and 100. (You tried %f)',1), +16002 => array('No positions specified for pattern.',0), +16003 => array('Unknown pattern specification (%d)',0), +16004 => array('Min value for plotband is larger than specified max value. Please correct.',0), + + +/* +** jpgraph_polar +*/ + +17001 => array('Polar plots must have an even number of data point. Each data point is a tuple (angle,radius).',0), +17002 => array('Unknown alignment specified for X-axis title. (%s)',1), +//17003 => array('Set90AndMargin() is not supported for polar graphs.',0), +17004 => array('Unknown scale type for polar graph. Must be "lin" or "log"',0), + +/* +** jpgraph_radar +*/ + +18001 => array('Client side image maps not supported for RadarPlots.',0), +18002 => array('RadarGraph::SupressTickMarks() is deprecated. Use HideTickMarks() instead.',0), +18003 => array('Illegal scale for radarplot (%s). Must be \'lin\' or \'log\'',1), +18004 => array('Radar Plot size must be between 0.1 and 1. (Your value=%f)',1), +18005 => array('RadarPlot Unsupported Tick density: %d',1), +18006 => array('Minimum data %f (Radar plots should only be used when all data points > 0)',1), +18007 => array('Number of titles does not match number of points in plot.',0), +18008 => array('Each radar plot must have the same number of data points.',0), + +/* +** jpgraph_regstat +*/ + +19001 => array('Spline: Number of X and Y coordinates must be the same',0), +19002 => array('Invalid input data for spline. Two or more consecutive input X-values are equal. Each input X-value must differ since from a mathematical point of view it must be a one-to-one mapping, i.e. each X-value must correspond to exactly one Y-value.',0), +19003 => array('Bezier: Number of X and Y coordinates must be the same',0), + +/* +** jpgraph_scatter +*/ + +20001 => array('Fieldplots must have equal number of X and Y points.',0), +20002 => array('Fieldplots must have an angle specified for each X and Y points.',0), +20003 => array('Scatterplot must have equal number of X and Y points.',0), + +/* +** jpgraph_stock +*/ + +21001 => array('Data values for Stock charts must contain an even multiple of %d data points.',1), + +/* +** jpgraph_plotmark +*/ + +23001 => array('This marker "%s" does not exist in color with index: %d',2), +23002 => array('Mark color index too large for marker "%s"',1), +23003 => array('A filename must be specified if you set the mark type to MARK_IMG.',0), + +/* +** jpgraph_utils +*/ + +24001 => array('FuncGenerator : No function specified. ',0), +24002 => array('FuncGenerator : Syntax error in function specification ',0), +24003 => array('DateScaleUtils: Unknown tick type specified in call to GetTicks()',0), +/* +** jpgraph +*/ + +25002 => array('Your PHP installation does not seem to have the required GD 2.x library enabled. Please see the PHP documentation, "Image" section. Make sure that "php_gd2.dll" statement is uncomment in the [modules] section in the php.ini file.',0), +25003 => array('General PHP error : At %s:%d : %s',3), +25004 => array('General PHP error : %s ',1), +25005 => array('Can\'t access PHP_SELF, PHP global variable. You can\'t run PHP from command line if you want to use the \'auto\' naming of cache or image files.',0), +25006 => array('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).',0), +25007 => array('You are trying to use the locale (%s) which your PHP installation does not support. Hint: Use \'\' to indicate the default locale for this geographic region.',1), +25008 => array('Image width/height argument in Graph::Graph() must be numeric',0), +25009 => array('You must specify what scale to use with a call to Graph::SetScale()',0), + +25010 => array('Graph::Add() You tried to add a null plot to the graph.',0), +25011 => array('Graph::AddY2() You tried to add a null plot to the graph.',0), +25012 => array('Graph::AddYN() You tried to add a null plot to the graph.',0), +25013 => array('You can only add standard plots to multiple Y-axis',0), +25014 => array('Graph::AddText() You tried to add a null text to the graph.',0), +25015 => array('Graph::AddLine() You tried to add a null line to the graph.',0), +25016 => array('Graph::AddBand() You tried to add a null band to the graph.',0), +25017 => array('You are using GD 2.x and are trying to use a background images on a non truecolor image. To use background images with GD 2.x it is necessary to enable truecolor by setting the USE_TRUECOLOR constant to TRUE. Due to a bug in GD 2.0.1 using any truetype fonts with truecolor images will result in very poor quality fonts.',0), +25018 => array('Incorrect file name for Graph::SetBackgroundImage() : "%s" Must have a valid image extension (jpg,gif,png) when using auto detection of image type',1), +25019 => array('Unknown file extension (%s) in Graph::SetBackgroundImage() for filename: "%s"',2), + +25020 => array('Graph::SetScale(): Specified Max value must be larger than the specified Min value.',0), +25021 => array('Unknown scale specification for Y-scale. (%s)',1), +25022 => array('Unknown scale specification for X-scale. (%s)',1), +25023 => array('Unsupported Y2 axis type: "%s" Must be one of (lin,log,int)',1), +25024 => array('Unsupported Y axis type: "%s" Must be one of (lin,log,int)',1), +25025 => array('Unsupported Tick density: %d',1), +25026 => array('Can\'t draw unspecified Y-scale. You have either: 1. Specified an Y axis for auto scaling but have not supplied any plots. 2. Specified a scale manually but have forgot to specify the tick steps',0), +25027 => array('Can\'t open cached CSIM "%s" for reading.',1), +25028 => array('Apache/PHP does not have permission to write to the CSIM cache directory (%s). Check permissions.',1), +25029 => array('Can\'t write CSIM "%s" for writing. Check free space and permissions.',1), + +25030 => array('Missing script name in call to StrokeCSIM(). You must specify the name of the actual image script as the first parameter to StrokeCSIM().',0), +25031 => array('You must specify what scale to use with a call to Graph::SetScale().',0), +25032 => array('No plots for Y-axis nbr:%d',1), +25033 => array('',0), +25034 => array('Can\'t draw unspecified X-scale. No plots specified.',0), +25035 => array('You have enabled clipping. Clipping is only supported for graphs at 0 or 90 degrees rotation. Please adjust you current angle (=%d degrees) or disable clipping.',1), +25036 => array('Unknown AxisStyle() : %s',1), +25037 => array('The image format of your background image (%s) is not supported in your system configuration. ',1), +25038 => array('Background image seems to be of different type (has different file extension) than specified imagetype. Specified: %s File: %s',2), +25039 => array('Can\'t read background image: "%s"',1), + +25040 => array('It is not possible to specify both a background image and a background country flag.',0), +25041 => array('In order to use Country flags as backgrounds you must include the "jpgraph_flags.php" file.',0), +25042 => array('Unknown background image layout',0), +25043 => array('Unknown title background style.',0), +25044 => array('Cannot use auto scaling since it is impossible to determine a valid min/max value of the Y-axis (only null values).',0), +25045 => array('Font families FF_HANDWRT and FF_BOOK are no longer available due to copyright problem with these fonts. Fonts can no longer be distributed with JpGraph. Please download fonts from http://corefonts.sourceforge.net/',0), +25046 => array('Specified TTF font family (id=%d) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/',1), +25047 => array('Style %s is not available for font family %s',2), +25048 => array('Unknown font style specification [%s].',1), +25049 => array('Font file "%s" is not readable or does not exist.',1), + +25050 => array('First argument to Text::Text() must be a string.',0), +25051 => array('Invalid direction specified for text.',0), +25052 => array('PANIC: Internal error in SuperScript::Stroke(). Unknown vertical alignment for text',0), +25053 => array('PANIC: Internal error in SuperScript::Stroke(). Unknown horizontal alignment for text',0), +25054 => array('Internal error: Unknown grid axis %s',1), +25055 => array('Axis::SetTickDirection() is deprecated. Use Axis::SetTickSide() instead',0), +25056 => array('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.',0), +25057 => array('SetTextTicks() is deprecated. Use SetTextTickInterval() instead.',0), +25058 => array('Text label interval must be specified >= 1.',0), +25059 => array('SetLabelPos() is deprecated. Use Axis::SetLabelSide() instead.',0), + +25060 => array('Unknown alignment specified for X-axis title. (%s)',1), +25061 => array('Unknown alignment specified for Y-axis title. (%s)',1), +25062 => array('Labels at an angle are not supported on Y-axis',0), +25063 => array('Ticks::SetPrecision() is deprecated. Use Ticks::SetLabelFormat() (or Ticks::SetFormatCallback()) instead',0), +25064 => array('Minor or major step size is 0. Check that you haven\'t got an accidental SetTextTicks(0) in your code. If this is not the case you might have stumbled upon a bug in JpGraph. Please report this and if possible include the data that caused the problem',0), +25065 => array('Tick positions must be specified as an array()',0), +25066 => array('When manually specifying tick positions and labels the number of labels must be the same as the number of specified ticks.',0), +25067 => array('Your manually specified scale and ticks is not correct. The scale seems to be too small to hold any of the specified tick marks.',0), +25068 => array('A plot has an illegal scale. This could for example be that you are trying to use text auto scaling to draw a line plot with only one point or that the plot area is too small. It could also be that no input data value is numeric (perhaps only \'-\' or \'x\')',0), +25069 => array('Grace must be larger then 0',0), +25070 => array('Either X or Y data arrays contains non-numeric values. Check that the data is really specified as numeric data and not as strings. It is an error to specify data for example as \'-2345.2\' (using quotes).',0), +25071 => array('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.',0), +25072 => array('You have specified a max value with SetAutoMax() which is smaller than the minimum value used for the scale. This is not possible.',0), +25073 => array('Internal error. Integer scale algorithm comparison out of bound (r=%f)',1), +25074 => array('Internal error. The scale range is negative (%f) [for %s scale] This problem could potentially be caused by trying to use \"illegal\" values in the input data arrays (like trying to send in strings or only NULL values) which causes the auto scaling to fail.',2), +25075 => array('Can\'t automatically determine ticks since min==max.',0), +25077 => array('Adjustment factor for color must be > 0',0), +25078 => array('Unknown color: %s',1), +25079 => array('Unknown color specification: %s, size=%d',2), + +25080 => array('Alpha parameter for color must be between 0.0 and 1.0',0), +25081 => array('Selected graphic format is either not supported or unknown [%s]',1), +25082 => array('Illegal sizes specified for width or height when creating an image, (width=%d, height=%d)',2), +25083 => array('Illegal image size when copying image. Size for copied to image is 1 pixel or less.',0), +25084 => array('Failed to create temporary GD canvas. Possible Out of memory problem.',0), +25085 => array('An image can not be created from the supplied string. It is either in a format not supported or the string is representing an corrupt image.',0), +25086 => array('You only seem to have GD 1.x installed. To enable Alphablending requires GD 2.x or higher. Please install GD or make sure the constant USE_GD2 is specified correctly to reflect your installation. By default it tries to auto detect what version of GD you have installed. On some very rare occasions it may falsely detect GD2 where only GD1 is installed. You must then set USE_GD2 to false.',0), +25087 => array('This PHP build has not been configured with TTF support. You need to recompile your PHP installation with FreeType support.',0), +25088 => array('You have a misconfigured GD font support. The call to imagefontwidth() fails.',0), +25089 => array('You have a misconfigured GD font support. The call to imagefontheight() fails.',0), + +25090 => array('Unknown direction specified in call to StrokeBoxedText() [%s]',1), +25091 => array('Internal font does not support drawing text at arbitrary angle. Use TTF fonts instead.',0), +25092 => array('There is either a configuration problem with TrueType or a problem reading font file "%s" Make sure file exists and is in a readable place for the HTTP process. (If \'basedir\' restriction is enabled in PHP then the font file must be located in the document root.). It might also be a wrongly installed FreeType library. Try upgrading to at least FreeType 2.1.13 and recompile GD with the correct setup so it can find the new FT library.',1), +25093 => array('Can not read font file "%s" in call to Image::GetBBoxTTF. Please make sure that you have set a font before calling this method and that the font is installed in the TTF directory.',1), +25094 => array('Direction for text most be given as an angle between 0 and 90.',0), +25095 => array('Unknown font font family specification. ',0), +25096 => array('Can\'t allocate any more colors.',0), +25097 => array('Color specified as empty string in PushColor().',0), +25098 => array('Negative Color stack index. Unmatched call to PopColor()',0), +25099 => array('Parameters for brightness and Contrast out of range [-1,1]',0), + +25100 => array('Problem with color palette and your GD setup. Please disable anti-aliasing or use GD2 with true-color. If you have GD2 library installed please make sure that you have set the USE_GD2 constant to true and truecolor is enabled.',0), +25101 => array('Illegal numeric argument to SetLineStyle(): (%d)',1), +25102 => array('Illegal string argument to SetLineStyle(): %s',1), +25103 => array('Illegal argument to SetLineStyle %s',1), +25104 => array('Unknown line style: %s',1), +25105 => array('NULL data specified for a filled polygon. Check that your data is not NULL.',0), +25106 => array('Image::FillToBorder : Can not allocate more colors',0), +25107 => array('Can\'t write to file "%s". Check that the process running PHP has enough permission.',1), +25108 => array('Can\'t stream image. This is most likely due to a faulty PHP/GD setup. Try to recompile PHP and use the built-in GD library that comes with PHP.',0), +25109 => array('Your PHP (and GD-lib) installation does not appear to support any known graphic formats. You need to first make sure GD is compiled as a module to PHP. If you also want to use JPEG images you must get the JPEG library. Please see the PHP docs for details.',0), + +25110 => array('Your PHP installation does not support the chosen graphic format: %s',1), +25111 => array('Can\'t delete cached image %s. Permission problem?',1), +25112 => array('Cached imagefile (%s) has file date in the future.',1), +25113 => array('Can\'t delete cached image "%s". Permission problem?',1), +25114 => array('PHP has not enough permissions to write to the cache file "%s". Please make sure that the user running PHP has write permission for this file if you wan to use the cache system with JpGraph.',1), +25115 => array('Can\'t set permission for cached image "%s". Permission problem?',1), +25116 => array('Cant open file from cache "%s"',1), +25117 => array('Can\'t open cached image "%s" for reading.',1), +25118 => array('Can\'t create directory "%s". Make sure PHP has write permission to this directory.',1), +25119 => array('Can\'t set permissions for "%s". Permission problems?',1), + +25120 => array('Position for legend must be given as percentage in range 0-1',0), +25121 => array('Empty input data array specified for plot. Must have at least one data point.',0), +25122 => array('Stroke() must be implemented by concrete subclass to class Plot',0), +25123 => array('You can\'t use a text X-scale with specified X-coords. Use a "int" or "lin" scale instead.',0), +25124 => array('The input data array must have consecutive values from position 0 and forward. The given y-array starts with empty values (NULL)',0), +25125 => array('Illegal direction for static line',0), +25126 => array('Can\'t create truecolor image. Check that the GD2 library is properly setup with PHP.',0), +25127 => array('The library has been configured for automatic encoding conversion of Japanese fonts. This requires that PHP has the mb_convert_encoding() function. Your PHP installation lacks this function (PHP needs the "--enable-mbstring" when compiled).',0), + +/* +**--------------------------------------------------------------------------------------------- +** Pro-version strings +**--------------------------------------------------------------------------------------------- +*/ + +/* +** jpgraph_table +*/ + +27001 => array('GTextTable: Invalid argument to Set(). Array argument must be 2 dimensional',0), +27002 => array('GTextTable: Invalid argument to Set()',0), +27003 => array('GTextTable: Wrong number of arguments to GTextTable::SetColor()',0), +27004 => array('GTextTable: Specified cell range to be merged is not valid.',0), +27005 => array('GTextTable: Cannot merge already merged cells in the range: (%d,%d) to (%d,%d)',4), +27006 => array('GTextTable: Column argument = %d is outside specified table size.',1), +27007 => array('GTextTable: Row argument = %d is outside specified table size.',1), +27008 => array('GTextTable: Column and row size arrays must match the dimensions of the table',0), +27009 => array('GTextTable: Number of table columns or rows are 0. Make sure Init() or Set() is called.',0), +27010 => array('GTextTable: No alignment specified in call to SetAlign()',0), +27011 => array('GTextTable: Unknown alignment specified in SetAlign(). Horizontal=%s, Vertical=%s',2), +27012 => array('GTextTable: Internal error. Invalid alignment specified =%s',1), +27013 => array('GTextTable: Argument to FormatNumber() must be a string.',0), +27014 => array('GTextTable: Table is not initilaized with either a call to Set() or Init()',0), +27015 => array('GTextTable: Cell image constrain type must be TIMG_WIDTH or TIMG_HEIGHT',0), + +/* +** jpgraph_windrose +*/ + +22001 => array('Total percentage for all windrose legs in a windrose plot can not exceed 100%% !\n(Current max is: %d)',1), +22002 => array('Graph is too small to have a scale. Please make the graph larger.',0), +22004 => array('Label specification for windrose directions must have 16 values (one for each compass direction).',0), +22005 => array('Line style for radial lines must be on of ("solid","dotted","dashed","longdashed") ',0), +22006 => array('Illegal windrose type specified.',0), +22007 => array('To few values for the range legend.',0), +22008 => array('Internal error: Trying to plot free Windrose even though type is not a free windrose',0), +22009 => array('You have specified the same direction twice, once with an angle and once with a compass direction (%f degrees)',0), +22010 => array('Direction must either be a numeric value or one of the 16 compass directions',0), +22011 => array('Windrose index must be numeric or direction label. You have specified index=%d',1), +22012 => array('Windrose radial axis specification contains a direction which is not enabled.',0), +22013 => array('You have specified the look&feel for the same compass direction twice, once with text and once with index (Index=%d)',1), +22014 => array('Index for compass direction must be between 0 and 15.',0), +22015 => array('You have specified an undefined Windrose plot type.',0), +22016 => array('Windrose leg index must be numeric or direction label.',0), +22017 => array('Windrose data contains a direction which is not enabled. Please adjust what labels are displayed.',0), +22018 => array('You have specified data for the same compass direction twice, once with text and once with index (Index=%d)',1), +22019 => array('Index for direction must be between 0 and 15. You can\'t specify angles for a Regular Windplot, only index and compass directions.',0), +22020 => array('Windrose plot is too large to fit the specified Graph size. Please use WindrosePlot::SetSize() to make the plot smaller or increase the size of the Graph in the initial WindroseGraph() call.',0), +22021 => array('It is only possible to add Text, IconPlot or WindrosePlot to a Windrose Graph',0), + +/* +** jpgraph_odometer +*/ + +13001 => array('Unknown needle style (%d).',1), +13002 => array('Value for odometer (%f) is outside specified scale [%f,%f]',3), + +/* +** jpgraph_barcode +*/ + +1001 => array('Unknown encoder specification: %s',1), +1002 => array('Data validation failed. Can\'t encode [%s] using encoding "%s"',2), +1003 => array('Internal encoding error. Trying to encode %s is not possible in Code 128',1), +1004 => array('Internal barcode error. Unknown UPC-E encoding type: %s',1), +1005 => array('Internal error. Can\'t encode character tuple (%s, %s) in Code-128 charset C',2), +1006 => array('Internal encoding error for CODE 128. Trying to encode control character in CHARSET != A',0), +1007 => array('Internal encoding error for CODE 128. Trying to encode DEL in CHARSET != B',0), +1008 => array('Internal encoding error for CODE 128. Trying to encode small letters in CHARSET != B',0), +1009 => array('Encoding using CODE 93 is not yet supported.',0), +1010 => array('Encoding using POSTNET is not yet supported.',0), +1011 => array('Non supported barcode backend for type %s',1), + +/* +** PDF417 +*/ + +26001 => array('PDF417: Number of Columns must be >= 1 and <= 30',0), +26002 => array('PDF417: Error level must be between 0 and 8',0), +26003 => array('PDF417: Invalid format for input data to encode with PDF417',0), +26004 => array('PDF417: Can\'t encode given data with error level %d and %d columns since it results in too many symbols or more than 90 rows.',2), +26005 => array('PDF417: Can\'t open file "%s" for writing',1), +26006 => array('PDF417: Internal error. Data files for PDF417 cluster %d is corrupted.',1), +26007 => array('PDF417: Internal error. GetPattern: Illegal Code Value = %d (row=%d)',2), +26008 => array('PDF417: Internal error. Mode not found in mode list!! mode=%d',1), +26009 => array('PDF417: Encode error: Illegal character. Can\'t encode character with ASCII code=%d',1), +26010 => array('PDF417: Internal error: No input data in decode.',0), +26011 => array('PDF417: Encoding error. Can\'t use numeric encoding on non-numeric data.',0), +26012 => array('PDF417: Internal error. No input data to decode for Binary compressor.',0), +26013 => array('PDF417: Internal error. Checksum error. Coefficient tables corrupted.',0), +26014 => array('PDF417: Internal error. No data to calculate codewords on.',0), +26015 => array('PDF417: Internal error. State transition table entry 0 is NULL. Entry 1 = (%s)',1), +26016 => array('PDF417: Internal error: Unrecognized state transition mode in decode.',0), + + +); + +/* + ** EOF + */ + +?> diff --git a/html/includes/jpgraph/src/lang/prod.inc.php b/html/includes/jpgraph/src/lang/prod.inc.php new file mode 100644 index 0000000000..4f2715d1eb --- /dev/null +++ b/html/includes/jpgraph/src/lang/prod.inc.php @@ -0,0 +1,354 @@ +,) +$_jpg_messages = array( + +/* +** Headers already sent error. This is formatted as HTML different since this will be sent back directly as text +*/ +10 => array('
JpGraph Error: +HTTP headers have already been sent.
Caused by output from file %s at line %d.
Explanation:
HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it\'s image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).

Most likely you have some text in your script before the call to Graph::Stroke(). If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser.

For example it is a common mistake to leave a blank line before the opening "<?php".

',2), + + +11 => array(DEFAULT_ERROR_MESSAGE.'11',0), +12 => array(DEFAULT_ERROR_MESSAGE.'12',0), +13 => array(DEFAULT_ERROR_MESSAGE.'13',0), +2001 => array(DEFAULT_ERROR_MESSAGE.'2001',0), +2002 => array(DEFAULT_ERROR_MESSAGE.'2002',0), +2003 => array(DEFAULT_ERROR_MESSAGE.'2003',0), +2004 => array(DEFAULT_ERROR_MESSAGE.'2004',0), +2005 => array(DEFAULT_ERROR_MESSAGE.'2005',0), +2006 => array(DEFAULT_ERROR_MESSAGE.'2006',0), +2007 => array(DEFAULT_ERROR_MESSAGE.'2007',0), +2008 => array(DEFAULT_ERROR_MESSAGE.'2008',0), +2009 => array(DEFAULT_ERROR_MESSAGE.'2009',0), +2010 => array(DEFAULT_ERROR_MESSAGE.'2010',0), +2011 => array(DEFAULT_ERROR_MESSAGE.'2011',0), +2012 => array(DEFAULT_ERROR_MESSAGE.'2012',0), +2013 => array(DEFAULT_ERROR_MESSAGE.'2013',0), +2014 => array(DEFAULT_ERROR_MESSAGE.'2014',0), +3001 => array(DEFAULT_ERROR_MESSAGE.'3001',0), +4002 => array(DEFAULT_ERROR_MESSAGE.'4002',0), +5001 => array(DEFAULT_ERROR_MESSAGE.'5001',0), +5002 => array(DEFAULT_ERROR_MESSAGE.'5002',0), +5003 => array(DEFAULT_ERROR_MESSAGE.'5003',0), +5004 => array(DEFAULT_ERROR_MESSAGE.'5004',0), +6001 => array(DEFAULT_ERROR_MESSAGE.'6001',0), +6002 => array(DEFAULT_ERROR_MESSAGE.'6002',0), +6003 => array(DEFAULT_ERROR_MESSAGE.'6003',0), +6004 => array(DEFAULT_ERROR_MESSAGE.'6004',0), +6005 => array(DEFAULT_ERROR_MESSAGE.'6005',0), +6006 => array(DEFAULT_ERROR_MESSAGE.'6006',0), +6007 => array(DEFAULT_ERROR_MESSAGE.'6007',0), +6008 => array(DEFAULT_ERROR_MESSAGE.'6008',0), +6009 => array(DEFAULT_ERROR_MESSAGE.'6009',0), +6010 => array(DEFAULT_ERROR_MESSAGE.'6010',0), +6011 => array(DEFAULT_ERROR_MESSAGE.'6011',0), +6012 => array(DEFAULT_ERROR_MESSAGE.'6012',0), +6015 => array(DEFAULT_ERROR_MESSAGE.'6015',0), +6016 => array(DEFAULT_ERROR_MESSAGE.'6016',0), +6017 => array(DEFAULT_ERROR_MESSAGE.'6017',0), +6018 => array(DEFAULT_ERROR_MESSAGE.'6018',0), +6019 => array(DEFAULT_ERROR_MESSAGE.'6019',0), +6020 => array(DEFAULT_ERROR_MESSAGE.'6020',0), +6021 => array(DEFAULT_ERROR_MESSAGE.'6021',0), +6022 => array(DEFAULT_ERROR_MESSAGE.'6022',0), +6023 => array(DEFAULT_ERROR_MESSAGE.'6023',0), +6024 => array(DEFAULT_ERROR_MESSAGE.'6024',0), +6025 => array(DEFAULT_ERROR_MESSAGE.'6025',0), +6027 => array(DEFAULT_ERROR_MESSAGE.'6027',0), +6028 => array(DEFAULT_ERROR_MESSAGE.'6028',0), +6029 => array(DEFAULT_ERROR_MESSAGE.'6029',0), +6030 => array(DEFAULT_ERROR_MESSAGE.'6030',0), +6031 => array(DEFAULT_ERROR_MESSAGE.'6031',0), +6032 => array(DEFAULT_ERROR_MESSAGE.'6032',0), +7001 => array(DEFAULT_ERROR_MESSAGE.'7001',0), +8001 => array(DEFAULT_ERROR_MESSAGE.'8001',0), +8002 => array(DEFAULT_ERROR_MESSAGE.'8002',0), +8003 => array(DEFAULT_ERROR_MESSAGE.'8003',0), +8004 => array(DEFAULT_ERROR_MESSAGE.'8004',0), +9001 => array(DEFAULT_ERROR_MESSAGE.'9001',0), +10001 => array(DEFAULT_ERROR_MESSAGE.'10001',0), +10002 => array(DEFAULT_ERROR_MESSAGE.'10002',0), +11001 => array(DEFAULT_ERROR_MESSAGE.'11001',0), +11002 => array(DEFAULT_ERROR_MESSAGE.'11002',0), +11003 => array(DEFAULT_ERROR_MESSAGE.'11003',0), +11004 => array(DEFAULT_ERROR_MESSAGE.'11004',0), +11005 => array(DEFAULT_ERROR_MESSAGE.'11005',0), +12001 => array(DEFAULT_ERROR_MESSAGE.'12001',0), +12002 => array(DEFAULT_ERROR_MESSAGE.'12002',0), +12003 => array(DEFAULT_ERROR_MESSAGE.'12003',0), +12004 => array(DEFAULT_ERROR_MESSAGE.'12004',0), +12005 => array(DEFAULT_ERROR_MESSAGE.'12005',0), +12006 => array(DEFAULT_ERROR_MESSAGE.'12006',0), +12007 => array(DEFAULT_ERROR_MESSAGE.'12007',0), +12008 => array(DEFAULT_ERROR_MESSAGE.'12008',0), +12009 => array(DEFAULT_ERROR_MESSAGE.'12009',0), +12010 => array(DEFAULT_ERROR_MESSAGE.'12010',0), +12011 => array(DEFAULT_ERROR_MESSAGE.'12011',0), +12012 => array(DEFAULT_ERROR_MESSAGE.'12012',0), +14001 => array(DEFAULT_ERROR_MESSAGE.'14001',0), +14002 => array(DEFAULT_ERROR_MESSAGE.'14002',0), +14003 => array(DEFAULT_ERROR_MESSAGE.'14003',0), +14004 => array(DEFAULT_ERROR_MESSAGE.'14004',0), +14005 => array(DEFAULT_ERROR_MESSAGE.'14005',0), +14006 => array(DEFAULT_ERROR_MESSAGE.'14006',0), +14007 => array(DEFAULT_ERROR_MESSAGE.'14007',0), +15001 => array(DEFAULT_ERROR_MESSAGE.'15001',0), +15002 => array(DEFAULT_ERROR_MESSAGE.'15002',0), +15003 => array(DEFAULT_ERROR_MESSAGE.'15003',0), +15004 => array(DEFAULT_ERROR_MESSAGE.'15004',0), +15005 => array(DEFAULT_ERROR_MESSAGE.'15005',0), +15006 => array(DEFAULT_ERROR_MESSAGE.'15006',0), +15007 => array(DEFAULT_ERROR_MESSAGE.'15007',0), +15008 => array(DEFAULT_ERROR_MESSAGE.'15008',0), +15009 => array(DEFAULT_ERROR_MESSAGE.'15009',0), +15010 => array(DEFAULT_ERROR_MESSAGE.'15010',0), +15011 => array(DEFAULT_ERROR_MESSAGE.'15011',0), +16001 => array(DEFAULT_ERROR_MESSAGE.'16001',0), +16002 => array(DEFAULT_ERROR_MESSAGE.'16002',0), +16003 => array(DEFAULT_ERROR_MESSAGE.'16003',0), +16004 => array(DEFAULT_ERROR_MESSAGE.'16004',0), +17001 => array(DEFAULT_ERROR_MESSAGE.'17001',0), +17002 => array(DEFAULT_ERROR_MESSAGE.'17002',0), +17004 => array(DEFAULT_ERROR_MESSAGE.'17004',0), +18001 => array(DEFAULT_ERROR_MESSAGE.'18001',0), +18002 => array(DEFAULT_ERROR_MESSAGE.'18002',0), +18003 => array(DEFAULT_ERROR_MESSAGE.'18003',0), +18004 => array(DEFAULT_ERROR_MESSAGE.'18004',0), +18005 => array(DEFAULT_ERROR_MESSAGE.'18005',0), +18006 => array(DEFAULT_ERROR_MESSAGE.'18006',0), +18007 => array(DEFAULT_ERROR_MESSAGE.'18007',0), +18008 => array(DEFAULT_ERROR_MESSAGE.'18008',0), +19001 => array(DEFAULT_ERROR_MESSAGE.'19001',0), +19002 => array(DEFAULT_ERROR_MESSAGE.'19002',0), +19003 => array(DEFAULT_ERROR_MESSAGE.'19003',0), +20001 => array(DEFAULT_ERROR_MESSAGE.'20001',0), +20002 => array(DEFAULT_ERROR_MESSAGE.'20002',0), +20003 => array(DEFAULT_ERROR_MESSAGE.'20003',0), +21001 => array(DEFAULT_ERROR_MESSAGE.'21001',0), +23001 => array(DEFAULT_ERROR_MESSAGE.'23001',0), +23002 => array(DEFAULT_ERROR_MESSAGE.'23002',0), +23003 => array(DEFAULT_ERROR_MESSAGE.'23003',0), +24001 => array(DEFAULT_ERROR_MESSAGE.'24001',0), +24002 => array(DEFAULT_ERROR_MESSAGE.'24002',0), +24003 => array(DEFAULT_ERROR_MESSAGE.'24003',0), +25001 => array(DEFAULT_ERROR_MESSAGE.'25001',0), +25002 => array(DEFAULT_ERROR_MESSAGE.'25002',0), +25003 => array(DEFAULT_ERROR_MESSAGE.'25003',0), +25004 => array(DEFAULT_ERROR_MESSAGE.'25004',0), +25005 => array(DEFAULT_ERROR_MESSAGE.'25005',0), +25006 => array(DEFAULT_ERROR_MESSAGE.'25006',0), +25007 => array(DEFAULT_ERROR_MESSAGE.'25007',0), +25008 => array(DEFAULT_ERROR_MESSAGE.'25008',0), +25009 => array(DEFAULT_ERROR_MESSAGE.'25009',0), +25010 => array(DEFAULT_ERROR_MESSAGE.'25010',0), +25011 => array(DEFAULT_ERROR_MESSAGE.'25011',0), +25012 => array(DEFAULT_ERROR_MESSAGE.'25012',0), +25013 => array(DEFAULT_ERROR_MESSAGE.'25013',0), +25014 => array(DEFAULT_ERROR_MESSAGE.'25014',0), +25015 => array(DEFAULT_ERROR_MESSAGE.'25015',0), +25016 => array(DEFAULT_ERROR_MESSAGE.'25016',0), +25017 => array(DEFAULT_ERROR_MESSAGE.'25017',0), +25018 => array(DEFAULT_ERROR_MESSAGE.'25018',0), +25019 => array(DEFAULT_ERROR_MESSAGE.'25019',0), +25020 => array(DEFAULT_ERROR_MESSAGE.'25020',0), +25021 => array(DEFAULT_ERROR_MESSAGE.'25021',0), +25022 => array(DEFAULT_ERROR_MESSAGE.'25022',0), +25023 => array(DEFAULT_ERROR_MESSAGE.'25023',0), +25024 => array(DEFAULT_ERROR_MESSAGE.'25024',0), +25025 => array(DEFAULT_ERROR_MESSAGE.'25025',0), +25026 => array(DEFAULT_ERROR_MESSAGE.'25026',0), +25027 => array(DEFAULT_ERROR_MESSAGE.'25027',0), +25028 => array(DEFAULT_ERROR_MESSAGE.'25028',0), +25029 => array(DEFAULT_ERROR_MESSAGE.'25029',0), +25030 => array(DEFAULT_ERROR_MESSAGE.'25030',0), +25031 => array(DEFAULT_ERROR_MESSAGE.'25031',0), +25032 => array(DEFAULT_ERROR_MESSAGE.'25032',0), +25033 => array(DEFAULT_ERROR_MESSAGE.'25033',0), +25034 => array(DEFAULT_ERROR_MESSAGE.'25034',0), +25035 => array(DEFAULT_ERROR_MESSAGE.'25035',0), +25036 => array(DEFAULT_ERROR_MESSAGE.'25036',0), +25037 => array(DEFAULT_ERROR_MESSAGE.'25037',0), +25038 => array(DEFAULT_ERROR_MESSAGE.'25038',0), +25039 => array(DEFAULT_ERROR_MESSAGE.'25039',0), +25040 => array(DEFAULT_ERROR_MESSAGE.'25040',0), +25041 => array(DEFAULT_ERROR_MESSAGE.'25041',0), +25042 => array(DEFAULT_ERROR_MESSAGE.'25042',0), +25043 => array(DEFAULT_ERROR_MESSAGE.'25043',0), +25044 => array(DEFAULT_ERROR_MESSAGE.'25044',0), +25045 => array(DEFAULT_ERROR_MESSAGE.'25045',0), +25046 => array(DEFAULT_ERROR_MESSAGE.'25046',0), +25047 => array(DEFAULT_ERROR_MESSAGE.'25047',0), +25048 => array(DEFAULT_ERROR_MESSAGE.'25048',0), +25049 => array(DEFAULT_ERROR_MESSAGE.'25049',0), +25050 => array(DEFAULT_ERROR_MESSAGE.'25050',0), +25051 => array(DEFAULT_ERROR_MESSAGE.'25051',0), +25052 => array(DEFAULT_ERROR_MESSAGE.'25052',0), +25053 => array(DEFAULT_ERROR_MESSAGE.'25053',0), +25054 => array(DEFAULT_ERROR_MESSAGE.'25054',0), +25055 => array(DEFAULT_ERROR_MESSAGE.'25055',0), +25056 => array(DEFAULT_ERROR_MESSAGE.'25056',0), +25057 => array(DEFAULT_ERROR_MESSAGE.'25057',0), +25058 => array(DEFAULT_ERROR_MESSAGE.'25058',0), +25059 => array(DEFAULT_ERROR_MESSAGE.'25059',0), +25060 => array(DEFAULT_ERROR_MESSAGE.'25060',0), +25061 => array(DEFAULT_ERROR_MESSAGE.'25061',0), +25062 => array(DEFAULT_ERROR_MESSAGE.'25062',0), +25063 => array(DEFAULT_ERROR_MESSAGE.'25063',0), +25064 => array(DEFAULT_ERROR_MESSAGE.'25064',0), +25065 => array(DEFAULT_ERROR_MESSAGE.'25065',0), +25066 => array(DEFAULT_ERROR_MESSAGE.'25066',0), +25067 => array(DEFAULT_ERROR_MESSAGE.'25067',0), +25068 => array(DEFAULT_ERROR_MESSAGE.'25068',0), +25069 => array(DEFAULT_ERROR_MESSAGE.'25069',0), +25070 => array(DEFAULT_ERROR_MESSAGE.'25070',0), +25071 => array(DEFAULT_ERROR_MESSAGE.'25071',0), +25072 => array(DEFAULT_ERROR_MESSAGE.'25072',0), +25073 => array(DEFAULT_ERROR_MESSAGE.'25073',0), +25074 => array(DEFAULT_ERROR_MESSAGE.'25074',0), +25075 => array(DEFAULT_ERROR_MESSAGE.'25075',0), +25077 => array(DEFAULT_ERROR_MESSAGE.'25077',0), +25078 => array(DEFAULT_ERROR_MESSAGE.'25078',0), +25079 => array(DEFAULT_ERROR_MESSAGE.'25079',0), +25080 => array(DEFAULT_ERROR_MESSAGE.'25080',0), +25081 => array(DEFAULT_ERROR_MESSAGE.'25081',0), +25082 => array(DEFAULT_ERROR_MESSAGE.'25082',0), +25083 => array(DEFAULT_ERROR_MESSAGE.'25083',0), +25084 => array(DEFAULT_ERROR_MESSAGE.'25084',0), +25085 => array(DEFAULT_ERROR_MESSAGE.'25085',0), +25086 => array(DEFAULT_ERROR_MESSAGE.'25086',0), +25087 => array(DEFAULT_ERROR_MESSAGE.'25087',0), +25088 => array(DEFAULT_ERROR_MESSAGE.'25088',0), +25089 => array(DEFAULT_ERROR_MESSAGE.'25089',0), +25090 => array(DEFAULT_ERROR_MESSAGE.'25090',0), +25091 => array(DEFAULT_ERROR_MESSAGE.'25091',0), +25092 => array(DEFAULT_ERROR_MESSAGE.'25092',0), +25093 => array(DEFAULT_ERROR_MESSAGE.'25093',0), +25094 => array(DEFAULT_ERROR_MESSAGE.'25094',0), +25095 => array(DEFAULT_ERROR_MESSAGE.'25095',0), +25096 => array(DEFAULT_ERROR_MESSAGE.'25096',0), +25097 => array(DEFAULT_ERROR_MESSAGE.'25097',0), +25098 => array(DEFAULT_ERROR_MESSAGE.'25098',0), +25099 => array(DEFAULT_ERROR_MESSAGE.'25099',0), +25100 => array(DEFAULT_ERROR_MESSAGE.'25100',0), +25101 => array(DEFAULT_ERROR_MESSAGE.'25101',0), +25102 => array(DEFAULT_ERROR_MESSAGE.'25102',0), +25103 => array(DEFAULT_ERROR_MESSAGE.'25103',0), +25104 => array(DEFAULT_ERROR_MESSAGE.'25104',0), +25105 => array(DEFAULT_ERROR_MESSAGE.'25105',0), +25106 => array(DEFAULT_ERROR_MESSAGE.'25106',0), +25107 => array(DEFAULT_ERROR_MESSAGE.'25107',0), +25108 => array(DEFAULT_ERROR_MESSAGE.'25108',0), +25109 => array(DEFAULT_ERROR_MESSAGE.'25109',0), +25110 => array(DEFAULT_ERROR_MESSAGE.'25110',0), +25111 => array(DEFAULT_ERROR_MESSAGE.'25111',0), +25112 => array(DEFAULT_ERROR_MESSAGE.'25112',0), +25113 => array(DEFAULT_ERROR_MESSAGE.'25113',0), +25114 => array(DEFAULT_ERROR_MESSAGE.'25114',0), +25115 => array(DEFAULT_ERROR_MESSAGE.'25115',0), +25116 => array(DEFAULT_ERROR_MESSAGE.'25116',0), +25117 => array(DEFAULT_ERROR_MESSAGE.'25117',0), +25118 => array(DEFAULT_ERROR_MESSAGE.'25118',0), +25119 => array(DEFAULT_ERROR_MESSAGE.'25119',0), +25120 => array(DEFAULT_ERROR_MESSAGE.'25120',0), +25121 => array(DEFAULT_ERROR_MESSAGE.'25121',0), +25122 => array(DEFAULT_ERROR_MESSAGE.'25122',0), +25123 => array(DEFAULT_ERROR_MESSAGE.'25123',0), +25124 => array(DEFAULT_ERROR_MESSAGE.'25124',0), +25125 => array(DEFAULT_ERROR_MESSAGE.'25125',0), +25126 => array(DEFAULT_ERROR_MESSAGE.'25126',0), +25127 => array(DEFAULT_ERROR_MESSAGE.'25126',0), +24003 => array(DEFAULT_ERROR_MESSAGE.'24003',0), +24004 => array(DEFAULT_ERROR_MESSAGE.'24004',0), +24005 => array(DEFAULT_ERROR_MESSAGE.'24005',0), +24006 => array(DEFAULT_ERROR_MESSAGE.'24006',0), +24007 => array(DEFAULT_ERROR_MESSAGE.'24007',0), +24008 => array(DEFAULT_ERROR_MESSAGE.'24008',0), +24009 => array(DEFAULT_ERROR_MESSAGE.'24009',0), +24010 => array(DEFAULT_ERROR_MESSAGE.'24010',0), +24011 => array(DEFAULT_ERROR_MESSAGE.'24011',0), +24012 => array(DEFAULT_ERROR_MESSAGE.'24012',0), +24013 => array(DEFAULT_ERROR_MESSAGE.'24013',0), +24014 => array(DEFAULT_ERROR_MESSAGE.'24014',0), +24015 => array(DEFAULT_ERROR_MESSAGE.'24015',0), +22001 => array(DEFAULT_ERROR_MESSAGE.'22001',0), +22002 => array(DEFAULT_ERROR_MESSAGE.'22002',0), +22004 => array(DEFAULT_ERROR_MESSAGE.'22004',0), +22005 => array(DEFAULT_ERROR_MESSAGE.'22005',0), +22006 => array(DEFAULT_ERROR_MESSAGE.'22006',0), +22007 => array(DEFAULT_ERROR_MESSAGE.'22007',0), +22008 => array(DEFAULT_ERROR_MESSAGE.'22008',0), +22009 => array(DEFAULT_ERROR_MESSAGE.'22009',0), +22010 => array(DEFAULT_ERROR_MESSAGE.'22010',0), +22011 => array(DEFAULT_ERROR_MESSAGE.'22011',0), +22012 => array(DEFAULT_ERROR_MESSAGE.'22012',0), +22013 => array(DEFAULT_ERROR_MESSAGE.'22013',0), +22014 => array(DEFAULT_ERROR_MESSAGE.'22014',0), +22015 => array(DEFAULT_ERROR_MESSAGE.'22015',0), +22016 => array(DEFAULT_ERROR_MESSAGE.'22016',0), +22017 => array(DEFAULT_ERROR_MESSAGE.'22017',0), +22018 => array(DEFAULT_ERROR_MESSAGE.'22018',0), +22019 => array(DEFAULT_ERROR_MESSAGE.'22019',0), +22020 => array(DEFAULT_ERROR_MESSAGE.'22020',0), +13001 => array(DEFAULT_ERROR_MESSAGE.'13001',0), +13002 => array(DEFAULT_ERROR_MESSAGE.'13002',0), +1001 => array(DEFAULT_ERROR_MESSAGE.'1001',0), +1002 => array(DEFAULT_ERROR_MESSAGE.'1002',0), +1003 => array(DEFAULT_ERROR_MESSAGE.'1003',0), +1004 => array(DEFAULT_ERROR_MESSAGE.'1004',0), +1005 => array(DEFAULT_ERROR_MESSAGE.'1005',0), +1006 => array(DEFAULT_ERROR_MESSAGE.'1006',0), +1007 => array(DEFAULT_ERROR_MESSAGE.'1007',0), +1008 => array(DEFAULT_ERROR_MESSAGE.'1008',0), +1009 => array(DEFAULT_ERROR_MESSAGE.'1009',0), +1010 => array(DEFAULT_ERROR_MESSAGE.'1010',0), +1011 => array(DEFAULT_ERROR_MESSAGE.'1011',0), +26001 => array(DEFAULT_ERROR_MESSAGE.'26001',0), +26002 => array(DEFAULT_ERROR_MESSAGE.'26002',0), +26003 => array(DEFAULT_ERROR_MESSAGE.'26003',0), +26004 => array(DEFAULT_ERROR_MESSAGE.'26004',0), +26005 => array(DEFAULT_ERROR_MESSAGE.'26005',0), +26006 => array(DEFAULT_ERROR_MESSAGE.'26006',0), +26007 => array(DEFAULT_ERROR_MESSAGE.'26007',0), +26008 => array(DEFAULT_ERROR_MESSAGE.'26008',0), +26009 => array(DEFAULT_ERROR_MESSAGE.'26009',0), +26010 => array(DEFAULT_ERROR_MESSAGE.'26010',0), +26011 => array(DEFAULT_ERROR_MESSAGE.'26011',0), +26012 => array(DEFAULT_ERROR_MESSAGE.'26012',0), +26013 => array(DEFAULT_ERROR_MESSAGE.'26013',0), +26014 => array(DEFAULT_ERROR_MESSAGE.'26014',0), +26015 => array(DEFAULT_ERROR_MESSAGE.'26015',0), +26016 => array(DEFAULT_ERROR_MESSAGE.'26016',0), + +27001 => array(DEFAULT_ERROR_MESSAGE.'27001',0), +27002 => array(DEFAULT_ERROR_MESSAGE.'27002',0), +27003 => array(DEFAULT_ERROR_MESSAGE.'27003',0), +27004 => array(DEFAULT_ERROR_MESSAGE.'27004',0), +27005 => array(DEFAULT_ERROR_MESSAGE.'27005',0), +27006 => array(DEFAULT_ERROR_MESSAGE.'27006',0), +27007 => array(DEFAULT_ERROR_MESSAGE.'27007',0), +27008 => array(DEFAULT_ERROR_MESSAGE.'27008',0), +27009 => array(DEFAULT_ERROR_MESSAGE.'27009',0), +27010 => array(DEFAULT_ERROR_MESSAGE.'27010',0), +27011 => array(DEFAULT_ERROR_MESSAGE.'27011',0), +27012 => array(DEFAULT_ERROR_MESSAGE.'27012',0), +27013 => array(DEFAULT_ERROR_MESSAGE.'27013',0), +27014 => array(DEFAULT_ERROR_MESSAGE.'27014',0), +27015 => array(DEFAULT_ERROR_MESSAGE.'27015',0), +); + +?> diff --git a/includes/billing.php b/includes/billing.php index 0a2013c741..695730fb31 100644 --- a/includes/billing.php +++ b/includes/billing.php @@ -149,7 +149,7 @@ function getRates($bill_id,$datefrom,$dateto) { $q_95_text = $q_95_text . " AND timestamp > $datefrom AND timestamp <= $dateto ORDER BY delta ASC"; $q_95th = mysql_query($q_95_text); $m_95th = mysql_result($q_95th,$measurement_95th); - $mt_q = mysql_query("SELECT sum(delta) FROM bill_data WHERE bill_id = $bill_id AND timestamp > $datefrom AND timestamp <= $dateto"); + $mt_q = mysql_query("SELECT SUM(delta) FROM bill_data WHERE bill_id = '$bill_id' AND timestamp > '$datefrom' AND timestamp <= '$dateto'"); $mtot = mysql_result($mt_q,0); $data['rate_95th_in'] = get95thIn($bill_id,$datefrom,$dateto); $data['rate_95th_out'] = get95thOut($bill_id,$datefrom,$dateto);