GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — widget_sparkline

widget_sparkline

Jump to bottom
Alejandro Mora edited this page Apr 11, 2026 · 2 revisions

Sparkline Widget

The Sparkline widget records historical values in a ring buffer and renders them as a connected line graph. It is useful for visualizing trends over time — CPU usage, temperature, disk I/O, network throughput, etc.

  • One sample per pixel column by default — a 140 px wide widget stores 140 data points
  • Y-axis auto-scales to fit the data by default; fixed min/max overrides are supported
  • Color thresholds for value ranges (same scheme as GraphicBar)
  • Optional Catmull-Rom curve smoothing, dashed/dotted stroke styles, gradient fill, and value blur

Added in the AX206 fork.

Widget <name> {
    class       'Sparkline'
    expression  <expr>
    length      <number>
    width       <number>
    min         <number>
    max         <number>
    color       <color>
    background  <color>
    valuelow    <number>
    colorlow    <color>
    valuehigh   <number>
    colorhigh   <color>
    sample      <number>
    thickness   <number>
    smooth      <number>
    smoothsteps <number>
    stroke      <string>
    valueblur   <number>
    fillunder   <number>
    fillalpha   <number>
    update      <number>
}

Parameters

expression Value to sample on each update (numeric expression)
length Width of the graph in pixels — also the number of samples stored
width Height of the graph in pixels
min Y-axis minimum. If omitted, auto-scales to the current data range
max Y-axis maximum. If omitted, auto-scales to the current data range
color Line color as RGB/RGBA hex. Default: bright green '00ff00'
background Background color as RGB/RGBA hex. Default: dark gray '333333'
valuelow Threshold below which colorlow is used for the line
colorlow Line color when value ≤ valuelow
valuehigh Threshold above which colorhigh is used for the line
colorhigh Line color when value ≥ valuehigh
sample How many update ticks between samples (default: 1, i.e. sample every tick)
thickness Line width in pixels. Range 1–32. Default: 1
smooth Set to 1 to enable Catmull-Rom curve interpolation between samples (rounds sharp corners). Default: 0
smoothsteps Number of interpolated sub-points per sample segment when smooth is on. Default: 24
stroke Line style: 'solid' (default), 'dashed', or 'dotted'
valueblur Passes of a 3-tap binomial low-pass filter applied to the sample values before rendering. Softens blocky step-like shapes from fast-changing signals. Range 0–16. Default: 0
fillunder Set to 1 to draw a gradient fill from the line color toward transparent, between the curve and the minimum-value axis. Default: 0
fillalpha GD alpha value at the curve edge for the fillunder gradient. Range 0–127 (0 = fully opaque at curve, 127 = invisible). Default: 44
update Update/sample interval in milliseconds. Default: 1000

Example

Widget CPU_Spark {
    class       'Sparkline'
    expression   proc_stat::cpu('busy', 500)
    length       140
    width        50
    min          0
    max          100
    color        '00ff00'
    background   '222222'
    valuehigh    80
    colorhigh    'ff4444'
    thickness    2
    smooth       1
    fillunder    1
    fillalpha    80
    update       1000
}

This widget is available in the AX206 fork. See Widgets & Layout for all widget types.

The official LCD4Linux(AX206) Wiki
Back from the dead!

Home


  • News
  • Features · DE
  • Wish List

Documentation

  • Manual · DE
  • Howto · DE
  • FAQ
  • Configuration
  • Evaluator
  • Widgets & Layout
  • Displays
  • Plugins
  • Sample Config

Developers

  • Write a Driver
  • Write a Plugin

Resources

  • Download
  • Mailing Lists
  • Credits
  • Logos
  • Cool Stuff
  • Links

Legacy (0.9)

  • Old Documentation

AX206 Fork

  • Fork Features
  • Theme Management
  • TrueType Widget
  • Gauge Widget
  • GraphicBar Widget
  • Sparkline Widget

Clone this wiki locally

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.