> I need to make a vertical barchart that will automatically change depending
> on numbers in a list. It is necesaary that the numbers in this list can be
> changed so that the barchart will change because of that.

Well, two approaches come to mind. Either drop some rect shape instances on
stage as the "bars" and adjust their rects according to your list. Or, use
Imaging Lingo to create the bars in a bitmap member - then you can do some
other stuff, like adding units and axes, through the same imaging methods.
Here's the hard-coded, bare bones version of the imaging approach (parent
script):
-------------------------------
property pDataList

on new me
  return me
end

on mUpdateData me, listIn
  pDataList = listIn
end

on mBuildGraph me
  myRange = pDataList.count
  myHeight = max(pDataList)
  myWidth = 30*myRange
  graphImage = image(myWidth, myHeight, 16)
  tempH = 0
  repeat with i = 1 to myRange
    graphImage.fill(tempH, myHeight - pDataList[i], tempH + 20, myHeight,
rgb(200,200,0))
    tempH = tempH + 30
  end repeat
  member("graph").image = graphImage
  member("graph").regpoint = point(0,0)
end
-------------------------------

HTH,
Kurt


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to