SmartClient Version: v9.1p_2014-08-28/Pro Deployment (built 2014-08-28)
I have some charts for which I *do not* want to display the title, however, when exporting, they lose some context, so I *do* want to export them with a title.
I did manage to get a title exported into the PDF using the following approach.
My first attempt to show the title, export, then hide the title again wasn't working as the title didn't redraw before the export even when I called AbstractChart.this.redraw(). By scheduling the export immediately using a timer, this allowed the chart title to be drawn and the export to pick it up.
This appears to be working OK in FF, Chrome, and IE11 and works and looks a lot nicer than the previously posted approach.
Do you have alternative suggestions as to how I could get the chart title to export without having to do the above workaround?
I have some charts for which I *do not* want to display the title, however, when exporting, they lose some context, so I *do* want to export them with a title.
I did manage to get a title exported into the PDF using the following approach.
Code:
... AbstractChart.this.setShowTitle(Boolean.TRUE); Timer exportTimer = new Timer() { @Override public void run() { final DSRequest requestProperties = new DSRequest(); requestProperties.setExportDisplay(ExportDisplay.DOWNLOAD); requestProperties.setExportFilename(getTitle().replace(' ', '_')); RPCManager.exportContent(AbstractChart.this, requestProperties); AbstractChart.this.setShowTitle(Boolean.FALSE); } }; exportTimer.schedule(0); ...
This appears to be working OK in FF, Chrome, and IE11 and works and looks a lot nicer than the previously posted approach.
Do you have alternative suggestions as to how I could get the chart title to export without having to do the above workaround?
Comment