2017년 3월 4일 토요일

Drawing Bar charts using App Inventor 2


How can I use the App Inventor 2 to draw horizontal bar charts corresponding to different values?

--
You have to create them using a canvas and drawing the corresponding lines and objects...

--
Canvas is the 'right' way.  Canvas works for both horizontal and vertical bars.   

However if you want just horizontal bars, consider using a series of buttons in a Vertical Arrangement.  Make the text color none, do not have any text. Make the button 'bar' a nice color.  Change the length of the by set Button.Width =  (a Math block value)     i.e. 24, 55  ...up to the width of your screen (these values are in pixels).  If the horizontal graph bars need to be labeled, make the height greater and use the button's labels and a small font.
--
That's pretty slick Steve!

-- 
another alternative is to use an API, the following example could be adjusted to your needs
Thanks Steve, I tried it and it worked perfectly. Thanks!!!.

--

댓글 없음:

댓글 쓰기