class Fox::Enhancement::Xtras::Charting::Legend

Public Instance Methods

calculate_dimensions() click to toggle source
# File lib/fxruby-enhancement/xtras/charting-boxes.rb, line 208
def calculate_dimensions
  super
  calculate_wh
  
  # This is a nasty hard-coding, which will not
  # allow us to change the location of this box.
  # Later, we'll want to add that flexibility.
  self.y = right_box.height / 2 - self.height / 2
end
calculate_wh() click to toggle source

We calculate this on the basis of our actual content.

# File lib/fxruby-enhancement/xtras/charting-boxes.rb, line 203
def calculate_wh
  self.width = 50 # TODO: we're cheating again.
  self.height = 30
end