Sign in to follow this  
Rahul Kumar

How to specify tooltip

Recommended Posts

Hi, i am using php class for generating charts and i came across this method specified in document.

 

 

 

chart is working fine but the category value that i m specifying is very long text so what i have decided is to just display some portion of it and whole thing in tooltext but with this method how i can specify that?

 

 

 

$FC->addChartDataFromArray($arrData, $arrCatNames);

 

 

 

Column 1 will store : Dataset Series Name.

 

Column 2 will store : Dataset attributes

 

(as list separated by delimiter.)

 

Column 3 and rest will store : values of the dataset

 

 

 

so please let me know where is the option to specify attribute for each row? like color,tooltext etc?

 

 

 

 

 

 

 

Thanks & Regards,

 

Heena

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

 
It is not supported if you are working with array data or database.
 
However I have modified the Class file as per your need. Please see the attachment.
 
Usages:
 
 //Store Name of Products
 $arrCatNames[0] = "Product A";
 $arrCatNames[1] = "Product B";
 $arrCatNames[2] = "Product C";
 $arrCatNames[3] = "Product D";
 $arrCatNames[4] = "Product E";
 $arrCatNames[5] = "Product F";
 //Store sales data for current year
 $arrData[0][0] = "Current Year";
 $arrData[0][1] = ""; // Dataset Parameters
 $arrData[0][2] = "567500;tooltext=this is a tooltext_1";
 $arrData[0][3] = ""; // With null data
 $arrData[0][4] = 556800;
 $arrData[0][5] = 734500;
 $arrData[0][6] = 676800;
 $arrData[0][7] = 648500;
 //Store sales data for previous year
 $arrData[1][0] = "Previous Year";
 $arrData[1][1] = ""; // Dataset Parameter
 $arrData[1][2] = 547300;
 $arrData[1][3] = ";tooltext=this is a tooltext_2"; // Some <set> element parameter with null data values.
 $arrData[1][4] = 754000;
 $arrData[1][5] = 456300;
 $arrData[1][6] = 754500;
 $arrData[1][7] = 437600;

 

FusionCharts_Gen.zip

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