sparkline

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

templ: version: v0.3.977

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sparkline

func Sparkline(props Props) templ.Component

Sparkline renders a small inline SVG trend chart.

Types

type Props

type Props struct {
	Data        []float64 // data points to plot
	Width       int       // SVG width in pixels (default 60)
	Height      int       // SVG height in pixels (default 24)
	Color       string    // stroke/dot color (default "currentColor")
	StrokeWidth float64   // line width (default 1.5)
	ShowDot     bool      // show dot at last data point (default true)
	DotRadius   float64   // radius of end dot (default 2.5)
	Class       string
}

Props configures the sparkline SVG.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL