dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11738
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3424: updated tests to use TYPE_BAR
------------------------------------------------------------
revno: 3424
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-04-18 15:03:42 +0200
message:
updated tests to use TYPE_BAR
modified:
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java
dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/chart/ChartServiceTest.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/chart/impl/DefaultChartService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2011-04-18 12:33:30 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2011-04-18 13:03:42 +0000
@@ -524,14 +524,14 @@
return multiplePieChart;
}
+ else if ( chart.isType( TYPE_BAR3D ) )
+ {
+ plot = new CategoryPlot( dataSets[0], new CategoryAxis(), new NumberAxis(), bar3dRenderer );
+ }
else if ( chart.isType( TYPE_BAR ) )
{
plot = new CategoryPlot( dataSets[0], new CategoryAxis(), new NumberAxis(), barRenderer );
}
- else if ( chart.isType( TYPE_BAR3D ) )
- {
- plot = new CategoryPlot( dataSets[0], new CategoryAxis(), new NumberAxis(), bar3dRenderer );
- }
if ( chart.isRegression() )
{
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/chart/ChartServiceTest.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/chart/ChartServiceTest.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/chart/ChartServiceTest.java 2011-04-18 13:03:42 +0000
@@ -147,8 +147,13 @@
units.add( unitC );
chartA = createChart( 'A', indicators, periods, units );
+ chartA.setType( Chart.TYPE_BAR );
+
chartB = createChart( 'B', indicators, periods, units );
+ chartB.setType( Chart.TYPE_BAR );
+
chartC = createChart( 'C', indicators, periods, units );
+ chartC.setType( Chart.TYPE_BAR );
}
// -------------------------------------------------------------------------