From 4d16bfc43780e5d3f7368625700b583e3e98217a Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 18:11:42 +0900 Subject: adding in row_style and col_style methods to worksheet and active record 'acts_as_axlsx' to provide to_xlsx. --- doc/Axlsx/Series.html | 230 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 179 insertions(+), 51 deletions(-) (limited to 'doc/Axlsx/Series.html') diff --git a/doc/Axlsx/Series.html b/doc/Axlsx/Series.html index f93a1220..29aca381 100644 --- a/doc/Axlsx/Series.html +++ b/doc/Axlsx/Series.html @@ -97,14 +97,16 @@
Note: -
-

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

+

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

- -

A Series defines the common series attributes and is the super class for -all concrete series types.

+

+A Series defines the common series attributes and is the super class for +all concrete series types. +

@@ -149,8 +151,9 @@ all concrete series types.

-
-

The chart that owns this series.

+

+The chart that owns this series. +

@@ -175,8 +178,9 @@ all concrete series types.

-
-

The title of the series.

+

+The title of the series. +

@@ -211,8 +215,9 @@ all concrete series types.

-
-

The index of this series in the chart's series.

+

+The index of this series in the chart’s series. +

@@ -236,8 +241,9 @@ all concrete series types.

-
-

Creates a new series.

+

+Creates a new series. +

@@ -259,8 +265,9 @@ all concrete series types.

-
-

The order of this series in the chart's series.

+

+The order of this series in the chart’s series. +

@@ -284,6 +291,30 @@ all concrete series types.

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

    +Serializes the series. +

    +
    +
  • @@ -302,8 +333,9 @@ all concrete series types.

    - -

    Creates a new series

    +

    +Creates a new series +

    @@ -335,8 +367,9 @@ all concrete series types.

    — -
    -

    a customizable set of options

    +

    +a customizable set of options +

    @@ -391,14 +424,15 @@ all concrete series types.

    # File 'lib/axlsx/drawing/series.rb', line 20
     
    -def initialize(chart, options={})
    -  @order = nil
    -  self.chart = chart
    -  @chart.series << self
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -end
    +def initialize(chart, options={}) + @order = nil + self.chart = chart + @chart.series << self + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end + @@ -421,8 +455,9 @@ all concrete series types.

    - -

    The chart that owns this series

    +

    +The chart that owns this series +

    @@ -456,9 +491,10 @@ all concrete series types.

    # File 'lib/axlsx/drawing/series.rb', line 10
     
    -def chart
    -  @chart
    -end
    +def chart + @chart +end + @@ -476,8 +512,9 @@ all concrete series types.

    - -

    The title of the series

    +

    +The title of the series +

    @@ -511,9 +548,10 @@ all concrete series types.

    # File 'lib/axlsx/drawing/series.rb', line 14
     
    -def title
    -  @title
    -end
    +def title + @title +end + @@ -535,8 +573,9 @@ all concrete series types.

    - -

    The index of this series in the chart's series.

    +

    +The index of this series in the chart’s series. +

    @@ -570,9 +609,10 @@ all concrete series types.

    # File 'lib/axlsx/drawing/series.rb', line 31
     
    -def index
    -  @chart.series.index(self)
    -end
    +def index + @chart.series.index(self) +end + @@ -587,9 +627,10 @@ all concrete series types.

    - -

    The order of this series in the chart's series. By default the order is the -index of the series.

    +

    +The order of this series in the chart’s series. By default the order +is the index of the series. +

    @@ -623,9 +664,10 @@ index of the series.

    # File 'lib/axlsx/drawing/series.rb', line 38
     
    -def order
    -  @order || index
    -end
    +def order + @order || index +end + @@ -665,7 +707,93 @@ index of the series.

    # File 'lib/axlsx/drawing/series.rb', line 43
     
    -def order=(v)  Axlsx::validate_unsigned_int(v); @order = v; end
    +def order=(v) Axlsx::validate_unsigned_int(v); @order = v end + + + + +
    + +
    +

    + + - (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) + + + +
    • + +
    + +
    + + +
    +
    +
    +
    +60
    +61
    +62
    +63
    +64
    +65
    +66
    +67
    +
    +
    # File 'lib/axlsx/drawing/series.rb', line 60
    +
    +def to_xml(xml)
    +  xml.send('c:ser') {
    +    xml.send('c:idx', :val=>index)
    +    xml.send('c:order', :val=>order || index)        
    +    title.to_xml(xml) unless title.nil?
    +    yield xml if block_given?
    +  }
    +end
    +
    @@ -676,9 +804,9 @@ index of the series.

    -- cgit v1.2.3