Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/07/2009, 04:33
Ferdinandum
 
Fecha de Ingreso: noviembre-2008
Mensajes: 62
Antigüedad: 15 años, 5 meses
Puntos: 1
Open Flash Chart

Pasos que hay que hacer para que funcione el Open Flash Chart

1º . Descargar el Open Flash Chart version 1.9.7

2º. Copiarte en el Raid
Código:
El archivo open-flash-chart.swf 
Carpeta php-ofc-library 
3º. Renombrar la carpeta php-ofc-library a ofc-library


3º. Crear chart.php

Código:
<html>
<head>
</head>
<body>
<?php
include_once 'ofc-library/open_flash_chart_object.php';
open_flash_chart_object(800,600,'c_3d.php',false);
?>
</body>
</html>


5º. Crear c_3d.php
Código:
<?php

include_once( 'ofc-library/open-flash-chart.php' );

// generate some random data
srand((double)microtime()*1000000);


$bar_1 = new bar_glass( 55, '#D54C78', '#C31812' );
$bar_1->key( '2006', 10 );

// add 10 bars with random heights
for( $i=0; $i<10; $i++ )
$bar_1->data[] = rand(2,5);


//
// create a 2nd set of bars:
//
$bar_2 = new bar_glass( 55, '#5E83BF', '#424581' );
$bar_2->key( '2007', 10 );

// make 10 bars of random heights
for( $i=0; $i<10; $i++ )
$bar_2->data[] = rand(-5,9);


//
// create the chart:
//
$g = new graph();
$g->title( 'hola ferdinandum', '{font-size:20px; color: #bcd6ff; margin:10px; background-color: #5E83BF; padding: 5px 15px 5px 15px;}' );

// add both sets of bars:
$g->data_sets[] = $bar_1;
$g->data_sets[] = $bar_2;

// label the X axis (10 labels for 10 bars):
//$g->set_x_labels( array( 'January','February','March','April','May','June', 'July','August','September','October' ) );
$g->set_x_labels( array( 'Enero','Febrero','Marzo','Abril','Mayo','Junio',' Julio','Agosto','Setiembre','Octubre' ) );
// colour the chart to make it pretty:
$g->x_axis_colour( '#909090', '#D2D2FB' );
$g->y_axis_colour( '#909090', '#D2D2FB' );

$g->set_y_min( -5 );
$g->set_y_max( 10 );
$g->y_label_steps( 6 );
$g->set_y_legend( 'Open Flash Chart', 12, '#736AFF' );
echo $g->render();
?>

Última edición por Ferdinandum; 06/07/2009 a las 01:32