Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

FusionChart integration

Chris Roffler
1 decade ago Jan 13, 2010 3:23pm
Sami Ekblad
1 decade ago Jan 14, 2010 1:10pm
Chris Roffler
1 decade ago Jan 15, 2010 9:47am
Chris Roffler
1 decade ago Jan 15, 2010 1:25pm
Sami Ekblad
1 decade ago Jan 15, 2010 2:12pm
Mathew Broughton
1 decade ago Jan 15, 2010 2:43pm
Sami Ekblad
1 decade ago Jan 16, 2010 5:37pm
Chris Roffler
1 decade ago Jan 19, 2010 12:09pm
Artur Signell
1 decade ago Jan 19, 2010 3:56pm
Sami Ekblad
1 decade ago Jan 20, 2010 7:33pm
Sami Ekblad
1 decade ago Jan 20, 2010 10:29pm
Sami Ekblad
1 decade ago Jan 21, 2010 7:25am

Good news for all FusionChart users!

I found a solution that works with current Vaadin 6.2 for passing parameters to a
Flash movie and not using FlashVars:

// First chart
        Embedded chart1 = new Embedded();
        chart1.setSource(new ExternalResource(
                "../MSColumn3D.swf?dataUrl=data-1.xml") {
            // Override as a workaround for Vaadin ticket #4020
            @Override
            public String getMIMEType() {
                return "application/x-shockwave-flash";
            }
        });
        chart1.setType(Embedded.TYPE_OBJECT);
        chart1.setWidth("400px");
        chart1.setHeight("300px");
        w.addComponent(chart1);

        // Second chart
        Embedded chart2 = new Embedded();
        chart2.setSource(new ExternalResource(
                "../MSColumn3D.swf?dataUrl=data-2.xml") {
            // Override as a workaround for Vaadin ticket #4020
            @Override
            public String getMIMEType() {
                return "application/x-shockwave-flash";
            }
        });
        chart2.setType(Embedded.TYPE_OBJECT);
        chart2.setWidth("400px");
        chart2.setHeight("300px");
        w.addComponent(chart2);

        w.addURIHandler(new URIHandler() {
            public DownloadStream handleURI(URL context, String relativeUri) {
                if (relativeUri.startsWith("data-")) {
                    return new DownloadStream(getClass().getResourceAsStream(
                            relativeUri), "application/xml", relativeUri);
                }
                return null;
            }
        });

This is a little bit more complicated as it should since I had to find workarounds to these issues: #4020 and #4021.
As they are quite straight-forward to fix, I'm expecting them to get fixed in the next maintenance release.

Last updated on Jan, 21st 2010
Chris Roffler
1 decade ago Jan 21, 2010 9:56am
Sami Ekblad
1 decade ago Jan 21, 2010 7:27pm
Chris Roffler
1 decade ago Jan 22, 2010 12:48pm
Chris Roffler
1 decade ago Jan 22, 2010 2:28pm
Fadi Al-Katout
1 decade ago Sep 06, 2010 8:22am
Sami Ekblad
1 decade ago Sep 07, 2010 10:08am
Joachim Hubele
1 decade ago Dec 08, 2010 7:14pm
Rohitdev Kulshrestha
10 years ago Feb 01, 2012 5:31am
stf obc
9 years ago Apr 30, 2012 10:12am