Class | Tk::Tcllib::Plotchart::Timechart
In: | tk/lib/tkextlib/tcllib/plotchart.rb
Parent: | TkCanvas

### Methods

milestone new period vertline

### Included Modules

ChartMethod

### Constants

TkCommandNames | = | [ 'canvas'.freeze, '::Plotchart::createTimechart'.freeze

### Public Class methods

new(*args)

[Source]

    # File tk/lib/tkextlib/tcllib/plotchart.rb, line 683
        def initialize(*args)
          # args := ([parent,] time_begin, time_end, items [, keys])
          # time_begin := String of time format (e.g. "1 january 2004")
          # time_end   := String of time format (e.g. "1 january 2004")
          # items := Expected/maximum number of items
          #          ( This determines the vertical spacing. )
          if args[0].kind_of?(String)
            @time_begin = args.shift
            @time_end   = args.shift
            @items      = args.shift

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

            @time_begin = args.shift
            @time_end   = args.shift
            @items      = args.shift

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

          @chart = _create_chart
        end

### Public Instance methods

milestone(txt, time, col=None)

[Source]

    # File tk/lib/tkextlib/tcllib/plotchart.rb, line 724
        def milestone(txt, time, col=None)
          tk_call_without_enc(@chart, 'milestone', txt, time, col)
          self
        end

period(txt, time_begin, time_end, col=None)

[Source]

    # File tk/lib/tkextlib/tcllib/plotchart.rb, line 719
        def period(txt, time_begin, time_end, col=None)
          tk_call_without_enc(@chart, 'period', txt, time_begin, time_end, col)
          self
        end

vertline(txt, time)

[Source]

    # File tk/lib/tkextlib/tcllib/plotchart.rb, line 729
        def vertline(txt, time)
          tk_call_without_enc(@chart, 'vertline', txt, time)
          self
        end

[Validate]