From 058faf2581970fa18c314ad07f5658adeca32c69 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 22:08:55 +0900 Subject: update to README --- doc/Axlsx/Chart.html | 417 ++++++++++++++++++++++----------------------------- 1 file changed, 179 insertions(+), 238 deletions(-) (limited to 'doc/Axlsx/Chart.html') diff --git a/doc/Axlsx/Chart.html b/doc/Axlsx/Chart.html index 77cc801b..c017f7ca 100644 --- a/doc/Axlsx/Chart.html +++ b/doc/Axlsx/Chart.html @@ -97,16 +97,14 @@
Note: -

-Worksheet#add_chart is the recommended way to create charts for your -worksheets. -

+
+

Worksheet#add_chart is the recommended way to create charts for your +worksheets.

-

-A Chart is the superclass for specific charts -

+ +

A Chart is the superclass for specific charts

@@ -149,9 +147,8 @@ A Chart is the superclass for specific charts -

-A reference to the graphic frame that owns this chart. -

+
+

A reference to the graphic frame that owns this chart.

@@ -176,9 +173,8 @@ A reference to the graphic frame that owns this chart. -

-A collection of series objects that are applied to the chart. -

+
+

A collection of series objects that are applied to the chart.

@@ -203,9 +199,8 @@ A collection of series objects that are applied to the chart. -

-The type of series to use for this chart. -

+
+

The type of series to use for this chart.

@@ -230,9 +225,8 @@ The type of series to use for this chart. -

-Show the legend in the chart. -

+
+

Show the legend in the chart.

@@ -257,9 +251,8 @@ Show the legend in the chart. -

-The style for the chart. -

+
+

The style for the chart.

@@ -284,9 +277,8 @@ The style for the chart. -

-The title object for the chart. -

+
+

The title object for the chart.

@@ -311,9 +303,8 @@ The title object for the chart. -

-The 3D view properties for the chart. -

+
+

The 3D view properties for the chart.

@@ -348,9 +339,8 @@ The 3D view properties for the chart. -

-Adds a new series to the chart’s series collection. -

+
+

Adds a new series to the chart's series collection.

@@ -372,10 +362,9 @@ Adds a new series to the chart’s series collection. -

-This is a short cut method to set the end anchor position If you need finer -granularity in positioning use graphic_frame.anchor.to.colOff / rowOff. -

+
+

This is a short cut method to set the end anchor position If you need finer +granularity in positioning use graphic_frame.anchor.to.colOff / rowOff.

@@ -397,10 +386,9 @@ granularity in positioning use graphic_frame.anchor.to.colOff / rowOff. -

-backwards compatibility to allow chart.to and chart.from access to anchor -markers. -

+
+

backwards compatibility to allow chart.to and chart.from access to anchor +markers.

@@ -422,9 +410,8 @@ markers. -

-The index of this chart in the workbooks charts collection. -

+
+

The index of this chart in the workbooks charts collection.

@@ -448,9 +435,8 @@ The index of this chart in the workbooks charts collection. -

-Creates a new chart object. -

+
+

Creates a new chart object.

@@ -472,9 +458,8 @@ Creates a new chart object. -

-The part name for this chart. -

+
+

The part name for this chart.

@@ -496,11 +481,10 @@ The part name for this chart. -

-This is a short cut method to set the start anchor position If you need +

+

This is a short cut method to set the start anchor position If you need finer granularity in positioning use graphic_frame.anchor.from.colOff / -rowOff. -

+rowOff.

@@ -522,10 +506,9 @@ rowOff. -

-backwards compatibility to allow chart.to and chart.from access to anchor -markers. -

+
+

backwards compatibility to allow chart.to and chart.from access to anchor +markers.

@@ -547,9 +530,8 @@ markers. -

-Chart Serialization serializes the chart. -

+
+

Chart Serialization serializes the chart.

@@ -570,9 +552,8 @@ Chart Serialization serializes the chart.

-

-Creates a new chart object -

+ +

Creates a new chart object

@@ -591,9 +572,8 @@ Creates a new chart object — -

-The frame that holds this chart. -

+
+

The frame that holds this chart.

@@ -610,9 +590,8 @@ The frame that holds this chart. — -

-a customizable set of options -

+
+

a customizable set of options

@@ -674,9 +653,8 @@ a customizable set of options — -

-the object that the method was called on -

+
+

the object that the method was called on

@@ -707,21 +685,20 @@ the object that the method was called on
# File 'lib/axlsx/drawing/chart.rb', line 44
 
-def initialize(frame, options={})
-  @style = 2
-  @graphic_frame=frame
-  @graphic_frame.anchor.drawing.worksheet.workbook.charts << self
-  @series = SimpleTypedList.new Series
-  @show_legend = true
-  @series_type = Series
-  options.each do |o|
-    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
-  end
-  start_at(*options[:start_at]) if options[:start_at]
-  end_at(*options[:end_at]) if options[:start_at]
-  yield self if block_given?
-end
-
+def initialize(frame, options={}) + @style = 2 + @graphic_frame=frame + @graphic_frame.anchor.drawing.worksheet.workbook.charts << self + @series = SimpleTypedList.new Series + @show_legend = true + @series_type = Series + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end + start_at(*options[:start_at]) if options[:start_at] + end_at(*options[:end_at]) if options[:start_at] + yield self if block_given? +end @@ -744,9 +721,8 @@ the object that the method was called on

-

-A reference to the graphic frame that owns this chart -

+ +

A reference to the graphic frame that owns this chart

@@ -780,10 +756,9 @@ A reference to the graphic frame that owns this chart
# File 'lib/axlsx/drawing/chart.rb', line 14
 
-def graphic_frame
-  @graphic_frame
-end
-
+def graphic_frame + @graphic_frame +end @@ -801,9 +776,8 @@ A reference to the graphic frame that owns this chart

-

-A collection of series objects that are applied to the chart -

+ +

A collection of series objects that are applied to the chart

@@ -837,10 +811,9 @@ A collection of series objects that are applied to the chart
# File 'lib/axlsx/drawing/chart.rb', line 18
 
-def series
-  @series
-end
-
+def series + @series +end @@ -858,9 +831,8 @@ A collection of series objects that are applied to the chart

-

-The type of series to use for this chart. -

+ +

The type of series to use for this chart.

@@ -894,10 +866,9 @@ The type of series to use for this chart.
# File 'lib/axlsx/drawing/chart.rb', line 22
 
-def series_type
-  @series_type
-end
-
+def series_type + @series_type +end @@ -915,9 +886,8 @@ The type of series to use for this chart.

-

-Show the legend in the chart -

+ +

Show the legend in the chart

@@ -951,10 +921,9 @@ Show the legend in the chart
# File 'lib/axlsx/drawing/chart.rb', line 38
 
-def show_legend
-  @show_legend
-end
-
+def show_legend + @show_legend +end @@ -972,9 +941,8 @@ Show the legend in the chart

-

-The style for the chart. see ECMA Part 1 §21.2.2.196 -

+ +

The style for the chart. see ECMA Part 1 §21.2.2.196

@@ -1008,10 +976,9 @@ The style for the chart. see ECMA Part 1 §21.2.2.196
# File 'lib/axlsx/drawing/chart.rb', line 34
 
-def style
-  @style
-end
-
+def style + @style +end @@ -1029,9 +996,8 @@ The style for the chart. see ECMA Part 1 §21.2.2.196

-

-The title object for the chart. -

+ +

The title object for the chart.

@@ -1065,10 +1031,9 @@ The title object for the chart.
# File 'lib/axlsx/drawing/chart.rb', line 29
 
-def title
-  @title
-end
-
+def title + @title +end @@ -1086,9 +1051,8 @@ The title object for the chart.

-

-The 3D view properties for the chart -

+ +

The 3D view properties for the chart

@@ -1109,10 +1073,9 @@ The 3D view properties for the chart
# File 'lib/axlsx/drawing/chart.rb', line 10
 
-def view3D
-  @view3D
-end
-
+def view3D + @view3D +end @@ -1134,9 +1097,8 @@ The 3D view properties for the chart

-

-Adds a new series to the chart’s series collection. -

+ +

Adds a new series to the chart's series collection.

@@ -1178,11 +1140,10 @@ Adds a new series to the chart’s series collection.
# File 'lib/axlsx/drawing/chart.rb', line 106
 
-def add_series(options={})
-  @series_type.new(self, options)
-  @series.last
-end
-
+def add_series(options={}) + @series_type.new(self, options) + @series.last +end @@ -1197,10 +1158,9 @@ Adds a new series to the chart’s series collection.

-

-This is a short cut method to set the end anchor position If you need finer -granularity in positioning use graphic_frame.anchor.to.colOff / rowOff -

+ +

This is a short cut method to set the end anchor position If you need finer +granularity in positioning use graphic_frame.anchor.to.colOff / rowOff

@@ -1219,9 +1179,8 @@ granularity in positioning use graphic_frame.anchor.to.colOff / rowOff — -

-The column -

+
+

The column

@@ -1236,9 +1195,8 @@ The column — -

-The row -

+
+

The row

@@ -1273,11 +1231,10 @@ The row
# File 'lib/axlsx/drawing/chart.rb', line 154
 
-def end_at(x, y)
-  @graphic_frame.anchor.to.col = x
-  @graphic_frame.anchor.to.row = y
-end
-
+def end_at(x, y) + @graphic_frame.anchor.to.col = x + @graphic_frame.anchor.to.row = y +end @@ -1295,16 +1252,14 @@ The row
Note: -

-This will be disconinued in version 2.0.0. please use the start_at method -

+
+

This will be disconinued in version 2.0.0. please use the start_at method

-

-backwards compatibility to allow chart.to and chart.from access to anchor -markers -

+ +

backwards compatibility to allow chart.to and chart.from access to anchor +markers

@@ -1325,10 +1280,9 @@ markers
# File 'lib/axlsx/drawing/chart.rb', line 99
 
-def from
-  @graphic_frame.anchor.from
-end
-
+def from + @graphic_frame.anchor.from +end @@ -1343,9 +1297,8 @@ markers

-

-The index of this chart in the workbooks charts collection -

+ +

The index of this chart in the workbooks charts collection

@@ -1379,10 +1332,9 @@ The index of this chart in the workbooks charts collection
# File 'lib/axlsx/drawing/chart.rb', line 61
 
-def index
-  @graphic_frame.anchor.drawing.worksheet.workbook.charts.index(self)
-end
-
+def index + @graphic_frame.anchor.drawing.worksheet.workbook.charts.index(self) +end @@ -1397,9 +1349,8 @@ The index of this chart in the workbooks charts collection

-

-The part name for this chart -

+ +

The part name for this chart

@@ -1433,10 +1384,9 @@ The part name for this chart
# File 'lib/axlsx/drawing/chart.rb', line 67
 
-def pn
-  "#{CHART_PN % (index+1)}"
-end
-
+def pn + "#{CHART_PN % (index+1)}" +end @@ -1451,11 +1401,10 @@ The part name for this chart

-

-This is a short cut method to set the start anchor position If you need + +

This is a short cut method to set the start anchor position If you need finer granularity in positioning use graphic_frame.anchor.from.colOff / -rowOff -

+rowOff

@@ -1474,9 +1423,8 @@ rowOff — -

-The column -

+
+

The column

@@ -1491,9 +1439,8 @@ The column — -

-The row -

+
+

The row

@@ -1528,11 +1475,10 @@ The row
# File 'lib/axlsx/drawing/chart.rb', line 143
 
-def start_at(x, y)
-  @graphic_frame.anchor.from.col = x
-  @graphic_frame.anchor.from.row = y
-end
-
+def start_at(x, y) + @graphic_frame.anchor.from.col = x + @graphic_frame.anchor.from.row = y +end @@ -1550,16 +1496,14 @@ The row
Note: -

-This will be disconinued in version 2.0.0. Please use the end_at method -

+
+

This will be disconinued in version 2.0.0. Please use the end_at method

-

-backwards compatibility to allow chart.to and chart.from access to anchor -markers -

+ +

backwards compatibility to allow chart.to and chart.from access to anchor +markers

@@ -1580,10 +1524,9 @@ markers
# File 'lib/axlsx/drawing/chart.rb', line 93
 
-def to
-  @graphic_frame.anchor.to
-end
-
+def to + @graphic_frame.anchor.to +end @@ -1598,9 +1541,8 @@ markers

-

-Chart Serialization serializes the chart -

+ +

Chart Serialization serializes the chart

@@ -1641,30 +1583,29 @@ Chart Serialization serializes the chart
# File 'lib/axlsx/drawing/chart.rb', line 113
 
-def to_xml
-  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
-    xml.send('c:chartSpace',:'xmlns:c' => XML_NS_C, :'xmlns:a' => XML_NS_A) {
-      xml.send('c:date1904', :val=>Axlsx::Workbook.date1904)
-      xml.send('c:style', :val=>style)
-      xml.send('c:chart') {
-        @title.to_xml(xml) unless @title.nil?
-        @view3D.to_xml(xml) unless @view3D.nil?
-        xml.send('c:plotArea') {
-          xml.send('c:layout')
-          yield xml if block_given?
-        }
-        if @show_legend
-          xml.send('c:legend') {
-            xml.send('c:legendPos', :val => "r")
-            xml.send('c:layout')
-          }
-        end
-      }
-    }
-  end
-  builder.to_xml
-end
-
+def to_xml + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + xml.send('c:chartSpace',:xmlns:c' => XML_NS_C, :xmlns:a' => XML_NS_A) { + xml.send('c:date1904', :val=>Axlsx::Workbook.date1904) + xml.send('c:style', :val=>style) + xml.send('c:chart') { + @title.to_xml(xml) unless @title.nil? + @view3D.to_xml(xml) unless @view3D.nil? + xml.send('c:plotArea') { + xml.send('c:layout') + yield xml if block_given? + } + if @show_legend + xml.send('c:legend') { + xml.send('c:legendPos', :val => "r") + xml.send('c:layout') + } + end + } + } + end + builder.to_xml +end @@ -1675,9 +1616,9 @@ Chart Serialization serializes the chart
-- cgit v1.2.3