Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | include '../php-ofc-library/open-flash-chart.php';
|
---|
4 |
|
---|
5 | $data_1 = array();
|
---|
6 |
|
---|
7 | for( $i=0; $i<6.2; $i+=0.2 )
|
---|
8 | {
|
---|
9 | $data_1[] = (sin($i) * 1.9) + 7;
|
---|
10 | }
|
---|
11 |
|
---|
12 | $title = new title( "Waves go wobble" );
|
---|
13 |
|
---|
14 | $line_1 = new line();
|
---|
15 | $line_1->set_values( $data_1 );
|
---|
16 | $line_1->set_width( 2 );
|
---|
17 |
|
---|
18 |
|
---|
19 | $y = new y_axis();
|
---|
20 | $y->set_range( 0, 10, 2 );
|
---|
21 |
|
---|
22 |
|
---|
23 | $chart = new open_flash_chart();
|
---|
24 | $chart->set_title( $title );
|
---|
25 | $chart->add_element( $line_1 );
|
---|
26 | $chart->set_y_axis( $y );
|
---|
27 |
|
---|
28 | echo $chart->toPrettyString();
|
---|
29 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.