Tutorials - UTF8

Take care that you are sending the chart data as UTF8 encoded so all your UTF8 characters get rendered correctly. I used ActiveState Komodo editor to make the .php file (gallery/utf8.php), I saved it as utf8 and uploaded it to my web server.

Please remember that the X axis labels can only display UTF8 characters when it is NOT rotated. When rotated flash can not display UTF8 (so this includes all other text in the chart that you can rotate)

If you are having problems then you can send the UTF8 character code, for example, the Euro character is € (€), the UK pound is £ (£), you can find a big list of these numbers in the wikipedia List of XML and HTML character entity references, or just google for "unicode HTML Entity".

This goes into the <head> of the page:

<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
"open-flash-chart.swf", "my_chart", "550", "200",
"9.0.0", "expressInstall.swf",
{"data-file":"gallery/utf8.php"} );
This writes the chart into a div with id="my_chart", right click and view source to see it in action, [the tutorials have more details]


include '../php-ofc-library/open-flash-chart.php';

$data = array();

$i=0$i<6.2$i+=0.2 )
$data[] = (sin($i) * 1.9) + 4;

$title = new title"吴语 -- 粵語 -- Slovenščina -- Беларуская -- &#x20AC; -- &#xA3;" );

$d = new hollow_dot();

$line = new line();
$line->set_values$data );

$y = new y_axis();

$chart = new open_flash_chart();
$chart->set_title$title );
$chart->add_element$line );
$chart->set_y_axis$y );

To see the data produced : gallery/utf8.php, then 'view source'.
Support This Project

Open Flash Chart logo by numb.me.uk. | Syntax highlights are by GeSHi