joka Report post Posted March 15, 2012 hi~ if u want to Different Datalabel Different Font Style , i have one idea. code: "styles": { "definition": [ { "name": "myHTMLFont", "type": "font", "ishtml": "1"} ], "application": [ { "toobject": "DATALABELS", "styles": "myHTMLFont" }, { "toobject": "TOOLTIP", "styles": "myHTMLFont" } ] }, then if i push data var data={}; var t=parseFloat(width)/fvObj.getItemCount(); data["x"]=t*i+t/2; data["y"]="220"; data["width"]="100"; data["height"]="70"; data["color"]="62D0FE"; data["name"]="<font color='red'>"+fvObj.getItemText("szName",i)+"</font>"; data["alpha"]="100"; data["tooltext"]=fvObj.getItemText("szName",i); data["id"]=fvObj.getItemText("GroupID",i); retObj.dataset[0].data.push(data); var ammeter={}; ammeter["x"]=t*i+t/2-30; ammeter["y"]="90"; ammeter["width"]="60"; ammeter["height"]="65"; ammeter["imagenode"]="1"; ammeter["imageurl"]="resources/swf/ammeter.jpg"; ammeter["labelalign"]= "BOTTOM"; ammeter["imagealign"]= "top"; ammeter["alpha"]= "1"; ammeter["imagewidth"]= "40"; ammeter["imageheight"]="40"; ammeter["color"]="FE9191"; ammeter["name"]="<font color='blue'>"+dayAEnergy.toFixed(0)+"度</font>"; ammeter["id"]=fvObj.getItemText("GroupID",i)+"a"; retObj.dataset[0].data.push(ammeter); but it useless :( :( Why? set isHtml='1' but html tag is useless Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted March 16, 2012 Hi, Thank you for the post. FusionCharts font style attribute "isHTML" is particularly useful, when you have HTML characters as a part of your text. Also "isHTML" will support a few HTML tags (not all) and you have to provide HTML code as text/predeclared entity in XML data of chart. For example: <set label='<b>Jan' value='420000' /> This will display "Jan" with font style bold. Hope this helps! hi~ if u want to Different Datalabel Different Font Style , i have one idea. code: "styles": { "definition": [ { "name": "myHTMLFont", "type": "font", "ishtml": "1"} ], "application": [ { "toobject": "DATALABELS", "styles": "myHTMLFont" }, { "toobject": "TOOLTIP", "styles": "myHTMLFont" } ] }, then if i push data var data={}; var t=parseFloat(width)/fvObj.getItemCount(); data["x"]=t*i+t/2; data["y"]="220"; data["width"]="100"; data["height"]="70"; data["color"]="62D0FE"; data["name"]="<font color='red'>"+fvObj.getItemText("szName",i)+"</font>"; data["alpha"]="100"; data["tooltext"]=fvObj.getItemText("szName",i); data["id"]=fvObj.getItemText("GroupID",i); retObj.dataset[0].data.push(data); var ammeter={}; ammeter["x"]=t*i+t/2-30; ammeter["y"]="90"; ammeter["width"]="60"; ammeter["height"]="65"; ammeter["imagenode"]="1"; ammeter["imageurl"]="resources/swf/ammeter.jpg"; ammeter["labelalign"]= "BOTTOM"; ammeter["imagealign"]= "top"; ammeter["alpha"]= "1"; ammeter["imagewidth"]= "40"; ammeter["imageheight"]="40"; ammeter["color"]="FE9191"; ammeter["name"]="<font color='blue'>"+dayAEnergy.toFixed(0)+"度</font>"; ammeter["id"]=fvObj.getItemText("GroupID",i)+"a"; retObj.dataset[0].data.push(ammeter); but it useless :( :( Why? set isHtml='1' but html tag is useless Share this post Link to post Share on other sites