| 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 | my $g = chart->new();
|
|---|
| 14 | my $y_axis = $g->get_axis('y_axis');
|
|---|
| 15 |
|
|---|
| 16 | $g->{'chart_props'}->{'tooltip'} = {'text'=>'Hollow Tip #val#<br>I See...'};
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 | my $e = $g->get_element('area');
|
|---|
| 20 | my $data = [];
|
|---|
| 21 | for( 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 |
|
|---|
| 27 | my $f = $g->get_element('area');
|
|---|
| 28 | $data = [];
|
|---|
| 29 | for( 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> |
|---|