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

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