From 4d16bfc43780e5d3f7368625700b583e3e98217a Mon Sep 17 00:00:00 2001
From: Randy Morgan 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.
+
The chart that owns this series.
++The chart that owns this series. +
The title of the series.
++The title of the series. +
The index of this series in the chart's series.
++The index of this series in the chart’s series. +
Creates a new series.
++Creates a new series. +
The order of this series in the chart's series.
++The order of this series in the chart’s series. +
+Serializes the series. +
+Creates a new series
++Creates a new series +
a customizable set of options
++a customizable set of options +
# File 'lib/axlsx/drawing/series.rb', line 20 -def initialize(chart, ={}) - @order = nil - self.chart = chart - @chart.series << self - .each do |o| - self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" - end -end+def initialize(chart, ={}) + @order = nil + self.chart = chart + @chart.series << self + .each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end +
The chart that owns this series
++The chart that owns this series +
# File 'lib/axlsx/drawing/series.rb', line 10 -def chart - @chart -end+def chart + @chart +end +
The title of the series
++The title of the series +
# File 'lib/axlsx/drawing/series.rb', line 14 -def title - @title -end+def title + @title +end +
The index of this series in the chart's series.
++The index of this series in the chart’s series. +
# File 'lib/axlsx/drawing/series.rb', line 31 -def index - @chart.series.index(self) -end+def index + @chart.series.index(self) +end +
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. +
# File 'lib/axlsx/drawing/series.rb', line 38 -def order - @order || index -end+def order + @order || index +end +
# 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 +
+ + +
+ + + +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 + |