dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14593
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5008: Minor fix
------------------------------------------------------------
revno: 5008
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-10-23 14:24:24 +0200
message:
Minor fix
modified:
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-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-10-23 12:05:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/web/api/resources/ChartResource.java 2011-10-23 12:24:24 +0000
@@ -56,9 +56,9 @@
}
@GET
- @Path( "/{id}" )
+ @Path( "/{id}/{width}/{height}" )
@Produces( ContextUtils.CONTENT_TYPE_PNG )
- public Response getChart( @PathParam("id") Integer id )
+ public Response getChart( @PathParam("id") Integer id, @PathParam("width") final Integer width, @PathParam("height") final Integer height )
throws Exception
{
final JFreeChart jFreeChart = chartService.getJFreeChart( id, i18nManager.getI18nFormat() );
@@ -73,7 +73,7 @@
public void write( OutputStream out )
throws IOException, WebApplicationException
{
- ChartUtilities.writeChartAsPNG( out, jFreeChart, 460, 330, true, 0 );
+ ChartUtilities.writeChartAsPNG( out, jFreeChart, width, height, true, 0 );
}
} ).build();
}