This example looks complicated, but is quite easy really! The three URLs above
pass different values of 'o' on the URL, this is then put into the URL
that Open Flash Chart will read the data file from. gallery-data-18.php then
checks 'o' to see if we clicked on 'vertical' or '45 degrees'.
Please note how the chart resizes its self so the text always stays visible. That
was tricky to get right.
Note there is a known bug in Open Flash Chart, unicode characters will not display if
the text is rotated. I think this is a bug in flash.
// // we pass the URL variable 'o' to Open Flash Chart // which will then load data from "gallery-data-18.php?o=1" // if( isset( $_GET['o'] ) ) $url .= '?o='. $_GET['o'];
open_flash_chart_object( 500, 300, $url ); ?>
gallery-data-18.php
<?php
// generate some random data srand((double)microtime()*1000000);
$g->set_x_labels( array( '中文簡介','February','March','April','May,æ ø å Æ Ø Å','June','July','August','September' ) );
// // the orientation is passed in on the URL as 'o', // if it is not present we default to 0 (horizontal) // else we pass the value to set_x_label_style // $o = isset($_GET['o'])?intval($_GET['o']):0; $g->set_x_label_style( 13, '#9933CC', $o );