Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

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

    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 Files

    #2
    This has now been addressed for tomorrow's nightly builds, except note that Batik and related libraries are still required for export of zoom charts, even in non-IE browsers. This is related to the fact that zoom charts are effectively two nested charts, which is easily handled in the SVG export that Batik allows us to do, but more complex in the pure image export used for non-IE browsers.

    If you have a severe need to get rid of Batik for some reason, we think we can get around the need for it for zoom chart exports - it would be a tiny feature sponsorship.

    Comment

    Working...
    X