Sha256: 83f16064028d715dce0c2705593f0627faf10780d3b0a12356868cc36b34f609

Contents?: true

Size: 1.31 KB

Versions: 8

Compression:

Stored size: 1.31 KB

Contents

# encoding: UTF-8
module Axlsx


  # 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
  class Pie3DChart < Chart

    # 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] gapDepth
    # @option options [Integer] rotX
    # @option options [String] hPercent
    # @option options [Integer] rotY
    # @option options [String] depthPercent
    # @option options [Boolean] rAngAx
    # @option options [Integer] perspective
    # @see Chart
    # @see View3D
    def initialize(frame, options={})
      super(frame, options)
      @series_type = PieSeries
      @view3D = View3D.new({:rotX=>30, :perspective=>30}.merge(options))
    end

    # Serializes the object
    # @param [String] str
    # @return [String]
    def to_xml_string(str = '')
      super(str) do |str_inner|
        str_inner << '<c:pie3DChart>'
        str_inner << '<c:varyColors val="1"/>'
        @series.each { |ser| ser.to_xml_string(str_inner) }
        str_inner << '</c:pie3DChart>'
      end
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
axlsx-1.1.7 lib/axlsx/drawing/pie_3D_chart.rb
axlsx-1.1.6 lib/axlsx/drawing/pie_3D_chart.rb
axlsx-1.1.5 lib/axlsx/drawing/pie_3D_chart.rb
axlsx-1.1.4 lib/axlsx/drawing/pie_3D_chart.rb
axlsx-1.1.3 lib/axlsx/drawing/pie_3D_chart.rb
axlsx-1.1.2 lib/axlsx/drawing/pie_3D_chart.rb
axlsx-1.1.1 lib/axlsx/drawing/pie_3D_chart.rb
axlsx-1.1.0 lib/axlsx/drawing/pie_3D_chart.rb