class Tk::Tcllib::Plotchart::Piechart - tk-0.2.0 Documentation

# class Tk::Tcllib::Plotchart::Piechart

### Constants

TkCommandNames

### Public Class Methods

new(*args) click to toggle source
Calls superclass method

    # File lib/tkextlib/tcllib/plotchart.rb, line 901
    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) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 922
    def colours(*list)
      tk_call_without_enc(@chart, 'colours', *list)
      self
    end

Also aliased as: colors
plot(*dat) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 917
    def plot(*dat)  # argument is a list of [label, value]
      tk_call(@chart, 'plot', dat.flatten)
      self
    end

### Private Instance Methods

_create_chart() click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 911
    def _create_chart
      p self.class::TkCommandNames[1] if $DEBUG
      tk_call_without_enc(self.class::TkCommandNames[1], @path)
    end