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/Bar3DChart.html | 241 ++++++++++++++++++++++++++-------------------- 1 file changed, 134 insertions(+), 107 deletions(-) (limited to 'doc/Axlsx/Bar3DChart.html') diff --git a/doc/Axlsx/Bar3DChart.html b/doc/Axlsx/Bar3DChart.html index 8cb43ac0..fcee1a86 100644 --- a/doc/Axlsx/Bar3DChart.html +++ b/doc/Axlsx/Bar3DChart.html @@ -106,54 +106,18 @@ that you can add to your worksheet.
-
-

Examples:

- -

-Creating a chart -

-

-
# This example creates two charts in a single sheet.
-# The first uses data directly fed to the sheet, while the second references cells withing the worksheet for data.
-
-require "rubygems" # if that is your preferred way to manage gems!
-require "axlsx"
-
-p = Axlsx::Package.new
-ws = p.workbook.add_worksheet
-ws.add_row :values => ["This is a chart with no data in the sheet"]
-
-chart = ws.add_chart(Axlsx::Bar3DChart, :start_at=> [0,1], :end_at=>[0,6], :title=>"Most Popular Pets")
-chart.add_series :data => [1, 9, 10], :labels => ["Slimy Reptiles", "Fuzzy Bunnies", "Rottweiler"]
-
-ws.add_row :values => ["This chart uses the data below"]
-title_row = ws.add_row :values => ["Least Popular Pets"]
-label_row = ws.add_row :values => ["", "Dry Skinned Reptiles", "Bald Cats", "Violent Parrots"]
-data_row = ws.add_row :values => ["Votes", 6, 4, 1]
-
-chart = ws.add_chart(Axlsx::Pie3DChart, :start_at => [0,11], :end_at =>[0,16], :title => title_row.cells.last)
-chart.add_series :data => data_row.cells[(1..-1)], :labels => label_row.cells  
-
-f = File.open('example_pie_3d_chart.xlsx', 'w')
-p.serialize(f)
-
- -
-

See Also:

@@ -347,8 +311,8 @@ grouping for a column, line, or area chart.

-The shabe of the bars or columns must be one of [:percentStacked, -:clustered, :standard, :stacked]. +The shabe of the bars or columns must be one of [:cone, :coneToMax, :box, +:cylinder, :pyramid, :pyramidToMax].

@@ -375,7 +339,7 @@ The shabe of the bars or columns must be one of [:percentStacked,

-the category axis. +the valueaxis.

@@ -392,7 +356,7 @@ the category axis.

Attributes inherited from Chart

-

end_at, graphic_frame, index, pn, series, series_type, show_legend, start_at, style, title, view3D

+

graphic_frame, index, pn, series, series_type, show_legend, style, title, view3D

@@ -465,7 +429,7 @@ Serializes the bar chart.

Methods inherited from Chart

-

#add_series

+

#add_series, #end_at, #from, #start_at, #to

Constructor Details

@@ -598,30 +562,93 @@ a customizable set of options +
  • + rotX + (Integer) + + + + +
  • + +
  • + hPercent + (String) + + + + +
  • + +
  • + rotY + (Integer) + + + + +
  • + +
  • + depthPercent + (String) + + + + +
  • + +
  • + rAngAx + (Boolean) + + + + +
  • + +
  • + perspective + (Integer) + + + + +
  • + +

    See Also:

    + +
    @@ -686,12 +713,12 @@ The direction of the bars in the chart must be one of [:bar, :col]
     
     
    -47
    -48
    -49
    +21 +22 +23
     
     
    -79
    -80
    -81
    -82
    -83
    -84
    -85
    -86
    -87
    -88
    -89
    +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71
    -
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 79
    +      
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 61
     
     def initialize(frame, options={})
       @barDir = :bar
    @@ -630,9 +657,9 @@ a customizable set of options
       @valAxId = rand(8 ** 8)
       @catAxis = CatAxis.new(@catAxId, @valAxId)
       @valAxis = ValAxis.new(@valAxId, @catAxId)
    -  @view3D = View3D.new(:rAngAx=>1)
       super(frame, options)      
       @series_type = BarSeries
    +  @view3D = View3D.new({:rAngAx=>1}.merge(options))
     end
     
    -
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 47
    +      
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 21
     
     def barDir
       @barDir
    @@ -743,12 +770,12 @@ the category axis
           
     
     
    -38
    -39
    -40
    +12 +13 +14
    -
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 38
    +      
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 12
     
     def catAxis
       @catAxis
    @@ -801,12 +828,12 @@ width.
           
     
     
    -51
    -52
    -53
    +25 +26 +27
    -
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 51
    +      
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 25
     
     def gapDepth
       @gapDepth
    @@ -859,12 +886,12 @@ width.
           
     
     
    -55
    -56
    -57
    +29 +30 +31
    -
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 55
    +      
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 29
     
     def gapWidth
       @gapWidth
    @@ -917,12 +944,12 @@ grouping for a column, line, or area chart. must be one of
           
     
     
    -60
    -61
    -62
    +34 +35 +36
    -
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 60
    +      
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 34
     
     def grouping
       @grouping
    @@ -946,8 +973,8 @@ grouping for a column, line, or area chart. must be one of
     

    -The shabe of the bars or columns must be one of [:percentStacked, -:clustered, :standard, :stacked] +The shabe of the bars or columns must be one of [:cone, :coneToMax, :box, +:cylinder, :pyramid, :pyramidToMax]

    @@ -975,12 +1002,12 @@ The shabe of the bars or columns must be one of [:percentStacked,
     
     
    -65
    -66
    -67
    +39 +40 +41
    -
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 65
    +      
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 39
     
     def shape
       @shape
    @@ -1004,7 +1031,7 @@ The shabe of the bars or columns must be one of [:percentStacked,
     

    -the category axis +the valueaxis

    @@ -1032,12 +1059,12 @@ the category axis
     
     
    -42
    -43
    -44
    +16 +17 +18
    -
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 42
    +      
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 16
     
     def valAxis
       @valAxis
    @@ -1093,27 +1120,27 @@ Serializes the bar chart
           
     
     
    -119
    -120
    -121
    -122
    -123
    -124
    -125
    -126
    -127
    -128
    -129
    -130
    -131
    -132
    -133
    -134
    -135
    -136
    +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118
    -
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 119
    +      
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 101
     
     def to_xml
       super() do |xml|
    @@ -1144,7 +1171,7 @@ Serializes the bar chart
     
         
         
    -- 
    cgit v1.2.3