Skip to main content

SR/MR

Used for a single-response variable or multi-response variable set. Metrics and entries are required.

<!-- mr/sr -->
<xtable dataset="survey1">
<metrics>
<metric key="pct" label="Percent" valueFormat=".0%" syntaxTemplate="pct({syntax})"/>
</metrics>
<entries type="array">
<entry syntax="q2r1==1" label="Arizona" />
<entry syntax="q2r2==1" label="California" />
<entry syntax="q2r3==1" label="Colorado" />
<entry syntax="q2r8==1" label="New York" />
<entry syntax="q2r9==1" label="Oregon" />
<entry syntax="q2r13==1" label="Vermont" />
<entry syntax="q2r16==1" label="Other (please specify)" />
<entry syntax="q2r17==1" label="Don't know" />
</entries>
</xtable>

Metrics

See Metrics

Entries

danger

todo: Is type="array" needed?

<metrics>
<metric key="pct" label="Percent" valueFormat=".0%" syntaxTemplate="pct({syntax})"/>
</metrics>
<entries type="array">
<entry syntax="q8_1==1" label="Dine-in" />
<entry syntax="q8_2==1" label="Carry-out" />
<entry syntax="q8_3==1" label="Drive-thru" />
<entry syntax="q8_4==1" label="Delivery through third party apps" />
<entry syntax="q8_5==1" label="Delivery through restaurant mobile apps/website" />
<entry syntax="q8_4==1 or q8_5==1" label="Delivery (Net)" />
</entries>
Click to view older format entries
<metrics>
<metric
key="pct"
label="Percent"
valueFormat=".0%"
syntaxTemplate="pctin({entry},{entry2})"
/>
</metrics>
<entries type="array">
<entry value="Q2r1" value2="1" label="Arizona" />
<entry value="Q2r2" value2="1" label="California" />
<entry value="Q2r3" value2="1" label="Colorado" />
<entry value="Q2r8" value2="1" label="New York" />
<entry value="Q2r9" value2="1" label="Oregon" />
<entry value="Q2r13" value2="1" label="Vermont" />
<entry value="Q2r16" value2="1" label="Other (please specify)" />
<entry value="Q2r17" value2="1" label="Don't know" />
</entries>

Row Groupings (xtable.groupBy)

Specify the entry attribute to group by. Groups are sorted alphabetically.

Use the pipe operator "|" to specify a custom sort order. The full text will still be used in sorting algorithm, but anything before the first pipe character will not be displayed.

<xtable groupBy="sentiment" ...>
...
<entries type="array">
<entry sentiment="01|Positive" syntax="q9r2==1" label="It's entertaining" />
<entry sentiment="01|Positive" syntax="q9r5==1" label="It's convincing" />
<entry sentiment="01|Positive" syntax="q9r6==1" label="It's funny" />
<entry sentiment="01|Positive" syntax="q9r15==1" label="It's unique" />
<entry sentiment="02|Negative" syntax="q9r18==1" label="It's boring" />
<entry sentiment="02|Negative" syntax="q9r19==1" label="It's irritating" />
<entry sentiment="02|Negative" syntax="q9r20==1" label="It's silly" />
<entry sentiment="02|Negative" syntax="q9r21==1" label="It's the sort of thing I would ignore" />
</entries>
</xtable>

Selectors

If entries list has multiple dimensions, see Selectors.

Row Pinning (Freezing)