Class: Writexlsx::Chart::Doughnut
- Inherits:
-
Pie
- Object
- Writexlsx::Chart
- Pie
- Writexlsx::Chart::Doughnut
- Defined in:
- lib/write_xlsx/chart/doughnut.rb
Constant Summary
Constants included from Writexlsx::Constants
Writexlsx::Constants::COL_MAX, Writexlsx::Constants::ROW_MAX, Writexlsx::Constants::SHEETNAME_MAX, Writexlsx::Constants::STR_MAX
Constants included from Utility::ChartFormatting
Utility::ChartFormatting::PATTERN_TYPES
Constants included from Utility::Common
Utility::Common::PERL_TRUE_VALUES
Instance Attribute Summary
Attributes inherited from Writexlsx::Chart
#already_inserted, #axis2_ids, #combined, #date_category, #embedded, #formula_data, #formula_ids, #height, #id, #index, #label_position_default, #label_positions, #name, #palette, #protection, #series_index, #width, #writer, #x2_axis, #x_offset, #x_scale, #y2_axis, #y_offset, #y_scale
Instance Method Summary collapse
-
#initialize(subtype) ⇒ Doughnut
constructor
A new instance of Doughnut.
-
#set_hole_size(size) ⇒ Object
set_hole_size.
Methods inherited from Pie
#set_rotation, #write_a_p_legend, #write_a_p_pr_legend, #write_first_slice_ang, #write_legend, #write_pie_chart, #write_plot_area, #write_show_leader_lines, #write_tx_pr_legend, #write_vary_colors
Methods included from Utility::SheetnameQuoting
Methods included from Utility::XmlPrimitives
#r_id_attributes, #write_color, #write_xml_declaration, #xml_str
Methods included from Utility::CellReference
#row_col_notation, #substitute_cellref, #xl_cell_to_rowcol, #xl_col_to_name, #xl_range, #xl_range_formula, #xl_rowcol_to_cell
Methods inherited from Writexlsx::Chart
#already_inserted?, factory, #is_secondary?, #set_xml_writer, #write_bar_chart
Methods included from AxisWriter
Methods included from XmlWriter
Methods included from SeriesData
Methods included from Settings
#add_series, #combine, #set_chartarea, #set_drop_lines, #set_embedded_config_data, #set_high_low_lines, #set_legend, #set_plotarea, #set_size, #set_style, #set_table, #set_title, #set_up_down_bars, #set_x2_axis, #set_x_axis, #set_y2_axis, #set_y_axis, #show_blanks_as, #show_hidden_data, #show_na_as_empty_cell
Methods included from Gradient
Methods included from Utility::RichText
#convert_font_args, #get_font_latin_attributes, #get_font_style_attributes, #params_to_font, #underline_attributes, #write_a_body_pr, #write_a_def_rpr, #write_a_end_para_rpr, #write_a_lst_style, #write_a_p_formula, #write_a_p_pr_formula, #write_def_rpr_r_pr_common, #write_tx_pr
Methods included from Utility::ChartFormatting
#color, #dash_types, #fill_properties, #layout_properties, #legend_properties, #line_fill_properties, #line_properties, #palette_color_from_index, #pattern_properties, #value_or_raise, #write_a_solid_fill, #write_a_srgb_clr
Methods included from Utility::Common
#absolute_char, #check_parameter, #float_to_str, #ptrue?, #put_deprecate_message
Constructor Details
#initialize(subtype) ⇒ Doughnut
Returns a new instance of Doughnut.
23 24 25 26 27 28 |
# File 'lib/write_xlsx/chart/doughnut.rb', line 23 def initialize(subtype) super @vary_data_color = 1 @hole_size = 50 @rotation = 0 end |
Instance Method Details
#set_hole_size(size) ⇒ Object
set_hole_size
Set the Doughnut chart hole size.
35 36 37 38 39 40 41 42 43 |
# File 'lib/write_xlsx/chart/doughnut.rb', line 35 def set_hole_size(size) return unless size if size.between?(10, 90) @hole_size = size else raise "Hole size $size outside Excel range: 10 <= size <= 90" end end |