Graph drawer
[Desktop Automation]
The Graph drawer object plots values into a 2D graph. It is created by system:creategraphdrawer()
.
Properties
Colors are encoded as Integers $BBGGRR
.
Property | Read/write | Type | Description |
---|---|---|---|
title | Read/write | String | Title of the graph at top |
caption_x | Read/write | String | Caption for x axis at bottom |
caption_y | Read/write | String | Caption for y axis at left |
unit_x | Read/write | String | Unit text for x axis |
unit_y | Read/write | String | Unit text for y axis |
formatter_x | Read/write | String | Formatter for x values on the grid |
formatter_y | Read/write | String | Formatter for y values on the grid |
color_background | Read/write | Number | Color of the background |
color_caption | Read/write | Number | Color of the font |
color_border | Read/write | Number | Color of the graph-border |
font_size | Read/write | Number | Size of the font |
margin | Write | Number | Minimum gap between graph and image border |
margin_left | Read/write | Number | Minimum gap between graph and left image border |
margin_right | Read/write | Number | Minimum gap between graph and right image border |
margin_top | Read/write | Number | Minimum gap between graph and top image border |
margin_bottom | Read/write | Number | Minimum gap between graph and bottom image border |
padding | Write | Number | Minimum gap between data point and graph border |
padding_left | Read/write | Number | Minimum gap between data point and left graph border |
padding_right | Read/write | Number | Minimum gap between data point and right graph border |
padding_top | Read/write | Number | Minimum gap between data point and top graph border |
padding_bottom | Read/write | Number | Minimum gap between data point and bottom graph border |
border | Read/write | Number | Pixel width of the graph border |
grid | Read/write | Number | Pixel width of the grind in the graph |
grid_space_x | Read/write | Number | Distance of vertical grid lines in x-value space |
grid_space_y | Read/write | Number | Distance of horizontal grid lines in y-value space |
modify_x | Read/write | Number | Mouse-modifier to change x-viewport. This is a bitwise combination of left-click (1), shift (2), ctrl (4) and shift+ctrl (8). |
modify_y | Read/write | Number | Mouse-modifier to change y-viewport |
Methods
Name | Syntax | Description |
---|---|---|
adddataset | graphdrawer:adddataset() | Add a new dataset. See graph drawer dataset section |
reset | graphdrawer:reset() | Clear the drawer. Removes all datasets. |
draw | graphdrawer:draw(width, height: number) | Draw the graph to an image of given size. Returns the new image object. |