This repository has been archived by the owner on Nov 25, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
examples.txt
353 lines (277 loc) · 7.39 KB
/
examples.txt
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
351
352
Chart tag examples
==================
3D pie chart, simple data, labels
---------------------------------
::
{% chart %}
{% chart-data data1 %}
{% chart-size "300x200" %}
{% chart-type "pie" %}
{% chart-labels "One" "Two" "Three" %}
{% chart-alt "It worked!" %}
{% endchart %}
Line chart, legend, fill, colors, saving as a variable
------------------------------------------------------
::
{% chart as c %}
{% chart-data data2 %}
{% chart-type "line" %}
{% chart-size "300x200" %}
{% chart-colors "CC0000" %}
{% chart-fill "EEEEEE" %}
{% chart-legend "Sweet" %}
{% endchart %}
<img src="{{ c.url }}" width="300" height="200" />
Titles, multiple colors, background
-----------------------------------
::
{% chart %}
{% chart-title "Hello, World!" %}
{% chart-data data2 data3 %}
{% chart-type "line" %}
{% chart-size "300x200" %}
{% chart-colors "CC0000" "00CC00" %}
{% chart-background "EEEEEE" %}
{% endchart %}
Venn charts, background gradients
---------------------------------
::
{% chart %}
{% chart-data venn %}
{% chart-type "venn" %}
{% chart-size "300" "200" %}
{% chart-background-gradient "45" "000000" "0" "FFFFFF" "0.6" %}
{% endchart %}
Pie charts, stripes
-------------------
::
{% chart %}
{% chart-data data1 %}
{% chart-size "300x200" %}
{% chart-type "pie" %}
{% chart-background-stripes "45" "cccccc" "0.05" "FFFFFF" "0.05" %}
{% endchart %}
Bar chart, chart-bar-width
--------------------------
::
{% chart %}
{% chart-data data1 %}
{% chart-size "300x200" %}
{% chart-type "bar" %}
{% chart-bar-width 60 0 6 %}
{% endchart %}
Extension, column charts (grouped & stacked), filters in data expressions
-------------------------------------------------------------------------
::
{% chart as columns %}
{% chart-size "300x200" %}
{% chart-type "column-grouped" %}
{% chart-data data2|slice:"6:10" %}
{% chart-data data3|slice:"6:10" %}
{% chart-colors "CC0000" "0000CC" %}
{% chart-bar-width 30 5 10 %}
{% endchart %}
{{ columns.img }}
{% chart extends columns %}
{% chart-type "column-stacked" %}
{% chart-bar-width 70 6 0 %}
{% endchart %}
Data scaling to avoid truncation
--------------------------------
::
{% chart %}
{% chart-size "300x200" %}
{% chart-type "column-stacked" %}
{% chart-data data2|slice:"6:10" %}
{% chart-data data3|slice:"6:10" %}
{% chart-data-scale "-10,250" %}
{% chart-colors "CC0000" "0000CC" %}
{% endchart %}
Scatter chart
-------------
::
{% chart %}
{% chart-data data2 %}
{% chart-data data3 %}
{% chart-size "300x200" %}
{% chart-type "scatter" %}
{% endchart %}
Chart-line-style, chart-grid
----------------------------
::
{% chart %}
{% chart-data data2 data3 %}
{% chart-type "line" %}
{% chart-size "300x200" %}
{% chart-colors "CC0000" "00CC00" %}
{% chart-line-style 3 6 3 %}
{% chart-line-style 1 1 2 %}
{% chart-grid 15 15 1 1 %}
{% endchart %}
Extension, ranger markers, fill-area
------------------------------------
::
{% chart as line %}
{% chart-type "line" %}
{% chart-size "300x200" %}
{% chart-range-marker "v" "E5ECF9" ".75" ".25" %}
{% chart-fill-area "76A4FB" %}
{% endchart %}
{% chart extends line %}
{% chart-data data2 %}
{% endchart %}
More markers
------------
::
{% chart %}
{% chart-data data2 data3 %}
{% chart-type "line" %}
{% chart-size "300x200" %}
{% chart-colors "CC0000" "00CC00" %}
{% chart-marker "circle" "cccc0077" 1 4 90 %}
{% chart-marker "x" "0000CC" 0 9.3 20 %}
{% endchart %}
Sensible defaults
-----------------
::
{% chart %}
{% chart-data data2 data3 %}
{% endchart %}
Axes
----
::
{% chart %}
{% chart-type "line" %}
{% chart-size "300x200" %}
{% chart-range-marker "v" "E5ECF9" ".75" ".25" %}
{% chart-fill-area "76A4FB" %}
{% chart-data data2|slice:"::-1" %}
{% axis "left" %}
{% axis-range 0 100 %}
{% endaxis %}
{% axis "bottom" %}
{% axis-labels "Jan" "Feb" "Mar" "Apr" %}
{% endaxis %}
{% endchart %}
More axes
---------
::
{% chart %}
{% chart-size "300x200" %}
{% chart-type "column-grouped" %}
{% chart-data data2|slice:"6:10" %}
{% chart-data data3|slice:"6:10" %}
{% chart-colors "CC0000" "0000CC" %}
{% chart-bar-width 30 5 10 %}
{% chart-background-stripes 0 "cccccc" 0.25 "ffffff" 0.25 %}
{% axis "top" %}
{% axis-labels "Group 1" "Group 2" "Group 3" "Control" %}
{% axis-label-positions 10 37 62 87 %}
{% axis-style "000000" "14" %}
{% endaxis %}
{% endchart %}
Data provided as literals
-------------------------
::
{% chart %}
{% chart-size "300x200" %}
{% chart-type "pie-3d" %}
{% chart-data "60,30,10" %}
{% chart-colors "cc00ee" %}
{% endchart %}
Automatic scaling of negative data
----------------------------------
::
{% chart %}
{% chart-size "300x200" %}
{% chart-type "line" %}
{% chart-data data4 %}
{% chart-range-marker "h" "000000" ".499" ".501" %}
{% axis "bottom" hide %}
{% axis "left" %}
{% axis-labels 5 0 -5 %}
{% endaxis %}
{% endchart %}
All-negative data
-----------------
::
{% chart %}
{% chart-size "300x200" %}
{% chart-type "line" %}
{% chart-data "-1,-5,-10" %}
{% axis "left" %}
{% axis-range "-10" "0" %}
{% endaxis %}
{% axis "bottom" hide %}
{% chart-range-marker "h" "000000" 1 .997 %}
{% endchart %}
Explicit chart data range
-------------------------
::
{% chart %}
{% chart-size "300x200" %}
{% chart-type "line" %}
{% chart-data data4 %}
{% chart-colors "00cc00" %}
{% chart-line-style 4 %}
{% chart-data-range -10 10 %}
{% chart-range-marker "h" "000000" ".499" ".501" %}
{% axis "bottom" hide %}
{% axis "left" %}
{% axis-labels 10 0 -10 %}
{% endaxis %}
{% endchart %}
Explicit "auto" chart data range
--------------------------------
::
{% chart as sine %}
{% chart-size "300x200" %}
{% chart-type "line" %}
{% chart-data data4|slice:"::-1" %}
{% chart-data-range -10 10 %}
{% chart-colors "0000cc" %}
{% chart-line-style 2 2 2 %}
{% chart-range-marker "h" "000000" ".499" ".501" %}
{% axis "bottom" hide %}
{% endchart %}
{% chart extends sine %}
{% chart-data-range "auto" %}
{% endchart %}
Chart labels may also accept lists
----------------------------------
::
{% chart %}
{% chart-data data1 %}
{% chart-size "300x200" %}
{% chart-type "pie" %}
{% chart-labels data1 %}
{% endchart %}
Custom title sizes, colors
--------------------------
::
{% chart %}
{% chart-data data1 %}
{% chart-size "300x200" %}
{% chart-type "pie" %}
{% chart-title "Pie!" 18 "cc0000" %}
{% endchart %}
Google-o-meter chart, with data scaling
---------------------------------------
::
{% chart %}
{% chart-labels "head" %}
{% chart-size "300x200" %}
{% chart-type "google-o-meter" %}
{% chart-data-scale "0,10" %}
{% chart-data "5" %}
{% endchart %}
Map chart
---------
::
{% chart %}
{% chart-size "440x220" %}
{% chart-type "map" %}
{% chart-map-area "usa" %}
{% chart-map-data mapdata %}
{% chart-colors "ffffff" "ff0000" "0000ff" %}
{% endchart %}