I'm using HighChart to create graphics, but I'm not able to pass the value of data
through a php variable:
series: [{
name: 'Tendência',
data: <?php echo $encodeValorTendencia; ?>
},{
name: 'Obtenção',
data: <?php echo $encodeValorObtencao; ?>
}],
I'm already "encodando" the variables:
$valorTendencia[] = $value->Valor;
$encodeValorTendencia = json_encode($valorTendencia);
$valorObtencao[] = $value->ValorObtencao;
$encodeValorObtencao = json_encode($valorObtencao);
$dataHora[] = $value->DataHoraPrevisao;
$encodeDataHora = json_encode($dataHora);
The value of the variable $dataHora
works through this section:
xAxis: {
categories: <?php echo $encodeDataHora; ?>
},
In this way, the graph appears with the date and time but not the series values.