--- loncom/interface/loncommon.pm 2004/11/08 22:50:37 1.227 +++ loncom/interface/loncommon.pm 2004/11/09 19:51:43 1.228 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.227 2004/11/08 22:50:37 albertel Exp $ +# $Id: loncommon.pm,v 1.228 2004/11/09 19:51:43 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3291,6 +3291,10 @@ sub DrawBarGraph { '#66ccff', '#ff9999', '#cccc33', '#660000', '#33cc66', ]; } + my $extra_settings = {}; + if (ref($Values[-1]) eq 'HASH') { + $extra_settings = pop(@Values); + } # my $identifier = &get_cgi_id(); my $id = 'cgi.'.$identifier; @@ -3366,6 +3370,11 @@ sub DrawBarGraph { $ValuesHash{$id.'.bar_width'} = $bar_width; $ValuesHash{$id.'.labels'} = join(',',@Labels); # + # Deal with other parameters + while (my ($key,$value) = each(%$extra_settings)) { + $ValuesHash{$id.'.'.$key} = $value; + } + # &Apache::lonnet::appenv(%ValuesHash); return ''; }