vizml now accepts the whole corpus
[pspp] / src / output / spv / vizml.grammar
1 // PSPP - a program for statistical analysis.
2 // Copyright (C) 2017, 2018, 2019, 2020 Free Software Foundation, Inc.
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 visualization
18    :creator?
19    :date
20    :description
21    :lang
22    :name
23    :style[style_ref]=ref style
24    :type
25    :version
26    :schemaLocation?
27    :clip?
28 => (visualization_extension | location)*
29    (userSource | delimitedFileSource | embeddedSource)+
30    (sourceVariable | derivedVariable | expressionVariable
31     | intervalDomain | categoricalDomain)+
32    (graph | labelFrame | container | legend)+
33    (style | layerController | styleCycle)+
34    popup*
35    resources?
36    facetSortController?
37
38 extension[visualization_extension]
39    :numRows=int?
40    :showGridline=bool?
41    :minWidthSet=(true)?
42    :maxWidthSet=(true)?
43    :legend1?
44    :legend2?
45    :styleCycleRepository?
46    :title#?
47    :subtitle?
48    :footnote#?
49    :textbox#?
50    :statisticsSummary[statisticsSummary_]?
51    :statisticsSummary#?
52    :dataSetHandle_#?
53    :dataSetName_#?
54    :percentDomain=(percentDomain)?
55    :regionStatistic_#?
56    :smoothStatistic_%?
57    :originLineX?
58    :originLineY?
59    :boxplotLinkWidth=bool?
60    :line_%?
61    :preserveLocations=bool?
62    :creator?
63    :template?
64    :accelerator=bool?
65    :certified=bool?
66 => EMPTY
67
68 userSource
69    :missing=(listwise | pairwise)?   // Related to omit_empty?
70 => filter?
71
72 filter
73    :domain=ref categoricalDomain
74    :exclude=bool
75    :sourceName
76 => EMPTY
77
78 delimitedFileSource
79    :encoding
80    :fileName
81    :missing[delimitedFileSource_missing]=(pairwise)
82 => EMPTY
83
84 embeddedSource => names types labels? labelColumns? row+
85
86 names => TEXT
87
88 types => TEXT
89
90 labels => TEXT
91
92 labelColumns => TEXT
93
94 row => TEXT
95
96 categoricalDomain
97    :date=bool?
98 => (categories | variableReference | domainReference)+ (simpleSort | statisticSort)?
99
100 domainReference
101    :ref=ref categoricalDomain
102 => EMPTY
103
104 intervalDomain
105    :date=bool?
106 => (variableReference | range)*
107
108 range
109    :exact=bool?
110    :max=real
111    :min=real
112 => EMPTY
113
114 categories
115    :remove=bool?
116 => TEXT
117
118 simpleSort
119    :method[sort_method]=(custom | natural | percent | naturalUsingLabel | data)
120    :descending=bool?
121 => (categoryOrder | sortMove)?
122
123 sortMove
124    :category
125    :first=bool
126 => EMPTY
127
128 statisticSort
129    :descending=bool
130    :method[statisticSort_method]=(mean | sum)
131    :sourceVariable=ref (sourceVariable | derivedVariable | expressionVariable)
132    :statVariable=ref (sourceVariable | derivedVariable | expressionVariable)
133 => EMPTY
134
135 sourceVariable
136    :categorical=bool?
137    :source=ref (userSource | delimitedFileSource | embeddedSource)
138    :domain=ref categoricalDomain?
139    :sourceName
140    :dependsOn=ref sourceVariable?
141    :label?
142    :labelVariable=ref sourceVariable?
143    :creator?
144    :key=bool?
145    :weight=bool?
146    :shortLabel?
147    :description?
148    :inputDateFormatPattern?
149    :measurementLevel=(ratio | nominal)?
150 => variable_extension* (format | stringFormat | numberFormat)?
151
152 derivedVariable
153    :categorical=bool?
154    :value
155    :dependsOn=ref sourceVariable?
156    :creator?
157    :key=bool?
158    :label?
159    :source=ref (userSource | delimitedFileSource | embeddedSource)
160    :weight=bool?
161    :domain=ref categoricalDomain?
162 => variable_extension* (format | stringFormat)? valueMapEntry*
163
164 extension[variable_extension]
165    :from?
166    :helpId?
167    :statistic?
168    :valuesAreGroupedMidpoints=bool?
169    :max?
170    :min?
171 => EMPTY
172
173 expressionVariable
174    :categorical=bool?
175    :creator?
176    :expression?
177    :shortLabel?
178    :label?
179    :source?
180 => EMPTY
181
182 valueMapEntry :from :to => EMPTY
183
184 categoryOrder => TEXT
185
186 graph
187    :cellStyle=ref style
188    :style=ref style
189    :axesOutside=bool?
190    :clip=bool?
191 => (location | coordinates | faceting | point | facetLayout
192     | line | schema | interval | lineGuide | functionGuide | edge | path
193     | planeGuide | frameGuide | area | polygon | pointGuide)*
194
195 location
196    :part=(height | width | top | bottom | left | right)
197    :method=(sizeToContent | attach | fixed | same)
198    :min?
199    :max?
200    :target=ref (labelFrame | graph | container | legend | visualization)?
201    :value?
202    :specifiedByUser=bool?
203 => EMPTY
204
205 coordinates
206 => (dimension | dimensionReference | transposeTransform | reflectionTransform
207     | polarTransform | sameRatioTransform | insetTransform
208     | rectangularTransform | obliqueTransform)*
209
210 dimension
211    :domain?
212    :lowerMargin?
213    :upperMargin?
214    :niceLowerMapping=bool?
215    :niceUpperMapping=bool?
216    :unionDomain=bool?
217    :clusterGap?
218    :clusterVariable?
219    :facetsShareScale=bool?
220 => scale? axis*
221
222 dimensionReference
223    :ref=ref dimension
224 => EMPTY
225
226 scale
227    :invert=bool
228    :method[scale_method] // linear | log.safe
229    :origin=real
230    :base=int?
231 => EMPTY
232
233 transposeTransform => EMPTY
234
235 reflectionTransform
236    :alternating=bool?
237    :dimension?
238 => EMPTY
239
240 polarTransform
241    :counterClockwise=bool?
242    :cycles=int?
243    :startAngle=real?
244 => EMPTY
245
246 sameRatioTransform
247    :center=bool
248 => EMPTY
249
250 insetTransform
251    :x-min=real
252    :x-max=real
253    :y-min=real
254    :y-max=real
255 => EMPTY
256
257 rectangularTransform
258    :distance=real
259    :phi=real
260    :theta=real
261    :zeta=real
262 => EMPTY
263
264 obliqueTransform
265    :distance=real
266    :foreShortening=real
267    :theta=real
268    :xscale=real
269 => EMPTY
270
271 faceting
272    :method[faceting_method]=(nest | cross | dot)?
273 => layer[layers1]* cross layer[layers2]* | dot | variableReference
274
275 cross => (unity | nest | cross | variableReference)+
276
277 dot => unity? variableReference
278
279 nest => variableReference[vars]+
280
281 unity => EMPTY
282
283 variableReference
284    :ref=ref (sourceVariable | derivedVariable | expressionVariable)
285 => EMPTY
286
287 layer
288    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
289    :value
290    :visible=bool?
291    :method[layer_method]=(nest)?
292    :titleVisible=bool?
293 => EMPTY
294
295 facetLayout
296    :topDown=bool?
297    :method[facetLayout_method]=(structured | unstructured)?
298    :cellAspect=int?
299    :alternatingColor=color?
300    :cellSize?
301 => tableLayout? setCellProperties[scp1]*
302    facetLevel* setCellProperties[scp2]*
303
304 tableLayout
305    :verticalTitlesInCorner=bool
306    :style=ref style?
307    :fitCells=(ticks both)?
308 => label?
309
310 facetLevel
311    :level=int
312    :gap?
313    :style=ref style?
314 => axis*
315
316 point
317    :dot=bool?
318    :name?
319    :showCollidingLabels=bool?
320    :labelCollisionHandling=(none | normal | outside | quality)?
321    :style=ref style?
322    :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
323    :zOrder=int?
324    :clip=(none)?
325    :coordinates=ref coordinates?
326 => binStatistic? graphLayoutStatistic?
327    (color | size | shape | labeling | styleBy | image)*
328    split? conditionalStyle? x? y? z?
329 // labeling*3 x y z
330 // binStatistic x
331 // conditionalStyle x y
332 // graphLayoutStatistic labeling
333 // color shape x y
334 // color*2 size shape x y
335 // color size shape color x y
336 // labeling styleBy x y
337
338 graphLayoutStatistic
339    :from=ref (sourceVariable | derivedVariable | expressionVariable)
340    :to=ref (sourceVariable | derivedVariable | expressionVariable)
341    :nodes=ref (sourceVariable | derivedVariable | expressionVariable)
342 => initial (move | swap)?
343
344 shape
345    :cycle=ref styleCycle
346    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
347    :clamp=bool?
348    :domain=ref categoricalDomain?
349 => symbolMapping*
350
351 symbolMapping
352    :from
353    :to
354 => EMPTY
355
356 image
357    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
358 => stringMapping+
359
360 stringMapping
361    :from
362    :to
363 => EMPTY
364
365 initial
366    :type=(grid | circle | data)
367 => EMPTY
368
369 move => EMPTY
370
371 swap => EMPTY
372
373 split
374    :split=bool
375    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
376 => EMPTY
377
378 conditionalStyle
379    :style=ref style
380    :when
381 => EMPTY
382
383 line
384    :breakRepresentation?
385    :labelCollisionHandling=(none | normal | outside | quality)?
386    :showCollidingLabels=bool?
387    :name?
388    :style=ref style?
389    :dot=bool?
390    :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
391    :showDiscontinuity=bool?
392    :zOrder=int?
393    :coordinates?
394    :clip=(none)?
395 => (conditionalStyle | smoothStatistic | summaryStatistic | styleBy | regionStatistic | binStatistic | distributionStatistic | attach | color | labeling | size | dash | position_element)* x? y?
396 // smoothStatistic summaryStatistic color dash x y
397 // summaryStatistic smoothStatistic color x y
398 // binStatistic distributionStatistic x
399 // binStatistic summaryStatistic x y
400
401 smoothStatistic
402    :method[smoothStatistic_method]=(step-left | step-center | linear | polynomial | loess | spline)
403    :bounded=bool?
404    :degree=int?
405    :kernel=(uniform | epanechnikov)?
406    :proportion=real?
407 => EMPTY
408
409 regionStatistic
410    :alpha=real
411    :degree=int
412    :predictIndividuals=bool
413    :regionType=(linear)
414 => EMPTY
415
416 distributionStatistic
417    :distribution=(normal | poisson)
418 => EMPTY
419
420 size
421    :cycle=ref styleCycle?
422    :domain=ref (categoricalDomain | intervalDomain)
423    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
424    :low?
425    :high?
426    :clamp=bool?
427 => scale?
428
429 dash
430    :cycle=ref styleCycle
431    :domain=ref categoricalDomain
432    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
433    :clamp=bool?
434 => EMPTY
435
436 lineGuide
437    :style=ref style?
438    :x=real?
439    :y=real?
440    :coordinates=ref coordinates?
441    :name?
442 => (label | conditionalStyle)?
443
444 functionGuide
445    :name
446    :segments=int?
447    :style=ref style?
448    :value?
449    :zOrder=int?
450    :coordinates=ref coordinates?
451 => (label | conditionalStyle)?
452
453 edge
454    :dot=bool
455    :positionModifier=(none | stack | pile | dodge | stackInterpolating)
456    :style=ref style
457    :zOrder=int?
458 => (attach | color | size | position_element | linkStatistic)* x? y? z?
459 // attach color size position
460 // size color x y
461
462 linkStatistic
463    :y=(base)
464 => EMPTY
465
466 path
467    :breakRepresentation=(wings)?
468    :dot=bool
469    :labelCollisionHandling=(none | normal | outside | quality)?
470    :name
471    :showCollidingLabels=bool
472    :style=ref style
473 => (styleBy | color)* x y
474
475 planeGuide
476    :normal=(x | y | z)
477    :style=ref style
478 => EMPTY
479
480 frameGuide
481    :complete=bool?
482    :style=ref style
483    :zOrder=int?
484 => EMPTY
485
486 area
487    :dot=bool
488    :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
489    :showDiscontinuity=bool
490    :style=ref style
491    :zOrder=int
492    :breakRepresentation=(wings)?
493    :labelCollisionHandling=(none | normal | outside | quality)?
494    :showCollidingLabels=bool?
495    :name?
496 => binStatistic? summaryStatistic? color? x y?
497 // binStatistic summaryStatistic x
498 // color x y
499
500 polygon
501    :dot=bool
502    :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
503    :style=ref style
504 => color x y
505
506 pointGuide
507    :style=ref style
508    :x=real
509    :y=real
510 => label
511
512 attach
513    :target=ref point
514    :targetKey=ref (sourceVariable | derivedVariable | expressionVariable)
515 => EMPTY
516
517 position[position_element]
518    :variable=ref expressionVariable
519 => EMPTY
520
521 schema
522    :dot=bool?
523    :extremeStyle?
524    :fenceStyle=ref style?
525    :hingeStyle=ref style?
526    :medianStyle=ref style?
527    :name?
528    :outlierStyle=ref style?
529    :showCollidingLabels=bool?
530    :labelCollisionHandling=(none | normal | outside | quality)?
531    :style=ref style?
532    :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
533    :zOrder=int?
534 => tukeyStatistic (color | split | labeling | pattern | styleBy)* x? y?
535 // tukeyStatistic color labeling x y
536 // tukeyStatistic labeling y
537 // tukeyStatistic labeling*2 x y
538 // tukeyStatistic x
539 // tukeyStatistic labeling styleBy x y
540 // tukeyStatistic split styleBy labeling x y
541 // tukeyStatistic labeling pattern x y
542
543 tukeyStatistic => EMPTY
544
545 axis
546    :style=ref style
547    :opposite=bool?
548    :repeat=(never)?
549    :combineAxisLabels=bool?
550    :maxSize=dimension?
551    :zOrder=int?
552    :transform=(linear | percent)?
553 => label? majorTicks? minorTicks? axisTransformParameter*
554
555 label
556    :style=ref style
557    :textFrameStyle=ref style?
558    :purpose=(title | subTitle | subSubTitle | layer | footnote | subFootnote | auto)?
559 => (text | descriptionGroup)*
560
561 descriptionGroup
562    :target=ref (faceting | interval | sourceVariable | line | area)
563    :separator?
564 => (description | text)+
565
566 description
567    :name?
568 => (format | numberFormat)*
569
570 majorTicks
571    :labelAngle=int
572    :length=dimension
573    :style=ref style
574    :tickFrameStyle=ref style
575    :labelFrequency=int?
576    :stagger=bool?
577    :markStyle=ref style?
578    :base=real?
579    :delta=real?
580    :position[majorTicks_position]=(outside | cross)?
581 => gridline? (format | numberFormat)?
582
583 minorTicks
584    :markStyle=ref style
585    :number=int
586    :position[minorTicks_position]=(outside | cross)?
587    :style=ref style?
588 => gridline? (format | numberFormat)?
589
590 gridline
591    :style=ref style
592    :zOrder=int
593 => EMPTY
594
595 axisTransformParameter
596    :parameterName=(base-ratio | base-match | derived-ratio | derived-match)
597    :parameterValue=real
598 => EMPTY
599
600 setCellProperties
601    :applyToConverse=bool?
602 => (setStyle | setFrameStyle | setFormat | setMetaData)* union[union_]?
603
604 setStyle
605    :target=ref (labeling | graph | interval | majorTicks)
606    :style=ref style
607 => EMPTY
608
609 setMetaData
610    :target=ref graph
611    :key
612    :value
613 => EMPTY
614
615 setFormat
616    :target=ref (majorTicks | labeling)
617    :reset=bool?
618 => format | numberFormat | stringFormat+ | dateTimeFormat | elapsedTimeFormat
619
620 setFrameStyle
621    :style=ref style
622    :target=ref majorTicks
623 => EMPTY
624
625 format
626    :baseFormat[f_base_format]=(date | time | dateTime | elapsedTime)?
627    :errorCharacter?
628    :separatorChars?
629    :mdyOrder=(dayMonthYear | monthDayYear | yearMonthDay)?
630    :showYear=bool?
631    :showQuarter=bool?
632    :quarterPrefix?
633    :quarterSuffix?
634    :yearAbbreviation=bool?
635    :showMonth=bool?
636    :monthFormat=(long | short | number | paddedNumber)?
637    :dayPadding=bool?
638    :dayOfMonthPadding=bool?
639    :showWeek=bool?
640    :weekPadding=bool?
641    :weekSuffix?
642    :showDayOfWeek=bool?
643    :dayOfWeekAbbreviation=bool?
644    :hourPadding=bool?
645    :minutePadding=bool?
646    :secondPadding=bool?
647    :showDay=bool?
648    :showHour=bool?
649    :showMinute=bool?
650    :showSecond=bool?
651    :showMillis=bool?
652    :dayType=(month | year)?
653    :hourFormat=(AMPM | AS_24 | AS_12)?
654    :minimumIntegerDigits?
655    :maximumFractionDigits=int?
656    :minimumFractionDigits?
657    :useGrouping=bool?
658    :scientific=(onlyForSmall | whenNeeded | true | false)?
659    :small=real?
660    :prefix?
661    :suffix?
662    :tryStringsAsNumbers=bool?
663    :negativesOutside=bool?
664    :negativesInParentheses=bool?
665    :hiddenseparator=bool?
666    :scalingFactor=real?
667    :hideNegatives=bool?
668 => relabel* affix*
669
670 numberFormat
671    :minimumIntegerDigits?
672    :maximumFractionDigits=int?
673    :minimumFractionDigits=int?
674    :useGrouping=bool?
675    :scientific=(onlyForSmall | whenNeeded | true | false)?
676    :small=real?
677    :prefix?
678    :suffix?
679    :hiddenseparator=bool?
680 => affix*
681
682 stringFormat => relabel* affix*
683
684 dateTimeFormat
685    :baseFormat[dt_base_format]=(date | time | dateTime)
686    :separatorChars?
687    :mdyOrder=(dayMonthYear | monthDayYear | yearMonthDay)?
688    :showYear=bool?
689    :yearAbbreviation=bool?
690    :showQuarter=bool?
691    :quarterPrefix?
692    :quarterSuffix?
693    :showMonth=bool?
694    :monthFormat=(long | short | number | paddedNumber)?
695    :showWeek=bool?
696    :weekPadding=bool?
697    :weekSuffix?
698    :showDayOfWeek=bool?
699    :dayOfWeekAbbreviation=bool?
700    :dayPadding=bool?
701    :dayOfMonthPadding=bool?
702    :hourPadding=bool?
703    :minutePadding=bool?
704    :secondPadding=bool?
705    :showDay=bool?
706    :showHour=bool?
707    :showMinute=bool?
708    :showSecond=bool?
709    :showMillis=bool?
710    :dayType=(month | year)?
711    :hourFormat=(AMPM | AS_24 | AS_12)?
712 => affix*
713
714 elapsedTimeFormat
715    :baseFormat[dt_base_format]=(date | time | dateTime)
716    :dayPadding=bool?
717    :hourPadding=bool?
718    :minutePadding=bool?
719    :secondPadding=bool?
720    :showYear=bool?
721    :showDay=bool?
722    :showHour=bool?
723    :showMinute=bool?
724    :showSecond=bool?
725    :showMillis=bool?
726 => affix*
727
728 affix
729    :definesReference=int
730    :position=(subscript | superscript)
731    :suffix=bool
732    :value
733 => EMPTY
734
735 relabel
736    :from
737    :to
738 => EMPTY
739
740 union => intersect+
741
742 intersect => where+ | intersectWhere | alternating | EMPTY
743
744 where
745    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
746    :include
747 => EMPTY
748
749 intersectWhere
750    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
751    :variable2=ref (sourceVariable | derivedVariable | expressionVariable)
752 => EMPTY
753
754 alternating => EMPTY
755
756 text
757    :usesReference=int?
758    :definesReference=int?
759    :position=(subscript | superscript)?
760    :style=ref style
761 => TEXT
762
763 interval
764    :style=ref style
765    :dot=bool?
766    :labelCollisionHandling=(none | normal | outside | quality)?
767    :showCollidingLabels=bool?
768    :name?
769    :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
770    :zOrder=int?
771    :zLocation=real?
772    :coordinates=ref coordinates?
773 => conditionalStyle? binStatistic? summaryStatistic* (styleBy | labeling | color | offset | pattern | size | dash)* x? y? z? footnotes?
774 // styleBy                  labeling         x
775 //                          labeling styleBy x y
776 // summaryStatistic   color labeling         x
777 // styleBy                  labeling offset  x
778 // summaryStatistic*2 color labeling
779 // color pattern color x y
780 // summaryStatistic color size x y
781 // summaryStatistic dash x y
782 // conditionalStyle binStatistic summaryStatistic x y
783 // x y z
784
785 labeling
786    :style=ref style?
787    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
788    :connectingLines=bool?
789    :textFrameStyle=ref style?
790    :clamp=bool?
791    :dimension=int?
792    :part[labeling_part]=(median)?
793 => (formatting | format | summaryStatistic | numberFormat | transparency | footnotes | labelLocation | styleBy)*
794 // summaryStatistic styleBy format
795
796 offset
797    :domain=ref categoricalDomain
798    :high
799    :low
800    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
801 => EMPTY
802
803 pattern
804    :cycle=ref styleCycle
805    :domain=ref categoricalDomain
806    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
807    :clamp=bool?
808 => EMPTY
809
810 transparency
811    :affect=(both | main | secondary)
812    :domain=ref intervalDomain
813    :low=real
814    :high=real
815    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
816 => EMPTY
817
818 labelLocation
819    :domain=ref intervalDomain
820    :role=(x | y)
821    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
822 => EMPTY
823
824 formatting :variable=ref (sourceVariable | derivedVariable | expressionVariable) => formatMapping*
825
826 formatMapping :from=int => format?
827
828 color
829    :affect=(both | main | secondary)?
830    :cycle=ref styleCycle?
831    :variable?
832    :clamp=bool?
833    :dimension=int?
834    :domain=ref categoricalDomain?
835    :missing=color?
836    :high=color?
837    :low=color?
838 => colorMapping*
839
840 colorMapping
841    :from=int
842    :to=color
843 => EMPTY
844
845 x
846    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
847 => EMPTY
848
849 y
850    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
851 => EMPTY
852
853 z
854    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
855 => EMPTY
856
857 styleBy
858    :styleCycle?
859    :variable?
860    :dimension=int?
861    :affects=(hingeStyle)?
862 => EMPTY
863
864 binStatistic
865    :gridType=(square | dot)?
866    :binWidth=real?
867    :binCount=int?
868    :binStart=real?
869    :dimensions=int?
870 => EMPTY
871
872 summaryStatistic
873    :method[summaryStatistic_method]=(count | range | percent | sum | mean | percentCount | fraction | median | first | mode | cumulativePercent)?
874    :symbol[summaryStatistic_symbol]=(circle | square)?
875    :summaryBase=(coordinate | global | aesthetic)?
876    :convertIntervalToSingleValue=bool?
877    :summaryIndex=int?
878    :augment=(missing)?
879    :summaryAcrossPanels=bool?
880 => EMPTY
881
882 footnotes
883    :superscript=bool?
884    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
885 => footnoteMapping*
886
887 footnoteMapping
888    :definesReference=int
889    :from=int
890    :to
891 => EMPTY
892
893 legend
894    :style=ref style
895    :tickFrameStyle=ref style
896    :tickTextStyle=ref style
897 => location+ label? legendTarget*
898
899 legendTarget
900    :target=ref (styleBy | color | line | point | functionGuide | pattern | size | dash | interval | shape | lineGuide)
901    :domain=ref (categoricalDomain | intervalDomain)?
902 => EMPTY
903
904 style
905    :color=color?
906    :color2=color?
907    :labelAngle=real?
908    :border-bottom=(solid | thick | thin | double | none)?
909    :border-top=(solid | thick | thin | double | none)?
910    :border-left=(solid | thick | thin | double | none)?
911    :border-right=(solid | thick | thin | double | none)?
912    :border-bottom-color?
913    :border-top-color?
914    :border-left-color?
915    :border-right-color?
916    :font-family?
917    :font-size?
918    :font-weight=(regular | bold)?
919    :font-style=(regular | italic)?
920    :font-underline=(none | underline)?
921    :margin-bottom=dimension?
922    :margin-left=dimension?
923    :margin-right=dimension?
924    :margin-top=dimension?
925    :textAlignment=(left | right | center | decimal | mixed)?
926    :labelLocationHorizontal=(positive | negative | center)?
927    :labelLocationVertical=(positive | negative | center)?
928    :decimal-offset=dimension?
929    :size?
930    :width?
931    :height?
932    :visible=bool?
933    :pattern=int?
934    :stroke-linecap=(butt | round | square)?
935    :stroke-width=dimension?
936    :stroke-dasharray?
937    :text-fit=bool?
938    :depth?
939    :symbol=(circle | ibeam | flower | square | line | acrossDown | cross
940             | polygon | plus | bowtie | star | arrow | none)?
941    :margin=dimension?
942    :padding=dimension?
943    :padding-left=dimension?
944    :padding-right=dimension?
945    :padding-top=dimension?
946    :padding-bottom=dimension?
947    :maxAttachedTextHeight=dimension?
948    :maxAttachedTextWidth=dimension?
949    :opacity=real?
950    :opacity2=real?
951    :labelInside=(preferred | false | true)?
952    :glyph-sides=int?
953    :glyph-angle=real?
954    :glyph-aspect=real?
955    :gradient-angle=real?
956    :gradient-focus=real?
957    :gradient-method=(linear)?
958    :shadow-color=color?
959    :shadow-dx=dimension?
960    :shadow-dy=dimension?
961    :background-method=(center)?
962 => style*
963
964 layerController
965    :source=(tableData)
966    :target=ref label?
967 => EMPTY
968
969 container
970    :style=ref style
971    :clip=bool?
972 => container_extension? location* (labelFrame | legend | container | graph)*
973
974 extension[container_extension] :combinedFootnotes=(true) => EMPTY
975
976 labelFrame
977    :style=ref style
978 => labelFrame_extension* location+ label? paragraph?
979
980 extension[labelFrame_extension]
981    :graphId=ref graph
982    :position[labelFrame_position]=(title | footnote | subfootnote)
983 => EMPTY
984
985 paragraph :hangingIndent=dimension? => EMPTY
986
987 styleCycle => cycle+ styleCycle_extension*
988
989 cycle => style+
990
991 extension[styleCycle_extension]
992    :aesthetic=(color)?
993    :immutables=int?
994 => EMPTY
995
996 popup
997    :style=ref style
998    :target=ref
999    :tokenTemplate
1000    :part[labeling_part]=(median)?
1001 => tokenMapping+
1002
1003 tokenMapping
1004    :valueToken
1005    :variable=ref (sourceVariable | derivedVariable | expressionVariable)
1006 => summaryStatistic?
1007
1008 resources => imageResource*
1009
1010 imageResource
1011    :name
1012 => TEXT
1013
1014 facetSortController
1015    :target=ref graph
1016 => EMPTY