From 35dc7e6956334cf5ca57582d36ebb0af984cddb5 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Mon, 21 Nov 2011 23:46:50 +0900 Subject: more docs --- doc/Axlsx/Line3DChart.html | 921 +++++++++++++++++++++++++++++++++++++++++++++ doc/Axlsx/LineSeries.html | 656 ++++++++++++++++++++++++++++++++ doc/Axlsx/SerAxis.html | 624 ++++++++++++++++++++++++++++++ doc/Axlsx/SeriesTitle.html | 289 ++++++++++++++ 4 files changed, 2490 insertions(+) create mode 100644 doc/Axlsx/Line3DChart.html create mode 100644 doc/Axlsx/LineSeries.html create mode 100644 doc/Axlsx/SerAxis.html create mode 100644 doc/Axlsx/SeriesTitle.html diff --git a/doc/Axlsx/Line3DChart.html b/doc/Axlsx/Line3DChart.html new file mode 100644 index 00000000..edb59aba --- /dev/null +++ b/doc/Axlsx/Line3DChart.html @@ -0,0 +1,921 @@ + + + + + + Class: Axlsx::Line3DChart + + — Documentation by YARD 0.7.3 + + + + + + + + + + + + + + + + + + + + + + +

Class: Axlsx::Line3DChart + + + +

+ +
+ +
Inherits:
+
+ Chart + +
    +
  • Object
  • + + + + + +
+ show all + +
+ + + + + + + + + +
Defined in:
+
lib/axlsx/drawing/line_3D_chart.rb
+ +
+
+ +

Overview

+
+

+The Line3DChart is a three dimentional line chart (who would have guessed?) +that you can add to your worksheet. +

+ + +
+
+
+ +
+

Examples:

+ +

+Creating a chart +

+

+
# This example creates a line in a single sheet.
+require "rubygems" # if that is your preferred way to manage gems!
+require "axlsx"
+
+p = Axlsx::Package.new
+ws = p.workbook.add_worksheet
+ws.add_row :values => ["This is a chart with no data in the sheet"]
+
+chart = ws.add_chart(Axlsx::Line3DChart, :start_at=> [0,1], :end_at=>[0,6], :title=>"Most Popular Pets")
+chart.add_series :data => [1, 9, 10], :labels => ["Slimy Reptiles", "Fuzzy Bunnies", "Rottweiler"]
+
+ +
+ + +

See Also:

+ + +
+

Constant Summary

+ +
+ +
GAP_AMOUNT_PERCENT = +
+
+

+validation regex for gap amount percent +

+ + +
+
+
+ + +
+
+
/0*(([0-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)%/
+
+ +
+ + + + + + + +

Instance Attribute Summary (collapse)

+ + + + + + + + + +

Attributes inherited from Chart

+

end_at, graphic_frame, index, pn, series, series_type, show_legend, start_at, style, title, view3D

+ + + +

+ Instance Method Summary + (collapse) +

+ + + + + + + + + + + + +

Methods inherited from Chart

+

#add_series

+
+

Constructor Details

+ +
+

+ + - (Line3DChart) initialize(frame, options = {}) + + + +

+
+

+Creates a new line chart object +

+ + +
+
+
+

Parameters:

+
    + +
  • + + frame + + + (GraphicFrame) + + + + — +

    +The workbook that owns this chart. +

    +
    + +
  • + +
  • + + options + + + (Hash) + + + (defaults to: {}) + + + — +

    +a customizable set of options +

    +
    + +
  • + +
+ + + + + + +

Options Hash (options):

+
    + +
  • + grouping + (Symbol) + + + + +
  • + +
  • + gapDepth + (String) + + + + +
  • + +
+ + + +
+ + + + +
+
+
+
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+
+
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 51
+
+def initialize(frame, options={})
+  @grouping = :standard
+  @catAxId = rand(8 ** 8)
+  @valAxId = rand(8 ** 8)
+  @serAxId = rand(8 ** 8)
+  @catAxis = CatAxis.new(@catAxId, @valAxId)
+  @valAxis = ValAxis.new(@valAxId, @catAxId)
+  @serAxis = SerAxis.new(@serAxId, @valAxId)
+  @view3D = View3D.new(:perspective=>30)
+  super(frame, options)      
+  @series_type = LineSeries
+end
+
+
+
+ +
+ +
+

Instance Attribute Details

+ + + + +
+

+ + - (CatAxis) catAxis (readonly) + + + +

+
+

+the category axis +

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+25
+26
+27
+
+
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 25
+
+def catAxis
+  @catAxis
+end
+
+
+
+ + + + +
+

+ + - (String) gapDepth + + + +

+
+

+space between bar or column clusters, as a percentage of the bar or column +width. +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+37
+38
+39
+
+
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 37
+
+def gapDepth
+  @gapDepth
+end
+
+
+
+ + + + +
+

+ + - (Symbol) grouping + + + +

+
+

+grouping for a column, line, or area chart. must be one of +[:percentStacked, :clustered, :standard, :stacked] +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Symbol) + + + +
  • + +
+ +
+ + + + +
+
+
+
+42
+43
+44
+
+
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 42
+
+def grouping
+  @grouping
+end
+
+
+
+ + + + +
+

+ + - (Axis) serAxis (readonly) + + + +

+
+

+the category axis +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Axis) + + + +
  • + +
+ +
+ + + + +
+
+
+
+33
+34
+35
+
+
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 33
+
+def serAxis
+  @serAxis
+end
+
+
+
+ + + + +
+

+ + - (ValAxis) valAxis (readonly) + + + +

+
+

+the category axis +

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+29
+30
+31
+
+
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 29
+
+def valAxis
+  @valAxis
+end
+
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + - (String) to_xml + + + +

+
+

+Serializes the bar chart +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+
+
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 76
+
+def to_xml
+  super() do |xml|
+    xml.send('c:line3DChart') {
+      xml.send('c:grouping', :val=>grouping)
+      xml.send('c:varyColors', :val=>1)
+      @series.each { |ser| ser.to_xml(xml) }
+      xml.send('c:gapDepth', :val=>@gapDepth) unless @gapDepth.nil?
+      xml.send('c:axId', :val=>@catAxId)
+      xml.send('c:axId', :val=>@valAxId)
+      xml.send('c:axId', :val=>@serAxId)
+    }
+    @catAxis.to_xml(xml)
+    @valAxis.to_xml(xml)
+    @serAxis.to_xml(xml)
+  end
+end
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file diff --git a/doc/Axlsx/LineSeries.html b/doc/Axlsx/LineSeries.html new file mode 100644 index 00000000..4e9b1b45 --- /dev/null +++ b/doc/Axlsx/LineSeries.html @@ -0,0 +1,656 @@ + + + + + + Class: Axlsx::LineSeries + + — Documentation by YARD 0.7.3 + + + + + + + + + + + + + + + + + + + + + + +

Class: Axlsx::LineSeries + + + +

+ +
+ +
Inherits:
+
+ Series + +
    +
  • Object
  • + + + + + +
+ show all + +
+ + + + + + + + + +
Defined in:
+
lib/axlsx/drawing/line_series.rb
+ +
+
+ +

Overview

+
+ +
+ Note: +

+The recommended way to manage series is to use Chart#add_series +

+
+
+ +

+A LineSeries defines the title, data and labels for line charts +

+ + +
+
+
+ + +

See Also:

+ + +
+ + + + + +

Instance Attribute Summary (collapse)

+ + + + + + + + + +

Attributes inherited from Series

+

chart, index, order, title

+ + + +

+ Instance Method Summary + (collapse) +

+ + + + + + + + + +
+

Constructor Details

+ +
+

+ + - (LineSeries) initialize(chart, options = {}) + + + +

+
+

+Creates a new series +

+ + +
+
+
+

Parameters:

+
    + +
  • + + chart + + + (Chart) + + + +
  • + +
  • + + options + + + (Hash) + + + (defaults to: {}) + + + — +

    +a customizable set of options +

    +
    + +
  • + +
+ + + + + + +

Options Hash (options):

+ + + + +
+ + + + +
+
+
+
+20
+21
+22
+23
+24
+
+
# File 'lib/axlsx/drawing/line_series.rb', line 20
+
+def initialize(chart, options={})
+  super(chart, options)
+  self.data = options[:data]  || []
+  self.labels = options[:labels] || []
+end
+
+
+
+ +
+ +
+

Instance Attribute Details

+ + + + +
+

+ + - (Array, SimpleTypedList) data + + + +

+
+

+The data for this series. +

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+10
+11
+12
+
+
# File 'lib/axlsx/drawing/line_series.rb', line 10
+
+def data
+  @data
+end
+
+
+
+ + + + +
+

+ + - (Array, SimpleTypedList) labels + + + +

+
+

+The labels for this series. +

+ + +
+
+
+ +

Returns:

+ + +
+ + + + +
+
+
+
+14
+15
+16
+
+
# File 'lib/axlsx/drawing/line_series.rb', line 14
+
+def labels
+  @labels
+end
+
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + - (String) to_xml(xml) + + + +

+
+

+Serializes the series +

+ + +
+
+
+

Parameters:

+
    + +
  • + + xml + + + (Nokogiri::XML::Builder) + + + + — +

    +The document builder instance this objects xml will be added to. +

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+
+
# File 'lib/axlsx/drawing/line_series.rb', line 29
+
+def to_xml(xml)
+  super(xml) do |xml|
+    if !labels.empty?
+      xml.send('c:cat') {
+        xml.send('c:strRef') {
+          xml.send('c:f', Axlsx::cell_range(labels))
+          xml.send('c:strCache') {
+            xml.send('c:ptCount', :val=>labels.size)
+            labels.each_with_index do |cell, index|
+              v = cell.is_a?(Cell) ? cell.value : cell
+              xml.send('c:pt', :idx=>index) {
+                xml.send('c:v', v)
+              }                          
+            end
+          }
+        }
+      }
+    end
+    xml.send('c:val') {
+      xml.send('c:numRef') {
+        xml.send('c:f', Axlsx::cell_range(data))
+        xml.send('c:numCache') {
+          xml.send('c:formatCode', 'General')
+          xml.send('c:ptCount', :val=>data.size)
+          data.each_with_index do |cell, index|
+            v = cell.is_a?(Cell) ? cell.value : cell
+            xml.send('c:pt', :idx=>index) {
+              xml.send('c:v', v) 
+            }
+          end
+        }                        
+      }
+    }
+  end      
+end
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file diff --git a/doc/Axlsx/SerAxis.html b/doc/Axlsx/SerAxis.html new file mode 100644 index 00000000..9158627a --- /dev/null +++ b/doc/Axlsx/SerAxis.html @@ -0,0 +1,624 @@ + + + + + + Class: Axlsx::SerAxis + + — Documentation by YARD 0.7.3 + + + + + + + + + + + + + + + + + + + + + + +

Class: Axlsx::SerAxis + + + +

+ +
+ +
Inherits:
+
+ Axis + +
    +
  • Object
  • + + + + + +
+ show all + +
+ + + + + + + + + +
Defined in:
+
lib/axlsx/drawing/ser_axis.rb
+ +
+
+ +

Overview

+
+

+A SarAxis object defines a series axis +

+ + +
+
+
+ + +
+ + + + + +

Instance Attribute Summary (collapse)

+ + + + + + + + + +

Attributes inherited from Axis

+

axId, axPos, crossAx, crosses, format_code, scaling, tickLblPos

+ + + +

+ Instance Method Summary + (collapse) +

+ + + + + + + + + +
+

Constructor Details

+ +
+

+ + - (SerAxis) initialize(axId, crossAx, options = {}) + + + +

+
+

+Creates a new SerAxis object +

+ + +
+
+
+

Parameters:

+
    + +
  • + + axId + + + (Integer) + + + + — +

    +the id of this axis +

    +
    + +
  • + +
  • + + crossAx + + + (Integer) + + + + — +

    +the id of the perpendicular axis +

    +
    + +
  • + +
  • + + options + + + (Hash) + + + (defaults to: {}) + + + — +

    +a customizable set of options +

    +
    + +
  • + +
+ + + + + + + + +

Options Hash (options):

+
    + +
  • + axPos + (Symbol) + + + + +
  • + +
  • + tickLblPos + (Symbol) + + + + +
  • + +
  • + crosses + (Symbol) + + + + +
  • + +
  • + tickLblSkip + (Boolean) + + + + +
  • + +
  • + tickMarkSkip + (Symbol) + + + + +
  • + +
+ + + +
+ + + + +
+
+
+
+19
+20
+21
+22
+23
+24
+
+
# File 'lib/axlsx/drawing/ser_axis.rb', line 19
+
+def initialize(axId, crossAx, options={})
+  super(axId, crossAx, options)
+  options.each do |o|
+    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
+  end
+end
+
+
+
+ +
+ +
+

Instance Attribute Details

+ + + + +
+

+ + - (Boolean) tickLblSkip + + + +

+
+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+6
+7
+8
+
+
# File 'lib/axlsx/drawing/ser_axis.rb', line 6
+
+def tickLblSkip
+  @tickLblSkip
+end
+
+
+
+ + + + +
+

+ + - (Boolean) tickMarkSkip + + + +

+
+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + +
  • + +
+ +
+ + + + +
+
+
+
+9
+10
+11
+
+
# File 'lib/axlsx/drawing/ser_axis.rb', line 9
+
+def tickMarkSkip
+  @tickMarkSkip
+end
+
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + - (String) to_xml(xml) + + + +

+
+

+Serializes the series axis +

+ + +
+
+
+

Parameters:

+
    + +
  • + + xml + + + (Nokogiri::XML::Builder) + + + + — +

    +The document builder instance this objects xml will be added to. +

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+32
+33
+34
+35
+36
+37
+38
+
+
# File 'lib/axlsx/drawing/ser_axis.rb', line 32
+
+def to_xml(xml)
+  xml.send('c:serAx') {
+    super(xml)
+    xml.send('c:tickLblSkip', :val=>@tickLblSkip) unless @tickLblSkip.nil?
+    xml.send('c:tickMarkSkip', :val=>@tickMarkSkip) unless @tickMarkSkip.nil?
+  }
+end
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file diff --git a/doc/Axlsx/SeriesTitle.html b/doc/Axlsx/SeriesTitle.html new file mode 100644 index 00000000..7be16adf --- /dev/null +++ b/doc/Axlsx/SeriesTitle.html @@ -0,0 +1,289 @@ + + + + + + Class: Axlsx::SeriesTitle + + — Documentation by YARD 0.7.3 + + + + + + + + + + + + + + + + + + + + + + +

Class: Axlsx::SeriesTitle + + + +

+ +
+ +
Inherits:
+
+ Title + +
    +
  • Object
  • + + + + + +
+ show all + +
+ + + + + + + + + +
Defined in:
+
lib/axlsx/drawing/series_title.rb
+ +
+
+ +

Overview

+
+

+A series title is a Title with a slightly different serialization +

+ + +
+
+
+ + +
+ + + + + + + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Title

+

cell, text

+ + + +

+ Instance Method Summary + (collapse) +

+ + + + + + + + + + + + +

Methods inherited from Title

+

#initialize, #range

+
+

Constructor Details

+ +

This class inherits a constructor from Axlsx::Title

+ +
+ + +
+

Instance Method Details

+ + +
+

+ + - (String) to_xml(xml) + + + +

+
+

+Serializes the series title +

+ + +
+
+
+

Parameters:

+
    + +
  • + + xml + + + (Nokogiri::XML::Builder) + + + + — +

    +The document builder instance this objects xml will be added to. +

    +
    + +
  • + +
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+
+
# File 'lib/axlsx/drawing/series_title.rb', line 8
+
+def to_xml(xml)
+  xml.send('c:tx') {
+    xml.send('c:strRef') {
+      xml.send('c:f', range)
+      xml.send('c:strCache') {
+        xml.send('c:ptCount', :val=>1)
+        xml.send('c:pt', :idx=>0) {
+          xml.send('c:v', @text)
+        }
+      }
+    }
+  }
+end
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file -- cgit v1.2.3