Sign in to follow this  
jbrack321

Setting Multiple Links

Recommended Posts

Hello,

 

 

Is it possible to set a different link dependent upon the value range?

 

Something like an if statement:

 


$strXML .= "<color minValue='10' maxValue='90' displayValue='Cable Intrusion' color='D64646' />";
$strXML .= "<color minValue='90001' maxValue='900000' displayValue='Multiple Events' color='FFFF33' />";
$strXML .= "<color minValue='10000' maxValue='90000' displayValue='Fiber Events' color='8BBA00' />";


if ($result) {
   # Iterate through each record
 while($rs1= mysql_fetch_array($result)) {

  $strQuery ="select * from fcmap_master where Internal_Id='" . $rs1['state'] . "'";  

  $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "' link='' www.link#1.com />";
 }

 

 

Thanks,

 

JB

Edited by jbrack321

Share this post


Link to post
Share on other sites

Hi,

 

FusionCharts does not support color range feature. Hence, I am afraid, this is natively not possible with FusionCharts, as of now. :D

 

As a work-around, you can try mentioning the required links explicitly for the values mentioned.

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Hello,

 

I should have clarified...I am new to Fusioncharts & Maps. I am actually using FusionMaps software but am unable to access the FusionMaps forum. I've created a trouble ticket and am waiting on a solution by FusionChart support.

 

In the mean time, I thought I would see If I could find an answer to my problem in this forum.

 

I was able to find an answer (see below)

 


 if ($rs1['datap']>='10000'){  
       if ($rs1['datap']<='90000'){ 
  $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='../tracking/trackerlist.php' Target='_blank' />";
 }
}
  if ($rs1['datap']>='1000'){  
      if ($rs1['datap']<='9000'){ 
  $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='../tracking/precautionlist.php' Target='_blank' />";
 }
}
  if ($rs1['datap']>='10'){  
     if ($rs1['datap']<='900'){  
  $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='../tracking/cable_intrusionlist.php' Target='_blank' />";
 }
}
  if ($rs1['datap']>='100000'){ 
     if ($rs1['datap']<='900000'){  
  $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='../tracking/cable_intrusionlist.php' Target='_blank' />";
 }
}

 

Everything works as I'd hoped with the exception of the link opening in a new window. I thought target='_blank' would do the trick. However, it doesn't work.

 

Any advice would be a great help.

 

Thanks,

 

JB

Edited by jbrack321

Share this post


Link to post
Share on other sites

Hello,

 

 

I found what I was looking for. I overlooked it in FusionChart help files. By placing n- in front of the link, it will open in a new window.

 


 if ($rs1['datap']>='10000'){  
       if ($rs1['datap']<='90000'){ 
  $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='n-http:....../tracking/trackerlist.php'  />";
 }
}
  if ($rs1['datap']>='1000'){  
      if ($rs1['datap']<='9000'){ 
  $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='n-http:....../tracking/precautionlist.php'  />";
 }
}
  if ($rs1['datap']>='10'){  
     if ($rs1['datap']<='900'){  
  $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='n-http:....../tracking/cable_intrusionlist.php'  />";
 }
}
  if ($rs1['datap']>='100000'){ 
     if ($rs1['datap']<='900000'){  
  $strXML .= "<entity id='" . $rs1['state'] . "' value='" . $rs1['datap'] . "'link='n-http:....../tracking/cable_intrusionlist.php'  />";
 }
}

 

 

 

JB

Edited by jbrack321

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

We are glad to know that your problem has been resolved.

 

Keep FusionCharting!biggrin.gif

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