-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhorizontal-graph-tester.raku
executable file
·55 lines (42 loc) · 1.64 KB
/
horizontal-graph-tester.raku
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env raku
use lib 'lib';
use Terminal::Graphing::BarChart::Horizontal;
say "X and Y axis\n";
my $x_and_y_axis_graph = Terminal::Graphing::BarChart::Horizontal.new(
data => [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
bar_length => 10,
x_axis_labels => <a b c d e f g h i j>,
y_axis_labels => <0 1 2 3 4 5 6 7 8 9 10>
);
$x_and_y_axis_graph.print();
say "\n\nwide bars, X and Y axis\n";
my $wide_x_and_y_axis_graph = Terminal::Graphing::BarChart::Horizontal.new(
data => [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
bar_length => 20,
x_axis_labels => <a b c d e f g h i j>,
y_axis_labels => <alpha bravo charlie delta echo foxtrot golf hotel india juliet kilo>
);
$wide_x_and_y_axis_graph.print();
say "\n\nJust Y axis\n";
my $y_axis_graph = Terminal::Graphing::BarChart::Horizontal.new(
data => [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
bar_length => 10,
y_axis_labels => <0 1 2 3 4 5 6 7 8 9 10 11>,
);
$y_axis_graph.print();
say "\n\nWide Y axis labels\n";
$x_and_y_axis_graph = Terminal::Graphing::BarChart::Horizontal.new(
data => [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
bar_length => 10,
x_axis_labels => <a b c d e f g h i j >,
y_axis_labels => <alpha bravo charlie delta echo foxtrot golf hotel india juliet kilo>,
);
$x_and_y_axis_graph.print();
say "\n\ntoo few Y axis labels\n";
$x_and_y_axis_graph = Terminal::Graphing::BarChart::Horizontal.new(
data => [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
bar_length => 10,
x_axis_labels => <a b c d e f g h i j>,
y_axis_labels => <alpha bravo charlie delta echo foxtrot golf hotel >,
);
$x_and_y_axis_graph.print();