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).
β Interactivity
- 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.