require 'daru/view'

Daru::View.plotting_library = :highcharts 

graph = Daru::View::Plot.new 

graph.chart.class

graph.chart.to_html

graph.show_in_iruby

g = Daru::View::Plot.new      
graph = g.chart.tap do |f|
        f.series(:name => 'John', :data => [3, 20])
        f.series(:name => 'Jane', :data => [1, 3])
        # without overriding
        f.options[:chart][:defaultSeriesType] = "area"
        f.options[:chart][:inverted] = true
        f.options[:legend][:layout] = "horizontal"
        f.options[:xAxis][:categories] = ["uno", "dos", "tres", "cuatro"]
      end

graph.series_data

g.show_in_iruby

graph.series_data.delete({type: nil, :name => nil, :data => []})

graph.series_data

graph.options[:xAxis][:categories]

graph.options[:legend][:layout]

df =     Daru::DataFrame.new(
      {
        a: [1, 3, 5, 2, 5, 0],
        b: [1, 5, 2, 5, 1, 0],
        c: [1, 6, 7, 2, 6, 0]
      }, index: 'a'..'f'
    )

df.class

Daru::View::Plot.new(df, type: :bar) 

df =     Daru::DataFrame.new(
      {
        a: [1, 2, 3, 4, 5, 6],
        b: [1, 5, 2, 5, 1, 0],
        c: [1, 6, 7, 2, 6, 0]
      }, index: 'a'..'f'
    )

plt = Daru::View::Plot.new(df, type: :line, x: :a, y: :c) 

plt.show_in_iruby

plt.div

df.delete_vector :b

plt = Daru::View::Plot.new(df, type: :line) 

plt.show_in_iruby