dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14079
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4642: Minor fix
------------------------------------------------------------
revno: 4642
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-09-22 09:35:27 +0200
message:
Minor fix
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/web/api/resources/ChartResource.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-api/src/main/java/org/hisp/dhis/chart/Chart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java 2011-09-07 13:14:46 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java 2011-09-22 07:35:27 +0000
@@ -50,37 +50,23 @@
private static final long serialVersionUID = 2570074075484545534L;
public static final String DIMENSION_PERIOD_INDICATOR = "period";
-
public static final String DIMENSION_ORGANISATIONUNIT_INDICATOR = "organisationUnit";
-
public static final String DIMENSION_INDICATOR_PERIOD = "indicator";
-
public static final String DIMENSION_PERIOD_DATAELEMENT = "period_dataElement";
-
public static final String DIMENSION_ORGANISATIONUNIT_DATAELEMENT = "organisationUnit_dataElement";
-
public static final String DIMENSION_DATAELEMENT_PERIOD = "dataElement_period";
public static final String TYPE_BAR = "bar";
-
public static final String TYPE_BAR3D = "bar3d";
-
- public static final String TYPE_STACKED_BAR = "stackedBar";
-
- public static final String TYPE_STACKED_BAR3D = "stackedBar3d";
-
+ public static final String TYPE_STACKED_BAR = "stackedBar";
+ public static final String TYPE_STACKED_BAR3D = "stackedBar3d";
public static final String TYPE_LINE = "line";
-
public static final String TYPE_LINE3D = "line3d";
-
public static final String TYPE_PIE = "pie";
-
public static final String TYPE_PIE3D = "pie3d";
public static final String SIZE_NORMAL = "normal";
-
public static final String SIZE_WIDE = "wide";
-
public static final String SIZE_TALL = "tall";
private int id;
=== 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-09-21 21:00:03 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2011-09-22 07:35:27 +0000
@@ -240,12 +240,12 @@
{
RelativePeriods relatives = new RelativePeriods();
relatives.setMonthsThisYear( true );
- List<Period> periods = relatives.getRelativePeriods( 1, format, true );
+ List<Period> periods = periodService.reloadPeriods( relatives.getRelativePeriods( 1, format, true ) );
Chart chart = new Chart();
chart.setTitle( indicator.getName() );
- chart.setType( TYPE_LINE3D );
+ chart.setType( TYPE_BAR );
chart.setSize( SIZE_NORMAL );
chart.setDimension( Chart.DIMENSION_PERIOD_INDICATOR );
chart.setVerticalLabels( true );
@@ -610,7 +610,7 @@
CategoryPlot plot = null;
CategoryDataset[] dataSets = getCategoryDataSet( chart );
-
+
if ( chart.isType( TYPE_LINE ) )
{
plot = new CategoryPlot( dataSets[0], new CategoryAxis(), new NumberAxis(), lineRenderer );
@@ -711,6 +711,7 @@
CategoryPlot plot = (CategoryPlot) stackedBarChart.getPlot();
plot.setBackgroundPaint( Color.WHITE );
+ plot.setOutlinePaint( Color.WHITE );
CategoryAxis xAxis = plot.getDomainAxis();
xAxis.setCategoryLabelPositions( chart.isVerticalLabels() ? CategoryLabelPositions.UP_45
@@ -822,7 +823,7 @@
for ( Period period : chart.getAllPeriods() )
{
Double value = null;
-
+
if ( isIndicatorChart )
{
value = aggregationStrategy.equals( AGGREGATION_STRATEGY_REAL_TIME ) ? aggregationService
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/web/api/resources/ChartResource.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/web/api/resources/ChartResource.java 2011-09-21 17:22:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/web/api/resources/ChartResource.java 2011-09-22 07:35:27 +0000
@@ -82,12 +82,12 @@
@GET
@Path( "/indicator/{indicator}/{orgUnit}" )
@Produces( ContextUtils.CONTENT_TYPE_PNG )
- public Response getIndicatorChart( @PathParam("indicator") String id, @PathParam("orgUnit") String orgUnit )
+ public Response getIndicatorChart( @PathParam("indicator") String indicatorUuid, @PathParam("orgUnit") String orgUnitUuid )
throws Exception
{
- final Indicator indicator = indicatorService.getIndicator( id );
+ final Indicator indicator = indicatorService.getIndicator( indicatorUuid );
- final OrganisationUnit unit = organisationUnitService.getOrganisationUnit( orgUnit );
+ final OrganisationUnit unit = organisationUnitService.getOrganisationUnit( orgUnitUuid );
if ( indicator == null || unit == null )
{