Module: Daru::View::Adapter::NyaplotAdapter
- Extended by:
- NyaplotAdapter
- Included in:
- NyaplotAdapter
- Defined in:
- lib/daru/view/adapters/nyaplot.rb
Instance Method Summary collapse
- #export(_plot, _export_type = 'png', _file_name = 'chart') ⇒ Object
- #export_html_file(plot, path) ⇒ Object
- #generate_body(plot) ⇒ Object
- #init(data, options, _user_options = {}) ⇒ Object
- #init_iruby ⇒ Object
- #init_script ⇒ Object
- #show_in_iruby(plot) ⇒ Object
Instance Method Details
#export(_plot, _export_type = 'png', _file_name = 'chart') ⇒ Object
19 20 21 |
# File 'lib/daru/view/adapters/nyaplot.rb', line 19 def export(_plot, _export_type='png', _file_name='chart') raise 'Not implemented yet' end |
#export_html_file(plot, path) ⇒ Object
15 16 17 |
# File 'lib/daru/view/adapters/nyaplot.rb', line 15 def export_html_file(plot, path) plot.export_html path end |
#generate_body(plot) ⇒ Object
31 32 33 |
# File 'lib/daru/view/adapters/nyaplot.rb', line 31 def generate_body(plot) plot.to_iruby[1] end |
#init(data, options, _user_options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/daru/view/adapters/nyaplot.rb', line 10 def init(data, , ={}) data_new = guess_data(data) data_new.plot() end |
#init_iruby ⇒ Object
35 36 37 |
# File 'lib/daru/view/adapters/nyaplot.rb', line 35 def init_iruby Nyaplot.init_iruby end |
#init_script ⇒ Object
27 28 29 |
# File 'lib/daru/view/adapters/nyaplot.rb', line 27 def init_script Nyaplot.init_script end |
#show_in_iruby(plot) ⇒ Object
23 24 25 |
# File 'lib/daru/view/adapters/nyaplot.rb', line 23 def show_in_iruby(plot) plot.show end |