examples/chart_bar.rb in writeexcel-0.4.1 vs examples/chart_bar.rb in writeexcel-0.4.2
- old
+ new
@@ -31,21 +31,21 @@
###############################################################################
#
# Example 1. A minimal chart.
#
-chart1 = workbook.add_chart(:type => Chart::Bar)
+chart1 = workbook.add_chart(:type => 'Chart::Bar')
# Add values only. Use the default categories.
chart1.add_series( :values => '=Sheet1!$B$2:$B$7' )
###############################################################################
#
# Example 2. A minimal chart with user specified categories (X axis)
# and a series name.
#
-chart2 = workbook.add_chart(:type => Chart::Bar)
+chart2 = workbook.add_chart(:type => 'Chart::Bar')
# Configure the series.
chart2.add_series(
:categories => '=Sheet1!$A$2:$A$7',
:values => '=Sheet1!$B$2:$B$7',
@@ -54,11 +54,11 @@
###############################################################################
#
# Example 3. Same as previous chart but with added title and axes labels.
#
-chart3 = workbook.add_chart(:type => Chart::Bar)
+chart3 = workbook.add_chart(:type => 'Chart::Bar')
# Configure the series.
chart3.add_series(
:categories => '=Sheet1!$A$2:$A$7',
:values => '=Sheet1!$B$2:$B$7',
@@ -72,11 +72,11 @@
###############################################################################
#
# Example 4. Same as previous chart but with an added series
#
-chart4 = workbook.add_chart(:name => 'Results Chart', :type => Chart::Bar)
+chart4 = workbook.add_chart(:name => 'Results Chart', :type => 'Chart::Bar')
# Configure the series.
chart4.add_series(
:categories => '=Sheet1!$A$2:$A$7',
:values => '=Sheet1!$B$2:$B$7',
@@ -97,10 +97,10 @@
###############################################################################
#
# Example 5. Same as Example 3 but as an embedded chart.
#
-chart5 = workbook.add_chart(:type => Chart::Bar, :embedded => 1)
+chart5 = workbook.add_chart(:type => 'Chart::Bar', :embedded => 1)
# Configure the series.
chart5.add_series(
:categories => '=Sheet1!$A$2:$A$7',
:values => '=Sheet1!$B$2:$B$7',