Image Graph

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Image Graph

Michel JACQUEMES

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

  1. Override Charts.php in your vtigercrm/potentials folder (be sure to have a backup copy)
  2. 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


PatchDashboard.zip (4K) Download Attachment
Charts.php (37K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Critical bug found on 4.2.x

mike.mikeandkellycrowe

Guys,
Please review http://vtiger.fosslabs.com/cgi-bin/trac.cgi/ticket/63#preview

I think I have address in solution as well.
Mike

_______________________________________________
This vtiger.com email is sponsored by Zoho Planner. Still scribbling down your To-Do's on bits of paper & palms of your hands? Try the AJAX enabled, personal organizer online, Zoho Planner for FREE instead! http://zohoplanner.com/?vt