=== 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-05 17:12:10 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java 2011-09-07 13:14:46 +0000 @@ -86,6 +86,10 @@ private int id; private String title; + + private String domainAxixLabel; + + private String rangeAxisLabel; private String type; @@ -330,6 +334,26 @@ this.title = title; } + public String getDomainAxixLabel() + { + return domainAxixLabel; + } + + public void setDomainAxixLabel( String domainAxixLabel ) + { + this.domainAxixLabel = domainAxixLabel; + } + + public String getRangeAxisLabel() + { + return rangeAxisLabel; + } + + public void setRangeAxisLabel( String rangeAxisLabel ) + { + this.rangeAxisLabel = rangeAxisLabel; + } + public String getType() { return type; === 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-05 21:57:06 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2011-09-07 13:14:46 +0000 @@ -92,6 +92,7 @@ import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.CategoryLabelPositions; import org.jfree.chart.axis.NumberAxis; +import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.labels.StandardPieSectionLabelGenerator; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.plot.DatasetRenderingOrder; @@ -651,6 +652,10 @@ CategoryAxis xAxis = plot.getDomainAxis(); xAxis.setCategoryLabelPositions( chart.isVerticalLabels() ? CategoryLabelPositions.UP_45 : CategoryLabelPositions.STANDARD ); + xAxis.setLabel( chart.getDomainAxixLabel() ); + + ValueAxis yAxis = plot.getRangeAxis(); + yAxis.setLabel( chart.getRangeAxisLabel() ); // --------------------------------------------------------------------- // Color & antialias @@ -672,12 +677,12 @@ if ( chart.isType( TYPE_STACKED_BAR ) ) { stackedBarChart = ChartFactory.createStackedBarChart( chart.getTitle(), - null, null, dataSet, orientation, true, false, false ); + chart.getDomainAxixLabel(), chart.getRangeAxisLabel(), dataSet, orientation, true, false, false ); } else { stackedBarChart = ChartFactory.createStackedBarChart3D( chart.getTitle(), - null, null, dataSet, orientation, true, false, false ); + chart.getDomainAxixLabel(), chart.getRangeAxisLabel(), dataSet, orientation, true, false, false ); } CategoryPlot plot = (CategoryPlot) stackedBarChart.getPlot(); === modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml' --- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml 2011-07-21 03:29:35 +0000 +++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml 2011-09-07 13:14:46 +0000 @@ -14,6 +14,10 @@ + + + + === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/SaveChartAction.java' --- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/SaveChartAction.java 2011-07-07 13:29:56 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/SaveChartAction.java 2011-09-07 13:14:46 +0000 @@ -105,6 +105,20 @@ this.id = id; } + private String domainAxisLabel; + + public void setDomainAxisLabel( String domainAxisLabel ) + { + this.domainAxisLabel = domainAxisLabel; + } + + private String rangeAxisLabel; + + public void setRangeAxisLabel( String rangeAxisLabel ) + { + this.rangeAxisLabel = rangeAxisLabel; + } + private String title; public void setTitle( String title ) @@ -304,6 +318,8 @@ Collections.sort( periods, new AscendingPeriodComparator() ); chart.setTitle( title ); + chart.setDomainAxixLabel( domainAxisLabel ); + chart.setRangeAxisLabel( rangeAxisLabel ); chart.setHideSubtitle( hideSubtitle ); chart.setType( type ); chart.setSize( size ); === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2011-09-05 17:12:10 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2011-09-07 13:14:46 +0000 @@ -381,4 +381,6 @@ intro_report_table_groups = Create, modify, view and delete report table groups. Groups are used for improved analysis. confirm_delete = Are you sure you want to delete this object ? stacked_bar_chart = Stacked bar chart -stacked_bar3d_chart = Stacked 3D bar chart \ No newline at end of file +stacked_bar3d_chart = Stacked 3D bar chart +domain_axis_label_x = Domain axis label (x) +range_axis_label_y = Range axis label (y) \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartForm.vm' --- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartForm.vm 2011-09-05 17:12:10 +0000 +++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartForm.vm 2011-09-07 13:14:46 +0000 @@ -57,12 +57,18 @@ - + + + + + + + + -