Class: Axlsx::Pie3DChart
- Inherits:
-
Chart
- Object
- Chart
- Axlsx::Pie3DChart
- 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.
Instance Attribute Summary
Attributes inherited from Chart
graphic_frame, index, pn, series, series_type, show_legend, style, title, view3D
Instance Method Summary (collapse)
-
- (Pie3DChart) initialize(frame, options = {})
constructor
Creates a new pie chart object.
-
- (String) to_xml
Serializes the pie chart.
Methods inherited from Chart
#add_series, #end_at, #from, #start_at, #to
Constructor Details
- (Pie3DChart) initialize(frame, options = {})
Creates a new pie chart object
24 25 26 27 28 29 |
# File 'lib/axlsx/drawing/pie_3D_chart.rb', line 24 def initialize(frame, ={}) super(frame, ) @series_type = PieSeries @view3D = View3D.new({:rotX=>30, :perspective=>30}.merge()) end |
Instance Method Details
- (String) to_xml
Serializes the pie chart
33 34 35 36 37 38 39 40 |
# File 'lib/axlsx/drawing/pie_3D_chart.rb', line 33 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 |