HTML Studio is a Power BI custom visual that turns your data into HTML and SVG on the report canvas. It's the "just show my HTML" idea from the classic HTML Viewer / HTML Content visuals — but with a templating engine, a component library, interactive charts, Bootstrap 5, and a Monaco editor built into the visual. You bind a few fields, write a small template, and get cards, tables, scorecards, timelines and charts — themed, cross-filtering and export-ready.
The old HTML visuals give you one text box: whatever string your column or
measure produces gets rendered. In practice that means building HTML inside
DAX — nested "<div style=""" & ... that nobody wants to maintain.
HTML Studio flips it around. Your fields stay as fields. You write the markup once, as a template, and the visual fills it in per row:
No string concatenation, no FORMAT() gymnastics, no CDN.
{{Field}} interpolation, {{#if a > b}} / {{#each rows}} / {{#unless}}
blocks, and 46 helpers — format, number, percent, currency, date
(locale-aware), plus sum / avg / top / where / sortBy / rank /
pctOfTotal / groupBy so you can build subtotals, top-N lists,
leaderboards and grouped sections without DAX. It's an AST interpreter — no
eval, no dynamic code — so it's sandbox- and certification-safe.
→ Templating · Helpers
{{> kpi label=Region value=Actual target=Target}} — 14 ready components
(kpi, trend, gauge, sparkRow, pill, ratingStars, timelineItem,
comparison, calloutCard, …). Compose them, or define your own with
@partial name.
→ Components
<div data-hf-chart='{"type":"area","x":"Month","y":["Actual","Target"]}'></div>A uPlot canvas chart — line / spline /
area / bar — driven by your bound rows, resized with the visual, and rendered
faithfully in Export to PDF / PowerPoint. Plus {{qr(url)}} for inline QR
codes.
→ Charts
data-hf-select="Region:North"— click to cross-highlight the report.data-hf-filter="Region:North"— click to filter every other visual (build your own HTML nav / button bar / tree slicer).data-hf-state="signoff.legal"on a checkbox — the tick is remembered with the report (a shared checklist / sign-off panel).
- The active report theme is exposed as CSS variables
(
--hf-accent,--hf-foreground, …); SVG helpers and components use them, so everything matches. - One-click style presets: Cards · Minimal · Dark · Newspaper · Accent tiles.
- Google Fonts (
@import) or self-hosted@font-face, plus RTL and locale-aware number / date formatting. - Bootstrap 5 CSS and ~2,000 Bootstrap Icons are bundled (webfont
inlined — no CDN).
data-bs-toggle="collapse",data-bs-toggle="tab", carousels, tooltips, toasts all work.
→ Styling
In report edit mode, the ✎ Template button opens a Monaco editor (the VS Code engine) right inside the visual:
{{ }}/ HTML syntax highlighting- autocomplete for your field names, every helper and every component
- a starter-template gallery (KPI cards, chart card, component dashboard, …)
- a live preview built from a sample of your rows, and a Data tab
- inline lint markers for unbalanced blocks and unknown helpers
Author HTML goes through DOMPurify before it touches the DOM (policy presets: Standard / Strict / Trusted / Custom). Bootstrap, its icon font, uPlot, the QR generator and Monaco are all bundled — nothing is fetched at runtime, so the visual works offline and in export. → Security & limitations
UI in English and Turkish, RTL support, and an Optimize for export / print mode that expands virtualized rows and drops chrome for a clean PDF. Large results are windowed automatically past 250 rows.
| Classic HTML Content / Viewer | HTML Studio | |
|---|---|---|
| Render column / measure as HTML & SVG | ✅ | ✅ |
http(s) links, cross-filter, context menu |
✅ | ✅ |
Templating ({{#each}}, {{#if}}, helpers) |
— | ✅ |
Named data fields ({{Revenue}}) |
— | ✅ up to 20 |
| Component library & user partials | — | ✅ |
| Interactive charts in-content | — | ✅ (uPlot) |
HTML slicer mode (applyJsonFilter) |
— | ✅ |
| Viewer write-back (checklists) | — | ✅ |
| Bootstrap 5 + icon font bundled | — | ✅ |
| Monaco editor in the visual | — | ✅ |
| Conditional formatting rules / colour scales | — | ✅ |
| Style presets · Google Fonts · RTL · l10n | — | ✅ |
| Works offline / in export (no CDN) | partial | ✅ |
- Install — download the latest
.pbivizfrom Releases, then Power BI Desktop → Insert → More visuals → Import a visual from a file. - Bind data — put a column/measure on Content; add more measures to
Data (named fields) to reference them as
{{Name}}. - Go template — Format pane → Content → Content source → Template, then click ✎ Template on the visual (in edit mode) and start from a gallery sample.
Full walkthrough: docs/getting-started.md.
docs/ — getting started · templating · helpers ·
components · data-* attributes · charts · conditional formatting ·
interactivity · styling · settings reference · security & limitations ·
development.
npm install # also generates the vendored Bootstrap CSS (prepare)
npm start # pbiviz start — live in Power BI Desktop / Service
npm test # vitest
npm run package # dist/*.pbivizSee docs/development.md for the project layout, the
two-tsconfig setup, and the release flow.
CONTRIBUTING.md · SECURITY.md (report vulnerabilities privately) · PRIVACY.md.
MIT · Not affiliated with or endorsed by Microsoft.