FusionCharts Forum: How to change colors of 3d Bar Chart - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to change colors of 3d Bar Chart

#1 User is offline   larsonc 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 31-August 10

Posted 31 August 2010 - 09:15 PM

I am very new to FusionCharts and would like to know how to change the 3D Bar Chart Color bars?



I have looked at other post and they say to use an array, but don't quite understand where the code is inserted. Below is a simple 3D Bar Chart I have created can you tell me where the array code would go and provide an example. Also the Chart will grow in time with additional Bar's , do you have to keep adding to the array?






include("../Includes/FusionCharts.php");

include("../Includes/DBConn.php");

?>





<br /> <br /> PBX-In-A-Box Cisco XMLServices Connections<br /> <br />


//You need to include the following JS file, if you intend to embed the chart using JavaScript.

//Embedding using JavaScripts avoids the "Click to Activate..." issue in Internet Explorer

//When you make your own charts, make sure that the path to this JS file is correct. Else, you would



get JavaScript errors.

?>













PBX-In-A-Box - Cisco IP Phone XMLServices












// Connect to the DB

$link = connectToDB();



//$strXML will be used to store the entire XML document generated

//Generate the graph element

$strXML = "


showNames='1' formatNumberScale='0' numberSuffix='' decimalPrecision='0'>";







$strQuery = "SELECT Model, COUNT(Model) FROM stats GROUP BY Model";

$result2 = mysql_query($strQuery) or die(mysql_error());



while($ors2=mysql_fetch_array($result2))

//$ors2 = mysql_fetch_array($result2);/>

//Generate



$strXML .= "";





//free the resultset

mysql_free_result($result2);





mysql_close($link);



//Finally, close element



$strXML .= "
";







//Create the chart - Pie 3D Chart with data from $strXML

echo renderChart("../../FusionCharts/FCF_Column3D.swf", "", $strXML, "Model", 650, 450);

?>








0

Other Replies To This Topic

#2 User is offline   Basundhara Ghosal 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2459
  • Joined: 15-September 09

Posted 31 August 2010 - 11:11 PM

Hi,

In case you wish to customize the color of each dataplot of the chart, please try using the attribute 'color' in the <set> element of your XML codes.

Ref.- http://www.fusioncharts.com/free/docs/Contents/ChartSS/XML_Column3D.html

Hope this helps.

Regards,

Basundhara Ghosal

Follow us on Twitter :D
0

Other Replies To This Topic

#3 User is offline   larsonc 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 31-August 10

Posted 01 September 2010 - 09:30 AM

My graphs change as it updates from the database as new phone models connect, this would be a nightmare to keep up with. Is there not some automated way since the data and additional columns would be constantly changing?



Looks like the product has many limitations when pulling data from a database to change the charts?? :-(
0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic