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 |
|
---|
8 | use strict;
|
---|
9 | our ($Server, $Request, $Response);
|
---|
10 | use lib $Server->mappath('.');
|
---|
11 | use open_flash_chart;
|
---|
12 |
|
---|
13 |
|
---|
14 | my $g = chart->new();
|
---|
15 | #$g->{'chart_props'}->{'tooltip'} = {'text'=>'#val#'};
|
---|
16 |
|
---|
17 | my $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.