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

FacetChart of type ChartType.PIE displays as oval when exported as PDF.

$
0
0
There has been some change in behaviour with respect to exporting FacetChart as PDF.

In build SmartClient Version: v9.1p_2014-10-10/Pro Deployment (built 2014-10-10), the pie chart appears circular in the exported PDF (see pie_2014-10-10.jpg) as expected.

In build SmartClient Version: v9.1p_2015-01-27/Pro Deployment (built 2015-01-27), the pie chart appears as an oval in the exported PDF (see pie_2015-01-27.jpg).

It appears related to handling of the whitespace.

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(1000);
        window.setHeight(400);
        window.setCanDragResize(Boolean.TRUE);
        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();


Click the "Download FacetChart" button and compare the generated PDFs between those builds.

FF 24.8.1 ESR
Chrome Version 40.0.2214.93 (64-bit)

Regards

Attached Images
File Type: jpg pie_2015-01-27.jpg (10.2 KB)
File Type: jpg pie_2014-10-10.jpg (9.7 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles