write_xlsx 0.87.0 → 0.88.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.
- checksums.yaml +4 -4
- data/Changes +6 -0
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/lib/write_xlsx/chart.rb +40 -5
- data/lib/write_xlsx/chart/axis.rb +30 -5
- data/lib/write_xlsx/version.rb +1 -1
- data/test/regression/test_chart_axis41.rb +48 -0
- data/test/regression/test_chart_format21.rb +47 -0
- data/test/regression/test_chart_format22.rb +47 -0
- data/test/regression/test_chart_format23.rb +47 -0
- data/test/regression/test_chart_format24.rb +52 -0
- data/test/regression/test_chart_format25.rb +46 -0
- data/test/regression/test_chart_gridlines04.rb +4 -3
- data/test/regression/test_chart_gridlines08.rb +8 -11
- data/test/regression/xlsx_files/chart_axis41.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format21.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format22.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format23.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format24.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format25.xlsx +0 -0
- metadata +25 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 994776679641b1907ecab841ff3f708bdf82e7db2347b12a7b3e06c3cf3de218
|
4
|
+
data.tar.gz: 47fefd5324ac9fc71d40b4fcdcd59c2679098c04ff793d4a96c0e9988e7170cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 845c34594fea0e22e12663a4bc2912e48eef99de5685573d53c9ba74a89709d5a2ab25efd6eb76f799e1fd4b9913f1fe766d2010352058725389ef119e823c4e
|
7
|
+
data.tar.gz: e98541a0595e76f391a4dcd38f36b6f754cec385d6310fc169e088bd2f08b38cd4d0d10eebe1f44fd7bed2458bafc2f56fa7994d5bbe8982dc740f0b2ed7be0d
|
data/Changes
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
gem to create a new file in the Excel 2007+ XLSX format, and you can use the
|
7
7
|
same interface as writeexcel gem. write_xlsx is converted from Perl's module
|
8
|
-
[Excel::Writer::XLSX-0.
|
8
|
+
[Excel::Writer::XLSX-0.88](https://github.com/jmcnamara/excel-writer-xlsx) .
|
9
9
|
|
10
10
|
## Description
|
11
11
|
|
data/lib/write_xlsx/chart.rb
CHANGED
@@ -1285,6 +1285,9 @@ def write_cat_axis(params) # :nodoc:
|
|
1285
1285
|
# Write the c:majorTickMark element.
|
1286
1286
|
write_major_tick_mark(x_axis.major_tick_mark)
|
1287
1287
|
|
1288
|
+
# Write the c:minorTickMark element.
|
1289
|
+
write_minor_tick_mark(x_axis.minor_tick_mark)
|
1290
|
+
|
1288
1291
|
# Write the c:tickLblPos element.
|
1289
1292
|
write_tick_label_pos(x_axis.label_position)
|
1290
1293
|
|
@@ -1359,6 +1362,9 @@ def write_val_axis_base(x_axis, y_axis, axis_ids_0, axis_ids_1, position) # :no
|
|
1359
1362
|
# Write the c:majorTickMark element.
|
1360
1363
|
write_major_tick_mark(y_axis.major_tick_mark)
|
1361
1364
|
|
1365
|
+
# Write the c:minorTickMark element.
|
1366
|
+
write_minor_tick_mark(y_axis.minor_tick_mark)
|
1367
|
+
|
1362
1368
|
# Write the c:tickLblPos element.
|
1363
1369
|
write_tick_label_pos(y_axis.label_position)
|
1364
1370
|
|
@@ -1581,6 +1587,15 @@ def write_major_tick_mark(val)
|
|
1581
1587
|
@writer.empty_tag('c:majorTickMark', [ ['val', val] ])
|
1582
1588
|
end
|
1583
1589
|
|
1590
|
+
#
|
1591
|
+
# Write the <c:minorTickMark> element.
|
1592
|
+
#
|
1593
|
+
def write_minor_tick_mark(val)
|
1594
|
+
return unless ptrue?(val)
|
1595
|
+
|
1596
|
+
@writer.empty_tag('c:minorTickMark', [ ['val', val] ])
|
1597
|
+
end
|
1598
|
+
|
1584
1599
|
#
|
1585
1600
|
# Write the <c:tickLblPos> element.
|
1586
1601
|
#
|
@@ -2187,18 +2202,38 @@ def write_a_no_fill # :nodoc:
|
|
2187
2202
|
#
|
2188
2203
|
# Write the <a:solidFill> element.
|
2189
2204
|
#
|
2190
|
-
def write_a_solid_fill(
|
2205
|
+
def write_a_solid_fill(fill) # :nodoc:
|
2191
2206
|
@writer.tag_elements('a:solidFill') do
|
2192
|
-
|
2193
|
-
|
2207
|
+
if fill[:color]
|
2208
|
+
# Write the a:srgbClr element.
|
2209
|
+
write_a_srgb_clr(color(fill[:color]), fill[:transparency])
|
2210
|
+
end
|
2194
2211
|
end
|
2195
2212
|
end
|
2196
2213
|
|
2197
2214
|
#
|
2198
2215
|
# Write the <a:srgbClr> element.
|
2199
2216
|
#
|
2200
|
-
def write_a_srgb_clr(
|
2201
|
-
|
2217
|
+
def write_a_srgb_clr(color, transparency = nil) # :nodoc:
|
2218
|
+
tag = 'a:srgbClr'
|
2219
|
+
attributes = [ ['val', color] ]
|
2220
|
+
|
2221
|
+
if ptrue?(transparency)
|
2222
|
+
@writer.tag_elements(tag, attributes) do
|
2223
|
+
write_a_alpha(transparency)
|
2224
|
+
end
|
2225
|
+
else
|
2226
|
+
@writer.empty_tag(tag, attributes)
|
2227
|
+
end
|
2228
|
+
end
|
2229
|
+
|
2230
|
+
#
|
2231
|
+
# Write the <a:alpha> element.
|
2232
|
+
#
|
2233
|
+
def write_a_alpha(val)
|
2234
|
+
val = (100 - val.to_i) * 1000
|
2235
|
+
|
2236
|
+
@writer.empty_tag('a:alpha', [ ['val', val] ])
|
2202
2237
|
end
|
2203
2238
|
|
2204
2239
|
#
|
@@ -9,7 +9,8 @@ class Axis < Caption
|
|
9
9
|
include Writexlsx::Utility
|
10
10
|
|
11
11
|
attr_accessor :defaults
|
12
|
-
attr_accessor :min, :max, :num_format, :position
|
12
|
+
attr_accessor :min, :max, :num_format, :position
|
13
|
+
attr_accessor :major_tick_mark, :minor_tick_mark
|
13
14
|
attr_reader :minor_unit, :major_unit, :minor_unit_type, :major_unit_type
|
14
15
|
attr_reader :display_units_visible, :display_units
|
15
16
|
attr_reader :log_base, :crossing, :position_axis, :label_position, :visible
|
@@ -27,11 +28,11 @@ def merge_with_hash(params) # :nodoc:
|
|
27
28
|
:reverse, :min, :max, :minor_unit, :major_unit, :minor_unit_type,
|
28
29
|
:major_unit_type, :log_base, :crossing, :position_axis,
|
29
30
|
:label_position, :num_format, :num_format_linked, :interval_unit,
|
30
|
-
:interval_tick, :
|
31
|
+
:interval_tick, :line, :fill
|
31
32
|
].each { |val| instance_variable_set("@#{val}", args[val]) }
|
32
|
-
@visible = args[:visible] || 1
|
33
|
-
|
34
33
|
set_major_minor_gridlines(args)
|
34
|
+
|
35
|
+
@visible = args[:visible] || 1
|
35
36
|
set_display_units(args)
|
36
37
|
set_display_units_visible(args)
|
37
38
|
set_position(args)
|
@@ -44,6 +45,10 @@ def merge_with_hash(params) # :nodoc:
|
|
44
45
|
@chart.date_category = false
|
45
46
|
@text_axis = true
|
46
47
|
end
|
48
|
+
|
49
|
+
# Set the tick marker types.
|
50
|
+
@major_tick_mark = get_tick_type(params[:major_tick_mark])
|
51
|
+
@minor_tick_mark = get_tick_type(params[:minor_tick_mark])
|
47
52
|
end
|
48
53
|
|
49
54
|
#
|
@@ -126,6 +131,26 @@ def get_display_units(display_units)
|
|
126
131
|
end
|
127
132
|
end
|
128
133
|
|
134
|
+
#
|
135
|
+
# Convert user tick types to internal units.
|
136
|
+
#
|
137
|
+
def get_tick_type(tick_type)
|
138
|
+
return if !ptrue?(tick_type)
|
139
|
+
|
140
|
+
types = {
|
141
|
+
'outside' => 'out',
|
142
|
+
'inside' => 'in',
|
143
|
+
'none' => 'none',
|
144
|
+
'cross' => 'cross'
|
145
|
+
}
|
146
|
+
|
147
|
+
if(types[tick_type])
|
148
|
+
return types[tick_type]
|
149
|
+
else
|
150
|
+
raise "Unknown tick_type type '#{tick_type}'\n"
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
129
154
|
def set_display_units(args)
|
130
155
|
@display_units = get_display_units(args[:display_units])
|
131
156
|
end
|
@@ -134,7 +159,7 @@ def set_display_units_visible(args)
|
|
134
159
|
if args[:display_units_visible]
|
135
160
|
@display_units_visible = args[:display_units_visible]
|
136
161
|
else
|
137
|
-
@display_units_visible = 1
|
162
|
+
@display_units_visible = 1
|
138
163
|
end
|
139
164
|
end
|
140
165
|
|
data/lib/write_xlsx/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
WriteXLSX_VERSION = "0.
|
1
|
+
WriteXLSX_VERSION = "0.88.0"
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionChartAxis41 < Minitest::Test
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
@tempfile.close(true)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_chart_axis41
|
14
|
+
@xlsx = 'chart_axis41.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@io)
|
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, [108321024, 108328448])
|
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(:values => '=Sheet1!$A$1:$A$5')
|
31
|
+
chart.add_series(:values => '=Sheet1!$B$1:$B$5')
|
32
|
+
chart.add_series(:values => '=Sheet1!$C$1:$C$5')
|
33
|
+
|
34
|
+
chart.set_x_axis(
|
35
|
+
:major_tick_mark => 'none',
|
36
|
+
:minor_tick_mark => 'inside'
|
37
|
+
)
|
38
|
+
chart.set_y_axis(:minor_tick_mark => 'cross')
|
39
|
+
|
40
|
+
worksheet.insert_chart('E9', chart)
|
41
|
+
|
42
|
+
workbook.close
|
43
|
+
compare_for_regression(
|
44
|
+
nil,
|
45
|
+
{ 'xl/charts/chart1.xml' => ['<c:pageMargins'] }
|
46
|
+
)
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionChartFormat21 < Minitest::Test
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
@tempfile.close(true)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_chart_format21
|
14
|
+
@xlsx = 'chart_format21.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@io)
|
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, [115390336, 115417856])
|
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
|
+
:border => { :color => 'yellow' },
|
34
|
+
:fill => { :color => 'red', :transparency => 24 }
|
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_for_regression
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionChartFormat22 < Minitest::Test
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
@tempfile.close(true)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_chart_format22
|
14
|
+
@xlsx = 'chart_format22.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@io)
|
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, [108321024, 108328448])
|
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
|
+
:border => { :color => 'yellow' },
|
34
|
+
:fill => { :color => 'red', :transparency => 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_for_regression
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionChartFormat23 < Minitest::Test
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
@tempfile.close(true)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_chart_format23
|
14
|
+
@xlsx = 'chart_format23.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@io)
|
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, [108321024, 108328448])
|
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
|
+
:border => { :color => 'yellow' },
|
34
|
+
:fill => { :color => 'red', :transparency => 100 }
|
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_for_regression
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionChartFormat24 < Minitest::Test
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
@tempfile.close(true)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_chart_format24
|
14
|
+
@xlsx = 'chart_format24.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@io)
|
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, [115374720, 115389568])
|
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
|
+
)
|
34
|
+
|
35
|
+
chart.add_series(
|
36
|
+
:categories => '=Sheet1!$A$1:$A$5',
|
37
|
+
:values => '=Sheet1!$C$1:$C$5'
|
38
|
+
)
|
39
|
+
|
40
|
+
chart.set_chartarea(
|
41
|
+
:fill => { :color => 'yellow', :transparency => 75 }
|
42
|
+
)
|
43
|
+
chart.set_plotarea(
|
44
|
+
:fill => { :color => 'red', :transparency => 25 }
|
45
|
+
)
|
46
|
+
|
47
|
+
worksheet.insert_chart('E9', chart)
|
48
|
+
|
49
|
+
workbook.close
|
50
|
+
compare_for_regression
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'helper'
|
3
|
+
|
4
|
+
class TestRegressionChartFormat25 < Minitest::Test
|
5
|
+
def setup
|
6
|
+
setup_dir_var
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
@tempfile.close(true)
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_chart_format25
|
14
|
+
@xlsx = 'chart_format25.xlsx'
|
15
|
+
workbook = WriteXLSX.new(@io)
|
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, [108178048, 108319488])
|
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
|
+
:border => { :color => 'red', :transparency => 50 }
|
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_for_regression
|
45
|
+
end
|
46
|
+
end
|
@@ -31,9 +31,10 @@ def test_chart_gridlines04
|
|
31
31
|
chart.add_series(:values => '=Sheet1!$B$1:$B$5')
|
32
32
|
chart.add_series(:values => '=Sheet1!$C$1:$C$5')
|
33
33
|
|
34
|
-
chart.set_y_axis(
|
35
|
-
|
36
|
-
|
34
|
+
chart.set_y_axis(
|
35
|
+
:major_gridlines => { :visible => 0 },
|
36
|
+
:major_tick_mark => 'cross'
|
37
|
+
)
|
37
38
|
|
38
39
|
worksheet.insert_chart('E9', chart)
|
39
40
|
|
@@ -20,11 +20,10 @@ def test_chart_gridlines08
|
|
20
20
|
chart.instance_variable_set(:@axis_ids, [60019072, 60020608])
|
21
21
|
|
22
22
|
data = [
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
[ 1, 2, 3, 4, 5 ],
|
24
|
+
[ 2, 4, 6, 8, 10 ],
|
25
|
+
[ 3, 6, 9, 12, 15 ],
|
26
|
+
]
|
28
27
|
|
29
28
|
worksheet.write('A1', data)
|
30
29
|
|
@@ -33,12 +32,10 @@ def test_chart_gridlines08
|
|
33
32
|
chart.add_series(:values => '=Sheet1!$C$1:$C$5')
|
34
33
|
|
35
34
|
chart.set_y_axis(
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
chart.instance_variable_get(:@y_axis).
|
41
|
-
instance_variable_set(:@major_tick_mark, 'cross')
|
35
|
+
:major_gridlines => { :visible => 1 },
|
36
|
+
:minor_gridlines => { :visible => 1 },
|
37
|
+
:major_tick_mark => 'cross'
|
38
|
+
)
|
42
39
|
|
43
40
|
worksheet.insert_chart('E9', chart)
|
44
41
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: write_xlsx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.88.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hideo NAKAMURA
|
@@ -466,6 +466,7 @@ files:
|
|
466
466
|
- test/regression/test_chart_axis38.rb
|
467
467
|
- test/regression/test_chart_axis39.rb
|
468
468
|
- test/regression/test_chart_axis40.rb
|
469
|
+
- test/regression/test_chart_axis41.rb
|
469
470
|
- test/regression/test_chart_bar01.rb
|
470
471
|
- test/regression/test_chart_bar02.rb
|
471
472
|
- test/regression/test_chart_bar03.rb
|
@@ -617,6 +618,11 @@ files:
|
|
617
618
|
- test/regression/test_chart_format18.rb
|
618
619
|
- test/regression/test_chart_format19.rb
|
619
620
|
- test/regression/test_chart_format20.rb
|
621
|
+
- test/regression/test_chart_format21.rb
|
622
|
+
- test/regression/test_chart_format22.rb
|
623
|
+
- test/regression/test_chart_format23.rb
|
624
|
+
- test/regression/test_chart_format24.rb
|
625
|
+
- test/regression/test_chart_format25.rb
|
620
626
|
- test/regression/test_chart_gap01.rb
|
621
627
|
- test/regression/test_chart_gap02.rb
|
622
628
|
- test/regression/test_chart_gap03.rb
|
@@ -1084,6 +1090,7 @@ files:
|
|
1084
1090
|
- test/regression/xlsx_files/chart_axis38.xlsx
|
1085
1091
|
- test/regression/xlsx_files/chart_axis39.xlsx
|
1086
1092
|
- test/regression/xlsx_files/chart_axis40.xlsx
|
1093
|
+
- test/regression/xlsx_files/chart_axis41.xlsx
|
1087
1094
|
- test/regression/xlsx_files/chart_bar01.xlsx
|
1088
1095
|
- test/regression/xlsx_files/chart_bar02.xlsx
|
1089
1096
|
- test/regression/xlsx_files/chart_bar03.xlsx
|
@@ -1234,6 +1241,11 @@ files:
|
|
1234
1241
|
- test/regression/xlsx_files/chart_format18.xlsx
|
1235
1242
|
- test/regression/xlsx_files/chart_format19.xlsx
|
1236
1243
|
- test/regression/xlsx_files/chart_format20.xlsx
|
1244
|
+
- test/regression/xlsx_files/chart_format21.xlsx
|
1245
|
+
- test/regression/xlsx_files/chart_format22.xlsx
|
1246
|
+
- test/regression/xlsx_files/chart_format23.xlsx
|
1247
|
+
- test/regression/xlsx_files/chart_format24.xlsx
|
1248
|
+
- test/regression/xlsx_files/chart_format25.xlsx
|
1237
1249
|
- test/regression/xlsx_files/chart_gap01.xlsx
|
1238
1250
|
- test/regression/xlsx_files/chart_gap02.xlsx
|
1239
1251
|
- test/regression/xlsx_files/chart_gap03.xlsx
|
@@ -2032,6 +2044,7 @@ test_files:
|
|
2032
2044
|
- test/regression/test_chart_axis38.rb
|
2033
2045
|
- test/regression/test_chart_axis39.rb
|
2034
2046
|
- test/regression/test_chart_axis40.rb
|
2047
|
+
- test/regression/test_chart_axis41.rb
|
2035
2048
|
- test/regression/test_chart_bar01.rb
|
2036
2049
|
- test/regression/test_chart_bar02.rb
|
2037
2050
|
- test/regression/test_chart_bar03.rb
|
@@ -2183,6 +2196,11 @@ test_files:
|
|
2183
2196
|
- test/regression/test_chart_format18.rb
|
2184
2197
|
- test/regression/test_chart_format19.rb
|
2185
2198
|
- test/regression/test_chart_format20.rb
|
2199
|
+
- test/regression/test_chart_format21.rb
|
2200
|
+
- test/regression/test_chart_format22.rb
|
2201
|
+
- test/regression/test_chart_format23.rb
|
2202
|
+
- test/regression/test_chart_format24.rb
|
2203
|
+
- test/regression/test_chart_format25.rb
|
2186
2204
|
- test/regression/test_chart_gap01.rb
|
2187
2205
|
- test/regression/test_chart_gap02.rb
|
2188
2206
|
- test/regression/test_chart_gap03.rb
|
@@ -2650,6 +2668,7 @@ test_files:
|
|
2650
2668
|
- test/regression/xlsx_files/chart_axis38.xlsx
|
2651
2669
|
- test/regression/xlsx_files/chart_axis39.xlsx
|
2652
2670
|
- test/regression/xlsx_files/chart_axis40.xlsx
|
2671
|
+
- test/regression/xlsx_files/chart_axis41.xlsx
|
2653
2672
|
- test/regression/xlsx_files/chart_bar01.xlsx
|
2654
2673
|
- test/regression/xlsx_files/chart_bar02.xlsx
|
2655
2674
|
- test/regression/xlsx_files/chart_bar03.xlsx
|
@@ -2800,6 +2819,11 @@ test_files:
|
|
2800
2819
|
- test/regression/xlsx_files/chart_format18.xlsx
|
2801
2820
|
- test/regression/xlsx_files/chart_format19.xlsx
|
2802
2821
|
- test/regression/xlsx_files/chart_format20.xlsx
|
2822
|
+
- test/regression/xlsx_files/chart_format21.xlsx
|
2823
|
+
- test/regression/xlsx_files/chart_format22.xlsx
|
2824
|
+
- test/regression/xlsx_files/chart_format23.xlsx
|
2825
|
+
- test/regression/xlsx_files/chart_format24.xlsx
|
2826
|
+
- test/regression/xlsx_files/chart_format25.xlsx
|
2803
2827
|
- test/regression/xlsx_files/chart_gap01.xlsx
|
2804
2828
|
- test/regression/xlsx_files/chart_gap02.xlsx
|
2805
2829
|
- test/regression/xlsx_files/chart_gap03.xlsx
|