aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <mohammad.anwar@yahoo.com>2020-01-05 23:54:52 +0000
committerMohammad S Anwar <mohammad.anwar@yahoo.com>2020-01-05 23:54:52 +0000
commitf8f71f733a6dfc1b564b101eb6bd74ebd71ec8f8 (patch)
tree5fcc6532c7a24bf9f436ff583c479e2bcdc25f6a
parentca8bb6ed0261838bbc9440bdd3a97bf5576a23c7 (diff)
downloadperlweeklychallenge-club-f8f71f733a6dfc1b564b101eb6bd74ebd71ec8f8.tar.gz
perlweeklychallenge-club-f8f71f733a6dfc1b564b101eb6bd74ebd71ec8f8.tar.bz2
perlweeklychallenge-club-f8f71f733a6dfc1b564b101eb6bd74ebd71ec8f8.zip
- Added solutions by Colin Crain.
-rw-r--r--challenge-041/colin-crain/perl5/ch-1.pl101
-rw-r--r--challenge-041/colin-crain/perl5/ch-2.pl58
-rw-r--r--challenge-041/colin-crain/perl6/ch-1.p690
-rw-r--r--challenge-041/colin-crain/perl6/ch-2.p664
-rw-r--r--stats/pwc-current.json231
-rw-r--r--stats/pwc-language-breakdown-summary.json86
-rw-r--r--stats/pwc-language-breakdown.json304
-rw-r--r--stats/pwc-leaders.json376
-rw-r--r--stats/pwc-summary-1-30.json108
-rw-r--r--stats/pwc-summary-121-150.json72
-rw-r--r--stats/pwc-summary-31-60.json30
-rw-r--r--stats/pwc-summary-61-90.json46
-rw-r--r--stats/pwc-summary-91-120.json38
-rw-r--r--stats/pwc-summary.json48
14 files changed, 992 insertions, 660 deletions
diff --git a/challenge-041/colin-crain/perl5/ch-1.pl b/challenge-041/colin-crain/perl5/ch-1.pl
new file mode 100644
index 0000000000..f0589e0335
--- /dev/null
+++ b/challenge-041/colin-crain/perl5/ch-1.pl
@@ -0,0 +1,101 @@
+#! /opt/local/bin/perl
+#
+# attractors.pl
+#
+# PWC 41
+# TASK #1
+# Write a script to display attractive number between 1 and 50. A
+# number is an attractive number if the number of its prime factors is
+# also prime number.
+#
+# The number 20 is an attractive number, whose prime factors are 2, 2
+# and 5. The total prime factors is 3 which is also a prime number.
+#
+# method: first sexy primes, now attractive numbers. So many numbers,
+# so many looks. I am a little concerned that all this objectifying
+# might give certain less-confident numbers quantity quality issues.
+# Let's not forget the truism that "all numbers are interesting"; whether
+# amicable, betrothed, deficiant or slightly defective they are all
+# Pythagoras' children and all deserve love. .
+#
+# So anyways, we will pull out our prime decomposition engine from PWC23,
+# which we also saw in challenges 29 and 34.
+#
+# Unable to leave well enough alone, we've tuned and tightened it,
+# replacing the origianal prime generating subfunction with a list of
+# all primes less or equal to the upper bound, which have been made a
+# user defined variable with a default of 50.
+#
+# We need to know the prime decomposition, but only briefly enough to
+# sum it and compare this to our prime list. As we have the prime list
+# already present in the function we could do the comparison then and
+# there, return true or false, grep the list of calling it from 1 to
+# 50 and call it a day. But merely presenting the numbers without
+# demonstrating their attractiveness seemed a bit off the mark, like
+# talking about a fashion show on the radio instead of going to a
+# fashion show to see the runway. So a table is produced of all the
+# numbers, their decompositions, and finally judgement on their
+# attractiveness. It appears the group of numbers between 1 and 50,
+# taken as a whole are a pretty good-looking bunch.
+#
+
+#
+#
+#
+
+# 2020 colin crain
+## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
+
+
+
+use warnings;
+use strict;
+use feature ":5.26";
+
+## ## ## ## ## MAIN
+
+my $max = shift @ARGV // 50;
+
+my @primes = make_prime_list($max);
+my %primehash = map { $_ => 1 } @primes;
+
+for (2..$max) {
+ my @decomp = decompose($_, \@primes);
+ printf "%-4d--> %-20s %s\n", $_, (join ', ', @decomp),
+ (exists $primehash{(scalar @decomp)}) ? "$_ is attractive" : "" ;
+}
+
+## ## ## ## ## SUBS
+
+sub make_prime_list {
+## creates a list of all primes less than or equal to a given number
+ my $max = shift;
+ my @output = (2);
+ CANDIDATE: for( my $candidate = 3; $candidate <= $max; $candidate += 2 ) {
+ my $sqrt_candidate = sqrt( $candidate );
+ for( my $test = 3; $test <= $sqrt_candidate; $test += 2 ) {
+ next CANDIDATE if $candidate % $test == 0;
+ }
+ push @output, $candidate;
+ }
+ return @output;
+}
+
+sub decompose {
+## given a number and a list of primes less than n/2,
+## returns an array list of prime decomposition factors of the number
+ my ($num, $primes) = @_;
+ my @decomp;
+ my @primelist = $primes->@*;
+ my $prime = shift @primelist;
+
+ while ( $prime <= $num ) {
+ while ($num % $prime == 0) {
+ $num = $num / $prime;
+ push @decomp, $prime;
+ }
+ last if scalar @primelist == 0;
+ $prime = shift @primelist;
+ }
+ return @decomp;
+}
diff --git a/challenge-041/colin-crain/perl5/ch-2.pl b/challenge-041/colin-crain/perl5/ch-2.pl
new file mode 100644
index 0000000000..9fa8b9ebe9
--- /dev/null
+++ b/challenge-041/colin-crain/perl5/ch-2.pl
@@ -0,0 +1,58 @@
+#! /opt/local/bin/perl
+#
+# leonardo_numbers.pl
+#
+# PWC41
+# TASK #2
+# Write a script to display first 20 Leonardo Numbers. Please checkout wiki page for more information.
+# For example:
+#
+# L(0) = 1
+# L(1) = 1
+# L(2) = L(0) + L(1) + 1 = 3
+# L(3) = L(1) + L(2) + 1 = 5
+# and so on.
+#
+# method: because we have the growing series directly available to
+# refer to no recursion is required. I have made the function
+# return a list for any quantity > 0, displayed with a nice little
+# header.
+#
+# As-is can handle up to L(90)
+# L(90) = 5,760,134,388,741,632,239
+#
+# 2020 colin crain
+## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
+
+
+
+use warnings;
+use strict;
+use feature ":5.26";
+
+## ## ## ## ## MAIN
+
+my $quan = shift @ARGV // 20;
+
+say "the first $quan Leonardo numbers:";
+say "";
+say "index | number";
+say "-------+--------";
+
+my $i;
+printf "%-2d %d\n", ++$i, $_ for make_leonardo($quan)->@*;
+
+
+## ## ## ## ## SUBS
+
+sub make_leonardo {
+## construct a list of the first n Leonardo numbers
+## requires no recursion if we have the growing list to refer to
+ my $quan = shift;
+ my $list = [1];
+ push $list->@*, 1 if $quan > 1; ## now [1,1]
+ while ( scalar $list->@* <= $quan-1 ) {
+ push $list->@*, $list->[-1] + $list->[-2] + 1; ## sum last two elements + 1
+ }
+ return $list;
+}
diff --git a/challenge-041/colin-crain/perl6/ch-1.p6 b/challenge-041/colin-crain/perl6/ch-1.p6
new file mode 100644
index 0000000000..8c94ac8865
--- /dev/null
+++ b/challenge-041/colin-crain/perl6/ch-1.p6
@@ -0,0 +1,90 @@
+use v6;
+
+# PWC 41
+# TASK #1
+# Write a script to display attractive number between 1 and 50. A
+# number is an attractive number if the number of its prime factors is
+# also prime number.
+#
+# The number 20 is an attractive number, whose prime factors are 2, 2
+# and 5. The total prime factors is 3 which is also a prime number.
+#
+# notice: first sexy primes, now attractive numbers. So many numbers,
+# so many looks. I am a little concerned that all this objectifying
+# might give certain less-confident numbers quantity quality issues.
+# Let's not forget the truism that "all numbers are interesting"; whether
+# amicable, betrothed, deficiant or slightly defective they are all
+# Pythagorus' children and deserve love.
+#
+# So anyways, we will pull out our prime decomposition engine from PWC23,
+# which we also saw in challenges 29 and 34.
+#
+# Unable to leave well enough alone, we've tuned and tightened it,
+# replacing the origianal prime generating subfunction with a list of
+# all primes less or equal to the upper bound, which have been made a
+# user defined variable with a default of 50, and a lower bound of 2,
+# the smallest prime number.
+#
+# We need to know the prime decomposition, but only briefly enough to
+# sum it and compare this to our prime list. As we have the prime list
+# already present in the function we could do the comparison then and
+# there, return true or false, grep the list of calling it from 1 to
+# 50 and call it a day. But merely presenting the numbers without
+# demonstrating their attractiveness seemed a bit off the mark, like
+# talking about a fashion show on the radio instead of going to a
+# fashion show to see the runway. So a table is produced of all the
+# numbers, their decompositions, and finally judgement on their
+# attractiveness. It appears the group of numbers between 1 and 50,
+# taken as a whole are a pretty good-looking bunch.
+#
+#
+#
+# 2020 colin crain
+## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
+
+sub MAIN ( Int:D $max where {$max > 2} = 50 ) {
+
+ my @primes = make_prime_list($max);
+ my $primeset = Set.new(@primes);
+
+ for (2..$max) {
+ my @decomp = decompose($_, @primes);
+ printf "%-5d --> %-20s %s\n", $_, (@decomp.join: ', '), (@decomp.elems ∈ $primeset) ?? "$_ is attractive" !! "";
+ }
+}
+
+
+## ## ## ## ## SUBS
+
+sub make_prime_list ( Int:D $max where {$max > 2} = 50 ) {
+## creates a list of all primes less than or equal to a given number
+ my @output = [2];
+ CANDIDATE: loop ( my $candidate = 3; $candidate <= $max; $candidate += 2 ) {
+ my $sqrt_candidate = $candidate.sqrt;
+ loop ( my $test = 3; $test <= $sqrt_candidate; $test += 2 ) {
+ next CANDIDATE if $candidate % $test == 0;
+ }
+ @output.push: $candidate;
+ }
+ return @output;
+}
+
+
+sub decompose ( $extnum, @primes) {
+## given a number and a list of primes less than n/2,
+## returns an array list of prime decomposition factors of the number
+ my @decomp;
+ my $num = $extnum;
+ my @primelist = @primes;
+ my $prime = shift @primelist;
+
+ while ( $prime <= $num ) {
+ while ($num %% $prime) {
+ $num /= $prime;
+ @decomp.push: $prime;
+ }
+ last unless @primelist.elems;
+ $prime = @primelist.shift;
+ }
+ return @decomp;
+}
diff --git a/challenge-041/colin-crain/perl6/ch-2.p6 b/challenge-041/colin-crain/perl6/ch-2.p6
new file mode 100644
index 0000000000..24d7125c74
--- /dev/null
+++ b/challenge-041/colin-crain/perl6/ch-2.p6
@@ -0,0 +1,64 @@
+use v6;
+
+#
+# leonardo_numbers.p6
+#
+# PWC41
+# TASK #2
+# Write a script to display first 20 Leonardo Numbers. Please checkout wiki page for more information.
+# For example:
+#
+# L(0) = 1
+# L(1) = 1
+# L(2) = L(0) + L(1) + 1 = 3
+# L(3) = L(1) + L(2) + 1 = 5
+# and so on.
+#
+# method: because we have the growing series directly available to refer
+# to no recursion is required. I have made the function return a list
+# for any quanity > 0, displayed with a nice little header.
+
+# In the list-generating function, the definition of the sequence
+# lends itself well to a given/when construction, but after making it
+# I realized the fall-through logic was so straightforward the outer
+# construct could be done away with completely. All cases just fall
+# through to the return at the end.
+
+# The heavy lifting on the Leonardo list is done in one line by adding
+# elements made by the reduce sum of the flattened two element tail
+# and 1. Nice.
+#
+# The function doesn't have meaning for quantity values < 1, so a constraint is
+# added that the parameter given must be an Int greater than 0.
+#
+# 2020 colin crain
+## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
+
+
+sub MAIN ( Int:D $quan where {$quan > 0} = 20) {
+
+ ## header
+ say "the first $quan Leonardo numbers:";
+ say "";
+ say "index | number";
+ say "-------+--------";
+
+ ## data
+ my $i;
+ printf "%-2d %d\n", ++$i, $_ for make_leonardo($quan);
+}
+
+
+
+## ## ## ## ## SUBS
+
+sub make_leonardo ( Int:D $quan where {$quan > 0} ){
+## construct a list of the first n Leonardo numbers
+## requires no recursion if we have the growing list to refer to
+ my @list = [1]; ## L1 = 1
+ @list.push: 1 if $quan > 1 ; ## L2 = 1
+ while ( @list.elems <= $quan-1 ) {
+ @list.push: [+] flat @list.tail(2), 1; ## reduce sum flattened list of last two elems and 1
+ }
+ return @list;
+}
diff --git a/stats/pwc-current.json b/stats/pwc-current.json
index aa9022a939..9a7aee2065 100644
--- a/stats/pwc-current.json
+++ b/stats/pwc-current.json
@@ -1,6 +1,36 @@
{
+ "xAxis" : {
+ "type" : "category"
+ },
+ "subtitle" : {
+ "text" : "[Champions: 23] Last updated at 2020-01-05 23:53:32 GMT"
+ },
+ "chart" : {
+ "type" : "column"
+ },
+ "yAxis" : {
+ "title" : {
+ "text" : "Total Solutions"
+ }
+ },
+ "plotOptions" : {
+ "series" : {
+ "dataLabels" : {
+ "enabled" : 1,
+ "format" : "{point.y}"
+ },
+ "borderWidth" : 0
+ }
+ },
+ "legend" : {
+ "enabled" : 0
+ },
+ "title" : {
+ "text" : "Perl Weekly Challenge - 041"
+ },
"series" : [
{
+ "colorByPoint" : 1,
"name" : "Perl Weekly Challenge - 041",
"data" : [
{
@@ -9,44 +39,49 @@
"drilldown" : "Adam Russell"
},
{
- "drilldown" : "Andrezgz",
"y" : 2,
- "name" : "Andrezgz"
+ "name" : "Andrezgz",
+ "drilldown" : "Andrezgz"
},
{
- "y" : 3,
+ "drilldown" : "Arne Sommer",
"name" : "Arne Sommer",
- "drilldown" : "Arne Sommer"
+ "y" : 3
+ },
+ {
+ "y" : 4,
+ "drilldown" : "Colin Crain",
+ "name" : "Colin Crain"
},
{
"drilldown" : "Duncan C. White",
- "y" : 2,
- "name" : "Duncan C. White"
+ "name" : "Duncan C. White",
+ "y" : 2
},
{
- "drilldown" : "E. Choroba",
"y" : 2,
+ "drilldown" : "E. Choroba",
"name" : "E. Choroba"
},
{
- "drilldown" : "Javier Luque",
"name" : "Javier Luque",
+ "drilldown" : "Javier Luque",
"y" : 5
},
{
- "drilldown" : "Jo Christian Oterhals",
+ "y" : 2,
"name" : "Jo Christian Oterhals",
- "y" : 2
+ "drilldown" : "Jo Christian Oterhals"
},
{
- "drilldown" : "Kevin Colyer",
"name" : "Kevin Colyer",
+ "drilldown" : "Kevin Colyer",
"y" : 2
},
{
"name" : "Kivanc Yazan",
- "y" : 2,
- "drilldown" : "Kivanc Yazan"
+ "drilldown" : "Kivanc Yazan",
+ "y" : 2
},
{
"y" : 5,
@@ -55,80 +90,71 @@
},
{
"drilldown" : "Lubos Kolouch",
- "y" : 2,
- "name" : "Lubos Kolouch"
+ "name" : "Lubos Kolouch",
+ "y" : 2
},
{
- "name" : "Markus Holzer",
"y" : 2,
+ "name" : "Markus Holzer",
"drilldown" : "Markus Holzer"
},
{
+ "name" : "Noud Aldenhoven",
"drilldown" : "Noud Aldenhoven",
- "y" : 2,
- "name" : "Noud Aldenhoven"
+ "y" : 2
},
{
- "name" : "Roger Bell West",
"y" : 4,
- "drilldown" : "Roger Bell West"
+ "drilldown" : "Roger Bell West",
+ "name" : "Roger Bell West"
},
{
"drilldown" : "Ruben Westerberg",
- "y" : 4,
- "name" : "Ruben Westerberg"
+ "name" : "Ruben Westerberg",
+ "y" : 4
},
{
- "drilldown" : "Ryan Thompson",
+ "y" : 6,
"name" : "Ryan Thompson",
- "y" : 6
+ "drilldown" : "Ryan Thompson"
},
{
+ "name" : "Saif Ahmed",
"drilldown" : "Saif Ahmed",
- "y" : 2,
- "name" : "Saif Ahmed"
+ "y" : 2
},
{
"y" : 2,
- "name" : "Simon Proctor",
- "drilldown" : "Simon Proctor"
+ "drilldown" : "Simon Proctor",
+ "name" : "Simon Proctor"
},
{
- "y" : 1,
+ "drilldown" : "Steven Wilson",
"name" : "Steven Wilson",
- "drilldown" : "Steven Wilson"
+ "y" : 1
},
{
- "y" : 4,
"name" : "Ulrich Rieke",
- "drilldown" : "Ulrich Rieke"
+ "drilldown" : "Ulrich Rieke",
+ "y" : 4
},
{
"name" : "Walt Mankowski",
- "y" : 2,
- "drilldown" : "Walt Mankowski"
+ "drilldown" : "Walt Mankowski",
+ "y" : 2
},
{
- "y" : 2,
"name" : "Wanderdoc",
- "drilldown" : "Wanderdoc"
+ "drilldown" : "Wanderdoc",
+ "y" : 2
}
- ],
- "colorByPoint" : 1
+ ]
}
],
- "legend" : {
- "enabled" : 0
- },
- "chart" : {
- "type" : "column"
- },
- "xAxis" : {
- "type" : "category"
- },
"drilldown" : {
"series" : [
{
+ "id" : "Adam Russell",
"name" : "Adam Russell",
"data" : [
[
@@ -139,8 +165,7 @@
"Blog",
1
]
- ],
- "id" : "Adam Russell"
+ ]
},
{
"id" : "Andrezgz",
@@ -153,6 +178,7 @@
"name" : "Andrezgz"
},
{
+ "name" : "Arne Sommer",
"data" : [
[
"Raku",
@@ -163,22 +189,35 @@
1
]
],
- "id" : "Arne Sommer",
- "name" : "Arne Sommer"
+ "id" : "Arne Sommer"
},
{
+ "id" : "Colin Crain",
"data" : [
[
"Perl",
2
+ ],
+ [
+ "Raku",
+ 2
]
],
- "id" : "Duncan C. White",
- "name" : "Duncan C. White"
+ "name" : "Colin Crain"
+ },
+ {
+ "name" : "Duncan C. White",
+ "data" : [
+ [
+ "Perl",
+ 2
+ ]
+ ],
+ "id" : "Duncan C. White"
},
{
- "name" : "E. Choroba",
"id" : "E. Choroba",
+ "name" : "E. Choroba",
"data" : [
[
"Perl",
@@ -187,6 +226,7 @@
]
},
{
+ "id" : "Javier Luque",
"name" : "Javier Luque",
"data" : [
[
@@ -201,8 +241,7 @@
"Blog",
1
]
- ],
- "id" : "Javier Luque"
+ ]
},
{
"id" : "Jo Christian Oterhals",
@@ -215,8 +254,8 @@
"name" : "Jo Christian Oterhals"
},
{
- "name" : "Kevin Colyer",
"id" : "Kevin Colyer",
+ "name" : "Kevin Colyer",
"data" : [
[
"Raku",
@@ -225,18 +264,16 @@
]
},
{
- "name" : "Kivanc Yazan",
"id" : "Kivanc Yazan",
"data" : [
[
"Perl",
2
]
- ]
+ ],
+ "name" : "Kivanc Yazan"
},
{
- "name" : "Laurent Rosenfeld",
- "id" : "Laurent Rosenfeld",
"data" : [
[
"Perl",
@@ -250,40 +287,42 @@
"Blog",
1
]
- ]
+ ],
+ "name" : "Laurent Rosenfeld",
+ "id" : "Laurent Rosenfeld"
},
{
"id" : "Lubos Kolouch",
+ "name" : "Lubos Kolouch",
"data" : [
[
"Perl",
2
]
- ],
- "name" : "Lubos Kolouch"
+ ]
},
{
+ "id" : "Markus Holzer",
"name" : "Markus Holzer",
"data" : [
[
"Raku",
2
]
- ],
- "id" : "Markus Holzer"
+ ]
},
{
"name" : "Noud Aldenhoven",
- "id" : "Noud Aldenhoven",
"data" : [
[
"Raku",
2
]
- ]
+ ],
+ "id" : "Noud Aldenhoven"
},
{
- "name" : "Roger Bell West",
+ "id" : "Roger Bell West",
"data" : [
[
"Perl",
@@ -294,7 +333,7 @@
2
]
],
- "id" : "Roger Bell West"
+ "name" : "Roger Bell West"
},
{
"id" : "Ruben Westerberg",
@@ -311,8 +350,6 @@
"name" : "Ruben Westerberg"
},
{
- "name" : "Ryan Thompson",
- "id" : "Ryan Thompson",
"data" : [
[
"Perl",
@@ -326,7 +363,9 @@
"Blog",
2
]
- ]
+ ],
+ "name" : "Ryan Thompson",
+ "id" : "Ryan Thompson"
},
{
"id" : "Saif Ahmed",
@@ -339,28 +378,26 @@
"name" : "Saif Ahmed"
},
{
- "id" : "Simon Proctor",
"data" : [
[
"Raku",
2
]
],
- "name" : "Simon Proctor"
+ "name" : "Simon Proctor",
+ "id" : "Simon Proctor"
},
{
+ "name" : "Steven Wilson",
"data" : [
[
"Perl",
1
]
],
- "id" : "Steven Wilson",
- "name" : "Steven Wilson"
+ "id" : "Steven Wilson"
},
{
- "name" : "Ulrich Rieke",
- "id" : "Ulrich Rieke",
"data" : [
[
"Perl",
@@ -370,53 +407,35 @@
"Raku",
2
]
- ]
+ ],
+ "name" : "Ulrich Rieke",
+ "id" : "Ulrich Rieke"
},
{
+ "id" : "Walt Mankowski",
"name" : "Walt Mankowski",
"data" : [
[
"Perl",
2
]
- ],
- "id" : "Walt Mankowski"
+ ]
},
{
"id" : "Wanderdoc",
+ "name" : "Wanderdoc",
"data" : [
[
"Perl",
2
]
- ],
- "name" : "Wanderdoc"
+ ]
}
]
},
- "subtitle" : {
- "text" : "[Champions: 22] Last updated at 2020-01-05 22:17:53 GMT"
- },
"tooltip" : {
- "followPointer" : 1,
"pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>",
- "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>"
- },
- "title" : {
- "text" : "Perl Weekly Challenge - 041"
- },
- "yAxis" : {
- "title" : {
- "text" : "Total Solutions"
- }
- },
- "plotOptions" : {
- "series" : {
- "dataLabels" : {
- "format" : "{point.y}",
- "enabled" : 1
- },
- "borderWidth" : 0
- }
+ "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>",
+ "followPointer" : 1
}
}
diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json
index 3dd9f0d22c..1f79d15760 100644
--- a/stats/pwc-language-breakdown-summary.json
+++ b/stats/pwc-language-breakdown-summary.json
@@ -1,19 +1,47 @@
{
- "yAxis" : {
- "min" : 0,
- "title" : {
- "text" : null
- }
+ "legend" : {
+ "enabled" : "false"
},
+ "series" : [
+ {
+ "dataLabels" : {
+ "y" : 10,
+ "format" : "{point.y:.0f}",
+ "align" : "right",
+ "style" : {
+ "fontFamily" : "Verdana, sans-serif",
+ "fontSize" : "13px"
+ },
+ "enabled" : "true",
+ "color" : "#FFFFFF",
+ "rotation" : -90
+ },
+ "name" : "Contributions",
+ "data" : [
+ [
+ "Blog",
+ 444
+ ],
+ [
+ "Perl",
+ 1686
+ ],
+ [
+ "Raku",
+ 1018
+ ]
+ ]
+ }
+ ],
"title" : {
"text" : "Perl Weekly Challenge Contributions [2019 - 2020]"
},
- "subtitle" : {
- "text" : "Last updated at 2020-01-05 22:17:53 GMT"
- },
"tooltip" : {
"pointFormat" : "<b>{point.y:.0f}</b>"
},
+ "subtitle" : {
+ "text" : "Last updated at 2020-01-05 23:53:32 GMT"
+ },
"xAxis" : {
"labels" : {
"style" : {
@@ -23,41 +51,13 @@
},
"type" : "category"
},
+ "yAxis" : {
+ "min" : 0,
+ "title" : {
+ "text" : null
+ }
+ },
"chart" : {
"type" : "column"
- },
- "legend" : {
- "enabled" : "false"
- },
- "series" : [
- {
- "data" : [
- [
- "Blog",
- 444
- ],
- [
- "Perl",
- 1684
- ],
- [
- "Raku",
- 1016
- ]
- ],
- "dataLabels" : {
- "rotation" : -90,
- "align" : "right",
- "color" : "#FFFFFF",
- "style" : {
- "fontFamily" : "Verdana, sans-serif",
- "fontSize" : "13px"
- },
- "enabled" : "true",
- "format" : "{point.y:.0f}",
- "y" : 10
- },
- "name" : "Contributions"
- }
- ]
+ }
}
diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json
index 5d2714f651..33f23e76a6 100644
--- a/stats/pwc-language-breakdown.json
+++ b/stats/pwc-language-breakdown.json
@@ -1,12 +1,12 @@
{
- "xAxis" : {
- "type" : "category"
+ "tooltip" : {
+ "followPointer" : "true",
+ "headerFormat" : "<span style=\"font-size:11px\"></span>",
+ "pointFormat" : "<span style=\"color:{point.color}\">Challenge {point.name}</span>: <b>{point.y:f}</b><br/>"
},
"drilldown" : {
"series" : [
{
- "name" : "001",
- "id" : "001",
"data" : [
[
"Perl",
@@ -20,10 +20,12 @@
"Blog",
11
]
- ]
+ ],
+ "name" : "001",
+ "id" : "001"
},
{
- "id" : "002",
+ "name" : "002",
"data" : [
[
"Perl",
@@ -38,10 +40,9 @@
10
]
],
- "name" : "002"
+ "id" : "002"
},
{
- "name" : "003",
"data" : [
[
"Perl",
@@ -56,9 +57,12 @@
9
]
],
+ "name" : "003",
"id" : "003"
},
{
+ "id" : "004",
+ "name" : "004",
"data" : [
[
"Perl",
@@ -72,13 +76,11 @@
"Blog",
10
]
- ],
- "id" : "004",
- "name" : "004"
+ ]
},
{
- "name" : "005",
"id" : "005",
+ "name" : "005",
"data" : [
[
"Perl",
@@ -95,7 +97,6 @@
]
},
{
- "name" : "006",
"id" : "006",
"data" : [
[