Tengo el arreglo ya hecho pero no se muestra graficado
Publicado por alex (5 intervenciones) el 12/08/2019 20:29:11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
$conex=mysqli_connect("localhost", "root", "","reportes") or die("Error en la conecxion a la base de datos").mysqli_error(); //se abre enlace a la BD
mysqli_select_db($conex, "reportes") or die("Ahora es la seleccion a la bd"); //se conecta a la BD agencia
//$uno=$_POST['y'];
$id="";
$uno=60;
$i=0;
$car="";
$registro=mysqli_query($conex, "SELECT * FROM view3 ") or die("Ahora es el query4").mysqli_error();
while ($conet = mysqli_fetch_array( $registro ))
{
echo "<td>" . $conet['Descripcion'] . " </td> "."<td>" . $conet['TOTAL'] . "</td>"."<br>";
}
//print_r($conet);
?>
<!--Empieza codigo HTML--->
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Highcharts Example</title>
<style type="text/css">
</style>
</head>
<body>
<script src="code/highcharts.js"></script>
<script src="code/modules/data.js"></script>
<script src="code/modules/drilldown.js"></script>
<!--librerias para exportar-->
<script src="code/modules/exporting.js"></script>
<script src="code/modules/export-data.js"></script>
<div class="hola" id="container" style="min-width: 1500px; max-width: 1000px; height: 800px; margin: 10px "></div>
<script type="text/javascript" language="javascript">
// Create the chart
Highcharts.chart('container', {
chart: {
type: 'pie'
},
title: {
text: 'Reportes de carros'
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
format: '{point.name}: {point.y:.1f}%'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}%</b> of total<br/>'
},
series: [
{
name: "hola",
colorByPoint: true,
data: [
<?php while ($row=mysql_fetch_array($registro)){
echo "['".$row["Descripcion"]."',".$row["TOTAL"]."],";
}
?>
]
}
],
});
</script>
</body>
</html>
Valora esta pregunta
0