|
1 | 1 | # CHART |
2 | 2 |
|
3 | | -> CHART LINECHART|BARCHART, array() [, style [, x1, y1, x2, y2]] |
| 3 | +> CHART charttype, array() [, style [, x1, y1, x2, y2]] |
4 | 4 |
|
5 | | -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. |
| 5 | +Draws a chart of array values in the rectangular area x1,y1,x2,y2. The array stores y-values only: [y1, y2, y3, ... yn]. |
| 6 | +The x-axis of the chart has the values 1,2,3,...n. |
| 7 | + |
| 8 | +| Charttype | Value | |
| 9 | +| -------------------- |:-----:| |
| 10 | +| Linechart | 1 | |
| 11 | +| Barchart | 2 | |
| 12 | + |
| 13 | +| Style | Value | |
| 14 | +|----------------------|:-----:| |
| 15 | +| simple | 0 | |
| 16 | +| with marks | 1 | |
| 17 | +| with ruler | 2 | |
| 18 | +| with marks and ruler | 3 | |
| 19 | + |
| 20 | +See PLOT for plotting functions. |
| 21 | + |
| 22 | +Example 1: Linechart with marks and ruler |
6 | 23 |
|
7 | 24 | ``` |
8 | | -Const LINECHART = 1 |
9 | | -Const BARCHART = 2 |
| 25 | +demo = [1.5,2,3.5,4,5,6.5,7,8,9.5,10,11,12.5] |
| 26 | +Color 0, 15 |
| 27 | +cls |
| 28 | +Chart 1, demo, 3, 150, 150, 750, 550 |
10 | 29 | ``` |
11 | 30 |
|
| 31 | +Example 2: All charttypes and styles in one glance |
| 32 | + |
12 | 33 | ~~~ |
13 | 34 | Const LINE_CHART = 1 |
14 | 35 | Const BAR_CHART = 2 |
|
0 commit comments