dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16261
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6145: Org unit distr report, removed total and none values from chart
------------------------------------------------------------
revno: 6145
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-03-01 12:38:41 +0100
message:
Org unit distr report, removed total and none values from chart
modified:
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java 2012-01-25 17:11:43 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/orgunitdistribution/impl/DefaultOrgUnitDistributionService.java 2012-03-01 11:38:41 +0000
@@ -93,7 +93,7 @@
Assert.isTrue( grid != null && grid.getHeight() == 1 );
- for ( int i = 1; i < grid.getWidth(); i++ ) // Skip name column
+ for ( int i = 1; i < grid.getWidth() - 2; i++ ) // Skip name, none and total column
{
categoryValues.put( grid.getHeaders().get( i ).getName(), Double.valueOf( String.valueOf( grid.getRow( 0 ).get( i ) ) ) );
}
@@ -131,8 +131,8 @@
grid.addHeader( new GridHeader( group.getName(), false, false ) );
}
+ grid.addHeader( new GridHeader( HEADER_NONE, false, false ) );
grid.addHeader( new GridHeader( HEADER_TOTAL, false, false ) );
- grid.addHeader( new GridHeader( HEADER_NONE, false, false ) );
boolean hasNone = false;
@@ -159,8 +159,8 @@
int total = subTree != null ? subTree.size() : 0;
int none = total - totalGroup;
+ grid.addValue( none );
grid.addValue( totalGroup );
- grid.addValue( none );
if ( none > 0 )
{