Fossil SCM

Add tooltips with projected counts in activity reports views, where appropriate.

danield 2025-03-25 10:47 trunk
Commit 032cef1ded634a34d10c2293018528e743b3f16cfe8b55270214b56c437adc76
1 file changed +5 -3
+5 -3
--- src/statrep.c
+++ src/statrep.c
@@ -318,15 +318,16 @@
318318
&& nMaxEvents>0
319319
){
320320
/* If the timespan covered by this row contains "now", then project
321321
** the number of changes until the completion of the timespan and
322322
** show a dashed box of that projection. */
323
+ int nProj = (int)(((double)nCount)/rNowFraction);
323324
int nExtra = (int)(((double)nCount)/rNowFraction) - nCount;
324325
int nXSize = (100 * nExtra)/nMaxEvents;
325326
@ <span class='statistics-report-graph-line' \
326327
@ style='display:inline-block;min-width:%d(nSize)%%;'>&nbsp;</span>\
327
- @ <span class='statistics-report-graph-extra' \
328
+ @ <span class='statistics-report-graph-extra' title='%d(nProj)' \
328329
@ style='display:inline-block;min-width:%d(nXSize)%%;'>&nbsp;</span>\
329330
}else{
330331
@ <div class='statistics-report-graph-line' \
331332
@ style='width:%d(nSize)%%;'>&nbsp;</div> \
332333
}
@@ -747,18 +748,19 @@
747748
if( zCurrentWeek!=0
748749
&& strcmp(zWeek, zCurrentWeek)==0
749750
&& rNowFraction>0.05
750751
&& nMaxEvents>0
751752
){
752
- /* If the covered covered by this row contains "now", then project
753
+ /* If the timespan covered by this row contains "now", then project
753754
** the number of changes until the completion of the week and
754755
** show a dashed box of that projection. */
756
+ int nProj = (int)(((double)nCount)/rNowFraction);
755757
int nExtra = (int)(((double)nCount)/rNowFraction) - nCount;
756758
int nXSize = (100 * nExtra)/nMaxEvents;
757759
@ <span class='statistics-report-graph-line' \
758760
@ style='display:inline-block;min-width:%d(nSize)%%;'>&nbsp;</span>\
759
- @ <span class='statistics-report-graph-extra' \
761
+ @ <span class='statistics-report-graph-extra' title='%d(nProj)' \
760762
@ style='display:inline-block;min-width:%d(nXSize)%%;'>&nbsp;</span>\
761763
}else{
762764
@ <div class='statistics-report-graph-line' \
763765
@ style='width:%d(nSize)%%;'>&nbsp;</div> \
764766
}
765767
--- src/statrep.c
+++ src/statrep.c
@@ -318,15 +318,16 @@
318 && nMaxEvents>0
319 ){
320 /* If the timespan covered by this row contains "now", then project
321 ** the number of changes until the completion of the timespan and
322 ** show a dashed box of that projection. */
 
323 int nExtra = (int)(((double)nCount)/rNowFraction) - nCount;
324 int nXSize = (100 * nExtra)/nMaxEvents;
325 @ <span class='statistics-report-graph-line' \
326 @ style='display:inline-block;min-width:%d(nSize)%%;'>&nbsp;</span>\
327 @ <span class='statistics-report-graph-extra' \
328 @ style='display:inline-block;min-width:%d(nXSize)%%;'>&nbsp;</span>\
329 }else{
330 @ <div class='statistics-report-graph-line' \
331 @ style='width:%d(nSize)%%;'>&nbsp;</div> \
332 }
@@ -747,18 +748,19 @@
747 if( zCurrentWeek!=0
748 && strcmp(zWeek, zCurrentWeek)==0
749 && rNowFraction>0.05
750 && nMaxEvents>0
751 ){
752 /* If the covered covered by this row contains "now", then project
753 ** the number of changes until the completion of the week and
754 ** show a dashed box of that projection. */
 
755 int nExtra = (int)(((double)nCount)/rNowFraction) - nCount;
756 int nXSize = (100 * nExtra)/nMaxEvents;
757 @ <span class='statistics-report-graph-line' \
758 @ style='display:inline-block;min-width:%d(nSize)%%;'>&nbsp;</span>\
759 @ <span class='statistics-report-graph-extra' \
760 @ style='display:inline-block;min-width:%d(nXSize)%%;'>&nbsp;</span>\
761 }else{
762 @ <div class='statistics-report-graph-line' \
763 @ style='width:%d(nSize)%%;'>&nbsp;</div> \
764 }
765
--- src/statrep.c
+++ src/statrep.c
@@ -318,15 +318,16 @@
318 && nMaxEvents>0
319 ){
320 /* If the timespan covered by this row contains "now", then project
321 ** the number of changes until the completion of the timespan and
322 ** show a dashed box of that projection. */
323 int nProj = (int)(((double)nCount)/rNowFraction);
324 int nExtra = (int)(((double)nCount)/rNowFraction) - nCount;
325 int nXSize = (100 * nExtra)/nMaxEvents;
326 @ <span class='statistics-report-graph-line' \
327 @ style='display:inline-block;min-width:%d(nSize)%%;'>&nbsp;</span>\
328 @ <span class='statistics-report-graph-extra' title='%d(nProj)' \
329 @ style='display:inline-block;min-width:%d(nXSize)%%;'>&nbsp;</span>\
330 }else{
331 @ <div class='statistics-report-graph-line' \
332 @ style='width:%d(nSize)%%;'>&nbsp;</div> \
333 }
@@ -747,18 +748,19 @@
748 if( zCurrentWeek!=0
749 && strcmp(zWeek, zCurrentWeek)==0
750 && rNowFraction>0.05
751 && nMaxEvents>0
752 ){
753 /* If the timespan covered by this row contains "now", then project
754 ** the number of changes until the completion of the week and
755 ** show a dashed box of that projection. */
756 int nProj = (int)(((double)nCount)/rNowFraction);
757 int nExtra = (int)(((double)nCount)/rNowFraction) - nCount;
758 int nXSize = (100 * nExtra)/nMaxEvents;
759 @ <span class='statistics-report-graph-line' \
760 @ style='display:inline-block;min-width:%d(nSize)%%;'>&nbsp;</span>\
761 @ <span class='statistics-report-graph-extra' title='%d(nProj)' \
762 @ style='display:inline-block;min-width:%d(nXSize)%%;'>&nbsp;</span>\
763 }else{
764 @ <div class='statistics-report-graph-line' \
765 @ style='width:%d(nSize)%%;'>&nbsp;</div> \
766 }
767

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button