In [1]:
require 'daru/view'
Install the spreadsheet gem version ~>1.1.1 for using spreadsheet functions.

Install the mechanize gem version ~>2.7.5 for using mechanize functions.
Out[1]:
true
In [2]:
Daru::View.plotting_library = :googlecharts
Out[2]:
:googlecharts
In [3]:
data_rows = [
          ['Label', 'Value'],
          ['Memory', 80],
          ['CPU', 55],
          ['Network', 68]
]
table_gauge = Daru::View::Table.new(data_rows)

table_gauge.show_in_iruby
Out[3]:
In [4]:
opts = {
width: 400, height: 120,
          redFrom: 90, redTo: 100,
          yellowFrom:75, yellowTo: 90,
          minorTicks: 5,
  type: :gauge
  }
gauge_chart = Daru::View::Plot.new(table_gauge, opts)
gauge_chart.show_in_iruby
Out[4]: