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/Chart.html | 661 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 449 insertions(+), 212 deletions(-) (limited to 'doc/Axlsx/Chart.html') diff --git a/doc/Axlsx/Chart.html b/doc/Axlsx/Chart.html index 2f1a6465..6665f8a0 100644 --- a/doc/Axlsx/Chart.html +++ b/doc/Axlsx/Chart.html @@ -114,6 +114,13 @@ A Chart is the superclass for specific charts
+

See Also:

+ +

Direct Known Subclasses

Bar3DChart, Line3DChart, Pie3DChart

@@ -126,14 +133,14 @@ A Chart is the superclass for specific charts
  • - - (Marker) end_at + - (GraphicFrame) graphic_frame - + readonly @@ -143,7 +150,7 @@ A Chart is the superclass for specific charts

    -The ending marker for this chart. +A reference to the graphic frame that owns this chart.

    @@ -153,7 +160,7 @@ The ending marker for this chart.
  • - - (GraphicFrame) graphic_frame + - (Integer) index @@ -170,7 +177,7 @@ The ending marker for this chart.

    -A reference to the graphic frame that owns this chart. +The index of this chart in the workbooks charts collection.

    @@ -180,7 +187,7 @@ A reference to the graphic frame that owns this chart.
  • - - (Integer) index + - (String) pn @@ -197,7 +204,7 @@ A reference to the graphic frame that owns this chart.

    -The index of this chart in the workbooks charts collection. +The part name for this chart.

    @@ -207,7 +214,7 @@ The index of this chart in the workbooks charts collection.
  • - - (String) pn + - (SimpleTypedList) series @@ -224,7 +231,7 @@ The index of this chart in the workbooks charts collection.

    -The part name for this chart. +A collection of series objects that are applied to the chart.

    @@ -234,7 +241,7 @@ The part name for this chart.
  • - - (SimpleTypedList) series + - (Series) series_type @@ -251,7 +258,7 @@ The part name for this chart.

    -A collection of series objects that are applied to the chart. +The type of series to use for this chart.

    @@ -261,14 +268,14 @@ A collection of series objects that are applied to the chart.
  • - - (Series) series_type + - (Boolean) show_legend - readonly + @@ -278,7 +285,7 @@ A collection of series objects that are applied to the chart.

    -The type of series to use for this chart. +Show the legend in the chart.

    @@ -288,7 +295,7 @@ The type of series to use for this chart.
  • - - (Boolean) show_legend + - (Integer) style @@ -305,7 +312,7 @@ The type of series to use for this chart.

    -Show the legend in the chart. +The style for the chart.

    @@ -315,7 +322,7 @@ Show the legend in the chart.
  • - - (Marker) start_at + - (Title) title @@ -332,7 +339,7 @@ Show the legend in the chart.

    -The starting marker for this chart. +The title object for the chart.

    @@ -342,7 +349,7 @@ The starting marker for this chart.
  • - - (Integer) style + - (Object) view3D @@ -359,26 +366,36 @@ The starting marker for this chart.

    -The style for the chart. +The 3D view properties for the chart.

  • -
  • + + + + + + +

    + Instance Method Summary + (collapse) +

    + + - - + + + + constructor + + + + + + -

    - Instance Method Summary - (collapse) -

    +

    +Creates a new chart object. +

    +
    + +
  • -
    - - + +
    -

    +

    - - (Marker) start_at + - (Integer) style

    -The starting marker for this chart +The style for the chart. see ECMA Part 1 §21.2.2.196

    @@ -1106,7 +1107,7 @@ The starting marker for this chart
  • - (Marker) + (Integer) @@ -1120,15 +1121,15 @@ The starting marker for this chart
     
     
    -44
    -45
    -46
    +42 +43 +44 -
    # File 'lib/axlsx/drawing/chart.rb', line 44
    +      
    # File 'lib/axlsx/drawing/chart.rb', line 42
     
    -def start_at
    -  @start_at
    +def style
    +  @style
     end
     
    @@ -1137,19 +1138,19 @@ The starting marker for this chart
  • - - + +
    -

    +

    - - (Integer) style + - (Title) title

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

    @@ -1163,7 +1164,7 @@ The style for the chart. see ECMA Part 1 §21.2.2.196
  • - (Integer) + (Title) @@ -1177,15 +1178,15 @@ The style for the chart. see ECMA Part 1 §21.2.2.196
     
     
    -14
    -15
    -16
    +37 +38 +39 -
    # File 'lib/axlsx/drawing/chart.rb', line 14
    +      
    # File 'lib/axlsx/drawing/chart.rb', line 37
     
    -def style
    -  @style
    +def title
    +  @title
     end
     
    @@ -1194,19 +1195,67 @@ The style for the chart. see ECMA Part 1 §21.2.2.196
  • - - + +
    -

    +

    - - (Title) title + - (Object) view3D

    -The title object for the chart. +The 3D view properties for the chart +

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

    Instance Method Details

    + + +
    +

    + + - (Series) add_series(options = {}) + + + +

    +
    +

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

    @@ -1220,7 +1269,7 @@ The title object for the chart.
  • - (Title) + (Series) @@ -1228,21 +1277,30 @@ The title object for the chart. +

    See Also:

    + +
  • @@ -1250,27 +1308,76 @@ The title object for the chart.
     
     
    -9
    -10
    -11
    +101 +102 +103 +104
    -
    # File 'lib/axlsx/drawing/chart.rb', line 9
    +      
    # File 'lib/axlsx/drawing/chart.rb', line 101
     
    -def title
    -  @title
    +def add_series(options={})
    +  @series_type.new(self, options)
    +  @series.last
     end
     
    - - -
    -

    +

    - - (Object) view3D + - (Marker) end_at(x, y)

    -The 3D view properties for the chart +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

    +

    Parameters:

    +
      + +
    • + + x + + + (Integer) + + + + — +

      +The column +

      +
      + +
    • + +
    • + + y + + + (Integer) + + + + — +

      +The row +

      +
      + +
    • +
    + +

    Returns:

    +
      + +
    • + + + (Marker) + + + +
    • + +
    @@ -1278,15 +1385,17 @@ The 3D view properties for the chart
     
     
    -17
    -18
    -19
    +149 +150 +151 +152 @@ -1294,38 +1403,122 @@ The 3D view properties for the chart
    -
    # File 'lib/axlsx/drawing/chart.rb', line 17
    +      
    # File 'lib/axlsx/drawing/chart.rb', line 149
     
    -def view3D
    -  @view3D
    +def end_at(x, y)
    +  @graphic_frame.anchor.to.col = x
    +  @graphic_frame.anchor.to.row = y
     end
     
    +
    +

    + + - (Object) from + + + +

    +
    + +
    + Note: +

    +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 +

    -
    -

    Instance Method Details

    - + +
    +
    +
    + + +
    + + + + +
    +
    +
    +
    +94
    +95
    +96
    +
    +
    # File 'lib/axlsx/drawing/chart.rb', line 94
    +
    +def from
    +  @graphic_frame.anchor.from
    +end
    +
    +
    +
    -
    -

    +

    +

    - - (Series) add_series(options = {}) + - (Marker) start_at(x, y)

    -Adds a new series to the chart’s series collection. +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

    +

    Parameters:

    +
      +
    • + + x + + + (Integer) + + + + — +

      +The column +

      +
      + +
    • + +
    • + + y + + + (Integer) + + + + — +

      +The row +

      +
      + +
    • + +
    +

    Returns:

    • - (Series) + (Marker) @@ -1333,12 +1526,58 @@ Adds a new series to the chart’s series collection.
    -

    See Also:

    -
      +
    + + + + +
    +
    +
    +
    +138
    +139
    +140
    +141
    +
    +
    # File 'lib/axlsx/drawing/chart.rb', line 138
    +
    +def start_at(x, y)
    +  @graphic_frame.anchor.from.col = x
    +  @graphic_frame.anchor.from.row = y
    +end
    +
    +
    +
    -
  • Series
  • +
    +

    + + - (Object) to + + + +

    +
    - +
    + Note: +

    +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 +

    + + +
    +
    +
    +
    @@ -1346,17 +1585,15 @@ Adds a new series to the chart’s series collection.
     
     
    -94
    -95
    -96
    -97
    +87 +88 +89 @@ -1389,13 +1626,6 @@ Chart Serialization serializes the chart
     
     
    -101
    -102
    -103
    -104
    -105
    -106
    -107
     108
     109
     110
    @@ -1411,10 +1641,17 @@ Chart Serialization serializes the chart
     120
     121
     122
    -123
    +123 +124 +125 +126 +127 +128 +129 +130
    -
    # File 'lib/axlsx/drawing/chart.rb', line 94
    +      
    # File 'lib/axlsx/drawing/chart.rb', line 87
     
    -def add_series(options={})
    -  @series_type.new(self, options)
    -  @series.last
    +def to
    +  @graphic_frame.anchor.to
     end
     
    -
    # File 'lib/axlsx/drawing/chart.rb', line 101
    +      
    # File 'lib/axlsx/drawing/chart.rb', line 108
     
     def to_xml
       builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
    @@ -1450,7 +1687,7 @@ Chart Serialization serializes the chart
     
         
         
    -- 
    cgit v1.2.3