Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#8 Feature Points Not Scaled Correctly

closed-fixed
nobody
None
5
2007-11-10
2006-08-21
Anonymous
No

I'm not sure what is going on here, but as the image
increases in size I can see that the feature points are
not in sync with the line.

That is they are not being scaled the same.

Discussion

  • Output PNG File

     
    Attachments
  • Chris
    Chris
    2006-08-21

    Logged In: YES
    user_id=424189

    I found that the array size was an "off-by-one" bug in the x
    dimension.

    This patch against CVS fixes the problem. I do not see any
    place to attach a patch in the bug tracker so it is inline
    below.

    Cheers,
    Chris

    Index: Sparkline_Line.php

    RCS file:
    /cvsroot/sparkline/sparkline-php/lib/Sparkline_Line.php,v
    retrieving revision 1.7
    diff -r1.7 Sparkline_Line.php
    106c106
    < $x = round($i * $xBound /
    sizeof($this->dataSeries[$series]));
    ---
    > $x = round($i * $xBound /
    (sizeof($this->dataSeries[$series]) - 1));

     
  • Logged In: NO

    Same issue. Fixed by nesser's patch.

     
  • Logged In: NO

    i can confirm this problem

     
  • James Byers
    James Byers
    2007-11-10

    • status: open --> closed-fixed
     
  • James Byers
    James Byers
    2007-11-10

    Logged In: YES
    user_id=157
    Originator: NO

    Fixed in CVS, will be in 0.3