Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmugl-reference.html
More file actions
2091 lines (1847 loc) · 84.8 KB
/
Copy pathmugl-reference.html
File metadata and controls
2091 lines (1847 loc) · 84.8 KB
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
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
title: Mugl File Reference
docs: selected
permalink: /docs/mugl-reference/
layout: master
---
<script>
$(document).ready(function() {
console.log('fluh ha');
console.log($('body'));
console.log($('body').scrollspy);
$('body').scrollspy({ target: '.sidebar-menu', offset: 50 });
});
</script>
<div class="row">
<div class="col-md-9">
<h1 id="top">Mugl File Reference</h1>
<p>The core elements of a Multigraph XML file.</p>
<hr>
<br>
<h2 id="window-element">The Window Element</h2>
<hr>
<p>The optional <code><window></code> element customizes the default border, margin, padding box, and plot area regions. The window can be thought of as a set of (mostly invisible) nested rectangles inside of a block-level <code><div></code> element. See the figure in the following section for an illustration.</p>
<pre class="syntaxhighlight"><code><mugl>
<window
width="INTEGER"
height="INTEGER"
border="INTEGER(2)"
bordercolor="COLOR(black)"
margin="INTEGER(2)"
padding="INTEGER(5)">
</window>
</mugl>
</code></pre>
<br>
<!-- Panel !-->
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Attributes</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>width</code><br><code>height</code>
</div>
<div class="col-md-10">
<p>Width and height of the graph (in pixels); usually defined with the <code>data-width</code> and <code>data-height</code> attributes specified in the HTML (or CSS) or with options passed to the Multigraph constructor in JavaScript code.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>border</code>
</div>
<div class="col-md-10">
<p>The width of the optional border (in pixels) to draw around the graph.</p>
<p>Default: <code>"2"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>bordercolor</code>
</div>
<div class="col-md-10">
<p>The color to use for the <code><window></code> border. Either an expression of the form 0xRRGGBB or one of the following strings: black, red, green, blue, yellow, magenta, cyan, or white.</p>
<p>Default: <code>"black"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>margin</code>
</div>
<div class="col-md-10">
<p>Number of pixels of blank space to allow on all sides between the window and the border.</p>
<p>Default: <code>"2"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>padding</code>
</div>
<div class="col-md-10">
<p>Number of pixels of blank space to allow inside the border; everything else (other than the border) that multigraph draws will be clipped to an imaginary rectangle that is inset by this number of pixels.</p>
<p>Default: <code>"5"</code></p>
</div>
</div>
</li>
</ul>
</div>
<br>
<br>
<h2 id="plotarea-element">The Plotarea Element</h2>
<hr>
<p>This element defines attributes about the plot area and padding box. The padding box (which includes the plot area) serves as the clipping region for everything that multigraph draws, including axes, labels, and titles. The plot area is region where data points are drawn. There can be <em>at most</em> one of these elements in a mugl file.</p>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<img src="/images/MarginBorderPlotarea.png" style="max-width: 100%; max-height: 100%;" />
</div>
<div class="col-md-2"></div>
</div>
<pre class="syntaxhighlight"><code><mugl>
<plotarea
marginbottom="INTEGER(35)"
margintop="INTEGER(10)"
marginleft="INTEGER(38)"
marginright="INTEGER(35)"
border="INTEGER(0)"
bordercolor="COLOR(0xeeeeee)"
color="COLOR">
</plotarea>
</mugl>
</code></pre>
<br>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Attributes</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>marginbottom</code>
</div>
<div class="col-md-10">
<p>Offset from the bottom side.</p>
<p>Default: <code>"35"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>margintop</code>
</div>
<div class="col-md-10">
<p>Offset from the top side.</p>
<p>Default: <code>"10"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>marginleft</code>
</div>
<div class="col-md-10">
<p>Offset from the left side.</p>
<p>Default: <code>"38"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>marginright</code>
</div>
<div class="col-md-10">
<p>Offset from the right side.</p>
<p>Default: <code>"35"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>border</code>
</div>
<div class="col-md-10">
<p>The width in pixels of a border to be drawn around the plotarea.</p>
<p>Default: <code>"0"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>bordercolor</code>
</div>
<div class="col-md-10">
<p>The color to use for the <code><plotarea></code> border. Either an expression of the form 0xRRGGBB or one of the following strings: black, red, green, blue, yellow, magenta, cyan, or white.</p>
<p>Default: <code>"0xeeeeee"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>color</code>
</div>
<div class="col-md-10">
<p>The color to fill the background of the <code><plotarea></code>. Either an expression of the form 0xRRGGBB or one of the following strings: black, red, green, blue, yellow, magenta, cyan, or white.</p>
<p>Default: <code>"0xeeeeee"</code></p>
</div>
</div>
</li>
</ul>
</div>
<br>
<br>
<h2 id="axis-elements">The Axis Elements</h2>
<hr>
<p>The <code><horizontalaxis></code> and <code><verticalaxis></code> elements define the location, display properties, data types, and range of values of a graph's axes. A graph can have one or more of both axis elements.</p>
<p>These attribute values determine the way that each kind of axis is displayed relative to the plot area. The position of each axis is relative to an edge of the plot area, but all or part of the axis may lie outside the plot area (in the padding box). In particular, a negative position value represents a distance away from the plot area (into the padding box).</p>
<!--
<div class="row">
<div class="col-md-6">
<h5 style="margin-bottom: 5px;">Vertical Axis Attributes</h5>
<img width="100%" src="/images/VerticalAxis.png" />
</div>
<div class="col-md-6">
<h5 style="margin-bottom: 5px;">Horizontal Axis Attributes</h5>
<img width="100%" style="margin-left: -5px;" src="/images/HorizontalAxis.png" />
</div>
</div>
!-->
<pre class="syntaxhighlight"><code><mugl>
<horizontalaxis
id="STRING"
type="DATATYPE(number)"
length="RELLEN(1.0)"
base="POINT(-1,1)"
anchor="DOUBLE(-1)"
position="POINT(0,0)"
min="DATAVALUEORAUTO(auto)"
max="DATAVALUEORAUTO(auto)"
minposition="RELPOS(-1.0)"
maxposition="RELPOS(1.0)"
color="COLOR(black)"
linewidth="INTEGER(1)"
tickmin="INTEGER(-3)"
tickmax="INTEGER(3)"
tickcolor="COLOR(black)">
<title
base="DOUBLE(0)"
anchor="POINT"
position="POINT"
angle="DOUBLE(0)">
</title>
<labels
format="STRING"
start="DATAVALUE(0)"
angle="DOUBLE(0)"
position="POINT"
anchor="POINT"
color="COLOR(black)"
spacing="STRING"
densityfactor="DOUBLE(1.0)">
<label
format="STRING"
start="DATAVALUE(0)"
angle="DOUBLE(0)"
position="POINT"
anchor="POINT"
color="COLOR(black)"
spacing="STRING"
densityfactor="DOUBLE(1.0)" />
<label .../>
<label .../>
</labels>
<grid
color="COLOR(0xeeeeee)"
visible="BOOLEAN(false)">
</grid>
<pan
allowed="BOOLEAN(yes)"
min="DATAVALUE"
max="DATAVALUE">
</pan>
<zoom
allowed="BOOLEAN(yes)"
min="DATAMEASURE"
max="DATAMEASURE"
anchor="DATAVALUE">
</zoom>
<binding
id="STRING"
min="DATAVALUE"
max="DATAVALUE">
</binding>
</horizontalaxis>
</mugl>
</code></pre>
<br>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Attributes</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>id</code>
</div>
<div class="col-md-10">
<p>An identifier that can be used to refer to this axis elsewhere in the mugl file.</p>
<p>Default: <code>"x"</code> and <code>"y"</code> for horizontal and vertical axes respectively, and then <code>"x1"</code> or <code>"y1"</code>, <code>"y1"</code> or <code>"y2"</code>, etc, for any additional axes.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>type</code>
</div>
<div class="col-md-10">
<p>The data type for the axis, either <code>"number"</code> or <code>"datetime"</code>.</p>
<p>Default: <code>"number"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>length</code>
</div>
<div class="col-md-10">
<p>The length of the axis.</p>
<p>There are two ways to specify the axis length.</p>
<p>The first way is to provide a number between 0 and 1 (in quotes), which represents a fraction of the parallel dimension of the plot area (width for horizontal axes, height for vertical axes). For example, given a horizontal axis, a value of <code>"1"</code> means that the axis length is exactly the width of the plot area, and a value of <code>"0.5"</code> would mean that the axis is half as long as the width of the plot area.</p>
<p>The second way is to give an expression of the form <code>"A+B"</code> or <code>"A-B"</code>. In this case, the first number A represents a fraction of the parallel dimension of the plot area, as above, and the second number +B or -B represents a number of pixels to add or subtract from that length. For example, a length of <code>"1-10"</code> for a horizontal axis would mean 10 pixels less than the width of the plot area. A value of <code>"0.5+20"</code> for a vertical axis would mean 20 pixels longer than half the height of the plot area.</p>
<p>If for some reason you want to specify an axis length exactly in terms of pixels, use <code>"0"</code> for A. For example, <code>"0+200"</code> would give an axis that is 200 pixels long. (Note that you definitely need to specify the <code>0+</code> in this case; if you specify a length simply as <code>"200"</code>, Multigraph will interpret it according to the first method above, as 200 times the width or height of the plot area.)</p>
<p>Default: <code>"1.0"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>base</code>
</div>
<div class="col-md-10">
<p>The location of the base point relative to the plot area.</p>
<p>Default: <code>"-1 -1"</code> (lower left corner of the plot area)</p>
<p>Described in detail in the <a href="#positioning--axes-positioning">Axes Positioning</a> section.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>anchor</code>
</div>
<div class="col-md-10">
<p>A number between -1 and 1 (in quotes) indicating the location of the anchor point along the axis.</p>
<p>Default: <code>"-1"</code> (the left endpoint of a horizontal axis, or the bottom endpoint of a vertical axis).</p>
<p>Described in detail in the <a href="#positioning--axes-positioning">Axes Positioning</a> section.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>position</code>
</div>
<div class="col-md-10">
<p>A coordinate pair of pixel offsets.</p>
<p>Default: <code>"0 0"</code></p>
<p>Described in detail in the <a href="#positioning--position-attribute">Position Attribute</a> section.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>min</code><br><code>max</code>
</div>
<div class="col-md-10">
<p>The minimum/maximum data value for the axis; i.e. the data value corresponding to the left (for horizontal axes) or bottom (for vertical axes) endpoint of the axis. If the axis type is <code>"number"</code>, the value is a number. If the type is <code>"datetime"</code>, the value is a datetime in the format YYYYMMDDHHmmss.</p>
<p>Default: <code>"auto"</code>. (Computed from data set; must be specified when using a custom web service.)</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>minposition</code><br><code>maxposition</code>
</div>
<div class="col-md-10">
<p>Indicates the location along the axis corresponding to the minimum or maximum data value (before any panning or zooming that the user might do). This is expressed in general in the form <code>"A+B"</code> or <code>"A-B"</code>, where <code>A</code> is a relative coordinate between -1 and 1, and <code>B</code> is an optional pixel offset (default is 0).</p>
<p>For example, <code>minposition="-1+5"</code> corresponds to a point that is 5 pixels to the right of the left endpoint, or above the bottom endpoint; <code>maxposition="1-5"</code> corresponds to a point that is 5 pixels to the left of the right endpoint, or below the top endpoint.</p>
<p>Default (<code>minposition</code>): <code>"-1.0"</code></p>
<p>Default (<code>maxposition</code>): <code>"1.0"</code></p>
<p><small>Note: it is possible to specify a <code>minposition</code> and <code>maxposition</code> combination in which the minimum position is to the right of, or above, the max position, which will cause the data values along the axis to increase in the opposite direction from usual (increasing leftward for horizontal axes, or downward for vertical axes). This is perfectly valid and will work correctly, but you should make sure that it is really what you want before deciding to make use of this feature, because it is likely to be confusing to users, unless there is a good reason to portray your data in this manner.</small></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>color</code>
</div>
<div class="col-md-10">
<p>The color of the line to draw for the axis. Either an expression of the form 0xRRGGBB or one of the following strings: <code>"black"</code>, <code>"red"</code>, <code>"green"</code>, <code>"blue"</code>, <code>"yellow"</code>, <code>"magenta"</code>, <code>cyan</code>, or <code>"white"</code></p>
<p>Default: <code>"black"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>linewidth</code>
</div>
<div class="col-md-10">
<p>The pixel thickness of the line to draw for the axis.</p>
<p>Default: <code>"1"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>tickmin</code>
</div>
<div class="col-md-10">
<p>The length, in pixels, of the part of the axis tick marks that extends below the axis.</p>
<p>Default: <code>"-3"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>tickmax</code>
</div>
<div class="col-md-10">
<p>The length, in pixels, of the part of the axis tick marks that extends above the axis.</p>
<p>Default: <code>"3"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>tickcolor</code>
</div>
<div class="col-md-10">
<p>The color of the axis tick marks. Either an expression of the form 0xRRGGBB or one of the following strings: <code>"black"</code>, <code>"red"</code>, <code>"green"</code>, <code>"blue"</code>, <code>"yellow"</code>, <code>"magenta"</code>, <code>cyan</code>, or <code>"white"</code></p>
<p>Default: <code>"black"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>positionbase</code>
</div>
<div class="col-md-10">
<p>Deprecated.</p>
<p>Use the <code>base</code> attribute instead to switch a vertical axis to be placed relative to the right edge of the plot area (<code>base="1 -1"</code>, for example), or to switch a horizontal axis to be placed relative to the top edge of the plot area (<code>base="-1 1"</code>, for example).</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">
<code>pregap</code><br><code>postgap</code>
</div>
<div class="col-md-10">
Deprecated.
</div>
</div>
</li>
</ul>
</div>
<br />
<h3>Axis Sub-Elements</h3>
<hr>
<h4 id="axis-sub-element--title">Title</h4>
<p>The title for the axis. An axis title is positioned and oriented according to its <code>position</code>, <code>anchor</code>, and <code>angle</code> attributes (see the <a href="#positioning">positioning</a> section for details). The title is positioned relative to the the center of the axis. To prevent a title from being drawn at all, use an empty title tag, i.e. <code><title/></code></p>
<p>Default: the axis <code>id</code></p>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Attributes</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>position</code></div>
<div class="col-md-10">
<p>A pixel offset from the axis center point.</p>
<p>Default: depends on the axis; chosen to look reasonable in most common situations</p>
<p>Described in detail in the <a href="#positioning--position-attribute">Position Attribute</a> section.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>anchor</code></div>
<div class="col-md-10">
<p>Default: depends on the choice and position of the axis.</p>
<p>Described in detail in the <a href="#positioning--base-and-anchor-attributes">Base & Anchor Attributes</a> section.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>angle</code></div>
<div class="col-md-10">
<p>Default: <code>"0"</code></p>
<p>Described in detail in the <a href="#positioning--angle-attribute">Angle Attribute</a> section.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>base</code></div>
<div class="col-md-10">
<p>Default: <code>"0"</code></p>
<p>Described in detail in the <a href="#positioning--base-and-anchor-attributes">Base & Anchor Attributes</a> section.</p>
</div>
</div>
</li>
</ul>
</div>
<hr>
<h4 id="axis-sub-element--labels">Labels</h4>
<p>Specifies how multigraph will draw tick marks along the axes and defines tick mark text labels. Multigraph will attempt to choose the densest tick spacing possible from the defined <code>spacing</code> attribute(s) so that the labels do not overlap. Attributes applied to the <code><labels></code> element are applied to all spacing intervals.</p>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Attributes</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>color</code></div>
<div class="col-md-10">
<p>The color of the line to draw for the axis. Either an expression of the form 0xRRGGBB or one of the following strings: <code>"black"</code>, <code>"red"</code>, <code>"green"</code>, <code>"blue"</code>, <code>"yellow"</code>, <code>"magenta"</code>, <code>cyan</code>, or <code>"white"</code>.</p>
<p>Default: <code>"black"</code></code>
</div>
</div>
</li>
</ul>
</div>
<h5 id="axis--labels-sub-element--label">Sub-Element: Label</h5>
<p>To customize specific spacing intervals, leave out a <code>spacing</code> attribute in the <code><labels></code> element and define <code><label></code> sub-elements each with a single number for the <code>spacing</code> attribute. Any attributes defined in these sub-elements will be applied to a specific spacing interval and override any attributes defined in the parent <code><labels></code> element.</p>
<p>The following attributes apply to the <code><labels></code> element and any <code><label></code> sub-elements.</p>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Attributes</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>spacing</code></div>
<div class="col-md-10">
<p>Defines axis tick spacing intervals.</p>
<p>When defined in the <code><labels></code> element, the value of <code>spacing</code> is a list of numbers sorted in descending order, separated by spaces. This list specifies the possible spacings to be used between tick marks on the axis. The default value for a number axis is <code>"10000</code> <code>5000</code> <code>2000</code> <code>1000</code> <code>500</code> <code>200</code> <code>100</code> <code>50</code> <code>20</code> <code>10</code> <code>5 2 1 0.1</code> <code>0.01 0.001"</code>. The default value for a datetime axis is <code>"1000Y</code> <code>500Y</code> <code>200Y</code> <code>100Y</code> <code>50Y</code> <code>20Y</code> <code>10Y</code> <code>5Y</code> <code>2Y</code> <code>1Y</code> <code>6M</code> <code>3M</code> <code>2M</code> <code>1M</code> <code>7D 3D 2D 1D</code> <code>12H 6H 3H 2H 1H"</code></p>
<p>When using <code><label></code> sub-elements, the <code>spacing</code> attribute is a single number, and there is no <code>spacing</code> attribute for the <code><labels></code> element.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>start</code></div>
<div class="col-md-10">
<p>Indicates where tick marks should be aligned on the axis. The location of axis tick marks is determined by <code>start</code> and <code>spacing</code>. Multigraph will draw tick marks, and labels for them, at locations <code>T + n*S</code>, where <code>T</code> is the value of <code>start</code>, <code>S</code> is the value of <code>spacing</code>, for each integer <code>n</code> such that <code>T + n*S</code> is visible in the graph's padding area.</p>
<p>Default: <code>"0"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>densityfactor</code></div>
<div class="col-md-10">
<p>Note: this attribute is not yet fully implemented in Multigraph 4.0.</p>
<p>This is a factor that can be used to tweak Multigraph's concept of what constitutes an "optimal" density of labels along the axis. It must be a positive number; values greather than 1 result in more labels, and values less than one result in fewer labels.</p>
<p>Default: <code>"1.0"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>angle</code><br><code>position</code><br><code>anchor</code></div>
<div class="col-md-10">
<p>These determine the location and orientation of each tick mark's label relative to the location of the tic mark itself. See the <a href="#positioning--axes-positioning">Axes Positioning</a> section for details.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>format</code></div>
<div class="col-md-10">
<p>String describing the format to be used for tick labels. The syntax depends on the type of the axis. For an axis of type <code>'number'</code>, it should be a C-style "printf" format string, such as <code>'%1d'</code>, which is the default. For a <code>'datetime'</code> type axis, it should be a string containing some combination of the following special format characters, each of which should be preceeded by a <code>%</code>. Any characters in the format string that are not preceded by a <code>%</code> are included verbatim in the formatted result.</p>
<p>Default (number axis): <code>"%.1f"</code></p>
<p>Default (datetime axis): <code>"%Y-%M-%D %H:%i"</code></p>
<div class="row">
<div class="col-md-6">
<table class="table table-bordered table-condensed table-striped">
<tbody>
<tr>
<td><strong>Character</strong></td>
<td><strong>Description</strong></td>
</tr>
<tr>
<td>Y</td><td>four digit year</td>
</tr>
<tr>
<td>d</td><td>day of month without leading zero</td>
</tr>
<tr>
<td>h</td><td>hour of day, 12-hour clock</td>
</tr>
<tr>
<td>m</td><td>month number without leading zero</td>
</tr>
<tr>
<td>N</td><td>month name, spelled out</td>
</tr>
<tr>
<td>P</td><td>AM or PM</td>
</tr>
<tr>
<td>i</td><td>minutes</td>
</tr>
<tr>
<td>v</td><td>deciseconds (10ths of a second)</td>
</tr>
<tr>
<td>q</td><td>milliseconds (1000ths of a second)</td>
</tr>
<tr>
<td>W</td><td>weekday name, spelled out</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-6">
<table class="table table-bordered table-condensed table-striped">
<tbody>
<tr>
<td><strong>Character</strong></td>
<td><strong>Description</strong></td>
</tr>
<tr>
<td>y</td><td>two digit year</td>
</tr>
<tr>
<td>D</td><td>2-digit day of month with leading zero</td>
</tr>
<tr>
<td>H</td><td>hour of day, 24-hour clock</td>
</tr>
<tr>
<td>M</td><td>2-digit month number with leading zero</td>
</tr>
<tr>
<td>n</td><td>month name, 3 letter abbreviation</td>
</tr>
<tr>
<td>p</td><td>am or pm</td>
</tr>
<tr>
<td>s</td><td>seconds</td>
</tr>
<tr>
<td>V</td><td>centiseconds (100ths of a second)</td>
</tr>
<tr>
<td>L</td><td>newline</td>
</tr>
<tr>
<td>w</td><td>weekday name, 3-letter abbreviation</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
<hr>
<h4 id="axis-sub-element--grid">Grid</h4>
<p>When this element is defined Multigraph will draw grid lines perpendicular to the axis being customized at the location of each tick mark. If this element is left absent, Multigraph will not draw grid lines along the axis. If you want both horizontal and vertical grid lines, be sure to include a <code><grid></code> sub-element in both axis elements.</p>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Attributes</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>color</code></div>
<div class="col-md-10">
<p>Defines the grid line color as a hex value. </p>
<p>Default: <code>"0xeeeeee"</code>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>visible</code></div>
<div class="col-md-10">
<p>Indicates whether grid lines should be drawn for this axis. Either <code>"true"</code> or <code>"false"</code></p>
<p>Default: <code>"false"</code>
</div>
</div>
</li>
</ul>
</div>
<hr>
<h4 id="axis-sub-element--pan">Pan</h4>
<p>Used to configure the type of panning that Multigraph allows the user to do for the axis.</p>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Attributes</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>allowed</code></div>
<div class="col-md-10">
<p>Either <code>"yes"</code> or <code>"no"</code></p>
<p>Default: <code>"yes"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>min</code></div>
<div class="col-md-10">
<p>Minimum data value to ever be displayed for this axis; panning is never allowed to go below this number.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>max</code></div>
<div class="col-md-10">
<p>Maximum data value to ever be displayed for this axis; panning is never allowed to go above this number.</p>
</div>
</div>
</li>
</ul>
</div>
<hr>
<h4 id="axis-sub-element--zoom">Zoom</h4>
<p>Used to configure the type of zooming that multigraph allows the user to do for the axis.</p>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Attributes</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>allowed</code></div>
<div class="col-md-10">
<p>Either <code>"yes"</code> or <code>"no"</code></p>
<p>Default: <code>"yes"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>min</code><br><code>max</code></div>
<div class="col-md-10">
<p>These attributes control how far "in" or "out" the user can zoom on an axis; its value is a distance along the axis, and is the smallest or biggest interval that the user will be allowed to zoom in to.</p>
<p>For a number type axis, this value is just a number, and multigraph will constrain the zooming so that the range of values displayed along the axis is at least or at most that number.</p>
<p>For a datetime type axis, the value should be an interval of time consisting of a number followed by one of the letters 'Y', 'M', 'D', 'H', 'm', or 's', which indicate years, months, days, hours, minutes, or seconds, respectively. For example, a <code>min</code> value of <code>"6M"</code> will cause multigraph to constrain zooming along the axis so that the range of time displayed along the axis is always at least 6 months.</p>
<p>Default: unconstrained zooming</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>anchor</code></div>
<div class="col-md-10">
<p>Indicates a location on the axis about which zooming should be centered. Should be either a data value, or the keyword <code>"none"</code>. If it is <code>"none"</code> then zooming is centered about the location of the mouse cursor when the user first presses the mouse button to begin dragging.</p>
<p>Default: <code>"none"</code></p>
</div>
</div>
</li>
</ul>
</div>
<hr>
<h4 id="axis-sub-element--binding">Binding</h4>
<p>Used to "bind" two or more axes together with a linear mapping so that interactive panning and/or zooming causes them to move together. It is typically used to connect axes that represent the same vertical scale with different units, such as celsius and Fahrenheit temperature. It can also be used to connect axes in different graphs that represent the same scale (for example, the horizontal time axis).</p>
<p>This element <strong>requires</strong> all three of its attributes.</p>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Attributes</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>id</code></div>
<div class="col-md-10">
<p>Identifies the binding; it can be any string, and all axes having binding elements with the same <code>id</code> value will be connected to each other.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>min</code><br><code>max</code></div>
<div class="col-md-10">
<p>A minimum and maximum value for the binding. Axes bound together in a binding will be connected in such a way that their <code>max</code> and <code>min</code> values correspond to each other.</p>
<p>For example, to bind a celsius temperature axis to a Fahrenheit temperature axis, you could use the binding <code><binding id="tempbinding"</code> <code>min="0" max="100"/></code> on the celsius axis, and <code><binding id="tempbinding"</code> <code>min="32" max="212"/></code> on the Fahrenheit axis.</p>
<p>The <code>min</code> and <code>max</code> attributes can be any two data values on the axis that determine the linear relationship between an axis and other axes in the same binding. They do not need to correspond to the axis's own min and max values, and in general they will not.</p>
</div>
</div>
</li>
</ul>
</div>
<br>
<br>
<h2 id="legend-element">The Legend Element</h2>
<hr>
<p>When a graph has more than one plot, Multigraph automatically adds a legend in the upper-right corner. The <code><legend></code> element allows you to control the legend's appearance.</p>
<pre class="syntaxhighlight"><code><mugl>
<legend
visible="BOOLEAN"
base="POINT(1,1)"
anchor="POINT(1,1)"
position="POINT(0,0)"
frame="FRAME(padding)"
color="COLOR(white)"
opacity="DOUBLE(1.0)"
border="INTEGER(1)"
bordercolor="COLOR(black)"
rows="INTEGER"
columns="INTEGER"
cornerradius="INTEGER(0)"
padding="INTEGER(0)">
<icon
width="INTEGER(40)"
height="INTEGER(30)"
border="INTEGER(1)">
</icon>
</legend>
</mugl>
</code></pre>
<br>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Attributes</h4>
</div>
<ul class="list-group">
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>visible</code></div>
<div class="col-md-10">
<p>A value of <code>"true"</code> means that the legend should appear, and <code>"false"</code> means that it should not. You can use this attribute to disable the legend in graphs containing more than one plot, or to enable it in graphs containing only one plot. You can also specify <code>"yes"</code> or <code>"no"</code></p>
<p>Default: <code>"true"</code> if the graph contains more than one plot, otherwise <code>"false"</code>.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>rows</code><br><code>columns</code></div>
<div class="col-md-10">
<p>The legend contains an entry for each plot, laid out in a grid. These attributes determine the number of rows and columns in that grid. If you specify one of these values and not the other, the other will be determined by the number of entries in the legend.</p>
<p>Default: <code>columns="1"</code> and <code>rows</code> is left unspecified (the legend will be laid out in a single vertical column with one row per entry). If you want a single horizontal legend layout instead, specify <code>rows="1"</code> and leave <code>columns</code> unspecified.</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>border</code></div>
<div class="col-md-10">
<p>The thickness of the border drawn around the legend. Use <code>"0"</code> to turn off the border.</p>
<p>Default: <code>"1"</code></p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>bordercolor</code></div>
<div class="col-md-10">
<p>The color of the border.</p>
<p>Default: <code>"black"</code> (0x000000).</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>color</code></div>
<div class="col-md-10">
<p>The color used to fill the background of the legend.</p>
<p>Default: <code>"white"</code> (0xFFFFFF)</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>opacity</code></div>
<div class="col-md-10">
<p>Sets the opacity for the legend. The range of values is from 0.0 to 1.0. This is relevant because depending on where the legend is, it may obscure some parts of the plot data.</p>
<p>Default: <code>"1.0"</code> (completely opaque: any parts of the plot data that appear behind the legend will not be visible at all)</p>
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-2"><code>cornerradius</code></div>
<div class="col-md-10">
<p>Determines whether the corners of the legend box appear rounded (if it is drawn). If it is greater than 0, then the corners are rounded off using circles whose radius is <code>cornerradius</code> pixels.</p>
<p>Default: <code>"0"</code> (corners are right angles).</p>
</div>
You can’t perform that action at this time.
