#NEWLINE# @ referrer_limit #NEWLINE# @ cache_page ( ( 60 * 15 ) ) #NEWLINE# def graph_sig1( request , username , width = 300 , height = 100 ) : #NEWLINE# #INDENT# ready_or_update ( username ) #NEWLINE# width = int ( width ) #NEWLINE# height = int ( height ) #NEWLINE# if ( not width ) : #NEWLINE# #INDENT# width = 300 #NEWLINE# #UNINDENT# if ( not height ) : #NEWLINE# #INDENT# height = 100 #NEWLINE# #UNINDENT# series_set = graph_timeline_data ( username ) #NEWLINE# series_set . get_series ( 0 ) . color = '3695' #NEWLINE# output = FileOutput ( padding = 0 , style = sig1_css ) #NEWLINE# try : #NEWLINE# #INDENT# scale = AutoWeekDateScale ( series_set , short_labels = True ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# raise Http404 ( 'No data' ) #NEWLINE# #UNINDENT# lb = Label ( username , sig1_css ) #NEWLINE# output . add_item ( lb , x = 10 , y = ( 20 - ( height / 2 ) ) , width = width , height = height ) #NEWLINE# wg = WaveGraph ( series_set , scale , sig1_css , False , vertical_scale = False ) #NEWLINE# output . add_item ( wg , x = 0 , y = 0 , width = request , height = height ) #NEWLINE# try : #NEWLINE# #INDENT# return stream_graph ( output ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# raise Http404 ( 'No data' )