Sign in to follow this  
joka

Different Datalabel Different Font Style 2

Recommended Posts

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

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

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