Skip to content

Commit 393c602

Browse files
authored
Update 612-graphics-chart.markdown
1 parent 1d9aa6c commit 393c602

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

_build/reference/612-graphics-chart.markdown

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
11
# CHART
22

3-
> CHART LINECHART|BARCHART, array() [, style [, x1, y1, x2, y2]]
3+
> CHART charttype, array() [, style [, x1, y1, x2, y2]]
44
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
623

724
```
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
1029
```
1130

31+
Example 2: All charttypes and styles in one glance
32+
1233
~~~
1334
Const LINE_CHART = 1
1435
Const BAR_CHART = 2

0 commit comments

Comments
 (0)