Good morning, when I show this gauge Chart and I pass a value of a php variable through javascript, it does not graph it, the strange thing is that if it prints it on the screen with an echo, that is, the value of the php variable is stored in the javascript variable that I am creating but it does not graph it and if I put a direct value in the js variable it does graph it, could you help me?
//this is the value to pass for idEmp (variable of
javascript el cual si imprime pero no grafica)
<?php
$idEmpleado= 99;
?>
<!DOCTYPE html>
<html lang="es">
<!--variable de php a javascript-->
<script type="text/javascript">
var idEmp = "<?php echo $idEmpleado; ?>";
document.write("idEmpleado = " + idEmp);
</script>
var hand = chart.hands.push(new am4charts.ClockHand());
chart.setTimeout(valPregGraf, 2000);
> //aquí se pasan los datos a la gráfica en la variable de java idEmp es el dato que necesito herede del echo de php.
function valPregGraf() {
hand.showValue(idEmp, 1000, am4core.ease.cubicOut);
chart.setTimeout(valPregGraf, 2000);
}
});
I share the link of the complete code for you to check, thank you.
https://drive.google.com/open?id=1zvB8g0ni-csYKn9p0VeBfBsFxJ3yjdIm