anirbansarkar

Chart Transparency

Recommended Posts

Hello everyone,

 

I have a chart which has been generated using the Fusion chart PHP class. The chart is appearing fine.

Now I have embedded a menu at the left side of the chart which when expanded gets hidden under the chart. I tried googling the topic and came up with some comcept of canvasbgalpha but unfortunately it is not working.

 

I am attaching a screenshot of the problem that I am facing. Note how the child menu is getting hidden under the chart.

 

Any early help will be highly appreciated.

 

Thanks.

post-7667-0-00073500-1345611801_thumb.jpg

Share this post


Link to post
Share on other sites

Many thanks for the reply.

 

Kindly note that I have used the PHP class for generating the chart and not the .js file and I have used the PHP class file FusionCharts.php.

The reference to the file FusionCharts.js is not included anywhere in my code.

 

A snippet of my code is given below :

 

//********************CODE STARTS**************************

 

$FC = new FusionCharts("MSColumn3D","400","350");

 

$FC->setSWFPath("");

 

$strParam="caption=TOTAL EARNING (".$prestyr."-".$preendyr." AND ".$curstyr."-".$curendyr.");subcaption=;xAxisName=FINANCIAL QUARTER;yAxisName=AMOUNT(IN CR);showValues=1;sNumberSuffix= U;formatNumberScale=0 ";

 

$FC->setChartParams($strParam);

 

$FC->addCategory("XXXXXX");

 

$FC->addDataset("XXXXXX");

 

$FC->addChartData(XXXXX);

 

$FC->renderChart();

 

//********************CODE ENDS****************************

 

How do I invoke the concept of transparency in the above code?

 

Thanks once again!!!

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi Anirban,

 

You would have to set "$isTransparent" parameter as "true" in the FusionCharts constructor.

 

Ref. Code:

FusionCharts(string $chartType, string $width, string $height[,string $chartID, Boolean $isTransparent])

 

Also, refer the following link for more information:

http://docs.fusioncharts.com/charts/contents/?guide-for-web-developers/fusioncharts-php-class/Functions.html

Share this post


Link to post
Share on other sites

Hi Anirban,

 

You would have to set "$isTransparent" parameter as "true" in the FusionCharts constructor.

 

Ref. Code:

FusionCharts(string $chartType, string $width, string $height[,string $chartID, Boolean $isTransparent])

 

Also, refer the following link for more information:

http://docs.fusioncharts.com/charts/contents/?guide-for-web-developers/fusioncharts-php-class/Functions.html

Share this post


Link to post
Share on other sites

Many thanks for your response.

 

This is what I have tried after going through your response :

 

//*******************CODE STARTS**********************

 

$FC = new FusionCharts("MSColumn3D","400","350","mychart",true);

 

//******************CODE ENDS**************************

 

However, it is giving me the undergiven error when running the page :

 

Message: Object doesn't support property or method 'setTransparent'

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hey,

 

Setting the transparency for the chart, while creating FusionCharts PHP Class object, is working fine from our end.

 

Please find the sample attached and let us know if this helps to you.

 

Also, could you please check the "bgAlpha" attribute of the <chart> element is set to "0" and you have included the "FusionCharts_Gen.php" in your page properly?

 

Awaiting your feedback.

PHPClass_setTransparent_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