From 2d0ac967e94c5944ccccf9adad8da5a9d082df29 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 20 Nov 2011 23:44:58 +0900 Subject: pushing docs --- doc/Axlsx/Pie3DChart.html | 439 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 439 insertions(+) create mode 100644 doc/Axlsx/Pie3DChart.html (limited to 'doc/Axlsx/Pie3DChart.html') diff --git a/doc/Axlsx/Pie3DChart.html b/doc/Axlsx/Pie3DChart.html new file mode 100644 index 00000000..e3b3e318 --- /dev/null +++ b/doc/Axlsx/Pie3DChart.html @@ -0,0 +1,439 @@ + + + + + + Class: Axlsx::Pie3DChart + + — Documentation by YARD 0.7.3 + + + + + + + + + + + + + + + + + + + + + + +

Class: Axlsx::Pie3DChart + + + +

+ +
+ +
Inherits:
+
+ Chart + +
    +
  • Object
  • + + + + + +
+ show all + +
+ + + + + + + + + +
Defined in:
+
lib/axlsx/drawing/pie_3D_chart.rb
+ +
+
+ +

Overview

+
+

+The Pie3DChart is a three dimentional piechart (who would have guessed?) +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::Pie3DChart, :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:

+ + +
+ + + + + + + + + + +

Instance Attribute Summary

+ +

Attributes inherited from Chart

+

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

+ + + +

+ Instance Method Summary + (collapse) +

+ + + + + + + + + + + + +

Methods inherited from Chart

+

#add_series

+
+

Constructor Details

+ +
+

+ + - (Pie3DChart) initialize(workbook, options = {}) + + + +

+
+

+Creates a new pie chart object +

+ + +
+
+
+

Parameters:

+
    + +
  • + + workbook + + + (Workbook) + + + + — +

    +The workbook that owns this chart. +

    +
    + +
  • + +
  • + + options + + + (Hash) + + + (defaults to: {}) + + + — +

    +a customizable set of options +

    +
    + +
  • + +
+ + + + + + +

Options Hash (options):

+
    + +
  • + title + (Cell, String) + + + + +
  • + +
+ + + +
+ + + + +
+
+
+
+41
+42
+43
+44
+45
+46
+
+
# File 'lib/axlsx/drawing/pie_3D_chart.rb', line 41
+
+def initialize(workbook, options={})
+  super(workbook, options)
+  # this charts series type
+  @series_type = PieSeries
+  @view3D = View3D.new(:rotX => 30, :perspective => 30)
+end
+
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + - (String) to_xml + + + +

+
+

+Serializes the pie chart +

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (String) + + + +
  • + +
+ +
+ + + + +
+
+
+
+50
+51
+52
+53
+54
+55
+56
+57
+
+
# File 'lib/axlsx/drawing/pie_3D_chart.rb', line 50
+
+def to_xml
+  super() do |xml|
+    xml.send('c:pie3DChart') {
+      xml.send('c:varyColors', :val=>1)
+      @series.each { |ser| ser.to_xml(xml) }
+    }                      
+  end
+end
+
+
+
+ +
+ +
+ + + + + \ No newline at end of file -- cgit v1.2.3