File: reference.html

package info (click to toggle)
libjs-graphael 0.5%2Bdfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 296 kB
  • sloc: javascript: 1,589; makefile: 4
file content (350 lines) | stat: -rw-r--r-- 30,535 bytes parent folder | download | duplicates (2)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<!DOCTYPE html>
<!-- Generated with Dr.js -->
<html lang="en"><head><meta charset="utf-8"><title>g.Raphaël Reference</title><link rel="stylesheet" href="dr.css" media="screen"><link rel="stylesheet" href="dr-print.css" media="print"></head><body id="dr-js"><div id="dr"><ol class="dr-toc" id="dr-toc"><li class="dr-lvl0"><a href="#Element" class="{clas}"><span>Element</span></a></li><li class="dr-lvl1"><a href="#Element.blob" class="dr-method"><span>Element.blob()</span></a></li><li class="dr-lvl1"><a href="#Element.darker" class="dr-method"><span>Element.darker()</span></a></li><li class="dr-lvl1"><a href="#Element.drop" class="dr-method"><span>Element.drop()</span></a></li><li class="dr-lvl1"><a href="#Element.flag" class="dr-method"><span>Element.flag()</span></a></li><li class="dr-lvl1"><a href="#Element.label" class="dr-method"><span>Element.label()</span></a></li><li class="dr-lvl1"><a href="#Element.lighter" class="dr-method"><span>Element.lighter()</span></a></li><li class="dr-lvl1"><a href="#Element.popup" class="dr-method"><span>Element.popup()</span></a></li><li class="dr-lvl1"><a href="#Element.resetBrightness" class="dr-method"><span>Element.resetBrightness()</span></a></li><li class="dr-lvl1"><a href="#Element.tag" class="dr-method"><span>Element.tag()</span></a></li><li class="dr-lvl0"><a href="#Paper" class="{clas}"><span>Paper</span></a></li><li class="dr-lvl1"><a href="#Paper.blob" class="dr-method"><span>Paper.blob()</span></a></li><li class="dr-lvl1"><a href="#Paper.drop" class="dr-method"><span>Paper.drop()</span></a></li><li class="dr-lvl1"><a href="#Paper.flag" class="dr-method"><span>Paper.flag()</span></a></li><li class="dr-lvl1"><a href="#Paper.label" class="dr-method"><span>Paper.label()</span></a></li><li class="dr-lvl1"><a href="#Paper.popup" class="dr-method"><span>Paper.popup()</span></a></li><li class="dr-lvl1"><a href="#Paper.tag" class="dr-method"><span>Paper.tag()</span></a></li><li class="dr-lvl0"><a href="#g" class="{clas}"><span>g</span></a></li><li class="dr-lvl1"><a href="#g.colors" class="dr-array"><span>g.colors</span></a></li><li class="dr-lvl1"><a href="#g.shim" class="dr-object"><span>g.shim</span></a></li><li class="dr-lvl1"><a href="#g.txtattr" class="dr-object"><span>g.txtattr</span></a></li></ol><div class="dr-doc"><h1>g.Raphaël Reference</h1><div class="Element-section"><h2 id="Element" class="undefined"><i class="dr-trixie">&#160;</i>Element<a href="#Element" title="Link to this section" class="dr-hash">&#x2693;</a></h2>
<div class="extra" id="Element-extra"></div></div><div class="Element-blob-section"><h3 id="Element.blob" class="dr-method"><i class="dr-trixie">&#160;</i>Element.blob(angle, x, y)<a href="#Element.blob" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 375 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L375">&#x27ad;</a></h3>
<div class="extra" id="Element.blob-extra"></div></div><div class="dr-method"><p>Puts the context Element in a 'blob' tooltip. Can also be used on sets.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">angle</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">angle of orientation in degrees [default: <code>0</code>]</dd>
<dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the blob's tail [default: Element's <code>x</code> or <code>cx</code>]</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the blob's tail [default: Element's <code>x</code> or <code>cx</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">path element of the blob</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.circle(<span class="d">50</span>, <span class="d">50</span>, <span class="d">8</span>).attr({
    stroke: <i>"#fff"</i>,
    fill: <i>"<span class="d">0</span>-#c9de96-#8ab66b:<span class="d">44</span>-#<span class="d">398235</span>"</i>
}).blob(<span class="d">60</span>);
</code></pre>
</div><div class="Element-darker-section"><h3 id="Element.darker" class="dr-method"><i class="dr-trixie">&#160;</i>Element.darker(times)<a href="#Element.darker" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 633 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L633">&#x27ad;</a></h3>
<div class="extra" id="Element.darker-extra"></div></div><div class="dr-method"><p>Makes the context element darker by decreasing the brightness and increasing the saturation by a given factor. Can be called on Sets.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">times</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">adjustment factor [default: <code>2</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Element</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.circle(<span class="d">50</span>, <span class="d">50</span>, <span class="d">20</span>).attr({
    fill: <i>"#ff0000"</i>,
    stroke: <i>"#fff"</i>,
    <i>"stroke-width"</i>: <span class="d">2</span>
}).darker(<span class="d">6</span>);
</code></pre>
</div><div class="Element-drop-section"><h3 id="Element.drop" class="dr-method"><i class="dr-trixie">&#160;</i>Element.drop(angle, x, y)<a href="#Element.drop" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 225 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L225">&#x27ad;</a></h3>
<div class="extra" id="Element.drop-extra"></div></div><div class="dr-method"><p>Puts the context Element in a 'drop' tooltip. Can also be used on sets.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">angle</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">angle of orientation in degrees [default: <code>0</code>]</dd>
<dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the drop's point [default: Element's <code>x</code> or <code>cx</code>]</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the drop's point [default: Element's <code>x</code> or <code>cx</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">path element of the drop</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.circle(<span class="d">50</span>, <span class="d">50</span>, <span class="d">8</span>).attr({
    stroke: <i>"#fff"</i>,
    fill: <i>"<span class="d">0</span>-#c9de96-#8ab66b:<span class="d">44</span>-#<span class="d">398235</span>"</i>
}).drop(<span class="d">60</span>);
</code></pre>
</div><div class="Element-flag-section"><h3 id="Element.flag" class="dr-method"><i class="dr-trixie">&#160;</i>Element.flag(angle, x, y)<a href="#Element.flag" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 281 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L281">&#x27ad;</a></h3>
<div class="extra" id="Element.flag-extra"></div></div><div class="dr-method"><p>Puts the context Element in a 'flag' tooltip. Can also be used on sets.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">angle</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">angle of orientation in degrees [default: <code>0</code>]</dd>
<dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the flag's point [default: Element's <code>x</code> or <code>cx</code>]</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the flag's point [default: Element's <code>x</code> or <code>cx</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">path element of the flag</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.circle(<span class="d">50</span>, <span class="d">50</span>, <span class="d">10</span>).attr({
    stroke: <i>"#fff"</i>,
    fill: <i>"<span class="d">0</span>-#c9de96-#8ab66b:<span class="d">44</span>-#<span class="d">398235</span>"</i>
}).flag(<span class="d">60</span>);
</code></pre>
</div><div class="Element-label-section"><h3 id="Element.label" class="dr-method"><i class="dr-trixie">&#160;</i>Element.label()<a href="#Element.label" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 346 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L346">&#x27ad;</a></h3>
<div class="extra" id="Element.label-extra"></div></div><div class="dr-method"><p>Puts the context Element in a 'label' tooltip. Can also be used on sets.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">path element of the label.</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.circle(<span class="d">50</span>, <span class="d">50</span>, <span class="d">10</span>).attr({
    stroke: <i>"#fff"</i>,
    fill: <i>"<span class="d">0</span>-#c9de96-#8ab66b:<span class="d">44</span>-#<span class="d">398235</span>"</i>
}).label();
</code></pre>
</div><div class="Element-lighter-section"><h3 id="Element.lighter" class="dr-method"><i class="dr-trixie">&#160;</i>Element.lighter(times)<a href="#Element.lighter" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 597 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L597">&#x27ad;</a></h3>
<div class="extra" id="Element.lighter-extra"></div></div><div class="dr-method"><p>Makes the context element lighter by increasing the brightness and reducing the saturation by a given factor. Can be called on Sets.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">times</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">adjustment factor [default: <code>2</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Element</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.circle(<span class="d">50</span>, <span class="d">50</span>, <span class="d">20</span>).attr({
    fill: <i>"#ff0000"</i>,
    stroke: <i>"#fff"</i>,
    <i>"stroke-width"</i>: <span class="d">2</span>
}).lighter(<span class="d">6</span>);
</code></pre>
</div><div class="Element-popup-section"><h3 id="Element.popup" class="dr-method"><i class="dr-trixie">&#160;</i>Element.popup(dir, size, x, y)<a href="#Element.popup" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 24 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L24">&#x27ad;</a></h3>
<div class="extra" id="Element.popup-extra"></div></div><div class="dr-method"><p>Puts the context Element in a 'popup' tooltip. Can also be used on sets.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">dir</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">location of Element relative to the tail: <code>'down'</code>, <code>'left'</code>, <code>'up'</code> [default], or <code>'right'</code>.</dd>
<dt class="dr-param">size</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">amount of bevel/padding around the Element, as well as half the width and height of the tail [default: <code>5</code>]</dd>
<dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the popup's tail [default: Element's <code>x</code> or <code>cx</code>]</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the popup's tail [default: Element's <code>y</code> or <code>cy</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">path element of the popup</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.circle(<span class="d">50</span>, <span class="d">50</span>, <span class="d">5</span>).attr({
    stroke: <i>"#fff"</i>,
    fill: <i>"<span class="d">0</span>-#c9de96-#8ab66b:<span class="d">44</span>-#<span class="d">398235</span>"</i>
}).popup();
</code></pre>
</div><div class="Element-resetBrightness-section"><h3 id="Element.resetBrightness" class="dr-method"><i class="dr-trixie">&#160;</i>Element.resetBrightness()<a href="#Element.resetBrightness" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 665 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L665">&#x27ad;</a></h3>
<div class="extra" id="Element.resetBrightness-extra"></div></div><div class="dr-method"><p>Resets brightness and saturation levels to their original values. See <a href="#Element.lighter" class="dr-link">Element.lighter</a> and <a href="#Element.darker" class="dr-link">Element.darker</a>. Can be called on Sets.
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Element</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.circle(<span class="d">50</span>, <span class="d">50</span>, <span class="d">20</span>).attr({
    fill: <i>"#ff0000"</i>,
    stroke: <i>"#fff"</i>,
    <i>"stroke-width"</i>: <span class="d">2</span>
}).lighter(<span class="d">6</span>).resetBrightness();
</code></pre>
</div><div class="Element-tag-section"><h3 id="Element.tag" class="dr-method"><i class="dr-trixie">&#160;</i>Element.tag(angle, r, x, y)<a href="#Element.tag" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 135 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L135">&#x27ad;</a></h3>
<div class="extra" id="Element.tag-extra"></div></div><div class="dr-method"><p>Puts the context Element in a 'tag' tooltip. Can also be used on sets.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">angle</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">angle of orientation in degrees [default: <code>0</code>]</dd>
<dt class="dr-param">r</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">radius of the loop [default: <code>5</code>]</dd>
<dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the center of the tag loop [default: Element's <code>x</code> or <code>cx</code>]</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the center of the tag loop [default: Element's <code>x</code> or <code>cx</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">path element of the tag</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.circle(<span class="d">50</span>, <span class="d">50</span>, <span class="d">15</span>).attr({
    stroke: <i>"#fff"</i>,
    fill: <i>"<span class="d">0</span>-#c9de96-#8ab66b:<span class="d">44</span>-#<span class="d">398235</span>"</i>
}).tag(<span class="d">60</span>);
</code></pre>
</div><div class="Paper-section"><h2 id="Paper" class="undefined"><i class="dr-trixie">&#160;</i>Paper<a href="#Paper" title="Link to this section" class="dr-hash">&#x2693;</a></h2>
<div class="extra" id="Paper-extra"></div></div><div class="Paper-blob-section"><h3 id="Paper.blob" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.blob(x, y, text, angle)<a href="#Paper.blob" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 569 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L569">&#x27ad;</a></h3>
<div class="extra" id="Paper.blob-extra"></div></div><div class="dr-method"><p>Puts the given text into a 'blob' tooltip. The text is given a default style according to <a href="#g.txtattr" class="dr-link">g.txtattr</a>. See <a href="#Element.blob" class="dr-link">Element.blob</a>
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the blob's tail</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the blob's tail</dd>
<dt class="dr-param">text</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">text to place inside the blob</dd>
<dt class="dr-param">angle</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">angle of orientation in degrees [default: <code>0</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">set containing the blob path and the text element</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.blob(<span class="d">50</span>, <span class="d">50</span>, <i>"$<span class="d">9.99</span>"</i>, <span class="d">60</span>);
</code></pre>
</div><div class="Paper-drop-section"><h3 id="Paper.drop" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.drop(x, y, text, angle)<a href="#Paper.drop" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 545 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L545">&#x27ad;</a></h3>
<div class="extra" id="Paper.drop-extra"></div></div><div class="dr-method"><p>Puts the given text into a 'drop' tooltip. The text is given a default style according to <a href="#g.txtattr" class="dr-link">g.txtattr</a>. See <a href="#Element.drop" class="dr-link">Element.drop</a>
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the drop's point</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the drop's point</dd>
<dt class="dr-param">text</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">text to place inside the drop</dd>
<dt class="dr-param">angle</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">angle of orientation in degrees [default: <code>0</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">set containing the drop path and the text element</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.drop(<span class="d">50</span>, <span class="d">50</span>, <i>"$<span class="d">9.99</span>"</i>, <span class="d">60</span>);
</code></pre>
</div><div class="Paper-flag-section"><h3 id="Paper.flag" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.flag(x, y, text, angle)<a href="#Paper.flag" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 521 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L521">&#x27ad;</a></h3>
<div class="extra" id="Paper.flag-extra"></div></div><div class="dr-method"><p>Puts the given <code>text</code> into a 'flag' tooltip. The text is given a default style according to <a href="#g.txtattr" class="dr-link">g.txtattr</a>. See <a href="#Element.flag" class="dr-link">Element.flag</a>
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the flag's point</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the flag's point</dd>
<dt class="dr-param">text</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">text to place inside the flag</dd>
<dt class="dr-param">angle</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">angle of orientation in degrees [default: <code>0</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">set containing the flag path and the text element</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.flag(<span class="d">50</span>, <span class="d">50</span>, <i>"$<span class="d">9.99</span>"</i>, <span class="d">60</span>);
</code></pre>
</div><div class="Paper-label-section"><h3 id="Paper.label" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.label(x, y, text)<a href="#Paper.label" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 445 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L445">&#x27ad;</a></h3>
<div class="extra" id="Paper.label-extra"></div></div><div class="dr-method"><p>Puts the given <code>text</code> into a 'label' tooltip. The text is given a default style according to <a href="#g.txtattr" class="dr-link">g.txtattr</a>. See <a href="#Element.label" class="dr-link">Element.label</a>
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the center of the label</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the center of the label</dd>
<dt class="dr-param">text</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">text to place inside the label</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">set containing the label path and the text element</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.label(<span class="d">50</span>, <span class="d">50</span>, <i>"$<span class="d">9.99</span>"</i>);
</code></pre>
</div><div class="Paper-popup-section"><h3 id="Paper.popup" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.popup(x, y, text, dir, size)<a href="#Paper.popup" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 472 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L472">&#x27ad;</a></h3>
<div class="extra" id="Paper.popup-extra"></div></div><div class="dr-method"><p>Puts the given <code>text</code> into a 'popup' tooltip. The text is given a default style according to <a href="#g.txtattr" class="dr-link">g.txtattr</a>. See <a href="#Element.popup" class="dr-link">Element.popup</a>
</p>
<p>Note: The <code>dir</code> parameter has changed from g.Raphael 0.4.1 to 0.5. The options <code>0</code>, <code>1</code>, <code>2</code>, and <code>3</code> has been changed to <code>'down'</code>, <code>'left'</code>, <code>'up'</code>, and <code>'right'</code> respectively.
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the popup's tail</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the popup's tail</dd>
<dt class="dr-param">text</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">text to place inside the popup</dd>
<dt class="dr-param">dir</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">location of the text relative to the tail: <code>'down'</code>, <code>'left'</code>, <code>'up'</code> [default], or <code>'right'</code>.</dd>
<dt class="dr-param">size</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">amount of padding around the Element [default: <code>5</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">set containing the popup path and the text element</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.popup(<span class="d">50</span>, <span class="d">50</span>, <i>"$<span class="d">9.99</span>"</i>, <i>'down'</i>);
</code></pre>
</div><div class="Paper-tag-section"><h3 id="Paper.tag" class="dr-method"><i class="dr-trixie">&#160;</i>Paper.tag(x, y, text, angle, r)<a href="#Paper.tag" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 497 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L497">&#x27ad;</a></h3>
<div class="extra" id="Paper.tag-extra"></div></div><div class="dr-method"><p>Puts the given text into a 'tag' tooltip. The text is given a default style according to <a href="#g.txtattr" class="dr-link">g.txtattr</a>. See <a href="#Element.tag" class="dr-link">Element.tag</a>
</p>
<p class="header">Parameters
</p>
<dl class="dr-parameters"><dt class="dr-param">x</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">x coordinate of the center of the tag loop</dd>
<dt class="dr-param">y</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">y coordinate of the center of the tag loop</dd>
<dt class="dr-param">text</dt>
<dd class="dr-type"><em class="dr-type-string">string</em></dd>
<dd class="dr-description">text to place inside the tag</dd>
<dt class="dr-param">angle</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">angle of orientation in degrees [default: <code>0</code>]</dd>
<dt class="dr-param">r</dt>
<dd class="dr-type"><em class="dr-type-number">number</em></dd>
<dd class="dr-description">radius of the loop [default: <code>5</code>]</dd>
</dl>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">set containing the tag path and the text element</span></p>
<p class="header">Usage
</p>
<pre class="javascript code"><code>paper.tag(<span class="d">50</span>, <span class="d">50</span>, <i>"$<span class="d">9.99</span>"</i>, <span class="d">60</span>);
</code></pre>
</div><div class="g-section"><h2 id="g" class="undefined"><i class="dr-trixie">&#160;</i>g<a href="#g" title="Link to this section" class="dr-hash">&#x2693;</a></h2>
<div class="extra" id="g-extra"></div></div><div class="g-colors-section"><h3 id="g.colors" class="dr-array"><i class="dr-trixie">&#160;</i>g.colors<a href="#g.colors" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 726 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L726">&#x27ad;</a></h3>
<div class="extra" id="g.colors-extra"></div></div><div class="dr-array"><p>An array of color values that charts will iterate through when drawing chart data values.
</p>
</div><div class="g-shim-section"><h3 id="g.shim" class="dr-object"><i class="dr-trixie">&#160;</i>g.shim<a href="#g.shim" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 706 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L706">&#x27ad;</a></h3>
<div class="extra" id="g.shim-extra"></div></div><div class="dr-object"><p>An attribute object that charts will set on all generated shims (shims being the invisible objects that mouse events are bound to)
</p>
<p class="header">Default value
</p>
<pre class="javascript code"><code>{ stroke: <i>'none'</i>, fill: <i>'#<span class="d">000</span>'</i>, <i>'fill-opacity'</i>: <span class="d">0</span> }
</code></pre>
</div><div class="g-txtattr-section"><h3 id="g.txtattr" class="dr-object"><i class="dr-trixie">&#160;</i>g.txtattr<a href="#g.txtattr" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 717 in the source" href="https://github.com/DmitryBaranovskiy/g.raphael/blob/master/g.raphael.js#L717">&#x27ad;</a></h3>
<div class="extra" id="g.txtattr-extra"></div></div><div class="dr-object"><p>An attribute object that charts and tooltips will set on any generated text
</p>
<p class="header">Default value
</p>
<pre class="javascript code"><code>{ font: <i>'12px Arial, sans-serif'</i>, fill: <i>'#fff'</i> }
</code></pre>
</div></div></div>
<script src="../raphael-min.js"></script>
<script src="../g.raphael.js"></script>
<script src="reference.js"></script>
</body></html>