Skip to content

fix formatting issue #1462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions docs/Scripting-Language.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,13 @@ You may put any html code here.
- HTML statements are displayed in the main section of the main page

for next loops are supported to repeat HTML code (precede with % char)
```
%for var from to inc
%next

```
but this method is preferred:
script subroutines may be called sub=name of subroutine, like normal subroutines
%=#sub
`%=#sub`
in this subroutine a web line may be sent by wcs (see below) thus allowing dynamic HTML pages

=#sub(x) in any position of webline calls subroutine. this allows inserting content
Expand Down Expand Up @@ -460,11 +461,13 @@ remark: state variable names used for IO in the web interface may not contain an
`WSO_FORCEPLAIN` = 4 send line in plain (no table elements)
`WSO_FORCEMAIN` = 8 send lines in main mode ($ mode)

### Google Charts
### Google Charts

google chart support requires arrays and to make sense also permanent arrays. Therefore on 4M Flash Systems the use of `USE_UFILESYS` is recommended while on 1 M Flash Systems the special EEPROM mode should be used (see above). other options may also be needed like `LARGE_ARRAYS`

draws a google chart with up to 4 data sets per chart
#### basic chart

draw a google chart with up to 4 data sets per chart
`gc(T (size) array1 ... array4 "name" "label1" ... "label4" "entrylabels" "header" {"maxy1"} {"maxy2"})`
`T` = type
- b=barchart
Expand All @@ -482,7 +485,9 @@ remark: state variable names used for IO in the web interface may not contain an

b,l,h type may have the '2' option to specify exactly 2 arrays with 2 y scales given at the end of parameter list.

a very individual chart may be specified by splitting the chart definition and inserting the chart options directly see example below
#### advanced chart
a custom chart may be specified by splitting the chart definition and inserting the chart options directly.
see example below

`size` = optional size, allows to use only part of an array, must be lower then array size

Expand All @@ -501,8 +506,10 @@ remark: state variable names used for IO in the web interface may not contain an

additionally you have to define the html frame to put the chart in (both lines must be preceded by a $ char)
e.g.
<pre><code>$&lt;div id="chart1"style="width:640px;height:480px;margin:0 auto">&lt;/div>
$gc(c array1 array2 "wr" "pwr1" "pwr2" "mo|di|mi|do|fr|sa|so" "Solar feed")</pre></code>
```
$<div id="chart1"style="width:640px;height:480px;margin:0 auto"></div>
$gc(c array1 array2 "wr" "pwr1" "pwr2" "mo|di|mi|do|fr|sa|so" "Solar feed")
```

you may define more then one chart. The charts id is chart1 ... chartN

Expand Down Expand Up @@ -1070,6 +1077,7 @@ print task1 on core %core%

>t2
print task2 on core %core%
```

### ESP32 Webcam support

Expand Down