jvegaseg

Error Displaying Labels When The Content Has A '=' Character

Recommended Posts

I have just upgraded FusionChart to version 3.2 and it has a bug when display labes whitch contain an equial sign in the label.

 

Example: label "m=3.2" is shown as "m%3d3.2".

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

 

Could you please let us know the name of the swf file that yopu are using?

 

Awaiting your reply.

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

 

Could you please send us the sample code that you are using so that we might test it in our lab?

 

Awaiting your reply.

Share this post


Link to post
Share on other sites

<FONT size=2>

 

This is the class for the graphic (some parts of the code has been removed in order to simplicity):

 

class Model_InformeEventosAgentesDiaria { 

# CLASS VARS .... 

function __construct($ref = null,$d = null, $m = null, $a = null) { 

# Codigo de inicialización .... 


# Creamos el Grafico 
$this->FC = new Model_Charts("MSStackedColumn2DLineDY",Model_Informes::GRAFICO_ANCHO,Model_Informes::GRAFICO_ALTO); 



# Atributos del Gráfico 

$strParam="showSum=1;showValues=0;divLineIsDashed=1;palette=2;caption=Estadisticas de Agentes Diaria de la Empresa $ref del mes $nombredelmes de $ano;xAxisName=Extensiones Telefónicas/Agentes;PYaxisname=Numero de Llamadas; SYaxisname=Duración Media (min);PYAxisMinValue=0;xAxisMinValue=1;"; 

# Asignamos atributos 
$this->FC->setChartParams($strParam); 


#añadimos categorias 
$usuarios = new Model_Dialerusuarios(); 
$result = $usuarios->queryExtensiones($this->_ref); 
$arrayextensiones = array(); 
$arrayresultados = array(); 
while(($row = $result->fetch()) != false) { 
$ext = $row['EXTENSION']; 
$this->FC->addCategory("$ext","x=$ext;showVerticalLine=1"); 
$arrayextensiones[] = "$ext"; 
$arrayresultados["$ext"] = 0; 
} 

$extensiones = implode(',',$arrayextensiones); 

$sql = new Model_Sql(Model_Tools::BILLING_DATABASE()); 

# Añadimos Valores y DataSets CONTESTADAS 
$this->FC->createMSStDataset(); 
$this->FC->addMSStSubDataset("Contestadas","color=336600;"); 
$consulta = "SELECT CE_EXTENSION AS C1, count(*) AS C2 
FROM EVENTS 
WHERE CE_EXTENSION IN ($extensiones) AND 
CE_EMPRESA = '$ref' AND 
EVENT = 'DIALOUT' AND 
MONTH(FECHA)= $mes AND 
YEAR(FECHA)= $ano AND 
DAY(FECHA)= $dia AND 
REQUESTID = 'VOZINTEL' AND 
HANGUP = 'ANSWER' 
GROUP BY C1 
ORDER BY C1 ASC"; 


$result = $sql->query($consulta); 
while (($row = $result->fetch()) != false) { 
$arrayresultados[$row["C1"]] = $row["C2"]; 
} 
foreach($arrayresultados as $index => $value) { 
$this->FC->addChartData("$value","label=$index;"); 
$arrayresultados[$index] = 0; // Para la próxima consulta 
} 


# Other DATASETS .... 


# Add Multi-series lineset for showing lines 
$this->FC->addMSLineset("Duración Entrantes","lineThickness=3; color=000033; "); 
$consulta = "SELECT SUBSTR(CALLEDNUMBER,6) AS C1, AVG(DURACION) AS C2 
FROM EVENTS 
WHERE SUBSTR(CALLEDNUMBER,6) IN ($extensiones) AND 
CE_EMPRESA = '$ref' AND 
MONTH(FECHA)= $mes AND 
YEAR(FECHA)= $ano AND 
DAY(FECHA)= $dia AND 
REQUESTID = 'VOZINTEL' AND 
EVENT = 'DIALIN' AND 
HANGUP = 'ANSWER' 
GROUP BY C1 
ORDER BY C1 ASC"; 

$result = NULL; 

$result = $sql->query($consulta); 
while (($row = $result->fetch()) != false) { 
$index = $row["C1"]; 
$arrayresultados[$index] = $row["C2"]/60; 
} 
foreach($arrayresultados as $index => $value) { 
$this->FC->addMSLinesetData("$value","label=$index; hoverText=Duración media Llamadas Entrantes EXT $index = ".round($value,2)." minutos"); 
$arrayresultados[$index] = 0; // Para la próxima consulta 
} 



// Media Mensual 
$consulta = "SELECT AVG(DURACION) AS C1 
FROM EVENTS 
WHERE (CE_EXTENSION IN ($extensiones) OR SUBSTR(CALLEDNUMBER,6) IN ($extensiones)) AND 
CE_EMPRESA = '$ref' AND 
(EVENT = 'DIALOUT' OR EVENT = 'DIALIN') AND 
MONTH(FECHA)= $mes AND 
YEAR(FECHA)= $ano AND 
DAY(FECHA)= $dia AND 
REQUESTID = 'VOZINTEL' AND 
HANGUP = 'ANSWER'" ; 

$result = NULL; 
$valor = $sql->calcula($consulta); 
$media = round($valor/60,2); 
$minutos = floor($media); 
$segundos= $valor % 60; 
if($segundos<10) 
$segundos_txt = "0".$segundos; 
else 
$segundos_txt = $segundos; 

$this->FC->addTrendLine("parentYAxis=S;startValue=$media;endValue=$media;color=FF6600;displayvalue= m=$minutos:$segundos_txt; thickness=3;alpha=100;isTrendZone=0;showOnTop=0;valueOnRight=1"); 




} 

function render() { 
# Dibujamos el gráfico 
$this->FC->renderChart(); 
} 


}

 

 

And this is de Model_Charts used in previous class:

 




			
				


	Edited  by jvegaseg
	
	

			
		

Share this post


Link to post
Share on other sites

The same problem occurs when you use the character ' (single quote).

 

For example, if you put "caption=SMS's Enviados de la Empresa" in Chart Params, what you see in the graph is: "SMS%26apos;s Enviados de la Empresa"

 

 

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