|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 1/30/2008 4:27:43 PM
Posts: 3,
Visits: 5
|
|
Hello,
I'm trying to modify this file given as demo. Everything works good but what I want is change the colors of the datasets.
I know how to do this in a simple xml file but in this page, the xml is generated by the javascript.
What I simply want to do is change the color of the line of one dataset:
//Based on the products for which we've to generate data, generate XML
strXML = (this.document.productSelector.PointsF.checked==true)?(strXML + getProductXML(0))  strXML)+ (" color='FF0000' ");
strXML = (this.document.productSelector.PointsA.checked==true)?(strXML + getProductXML(1))  strXML);
strXML = (this.document.productSelector.Rebounds.checked==true)?(strXML + getProductXML(2))  strXML);
strXML = (this.document.productSelector.Assists.checked==true)?(strXML + getProductXML(3))  strXML);
strXML = (this.document.productSelector.Steals.checked==true)?(strXML + getProductXML(4))  strXML);
//Close element;
strXML = strXML + "";
//Return data
return strXML;
}
/**
* getProductXML method returns the and elements XML for
* a particular product index (in data array).
* @param productIndex Product index (in data array)
* @return XML Data for the product.
*/
function getProductXML(productIndex){
var productXML;
//Create element
productXML = "";
//Create set elements
for (var i=1; i<=43; i++){
productXML = productXML + "";
}
//Close element
productXML = productXML + "";
//Return
return productXML;
}
As you can see, I tried do to it like this:
strXML = (this.document.productSelector.PointsF.checked==true)?(strXML + getProductXML(0)) strXML)+ (" color='FF0000' ");
In red you can see my try but that didnt work out, the html page is still valid but the colors are still random. Anyone that can teach me how to do it properly?
|
|
|
|
|
FusionCharts Team
      
Group: Administrators
Last Login: 7/29/2008 12:15:49 PM
Posts: 2,001,
Visits: 474
|
|
Can you please fwd me the XML output generated by your JS code - that'll be much easier for me to debug.
Thanks, Pallav Nadhani FusionCharts Team
|
|
|
|