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.
The hiddenLabel is a member variable of our chart class that is instantiated but never added to any layout and is destroyed when the chart is destroyed (via the destroy method).
Do you have any suggestions as to how I could get the *real* chart title to export, but remain hidden? If not, do you see any issues with the above approach or do you have any alternative recommendations?
One unvalidated concern I have with the above approach is that the title and chart could become disconnected from each other in the exported PDF when multiple charts are exported at a time, since the label and chart are separate canvases.
Thanks
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:
...
if (hiddenLabel == null) {
hiddenLabel = new Label();
hiddenLabel.setAlign(Alignment.CENTER);
}
hiddenLabel.setContents("<div style='font-weight: bold; font-family: " + FONT_FAMILY + "; font-size: "
+ TITLE_FONT_SIZE + "px; color: " + Colors.BLACK_COLOR + ";'>" + StringUtil.asHTML(getTitle(), false)
+ "</div>");
DSRequest requestProperties = new DSRequest();
requestProperties.setExportDisplay(ExportDisplay.DOWNLOAD);
requestProperties.setExportFilename(getTitle().replace(' ', '_'));
RPCManager.exportContent(new Canvas[] { hiddenLabel, this *the chart* }, requestProperties);
...Do you have any suggestions as to how I could get the *real* chart title to export, but remain hidden? If not, do you see any issues with the above approach or do you have any alternative recommendations?
One unvalidated concern I have with the above approach is that the title and chart could become disconnected from each other in the exported PDF when multiple charts are exported at a time, since the label and chart are separate canvases.
Thanks