examples/chart_radar.rb in write_xlsx-1.00.0 vs examples/chart_radar.rb in write_xlsx-1.01.0
- old
+ new
@@ -4,11 +4,11 @@
#######################################################################
#
# A demo of an Area chart in Excel::Writer::XLSX.
#
# reverse ('(c)'), October 2012, 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_radar.xlsx')
@@ -51,11 +51,14 @@
# Set an Excel chart style. Blue colors with white outline and shadow.
chart1.set_style(11)
# Insert the chart into the worksheet (with an offset).
-worksheet.insert_chart('D2', chart1, 25, 10)
+worksheet.insert_chart(
+ 'D2', chart1,
+ :x_offset => 25, :y_offset => 10
+)
#
# Create a with_markers chart sub-type
#
chart2 = workbook.add_chart(
@@ -85,11 +88,14 @@
# Set an Excel chart style. Blue colors with white outline and shadow.
chart2.set_style(12)
# Insert the chart into the worksheet (with an offset).
-worksheet.insert_chart('D18', chart2, 25, 11)
+worksheet.insert_chart(
+ 'D18', chart2,
+ :x_offset => 25, :y_offset => 10
+)
#
# Create a filled chart sub-type
#
chart3 = workbook.add_chart(
@@ -119,8 +125,11 @@
# Set an Excel chart style. Blue colors with white outline and shadow.
chart3.set_style(13)
# Insert the chart into the worksheet (with an offset).
-worksheet.insert_chart('D34', chart3, 25, 11)
+worksheet.insert_chart(
+ 'D34', chart3,
+ :x_offset => 25, :y_offset => 10
+)
workbook.close