source: code/Website/perl-ofc-library/test_area.asp@ 7849

Last change on this file since 7849 was 7849, checked in by dennisw, 15 years ago
File size: 1.3 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
13my $g = chart->new();
14my $y_axis = $g->get_axis('y_axis');
15
16$g->{'chart_props'}->{'tooltip'} = {'text'=>'Hollow Tip #val#<br>I See...'};
17
18
19my $e = $g->get_element('area');
20my $data = [];
21for( my $i=0; $i<5; $i++ ) {
22 push ( @$data, rand(20) );
23}
24$e->set_values($data, 0);
25$y_axis->add_element($e);
26
27my $f = $g->get_element('area');
28$data = [];
29for( my $i=0; $i<5; $i++ ) {
30 push ( @$data, rand(40) );
31}
32$f->set_values($data, 0);
33$f->set_dot_style({'type'=>'hollow-dot', 'colour'=>'#a44a80', 'dot-size'=>3, 'tip'=>'#val#<br>#x_label#'});
34
35$y_axis->add_element($f);
36
37%>
38<html>
39 <head>
40 <title>OFC Test Suite - PERL</title>
41 <link type="text/css" rel="stylesheet" media="all" href="style.css"/>
42 </head>
43 <body>
44 <!--#INCLUDE FILE = "list_all_tests.inc"-->
45 <h3>Area Hollow Test</h3>
46<%
47 $Response->write($g->render_swf({'width'=>600, 'height'=>400}));
48 $Response->write('<p>Should plot 1 plain line with area shaded and one line-dot with area shaded.</p>');
49%>
50</body>
51</html>
Note: See TracBrowser for help on using the repository browser.