Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

RPCManager.exportContent with FacetChart broken.

$
0
0
Hi,

There is regression with exporting charts to PDF.

The following sample works using build SmartClient Version: v9.1p_2014-10-10/Pro Deployment (built 2014-10-10).

The following sample does not work with build SmartClient Version: v9.1p_2014-11-09/Pro Deployment (built 2014-11-09).

Furthermore, the following sample still does not work with build SmartClient Version: v9.1p_2015-01-27/Pro Deployment (built 2015-01-27).


Code:

        final FacetChart fc = new FacetChart();
        fc.setChartType(ChartType.PIE);
        fc.setShowTitle(Boolean.FALSE);
        fc.setFacets(new Facet("somefield", ""));
        fc.setValueProperty("somevalue");
        RecordList rl = new RecordList();
        Record r = new Record();
        r.setAttribute("somefield", "A");
        r.setAttribute("somevalue", 1);
        rl.add(r);
        fc.setData(rl);
        Window window = new Window();
        window.setWidth(400);
        window.setHeight(400);
        window.setTitle("Chart Window");
        window.addItem(fc);

        IButton downloadPdf1 = new IButton("Download FacetChart");
        downloadPdf1.setWidth(200);
        downloadPdf1.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {

            @Override
            public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) {
                DSRequest reqProps = new DSRequest();
                reqProps.setAttribute("skinName", "Enterprise");
                reqProps.setAttribute("pdfName", "export");
                RPCManager.exportContent(fc, reqProps);
            }
        });

        window.addItem(downloadPdf1);
        window.show();

Thanks

Viewing all articles
Browse latest Browse all 4756

Trending Articles