-
Notifications
You must be signed in to change notification settings - Fork 159
Description
Is your feature request related to a problem? Please describe.
Canvas markdown components currently only support static content. This makes it impossible to create certain rich canvas experiences.
As a data analyst creating executive dashboards, I want to embed dynamic metric and dimension values directly into markdown text in my Canvas, So that I can build automated narrative reports that tell the story behind the data without manually updating text content.
Example Use Cases
- Executive Summary: "In Q4, we processed {{.data.total_orders}} orders with an average value of ${{.data.avg_order_value}}, representing a {{.data.growth_pct}}% increase over the previous quarter."
- Top Performer Highlights: "The top performing region was {{.data.top_region}} with {{.data.region_revenue}} in revenue, driven primarily by the {{.data.top_product}} product line."
- Alert/Status Messages: "
⚠️ {{.data.failed_count}} transactions failed in the last 24 hours. The primary failure reason was {{.data.top_failure_reason}}." - Dynamic Lists:
## Top 5 Products by Revenue
{{range .data}}
- **{{.product_name}}**: ${{.revenue}} ({{.units_sold}} units sold)
{{end}}
Describe the solution you'd like
This feature request proposes adding support for dynamic templating that allows markdown content to reference and display metric values and dimension data from queries.
This would enable me to create rich, narrative-driven reports and dashboards where textual content updates based on actual data values, making canvases more powerful for storytelling and executive summaries.
Possible ideas:
Extend the markdown component specification to support:
- Query Configuration: Allow markdown components to specify a metrics_view, dimensions, measures, and optional where clause
- Template Syntax: Use Go template syntax (consistent with existing Rill templating) to reference query results
- Data Access: Make query results available in the template context (e.g., under .data)
- Security: Apply the same field-level security and row-level security as other canvas components
Example Configuration
rows:
- items:
- markdown:
metrics_view: sales_metrics
dimensions: [region, product_category]
measures: [total_revenue, order_count]
where: "order_date >= '2024-01-01'"
limit: 5
content: |
# Sales Summary
{{range .data}}
**{{.region}}** - {{.product_category}}: ${{.total_revenue}} from {{.order_count}} orders
{{end}}
Benefits
- Automated Reporting: Eliminate manual updates to dashboard text as data changes
- Consistent Narrative: Ensure text descriptions always match the actual data being displayed
- Rich Storytelling: Combine charts/tables with contextual narrative in a single canvas
- Executive Dashboards: Create polished, presentation-ready reports that combine visualizations with written insights
- Reduced Maintenance: No need to update static text when data changes
Describe alternatives you've considered
The alternative, which I've not yet fully explored, is possibly to embed canvas components into a dynamic report rather than try and have a canvas itself be the executive level report.
Additional context
Add any other context or screenshots about the feature request here.