--- loncom/xml/lonplot.pm 2002/01/10 16:29:54 1.37 +++ loncom/xml/lonplot.pm 2002/01/10 19:45:51 1.38 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Dynamic plot # -# $Id: lonplot.pm,v 1.37 2002/01/10 16:29:54 matthew Exp $ +# $Id: lonplot.pm,v 1.38 2002/01/10 19:45:51 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -126,25 +126,29 @@ my %plot_defaults = default => 200, test => $int_test, description => 'height of image (pixels)', - edit_type => 'entry' + edit_type => 'entry', + size => '10' }, width => { default => 200, test => $int_test, description => 'width of image (pixels)', - edit_type => 'entry' + edit_type => 'entry', + size => '10' }, bgcolor => { default => 'xffffff', test => $color_test, description => 'background color of image (xffffff)', - edit_type => 'entry' + edit_type => 'entry', + size => '10' }, fgcolor => { default => 'x000000', test => $color_test, description => 'foreground color of image (x000000)', - edit_type => 'entry' + edit_type => 'entry', + size => '10' }, transparent => { default => 'off', @@ -186,7 +190,8 @@ my %key_defaults = default => '', test => $words_test, description => 'Title of key', - edit_type => 'entry' + edit_type => 'entry', + size => '40' }, box => { default => 'off', @@ -210,13 +215,15 @@ my %label_defaults = default => 0, test => $real_test, description => 'x position of label (graph coordinates)', - edit_type => 'entry' + edit_type => 'entry', + size => '10' }, ypos => { default => 0, test => $real_test, description => 'y position of label (graph coordinates)', - edit_type => 'entry' + edit_type => 'entry', + size => '10' }, justify => { default => 'left', @@ -233,31 +240,36 @@ my %axis_defaults = default => 'x000000', test => $color_test, description => 'color of axes (x000000)', - edit_type => 'entry' + edit_type => 'entry', + size => '10' }, xmin => { default => '-10.0', test => $real_test, description => 'minimum x-value shown in plot', - edit_type => 'entry' + edit_type => 'entry', + size => '10' }, xmax => { default => ' 10.0', test => $real_test, description => 'maximum x-value shown in plot', - edit_type => 'entry' + edit_type => 'entry', + size => '10' }, ymin => { default => '-10.0', test => $real_test, description => 'minimum y-value shown in plot', - edit_type => 'entry' + edit_type => 'entry', + size => '10' }, ymax => { default => ' 10.0', test => $real_test, description => 'maximum y-value shown in plot', - edit_type => 'entry' + edit_type => 'entry', + size => '10' } ); @@ -267,24 +279,22 @@ my %curve_defaults = default => 'x000000', test => $color_test, description => 'color of curve (x000000)', - edit_type => 'entry' + edit_type => 'entry', + size => '10' }, name => { default => '', test => $words_test, description => 'name of curve to appear in key', - edit_type => 'entry' + edit_type => 'entry', + size => '20' }, linestyle => { default => 'lines', test => $linestyle_test, description => 'Line style', edit_type => 'choice', - choices => ['lines','linespoints','dots','points','steps', - 'fsteps','histeps','errorbars','xerrorbars', - 'yerrorbars','xyerrorbars','boxes','boxerrorbars', - 'boxxyerrorbars','financebars','candlesticks', - 'vector'] + choices => [keys(%linestyles)] } ); @@ -848,7 +858,8 @@ sub edit_attributes { $description .= ' ' if ($description !~ / $/); if ($defaults->{$attr}->{'edit_type'} eq 'entry') { $result .= &Apache::edit::text_arg - ($description,$attr,$token); + ($description,$attr,$token, + $defaults->{$attr}->{'size'}); } elsif ($defaults->{$attr}->{'edit_type'} eq 'choice') { $result .= &Apache::edit::select_arg ($description,$attr,$defaults->{$attr}->{'choices'},$token);