Index: /home/lmeyer/workspace/piwik-trunk/core/Visualization/Sparkline.php =================================================================== --- /home/lmeyer/workspace/piwik-trunk/core/Visualization/Sparkline.php (revision 1982) +++ /home/lmeyer/workspace/piwik-trunk/core/Visualization/Sparkline.php (working copy) @@ -80,9 +80,9 @@ $sparkline->SetYMax($max[1]); $sparkline->SetPadding( 3, 0, 2, 0 ); // top, right, bottom, left // $font = FONT_2; - $sparkline->SetFeaturePoint($min[0] -1, $min[1], 'red', 5); - $sparkline->SetFeaturePoint($max[0] -1, $max[1], 'green', 5); - $sparkline->SetFeaturePoint($last[0] -1, $last[1], 'blue', 5); + $sparkline->SetFeaturePoint($min[0], $min[1], 'red', 5); + $sparkline->SetFeaturePoint($max[0], $max[1], 'green', 5); + $sparkline->SetFeaturePoint($last[0], $last[1], 'blue', 5); $sparkline->SetLineSize(3); // for renderresampled, linesize is on virtual image $ratio = 1; // var_dump($min);var_dump($max);var_dump($lasts);exit; Index: /home/lmeyer/workspace/piwik-trunk/libs/sparkline/lib/Sparkline_Line.php =================================================================== --- /home/lmeyer/workspace/piwik-trunk/libs/sparkline/lib/Sparkline_Line.php (revision 1982) +++ /home/lmeyer/workspace/piwik-trunk/libs/sparkline/lib/Sparkline_Line.php (working copy) @@ -264,7 +264,7 @@ // while (list(, $v) = each($this->featurePoint)) { $pxY = round(($v['ptY'] + ($this->yMin * -1)) * ($this->GetGraphHeight() / $this->yRange)); - $pxX = round($v['ptX'] * $this->GetGraphWidth() / $this->dataSeriesStats[1]['xMax']); + $pxX = round($v['ptX'] * $this->GetGraphWidth() / sizeof($this->dataSeries[1])); $this->DrawCircleFilled($pxX + $this->graphAreaPx[0][0], $pxY + $this->graphAreaPx[0][1],