[phpOpenTracker-devel] enhancement for plot_access_statistics

Andreas Israel <[email protected]> Thu, 10 Mar 2005 10:50:56 +0100
Newsgroups gmane.comp.web.phpopentracker.devel
Message-ID <[email protected]>
Hello pot-developers,

first of all let me thank you for this great piece of software.

As an little exchange for my bug submit in top analysis, i'll submit a 
little enhancement to plot_access_statistics :). I know it's a little, 
but better than nothing.

I enhanced the chart by 2 little label descriptions for the 2 y axis.
But this works only correct with a current jpgraph, because this feature 
doesn't exist in older jpgraph versions.

The changes are:
change line 191 to:
    $graph->img->SetMargin(70, 70, 20, 50);
    /* creates a wider margin to prevent overlapping*/


add this near line 215:

     $graph->yaxis->SetTitle('Page Impressions','low');
     $graph->yaxis->SetTitlemargin(50);
     $graph->yaxis->SetLabelMargin(5);
     /* prints "Page Impressions" to the left bottom  */

add this near new line 222:
     $graph->y2axis->SetTitle('Visits','low');
     $graph->y2axis->SetTitlemargin(50);
     $graph->y2axis->SetLabelMargin(5);
     /* prints "Visits" to the right bottom */

Feel free to use it, and enjoy the "better" charts.

Andreas