DaxLib.SVG

A comprehensive set of DAX User-Defined Functions (UDF) designed to enable easy creation of SVG visuals for Power BI.

Download From DaxLib Download Example PBIP 0.1.2-beta


DaxLib.SVG in Action


SVG Wrapper

Functions for wrapping SVG content for use in Power BI visuals:

  • Create SVG containers with proper namespaces
  • Set viewBox and other container attributes
  • Combine multiple SVG elements into a single visual

View SVG Wrapper →


Elements

Core SVG element generator functions:

  • Create basic shapes (Circle, Rect, Line, etc.)
  • Build text elements with styling
  • Group elements for organization and reuse

View Elements →


Compounds

Composite SVG components:

  • Create complex visual elements from simple parts
  • Combine shapes and styles for consistent visuals
  • Build reusable UI components

View Compounds →


Defs

Reusable SVG definitions for gradients, shapes, and more:

  • Create and reuse gradient definitions
  • Define clip paths for complex masking
  • Build reusable shape definitions

View Defs →


Scales

Functions for mapping and normalizing values for SVG graphics:

  • Convert data values to visual dimensions
  • Create dynamic scaling for responsive visuals
  • Generate paths and arcs based on data

View Scales →


Styles

Functions to generate style strings for SVG elements:

  • Create consistent styling across elements
  • Generate text formatting for SVG text elements
  • Apply line styles for paths and outlines

View Styles →


Visuals

Ready to use chart and visual components built from library elements:

  • Pre-built visuals you can apply to your data

View Visuals →


Utils

Helper and utility functions for internal use:

  • Format and process SVG element properties
  • Handle optional elements and attributes
  • Support internal library operations

View Utils →


Getting Started

  1. Download the library from DaxLib
  2. Install using TMDL view
  3. Start using the functions in your measures

For detailed examples, check out our example PBIP file.