Skip to content

Commit

Permalink
-refactoring chart position and axis data/category for chart.
Browse files Browse the repository at this point in the history
-additional specs and documentation improvements.
  • Loading branch information
Randy Morgan committed Nov 23, 2011
1 parent 099a1d5 commit 6739c24
Show file tree
Hide file tree
Showing 98 changed files with 3,040 additions and 2,077 deletions.
44 changes: 23 additions & 21 deletions .yardoc/checksums
@@ -1,54 +1,56 @@
lib/axlsx/stylesheet/table_styles.rb 04b778652c29d612f63e93080d06c3936e48d765
lib/axlsx/stylesheet/table_style.rb b592135b8b02969a29bd24c28a13282f6af76f30
lib/axlsx/drawing/pie_3D_chart.rb dd669c8dc9ef1f762d45a9589260c8c17308d944
lib/axlsx/drawing/pie_3D_chart.rb 9370e48b73000c96ebd50712dc4b4a958ad8527d
lib/axlsx/stylesheet/border_pr.rb 09dcb61ec7b0cf49f2da4c4f8ccba8f7e0df7b07
lib/axlsx/stylesheet/color.rb 4927aaebe27dda42d78bb7baf9a44edc1753c77f
lib/axlsx/drawing/marker.rb 3507738522c02a3733a01f115d9ef22fae4ea542
lib/axlsx/util/constants.rb 20e4a98177305d407b77eb62f0bca5ecc29b234c
lib/axlsx/stylesheet/cell_protection.rb ce494f9add6de0a51407ddd9122fffe95759a48a
lib/axlsx/stylesheet/cell_style.rb 46c6ff183bce5c6b1ab6228823257d638007b03c
lib/axlsx/drawing/series_title.rb 7ace4ba7c7835db5a7c69d2319cd59ed8c45908a
lib/axlsx/drawing/line_series.rb 80f2c27edafacbc5de9bb4fac9916b0ad0030a63
lib/axlsx/drawing/series.rb b35c182d9e3b09d99f743d3828344c4e5ac9c373
lib/axlsx/drawing/series_title.rb 8f088942649b5b5cc351b621bf8fb252f33cb510
lib/axlsx/drawing/line_series.rb ada7cbca0d561c2e2f6bad56c1eb5d8ea2c1f071
lib/axlsx/drawing/series.rb 1cf010706e32e7e51affbc9edb9d4862a26b33ef
lib/axlsx/package.rb eea7499e09e0936eeb8e08d10823f05990722023
lib/axlsx/stylesheet/cell_alignment.rb f67f6a0bc16bf13669ed7b18714e4de23825ed94
lib/axlsx/content_type/default.rb 8ec0d9d1e6bf261735739823acd460c271e3f5ed
lib/axlsx/drawing/title.rb b46fb082e3bea936d129c8aa0998f3b71c9838cc
lib/axlsx/drawing/axis.rb 5316065040d08d4f15e5da2751a2ee90185dad61
lib/axlsx/drawing/axis.rb 5e37bac9f4dd258265213d5621522eed3c614954
lib/axlsx/stylesheet/table_style_element.rb bee66d743e3113fb14adc7ebdecbeb606bfb49fc
lib/axlsx/content_type/content_type.rb 6c576e1618f99f7163fffa6b6e89e964653dcb5f
lib/axlsx/rels/relationships.rb 9c741e180796259bb378a789fd484fa1d8f04425
lib/axlsx/stylesheet/num_fmt.rb dc830c6540465afa824881efa2f1ce4070957c47
lib/axlsx/rels/relationships.rb 9c741e180796259bb378a789fd484fa1d8f04425
lib/axlsx.rb 7d8c589a0bdc16acf8774ae1b77d5177b030a80c
lib/axlsx/drawing/graphic_frame.rb 5ff7476b8fa3e2101fde200d1c65844084fb42f7
lib/axlsx/drawing/graphic_frame.rb 43496359fac0e990ded62f04254232f3cec8f736
lib/axlsx/content_type/override.rb 72245683bca868f181d709a515f9152485653229
lib/axlsx/drawing/bar_series.rb 48eb4533dd8fa89c40a8ab05e78cdb7b8061fd62
lib/axlsx/drawing/pie_series.rb 76c67a0227e913fb14eb70d756323974718e204a
lib/axlsx/drawing/pie_series.rb df339ed3eeb5692077e3a134339d04e77c9bc89b
lib/axlsx/drawing/bar_series.rb 044a3c42d3781755012c863ca138257b85ff5c0a
lib/axlsx/stylesheet/gradient_fill.rb 5fd260ec2b94ab75a970159035528548a9d21cd6
lib/axlsx/workbook/worksheet/row.rb f866a98341ce4e604908e42d00f2af09e58c75d2
lib/axlsx/util/simple_typed_list.rb 2ae647d5305acd9181c3303d5638db46d190b786
lib/axlsx/util/simple_typed_list.rb b95f7e8d8958361cb1946b8545126b9384ff9fd2
lib/axlsx/workbook/workbook.rb ec98ed826e6c3ca9c6e3303dbfbe00c0b5fb9aee
lib/axlsx/stylesheet/fill.rb 35966285f5d759d63451005ceae3a5ae5ba2ceca
lib/axlsx/drawing/view_3D.rb aca4d987f0c2cd5d0a653c96ac2bc1df9392583a
lib/axlsx/drawing/view_3D.rb c8e25d57901dd7d679fe7d1ed674d5549ab6f1b3
lib/axlsx/stylesheet/xf.rb e3d6e2e4c3b0b33c91de4c3db16c73aca3db4473
lib/axlsx/drawing/two_cell_anchor.rb cc320f580ff9c639daa670f7ba1a1648bf26c157
lib/axlsx/drawing/two_cell_anchor.rb a9400212ca7ed64263fd77826c3d336115cae185
lib/axlsx/stylesheet/styles.rb 3679a8fe86270bdef96f02bcf76f2eac27b1c2ef
lib/axlsx/drawing/val_axis.rb 710e67120c1262ef4cbbb56b632a568731df3215
lib/axlsx/drawing/cat_axis.rb bf9eae6efae39b003a98b44cc437e6e9b4c51985
lib/axlsx/stylesheet/font.rb 8b002d5fcba2fb0979858517f5254aadf96c7e58
lib/axlsx/drawing/val_axis.rb da067622f8b09e6caf5067955b277d75ab3c8943
lib/axlsx/drawing/cat_axis.rb f046262d1e8d04ff697fe29b88725225cd406cb2
lib/axlsx/util/validators.rb 2320eee50ceee29cc0dbab95721a6c633dc660e1
lib/axlsx/stylesheet/font.rb 8b002d5fcba2fb0979858517f5254aadf96c7e58
lib/axlsx/doc_props/app.rb 52f01e985a33253987177798d4e79ed208649b30
lib/axlsx/workbook/worksheet/worksheet.rb 1af6b7e4a54b41e770709c26ad7100ed516448b8
lib/axlsx/workbook/worksheet/worksheet.rb ba299b3a4f1e82f7da4fb6e28fad264dd6e2fbed
lib/axlsx/workbook/worksheet/cell.rb 939623ffc2065e9ec26bc56d9e289d9137fe57d3
lib/axlsx/rels/relationship.rb a160c998acf7fd0ab8195ea6162b1eb2eab4963c
lib/axlsx/stylesheet/border.rb 517bfcb43380919ce7abef494d5d3e50911b7c19
lib/axlsx/drawing/ser_axis.rb e1072fa920f084e22fc6ef4697d3f7d455fb0550
lib/axlsx/drawing/drawing.rb ca457723c04ec7f2c9d3d16846b4cf0a9045da07
lib/axlsx/drawing/chart.rb 059fa0f1af9e145f2b28871ea4aaa70653ec589f
lib/axlsx/drawing/ser_axis.rb 6d15f6cc2092ef5c3baa314ed1af793247418d9b
lib/axlsx/drawing/drawing.rb a5d71d9c7e86f15fdea03754ab258009035151dd
lib/axlsx/drawing/chart.rb 2907d74c75580cd5f029a71140a750d4e69c869e
lib/axlsx/version.rb eb4274097b7f8f3f60e4e3dd8d57fb6bf6148f36
lib/axlsx/stylesheet/gradient_stop.rb de34e289aeccb4abd9a3b7e60e816a0b12ffacff
lib/axlsx/drawing/cat_axis_data.rb efc95067f90bf8d0bb4ce0fa6e35b7b9d642e8b5
lib/axlsx/drawing/val_axis_data.rb c57c0abf5abb4aca9fba774f20e2f2c04d3020e8
lib/axlsx/doc_props/core.rb 90ebc8086f6606af02275c27068c359a5647faf0
lib/axlsx/drawing/bar_3D_chart.rb 90ee990d00f63aaa8bfa23805580b3fea16a74ac
lib/axlsx/drawing/bar_3D_chart.rb e5199cf0a33e416ea5ddf66677031ee08e5c116f
lib/axlsx/drawing/scaling.rb d3b59eed1897dc2b07bb41b2245c6e4b3e274d7e
lib/axlsx/stylesheet/pattern_fill.rb 817cf55beb3db160b2b56edb6c94de1ecf1ecee7
lib/axlsx/drawing/line_3D_chart.rb 062b83115dccb3b67c737faea1adf5f0cfce1cea
lib/axlsx/drawing/line_3D_chart.rb de0a2c8a49259e0348fd2c642c08eb4c567bcf1b
Binary file modified .yardoc/objects/root.dat
Binary file not shown.
Binary file modified .yardoc/proxy_types
Binary file not shown.
19 changes: 19 additions & 0 deletions .yardopts_guide
@@ -0,0 +1,19 @@
-t guide
--title YARD
-o doc_guide
--exclude /server/templates/
--exclude /yard/rubygems/
--asset docs/images:images
-
docs/WhatsNew.md
docs/GettingStarted.md
docs/Overview.md
docs/CodeObjects.md
docs/Tags.md
docs/Parser.md
docs/Handlers.md
docs/Templates.md
docs/Glossary.md
ChangeLog
LICENSE
LEGAL
23 changes: 13 additions & 10 deletions README.md
Expand Up @@ -47,7 +47,7 @@ Usage
require 'rubygems'
require 'axlsx'

A Simple Workbooka
A Simple Workbook

p = Axlsx::Package.new
p.workbook.add_worksheet do |sheet|
Expand Down Expand Up @@ -124,10 +124,13 @@ Generating A Line Chart
p.workbook.add_worksheet do |sheet|
sheet.add_row ["First", 1, 5, 7, 9]
sheet.add_row ["Second", 5, 2, 14, 9]
sheet.add_chart(Axlsx::Line3DChart, :start_at => [0,2], :end_at => [10, 15], :title=>"example 6: Line Chart") do |chart|
sheet.add_chart(Axlsx::Line3DChart, :title=>"example 6: Line Chart") do |chart|
chart.start_at 0, 2
chart.end_at 10, 15
chart.add_series :data=>sheet.rows.first.cells[(1..-1)], :title=> sheet.rows.first.cells.first
chart.add_series :data=>sheet.rows.last.cells[(1..-1)], :title=> sheet.rows.last.cells.first
end
end
p.serialize("example6.xlsx")

Expand All @@ -147,19 +150,19 @@ This gem has 100% test coverage using test/unit. To execute tests for this gem,
Changelog
---------

- **October.22.11**: 1.0.7 release
- **October.23.11**: 1.0.7 release preparation
- 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
- Updated serialization write test to verify write permissions and warn if it cannot run the test due to permission restrcitions.
- updated rake to include build, genoc and deploy commands.
- updated rake to include build, genoc and deploy tasks.
- rebuilt documentation.
- moved version constant to its own file

- fixed bug in SerAxis that was requiring tickLblSkip and tickMarkSkip to be boolean. Should be unsigned int.
- Review and improve docs
- 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.
- Refactored cat and val axis data to keep series serialization a bit more DRY

Please see the {file:CHANGELOG.md} document for past release information.

On Deck
-------

- Verification with ruby 1.9.3
- Active Record support via package::serialize_ar so you can dump an AR result into a worksheet in one go.

Copyright
---------
Expand Down
6 changes: 3 additions & 3 deletions doc/Axlsx.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/Axlsx/App.html
Expand Up @@ -2631,7 +2631,7 @@ <h3>Returns:</h3>
</div>

<div id="footer">
Generated on Tue Nov 22 23:52:43 2011 by
Generated on Wed Nov 23 12:24:05 2011 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.3 (ruby-1.8.7).
</div>
Expand Down
64 changes: 45 additions & 19 deletions doc/Axlsx/Axis.html
Expand Up @@ -95,7 +95,7 @@
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>
the access class defines common properties and values for chart axis
the access class defines common properties and values for a chart axis.
</p>


Expand Down Expand Up @@ -242,7 +242,7 @@ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collap


<span class="summary_desc"><div class='inline'><p>
The number format format code for this axis.
The number format format code for this axis default :General.
</p>
</div></span>

Expand Down Expand Up @@ -487,14 +487,32 @@ <h3>Options Hash (<tt>options</tt>):</h3>
</ul>


<h3>Raises:</h3>
<ul class="raise">

<li>


<span class='type'>(<tt>ArgumentError</tt>)</span>



&mdash;
<div class='inline'><p>
If axId or crossAx are not unsigned integers
</p>
</div>

</li>

</ul>

</div><table class="source_code">
<tr>
<td>
<pre class="lines">


44
45
46
47
Expand All @@ -507,20 +525,21 @@ <h3>Options Hash (<tt>options</tt>):</h3>
54
55
56
57</pre>
57
58</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/axis.rb', line 44</span>
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/axis.rb', line 45</span>

<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='axId identifier id'>axId</span><span class='comma token'>,</span> <span class='crossAx identifier id'>crossAx</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
<span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='validate_unsigned_int identifier id'>validate_unsigned_int</span><span class='lparen token'>(</span><span class='axId identifier id'>axId</span><span class='rparen token'>)</span>
<span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='validate_unsigned_int identifier id'>validate_unsigned_int</span><span class='lparen token'>(</span><span class='crossAx identifier id'>crossAx</span><span class='rparen token'>)</span>
<span class='@axId ivar id'>@axId</span> <span class='assign token'>=</span> <span class='axId identifier id'>axId</span>
<span class='@crossAx ivar id'>@crossAx</span> <span class='assign token'>=</span> <span class='crossAx identifier id'>crossAx</span>
<span class='@scaling ivar id'>@scaling</span> <span class='assign token'>=</span> <span class='Scaling constant id'>Scaling</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:orientation=</span><span class='gt op'>&gt;</span><span class='symbol val'>:minMax</span><span class='rparen token'>)</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='axPos identifier id'>axPos</span> <span class='assign token'>=</span> <span class='symbol val'>:l</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='tickLblPos identifier id'>tickLblPos</span> <span class='assign token'>=</span> <span class='symbol val'>:nextTo</span>
<span class='@scaling ivar id'>@scaling</span> <span class='assign token'>=</span> <span class='Scaling constant id'>Scaling</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:orientation=</span><span class='gt op'>&gt;</span><span class='symbol val'>:minMax</span><span class='rparen token'>)</span>
<span class='@formatCode ivar id'>@formatCode</span> <span class='assign token'>=</span> <span class='string val'>&quot;&quot;</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='format_code identifier id'>format_code</span> <span class='assign token'>=</span> <span class='string val'>&quot;General&quot;</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='crosses identifier id'>crosses</span> <span class='assign token'>=</span> <span class='symbol val'>:autoZero</span>
<span class='options identifier id'>options</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='o identifier id'>o</span><span class='bitor op'>|</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='dstring node'>&quot;#{o[0]}=&quot;</span><span class='comma token'>,</span> <span class='o identifier id'>o</span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> <span class='if if_mod kw'>if</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='respond_to? fid id'>respond_to?</span> <span class='dstring node'>&quot;#{o[0]}=&quot;</span>
Expand Down Expand Up @@ -550,7 +569,7 @@ <h2>Instance Attribute Details</h2>
</p><div class="docstring">
<div class="discussion">
<p>
the id of the axis
the id of the axis.
</p>


Expand Down Expand Up @@ -578,12 +597,12 @@ <h3>Returns:</h3>
<pre class="lines">


7
8
9
10</pre>
9</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/axis.rb', line 8</span>
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/axis.rb', line 7</span>

<span class='def def kw'>def</span> <span class='axId identifier id'>axId</span>
<span class='@axId ivar id'>@axId</span>
Expand Down Expand Up @@ -692,12 +711,12 @@ <h3>Returns:</h3>
<pre class="lines">


11
12
13
14</pre>
13</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/axis.rb', line 12</span>
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/axis.rb', line 11</span>

<span class='def def kw'>def</span> <span class='crossAx identifier id'>crossAx</span>
<span class='@crossAx ivar id'>@crossAx</span>
Expand Down Expand Up @@ -779,7 +798,7 @@ <h3>Returns:</h3>
</p><div class="docstring">
<div class="discussion">
<p>
The number format format code for this axis
The number format format code for this axis default :General
</p>


Expand Down Expand Up @@ -858,6 +877,13 @@ <h3>Returns:</h3>

</ul>

<h3>See Also:</h3>
<ul class="see">

<li><span class='object_link'><a href="Scaling.html" title="Axlsx::Scaling (class)">Scaling</a></span></li>

</ul>

</div><table class="source_code">
<tr>
<td>
Expand Down Expand Up @@ -1003,7 +1029,6 @@ <h3>Returns:</h3>
<pre class="lines">


67
68
69
70
Expand All @@ -1012,10 +1037,11 @@ <h3>Returns:</h3>
73
74
75
76</pre>
76
77</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/axis.rb', line 67</span>
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/axis.rb', line 68</span>

<span class='def def kw'>def</span> <span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml identifier id'>xml</span><span class='rparen token'>)</span>
<span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='string val'>'c:axId'</span><span class='comma token'>,</span> <span class='symbol val'>:val=</span><span class='gt op'>&gt;</span><span class='@axId ivar id'>@axId</span><span class='rparen token'>)</span>
Expand All @@ -1038,7 +1064,7 @@ <h3>Returns:</h3>
</div>

<div id="footer">
Generated on Tue Nov 22 23:52:53 2011 by
Generated on Wed Nov 23 12:24:03 2011 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.3 (ruby-1.8.7).
</div>
Expand Down

0 comments on commit 6739c24

Please sign in to comment.