Sha256: 1017795ea1877fbf8a4f3813b35cb5e71b1c2bfe3d553486d894f8bb81fec8fe

Contents?: true

Size: 983 Bytes

Versions: 11

Compression:

Stored size: 983 Bytes

Contents

# -----------------------------------------------------------------------------
# Sets up clickable areas on the chart.
#
# Author:: Fernand Galiana
# -----------------------------------------------------------------------------
module Ziya::Components
  # Sets up clickable areas on the chart.
  #
  # Holds any number of areas, each defining a rectangle and a URL to go to when the user
  # clicks inside the rectangle. This can also be used to make refresh or print buttons.
  #
  # <tt></tt>:
  #
  # See http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=link
  # for additional documentation, examples and futher detail.  
  class Link < Base  
    has_attribute :areas
                     
    # -------------------------------------------------------------------------
    # Dump has_attribute into xml element
    def flatten( xml )
      if areas
        xml.link do
          areas.each { |area| area.flatten( xml ) }
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
derailed-ziya-2.0.4 lib/ziya/components/link.rb
derailed-ziya-2.0.6 lib/ziya/components/link.rb
derailed-ziya-2.0.8 lib/ziya/components/link.rb
ziya-2.0.2 lib/ziya/components/link.rb
ziya-2.0.0 lib/ziya/components/link.rb
ziya-2.0.1 lib/ziya/components/link.rb
ziya-2.0.5 lib/ziya/components/link.rb
ziya-2.0.4 lib/ziya/components/link.rb
ziya-2.0.3 lib/ziya/components/link.rb
ziya-2.0.6 lib/ziya/components/link.rb
ziya-2.0.7 lib/ziya/components/link.rb