Skip to content

Commit

Permalink
Fixes #9575 Display accurate numbers in Overlay reports tooltips, eve…
Browse files Browse the repository at this point in the history
…n when very small numbers
  • Loading branch information
mattab committed Jan 27, 2016
1 parent 9eb2d57 commit b361c95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/Overlay/client/client.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
.PIS_LinkTag {
position: absolute;
z-index: 9999;
width: 36px;
width: 50px;
height: 21px;
text-align: left;
background: url(./linktags_lessshadow.png) no-repeat 0 -21px;
Expand All @@ -45,7 +45,7 @@

.PIS_LinkTag span {
position: absolute;
width: 31px;
width: 35px;
height: 14px;
font-size: 10px;
text-align: center;
Expand Down
7 changes: 6 additions & 1 deletion plugins/Overlay/client/followingpages.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ var Piwik_Overlay_FollowingPages = (function () {
linkTag[0].piwikTagElement = true;

var rate = data.clickRate;
if (rate < 10) {

if( rate < 0.001 ) {
rate = '<0.001';
} else if (rate < 1) {
rate = Math.round( rate * 1000 ) / 1000;
} else if (rate < 10) {
rate = Math.round(rate * 10) / 10;
} else {
rate = Math.round(rate);
Expand Down

0 comments on commit b361c95

Please sign in to comment.