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
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
Elements
Core SVG element generator functions:
- Create basic shapes (Circle, Rect, Line, etc.)
- Build text elements with styling
- Group elements for organization and reuse
Compounds
Composite SVG components:
- Create complex visual elements from simple parts
- Combine shapes and styles for consistent visuals
- Build reusable UI components
Defs
Reusable SVG definitions for gradients, shapes, and more:
- Create and reuse gradient definitions
- Define clip paths for complex masking
- Build reusable shape definitions
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
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
Visuals
Ready to use chart and visual components built from library elements:
- Pre-built visuals you can apply to your data
Utils
Helper and utility functions for internal use:
- Format and process SVG element properties
- Handle optional elements and attributes
- Support internal library operations
Getting Started
- Download the library from DaxLib
- Install using TMDL view
- Start using the functions in your measures
For detailed examples, check out our example PBIP file.