Loading:


Wykresy PHP Flash - Open Flash Chart
6. Wykres słupkowy Grafiti.

Zmieńmy nasz kod w chart.php na open_flash_chart_object( 500, 450, 'grafiti.php', true);

Listing 6.0 przedstawia kod grafiti.php dla wykresu słupkowego graffiti.



Dalsza czê¶æ: 1 2 3 4 5 6 7 8

Napisz Artyku³

Listing



//Listing 6.0 Wykres słupkowy graffiti grafiti.php

<?php

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

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

$bar = new bar_sketch( 55, 6, '#d070ac', '#000000' );
$bar->key( '2006', 10 );

for( $i=0; $i<10; $i++ )
  $bar->data[] = rand(2,9);


$g = new graph();
$g->title( 'Sketch', '{font-size:20px; color: #ffffff; margin:10px; background-color: #d070ac; padding: 5px 15px 5px 15px;}' );
$g->bg_colour = '#FDFDFD';


//
// add the bar object to the graph
//
$g->data_sets[] = $bar;

$g->x_axis_colour( '#e0e0e0', '#e0e0e0' );
$g->set_x_tick_size( 9 );
$g->y_axis_colour( '#e0e0e0', '#e0e0e0' );

$g->set_x_labels( array( 'January','February','March','April','May','June','July','August','September','October' ) );
$g->set_x_label_style( 11, '#303030', 2 );
$g->set_y_label_style( 11, '#303030', 2 );

$g->set_y_max( 10 );
$g->y_label_steps( 5 );
echo $g->render();
?>






Dodano przez: igor
Ranga: Administrator serwisu Punktów: 28716
Komentarze użytkowników
    • Tre¶æ komentarza
      Kod do komentarza (opcjonalnie)
      PHP JavaScript MySQL Smarty SQL HTML CSS ActionScript
      Autor
      Token
      token

       

       








funkcje.net
Wszelkie prawa zastrzeżone©. | Funkcje.net 2008-2024 v.1.5 | design: diviXdesign & rainbowcolors