New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty sparkline with floats #1137
Comments
No, we already scale conversion ratios by 100. This is a bug in the sparkline-php library. I'll sync up and see if a fix is still needed. |
I var_dumped $this->data, and it was not scaled by 100. Are you sure this applies to Goal tracking too? |
Yes, I'm sure. The scaling is applied when the conversion rate is calculated and stored in the database. |
(In [1822]) fixes #1137 - empty sparkline with floats
|
I svn up, and generated sparklines, but sparklines don't look good. I think that is how they used to look like before I manually patched the library, but the changes in [1822] probably reverted this. See the attached screenshot. The points are many pixels off on the left which looks confusing. |
Attachment: Sparklines fail |
Hi, why not using http://omnipotent.net/jquery.sparkline/ ? |
pebosi: yes, I've already looked at that. At this time, I'm not going to change that. Looking down the road, we might want to support both client and server-side chart generation:
|
(In [1884]) fixes #1137 - off-by-one in x-axis range |
thanks Anthon. There is still a small offset in the green point but I think this has always been the case (see attached sparkline) |
Attachment: |
Near as I can tell, it's a scaling artifact. Sometimes noticeable, sometimes not. |
Attachment: sparklines before hack |
Attachment: sparklines after hack |
The problem I initially reported is still not corrected in piwik 0.5.5, as the two uploaded screenshots prove. |
The bug is in the sparkline library itself. The sparkline library is converting all input first into a string, and then test if it is numeric. The solution is to comment out the first two lines in libs/sparkline/lib/Sparkline_Line.php of the method SetData: |
(In [1982]) fixes #1137 - thanks Lorenz (lmeyer) to debugging this locale issue; reported upstream in https://sourceforge.net/tracker/?func=detail&aid=2975415&group_id=122936&atid=694962 |
I created two patches that correct the offset issue. |
Attachment: minimalistic debugging of feature point offset |
Attachment: debug of feature point offset and antialiasing |
(In [1983]) refs #1137 - fixing various off-by-one errors in drawing feature points; credit: lmeyer |
The values of the Goal Plugin are floats (e.g. 1.53% conversions).
The sparkline of conversion rate and eventually overall revenue do not show up.
Correction: I got all sparklines showing up after this hack that converts all values to integers:
/core/Visualization/Sparkline.php method Piwik_Visualization_Sparkline->main() line 67, I add this after the foreach statement:
$value = (int)($value*100);
The factor 100 does no harm to all other sparklines, because they are resized. I would be good to have this included in the next release.
The text was updated successfully, but these errors were encountered: