[dw-free] Tweak bar graphs generated by DW::Graphs
[commit: http://hg.dwscoalition.org/dw-free/rev/6fe3db4ec3e5]
http://bugs.dwscoalition.org/show_bug.cgi?id=2951
Make graphs on dreamwidth.org/stats/site work with the new DW::Graphse 2
Patch by
anarres.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2951
Make graphs on dreamwidth.org/stats/site work with the new DW::Graphse 2
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/DW/Controller/Graphs.pm
- etc/sitestats_graphs.yaml
-------------------------------------------------------------------------------- diff -r cae9d7ed7ee7 -r 6fe3db4ec3e5 cgi-bin/DW/Controller/Graphs.pm --- a/cgi-bin/DW/Controller/Graphs.pm Thu Apr 28 12:43:50 2011 +0800 +++ b/cgi-bin/DW/Controller/Graphs.pm Thu Apr 28 12:45:31 2011 +0800 @@ -30,6 +30,8 @@ DW::Controller::Graphs - Controller modu use DW::Controller::Graphs; =cut + +package DW::Controller::Graphs; package DW::Controller::Graphs; @@ -129,7 +131,7 @@ sub active_community_accounts { my $input = [ [@labels], [@free_dataset], [@paid_dataset] ]; # create an image (x and y labels not wanted so pass empty strings) - my $gd = DW::Graphs::bar2($input, '', '', $names); + my $gd = DW::Graphs::bar2( $input, '', '', $names, "sitestats_graphs.yaml" ); # return the image $r->content_type("image/png"); @@ -175,7 +177,7 @@ sub active_identity_accounts { my $input = [ [@labels], [@free_dataset], [@paid_dataset] ]; # create an image (x and y labels not wanted so pass empty strings) - my $gd = DW::Graphs::bar2($input, '', '', $names); + my $gd = DW::Graphs::bar2( $input, '', '', $names, "sitestats_graphs.yaml" ); # return the image $r->content_type("image/png"); @@ -221,7 +223,7 @@ sub active_personal_accounts { my $input = [ [@labels], [@free_dataset], [@paid_dataset] ]; # create an image (x and y labels not wanted so pass empty strings) - my $gd = DW::Graphs::bar2($input, '', '', $names); + my $gd = DW::Graphs::bar2( $input, '', '', $names, "sitestats_graphs.yaml" ); # return the image $r->content_type("image/png"); diff -r cae9d7ed7ee7 -r 6fe3db4ec3e5 etc/sitestats_graphs.yaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/sitestats_graphs.yaml Thu Apr 28 12:45:31 2011 +0800 @@ -0,0 +1,14 @@ +--- +# etc/sitestats_graphs.yaml +# +# Actual configuration file for DW::Graphs +# +# Authors: +# Anarres <anarres@dreamwidth.org> +# +# Copyright (c) 2010-2011 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +bar_spacing: 50 --------------------------------------------------------------------------------