Sign in to follow this  
JorgeV

My Chart is not displayed - white box only

Recommended Posts

Hi,

 

 

 

I have done the example you have in the documentation and I only get a white box. I try to comment the directories to make sure the paths were correct and yes I get different errors when I make changes to any of the lines, so the paths are correct otherwise I would get those errors. I think I'm missing something else.

 

Here is part of my code.

 

 

 

Thanks for the help.

 

 

 

# Including FusionChart PHP class

 

include('../charts/Class/FusionCharts_Gen.php');

 

 

 

# Creating Chart

 

$FC2 = new FusionCharts("Column2D","500","250");

 

 

 

# Set Relative Path to SWF file

 

$FC2->setSWFPath("../charts/fushioncharts/");

 

 

 

# Set Chart attributes

 

$strParam="caption=Preload Games Revenue;numberPrefix=$";

 

$FC2->setChartParams($strParam);

 

 

 

#Add chart values and category names

 

$FC2->addChartData("40800","label=Week 1");

 

$FC2->addChartData("31400","label=Week 2");

 

$FC2->addChartData("26700","label=Week 3");

 

$FC2->addChartData("54400","label=Week 4");

 

 

 

 

 

 

 

OPS Charts

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<?php

 

#Render Chart

 

$FC2->renderChart(); ?>

 

 

 

 

 

 

 

 

 

 

 

 

 

I'm using Firefox 3.6.3 and MS Explorer 7 - 7.05730.13 --- just fyi

 

 

 

Thanks for the help

post-6887-128441583504_thumb.jpg

Share this post


Link to post
Share on other sites

Hi,

 

 

 

I changed the way the chart is generated. Instead of using FusionCharts_Gen.php I used FusionCharts.php and used the $StrXML and rendering the chart with more parameters. That generated my chart.

 

 

 

There must be something missing on your documentation since I followed the instructions of:

 

 

 

FusionCharts PHP Class

 

Creating First Chart

 

 

 

So there are two ways to do this. I'll read more carefully to find out the differences, but I think is confusing that you have two chapters for PHP. Well maybe for PHP experts it's easy, I'm just starting.

 

 

 

Thanks,

 

 

 

Jorge V.

 

 

 

ps - sorry for how the code is displayed there is a section missing I guess because it's HTML and get's ignored when displayed. I'll take a snapshot next time instead of adding the code itself in here.

Share this post


Link to post
Share on other sites

Hi JorgeV,

 

 

 

i am attaching a sample project build using our php class.

 

it is fully working.

 

 

 

for your sample

 

please make sure that

 

1. all paths entered in your code are refering to the correct file.

 

2. you have included the FusionCharts.js file properly

sample.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this