#NEWLINE# def test_create_file( self ) : #NEWLINE# #INDENT# 'Test the creation of a simple XlsxWriter file.' #NEWLINE# workbook = Workbook ( self . got_filename ) #NEWLINE# worksheet = workbook . add_worksheet ( ) #NEWLINE# chart = workbook . add_chart ( { #NEWLINE# #INDENT# 'type' : 'column' , #NEWLINE# #UNINDENT# } ) #NEWLINE# chart . axis_ids = [ 110902272 , 110756608 ] #NEWLINE# data = [ [ 2 , 2 , 2 ] , [ 2 , 2 , 2 ] , [ 2 , 2 , 2 ] , [ 2 , 2 , 2 ] , [ 2 , 2 , 2 ] , [ 2 , 2 , 2 ] , [ 2 , 2 , 2 ] , [ 2 , 2 , 2 ] ] #NEWLINE# worksheet . write_column ( 'A1' , data [ 0 ] ) #NEWLINE# worksheet . write_column ( 'B1' , data [ 1 ] ) #NEWLINE# worksheet . write_column ( 'C1' , data [ 2 ] ) #NEWLINE# worksheet . write_column ( 'D1' , data [ 3 ] ) #NEWLINE# worksheet . write_column ( 'E1' , data [ 4 ] ) #NEWLINE# worksheet . write_column ( 'F1' , data [ 5 ] ) #NEWLINE# worksheet . write_column ( 'G1' , data [ 6 ] ) #NEWLINE# worksheet . write_column ( 'H1' , data [ 7 ] ) #NEWLINE# chart . add_series ( { #NEWLINE# #INDENT# 'values' : '=Sheet1!$A$1:$A$3' , #NEWLINE# 'pattern' : { #NEWLINE# #INDENT# 'pattern' : 'percent_25' , #NEWLINE# 'fg_color' : '#C00000' , #NEWLINE# 'bg_color' : '#FFFFFF' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# chart . add_series ( { #NEWLINE# #INDENT# 'values' : '=Sheet1!$B$1:$B$3' , #NEWLINE# 'pattern' : { #NEWLINE# #INDENT# 'pattern' : 'percent_75' , #NEWLINE# 'fg_color' : '#FF0000' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# chart . add_series ( { #NEWLINE# #INDENT# 'values' : '=Sheet1!$C$1:$C$3' , #NEWLINE# 'pattern' : { #NEWLINE# #INDENT# 'pattern' : 'dark_upward_diagonal' , #NEWLINE# 'fg_color' : '#FFC000' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# chart . add_series ( { #NEWLINE# #INDENT# 'values' : '=Sheet1!$D$1:$D$3' , #NEWLINE# 'pattern' : { #NEWLINE# #INDENT# 'pattern' : 'narrow_horizontal' , #NEWLINE# 'fg_color' : '#FFFF00' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# chart . add_series ( { #NEWLINE# #INDENT# 'values' : '=Sheet1!$E$1:$E$3' , #NEWLINE# 'pattern' : { #NEWLINE# #INDENT# 'pattern' : 'dashed_vertical' , #NEWLINE# 'fg_color' : '#92D050' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# chart . add_series ( { #NEWLINE# #INDENT# 'values' : '=Sheet1!$F$1:$F$3' , #NEWLINE# 'pattern' : { #NEWLINE# #INDENT# 'pattern' : 'horizontal_brick' , #NEWLINE# 'fg_color' : '#00B050' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# chart . add_series ( { #NEWLINE# #INDENT# 'values' : '=Sheet1!$G$1:$G$3' , #NEWLINE# 'pattern' : { #NEWLINE# #INDENT# 'pattern' : 'shingle' , #NEWLINE# 'fg_color' : '#00B0F0' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# chart . add_series ( { #NEWLINE# #INDENT# 'values' : '=Sheet1!$H$1:$H$3' , #NEWLINE# 'pattern' : { #NEWLINE# #INDENT# 'pattern' : 'large_check' , #NEWLINE# 'fg_color' : '#0070C0' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# worksheet . insert_chart ( 'E9' , chart ) #NEWLINE# workbook . close ( ) #NEWLINE# self . assertExcelEqual ( )