caxlsx 4.1.0 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -12
  3. data/README.md +1 -1
  4. data/lib/axlsx/content_type/abstract_content_type.rb +2 -2
  5. data/lib/axlsx/content_type/content_type.rb +3 -3
  6. data/lib/axlsx/drawing/area_chart.rb +3 -3
  7. data/lib/axlsx/drawing/area_series.rb +2 -2
  8. data/lib/axlsx/drawing/ax_data_source.rb +1 -1
  9. data/lib/axlsx/drawing/axes.rb +1 -1
  10. data/lib/axlsx/drawing/axis.rb +1 -1
  11. data/lib/axlsx/drawing/bar_3D_chart.rb +3 -3
  12. data/lib/axlsx/drawing/bar_chart.rb +3 -3
  13. data/lib/axlsx/drawing/bar_series.rb +2 -2
  14. data/lib/axlsx/drawing/bubble_chart.rb +2 -2
  15. data/lib/axlsx/drawing/bubble_series.rb +2 -2
  16. data/lib/axlsx/drawing/cat_axis.rb +3 -3
  17. data/lib/axlsx/drawing/d_lbls.rb +4 -4
  18. data/lib/axlsx/drawing/drawing.rb +50 -50
  19. data/lib/axlsx/drawing/hyperlink.rb +1 -1
  20. data/lib/axlsx/drawing/line_3D_chart.rb +3 -3
  21. data/lib/axlsx/drawing/line_chart.rb +3 -3
  22. data/lib/axlsx/drawing/line_series.rb +2 -2
  23. data/lib/axlsx/drawing/num_val.rb +1 -1
  24. data/lib/axlsx/drawing/pic.rb +4 -4
  25. data/lib/axlsx/drawing/pie_3D_chart.rb +2 -2
  26. data/lib/axlsx/drawing/pie_chart.rb +2 -2
  27. data/lib/axlsx/drawing/pie_series.rb +2 -2
  28. data/lib/axlsx/drawing/scatter_chart.rb +2 -2
  29. data/lib/axlsx/drawing/scatter_series.rb +2 -2
  30. data/lib/axlsx/drawing/ser_axis.rb +3 -3
  31. data/lib/axlsx/drawing/two_cell_anchor.rb +1 -1
  32. data/lib/axlsx/drawing/val_axis.rb +2 -2
  33. data/lib/axlsx/package.rb +7 -10
  34. data/lib/axlsx/rels/relationship.rb +2 -2
  35. data/lib/axlsx/rels/relationships.rb +2 -2
  36. data/lib/axlsx/stylesheet/border_pr.rb +1 -1
  37. data/lib/axlsx/stylesheet/cell_alignment.rb +1 -1
  38. data/lib/axlsx/stylesheet/cell_style.rb +1 -1
  39. data/lib/axlsx/stylesheet/color.rb +2 -2
  40. data/lib/axlsx/stylesheet/font.rb +1 -1
  41. data/lib/axlsx/stylesheet/gradient_fill.rb +1 -1
  42. data/lib/axlsx/stylesheet/styles.rb +27 -31
  43. data/lib/axlsx/stylesheet/xf.rb +1 -1
  44. data/lib/axlsx/util/accessors.rb +1 -1
  45. data/lib/axlsx/util/constants.rb +2 -2
  46. data/lib/axlsx/util/serialized_attributes.rb +2 -2
  47. data/lib/axlsx/util/simple_typed_list.rb +25 -12
  48. data/lib/axlsx/util/storage.rb +3 -3
  49. data/lib/axlsx/util/validators.rb +1 -1
  50. data/lib/axlsx/version.rb +1 -1
  51. data/lib/axlsx/workbook/defined_name.rb +1 -1
  52. data/lib/axlsx/workbook/shared_strings_table.rb +3 -3
  53. data/lib/axlsx/workbook/workbook.rb +61 -61
  54. data/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb +4 -4
  55. data/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb +1 -1
  56. data/lib/axlsx/workbook/worksheet/auto_filter/filters.rb +3 -3
  57. data/lib/axlsx/workbook/worksheet/auto_filter/sort_condition.rb +1 -1
  58. data/lib/axlsx/workbook/worksheet/auto_filter/sort_state.rb +2 -2
  59. data/lib/axlsx/workbook/worksheet/border_creator.rb +4 -4
  60. data/lib/axlsx/workbook/worksheet/cell.rb +7 -7
  61. data/lib/axlsx/workbook/worksheet/cell_serializer.rb +1 -1
  62. data/lib/axlsx/workbook/worksheet/col.rb +22 -9
  63. data/lib/axlsx/workbook/worksheet/comment.rb +2 -2
  64. data/lib/axlsx/workbook/worksheet/comments.rb +1 -1
  65. data/lib/axlsx/workbook/worksheet/conditional_formatting.rb +1 -1
  66. data/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb +1 -1
  67. data/lib/axlsx/workbook/worksheet/conditional_formattings.rb +2 -2
  68. data/lib/axlsx/workbook/worksheet/data_validation.rb +1 -1
  69. data/lib/axlsx/workbook/worksheet/data_validations.rb +2 -2
  70. data/lib/axlsx/workbook/worksheet/date_time_converter.rb +2 -2
  71. data/lib/axlsx/workbook/worksheet/dimension.rb +1 -1
  72. data/lib/axlsx/workbook/worksheet/icon_set.rb +1 -1
  73. data/lib/axlsx/workbook/worksheet/outline_pr.rb +1 -1
  74. data/lib/axlsx/workbook/worksheet/page_setup.rb +2 -2
  75. data/lib/axlsx/workbook/worksheet/pivot_table.rb +29 -5
  76. data/lib/axlsx/workbook/worksheet/rich_text_run.rb +1 -1
  77. data/lib/axlsx/workbook/worksheet/sheet_pr.rb +1 -1
  78. data/lib/axlsx/workbook/worksheet/table_style_info.rb +1 -1
  79. data/lib/axlsx/workbook/worksheet/worksheet.rb +10 -12
  80. data/lib/axlsx/workbook/worksheet/worksheet_comments.rb +3 -3
  81. data/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb +1 -1
  82. data/lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb +1 -1
  83. data/lib/axlsx.rb +44 -30
  84. data/lib/caxlsx.rb +1 -1
  85. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85f2cf4381c18d95630e069c270ec13a6f6e447efd10e20a8b7938c2cc453d51
4
- data.tar.gz: 547ce4f04e33bcccd8ce2728a110b1caab8e49e0cd7a1f5ea06467a74b027ca0
3
+ metadata.gz: b15095b3a73b9f2e11f59bb674964ce206e11e699937e109831d9422fd26750f
4
+ data.tar.gz: e20e938a224f9da043fd4c7cfcd2c35af03a5bb037fc9164a59c44c110e3e248
5
5
  SHA512:
6
- metadata.gz: 24b6d6be362e2dceb0a74ff3f891b21e2100af09eeae253a6bff1e86edf6d49a80fac9fa7747dadaf639f97bae121ecafecd3a1c5ac0022208efdb7fa08a056b
7
- data.tar.gz: d1f7335c8199ae611bf4fdf49bd85aeae3936e6afc596193037dd6a7aeb7dbcbf72c9fb38b4f59bb6b6c2d868bb253e3e98b33a9fbd48bda75940bc5f65bf8ba
6
+ metadata.gz: 8cdd4b3843dd886f864212ecb4a40f528543d4fd1c682079c5497d3c40ea684bc64d214db4a974d3cea2071663bc3cfbd501543d6868077d9b369340c751bd90
7
+ data.tar.gz: 520da353dfbc0022ac6a3aae5006e669fd6f291aad95797b2ff24a2cf1634de4f66c52616efa2af5bfbd7524cf91393d56a6e6a433131f988402e277cacbaca5
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@ CHANGELOG
2
2
  ---------
3
3
  - **Unreleased**
4
4
 
5
+ - **December.15.24**: 4.2.0
6
+ - [PR #359](https://github.com/caxlsx/caxlsx/pull/359) Add `PivotTable#grand_totals` option to remove grand totals row/col
7
+ - [PR #362](https://github.com/caxlsx/caxlsx/pull/362) Use widest width even if provided as fixed value
8
+ - [PR #398](https://github.com/caxlsx/caxlsx/pull/398) Add `Axlsx#uri_parser` method for RFC2396 compatibility
9
+ - [PR #390](https://github.com/caxlsx/caxlsx/pull/390) Change ISO_8601_REGEX to match how Excel handles ISO 8601 formats
10
+ - [PR #402](https://github.com/caxlsx/caxlsx/pull/402) Refactor `Axlsx::SimpleTypedList` to better match `Array` API
11
+ - [PR #409](https://github.com/caxlsx/caxlsx/pull/409) Prefer `require_relative` for internal requires
12
+ - Minor performance improvements ([PR #406](https://github.com/caxlsx/caxlsx/pull/406), [PR #407](https://github.com/caxlsx/caxlsx/pull/407), [PR #408](https://github.com/caxlsx/caxlsx/pull/408))
13
+
5
14
  - **February.26.24**: 4.1.0
6
15
  - [PR #316](https://github.com/caxlsx/caxlsx/pull/316) Prevent camelization of hyperlink locations
7
16
  - [PR #312](https://github.com/caxlsx/caxlsx/pull/312) Added 2D/flat PieChart drawing
@@ -31,7 +40,7 @@ CHANGELOG
31
40
  - [PR #186](https://github.com/caxlsx/caxlsx/pull/186) - `escape_formulas` should handle all [OWASP-designated formula prefixes](https://owasp.org/www-community/attacks/CSV_Injection).
32
41
  - Fix bug when calling `worksheet.add_border("A1:B2", nil)`
33
42
  - Change `BorderCreator#initialize` arguments handling
34
- - Fix `add_border` to work with singluar cell refs
43
+ - Fix `add_border` to work with singular cell refs
35
44
  - [PR #196](https://github.com/caxlsx/caxlsx/pull/196) - Fix tab color reassignment
36
45
  - Add support for remote image source in `Pic` using External Relationship (supported in Excel documents)
37
46
 
@@ -165,7 +174,7 @@ CHANGELOG
165
174
  and charts to the same worksheet drawing.
166
175
  - Added outline_level_rows and outline_level_columns to worksheet to simplify setting up outlining in the worksheet.
167
176
  - Added support for pivot tables
168
- - Added support for descrete border edge styles
177
+ - Added support for discrete border edge styles
169
178
  - Improved validation of sheet names
170
179
  - Added support for formula value caching so that iOS and OSX preview can show the proper values. See Cell.add_row and the formula_values option.
171
180
 
@@ -197,7 +206,7 @@ CHANGELOG
197
206
  from the initial master.
198
207
 
199
208
  - **September.8.12**: 1.2.3
200
- - enhance exponential float/bigdecimal values rendering as strings intead
209
+ - enhance exponential float/bigdecimal values rendering as strings instead
201
210
  of 'numbers' in excel.
202
211
  - added support for :none option on chart axis labels
203
212
  - added support for paper_size option on worksheet.page_setup
@@ -231,14 +240,14 @@ CHANGELOG
231
240
  - added in interop requirements so that charts are properly exported
232
241
  to PDF from Libra Office
233
242
  - various readability improvements and work standardizing attribute
234
- names to snake_case. Aliases are provided for backward compatiblity
243
+ names to snake_case. Aliases are provided for backward compatibility
235
244
 
236
245
  - **June.11.12**: 1.1.7
237
246
  - fix chart rendering issue when label offset is specified as a
238
247
  percentage in serialization and ensure that formula are not stored
239
248
  in value caches
240
249
  - fix bug that causes repair warnings when using a text only title reference.
241
- - Add title property to axis so you can lable the x/y/series axis for
250
+ - Add title property to axis so you can label the x/y/series axis for
242
251
  charts.
243
252
  - Add sheet views with panes
244
253
 
@@ -248,14 +257,14 @@ in value caches
248
257
  - added support for two cell anchors for images
249
258
  - test coverage now back up to 100%
250
259
  - bugfix for merge cell sorting algorithm
251
- - added fit_to method for page_setup to simplify managing witdh/height
260
+ - added fit_to method for page_setup to simplify managing width/height
252
261
  - added ph (phonetics) and s (style) attributes for row.
253
262
  - resolved all warnings generating from this gem.
254
263
  - improved comment relationship management for multiple comments
255
264
 
256
265
  - **May.13.12**: 1.1.5
257
266
  - MOAR print options! You can now specify paper size, orientation,
258
- fit to width, page margings and gridlines for printing.
267
+ fit to width, page margins and gridlines for printing.
259
268
  - Support for adding comments to your worksheets
260
269
  - bugfix for applying style to empty cells
261
270
  - bugfix for parsing formula with multiple '='
@@ -330,7 +339,7 @@ in value caches
330
339
 
331
340
  - **January.6.12**: 1.0.15
332
341
  https://github.com/randym/axlsx/compare/1.0.14...1.0.15
333
- - Bug fix add_style specified number formats must be explicity applied for libraOffice
342
+ - Bug fix add_style specified number formats must be explicitly applied for libraOffice
334
343
  - performance improvements from ochko when creating cells with options.
335
344
  - Bug fix setting types=>[:n] when adding a row incorrectly determines the cell type to be string as the value is null during creation.
336
345
  - Release in preparation for password protection merge
@@ -362,7 +371,7 @@ in value caches
362
371
  - **October.30.11**: 1.0.10
363
372
  - Updating gemspec to lower gem version requirements.
364
373
  - Added row.style assignation for updating the cell style for an entire row
365
- - Added col_style method to worksheet upate a the style for a column of cells
374
+ - Added col_style method to worksheet update a the style for a column of cells
366
375
  - Added cols for an easy reference to columns in a worksheet.
367
376
  - prep for pre release of acts_as_xlsx gem
368
377
  - added in travis.ci configuration and build status
@@ -377,14 +386,14 @@ in value caches
377
386
  - Added support for images (jpg, gif, png) in worksheets.
378
387
 
379
388
  - **October.23.11**: 1.0.7 released
380
- - Added support for 3D options when creating a new chart. This lets you set the persective, rotation and other 3D attributes when using worksheet.add_chart
389
+ - Added support for 3D options when creating a new chart. This lets you set the perspective, rotation and other 3D attributes when using worksheet.add_chart
381
390
  - Updated serialization write test to verify write permissions and warn if it cannot run the test due to permission restrcitions.
382
391
  - updated rake to include build, genoc and deploy tasks.
383
392
  - rebuilt documentation.
384
393
  - moved version constant to its own file
385
394
  - fixed bug in SerAxis that was requiring tickLblSkip and tickMarkSkip to be boolean. Should be unsigned int.
386
395
  - Review and improve docs
387
- - rebuild of anchor positioning to remove some spagetti code. Chart now supports a start_at and end_at method that accept an arrar for col/row positioning. See example6 for an example. You can still pass :start_at and :end_at options to worksheet.add_chart.
396
+ - rebuild of anchor positioning to remove some spaghetti code. Chart now supports a start_at and end_at method that accept an arrar for col/row positioning. See example6 for an example. You can still pass :start_at and :end_at options to worksheet.add_chart.
388
397
  - Refactored cat and val axis data to keep series serialization a bit more DRY
389
398
 
390
399
  - **October.22.11**: 1.0.6
@@ -404,7 +413,7 @@ in value caches
404
413
  - BugFix: shape attribute for bar chart is now properly serialized
405
414
  - BugFix: date1904 property now properly set for charts
406
415
  - Added style property to charts
407
- - Removed serialization write test as it most commonly fails when run from the gem's intalled directory
416
+ - Removed serialization write test as it most commonly fails when run from the gem's installed directory
408
417
 
409
418
  - **October.21.11**: 1.0.4
410
419
  - altered package to accept a filename string for serialization instead of a File object.
data/README.md CHANGED
@@ -107,7 +107,7 @@ Additional documentation is listed below:
107
107
  - [Style Reference](https://github.com/caxlsx/caxlsx/blob/master/docs/style_reference.md)
108
108
  - [Header and Footer Codes](https://github.com/caxlsx/caxlsx/blob/master/docs/header_and_footer_codes.md)
109
109
 
110
- ⚠ Please __do not create issues__ for questions regarding the usage of axlsx / caxlsx. Look through this README, the [examples](https://github.com/caxlsx/caxlsx/tree/master/examples/example.rb), and the [FAQ](https://github.com/caxlsx/caxlsx/wiki/FAQ), and also check [questions tagged `axlsx` on Stack Overflow](https://stackoverflow.com/questions/tagged/axlsx).
110
+ ⚠ Please __do not create issues__ for questions regarding the usage of axlsx / caxlsx. Look through this README, the [examples folder](https://github.com/caxlsx/caxlsx/tree/master/examples), and the [FAQ](https://github.com/caxlsx/caxlsx/wiki/FAQ), and also check [questions tagged `axlsx` on Stack Overflow](https://stackoverflow.com/questions/tagged/axlsx).
111
111
 
112
112
  Feel free to add your question (including an answer!) to the FAQ if you think it is of general interest.
113
113
 
@@ -24,11 +24,11 @@ module Axlsx
24
24
  end
25
25
  alias :ContentType= :content_type=
26
26
 
27
- # Serialize the contenty type to xml
27
+ # Serialize the content type to xml
28
28
  def to_xml_string(node_name = '', str = +'')
29
29
  str << '<' << node_name << ' '
30
30
  Axlsx.instance_values_for(self).each_with_index do |key_value, index|
31
- str << ' ' unless index.zero?
31
+ str << ' ' unless index == 0
32
32
  str << Axlsx.camel(key_value.first) << '="' << key_value.last.to_s << '"'
33
33
  end
34
34
  str << '/>'
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Axlsx
4
- require 'axlsx/content_type/abstract_content_type'
5
- require 'axlsx/content_type/default'
6
- require 'axlsx/content_type/override'
4
+ require_relative 'abstract_content_type'
5
+ require_relative 'default'
6
+ require_relative 'override'
7
7
 
8
8
  # ContentTypes used in the package. This is automatically managed by the package package.
9
9
  class ContentType < SimpleTypedList
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Axlsx
4
- # The AreaChart is a two dimentional line chart (who would have guessed?) that you can add to your worksheet.
4
+ # The AreaChart is a two dimensional line chart (who would have guessed?) that you can add to your worksheet.
5
5
  # @example Creating a chart
6
6
  # # This example creates a line in a single sheet.
7
7
  # require "rubygems" # if that is your preferred way to manage gems!
@@ -47,7 +47,7 @@ module Axlsx
47
47
  def initialize(frame, options = {})
48
48
  @vary_colors = false
49
49
  @grouping = :standard
50
- super(frame, options)
50
+ super
51
51
  @series_type = AreaSeries
52
52
  @d_lbls = nil
53
53
  end
@@ -75,7 +75,7 @@ module Axlsx
75
75
  # @param [String] str
76
76
  # @return [String]
77
77
  def to_xml_string(str = +'')
78
- super(str) do
78
+ super do
79
79
  str << "<c:" << node_name << ">"
80
80
  str << '<c:grouping val="' << grouping.to_s << '"/>'
81
81
  str << '<c:varyColors val="' << vary_colors.to_s << '"/>'
@@ -40,7 +40,7 @@ module Axlsx
40
40
  @marker_symbol = options[:marker_symbol] || :default
41
41
  @smooth = false
42
42
  @labels, @data = nil, nil
43
- super(chart, options)
43
+ super
44
44
  @labels = AxDataSource.new(data: options[:labels]) unless options[:labels].nil?
45
45
  @data = NumDataSource.new(options) unless options[:data].nil?
46
46
  end
@@ -72,7 +72,7 @@ module Axlsx
72
72
  # @param [String] str
73
73
  # @return [String]
74
74
  def to_xml_string(str = +'')
75
- super(str) do
75
+ super do
76
76
  if color
77
77
  str << '<c:spPr><a:solidFill>'
78
78
  str << '<a:srgbClr val="' << color << '"/>'
@@ -11,7 +11,7 @@ module Axlsx
11
11
  @tag_name = :cat
12
12
  @data_type = StrData
13
13
  @ref_tag_name = :strRef
14
- super(options)
14
+ super
15
15
  end
16
16
 
17
17
  # allowed element tag names for serialization
@@ -16,7 +16,7 @@ module Axlsx
16
16
  end
17
17
  end
18
18
 
19
- # [] provides assiciative access to a specic axis store in an axes
19
+ # [] provides associative access to a specific axis store in an axes
20
20
  # instance.
21
21
  # @return [Axis]
22
22
  def [](name)
@@ -84,7 +84,7 @@ module Axlsx
84
84
 
85
85
  # The color for this axis. This value is used when rendering the axis line in the chart.
86
86
  # colors should be in 6 character rbg format
87
- # @return [String] the rbg color assinged.
87
+ # @return [String] the rbg color assigned.
88
88
  # @see color
89
89
  def color=(color_rgb)
90
90
  @color = color_rgb
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Axlsx
4
- # The Bar3DChart is a three dimentional barchart (who would have guessed?) that you can add to your worksheet.
4
+ # The Bar3DChart is a three dimensional barchart (who would have guessed?) that you can add to your worksheet.
5
5
  # @see Worksheet#add_chart
6
6
  # @see Chart#add_series
7
7
  # @see Package#serialize
@@ -75,7 +75,7 @@ module Axlsx
75
75
  def initialize(frame, options = {})
76
76
  @vary_colors = true
77
77
  @gap_width, @gap_depth, @shape = nil, nil, nil
78
- super(frame, options)
78
+ super
79
79
  @series_type = BarSeries
80
80
  @view_3D = View3D.new({ r_ang_ax: 1 }.merge(options))
81
81
  @d_lbls = nil
@@ -121,7 +121,7 @@ module Axlsx
121
121
  # @param [String] str
122
122
  # @return [String]
123
123
  def to_xml_string(str = +'')
124
- super(str) do
124
+ super do
125
125
  str << '<c:bar3DChart>'
126
126
  str << '<c:barDir val="' << bar_dir.to_s << '"/>'
127
127
  str << '<c:grouping val="' << grouping.to_s << '"/>'
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Axlsx
4
- # The BarChart is a two dimentional barchart that you can add to your worksheet.
4
+ # The BarChart is a two dimensional barchart that you can add to your worksheet.
5
5
  # @see Worksheet#add_chart
6
6
  # @see Chart#add_series
7
7
  # @see Package#serialize
@@ -68,7 +68,7 @@ module Axlsx
68
68
  def initialize(frame, options = {})
69
69
  @vary_colors = true
70
70
  @gap_width, @overlap, @shape = nil, nil, nil
71
- super(frame, options)
71
+ super
72
72
  @series_type = BarSeries
73
73
  @d_lbls = nil
74
74
  end
@@ -111,7 +111,7 @@ module Axlsx
111
111
  # @param [String] str
112
112
  # @return [String]
113
113
  def to_xml_string(str = +'')
114
- super(str) do
114
+ super do
115
115
  str << '<c:barChart>'
116
116
  str << '<c:barDir val="' << bar_dir.to_s << '"/>'
117
117
  str << '<c:grouping val="' << grouping.to_s << '"/>'
@@ -37,7 +37,7 @@ module Axlsx
37
37
  def initialize(chart, options = {})
38
38
  @shape = :box
39
39
  @colors = []
40
- super(chart, options)
40
+ super
41
41
  self.labels = AxDataSource.new({ data: options[:labels] }) unless options[:labels].nil?
42
42
  self.data = NumDataSource.new(options) unless options[:data].nil?
43
43
  end
@@ -62,7 +62,7 @@ module Axlsx
62
62
  # @param [String] str
63
63
  # @return [String]
64
64
  def to_xml_string(str = +'')
65
- super(str) do
65
+ super do
66
66
  colors.each_with_index do |c, index|
67
67
  str << '<c:dPt>'
68
68
  str << '<c:idx val="' << index.to_s << '"/>'
@@ -26,7 +26,7 @@ module Axlsx
26
26
  def initialize(frame, options = {})
27
27
  @vary_colors = 0
28
28
 
29
- super(frame, options)
29
+ super
30
30
  @series_type = BubbleSeries
31
31
  @d_lbls = nil
32
32
  parse_options options
@@ -36,7 +36,7 @@ module Axlsx
36
36
  # @param [String] str
37
37
  # @return [String]
38
38
  def to_xml_string(str = +'')
39
- super(str) do
39
+ super do
40
40
  str << '<c:bubbleChart>'
41
41
  str << '<c:varyColors val="' << vary_colors.to_s << '"/>'
42
42
  @series.each { |ser| ser.to_xml_string(str) }
@@ -27,7 +27,7 @@ module Axlsx
27
27
  # Creates a new BubbleSeries
28
28
  def initialize(chart, options = {})
29
29
  @xData, @yData, @bubbleSize = nil
30
- super(chart, options)
30
+ super
31
31
  @xData = AxDataSource.new(tag_name: :xVal, data: options[:xData]) unless options[:xData].nil?
32
32
  @yData = NumDataSource.new({ tag_name: :yVal, data: options[:yData] }) unless options[:yData].nil?
33
33
  @bubbleSize = NumDataSource.new({ tag_name: :bubbleSize, data: options[:bubbleSize] }) unless options[:bubbleSize].nil?
@@ -42,7 +42,7 @@ module Axlsx
42
42
  # @param [String] str
43
43
  # @return [String]
44
44
  def to_xml_string(str = +'')
45
- super(str) do
45
+ super do
46
46
  # needs to override the super color here to push in ln/and something else!
47
47
  if color
48
48
  str << '<c:spPr><a:solidFill>'
@@ -12,7 +12,7 @@ module Axlsx
12
12
  self.auto = 1
13
13
  self.lbl_algn = :ctr
14
14
  self.lbl_offset = "100"
15
- super(options)
15
+ super
16
16
  end
17
17
 
18
18
  # From the docs: This element specifies that this axis is a date or text axis based on the data that is used for the axis labels, not a specific choice.
@@ -31,7 +31,7 @@ module Axlsx
31
31
  attr_reader :lbl_offset
32
32
  alias :lblOffset :lbl_offset
33
33
 
34
- # The number of tick lables to skip between labels
34
+ # The number of tick labels to skip between labels
35
35
  # @return [Integer]
36
36
  attr_reader :tick_lbl_skip
37
37
  alias :tickLblSkip :tick_lbl_skip
@@ -85,7 +85,7 @@ module Axlsx
85
85
  # @return [String]
86
86
  def to_xml_string(str = +'')
87
87
  str << '<c:catAx>'
88
- super(str)
88
+ super
89
89
  str << '<c:auto val="' << @auto.to_s << '"/>'
90
90
  str << '<c:lblAlgn val="' << @lbl_algn.to_s << '"/>'
91
91
  str << '<c:lblOffset val="' << @lbl_offset.to_i.to_s << '"/>'
@@ -19,7 +19,7 @@ module Axlsx
19
19
  end
20
20
 
21
21
  # These attributes are all boolean so I'm doing a bit of a hand
22
- # waving magic show to set up the attriubte accessors
22
+ # waving magic show to set up the attribute accessors
23
23
  # @note
24
24
  # not all charts support all methods!
25
25
  # Bar3DChart and Line3DChart and ScatterChart do not support d_lbl_pos or show_leader_lines
@@ -42,7 +42,7 @@ module Axlsx
42
42
  end
43
43
  end
44
44
 
45
- # The chart type that is using this data lables instance.
45
+ # The chart type that is using this data labels instance.
46
46
  # This affects the xml output as not all chart types support the
47
47
  # same data label attributes.
48
48
  attr_reader :chart_type
@@ -57,11 +57,11 @@ module Axlsx
57
57
  end
58
58
 
59
59
  # @see DLbls#d_lbl_pos
60
- # Assigns the label postion for this data labels on this chart.
60
+ # Assigns the label position for this data labels on this chart.
61
61
  # Allowed positions are :bestFit, :b, :ctr, :inBase, :inEnd, :l,
62
62
  # :outEnd, :r and :t
63
63
  # The default is :bestFit
64
- # @param [Symbol] label_position the postion you want to use.
64
+ # @param [Symbol] label_position the position you want to use.
65
65
  def d_lbl_pos=(label_position)
66
66
  return unless [PieChart, Pie3DChart, LineChart].include? @chart_type
67
67
 
@@ -1,56 +1,56 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Axlsx
4
- require 'axlsx/drawing/d_lbls'
5
- require 'axlsx/drawing/title'
6
- require 'axlsx/drawing/series_title'
7
- require 'axlsx/drawing/series'
8
- require 'axlsx/drawing/pie_series'
9
- require 'axlsx/drawing/bar_series'
10
- require 'axlsx/drawing/line_series'
11
- require 'axlsx/drawing/scatter_series'
12
- require 'axlsx/drawing/bubble_series'
13
- require 'axlsx/drawing/area_series'
14
-
15
- require 'axlsx/drawing/scaling'
16
- require 'axlsx/drawing/axis'
17
-
18
- require 'axlsx/drawing/str_val'
19
- require 'axlsx/drawing/num_val'
20
- require 'axlsx/drawing/str_data'
21
- require 'axlsx/drawing/num_data'
22
- require 'axlsx/drawing/num_data_source'
23
- require 'axlsx/drawing/ax_data_source'
24
-
25
- require 'axlsx/drawing/ser_axis'
26
- require 'axlsx/drawing/cat_axis'
27
- require 'axlsx/drawing/val_axis'
28
- require 'axlsx/drawing/axes'
29
-
30
- require 'axlsx/drawing/marker'
31
-
32
- require 'axlsx/drawing/one_cell_anchor'
33
- require 'axlsx/drawing/two_cell_anchor'
34
- require 'axlsx/drawing/graphic_frame'
35
-
36
- require 'axlsx/drawing/view_3D'
37
- require 'axlsx/drawing/chart'
38
- require 'axlsx/drawing/pie_3D_chart'
39
- require 'axlsx/drawing/pie_chart'
40
- require 'axlsx/drawing/bar_3D_chart'
41
- require 'axlsx/drawing/bar_chart'
42
- require 'axlsx/drawing/line_chart'
43
- require 'axlsx/drawing/line_3D_chart'
44
- require 'axlsx/drawing/scatter_chart'
45
- require 'axlsx/drawing/bubble_chart'
46
- require 'axlsx/drawing/area_chart'
47
-
48
- require 'axlsx/drawing/picture_locking'
49
- require 'axlsx/drawing/pic'
50
- require 'axlsx/drawing/hyperlink'
51
-
52
- require 'axlsx/drawing/vml_drawing'
53
- require 'axlsx/drawing/vml_shape'
4
+ require_relative 'd_lbls'
5
+ require_relative 'title'
6
+ require_relative 'series_title'
7
+ require_relative 'series'
8
+ require_relative 'pie_series'
9
+ require_relative 'bar_series'
10
+ require_relative 'line_series'
11
+ require_relative 'scatter_series'
12
+ require_relative 'bubble_series'
13
+ require_relative 'area_series'
14
+
15
+ require_relative 'scaling'
16
+ require_relative 'axis'
17
+
18
+ require_relative 'str_val'
19
+ require_relative 'num_val'
20
+ require_relative 'str_data'
21
+ require_relative 'num_data'
22
+ require_relative 'num_data_source'
23
+ require_relative 'ax_data_source'
24
+
25
+ require_relative 'ser_axis'
26
+ require_relative 'cat_axis'
27
+ require_relative 'val_axis'
28
+ require_relative 'axes'
29
+
30
+ require_relative 'marker'
31
+
32
+ require_relative 'one_cell_anchor'
33
+ require_relative 'two_cell_anchor'
34
+ require_relative 'graphic_frame'
35
+
36
+ require_relative 'view_3D'
37
+ require_relative 'chart'
38
+ require_relative 'pie_3D_chart'
39
+ require_relative 'pie_chart'
40
+ require_relative 'bar_3D_chart'
41
+ require_relative 'bar_chart'
42
+ require_relative 'line_chart'
43
+ require_relative 'line_3D_chart'
44
+ require_relative 'scatter_chart'
45
+ require_relative 'bubble_chart'
46
+ require_relative 'area_chart'
47
+
48
+ require_relative 'picture_locking'
49
+ require_relative 'pic'
50
+ require_relative 'hyperlink'
51
+
52
+ require_relative 'vml_drawing'
53
+ require_relative 'vml_shape'
54
54
 
55
55
  # A Drawing is a canvas for charts and images. Each worksheet has a single drawing that manages anchors.
56
56
  # The anchors reference the charts or images via graphical frames. This is not a trivial relationship so please do follow the advice in the note.
@@ -76,7 +76,7 @@ module Axlsx
76
76
  attr_reader :history
77
77
 
78
78
  # @see history
79
- # param [Boolean] v The value to assing
79
+ # param [Boolean] v The value to assign
80
80
  def history=(v)
81
81
  Axlsx.validate_boolean(v)
82
82
  @history = v
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Axlsx
4
- # The Line3DChart is a three dimentional line chart (who would have guessed?) that you can add to your worksheet.
4
+ # The Line3DChart is a three dimensional line chart (who would have guessed?) that you can add to your worksheet.
5
5
  # @example Creating a chart
6
6
  # # This example creates a line in a single sheet.
7
7
  # require "rubygems" # if that is your preferred way to manage gems!
@@ -43,7 +43,7 @@ module Axlsx
43
43
  def initialize(frame, options = {})
44
44
  @gap_depth = nil
45
45
  @view_3D = View3D.new({ r_ang_ax: 1 }.merge(options))
46
- super(frame, options)
46
+ super
47
47
  axes.add_axis :ser_axis, SerAxis
48
48
  end
49
49
 
@@ -58,7 +58,7 @@ module Axlsx
58
58
  # @param [String] str
59
59
  # @return [String]
60
60
  def to_xml_string(str = +'')
61
- super(str) do
61
+ super do
62
62
  str << '<c:gapDepth val="' << @gap_depth.to_s << '"/>' unless @gap_depth.nil?
63
63
  end
64
64
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Axlsx
4
- # The LineChart is a two dimentional line chart (who would have guessed?) that you can add to your worksheet.
4
+ # The LineChart is a two dimensional line chart (who would have guessed?) that you can add to your worksheet.
5
5
  # @example Creating a chart
6
6
  # # This example creates a line in a single sheet.
7
7
  # require "rubygems" # if that is your preferred way to manage gems!
@@ -47,7 +47,7 @@ module Axlsx
47
47
  def initialize(frame, options = {})
48
48
  @vary_colors = false
49
49
  @grouping = :standard
50
- super(frame, options)
50
+ super
51
51
  @series_type = LineSeries
52
52
  @d_lbls = nil
53
53
  end
@@ -75,7 +75,7 @@ module Axlsx
75
75
  # @param [String] str
76
76
  # @return [String]
77
77
  def to_xml_string(str = +'')
78
- super(str) do
78
+ super do
79
79
  str << "<c:" << node_name << ">"
80
80
  str << '<c:grouping val="' << grouping.to_s << '"/>'
81
81
  str << '<c:varyColors val="' << vary_colors.to_s << '"/>'
@@ -40,7 +40,7 @@ module Axlsx
40
40
  @marker_symbol = options[:marker_symbol] || :default
41
41
  @smooth = false
42
42
  @labels, @data = nil, nil
43
- super(chart, options)
43
+ super
44
44
  @labels = AxDataSource.new(data: options[:labels]) unless options[:labels].nil?
45
45
  @data = NumDataSource.new(options) unless options[:data].nil?
46
46
  end
@@ -72,7 +72,7 @@ module Axlsx
72
72
  # @param [String] str
73
73
  # @return [String]
74
74
  def to_xml_string(str = +'')
75
- super(str) do
75
+ super do
76
76
  if color
77
77
  str << '<c:spPr><a:solidFill>'
78
78
  str << '<a:srgbClr val="' << color << '"/>'
@@ -13,7 +13,7 @@ module Axlsx
13
13
  # @option options [Integer] v
14
14
  def initialize(options = {})
15
15
  @format_code = "General"
16
- super(options)
16
+ super
17
17
  end
18
18
 
19
19
  # @see format_code