class Charty::RenderContext::Configurator

Public Class Methods

new(**args) click to toggle source
# File lib/charty/plotter.rb, line 177
def initialize(**args)
  @args = args
  @series = []
end

Public Instance Methods

data(data) click to toggle source
# File lib/charty/plotter.rb, line 186
def data(data)
  @data = data
end
function(&block) click to toggle source
# File lib/charty/plotter.rb, line 182
def function(&block)
  @function = block
end
label(x, y) click to toggle source
# File lib/charty/plotter.rb, line 206
def label(x, y)

end
labels(labels) click to toggle source
# File lib/charty/plotter.rb, line 202
def labels(labels)
  @labels = labels
end
method_missing(method, *args) click to toggle source
Calls superclass method
# File lib/charty/plotter.rb, line 222
def method_missing(method, *args)
  if (@args.has_key?(method))
    @args[name]
  else
    super
  end
end
range(range) click to toggle source
# File lib/charty/plotter.rb, line 214
def range(range)
  @range = range
end
series(xs, ys=nil, zs=nil, xerr: nil, yerr: nil, label: nil) click to toggle source
# File lib/charty/plotter.rb, line 210
def series(xs, ys=nil, zs=nil, xerr: nil, yerr: nil, label: nil)
  @series << Series.new(xs, ys, zs, xerr, yerr, label)
end
title(title) click to toggle source
# File lib/charty/plotter.rb, line 190
def title(title)
  @title = title
end
to_a() click to toggle source
# File lib/charty/plotter.rb, line 218
def to_a
  [@range, @series, @function, @data, @title, @xlabel, @ylabel, @labels]
end
xlabel(xlabel) click to toggle source
# File lib/charty/plotter.rb, line 194
def xlabel(xlabel)
  @xlabel = xlabel
end
ylabel(ylabel) click to toggle source
# File lib/charty/plotter.rb, line 198
def ylabel(ylabel)
  @ylabel = ylabel
end