Class: Writexlsx::Chart::Doughnut
- Inherits:
-
Pie
- Object
- Writexlsx::Chart
- Pie
- Writexlsx::Chart::Doughnut
- Includes:
- Utility
- Defined in:
- lib/write_xlsx/chart/doughnut.rb
Constant Summary
Constants included from Utility
Utility::COL_MAX, Utility::ROW_MAX, Utility::SHEETNAME_MAX, Utility::STR_MAX
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 included from Utility
#absolute_char, #check_dimensions, #check_dimensions_and_update_max_min_values, #check_parameter, #convert_date_time, #dash_types, delete_files, #fill_properties, #float_to_str, #layout_properties, #line_fill_properties, #line_properties, #palette_color, #pixels_to_points, #process_workbook_options, #ptrue?, #put_deprecate_message, #quote_sheetname, #r_id_attributes, #row_col_notation, #shape_style_base, #store_col_max_min_values, #store_row_max_min_values, #substitute_cellref, #underline_attributes, #v_shape_attributes_base, #v_shape_style_base, #value_or_raise, #write_anchor, #write_auto_fill, #write_color, #write_comment_path, #write_div, #write_fill, #write_font, #write_stroke, #write_xml_declaration, #xl_cell_to_rowcol, #xl_col_to_name, #xl_range, #xl_range_formula, #xl_rowcol_to_cell, #xml_str
Methods inherited from Pie
#combine, #set_rotation, #write_a_p_legend, #write_a_p_pr_legend, #write_first_slice_ang, #write_legend, #write_pie_chart, #write_plot_area, #write_tx_pr_legend, #write_vary_colors
Methods inherited from Writexlsx::Chart
#add_series, #already_inserted?, #assemble_xml_file, #combine, #convert_font_args, #data_id, factory, #is_secondary?, #params_to_font, #process_names, #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_xml_writer, #set_y2_axis, #set_y_axis, #show_blanks_as, #show_hidden_data, #write_bar_chart, #write_val_axis
Constructor Details
#initialize(subtype) ⇒ Doughnut
Returns a new instance of Doughnut.
24 25 26 27 28 29 |
# File 'lib/write_xlsx/chart/doughnut.rb', line 24 def initialize(subtype) super(subtype) @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.
36 37 38 39 40 41 42 43 44 |
# File 'lib/write_xlsx/chart/doughnut.rb', line 36 def set_hole_size(size) return unless size if size >= 10 && size <= 90 @hole_size = size else raise "Hole size $size outside Excel range: 10 <= size <= 90"; end end |