Renders a single Roper survey question and its Chart Builder bar chart. Use alone with a question id, or as a repeated child inside Roper Results.
Namespace
prc-roper/item
Category
embed
Supports
No anchor or custom HTML.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
roperQuestionId | string | — | Roper question id (manual mode) |
layoutSelected | string | "default" | default, question, or chart |
collapsible | boolean | true | Hide chart behind expand/collapse in default layout |
preformattedData | object | — | Injected data for context/results rendering |
previewItem | boolean | false | Editor preview toggle |
Modes
Manual: Place outside Results, set Roper Question Id, use Preview Item in the toolbar. Layout controls apply here.
Context: Used by Results. Sidebar item controls hide; placeholder id roper-results-preview stands in for list appearance. Frontend items receive question data from the provider. Per-item layout customization in lists is planned later.
Behavior
- Fetches question and response data from the Roper API (or uses preformatted context data).
- Renders responses with Chart Builder (horizontal bar chart and data table).
- Collapsible charts lazy-load response data via the Interactivity API when expanded.