work on vizml schema
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 9 Feb 2020 17:56:28 +0000 (17:56 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 9 Feb 2020 17:56:48 +0000 (17:56 +0000)
src/output/spv/vizml.grammar

index 7457776f3f5770fb686b0135231c8d82aeeb2fd5..02733c2f0fbd65fedf962c1c473f8a0a1cd9fdda 100644 (file)
@@ -134,7 +134,7 @@ statisticSort
 
 sourceVariable
    :categorical=bool?
-   :source=ref (userSource | delimitedFileSource | embeddedSource)
+   :source=ref (userSource | delimitedFileSource | embeddedSource)?
    :domain=ref categoricalDomain?
    :sourceName
    :dependsOn=ref sourceVariable?
@@ -156,7 +156,7 @@ derivedVariable
    :creator?
    :key=bool?
    :label?
-   :source=ref (userSource | delimitedFileSource | embeddedSource)
+   :source=ref (userSource | delimitedFileSource | embeddedSource)?
    :weight=bool?
    :domain=ref categoricalDomain?
 => variable_extension* (format | stringFormat)? valueMapEntry*
@@ -176,7 +176,7 @@ expressionVariable
    :expression?
    :shortLabel?
    :label?
-   :source?
+   :source=ref (userSource | delimitedFileSource | embeddedSource)?
 => EMPTY
 
 valueMapEntry :from :to => EMPTY
@@ -208,14 +208,14 @@ coordinates
     | rectangularTransform | obliqueTransform)*
 
 dimension
-   :domain?
+   :domain=ref (sourceVariable | derivedVariable | expressionVariable | categoricalDomain | intervalDomain)?
    :lowerMargin?
    :upperMargin?
    :niceLowerMapping=bool?
    :niceUpperMapping=bool?
    :unionDomain=bool?
    :clusterGap?
-   :clusterVariable?
+   :clusterVariable=ref (sourceVariable | derivedVariable | expressionVariable)?
    :facetsShareScale=bool?
 => scale? axis*
 
@@ -518,7 +518,7 @@ position[position_element]
    :variable=ref expressionVariable
 => EMPTY
 
-schema
+schema // aka boxplot
    :dot=bool?
    :extremeStyle?
    :fenceStyle=ref style?