Class: Axlsx::PieChart
Overview
The PieChart is a pie chart that you can add to your worksheet.
Instance Attribute Summary
Attributes inherited from Chart
#bg_color, #display_blanks_as, #graphic_frame, #legend_position, #plot_visible_only, #rounded_corners, #series, #series_type, #show_legend, #style, #title, #vary_colors, #view_3D
Instance Method Summary collapse
-
#initialize(frame, options = {}) ⇒ PieChart
constructor
Creates a new pie chart object.
-
#to_xml_string(str = +'')) ⇒ String
Serializes the object.
Methods inherited from Chart
#add_series, #d_lbls, #end_at, #from, #index, #pn, #relationship, #start_at, #title_size=, #to
Methods included from OptionsParser
Constructor Details
Instance Method Details
#to_xml_string(str = +'')) ⇒ String
Serializes the object
26 27 28 29 30 31 32 33 34 |
# File 'lib/axlsx/drawing/pie_chart.rb', line 26 def to_xml_string(str = +'') super do str << '<c:pieChart>' str << '<c:varyColors val="' << vary_colors.to_s << '"/>' @series.each { |ser| ser.to_xml_string(str) } d_lbls.to_xml_string(str) if @d_lbls str << '</c:pieChart>' end end |