class Nyaplot::Diagram3D

Diagram3D @abstract extended using a module included in Nyaplot::Diagrams3D

Public Class Methods

new(df, type, labels) click to toggle source
# File lib/nyaplot3d/diagram.rb, line 10
def initialize(df, type, labels)
  init_properties
  mod = Kernel.const_get("Nyaplot").const_get("Diagrams3D").const_get(type.to_s.capitalize)
  self.extend(mod)
  set_property(:type, type)
  set_property(:options, {})
  set_property(:data, df.name)
  self.process_data(df, labels)
  DataBase.instance.add(df)
end

Public Instance Methods

configure(&block) click to toggle source
# File lib/nyaplot3d/diagram.rb, line 21
def configure(&block)
  self.instance_eval(&block) if block_given?
end
df_name() click to toggle source

@return [String] the name of dataframe from which this diagram is generated

# File lib/nyaplot3d/diagram.rb, line 26
def df_name
  get_property(:data)
end