here's something that might give you a start, hope your good at reading code as I tried to comment it but my have miss a few, this graph ploting was made to work with real time input form a device I had connected to the system.
the quotient# part is a way of making sure that the data collected will never polt off the screen or image, keeping it in check.
maxValue is how big the input can be or you've work out can be for the above.
anyway give it a go you might see were to go with it.
Rem Project: plotgraph2
Rem Created: 18/04/2008 04:56:52
Rem ***** Main Source File *****
dim datafield(15)
REM The total value that you want in this colum
#constant maxValue = 1000
global quotient#
quotient# = 100.0 / maxValue
global datafield_Plot Bit_Map_Number1 data_field_colum
datafield_Plot = 1
Bit_Map_Number1 = 1
Make_datafield_Plot_object()
do
rem this bit slecte which fiels id inc by one
data_field_colum=rnd(15)
rem as stated
Draw_datafield_Plot()
rem show what value is in datafield there just for testing
set cursor 0,0
for i = 0 to 15
print datafield(i)
next i
loop
function Make_datafield_Plot_object()
make object plain datafield_plot,100,50
rem 33 for x
rotate object datafield_plot,-33,180,0
position object datafield_plot,-30,-30,0
endfunction
function Draw_datafield_Plot()
rem bitmap size
bit_size_x =500
bit_size_y = 500
rem how wide the bar is.
bar_width = 5
rem start postion of bar ys = start yf = finshed
pos_ys = 440
pos_yf = 440
rem unit size for count of one
unit_size as float
unit_size = 4.3
rem get image number
datafield_Plot_image =1
rem make the bitmap to get image from later
create bitmap Bit_Map_Number1,bit_size_x,bit_size_y
`draw stuff
cls RGB(0,255,0)
rem data string could mon tue wed or what ever
text 10,450," A B C D E F G H I J L M N O P Q"
rem which data field get a one adda to it
SELECT data_field_colum
rem what happems to that data field the was seleted, in this case a one is added to the total
CASE 0 : INC datafield(0),1 :ENDCASE
CASE 1 : INC datafield(1),1 :ENDCASE
CASE 2 : INC datafield(2),1 :ENDCASE
CASE 3 : INC datafield(3),1 :ENDCASE
CASE 4 : INC datafield(4),1 :ENDCASE
CASE 5 : INC datafield(5),1 :ENDCASE
CASE 6 : INC datafield(6),1 :ENDCASE
CASE 7 : INC datafield(7),1 :ENDCASE
CASE 8 : INC datafield(8),1 :ENDCASE
CASE 9 : INC datafield(9),1 :ENDCASE
CASE 10 : INC datafield(10),1 :ENDCASE
CASE 11 : INC datafield(11),1 :ENDCASE
CASE 12 : INC datafield(12),1 :ENDCASE
CASE 13 : INC datafield(13),1 :ENDCASE
CASE 14 : INC datafield(14),1 :ENDCASE
CASE 15 : INC datafield(15),1 :ENDCASE
ENDSELECT
rem position first bar
pos_x=10+TEXT WIDTH(" ")
box pos_x,pos_ys-(datafield(0)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B")
box pos_x,pos_ys-(datafield(1)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C")
box pos_x,pos_ys-(datafield(2)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D")
box pos_x,pos_ys-(datafield(3)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D E")
box pos_x,pos_ys-(datafield(4)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D E F")
box pos_x,pos_ys-(datafield(5)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D E F G")
box pos_x,pos_ys-(datafield(6)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D E F G H")
box pos_x,pos_ys-(datafield(7)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D E F G H I")
box pos_x,pos_ys-(datafield(8)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D E F G H I J")
box pos_x,pos_ys-(datafield(9)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D E F G H I J L")
box pos_x,pos_ys-(datafield(10)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D E F G H I J L M")
box pos_x,pos_ys-(datafield(11)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D E F G H I J L M N")
box pos_x,pos_ys-(datafield(12)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D E F G H I J L M N O")
box pos_x,pos_ys-(datafield(13)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
pos_x=text width(" A B C D E F G H I J L M N O P")
box pos_x,pos_ys-(datafield(14)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
rem position of last bar using the text
pos_x=text width(" A B C D E F G H I J L M N O P Q")
box pos_x,pos_ys-(datafield(15)*quotient#)*unit_size,pos_x+bar_width,pos_yf,RGB(0,0,255),RGB(0,0,255),RGB(0,0,255),RGB(0,0,255)
rem get the image and delete the bitmap
get image datafield_Plot_image,0,0,bit_size_x,bit_size_y,1
delete bitmap Bit_Map_Number1
rem put the image on to the object
texture object datafield_plot,datafield_Plot_image
endfunction
edit
opps just re read the title. well you've got bars, pies are 360 so it would be angles of that filled in.
Dark Physics makes any hot drink go cold.