Last modified: 2012-06-05 14:15:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T39332, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37332 - [SRF] 1.8 [patch]; jqPlotBar/jqPlotPie: parameter['min'] wasn't taken into account for display
[SRF] 1.8 [patch]; jqPlotBar/jqPlotPie: parameter['min'] wasn't taken into ac...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticResultFormats (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Jeroen De Dauw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-05 00:28 UTC by MWJames
Modified: 2012-06-05 14:15 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MWJames 2012-06-05 00:28:18 UTC
It beats me why that hasn't been discovered before, and since I needed to fixed that here are two small changes to jqPlotBar/jqPlotPie. It is only needed for those using class SMWAggregatablePrinter.

I would provide a patch but gerrit git still causes more trouble ... anyway for 

## SRF_jqplotBar.php

- $dataObject['series'] = $data; 

+// Filter min values  
+foreach ( $data as $key => $value ) {
+	if ( $value <= $this->params['min'] ) continue;
+	$dataObject['series'][$key] = $value; 
+ }

## SRF_jqplotPie.php

-foreach ( $data as $name => $value ) {
-	$json[] = array( $name , $value );
-}

+// Filter min values  
+foreach ( $data as $name => $value ) {
+	if ( $value <= $this->params['min'] ) continue;
+		$json[] = array( $name , $value ); 
+}
Comment 1 Jeroen De Dauw 2012-06-05 14:15:31 UTC
Gerrit change #10259

Thanks for the patch! :)

In the future, please try to follow this workflow: https://www.mediawiki.org/wiki/Git/Workflow#How_to_submit_a_patch :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links