Class: Axlsx::IconSet
- Inherits:
-
Object
- Object
- Axlsx::IconSet
- Includes:
- OptionsParser, SerializedAttributes
- Defined in:
- lib/axlsx/workbook/worksheet/icon_set.rb
Overview
The recommended way to manage these rules is via Worksheet#add_conditional_formatting
Instance Attribute Summary collapse
-
#iconSet ⇒ String
The icon set to display.
-
#interpolationPoints ⇒ Integer
Sets the values of the interpolation points in the scale.
-
#percent ⇒ Boolean
Indicates whether the thresholds indicate percentile values, instead of number values.
-
#reverse ⇒ Boolean
If true, reverses the default order of the icons in this icon set.maxLength attribute The default value is false.
-
#showValue ⇒ Boolean
Indicates whether to show the values of the cells on which this data bar is applied.
Instance Method Summary collapse
-
#initialize(options = {}) {|_self| ... } ⇒ IconSet
constructor
Creates a new icon set object.
-
#to_xml_string(str = +'')) ⇒ String
Serialize this object to an xml string.
Methods included from SerializedAttributes
included, #serialized_attributes, #serialized_element_attributes, #serialized_tag
Methods included from OptionsParser
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ IconSet
Creates a new icon set object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/axlsx/workbook/worksheet/icon_set.rb', line 19 def initialize( = {}) @percent = @showValue = true @reverse = false @iconSet = "3TrafficLights1" @interpolationPoints = [0, 33, 67] yield self if block_given? end |
Instance Attribute Details
#iconSet ⇒ String
The icon set to display. Allowed values are: 3Arrows, 3ArrowsGray, 3Flags, 3TrafficLights1, 3TrafficLights2, 3Signs, 3Symbols, 3Symbols2, 4Arrows, 4ArrowsGray, 4RedToBlack, 4Rating, 4TrafficLights, 5Arrows, 5ArrowsGray, 5Rating, 5Quarters The default value is 3TrafficLights1
36 37 38 |
# File 'lib/axlsx/workbook/worksheet/icon_set.rb', line 36 def iconSet @iconSet end |
#interpolationPoints ⇒ Integer
Sets the values of the interpolation points in the scale. The default value is [0, 33, 67]
56 57 58 |
# File 'lib/axlsx/workbook/worksheet/icon_set.rb', line 56 def interpolationPoints @interpolationPoints end |
#percent ⇒ Boolean
Indicates whether the thresholds indicate percentile values, instead of number values. The default value is true
41 42 43 |
# File 'lib/axlsx/workbook/worksheet/icon_set.rb', line 41 def percent @percent end |
#reverse ⇒ Boolean
If true, reverses the default order of the icons in this icon set.maxLength attribute The default value is false
46 47 48 |
# File 'lib/axlsx/workbook/worksheet/icon_set.rb', line 46 def reverse @reverse end |
#showValue ⇒ Boolean
Indicates whether to show the values of the cells on which this data bar is applied. The default value is true
51 52 53 |
# File 'lib/axlsx/workbook/worksheet/icon_set.rb', line 51 def showValue @showValue end |
Instance Method Details
#to_xml_string(str = +'')) ⇒ String
Serialize this object to an xml string
92 93 94 95 96 97 98 |
# File 'lib/axlsx/workbook/worksheet/icon_set.rb', line 92 def to_xml_string(str = +'') initialize_value_objects if @value_objects.nil? serialized_tag('iconSet', str) do @value_objects.each { |cfvo| cfvo.to_xml_string(str) } end end |