Class: 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, #series, #series_type, #show_legend, #style, #title, #view3D
Instance Method Summary collapse
-
#initialize(frame, options = {}) ⇒ Pie3DChart
constructor
Creates a new pie chart object.
-
#to_xml ⇒ String
Serializes the pie chart.
Methods inherited from Chart
#add_series, #end_at, #from, #index, #pn, #start_at, #to
Constructor Details
#initialize(frame, options = {}) ⇒ Pie3DChart
Creates a new pie chart object
24 25 26 27 28 |
# 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
#to_xml ⇒ String
Serializes the pie chart
32 33 34 35 36 37 38 39 |
# File 'lib/axlsx/drawing/pie_3D_chart.rb', line 32 def to_xml super() do |xml| xml[:c].pie3DChart { xml[:c].varyColors :val=>1 @series.each { |ser| ser.to_xml(xml) } } end end |