Sign in to follow this  
mimsc

Set Background Color Of The Chart When Chart Messages Are Shown

Recommended Posts

Hello Im trying to use the example of setting the background color for when a chart message shows up, but it still shows up as white??

 

var myChart = new FusionCharts("../js/FusionCharts/MSCombi3D.swf", "myChartId", "450", "450", "0", "1","#eeeecc");

 

myChart.configure("ChartNoDataText", "No data found for the current filter settings.");

myChart.render("div_view");

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Please use the method SetTransparent( isTransparent: boolean ).

 

This method makes the chart background ready to become transparent.

 

You will need to set bgAlpha, canvasBgAlpha etc. attributes of the <chart> element to finalize the transparency. The function accepts a Boolean parameter. Only when true is passed, the chart is prepared to have transparent background.

 

 

Ref. Code:

myChart.setDataXML( "<chart bgAlpha='0,0'><set value='213' /></chart>");
myChart.setTransparent(true);

 

Hope this helps!

Edited by Bindhu

Share this post


Link to post
Share on other sites

I think you misunderstod my question. Al I want to do is change the background color of the message box that appears when the chart data is null.

 

I am able to change the text...but I am unable to change from the default color of white. The example given does not seem to work...and neither does the configure

 

this example does not work:

 

<div id="chartContainer">FusionCharts will load here</div>

<script type="text/javascript">

var myChart = new FusionCharts("Column2D.swf", "myChartId", "300", "250", "0", "1", "#DCD8EB");

myChart.setXMLUrl("<chart></chart>");

myChart.configure("ChartNoDataText", "Please select a record above");

myChart.render("chartContainer");

</script>

 

http://docs.fusioncharts.com/charts/contents/advanced/ChartMessages.html

Share this post


Link to post
Share on other sites

Hi mimsc,

 

We had located an issue related to setting background color of chart messages. We will fix this in the next release.

 

But, as a work-around, till the next release, you can add a line of code along with your code (you sent in your last post) :

 

myChart.setTransparent(true);

 

before, you call .render(...)

 

Can you please try this once and let us know?

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