← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5441: Web api, chart optional title

 

------------------------------------------------------------
revno: 5441
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-12-15 19:48:17 +0100
message:
  Web api, chart optional title
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ChartController.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-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ChartController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ChartController.java	2011-12-15 18:39:36 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ChartController.java	2011-12-15 18:48:17 +0000
@@ -135,6 +135,7 @@
         @RequestParam( value = "periods", required = false ) boolean periods,
         @RequestParam( value = "width", defaultValue = "700", required = false ) int width,
         @RequestParam( value = "height", defaultValue = "500", required = false ) int height,
+        @RequestParam( value = "skipTitle", required = false ) boolean skipTitle,
         HttpServletResponse response ) throws Exception
     {
         Indicator indicator = indicatorService.getIndicator( indicatorUid );
@@ -144,11 +145,11 @@
         
         if ( periods )
         {
-            chart = chartService.getJFreePeriodChart( indicator, unit, true, i18nManager.getI18nFormat() );
+            chart = chartService.getJFreePeriodChart( indicator, unit, !skipTitle, i18nManager.getI18nFormat() );
         }
         else
         {
-            chart = chartService.getJFreeOrganisationUnitChart( indicator, unit, true, i18nManager.getI18nFormat() );
+            chart = chartService.getJFreeOrganisationUnitChart( indicator, unit, !skipTitle, i18nManager.getI18nFormat() );
         }
         
         response.setContentType( ContextUtils.CONTENT_TYPE_PNG );