XML and Flash charts – FAQ

I received e-mails asking for more details about my XML+Flash chart demo, so here are the answers to some frequently asked questions.

Where do you put the swf file? And how do I point to it?
The swf is a small file and can easily be stored in a document library, in your SharePoint farm. You can then point to it using its URL, as you would with any other file. For example, here is the location of my doughnut flash chart:
http://www.pathtosharepoint.com/Utilities/Doughnut3D.swf

How did you create the XML file and the code to display the chart?
I didn’t create them, I just reused an existing example proposed on the FusionCharts site. The idea behind this technique is that in SharePoint you can reuse XML driven charts that were initially created for standard Web pages.

If you use FusionCharts v3, you’ll find examples in the gallery (I took my example from the pie/doughnut category). For the free FusionCharts v2 version, the examples are here.
To make an example work on your SharePoint site you need three components:
– the XML file  containing the data (click on “View XML” in the example you have chosen)
– the charting component (swf file) that you get from the FusionCharts package
–  the HTML and script that you’ll include in your SharePoint page. To get it, display an example and view the source code.

My demo uses FusionCharts, but you can apply this method to any XML driven component.

Is there a specific webpart for the HTML and script, or do you use a Content Editor Web Part?
As usual, I rely on the CEWP to include the HTML and script in the page.

If your data is stored in SharePoint list, how can you get it in XML format?
There are several ways to do this (and none of them is perfect):
URL protocol
– Web Services
– RSS feed

Note: the use of FusionCharts v3 is subject to the licensing terms. For the free FusionCharts v2, see the terms of use.

2 thoughts on “XML and Flash charts – FAQ

  1. Hi Christophe

    I’m pleased to say i’ve never asked a question with any of the tips you’ve posted on here and they work brilliantly just like everyone else posts.

    However i’m really struggling with this one and i can’t find any other documentation, comment etc to help me out.

    it might be a PICNIC moment and or is outside of my skill level… but nay help will be gratefully received.

    How do i “view the source code” to get the HTML/script that I’ll include in my SharePoint page?
    Would using firefox be beneficial? i seem to remember it had a source code viewer….

    BR

    Russ

  2. Christophe

    I was being thick, twas a PICNIC moment for sure!

    View (on toolbar), Source … haha brain only engaged after i had typed the above, sorry for wasting your time.

Comments are closed.