Sign in to follow this  
Guest Basundhara Ghosal

Random text on charts

Recommended Posts

Hi all --

 

 

 

is there anyway to annotate graphs by placing arbitrary text at arbitrary locations on top of the chart?

 

 

 

Thanks

 

 

 

m

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Maria,

In case you wish to display any images/text on top of the chart, please try setting the transparency of the chart div to true.

Ref.- <div id="chartdiv" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div>

<script type="text/javascript">

var myChart = new FusionCharts("../FusionCharts/Column3D.swf", "myChartId", "900", "300", "0", "0");

myChart.setDataURL("Data.xml");

myChart.setTransparent(true);

myChart.render("chartdiv");

</script>

</div>

Hope this helps. :)

Share this post


Link to post
Share on other sites

Hi,

 

 

 

Thanks for your response.

 

However, I am not using javascript. Instead, I have something like

 

 

 

echo renderChartHTML("FusionCharts/Charts/Line.swf", "", $strXML, "totalConsumption", 700, 300, false, false);

 

 

 

because I have generated the XML separately.

 

 

 

So how would I go about specifying this property in the XML?

 

 

 

Thanks again.

 

 

 

Best,

 

m

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Maria,

I am afraid, FusionCharts does not support this.

Share this post


Link to post
Share on other sites

Hi Maria,

In PHP, for transparent chart, you would have to change the call to the constructor as follows:

echo renderChartHTML("FusionCharts/Charts/Line.swf", "", $strXML, "totalConsumption", 700, 300, false, false,true);

Then, you place the text in another div in such a way that it comes on top of the chart.

If the text is still not visible, in the xml, please set bgAlpha='0'.

Hope this helps :)

Srividya

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