examples/chart_pie.rb in write_xlsx-1.00.0 vs examples/chart_pie.rb in write_xlsx-1.01.0

- old
+ new

@@ -10,11 +10,11 @@ # via the add_series() method. However, Pie charts are a special case # since each segment is represented as a point so it is necessary to # assign formatting to each point in the series. # # reverse(c), March 2011, John McNamara, jmcnamara@cpan.org -# convert to ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp +# convert to ruby by Hideo NAKAMURA, nakamura.hideo@gmail.com # require 'write_xlsx' workbook = WriteXLSX.new('chart_pie.xlsx') @@ -48,11 +48,14 @@ # Set an Excel chart style. Blue colors with white outline and shadow. chart1.set_style(10) # Insert the chart into the worksheet (with an offset). -worksheet.insert_chart('C2', chart1, 25, 10) +worksheet.insert_chart( + 'C2', chart1, + :x_offset => 25, :y_offset => 10 +) # # Create a Pie chart with user defined segment colors. # @@ -72,8 +75,11 @@ ) # Add a title. chart2.set_title(:name => 'Pie Chart with user defined colors') -worksheet.insert_chart('C18', chart2, 25, 10) +worksheet.insert_chart( + 'C18', chart2, + :x_offset => 25, :y_offset => 10 +) workbook.close