CHART

SmallBASIC syntax groups: 


Graphics command CHART


10
20  CHART LINECHART|BARCHART, array() [, style [, x1, y1, x2, y2]]
30
Draws a chart of array values in the rectangular area x1,y1,x2,y2. Styles: 0 = simple, 1 = with-marks, 2 = with ruler, 3 = with marks and ruler.


See examples


If there is insufficient information on this page and you wish learn more about CHART, please send an email to smallbasic@gmail.com. You can help to improve information about CHART by submitting an article using the comments link below. Note, an offline language reference text file is now avialable – see the Download section.

Const LINECHART = 1
Const BARCHART = 2

Comments


Const LINE_CHART = 1
Const BAR_CHART = 2

demo = [1.5,2,3.5,4,5,6.5,7,8,9.5,10,11,12.5]

Color 0, 15

For
type = LINE_CHART To BAR_CHART ' 1 to 2
text = Iff(type = LINE_CHART, "LINE_CHART", "BAR_CHART")

For style = 0 To 3
Cls
Print " Chart Type: "; type; " ("; text; ")"
Print " Chart Style: "; style
Print
Print "Press any key...";
Chart type, demo, style, 150, 150, 750, 550
Pause
Next style
Next
type