Graph
[Desktop Automation]
Image UI element. It is created by system:creategraph()
.
Properties
None.
Methods
Name | Syntax | Description |
---|---|---|
addrow | graph:addrow(key:float); | Adds a row/key at the position (like the width (and index) of a spreadsheet column) |
addvalue | Graph:addvalue(column:integer, row:integer, value:integer) | Sets value in row (key) and column |
setcolor | Graph:setcolor(graph:integer, color:integer) | Sets color for graph. Graph is the index of the graph (the number of graphs is set during the creation. Color is a RGB value encoded in one integer. |
savetopng | Graph:savetopng(name:string, width:integer, height:integer) | Saves the graph to the file of name and in the height and width dimensions. |
Examples
graph:setcolor (0, 256*128); -- Green
graph:setcolor (1, 65536*128); -- Blue