https://bugzilla.wikimedia.org/show_bug.cgi?id=37332

       Web browser: ---
             Bug #: 37332
           Summary: [SRF] 1.8 [patch]; jqPlotBar/jqPlotPie:
                    parameter['min'] wasn't taken into account for display
           Product: MediaWiki extensions
           Version: master
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: SemanticResultFormats
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---


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 ); 
+}

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to