Browse Source

Affichage des stats plus lisible quand on passe > 100 000 et formatage avec espace des milliers

svn/root/tags/plugins/statistiques/1.3.1
booz@rezo.net 4 years ago
parent
commit
89314bd22e
  1. 16
      prive/squelettes/inclure/stats-visites-jours.html
  2. 17
      prive/stats/visites.html
  3. 2
      prive/style_prive_plugin_stats.html

16
prive/squelettes/inclure/stats-visites-jours.html

@ -24,30 +24,30 @@
<tbody>
<tr class="odd on">
<th><:info_maximum|trim{':'}|trim|ucfirst:></th>
<td class='num'>#GET{max}</td>
<td class='num'>[(#GET{max}|number_format{0,"","&nbsp;"})]</td>
</tr>
<tr class="odd on">
<th><:info_moyenne|trim{':'}|trim|ucfirst:></th>
<td class='num'>[(#GET{moy}|round)]</td>
<td class='num'>[(#GET{moy}|round|number_format{0,"","&nbsp;"})]</td>
</tr>
<tr class="even">
<th><a href="#URL_ECRIRE{stats_referers,jour=jour}"
title="<:statistiques:titre_liens_entrants|trim{':'}|trim|attribut_html:>: <:info_aujourdhui|trim{':'}|trim|attribut_html:>"><:info_aujourdhui|trim{':'}|trim|ucfirst:></a></th>
<td class='num'>#GET{last}</td>
<td class='num'>[(#GET{last}|number_format{0,"","&nbsp;"})]</td>
</tr>
<tr class="even">
<th><a href="#URL_ECRIRE{stats_referers,jour=veille}"
title="<:statistiques:titre_liens_entrants|trim{':'}|trim|attribut_html:>: <:info_hier|trim{':'}|trim|attribut_html:>"><:info_hier|trim{':'}|trim|ucfirst:></a></th>
<td class='num'>#GET{lastlast}</td>
<td class='num'>[(#GET{lastlast}|number_format{0,"","&nbsp;"})]</td>
</tr>
<BOUCLE_art(ARTICLES){id_article}{statut?}>
<tr class="odd">
<th><:statistiques:info_popularite_5|trim{':'}|trim|ucfirst:></th>
<td class='num'>[(#CHAMP_SQL{popularite}|round)]</td>
<td class='num'>[(#CHAMP_SQL{popularite}|round|number_format{0,"","&nbsp;"})]</td>
</tr>
<tr class="odd">
<th><:info_total|trim{':'}|trim|ucfirst:></th>
<td class='num'>[(#VISITES|round)]</td>
<td class='num'>[(#VISITES|round|number_format{0,"","&nbsp;"})]</td>
</tr>
<tr class="odd">
<th></th>
@ -56,11 +56,11 @@
</BOUCLE_art>
<tr class="odd">
<th><:info_total|trim{':'}|trim|ucfirst:></th>
<td class='num'>[(#REM|stats_total)]</td>
<td class='num'>[(#REM|stats_total|number_format{0,"","&nbsp;"})]</td>
</tr>
<tr class="odd">
<th><:statistiques:info_popularite_2|trim{':'}|trim|ucfirst:></th>
<td class='num'>[(#CONFIG{popularite_total}|round)]</td>
<td class='num'>[(#CONFIG{popularite_total}|round|number_format{0,"","&nbsp;"})]</td>
</tr>
<//B_art>
</tbody>

17
prive/stats/visites.html

@ -70,7 +70,22 @@ function trace_stats_table(table, classes, options) {
]
},
yaxis:{
position: "right"
position: "right",
tickDecimals: 1,
tickFormatter: function nbFormatter(val, axis) {
if (val >= 1000000){
var fval = (val / 1000000).toFixed(axis.tickDecimals) ;
return fval.replace(/\.0$/,"") + " M";
}
else{
if (val >= 100000)
return (val / 1000).toFixed(axis.tickDecimals).replace(/\.0$/,"") + " k";
else{
var fval = val.toFixed(axis.tickDecimals).replace(/\.0$/,"") ;
return fval.replace(/(\d{3})$/," $1") ;
}
}
}
}
},
infobulle:{show:true}

2
prive/style_prive_plugin_stats.html

@ -49,7 +49,7 @@ table#visites tr.c_recap th {background-color:#[(#GET{foncee}|couleur_foncer)];c
/* graphique flot */
.graphique{clear:both; overflow:hidden; margin-bottom:2em;}
.graphResult-wrap {padding: 10px 25px;float:#GET{left};}
.graphResult-wrap {padding: 10px;float:#GET{left};}
.graphResult{}
.graphInfo{float:#GET{left}; clear:#GET{left};margin-#GET{left}:20px;}
.graphInfo td {padding: 5px;}

Loading…
Cancel
Save