Jump to content

Extension talk:CooperationStatistics

Add topic
From mediawiki.org
Latest comment: 15 years ago by Al Maghi in topic bugzilla:20075
To report a bug and to submit a patch consider using bugzilla (product=MediaWiki extensions & component=CooperationStatistics)
See also the bug list of this component.

bugzilla:20075

[edit]

Hi!

Thanks for the useful extension! I've noticed a bug in the pie chart generation when data has larger numbers than 100. The pie chart must also be scaled accordinly. Here's the fix:

Index: CooperationStatistics_body.php
===================================================================
--- CooperationStatistics_body.php      (revision 54255)
+++ CooperationStatistics_body.php      (working copy)
@@ -63,6 +63,7 @@
                        'chs' => $wgCoopStatsChartDimensions,
                        'cht' => 'p3',
                        'chd' => 't:' . implode( ',', $stats ),
+                       'chds' => '0,' . max( $stats ),
                        'chl' => implode( wfMsg( 'word-separator' ) . wfMsg( 'cooperationstatistics-users' ) . ' |', array_keys( $stats ) ) . wfMsg( 'word-separator' ) . wfMsg( 'cooperationstatistics-legendmore' )
                ) );
        }

--Jouni Renfors 08:24, 3 August 2009 (UTC)Reply

Thanks for your improvement. Requested in bugzilla:20075. almaghi 10:26, 5 August 2009 (UTC)Reply