Method: Gruff::Base#data
- Defined in:
- lib/gruff/base.rb
#data(name, data_points = [], color = nil) ⇒ Object
Note:
If you want to use a preset theme, you must set it before calling #data.
Input the data in the graph.
Parameters are an array where the first element is the name of the dataset and the value is an array of values to plot.
Can be called multiple times with different datasets for a multi-valued graph.
If the color argument is nil, the next color from the default theme will be used.
506 507 508 |
# File 'lib/gruff/base.rb', line 506 def data(name, data_points = [], color = nil) store.add(name, data_points, color) end |