source: code/Website/perl-ofc-library/test_pie.asp

Last change on this file was 7849, checked in by dennisw, 15 years ago
File size: 1.1 KB
Line 
1<%@ Language="PerlScript"%>
2<%
3
4# For this test you must have an iis webserver with the perlscript dll installed as a language.
5# Also you'll need the open-flash-chart.swf file and the open_flash_chart.pm files together with this one
6#
7
8use strict;
9our ($Server, $Request, $Response);
10use lib $Server->mappath('.');
11use open_flash_chart;
12
13
14my $g = chart->new();
15#$g->{'chart_props'}->{'tooltip'} = {'text'=>'#val#'};
16
17my $e = $g->get_element('pie');
18$e->set_radius(150);
19$e->set_values([ {'value'=>rand(255), 'label'=>'linux-ubuntu'}, {'value'=>rand(255), 'label'=>'windows'}, {'value'=>rand(255), 'label'=>'vax'}, {'value'=>rand(255), 'label'=>'NexT'}, {'value'=>rand(255), 'label'=>'solaris'}]);
20$e->set_tip('#val# #percent#');
21$g->add_element($e);
22
23%>
24<html>
25 <head>
26 <title>OFC Test Suite - PERL</title>
27 <link type="text/css" rel="stylesheet" media="all" href="style.css"/>
28 </head>
29 <body>
30 <!--#INCLUDE FILE = "list_all_tests.inc"-->
31 <h3>Pie Test</h3>
32<%
33 $Response->write($g->render_swf({'width'=>600, 'height'=>400}));
34 $Response->write('<p>Should be a pie with five slices.</p>');
35%>
36</body>
37</html>
Note: See TracBrowser for help on using the repository browser.