Sha256: c4b4005f1988dbc6acd96645fd8ddf00a94b68f5169f99904d2c25d3a18fc7df
Contents?: true
Size: 1.3 KB
Versions: 11
Compression:
Stored size: 1.3 KB
Contents
# ----------------------------------------------------------------------------- # Sets up the 'exploding' factor on a particular chart. Only applies to pie, # scattered and line charts. # # Applies to pie, line, and scatter charts only. In pie charts, it sets which pie wedge # separates from the pie for emphasis. In line and scatter charts, it sets which line or # point is increased in thickness or size for emphasis. # # <tt></tt>: # # See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=series_explode # for additional documentation, examples and futher detail. # # Author:: Fernand Galiana # Date:: Dec 15th, 2006 # ----------------------------------------------------------------------------- module Ziya::Charts::Support class SeriesExplode < Base has_attribute :numbers # ------------------------------------------------------------------------- # Dump has_attribute into xml element def flatten( xml ) if numbers xml.series_explode do if numbers.is_a? String nums = numbers.split( "," ) nums.each { |n| xml.number( n.strip ) } elsif numbers.respond_to? :each numbers.each { |n| xml.number( n ) } else xml.number( numbers ) end end end end end end
Version data entries
11 entries across 11 versions & 2 rubygems