# class Tk::Tcllib::Plotchart::Barchart3D

### Constants

TkCommandNames

### Public Class Methods

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

    # File lib/tkextlib/tcllib/plotchart.rb, line 776
    def initialize(*args) # args := ([parent,] yaxis, nobars [, keys])
                          # yaxis  := Array of [minimum, maximum, stepsize]
                          # nobars := number of bars
      if args[0].kind_of?(Array)
        @yaxis = args.shift
        @nobars = args.shift

        super(*args) # create canvas widget
      else
        parent = args.shift

        @yaxis = args.shift
        @nobars = args.shift

        if parent.kind_of?(Tk::Canvas)
          @path = parent.path
        else
          super(parent, *args) # create canvas widget
        end
      end

      @chart = _create_chart
    end

### Public Instance Methods

config(key, value=None) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 813
    def config(key, value=None)
      if key.kind_of?(Hash)
        tk_call_without_enc(@chart, 'config', *hash_kv(key, true))
      else
        tk_call(@chart, 'config', "-#{key}", value)
      end
      self
    end

plot(label, yvalue, color) click to toggle source

    # File lib/tkextlib/tcllib/plotchart.rb, line 807
    def plot(label, yvalue, color)
      tk_call_without_enc(@chart, 'plot', _get_eval_enc_str(label),
                          _get_eval_enc_str(yvalue), color)
      self
    end

### Private Instance Methods

_create_chart() click to toggle source

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