axlsx 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +21 -3
- data/doc/Axlsx.html +150 -6
- data/doc/Axlsx/App.html +1 -1
- data/doc/Axlsx/Axis.html +1 -1
- data/doc/Axlsx/Bar3DChart.html +1 -1
- data/doc/Axlsx/BarSeries.html +1 -1
- data/doc/Axlsx/Border.html +1 -1
- data/doc/Axlsx/BorderPr.html +1 -1
- data/doc/Axlsx/CatAxis.html +1 -1
- data/doc/Axlsx/CatAxisData.html +7 -5
- data/doc/Axlsx/Cell.html +1 -1
- data/doc/Axlsx/CellAlignment.html +1 -1
- data/doc/Axlsx/CellProtection.html +1 -1
- data/doc/Axlsx/CellStyle.html +1 -1
- data/doc/Axlsx/Chart.html +16 -16
- data/doc/Axlsx/Color.html +1 -1
- data/doc/Axlsx/ContentType.html +1 -1
- data/doc/Axlsx/Core.html +1 -1
- data/doc/Axlsx/DataTypeValidator.html +1 -1
- data/doc/Axlsx/Default.html +1 -1
- data/doc/Axlsx/Drawing.html +243 -65
- data/doc/Axlsx/Fill.html +1 -1
- data/doc/Axlsx/Font.html +1 -1
- data/doc/Axlsx/GradientFill.html +1 -1
- data/doc/Axlsx/GradientStop.html +1 -1
- data/doc/Axlsx/GraphicFrame.html +21 -21
- data/doc/Axlsx/Line3DChart.html +1 -1
- data/doc/Axlsx/LineSeries.html +6 -8
- data/doc/Axlsx/Marker.html +1 -1
- data/doc/Axlsx/NumFmt.html +1 -1
- data/doc/Axlsx/OneCellAnchor.html +988 -0
- data/doc/Axlsx/Override.html +1 -1
- data/doc/Axlsx/Package.html +127 -75
- data/doc/Axlsx/PatternFill.html +1 -1
- data/doc/Axlsx/Pic.html +1532 -0
- data/doc/Axlsx/Pie3DChart.html +5 -7
- data/doc/Axlsx/PieSeries.html +1 -1
- data/doc/Axlsx/RegexValidator.html +1 -1
- data/doc/Axlsx/Relationship.html +6 -6
- data/doc/Axlsx/Relationships.html +1 -1
- data/doc/Axlsx/RestrictionValidator.html +1 -1
- data/doc/Axlsx/Row.html +1 -1
- data/doc/Axlsx/Scaling.html +1 -1
- data/doc/Axlsx/SerAxis.html +1 -1
- data/doc/Axlsx/Series.html +1 -1
- data/doc/Axlsx/SeriesTitle.html +1 -1
- data/doc/Axlsx/SimpleTypedList.html +1 -1
- data/doc/Axlsx/Styles.html +1 -1
- data/doc/Axlsx/TableStyle.html +1 -1
- data/doc/Axlsx/TableStyleElement.html +1 -1
- data/doc/Axlsx/TableStyles.html +1 -1
- data/doc/Axlsx/Title.html +1 -1
- data/doc/Axlsx/TwoCellAnchor.html +165 -61
- data/doc/Axlsx/ValAxis.html +1 -1
- data/doc/Axlsx/ValAxisData.html +1 -1
- data/doc/Axlsx/View3D.html +1 -1
- data/doc/Axlsx/Workbook.html +151 -47
- data/doc/Axlsx/Worksheet.html +172 -35
- data/doc/Axlsx/Xf.html +1 -1
- data/doc/_index.html +15 -1
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +29 -4
- data/doc/index.html +29 -4
- data/doc/method_list.html +571 -363
- data/doc/top-level-namespace.html +1 -1
- data/examples/example.rb +13 -0
- data/examples/image1.gif +0 -0
- data/examples/image1.jpeg +0 -0
- data/examples/image1.jpg +0 -0
- data/examples/image1.png +0 -0
- data/lib/axlsx/drawing/bar_series.rb +0 -1
- data/lib/axlsx/drawing/cat_axis_data.rb +1 -0
- data/lib/axlsx/drawing/chart.rb +0 -1
- data/lib/axlsx/drawing/drawing.rb +31 -7
- data/lib/axlsx/drawing/graphic_frame.rb +0 -2
- data/lib/axlsx/drawing/line_series.rb +0 -1
- data/lib/axlsx/drawing/one_cell_anchor.rb +89 -0
- data/lib/axlsx/drawing/pic.rb +158 -0
- data/lib/axlsx/drawing/pie_3D_chart.rb +0 -1
- data/lib/axlsx/drawing/two_cell_anchor.rb +17 -4
- data/lib/axlsx/package.rb +31 -5
- data/lib/axlsx/rels/relationship.rb +1 -2
- data/lib/axlsx/util/constants.rb +24 -0
- data/lib/axlsx/util/validators.rb +2 -2
- data/lib/axlsx/version.rb +1 -1
- data/lib/axlsx/workbook/workbook.rb +8 -0
- data/lib/axlsx/workbook/worksheet/worksheet.rb +10 -1
- data/test/drawing/tc_drawing.rb +10 -1
- data/test/drawing/tc_one_cell_anchor.rb +67 -0
- data/test/drawing/tc_pic.rb +71 -0
- data/test/tc_package.rb +0 -2
- metadata +13 -118
- data/examples/#example.rb# +0 -87
- data/examples/example.rb~ +0 -79
- data/examples/multi_chart.xlsx +0 -0
- data/lib/axlsx.rb~ +0 -67
- data/lib/axlsx/content_type/content_type.rb~ +0 -20
- data/lib/axlsx/content_type/default.rb~ +0 -32
- data/lib/axlsx/content_type/override.rb~ +0 -30
- data/lib/axlsx/doc_props/app.rb~ +0 -127
- data/lib/axlsx/doc_props/core.rb~ +0 -25
- data/lib/axlsx/drawing/#bar_series.rb# +0 -62
- data/lib/axlsx/drawing/axis.rb~ +0 -0
- data/lib/axlsx/drawing/bar_3D_chart.rb~ +0 -64
- data/lib/axlsx/drawing/bar_series.rb~ +0 -92
- data/lib/axlsx/drawing/cat_axis.rb~ +0 -32
- data/lib/axlsx/drawing/cat_axis_data.rb~ +0 -28
- data/lib/axlsx/drawing/chart.rb~ +0 -0
- data/lib/axlsx/drawing/drawing.rb~ +0 -102
- data/lib/axlsx/drawing/graphic_frame.rb~ +0 -40
- data/lib/axlsx/drawing/line_3D_chart.rb~ +0 -138
- data/lib/axlsx/drawing/line_series.rb~ +0 -91
- data/lib/axlsx/drawing/marker.rb~ +0 -50
- data/lib/axlsx/drawing/pie_3D_chart.rb~ +0 -132
- data/lib/axlsx/drawing/pie_series.rb~ +0 -0
- data/lib/axlsx/drawing/scaling.rb~ +0 -0
- data/lib/axlsx/drawing/ser_axis.rb~ +0 -48
- data/lib/axlsx/drawing/series.rb~ +0 -114
- data/lib/axlsx/drawing/series_title.rb~ +0 -18
- data/lib/axlsx/drawing/title.rb~ +0 -69
- data/lib/axlsx/drawing/two_cell_anchor.rb~ +0 -70
- data/lib/axlsx/drawing/val_axis.rb~ +0 -34
- data/lib/axlsx/drawing/val_axis_data.rb~ +0 -29
- data/lib/axlsx/drawing/view_3D.rb~ +0 -21
- data/lib/axlsx/package.rb~ +0 -181
- data/lib/axlsx/rels/relationship.rb~ +0 -18
- data/lib/axlsx/rels/relationships.rb~ +0 -23
- data/lib/axlsx/stylesheet/border.rb~ +0 -24
- data/lib/axlsx/stylesheet/border_pr.rb~ +0 -64
- data/lib/axlsx/stylesheet/cell_alignment.rb~ +0 -93
- data/lib/axlsx/stylesheet/cell_protection.rb~ +0 -16
- data/lib/axlsx/stylesheet/cell_style.rb~ +0 -61
- data/lib/axlsx/stylesheet/color.rb~ +0 -56
- data/lib/axlsx/stylesheet/fill.rb~ +0 -31
- data/lib/axlsx/stylesheet/font.rb~ +0 -33
- data/lib/axlsx/stylesheet/gradient_fill.rb~ +0 -70
- data/lib/axlsx/stylesheet/gradient_stop.rb~ +0 -15
- data/lib/axlsx/stylesheet/num_fmt.rb~ +0 -60
- data/lib/axlsx/stylesheet/pattern_fill.rb~ +0 -63
- data/lib/axlsx/stylesheet/styles.rb~ +0 -279
- data/lib/axlsx/stylesheet/table_style.rb~ +0 -43
- data/lib/axlsx/stylesheet/table_style_element.rb~ +0 -66
- data/lib/axlsx/stylesheet/table_styles.rb~ +0 -36
- data/lib/axlsx/stylesheet/xf.rb~ +0 -37
- data/lib/axlsx/util/constants.rb~ +0 -187
- data/lib/axlsx/util/monkey_patches_for_true_zip_stream.rb~ +0 -61
- data/lib/axlsx/util/simple_typed_list.rb~ +0 -79
- data/lib/axlsx/util/validators.rb~ +0 -132
- data/lib/axlsx/util/xml_escape.rb~ +0 -6
- data/lib/axlsx/workbook/workbook.rb~ +0 -130
- data/lib/axlsx/workbook/worksheet/cell.rb~ +0 -185
- data/lib/axlsx/workbook/worksheet/row.rb~ +0 -92
- data/lib/axlsx/workbook/worksheet/worksheet.rb~ +0 -194
- data/test/content_type/tc_content_type.rb~ +0 -81
- data/test/content_type/tc_default.rb~ +0 -40
- data/test/content_type/tc_override.rb~ +0 -40
- data/test/doc_props/tc_app.rb~ +0 -19
- data/test/drawing/tc_axis.rb~ +0 -0
- data/test/drawing/tc_bar_3D_chart.rb~ +0 -66
- data/test/drawing/tc_bar_series.rb~ +0 -31
- data/test/drawing/tc_cat_axis.rb~ +0 -39
- data/test/drawing/tc_cat_axis_data.rb~ +0 -32
- data/test/drawing/tc_chart.rb~ +0 -59
- data/test/drawing/tc_graphic_frame.rb~ +0 -21
- data/test/drawing/tc_line_3d_chart.rb~ +0 -48
- data/test/drawing/tc_line_series.rb~ +0 -34
- data/test/drawing/tc_marker.rb~ +0 -26
- data/test/drawing/tc_pie_3D_chart.rb~ +0 -33
- data/test/drawing/tc_pie_series.rb~ +0 -26
- data/test/drawing/tc_scaling.rb~ +0 -45
- data/test/drawing/tc_ser_axis.rb~ +0 -20
- data/test/drawing/tc_series.rb~ +0 -31
- data/test/drawing/tc_series_title.rb~ +0 -34
- data/test/drawing/tc_title.rb~ +0 -34
- data/test/drawing/tc_two_cell_anchor.rb~ +0 -37
- data/test/drawing/tc_val_axis.rb~ +0 -32
- data/test/drawing/tc_val_axis_data.rb~ +0 -18
- data/test/drawing/tc_view_3D.rb~ +0 -37
- data/test/rels/tc_relationship.rb~ +0 -39
- data/test/rels/tc_relationships.rb~ +0 -37
- data/test/stylesheet/tc_border.rb~ +0 -31
- data/test/stylesheet/tc_border_pr.rb~ +0 -31
- data/test/stylesheet/tc_cell_alignment.rb~ +0 -38
- data/test/stylesheet/tc_cell_protection.rb~ +0 -77
- data/test/stylesheet/tc_cell_style.rb~ +0 -30
- data/test/stylesheet/tc_color.rb~ +0 -38
- data/test/stylesheet/tc_fill.rb~ +0 -19
- data/test/stylesheet/tc_font.rb~ +0 -19
- data/test/stylesheet/tc_gradient_fill.rb~ +0 -114
- data/test/stylesheet/tc_gradient_stop.rb~ +0 -65
- data/test/stylesheet/tc_num_fmt.rb~ +0 -32
- data/test/stylesheet/tc_pattern_fill.rb~ +0 -31
- data/test/stylesheet/tc_table_style.rb~ +0 -38
- data/test/stylesheet/tc_table_style_element.rb~ +0 -37
- data/test/stylesheet/tc_table_styles.rb~ +0 -37
- data/test/stylesheet/tc_xf.rb~ +0 -30
- data/test/tc_app.rb~ +0 -19
- data/test/tc_border_pr.rb~ +0 -21
- data/test/tc_package.rb~ +0 -64
- data/test/tc_pie_3D_chart.rb~ +0 -66
- data/test/tc_relationships.rb~ +0 -37
- data/test/tc_series.rb~ +0 -31
- data/test/tc_styles.rb~ +0 -64
- data/test/tc_validators.rb~ +0 -77
- data/test/tc_worksheet.rb~ +0 -85
- data/test/workbook/worksheet/tc_row.rb~ +0 -30
- data/test/workbook/worksheet/tc_worksheet.rb~ +0 -85
data/doc/Axlsx/Color.html
CHANGED
@@ -656,7 +656,7 @@ The document builder instance this objects xml will be added to.
|
|
656
656
|
</div>
|
657
657
|
|
658
658
|
<div id="footer">
|
659
|
-
Generated on Wed Nov 23
|
659
|
+
Generated on Wed Nov 23 21:47:53 2011 by
|
660
660
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
661
661
|
0.7.3 (ruby-1.8.7).
|
662
662
|
</div>
|
data/doc/Axlsx/ContentType.html
CHANGED
@@ -331,7 +331,7 @@ The document as a string.
|
|
331
331
|
</div>
|
332
332
|
|
333
333
|
<div id="footer">
|
334
|
-
Generated on Wed Nov 23
|
334
|
+
Generated on Wed Nov 23 21:47:52 2011 by
|
335
335
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
336
336
|
0.7.3 (ruby-1.8.7).
|
337
337
|
</div>
|
data/doc/Axlsx/Core.html
CHANGED
@@ -456,7 +456,7 @@ time when this method is called.
|
|
456
456
|
</div>
|
457
457
|
|
458
458
|
<div id="footer">
|
459
|
-
Generated on Wed Nov 23
|
459
|
+
Generated on Wed Nov 23 21:47:55 2011 by
|
460
460
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
461
461
|
0.7.3 (ruby-1.8.7).
|
462
462
|
</div>
|
@@ -315,7 +315,7 @@ types or the block passed returns false
|
|
315
315
|
</div>
|
316
316
|
|
317
317
|
<div id="footer">
|
318
|
-
Generated on Wed Nov 23
|
318
|
+
Generated on Wed Nov 23 21:47:52 2011 by
|
319
319
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
320
320
|
0.7.3 (ruby-1.8.7).
|
321
321
|
</div>
|
data/doc/Axlsx/Default.html
CHANGED
@@ -566,7 +566,7 @@ The document builder instance this objects xml will be added to.
|
|
566
566
|
</div>
|
567
567
|
|
568
568
|
<div id="footer">
|
569
|
-
Generated on Wed Nov 23
|
569
|
+
Generated on Wed Nov 23 21:47:54 2011 by
|
570
570
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
571
571
|
0.7.3 (ruby-1.8.7).
|
572
572
|
</div>
|
data/doc/Axlsx/Drawing.html
CHANGED
@@ -183,6 +183,34 @@ An array of charts that are associated with this drawing’s anchors.
|
|
183
183
|
</p>
|
184
184
|
</div></span>
|
185
185
|
|
186
|
+
</li>
|
187
|
+
|
188
|
+
|
189
|
+
<li class="public ">
|
190
|
+
<span class="summary_signature">
|
191
|
+
|
192
|
+
<a href="#images-instance_method" title="#images (instance method)">- (Array) <strong>images</strong> </a>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
</span>
|
197
|
+
|
198
|
+
|
199
|
+
<span class="note title readonly">readonly</span>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
<span class="summary_desc"><div class='inline'><p>
|
209
|
+
An array of image objects that are associated with this drawing’s
|
210
|
+
anchors.
|
211
|
+
</p>
|
212
|
+
</div></span>
|
213
|
+
|
186
214
|
</li>
|
187
215
|
|
188
216
|
|
@@ -383,6 +411,30 @@ Adds a chart to the drawing.
|
|
383
411
|
</p>
|
384
412
|
</div></span>
|
385
413
|
|
414
|
+
</li>
|
415
|
+
|
416
|
+
|
417
|
+
<li class="public ">
|
418
|
+
<span class="summary_signature">
|
419
|
+
|
420
|
+
<a href="#add_image-instance_method" title="#add_image (instance method)">- (Object) <strong>add_image</strong>(options = {}) </a>
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
</span>
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
<span class="summary_desc"><div class='inline'><p>
|
434
|
+
Adds an image to the chart.
|
435
|
+
</p>
|
436
|
+
</div></span>
|
437
|
+
|
386
438
|
</li>
|
387
439
|
|
388
440
|
|
@@ -488,21 +540,21 @@ The worksheet that owns this drawing
|
|
488
540
|
<pre class="lines">
|
489
541
|
|
490
542
|
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
543
|
+
80
|
544
|
+
81
|
545
|
+
82
|
546
|
+
83
|
547
|
+
84
|
548
|
+
85</pre>
|
497
549
|
</td>
|
498
550
|
<td>
|
499
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
551
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 80</span>
|
500
552
|
|
501
553
|
<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='worksheet identifier id'>worksheet</span><span class='rparen token'>)</span>
|
502
554
|
<span class='DataTypeValidator constant id'>DataTypeValidator</span><span class='dot token'>.</span><span class='validate identifier id'>validate</span> <span class='string val'>"Drawing.worksheet"</span><span class='comma token'>,</span> <span class='Worksheet constant id'>Worksheet</span><span class='comma token'>,</span> <span class='worksheet identifier id'>worksheet</span>
|
503
555
|
<span class='@worksheet ivar id'>@worksheet</span> <span class='assign token'>=</span> <span class='worksheet identifier id'>worksheet</span>
|
504
556
|
<span class='@worksheet ivar id'>@worksheet</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='drawings identifier id'>drawings</span> <span class='lshft op'><<</span> <span class='self self kw'>self</span>
|
505
|
-
<span class='@anchors ivar id'>@anchors</span> <span class='assign token'>=</span> <span class='SimpleTypedList constant id'>SimpleTypedList</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='TwoCellAnchor constant id'>TwoCellAnchor</span>
|
557
|
+
<span class='@anchors ivar id'>@anchors</span> <span class='assign token'>=</span> <span class='SimpleTypedList constant id'>SimpleTypedList</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='lbrack token'>[</span><span class='TwoCellAnchor constant id'>TwoCellAnchor</span><span class='comma token'>,</span> <span class='OneCellAnchor constant id'>OneCellAnchor</span><span class='rbrack token'>]</span>
|
506
558
|
<span class='end end kw'>end</span>
|
507
559
|
</pre>
|
508
560
|
</td>
|
@@ -557,12 +609,12 @@ in this version
|
|
557
609
|
<pre class="lines">
|
558
610
|
|
559
611
|
|
560
|
-
|
561
|
-
|
562
|
-
|
612
|
+
48
|
613
|
+
49
|
614
|
+
50</pre>
|
563
615
|
</td>
|
564
616
|
<td>
|
565
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
617
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 48</span>
|
566
618
|
|
567
619
|
<span class='def def kw'>def</span> <span class='anchors identifier id'>anchors</span>
|
568
620
|
<span class='@anchors ivar id'>@anchors</span>
|
@@ -614,15 +666,77 @@ An array of charts that are associated with this drawing’s anchors
|
|
614
666
|
<pre class="lines">
|
615
667
|
|
616
668
|
|
617
|
-
|
618
|
-
|
619
|
-
|
669
|
+
52
|
670
|
+
53
|
671
|
+
54
|
672
|
+
55</pre>
|
620
673
|
</td>
|
621
674
|
<td>
|
622
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
675
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 52</span>
|
623
676
|
|
624
677
|
<span class='def def kw'>def</span> <span class='charts identifier id'>charts</span>
|
625
|
-
<span class='@anchors ivar id'>@anchors</span><span class='dot token'>.</span><span class='
|
678
|
+
<span class='charts identifier id'>charts</span> <span class='assign token'>=</span> <span class='@anchors ivar id'>@anchors</span><span class='dot token'>.</span><span class='select identifier id'>select</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='a identifier id'>a</span><span class='bitor op'>|</span> <span class='a identifier id'>a</span><span class='dot token'>.</span><span class='object identifier id'>object</span><span class='dot token'>.</span><span class='is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='GraphicFrame constant id'>GraphicFrame</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
|
679
|
+
<span class='charts identifier id'>charts</span><span class='dot token'>.</span><span class='map identifier id'>map</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='a identifier id'>a</span><span class='bitor op'>|</span> <span class='a identifier id'>a</span><span class='dot token'>.</span><span class='object identifier id'>object</span><span class='dot token'>.</span><span class='chart identifier id'>chart</span> <span class='rbrace token'>}</span>
|
680
|
+
<span class='end end kw'>end</span>
|
681
|
+
</pre>
|
682
|
+
</td>
|
683
|
+
</tr>
|
684
|
+
</table>
|
685
|
+
</div>
|
686
|
+
|
687
|
+
|
688
|
+
<span id=""></span>
|
689
|
+
<span id="images-instance_method"></span>
|
690
|
+
<div class="method_details ">
|
691
|
+
<p class="signature " id="images-instance_method">
|
692
|
+
|
693
|
+
- (<tt>Array</tt>) <strong>images</strong> <span class="extras">(readonly)</span>
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
</p><div class="docstring">
|
698
|
+
<div class="discussion">
|
699
|
+
<p>
|
700
|
+
An array of image objects that are associated with this drawing’s
|
701
|
+
anchors
|
702
|
+
</p>
|
703
|
+
|
704
|
+
|
705
|
+
</div>
|
706
|
+
</div>
|
707
|
+
<div class="tags">
|
708
|
+
|
709
|
+
<h3>Returns:</h3>
|
710
|
+
<ul class="return">
|
711
|
+
|
712
|
+
<li>
|
713
|
+
|
714
|
+
|
715
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
716
|
+
|
717
|
+
|
718
|
+
|
719
|
+
</li>
|
720
|
+
|
721
|
+
</ul>
|
722
|
+
|
723
|
+
</div><table class="source_code">
|
724
|
+
<tr>
|
725
|
+
<td>
|
726
|
+
<pre class="lines">
|
727
|
+
|
728
|
+
|
729
|
+
56
|
730
|
+
57
|
731
|
+
58
|
732
|
+
59</pre>
|
733
|
+
</td>
|
734
|
+
<td>
|
735
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 56</span>
|
736
|
+
|
737
|
+
<span class='def def kw'>def</span> <span class='images identifier id'>images</span>
|
738
|
+
<span class='images identifier id'>images</span> <span class='assign token'>=</span> <span class='@anchors ivar id'>@anchors</span><span class='dot token'>.</span><span class='select identifier id'>select</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='a identifier id'>a</span><span class='bitor op'>|</span> <span class='a identifier id'>a</span><span class='dot token'>.</span><span class='object identifier id'>object</span><span class='dot token'>.</span><span class='is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='Pic constant id'>Pic</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
|
739
|
+
<span class='images identifier id'>images</span><span class='dot token'>.</span><span class='map identifier id'>map</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='a identifier id'>a</span><span class='bitor op'>|</span> <span class='a identifier id'>a</span><span class='dot token'>.</span><span class='object identifier id'>object</span> <span class='rbrace token'>}</span>
|
626
740
|
<span class='end end kw'>end</span>
|
627
741
|
</pre>
|
628
742
|
</td>
|
@@ -672,12 +786,12 @@ collection.
|
|
672
786
|
<pre class="lines">
|
673
787
|
|
674
788
|
|
675
|
-
|
676
|
-
|
677
|
-
|
789
|
+
60
|
790
|
+
61
|
791
|
+
62</pre>
|
678
792
|
</td>
|
679
793
|
<td>
|
680
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
794
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 60</span>
|
681
795
|
|
682
796
|
<span class='def def kw'>def</span> <span class='index identifier id'>index</span>
|
683
797
|
<span class='@worksheet ivar id'>@worksheet</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='drawings identifier id'>drawings</span><span class='dot token'>.</span><span class='index identifier id'>index</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='rparen token'>)</span>
|
@@ -729,12 +843,12 @@ The part name for this drawing
|
|
729
843
|
<pre class="lines">
|
730
844
|
|
731
845
|
|
732
|
-
|
733
|
-
|
734
|
-
|
846
|
+
68
|
847
|
+
69
|
848
|
+
70</pre>
|
735
849
|
</td>
|
736
850
|
<td>
|
737
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
851
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 68</span>
|
738
852
|
|
739
853
|
<span class='def def kw'>def</span> <span class='pn identifier id'>pn</span>
|
740
854
|
<span class='dstring node'>"#{DRAWING_PN % (index+1)}"</span>
|
@@ -786,24 +900,28 @@ The drawing’s relationships.
|
|
786
900
|
<pre class="lines">
|
787
901
|
|
788
902
|
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
903
|
+
76
|
904
|
+
77
|
905
|
+
78
|
906
|
+
79
|
907
|
+
80
|
908
|
+
81
|
909
|
+
82
|
910
|
+
83
|
911
|
+
84
|
912
|
+
85</pre>
|
797
913
|
</td>
|
798
914
|
<td>
|
799
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
915
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 76</span>
|
800
916
|
|
801
917
|
<span class='def def kw'>def</span> <span class='relationships identifier id'>relationships</span>
|
802
918
|
<span class='r identifier id'>r</span> <span class='assign token'>=</span> <span class='Relationships constant id'>Relationships</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
|
803
|
-
<span class='
|
804
|
-
<span class='chart identifier id'>chart</span> <span class='assign token'>=</span> <span class='anchor identifier id'>anchor</span><span class='dot token'>.</span><span class='graphic_frame identifier id'>graphic_frame</span><span class='dot token'>.</span><span class='chart identifier id'>chart</span>
|
919
|
+
<span class='charts identifier id'>charts</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='chart identifier id'>chart</span><span class='bitor op'>|</span>
|
805
920
|
<span class='r identifier id'>r</span> <span class='lshft op'><<</span> <span class='Relationship constant id'>Relationship</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='CHART_R constant id'>CHART_R</span><span class='comma token'>,</span> <span class='dstring node'>"../#{chart.pn}"</span><span class='rparen token'>)</span>
|
806
921
|
<span class='end end kw'>end</span>
|
922
|
+
<span class='images identifier id'>images</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='image identifier id'>image</span><span class='bitor op'>|</span>
|
923
|
+
<span class='r identifier id'>r</span> <span class='lshft op'><<</span> <span class='Relationship constant id'>Relationship</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='IMAGE_R constant id'>IMAGE_R</span><span class='comma token'>,</span> <span class='dstring node'>"../#{image.pn}"</span><span class='rparen token'>)</span>
|
924
|
+
<span class='end end kw'>end</span>
|
807
925
|
<span class='r identifier id'>r</span>
|
808
926
|
<span class='end end kw'>end</span>
|
809
927
|
</pre>
|
@@ -853,12 +971,12 @@ The relational part name for this drawing
|
|
853
971
|
<pre class="lines">
|
854
972
|
|
855
973
|
|
856
|
-
|
857
|
-
|
858
|
-
|
974
|
+
72
|
975
|
+
73
|
976
|
+
74</pre>
|
859
977
|
</td>
|
860
978
|
<td>
|
861
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
979
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 72</span>
|
862
980
|
|
863
981
|
<span class='def def kw'>def</span> <span class='rels_pn identifier id'>rels_pn</span>
|
864
982
|
<span class='dstring node'>"#{DRAWING_RELS_PN % (index+1)}"</span>
|
@@ -910,12 +1028,12 @@ The relation reference id for this drawing
|
|
910
1028
|
<pre class="lines">
|
911
1029
|
|
912
1030
|
|
913
|
-
|
914
|
-
|
915
|
-
|
1031
|
+
64
|
1032
|
+
65
|
1033
|
+
66</pre>
|
916
1034
|
</td>
|
917
1035
|
<td>
|
918
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
1036
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 64</span>
|
919
1037
|
|
920
1038
|
<span class='def def kw'>def</span> <span class='rId identifier id'>rId</span>
|
921
1039
|
<span class='dstring node'>"rId#{index+1}"</span>
|
@@ -967,12 +1085,12 @@ The worksheet that owns the drawing
|
|
967
1085
|
<pre class="lines">
|
968
1086
|
|
969
1087
|
|
970
|
-
|
971
|
-
|
972
|
-
|
1088
|
+
43
|
1089
|
+
44
|
1090
|
+
45</pre>
|
973
1091
|
</td>
|
974
1092
|
<td>
|
975
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
1093
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 43</span>
|
976
1094
|
|
977
1095
|
<span class='def def kw'>def</span> <span class='worksheet identifier id'>worksheet</span>
|
978
1096
|
<span class='@worksheet ivar id'>@worksheet</span>
|
@@ -1032,17 +1150,77 @@ Adds a chart to the drawing.
|
|
1032
1150
|
<pre class="lines">
|
1033
1151
|
|
1034
1152
|
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1153
|
+
98
|
1154
|
+
99
|
1155
|
+
100
|
1156
|
+
101</pre>
|
1039
1157
|
</td>
|
1040
1158
|
<td>
|
1041
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
1159
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 98</span>
|
1042
1160
|
|
1043
1161
|
<span class='def def kw'>def</span> <span class='add_chart identifier id'>add_chart</span><span class='lparen token'>(</span><span class='chart_type identifier id'>chart_type</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>
|
1044
|
-
<span class='TwoCellAnchor constant id'>TwoCellAnchor</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='comma token'>,</span> <span class='
|
1045
|
-
<span class='@anchors ivar id'>@anchors</span><span class='dot token'>.</span><span class='last identifier id'>last</span><span class='dot token'>.</span><span class='
|
1162
|
+
<span class='TwoCellAnchor constant id'>TwoCellAnchor</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='rparen token'>)</span>
|
1163
|
+
<span class='@anchors ivar id'>@anchors</span><span class='dot token'>.</span><span class='last identifier id'>last</span><span class='dot token'>.</span><span class='add_chart identifier id'>add_chart</span><span class='lparen token'>(</span><span class='chart_type identifier id'>chart_type</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='rparen token'>)</span>
|
1164
|
+
<span class='end end kw'>end</span>
|
1165
|
+
</pre>
|
1166
|
+
</td>
|
1167
|
+
</tr>
|
1168
|
+
</table>
|
1169
|
+
</div>
|
1170
|
+
|
1171
|
+
<div class="method_details ">
|
1172
|
+
<p class="signature " id="add_image-instance_method">
|
1173
|
+
|
1174
|
+
- (<tt>Object</tt>) <strong>add_image</strong>(options = {})
|
1175
|
+
|
1176
|
+
|
1177
|
+
|
1178
|
+
</p><div class="docstring">
|
1179
|
+
<div class="discussion">
|
1180
|
+
|
1181
|
+
<div class="note notetag">
|
1182
|
+
<strong>Note:</strong>
|
1183
|
+
<div class='inline'><p>
|
1184
|
+
The recommended way to manage images is to use Worksheet.add_image. Please
|
1185
|
+
refer to that method for documentation.
|
1186
|
+
</p>
|
1187
|
+
</div>
|
1188
|
+
</div>
|
1189
|
+
|
1190
|
+
<p>
|
1191
|
+
Adds an image to the chart
|
1192
|
+
</p>
|
1193
|
+
|
1194
|
+
|
1195
|
+
</div>
|
1196
|
+
</div>
|
1197
|
+
<div class="tags">
|
1198
|
+
|
1199
|
+
|
1200
|
+
<h3>See Also:</h3>
|
1201
|
+
<ul class="see">
|
1202
|
+
|
1203
|
+
<li><span class='object_link'><a href="Worksheet.html#add_image-instance_method" title="Axlsx::Worksheet#add_image (method)">Worksheet#add_image</a></span></li>
|
1204
|
+
|
1205
|
+
</ul>
|
1206
|
+
|
1207
|
+
</div><table class="source_code">
|
1208
|
+
<tr>
|
1209
|
+
<td>
|
1210
|
+
<pre class="lines">
|
1211
|
+
|
1212
|
+
|
1213
|
+
90
|
1214
|
+
91
|
1215
|
+
92
|
1216
|
+
93</pre>
|
1217
|
+
</td>
|
1218
|
+
<td>
|
1219
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 90</span>
|
1220
|
+
|
1221
|
+
<span class='def def kw'>def</span> <span class='add_image identifier id'>add_image</span><span class='lparen 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>
|
1222
|
+
<span class='OneCellAnchor constant id'>OneCellAnchor</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='rparen token'>)</span>
|
1223
|
+
<span class='@anchors ivar id'>@anchors</span><span class='dot token'>.</span><span class='last identifier id'>last</span><span class='dot token'>.</span><span class='object identifier id'>object</span>
|
1046
1224
|
<span class='end end kw'>end</span>
|
1047
1225
|
</pre>
|
1048
1226
|
</td>
|
@@ -1088,17 +1266,17 @@ Serializes the drawing
|
|
1088
1266
|
<pre class="lines">
|
1089
1267
|
|
1090
1268
|
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1269
|
+
142
|
1270
|
+
143
|
1271
|
+
144
|
1272
|
+
145
|
1273
|
+
146
|
1274
|
+
147
|
1275
|
+
148
|
1276
|
+
149</pre>
|
1099
1277
|
</td>
|
1100
1278
|
<td>
|
1101
|
-
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line
|
1279
|
+
<pre class="code"><span class="info file"># File 'lib/axlsx/drawing/drawing.rb', line 142</span>
|
1102
1280
|
|
1103
1281
|
<span class='def def kw'>def</span> <span class='to_xml identifier id'>to_xml</span>
|
1104
1282
|
<span class='builder identifier id'>builder</span> <span class='assign token'>=</span> <span class='Nokogiri constant id'>Nokogiri</span><span class='colon2 op'>::</span><span class='XML constant id'>XML</span><span class='colon2 op'>::</span><span class='Builder constant id'>Builder</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:encoding</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='ENCODING constant id'>ENCODING</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='xml identifier id'>xml</span><span class='bitor op'>|</span>
|
@@ -1119,7 +1297,7 @@ Serializes the drawing
|
|
1119
1297
|
</div>
|
1120
1298
|
|
1121
1299
|
<div id="footer">
|
1122
|
-
Generated on Wed Nov 23
|
1300
|
+
Generated on Wed Nov 23 21:47:47 2011 by
|
1123
1301
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1124
1302
|
0.7.3 (ruby-1.8.7).
|
1125
1303
|
</div>
|