Class: Axlsx::ValAxisData
- Inherits:
-
CatAxisData
- Object
- SimpleTypedList
- CatAxisData
- Axlsx::ValAxisData
- Defined in:
- lib/axlsx/drawing/val_axis_data.rb
Overview
The ValAxisData class manages the values for a chart value series.
Instance Method Summary collapse
-
#to_xml(xml) ⇒ String
Serializes the value axis data.
Methods inherited from CatAxisData
Constructor Details
This class inherits a constructor from Axlsx::CatAxisData
Instance Method Details
#to_xml(xml) ⇒ String
Serializes the value axis data
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/axlsx/drawing/val_axis_data.rb', line 8 def to_xml(xml) xml.val { xml.numRef { xml.f Axlsx::cell_range(@list) xml.numCache { xml.formatCode 'General' xml.ptCount :val=>size each_with_index do |item, index| v = item.is_a?(Cell) ? item.value : item xml.pt(:idx=>index) { xml.v v } end } } } end |