examples/chart_pie.rb in writeexcel-0.4.1 vs examples/chart_pie.rb in writeexcel-0.4.2
- old
+ new
@@ -30,20 +30,20 @@
###############################################################################
#
# Example 1. A minimal chart.
#
-chart1 = workbook.add_chart(:type => Chart::Pie)
+chart1 = workbook.add_chart(:type => 'Chart::Pie')
# Add values only. Use the default categories.
chart1.add_series(:values => '=Sheet1!$B$2:$B$4')
###############################################################################
#
# Example 2. A minimal chart with user specified categories and a series name.
#
-chart2 = workbook.add_chart(:type => Chart::Pie)
+chart2 = workbook.add_chart(:type => 'Chart::Pie')
# Configure the series.
chart2.add_series(
:categories => '=Sheet1!$A$2:$A$4',
:values => '=Sheet1!$B$2:$B$4',
@@ -52,11 +52,11 @@
###############################################################################
#
# Example 3. Same as previous chart but with an added title.
#
-chart3 = workbook.add_chart(:type => Chart::Pie)
+chart3 = workbook.add_chart(:type => 'Chart::Pie')
# Configure the series.
chart3.add_series(
:categories => '=Sheet1!$A$2:$A$4',
:values => '=Sheet1!$B$2:$B$4',
@@ -68,11 +68,11 @@
###############################################################################
#
# Example 4. Same as previous chart with a user specified chart sheet name.
#
-chart4 = workbook.add_chart(:name => 'Results Chart', :type => Chart::Pie)
+chart4 = workbook.add_chart(:name => 'Results Chart', :type => 'Chart::Pie')
# Configure the series.
chart4.add_series(
:categories => '=Sheet1!$A$2:$A$4',
:values => '=Sheet1!$B$2:$B$4',
@@ -87,10 +87,10 @@
###############################################################################
#
# Example 5. Same as Example 3 but as an embedded chart.
#
-chart5 = workbook.add_chart(:type => Chart::Pie, :embedded => 1)
+chart5 = workbook.add_chart(:type => 'Chart::Pie', :embedded => 1)
# Configure the series.
chart5.add_series(
:categories => '=Sheet1!$A$2:$A$4',
:values => '=Sheet1!$B$2:$B$4',