class Axlsx::Pie3DChart
The Pie3DChart
is a three dimentional piechart (who would have guessed?) that you can add to your worksheet. @see Worksheet#add_chart
@see Chart#add_series
@see README for an example
Public Class Methods
new(frame, options={})
click to toggle source
Creates a new pie chart object @param [GraphicFrame] frame The workbook that owns this chart. @option options [Cell, String] title @option options [Boolean] show_legend @option options [Symbol] grouping @option options [String] gap_depth @option options [Integer] rot_x @option options [String] h_percent @option options [Integer] rot_y @option options [String] depth_percent @option options [Boolean] r_ang_ax @option options [Integer] perspective @see Chart
@see View3D
Calls superclass method
Axlsx::Chart::new
# File lib/axlsx/drawing/pie_3D_chart.rb, line 25 def initialize(frame, options={}) @vary_colors = true super(frame, options) @series_type = PieSeries @view_3D = View3D.new({:rot_x =>30, :perspective=>30}.merge(options)) @d_lbls = nil end
Public Instance Methods
to_xml_string(str = '')
click to toggle source
Serializes the object @param [String] str @return [String]
Calls superclass method
Axlsx::Chart#to_xml_string
# File lib/axlsx/drawing/pie_3D_chart.rb, line 36 def to_xml_string(str = '') super(str) do |str_inner| str_inner << '<c:pie3DChart>' str_inner << '<c:varyColors val="' << vary_colors.to_s << '"/>' @series.each { |ser| ser.to_xml_string(str_inner) } d_lbls.to_xml_string(str) if @d_lbls str_inner << '</c:pie3DChart>' end end