=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportImageAction.java' --- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportImageAction.java 2011-11-16 16:13:06 +0000 +++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportImageAction.java 2011-11-16 16:29:35 +0000 @@ -199,7 +199,7 @@ @Override protected String getFilename() { - return "dhis2_gis_" + this.title + ".png"; + return "DHIS2_GIS_" + this.title + ".png"; } @Override === modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/ExportImageAction.java' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/ExportImageAction.java 2011-11-16 16:13:06 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/ExportImageAction.java 2011-11-16 16:29:35 +0000 @@ -54,13 +54,6 @@ // ------------------------------------------------------------------------- // Output & input // ------------------------------------------------------------------------- - - private String title; - - public void setTitle( String title ) - { - this.title = title; - } private String svg; @@ -89,7 +82,7 @@ protected String execute( HttpServletResponse response, OutputStream out ) throws Exception { - if ( title == null || svg == null || width == null || height == null ) + if ( svg == null || width == null || height == null ) { log.info( "Export map from session" ); @@ -101,7 +94,6 @@ svgDocument = new SVGDocument(); - svgDocument.setTitle( this.title ); svgDocument.setSvg( this.svg ); svgDocument.setWidth( this.width ); svgDocument.setHeight( this.height ); @@ -123,7 +115,7 @@ @Override protected String getFilename() { - return "dhis2_dv_" + this.title + ".png"; + return "DHIS2_Visualizer.png"; } @Override === modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/export/SVGDocument.java' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/export/SVGDocument.java 2011-11-16 16:13:06 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/export/SVGDocument.java 2011-11-16 16:29:35 +0000 @@ -37,8 +37,6 @@ + " ]>"; - private String title; - private String svg; private int width; @@ -62,17 +60,6 @@ return svg; } - public String getTitle() - { - return title; - } - - public void setTitle( String title ) - { - this.title = title; - - } - public String getSvg() { return svg; === modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2011-11-16 16:13:06 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2011-11-16 16:29:35 +0000 @@ -54,7 +54,8 @@ degrees: 330 } } - } + }, + inset: 30 }, style: { label: { @@ -360,9 +361,18 @@ 'stroke-width': 0.2 }; }, - //getTitlePosition: function(title) { - //var w = DV.util.viewport.getSize().x; - //var p = (w/2) - ((title.length/2) * + getTitle: function() { + return { + type: 'text', + text: DV.init.isInit ? 'Example chart' : DV.state.filter.data[0], + font: 'bold 15px arial', + fill: '#222', + width: 300, + height: 20, + x: 28, + y: 16 + }; + }, line: { getSeriesArray: function() { var a = []; @@ -768,21 +778,11 @@ this.chart = Ext.create('Ext.chart.Chart', { animate: true, store: DV.store.chart, - insetPadding: 25, - items: [{ - type: 'text', - text: DV.init.isInit ? 'Example chart' : DV.state.filter.data[0], - font: 'bold 15px arial', - fill: '#222', - width: 300, - height: 20, - x: 41, - y: 15 - }], + insetPadding: DV.conf.chart.inset, + items: DV.util.chart.getTitle(), legend: DV.util.chart.getLegend(), axes: [ { - title: DV.init.isInit ? 'Value' : '', type: 'Numeric', position: 'left', minimum: 0, @@ -820,10 +820,10 @@ }, bar: function(stacked) { this.chart = Ext.create('Ext.chart.Chart', { - width: DV.util.viewport.getSize().x, - height: DV.util.viewport.getSize().y, animate: true, store: DV.store.chart, + insetPadding: DV.conf.chart.inset, + items: DV.util.chart.getTitle(), legend: DV.util.chart.getLegend(), axes: [ { @@ -865,10 +865,10 @@ }, line: function() { this.chart = Ext.create('Ext.chart.Chart', { - width: DV.util.viewport.getSize().x, - height: DV.util.viewport.getSize().y, animate: true, store: DV.store.chart, + insetPadding: DV.conf.chart.inset, + items: DV.util.chart.getTitle(), legend: DV.util.chart.getLegend(), axes: [ { @@ -897,10 +897,10 @@ }, area: function() { this.chart = Ext.create('Ext.chart.Chart', { - width: DV.util.viewport.getSize().x, - height: DV.util.viewport.getSize().y, animate: true, store: DV.store.chart, + insetPadding: DV.conf.chart.inset, + items: DV.util.chart.getTitle(), legend: DV.util.chart.getLegend(), axes: [ { @@ -937,13 +937,12 @@ }, pie: function() { this.chart = Ext.create('Ext.chart.Chart', { - width: DV.util.viewport.getSize().x, - height: DV.util.viewport.getSize().y, animate: true, shadow: true, store: DV.store.chart, - legend: DV.util.chart.getLegend(), insetPadding: 60, + items: DV.util.chart.getTitle(), + legend: DV.util.chart.getLegend(), series: [{ type: 'pie', field: DV.store.chart.left[0], @@ -1844,7 +1843,6 @@ return; } - document.getElementById('titleField').value = DV.state.filter.data[0]; document.getElementById('svgField').value = svg[0].parentNode.innerHTML; document.getElementById('widthField').value = DV.util.viewport.getSize().x - 100; document.getElementById('heightField').value = DV.util.viewport.getSize().y - 100; === modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/images/datatable.png' Binary files dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/images/datatable.png 2011-11-16 16:13:06 +0000 and dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/images/datatable.png 2011-11-16 16:29:35 +0000 differ === modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/images/exportimage.png' Binary files dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/images/exportimage.png 2011-11-16 16:13:06 +0000 and dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/images/exportimage.png 2011-11-16 16:29:35 +0000 differ === modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html' --- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html 2011-11-16 16:13:06 +0000 +++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html 2011-11-16 16:29:35 +0000 @@ -9,7 +9,6 @@
-