require 'daru/view' Daru::View.plotting_library = :googlecharts idx = Daru::Index.new ['City', '2010 Population',] data_rows = [ ['New York City, NY', 8175000], ['Los Angeles, CA', 3792000], ['Chicago, IL', 2695000], ['Houston, TX', 2099000], ['Philadelphia, PA', 1526000] ] df_city_pop = Daru::DataFrame.rows(data_rows) df_city_pop.vectors = idx df_city_pop bar_basic_options = { title: 'Population of Largest U.S. Cities', type: :bar, } bar_basic_chart = Daru::View::Plot.new(df_city_pop, bar_basic_options, chart_class: 'Charteditor') bar_basic_chart.show_in_iruby