-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathusage.tid
46 lines (38 loc) · 2.03 KB
/
usage.tid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
title: $:/plugins/gt6796c/graph-tw5/usage
This widget allows the user to create simple graphs and display them in a tiddler. The equation will be provided an 'x' value
and should return the 'y' value. Multiple Equations can be specified on separate lines to represent a system of equations. Points can
be represented by defining the point's coordinates in the form of an array. Arrays can be nested to allow for multiple points
to be the same color. (See examples)
The equation body can either be placed in the "equation" attribute or as the body of the widget.
The following attributes are customizable for the widget:
; minX - integer
: defaults to -1
; minY - integer
: defaults to -1
; maxX - integer
: defaults to 10
; maxY - integer
: default to 10
; width - integer
: defaults to "not specified"
; height - integer
: defaults to "not specified"
; color - string
: defaults to 'red'
;thickness - integer
: defaults to 2
; unitsPerTick
: defaults to 1
; bounds - integer array
: no default 2 elements sets the minX & minY. 4 elements sets minX, minY, maxX and maxY
The following attributes are for systems of equations:
;color - json array of colors e.g. ['red','green','blue']
: defaults to using value of 'color' attribute defined above
;thickness - json array of integers e.g. [2,2,1]
: defaults to using value of 'thickness' attribute defined above
Note the number of colors & thicknesses should match the number of equations specified. If there are more equations specified, random colors will
be assigned.
!!Notes
*The body of the text is parsed as a Tiddler. If you need conflicting elements, use either the ``text`` attribute on the widget or set the type field to ``text/vnd.tiddlywiki.graph`` and transclude the whole Tiddler
** In particular, the Javascript array of array syntax will be parsed as a Tiddler Title unless you leave an empty space between the two opening brackets.
* If you author a Tiddler with the Content type ``text/vnd.tiddlywiki.graph`` CamelCased variables may be assigned by using a 'dot' notation. (e.g. minX would be graph-min.x)