From 6739c249e7bf3cf7d2132b2aa49b6faf6bebec29 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Wed, 23 Nov 2011 12:28:10 +0900 Subject: -refactoring chart position and axis data/category for chart. -additional specs and documentation improvements. --- doc/Axlsx/TwoCellAnchor.html | 320 ++++++------------------------------------- 1 file changed, 40 insertions(+), 280 deletions(-) (limited to 'doc/Axlsx/TwoCellAnchor.html') diff --git a/doc/Axlsx/TwoCellAnchor.html b/doc/Axlsx/TwoCellAnchor.html index fc8e86a3..20e6e8c8 100644 --- a/doc/Axlsx/TwoCellAnchor.html +++ b/doc/Axlsx/TwoCellAnchor.html @@ -277,30 +277,6 @@ A marker that returns the to cell anchor.
  • - - (Marker) end_at(x, y) - - - - - - - - - - - - -

    -This is a short cut method to set the end anchor position. -

    -
    - -
  • - - -
  • - - - (TwoCellAnchor) initialize(drawing, chart_type, options) @@ -317,31 +293,8 @@ This is a short cut method to set the end anchor position.

    -Creates a new TwoCellAnchor object. -

    -
    - -
  • - - -
  • - - - - (Marker) start_at(x, y) - - - - - - - - - - - - -

    -This is a short cut method to set the start anchor position. +Creates a new TwoCellAnchor object and sets up a reference to the from and +to markers in the graphic_frame’s chart.

    @@ -388,7 +341,9 @@ Serializes the two cell anchor.

    -Creates a new TwoCellAnchor object +Creates a new TwoCellAnchor object and sets up a reference to the from and +to markers in the graphic_frame’s chart. That means that you can do +stuff like c = worksheet.add_chart Axlsx::Chart c.start_at 5, 9

    @@ -411,13 +366,20 @@ Creates a new TwoCellAnchor object
  • - chart + chart_type - (Chart) + (Class) + — +

    +This is passed to the graphic frame for instantiation. must be Chart or a +subclass of Chart +

    +
    +
  • @@ -455,7 +417,10 @@ a customizable set of options - + —

    +the col, row to start at +

    +
  • @@ -464,7 +429,10 @@ a customizable set of options - + —

    +the col, row to end at +

    +
  • @@ -477,37 +445,21 @@ a customizable set of options
     
     
    -31
    -32
    -33
     34
     35
     36
     37
     38
    -39
    -40
    -41
    -42
    -43
    -44
    +39 -
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 31
    +      
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 34
     
     def initialize(drawing, chart_type, options)
       @drawing = drawing
       drawing.anchors << self      
    -
       @from, @to =  Marker.new, Marker.new(:col => 5, :row=>10)
       @graphic_frame = GraphicFrame.new(self, chart_type, options)
    -
    -  self.start_at(options[:start_at][0], options[:start_at][1]) if options[:start_at].is_a?(Array)
    -  self.end_at(options[:end_at][0], options[:end_at][1]) if options[:end_at].is_a?(Array)
    -  # passing a reference to our start and end markers for convenience
    -  # this lets us access the markers directly from the chart.
    -  @graphic_frame.chart.send(:start_at=, @from)
    -  @graphic_frame.chart.send(:end_at=, @to)
     end
     
    @@ -815,199 +767,7 @@ A marker that returns the to cell anchor. The default to column and row are
    -

    - - - (Marker) end_at(x, y) - - - -

    -
    -

    -This is a short cut method to set the end anchor position -

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - x - - - (Integer) - - - - — -

      -The column -

      -
      - -
    • - -
    • - - y - - - (Integer) - - - - — -

      -The row -

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (Marker) - - - -
    • - -
    - -
    - - - - -
    -
    -
    -
    -65
    -66
    -67
    -68
    -69
    -
    -
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 65
    -
    -def end_at(x, y)
    -  @to.col = x
    -  @to.row = y
    -  @to
    -end
    -
    -
    -
    - -
    -

    - - - (Marker) start_at(x, y) - - - -

    -
    -

    -This is a short cut method to set the start anchor position -

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - x - - - (Integer) - - - - — -

      -The column -

      -
      - -
    • - -
    • - - y - - - (Integer) - - - - — -

      -The row -

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (Marker) - - - -
    • - -
    - -
    - - - - -
    -
    -
    -
    -55
    -56
    -57
    -58
    -59
    -
    -
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 55
    -
    -def start_at(x, y)
    -  @from.col = x
    -  @from.row = y
    -  @from
    -end
    -
    -
    -
    - -
    -

    +

    - (String) to_xml(xml) @@ -1065,22 +825,22 @@ The document builder instance this objects xml will be added to.

     
     
    -74
    -75
    -76
    -77
    -78
    -79
    -80
    -81
    -82
    -83
    -84
    -85
    -86
    +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59
    -
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 74
    +      
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 47
     
     def to_xml(xml)
       #build it for now, break it down later!
    @@ -1106,7 +866,7 @@ The document builder instance this objects xml will be added to.
     
         
         
    -- 
    cgit v1.2.3