que debo hacer para mostrar el grafico dentro del html?
Código php:
Ver original
<?php $anio = $_POST["ano"]; if ($anio == "-- Año --") { echo "<script>alert('Debes Seleccionar Un Año')</script>"; echo "<script>history.back()</script>"; } else { include ("funciones.php"); conectar(); $consulta = "Select * From total Where año='$anio' AND tipo='Capex'"; $i=0; { $Categorias[$i] = $registro["categorias"]; $Enero[$i] = $registro["enero"]; $Febrero[$i] = $registro["febrero"]; $Marzo[$i] = $registro["marzo"]; $Abril[$i] = $registro["abril"]; $Mayo[$i] = $registro["mayo"]; $Junio[$i] = $registro["junio"]; $Julio[$i] = $registro["julio"]; $Agosto[$i] = $registro["agosto"]; $Septiembre[$i] = $registro["septiembre"]; $Octubre[$i] = $registro["octubre"]; $Noviembre[$i] = $registro["noviembre"]; $Diciembre[$i] = $registro["diciembre"]; $i++; } include ("ChartDirector/lib/phpchartdir.php"); $colors = 0xFF9933; $valor = array ("$Enero[0]", "$Febrero[0]", "$Marzo[0]", "$Abril[0]", "$Mayo[0]", "$Junio[0]", "$Julio[0]", "$Agosto[0]", "$Septiembre[0]", "$Octubre[0]", "$Noviembre[0]", "$Diciembre[0]"); # Create a XYChart object of size 600 x 380 pixels. Set background color to brushed # silver, with a 2 pixel 3D border. Use rounded corners of 20 pixels radius. $c = new XYChart(640, 400, brushedSilverColor(), Transparent, 5); # Add a title to the chart using 18pts Times Bold Italic font. # Set top/bottom margins to 8 pixels. $textBoxObj = $c->addTitle("Capex Anual", "timesbi.ttf", 18); $textBoxObj->setMargin2(0, 0, 10, 10); # Set the plotarea at (70, 55) and of size 460 x 280 pixels. Use transparent border # and black grid lines. Use rounded frame with radius of 20 pixels. $c->setPlotArea(70, 55, 460, 280, -1, -1, Transparent, 0x000000); $c->setRoundedFrame(0xffffff, 20); # Add a multi-color bar chart layer using the supplied data. Set cylinder bar shape. $barLayerObj = $c->addBarLayer($valor, $colors); $barLayerObj->setBarShape(CircleShape); # Set the labels on the x axis. $c->xAxis->setLabels($dato); # Show the same scale on the left and right y-axes $c->syncYAxis(); # Set the left y-axis and right y-axis title using 10pt Arial Bold font $c->yAxis->setTitle("USD (millions)", "arialbd.ttf", 10); $c->yAxis2->setTitle("USD (millions)", "arialbd.ttf", 10); # Set y-axes to transparent $c->yAxis->setColors(Transparent); $c->yAxis2->setColors(Transparent); # Disable ticks on the x-axis by setting the tick color to transparent $c->xAxis->setTickColor(Transparent); # Set the label styles of all axes to 8pt Arial Bold font $c->xAxis->setLabelStyle("arialbd.ttf", 8); $c->yAxis->setLabelStyle("arialbd.ttf", 8); $c->yAxis2->setLabelStyle("arialbd.ttf", 8); # Output the chart echo($c->makeChart2(JPG)); } ?> <html> <head><title>Grafico</title> <link rel="stylesheet" type="text/css" href="hojaestilo.css"> </head> <body> <a href="capexAnual.php" class="letras1">Volver</a> </body> </html>
edit____
cambie el titulo, ahora el problema es que no muestra la imagen del grafico
edit____
nuevamanente cambie el titulo, ahora el problema es que no puedo pasar los parametros