]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Plot the bytes graphs with the same scale as the text report
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Wed, 9 Jun 2010 08:56:36 +0000 (08:56 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Wed, 9 Jun 2010 08:56:36 +0000 (08:56 +0000)
grepday.c

index 84cf9f999e18b435d2f6d6dcdd2995fd7153c4bc..8c39043803e9e82ed7155bc349bfbe109f9e1a6f 100644 (file)
--- a/grepday.c
+++ b/grepday.c
@@ -306,7 +306,7 @@ static int greport_compute_yaxis(struct PlotStruct *pdata,struct GraphDataStruct
       case PTG_LinBin:
          symin=(double)pdata->ymin;
          symax=(double)pdata->ymax;
-         ymag=1024.;
+         ymag=1000.;
          break;
 
       case PTG_LogBin:
@@ -315,7 +315,7 @@ static int greport_compute_yaxis(struct PlotStruct *pdata,struct GraphDataStruct
          else
             symin=0.;
          symax=log(pdata->ymax);
-         ymag=1024.;
+         ymag=1000.;
          break;
 
       case PTG_Time:
@@ -344,8 +344,8 @@ static void greport_formatbin(double yval,int maxdigits,char *string,int slen)
    int i;
    int ndigits;
 
-   for (scount=0 ; scount<sizeof(schar)/sizeof(*schar) && yval>=1024. ; scount++)
-      yval/=1024.;
+   for (scount=0 ; scount<sizeof(schar)/sizeof(*schar) && yval>=1000. ; scount++)
+      yval/=1000.;
    if (yval<2.)
       ndigits=2;
    else if (yval<3.)
@@ -731,8 +731,8 @@ void greport_day(const struct userinfostruct *uinfo)
       pdata.datapoints=bytespoints;
       pdata.npoints=31;
       pdata.XLabel=_("DAYS");
-      pdata.ymin=50LL*1024LL;
-      pdata.ymax=5LL*1024LL*1024LL*1024LL;
+      pdata.ymin=50LL*1000LL;
+      pdata.ymax=5LL*1000LL*1000LL*1000LL;
       pdata.ytype=PTG_LogBin;
       pdata.YLabel=_("BYTES");
       pdata.pngfile="graph_day_byte.png";