In Files

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

Class/Module Index [+]

Quicksearch

Tk::Tcllib::Plotchart::Timechart

Constants

TkCommandNames

Public Class Methods

new(*args) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 689
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?(Tk::Canvas)
      @path = parent.path
    else
      super(parent, *args) # create canvas widget
    end
  end

  @chart = _create_chart
end
            

Public Instance Methods

milestone(txt, time, col=None) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 730
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) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 725
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) click to toggle source
 
               # File tk/lib/tkextlib/tcllib/plotchart.rb, line 735
def vertline(txt, time)
  tk_call_without_enc(@chart, 'vertline', txt, time)
  self
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus