Skip to learning content

Learn SVG in Qlik, one visual at a time.

Practical lessons in SVG basics, variable-driven switches and a Dynamic KPI Gauge — with Qlik expressions you can use in your own apps.

Your learning path

  1. 1
    SVG basics

    Learn the canvas, shapes and attributes behind every SVG.

  2. 2
    Qlik expressions

    Build SVG text with Qlik and return it as a data URI.

  3. 3
    SVG switches

    Explore 8 switch designs driven by Qlik variables.

  4. 4
    Charts and dashboard visuals

    Build data-driven visuals like the Dynamic KPI Gauge and Vehicle Availability card.

What is SVG?

Text-based

An SVG is a short piece of text that describes a picture — so anything that produces text, like a Qlik expression, can create one.

Built from shapes

Drawings are made of elements such as rectangles, circles, paths, lines and text.

Scales cleanly

Because shapes are vectors, not pixels, the picture stays crisp at any size.

Styled by attributes

Attributes set position, size, fill, stroke and typography — e.g. x, width, fill, stroke, font-size.

Can animate

SVG can include animation, as long as the browser or app displaying it supports it.

How SVG works with Qlik

A Qlik expression assembles SVG markup into a data:image/svg+xml;utf8, data URI that an image-capable Qlik object displays. Values from variables or measures flow in, so the visual updates when its inputs change.

  1. 1Canvas

    Create the SVG markup and its viewBox.

  2. 2Shapes

    Add shapes, text and styling.

  3. 3Logic

    Use Qlik expression logic to insert values or choose visual states.

  4. 4Output

    Return the completed SVG as a data URI for the Qlik object.

Explore the examples

Previews only — not connected to a live Qlik app

Square Slider Switch

Browser preview
vSwitch = 0

A square-cornered track with an outlined icon and a rectangular slider. Qlik If() logic reads vSwitch to slide the handle from left to right and swap the track fill and icon colour between grey and purple. Click the preview to toggle between 0 and 1.

Square Slider Switch — Qlik expression

Paste into a Qlik measure / variable — see the linked lesson’s setup steps.

Dynamic KPI Gauge

Sample data · browser preview
Length of Stay: 4.9 days, September 2026. Scale 4.7 to 5.6. Purple gauge.

Length of Stay · 4.9 days · Sep 2026

Illustrative healthcare data · Apr–Sep 2026 · no patient data or live Qlik connection.

A purple semicircular gauge for Length of Stay, Bed Occupancy, Discharges Before Noon and Wait Time. Qlik variables drive the selected metric, value and progress; native Qlik overlay buttons must be configured separately.

Dynamic KPI Gauge — Qlik expression

Paste into a Qlik measure / variable — see the linked lesson’s setup steps.

Sun Gauge

Sample data · browser preview
Bed occupancy rate91.7%↑ 7.2 ppvs last month
Sep 2026

A 60-tick radial gauge that lights up with the value, shows the number in the middle and a green/red change vs last month — built from one Qlik variable. Pick a metric and month to see the ticks animate in.

Sun Gauge — Qlik expression

Paste into a Qlik measure / variable — see the linked lesson’s setup steps.

Lollipop Chart

Sample data · browser preview
Lollipop chart of synthetic yearly sales with baseline year 2021

A yearly sales lollipop chart with a current-year KPI, comparisons to a selectable baseline year and the previous year, and a baseline line that moves with the selected year. Uses synthetic demo data.

Lollipop Chart — Qlik expression

Paste into a Qlik measure / variable — see the linked lesson’s setup steps.

Lesson library

About Robert Mika

Qlik developer sharing practical SVG techniques

Follow on LinkedIn