Class: Tk::Tcllib::Plotchart::Piechart (Ruby 2.3.4)

In Files

  • tk/lib/tkextlib/tcllib/plotchart.rb

Class/Module Index [+]

Quicksearch

Tk::Tcllib::Plotchart::Piechart

Constants

TkCommandNames

Public Class Methods

new(*args)
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 902
def initialize(*args) # args := ([parent] [, keys])
  if args[0].kind_of?(Tk::Canvas)
    parent = args.shift
    @path = parent.path
  else
    super(*args) # create canvas widget
  end
  @chart = _create_chart
end
            

Public Instance Methods

colors(*list)
Alias for: colours
colours(*list)
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 923
def colours(*list)
  tk_call_without_enc(@chart, 'colours', *list)
  self
end
            
Also aliased as: colors
plot(*dat)
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 918
def plot(*dat)  # argument is a list of [label, value]
  tk_call(@chart, 'plot', dat.flatten)
  self
end