Displaying Graph outside Dashboard

Hi,

Thank u Vipsoft, based on ur kind guidance i was able to write a plugin for displaying a graph onto the dashboard using Text file as datasource…

the pugin code is…

function pieChart($url = ‘libs/open-flash-chart/data-files/pie-4.txt’)
{
echo ‘
’;
$pathToLibraryOpenChart = ‘libs/open-flash-chart/’;
$pathToLibrarySwfObject = ‘libs/swfobject/’;

            $url = urlencode($url);
    $requiredFlashVersion = "9.0.0";
            echo 'swfobject.embedSWF(
                    "'. $pathToLibraryOpenChart .'open-flash-chart.swf?piwik='. Piwik_Version::VERSION .'",
                    "my_chart",
                    "350", "250",
                    "'. $requiredFlashVersion .'",
                    "'. $pathToLibrarySwfObject .'expressInstall.swf",
                    {
                            "data-file":"'.$url.'",
                    //      "loading":"'. htmlspecialchars(Piwik_Translate('General_Loading')) .'"
                    },
                                    {
                                            "allowScriptAccess":"always",
                                            "wmode":"opaque"
                                    },
                                    {"bgcolor":"#FFFFFF"}
                            );
                    </script>';

            echo '<p>Pie Chart</p>

<div id="my_chart"></div>';

    }

Now i am unable to display the graph outside the Dashboard…
i.e localhost/piwik/uploader.php

I need to display the graph in this uploader.php…

Pls kindly help me out to sort out this problem…