write_xlsx 0.62.0 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. data/README.rdoc +14 -1
  2. data/examples/chart_data_tools.rb +215 -0
  3. data/examples/chart_pie.rb +36 -5
  4. data/examples/sparklines2.rb +1 -1
  5. data/examples/tab_colors.rb +3 -3
  6. data/lib/write_xlsx/chart.rb +559 -516
  7. data/lib/write_xlsx/chart/area.rb +4 -1
  8. data/lib/write_xlsx/chart/axis.rb +132 -0
  9. data/lib/write_xlsx/chart/bar.rb +17 -9
  10. data/lib/write_xlsx/chart/column.rb +9 -1
  11. data/lib/write_xlsx/chart/line.rb +24 -0
  12. data/lib/write_xlsx/chart/radar.rb +2 -2
  13. data/lib/write_xlsx/chart/scatter.rb +19 -0
  14. data/lib/write_xlsx/chart/stock.rb +10 -3
  15. data/lib/write_xlsx/drawing.rb +43 -44
  16. data/lib/write_xlsx/package/vml.rb +21 -14
  17. data/lib/write_xlsx/shape.rb +173 -22
  18. data/lib/write_xlsx/sparkline.rb +524 -0
  19. data/lib/write_xlsx/version.rb +1 -1
  20. data/lib/write_xlsx/workbook.rb +183 -115
  21. data/lib/write_xlsx/worksheet.rb +821 -1073
  22. data/lib/write_xlsx/worksheet/cell_data.rb +132 -0
  23. data/lib/write_xlsx/worksheet/print_style.rb +51 -0
  24. data/test/chart/test_add_series.rb +31 -6
  25. data/test/chart/test_write_d_lbls.rb +18 -18
  26. data/test/chart/test_write_number_format.rb +20 -24
  27. data/test/drawing/test_drawing_shape_01.rb +1 -1
  28. data/test/drawing/test_drawing_shape_02.rb +2 -2
  29. data/test/drawing/test_drawing_shape_03.rb +5 -5
  30. data/test/drawing/test_drawing_shape_04.rb +3 -3
  31. data/test/drawing/test_drawing_shape_05.rb +4 -4
  32. data/test/drawing/test_drawing_shape_07.rb +2 -2
  33. data/test/perl_output/chart_data_tools.xlsx +0 -0
  34. data/test/perl_output/chart_pie.xlsx +0 -0
  35. data/test/regression/disabled_test_vml04.rb +2 -2
  36. data/test/regression/test_chart_drop_lines01.rb +46 -0
  37. data/test/regression/test_chart_drop_lines02.rb +51 -0
  38. data/test/regression/test_chart_drop_lines03.rb +46 -0
  39. data/test/regression/test_chart_drop_lines04.rb +64 -0
  40. data/test/regression/test_chart_errorbars01.rb +47 -0
  41. data/test/regression/test_chart_errorbars02.rb +57 -0
  42. data/test/regression/test_chart_errorbars03.rb +53 -0
  43. data/test/regression/test_chart_errorbars04.rb +48 -0
  44. data/test/regression/test_chart_errorbars05.rb +47 -0
  45. data/test/regression/test_chart_errorbars06.rb +47 -0
  46. data/test/regression/test_chart_errorbars07.rb +66 -0
  47. data/test/regression/test_chart_font02.rb +1 -1
  48. data/test/regression/test_chart_font06.rb +1 -1
  49. data/test/regression/test_chart_gridlines04.rb +2 -1
  50. data/test/regression/test_chart_gridlines08.rb +2 -1
  51. data/test/regression/test_chart_points01.rb +37 -0
  52. data/test/regression/test_chart_points02.rb +40 -0
  53. data/test/regression/test_chart_points03.rb +42 -0
  54. data/test/regression/test_chart_points04.rb +52 -0
  55. data/test/regression/test_chart_points05.rb +49 -0
  56. data/test/regression/test_chart_points06.rb +49 -0
  57. data/test/regression/test_chartsheet05.rb +1 -1
  58. data/test/regression/test_chartsheet06.rb +1 -1
  59. data/test/regression/test_comment01.rb +1 -1
  60. data/test/regression/test_comment02.rb +1 -1
  61. data/test/regression/test_comment03.rb +1 -1
  62. data/test/regression/test_comment04.rb +2 -2
  63. data/test/regression/test_comment06.rb +1 -1
  64. data/test/regression/test_comment07.rb +1 -1
  65. data/test/regression/test_comment08.rb +1 -1
  66. data/test/regression/test_comment09.rb +1 -1
  67. data/test/regression/test_comment10.rb +1 -1
  68. data/test/regression/test_default_row04.rb +1 -1
  69. data/test/regression/test_escapes02.rb +1 -1
  70. data/test/regression/test_hyperlink15.rb +2 -2
  71. data/test/regression/test_shape_connect01.rb +6 -6
  72. data/test/regression/test_shape_connect02.rb +6 -6
  73. data/test/regression/test_shape_connect03.rb +11 -11
  74. data/test/regression/test_shape_connect04.rb +10 -10
  75. data/test/regression/test_shape_scale01.rb +2 -2
  76. data/test/regression/test_shape_stencil01.rb +3 -3
  77. data/test/regression/test_tab_color01.rb +1 -1
  78. data/test/regression/test_table04.rb +1 -1
  79. data/test/regression/test_table05.rb +1 -1
  80. data/test/regression/test_table06.rb +1 -1
  81. data/test/regression/test_vml01.rb +1 -1
  82. data/test/regression/test_vml02.rb +1 -1
  83. data/test/regression/test_vml03.rb +2 -2
  84. data/test/regression/xlsx_files/chart_drop_lines01.xlsx +0 -0
  85. data/test/regression/xlsx_files/chart_drop_lines02.xlsx +0 -0
  86. data/test/regression/xlsx_files/chart_drop_lines03.xlsx +0 -0
  87. data/test/regression/xlsx_files/chart_drop_lines04.xlsx +0 -0
  88. data/test/regression/xlsx_files/chart_errorbars01.xlsx +0 -0
  89. data/test/regression/xlsx_files/chart_errorbars02.xlsx +0 -0
  90. data/test/regression/xlsx_files/chart_errorbars03.xlsx +0 -0
  91. data/test/regression/xlsx_files/chart_errorbars04.xlsx +0 -0
  92. data/test/regression/xlsx_files/chart_errorbars05.xlsx +0 -0
  93. data/test/regression/xlsx_files/chart_errorbars06.xlsx +0 -0
  94. data/test/regression/xlsx_files/chart_errorbars07.xlsx +0 -0
  95. data/test/regression/xlsx_files/chart_points01.xlsx +0 -0
  96. data/test/regression/xlsx_files/chart_points02.xlsx +0 -0
  97. data/test/regression/xlsx_files/chart_points03.xlsx +0 -0
  98. data/test/regression/xlsx_files/chart_points04.xlsx +0 -0
  99. data/test/regression/xlsx_files/chart_points05.xlsx +0 -0
  100. data/test/regression/xlsx_files/chart_points06.xlsx +0 -0
  101. data/test/regression/xlsx_files/chart_stock02.xlsx +0 -0
  102. data/test/test_example_match.rb +278 -57
  103. data/test/worksheet/test_convert_date_time_02.rb +427 -433
  104. data/test/worksheet/test_convert_date_time_03.rb +1 -1
  105. data/test/worksheet/test_write_sheet_pr.rb +2 -2
  106. data/test/worksheet/test_write_sheet_view1.rb +2 -2
  107. metadata +80 -10
@@ -0,0 +1,48 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'helper'
3
+
4
+ class TestRegressionChartErrorbars04 < Test::Unit::TestCase
5
+ def setup
6
+ setup_dir_var
7
+ end
8
+
9
+ def teardown
10
+ File.delete(@xlsx) if File.exist?(@xlsx)
11
+ end
12
+
13
+ def test_chart_errorbars04
14
+ @xlsx = 'chart_errorbars04.xlsx'
15
+ workbook = WriteXLSX.new(@xlsx)
16
+ worksheet = workbook.add_worksheet
17
+ chart = workbook.add_chart(:type => 'scatter', :embedded => 1)
18
+
19
+ # For testing, copy the randomly generated axis ids in the target xlsx file.
20
+ chart.instance_variable_set(:@axis_ids, [61626624, 69664128])
21
+
22
+ data = [
23
+ [ 1, 2, 3, 4, 5 ],
24
+ [ 2, 4, 6, 8, 10 ],
25
+ [ 3, 6, 9, 12, 15 ]
26
+ ]
27
+
28
+ worksheet.write('A1', data)
29
+
30
+ chart.add_series(
31
+ :categories => '=Sheet1!$A$1:$A$5',
32
+ :values => '=Sheet1!$B$1:$B$5',
33
+ :y_error_bars => { :type => 'standard_error' },
34
+ :x_error_bars => { :type => 'standard_deviation', :value => 1 }
35
+ )
36
+
37
+ chart.add_series(
38
+ :categories => '=Sheet1!$A$1:$A$5',
39
+ :values => '=Sheet1!$C$1:$C$5'
40
+ )
41
+
42
+ worksheet.insert_chart('E9', chart)
43
+
44
+ workbook.close
45
+ compare_xlsx_for_regression(
46
+ File.join(@regression_output, @xlsx), @xlsx)
47
+ end
48
+ end
@@ -0,0 +1,47 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'helper'
3
+
4
+ class TestRegressionChartErrorbars05 < Test::Unit::TestCase
5
+ def setup
6
+ setup_dir_var
7
+ end
8
+
9
+ def teardown
10
+ File.delete(@xlsx) if File.exist?(@xlsx)
11
+ end
12
+
13
+ def test_chart_errorbars05
14
+ @xlsx = 'chart_errorbars05.xlsx'
15
+ workbook = WriteXLSX.new(@xlsx)
16
+ worksheet = workbook.add_worksheet
17
+ chart = workbook.add_chart(:type => 'bar', :embedded => 1)
18
+
19
+ # For testing, copy the randomly generated axis ids in the target xlsx file.
20
+ chart.instance_variable_set(:@axis_ids, [49016832, 49019136])
21
+
22
+ data = [
23
+ [ 1, 2, 3, 4, 5 ],
24
+ [ 2, 4, 6, 8, 10 ],
25
+ [ 3, 6, 9, 12, 15 ]
26
+ ]
27
+
28
+ worksheet.write('A1', data)
29
+
30
+ chart.add_series(
31
+ :categories => '=Sheet1!$A$1:$A$5',
32
+ :values => '=Sheet1!$B$1:$B$5',
33
+ :x_error_bars => { :type => 'standard_error'}
34
+ )
35
+
36
+ chart.add_series(
37
+ :categories => '=Sheet1!$A$1:$A$5',
38
+ :values => '=Sheet1!$C$1:$C$5'
39
+ )
40
+
41
+ worksheet.insert_chart('E9', chart)
42
+
43
+ workbook.close
44
+ compare_xlsx_for_regression(
45
+ File.join(@regression_output, @xlsx), @xlsx)
46
+ end
47
+ end
@@ -0,0 +1,47 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'helper'
3
+
4
+ class TestRegressionChartErrorbars06 < Test::Unit::TestCase
5
+ def setup
6
+ setup_dir_var
7
+ end
8
+
9
+ def teardown
10
+ File.delete(@xlsx) if File.exist?(@xlsx)
11
+ end
12
+
13
+ def test_chart_errorbars06
14
+ @xlsx = 'chart_errorbars06.xlsx'
15
+ workbook = WriteXLSX.new(@xlsx)
16
+ worksheet = workbook.add_worksheet
17
+ chart = workbook.add_chart(:type => 'column', :embedded => 1)
18
+
19
+ # For testing, copy the randomly generated axis ids in the target xlsx file.
20
+ chart.instance_variable_set(:@axis_ids, [45472384, 49016832])
21
+
22
+ data = [
23
+ [ 1, 2, 3, 4, 5 ],
24
+ [ 2, 4, 6, 8, 10 ],
25
+ [ 3, 6, 9, 12, 15 ]
26
+ ]
27
+
28
+ worksheet.write('A1', data)
29
+
30
+ chart.add_series(
31
+ :categories => '=Sheet1!$A$1:$A$5',
32
+ :values => '=Sheet1!$B$1:$B$5',
33
+ :y_error_bars => { :type => 'standard_error'}
34
+ )
35
+
36
+ chart.add_series(
37
+ :categories => '=Sheet1!$A$1:$A$5',
38
+ :values => '=Sheet1!$C$1:$C$5'
39
+ )
40
+
41
+ worksheet.insert_chart('E9', chart)
42
+
43
+ workbook.close
44
+ compare_xlsx_for_regression(
45
+ File.join(@regression_output, @xlsx), @xlsx)
46
+ end
47
+ end
@@ -0,0 +1,66 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'helper'
3
+
4
+ class TestRegressionChartErrorbars07 < Test::Unit::TestCase
5
+ def setup
6
+ setup_dir_var
7
+ end
8
+
9
+ def teardown
10
+ File.delete(@xlsx) if File.exist?(@xlsx)
11
+ end
12
+
13
+ def test_chart_errorbars07
14
+ @xlsx = 'chart_errorbars07.xlsx'
15
+ workbook = WriteXLSX.new(@xlsx)
16
+ worksheet = workbook.add_worksheet
17
+ chart = workbook.add_chart(:type => 'stock', :embedded => 1)
18
+ date_format = workbook.add_format(:num_format => 14)
19
+
20
+ # For testing, copy the randomly generated axis ids in the target xlsx file.
21
+ chart.instance_variable_set(:@axis_ids, [45470848, 45472768])
22
+
23
+ data = [
24
+ [ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
25
+ [ 27.2, 25.03, 19.05, 20.34, 18.5 ],
26
+ [ 23.49, 19.55, 15.12, 17.84, 16.34 ],
27
+ [ 25.45, 23.05, 17.32, 20.45, 17.34 ]
28
+ ]
29
+
30
+ (0..4).each do |row|
31
+ worksheet.write_date_time(row, 0, data[0][row], date_format)
32
+ worksheet.write(row, 1, data[1][row])
33
+ worksheet.write(row, 2, data[2][row])
34
+ worksheet.write(row, 3, data[3][row])
35
+ end
36
+
37
+ worksheet.set_column('A:D', 11)
38
+
39
+ chart.add_series(
40
+ :categories => '=Sheet1!$A$1:$A$5',
41
+ :values => '=Sheet1!$B$1:$B$5',
42
+ :y_error_bars => { :type => 'standard_error'}
43
+ )
44
+
45
+ chart.add_series(
46
+ :categories => '=Sheet1!$A$1:$A$5',
47
+ :values => '=Sheet1!$C$1:$C$5',
48
+ :y_error_bars => { :type => 'standard_error'}
49
+ )
50
+
51
+ chart.add_series(
52
+ :categories => '=Sheet1!$A$1:$A$5',
53
+ :values => '=Sheet1!$D$1:$D$5',
54
+ :y_error_bars => { :type => 'standard_error'}
55
+ )
56
+
57
+ worksheet.insert_chart('E9', chart)
58
+
59
+ workbook.close
60
+ compare_xlsx_for_regression(
61
+ File.join(@regression_output, @xlsx), @xlsx,
62
+ [],
63
+ {'xl/charts/chart1.xml' => [ '<c:formatCode']}
64
+ )
65
+ end
66
+ end
@@ -42,7 +42,7 @@ def test_chart_area02
42
42
  chart.set_y_axis(
43
43
  :name => 'YYY',
44
44
  :name_font => { :bold => 1, :italic => 1 },
45
- :num_font => { :size => 9, :bold => 0, :italic => 1 },
45
+ :num_font => { :size => 9, :bold => 0, :italic => 1 }
46
46
  )
47
47
 
48
48
  worksheet.insert_chart('E9', chart)
@@ -54,7 +54,7 @@ def test_chart_area06
54
54
  :pitch_family => 34,
55
55
  :charset => 0,
56
56
  :color => '#00B0F0'
57
- },
57
+ }
58
58
  )
59
59
 
60
60
  chart.set_y_axis(
@@ -32,7 +32,8 @@ def test_chart_gridlines04
32
32
  chart.add_series(:values => '=Sheet1!$C$1:$C$5')
33
33
 
34
34
  chart.set_y_axis(:major_gridlines => { :visible => 0 })
35
- chart.instance_variable_get(:@y_axis)[:_major_tick_mark] = 'cross'
35
+ chart.instance_variable_get(:@y_axis).
36
+ instance_variable_set(:@major_tick_mark, 'cross')
36
37
 
37
38
  worksheet.insert_chart('E9', chart)
38
39
 
@@ -37,7 +37,8 @@ def test_chart_gridlines08
37
37
  :minor_gridlines => { :visible => 1 }
38
38
  )
39
39
 
40
- chart.instance_variable_get(:@y_axis)[:_major_tick_mark] = 'cross'
40
+ chart.instance_variable_get(:@y_axis).
41
+ instance_variable_set(:@major_tick_mark, 'cross')
41
42
 
42
43
  worksheet.insert_chart('E9', chart)
43
44
 
@@ -0,0 +1,37 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'helper'
3
+
4
+ class TestRegressionChartPoints01 < Test::Unit::TestCase
5
+ def setup
6
+ setup_dir_var
7
+ end
8
+
9
+ def teardown
10
+ File.delete(@xlsx) if File.exist?(@xlsx)
11
+ end
12
+
13
+ def test_chart_points01
14
+ @xlsx = 'chart_points01.xlsx'
15
+ workbook = WriteXLSX.new(@xlsx)
16
+ worksheet = workbook.add_worksheet
17
+ chart = workbook.add_chart(:type => 'pie', :embedded => 1)
18
+
19
+ data = [
20
+ [2, 5, 4, 1, 7, 4]
21
+ ]
22
+
23
+ worksheet.write('A1', data)
24
+
25
+ chart.add_series(
26
+ :values => '=Sheet1!$A$1:$A$6',
27
+ :points => [
28
+ { :fill => { :color => 'red' } }
29
+ ]
30
+ )
31
+
32
+ worksheet.insert_chart('E9', chart)
33
+
34
+ workbook.close
35
+ compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
36
+ end
37
+ end
@@ -0,0 +1,40 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'helper'
3
+
4
+ class TestRegressionChartPoints02 < Test::Unit::TestCase
5
+ def setup
6
+ setup_dir_var
7
+ end
8
+
9
+ def teardown
10
+ File.delete(@xlsx) if File.exist?(@xlsx)
11
+ end
12
+
13
+ def test_chart_points02
14
+ @xlsx = 'chart_points02.xlsx'
15
+ workbook = WriteXLSX.new(@xlsx)
16
+ worksheet = workbook.add_worksheet
17
+ chart = workbook.add_chart(:type => 'pie', :embedded => 1)
18
+
19
+ data = [
20
+ [2, 5, 4, 1, 7, 4]
21
+ ]
22
+
23
+ worksheet.write('A1', data)
24
+
25
+ chart.add_series(
26
+ :values => '=Sheet1!$A$1:$A$6',
27
+ :points => [
28
+ nil,
29
+ { :border => { :color => 'red', :dash_type => 'square_dot' } },
30
+ nil,
31
+ { :fill => { :color => 'yellow' } }
32
+ ]
33
+ )
34
+
35
+ worksheet.insert_chart('E9', chart)
36
+
37
+ workbook.close
38
+ compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
39
+ end
40
+ end
@@ -0,0 +1,42 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'helper'
3
+
4
+ class TestRegressionChartPoints03 < Test::Unit::TestCase
5
+ def setup
6
+ setup_dir_var
7
+ end
8
+
9
+ def teardown
10
+ File.delete(@xlsx) if File.exist?(@xlsx)
11
+ end
12
+
13
+ def test_chart_points03
14
+ @xlsx = 'chart_points03.xlsx'
15
+ workbook = WriteXLSX.new(@xlsx)
16
+ worksheet = workbook.add_worksheet
17
+ chart = workbook.add_chart(:type => 'pie', :embedded => 1)
18
+
19
+ workbook.set_custom_color(40, 0xCC, 0x00, 0x00)
20
+ workbook.set_custom_color(41, 0x99, 0x00, 0x00)
21
+
22
+ data = [
23
+ [2, 5, 4]
24
+ ]
25
+
26
+ worksheet.write('A1', data)
27
+
28
+ chart.add_series(
29
+ :values => '=Sheet1!$A$1:$A$3',
30
+ :points => [
31
+ { :fill => { :color => '#FF0000' } },
32
+ { :fill => { :color => '#CC0000' } },
33
+ { :fill => { :color => '#990000' } }
34
+ ]
35
+ )
36
+
37
+ worksheet.insert_chart('E9', chart)
38
+
39
+ workbook.close
40
+ compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
41
+ end
42
+ end
@@ -0,0 +1,52 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'helper'
3
+
4
+ class TestRegressionChartPoints04 < Test::Unit::TestCase
5
+ def setup
6
+ setup_dir_var
7
+ end
8
+
9
+ def teardown
10
+ File.delete(@xlsx) if File.exist?(@xlsx)
11
+ end
12
+
13
+ def test_chart_points04
14
+ @xlsx = 'chart_points04.xlsx'
15
+ workbook = WriteXLSX.new(@xlsx)
16
+ worksheet = workbook.add_worksheet
17
+ chart = workbook.add_chart(:type => 'scatter', :embedded => 1)
18
+
19
+ # For testing, copy the randomly generated axis ids in the target xlsx file.
20
+ chart.instance_variable_set("@axis_ids", [48542464, 46807296])
21
+
22
+ data = [
23
+ [1, 2, 3, 4, 5],
24
+ [2, 4, 6, 8, 10],
25
+ [3, 6, 9, 12, 15]
26
+ ]
27
+
28
+ worksheet.write('A1', data)
29
+
30
+ chart.add_series(
31
+ :categories => '=Sheet1!$A$1:$A$5',
32
+ :values => '=Sheet1!$B$1:$B$5',
33
+ :points => [
34
+ { :fill => { :color => 'red' } },
35
+ { :fill => { :color => 'yellow' } }
36
+ ]
37
+ )
38
+ chart.add_series(
39
+ :categories => '=Sheet1!$A$1:$A$5',
40
+ :values => '=Sheet1!$C$1:$C$5',
41
+ :points => [
42
+ nil, nil,
43
+ { :fill => { :color => 'yellow' } }
44
+ ]
45
+ )
46
+
47
+ worksheet.insert_chart('E9', chart)
48
+
49
+ workbook.close
50
+ compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
51
+ end
52
+ end
@@ -0,0 +1,49 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'helper'
3
+
4
+ class TestRegressionChartPoints05 < Test::Unit::TestCase
5
+ def setup
6
+ setup_dir_var
7
+ end
8
+
9
+ def teardown
10
+ File.delete(@xlsx) if File.exist?(@xlsx)
11
+ end
12
+
13
+ def test_chart_points05
14
+ @xlsx = 'chart_points05.xlsx'
15
+ workbook = WriteXLSX.new(@xlsx)
16
+ worksheet = workbook.add_worksheet
17
+ chart = workbook.add_chart(:type => 'line', :embedded => 1)
18
+
19
+ # For testing, copy the randomly generated axis ids in the target xlsx file.
20
+ chart.instance_variable_set("@axis_ids", [45471616, 46804992])
21
+
22
+ data = [
23
+ [1, 2, 3, 4, 5],
24
+ [2, 4, 6, 8, 10],
25
+ [3, 6, 9, 12, 15]
26
+ ]
27
+
28
+ worksheet.write('A1', data)
29
+
30
+ chart.add_series(
31
+ :categories => '=Sheet1!$A$1:$A$5',
32
+ :values => '=Sheet1!$B$1:$B$5',
33
+ :marker => { :type => 'automatic' },
34
+ :points => [
35
+ { :fill => { :color => 'red' } }
36
+ ]
37
+ )
38
+ chart.add_series(
39
+ :categories => '=Sheet1!$A$1:$A$5',
40
+ :values => '=Sheet1!$C$1:$C$5',
41
+ :marker => { :type => 'automatic' }
42
+ )
43
+
44
+ worksheet.insert_chart('E9', chart)
45
+
46
+ workbook.close
47
+ compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
48
+ end
49
+ end