Sign in to follow this  
deeptic

Anchor tag in Drilldown chart

Recommended Posts

Hi,

I am creating a chart that has a drilldown. Currently the drilldown chart appears in a different page than the original chart. I want both the original and drilldown charts to appear in the same page. So can an 'anchor tag' be used so that a JavaScript fuction can be written to achieve the same.

Currently the code looks like this:

$strXML

.="<set label='" . $ors['Htn_Time_Month_Name'] . "' value='" . $ors2['VAL'] . "' link='" . urlencode("Detailed_Req.php?Htn_Intelligence_Ref_Id=" . $ors['Htn_Intelligence_Ref_Id']."&VendorId=".$VendorId."&month=".$ors2['Htn_Time_Id'] ) . "'/>";

Please guide me as to how to use the anchor tag.

Share this post


Link to post
Share on other sites

Hi Deepti,

 

 

 

We have attached a sample which show you how to achieve the same using Anchor tag. The attached sample is just a plain HTML file with the XML that you needed. You would just need to modify your XML accordingly by referring the sample XML.

Anchor_Sample.zip

Share this post


Link to post
Share on other sites

Hi Rahul,

We have gone through your files. However, I wanted to know how the 'anchor tag' can be used in a drilldown. Drilldown is the part where we are having the most problem.

Please provide guidance on the same.

Share this post


Link to post
Share on other sites

Hi Deepti,

 

 

 

You could use anchor tag to call any JavaScript function and in that JavaScript function you can update another chart Or write your code to do what you need.

 

 

 

In the previous sample I am calling a JavaScript function with a single parameter using Anchor tag, you could see the XML (xdata.xml) and HTML (Anchor_Test.html) code to know how it works.

 

 

 

Also please let us know what exactly do you want to do with the Drilldown?

Share this post


Link to post
Share on other sites

Hi Rahul,

 

 

 

One question regarding the sample chart you sent. When I take the cursor on the X-axis labels, then the hyperlink icon appears. However, in my chart, the hyperlink icon appears when the cursor is placed on any of the bars. Is this a matter of concern? Do I need to change anything in my code?

 

 

 

Also the website we are developing doesn't have any page refresh i.e clicking on the 1st chart shouldn't open the 2nd chart in a new page. Similarly, when we click on 'Back' in the 2nd chart, it should go to the 1st chart in the same page. Please note that, by page I mean a 'modal window'.

 

 

 

Let me know if you require further information.

Share this post


Link to post
Share on other sites

Hi Deepti,

 

 

 

We are glad to say that with FusionCharts you could do the things that you mentioned.

 

 

 

Also, for the issue i.e. "in my chart, the hyperlink icon appears when the cursor is placed on any of the bars.": we need to check your XML for that. So could you please attach a sample XML with you post?

Share this post


Link to post
Share on other sites

Hi Rahul,

I am coding in PHP and these are the files I am currently using:

Folders Required  Sub-folders Required Files Required
Charts - Column2D.swf
- Column3D.swf
Code Code/PHP/DBExample Default.php
Detailed.php
Code/PHP/Includes All Files
Code/FusionCharts FusionCharts.js
FusionChartsExportComponent.js
Column2D.swf
Column3D.swf
JSClass - All Files

* The Default.php and Detailed.php are the files I am using for reference. Only the tablename, query and variables are named differently in my code.

Also, can you please tell me how to open a drilldown down in the same modal window. This is my main problem.

Share this post


Link to post
Share on other sites
Guest Rajroop

Could you please provide your XML for this?

 

 

 

Looking forward to your mail. :(

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello Deepti,

 

 

 

That is fine.

 

 

 

But do revert in case of further queries.

 

 

 

Until then, Happy FusionCharting. :(

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