[Vtigercrm-developers] Image Graph

Michel JACQUEMES m.jacquemes at neuf.fr
Fri Mar 17 08:29:42 PST 2006


As announced the files needed to test Vtigercrm-4.2.4.rc2 - Image_Graph
implementation.

 

Installation :

 

1.	Install Pear package if  it is not already done
2.	Install Image_Graph package with all its dependencies :

Pear install -a Image_Graph-0.7.2

3.	Override Charts.php in your vtigercrm/potentials folder (be sure to
have a backup copy)
4.	Apply the patches on Dashboard module files to suppress the test on
php version.

 

 

Things to do :

 

1.	Compute the ticks interval according to the maximum axis value.
2.	Try to dispose ticks on category axis as they where with jpgraph (if
really needed).
3.	Implement and beautify the colour generator algorithm (very basic
actually).
4.	Make it dependent on current theme (if everybody agree).
5.	Test font-language implementation (I do not try it for Chinese or
Czech).

 

Comments :

 

1.	In Charts.php I have only commented the replaced line. I know it is
not "beautiful" (ref. Allan hobby) but it is for others to understand the
changes. The lines will have to be suppressed in the official version.
2.	If somebody looks at Image Graph examples, he will probably notice
that graph layout uses the following syntax :

$graph->add(
            Image_Graph::vertical(
                        $title = Image_Graph::factory('title',
array('Test',11)),
                        Image_Graph::vertical(
                                    $plotarea =
Image_Graph::factory('plotarea'),
                                    $footer = Image_Graph::factory('title',
array('Footer',8)),
                                    90
                        ),
                        5
            )
or
$graph->add(
            Image_Graph::vertical(
                        $title =& Image_Graph::factory('title',
array('Test',11)),
                        Image_Graph::vertical(
                                    $plotarea =&
Image_Graph::factory('plotarea'),
                                    $footer =& Image_Graph::factory('title',
array('Footer',8)),
                                    90
                        ),
                        5
            )

It works nice in a test program called directly but it doesn't in
Charts.php. I have not found the explanation. The correct one is :

$title =& Image_Graph::factory('title', array('Test',10));
$plotarea =& Image_Graph::factory('plotarea');
$footer =& Image_Graph::factory('title', array('Footer',8));
$graph->add(
            Image_Graph::vertical(
                        $title,
                        Image_Graph::vertical(
                                    $plotarea,
                                    $footer,
                                    90
                        ),
                        5
            )



3.	When using a shortcut on graph, you get an error message :
Fatal error: Using $this when not in object context in
c:\Inetpub\wwwroot\vtigercrm-graph\adodb\adodb.inc.php on line 2380
I think it is probably a bug of 4.2.4rc2 with PHP 5 but I did not take time
to investigate (help is welcome!).
4.	I have also notice a refresh problem with IE6, due to png file in IE
cache. If it is an IE problem I will at last migrate to Firefox (but it is
not a solution).

 

The program has been tested with PHP 5.1.2

If some volunteers want to test they are of course welcome.

 

Michel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20060317/68129c2d/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PatchDashboard.zip
Type: application/x-zip-compressed
Size: 3680 bytes
Desc: not available
Url : http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20060317/68129c2d/attachment-0003.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Charts.php
Type: application/octet-stream
Size: 52021 bytes
Desc: not available
Url : http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20060317/68129c2d/attachment-0003.obj 


More information about the vtigercrm-developers mailing list