diff options
| author | Randy Morgan <[email protected]> | 2012-05-03 09:10:23 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-05-03 09:10:23 +0900 |
| commit | e622dc54069074198990beb0462da630bad38dd0 (patch) | |
| tree | 4065eb11cf4dcd68440bf8347af4509c130fb11e /lib/axlsx/drawing/cat_axis_data.rb | |
| parent | 2dfdd1f26b1fc748da3b4edad9aeeaeae842aedb (diff) | |
| download | caxlsx-e622dc54069074198990beb0462da630bad38dd0.tar.gz caxlsx-e622dc54069074198990beb0462da630bad38dd0.zip | |
rebuild series data base objects with full implementation.
Address shape validation error.
Diffstat (limited to 'lib/axlsx/drawing/cat_axis_data.rb')
| -rw-r--r-- | lib/axlsx/drawing/cat_axis_data.rb | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/axlsx/drawing/cat_axis_data.rb b/lib/axlsx/drawing/cat_axis_data.rb deleted file mode 100644 index 52a6a542..00000000 --- a/lib/axlsx/drawing/cat_axis_data.rb +++ /dev/null @@ -1,34 +0,0 @@ -# encoding: UTF-8 -module Axlsx - # The CatAxisData class serializes the category axis data for a chart - class CatAxisData < SimpleTypedList - - # Create a new CatAxisData object - # @param [Array, SimpleTypedList] data the data for this category axis. This can be a simple array or a simple typed list of cells. - def initialize(data=[]) - super Object - @list.concat data if data.is_a?(Array) - data.each { |i| @list << i } if data.is_a?(SimpleTypedList) - end - - # Serializes the object - # @param [String] str - # @return [String] - def to_xml_string(str = '') - str << '<c:cat>' - str << '<c:strRef>' - str << '<c:f>' << Axlsx::cell_range(@list) << '</c:f>' - str << '<c:strCache>' - str << '<c:ptCount val="' << size.to_s << '"/>' - each_with_index do |item, index| - v = item.is_a?(Cell) ? item.value.to_s : item - str << '<c:pt idx="' << index.to_s << '"><c:v>' << v.to_s << '</c:v></c:pt>' - end - str << '</c:strCache>' - str << '</c:strRef>' - str << '</c:cat>' - end - - end - -end |
