textplot

Ermöglicht textbasierte Datenvisualisierung direkt in SQL-Abfragen, einschließlich ASCII-/Unicode-Balkendiagrammen, Dichteplots und Sparklines für schlanke Analysen und Dashboards.

Maintainer: rustyconover

Installation und Laden

INSTALL textplot FROM community;
LOAD textplot;

Über textplot

Weitere Informationen zur Verwendung finden Sie in der Dokumentation.

Hinzugefügte Funktionen

function_name function_type description comment examples
tp_bar scalar Creates a horizontal bar chart visualization from a numeric value. Supports customizable width, colors, shapes (square/circle/heart), and color thresholds. NULL [tp_bar(0.75), tp_bar(75, min := 0, max := 100, width := 20), tp_bar(0.5, “on” := ‘#’, off := ‘-’, width := 10), tp_bar(0.8, shape := ‘heart’, on_color := ‘red’), tp_bar(75, min := 0, max := 100, thresholds := [{‘threshold’: 80, ‘color’: ‘red’}, {‘threshold’: 50, ‘color’: ‘yellow’}])]
tp_density scalar Creates a density plot (histogram) visualization from an array of numeric values. Supports multiple styles: shaded, dots, ascii, height, circles, safety, rainbow_circle, rainbow_square, moon, sparse, and white. NULL [tp_density([1.0, 2.0, 2.0, 3.0, 3.0, 3.0, 4.0, 4.0, 5.0]), tp_density([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0], width := 40), tp_density([1.0, 2.0, 3.0, 4.0, 5.0], style := ‘height’), tp_density([1.0, 2.0, 3.0, 4.0, 5.0], style := ‘rainbow_square’, width := 30)]
tp_qr scalar Generates a text-based QR code from a string or blob. Supports configurable error correction levels and custom on/off characters. NULL [tp_qr(‘https://duckdb.org’), tp_qr(‘https://example.com’, ecc := ‘high’), tp_qr(‘Hello, world!’, “on” := ‘##’, off := ’ ’)]
tp_sparkline scalar Creates a sparkline visualization from an array of numeric values. Supports three modes: ‘absolute’ (height-based), ‘delta’ (up/down/same direction), and ‘trend’ (direction with magnitude). Multiple themes available per mode. NULL [tp_sparkline([1.0, 2.0, 3.0, 4.0, 5.0]), tp_sparkline([1.0, 3.0, 2.0, 5.0, 4.0, 6.0], width := 20), tp_sparkline([1.0, 2.0, 1.0, 3.0, 2.0], mode := ‘delta’, theme := ‘arrows’), tp_sparkline([1.0, 2.0, 3.0, 4.0, 5.0], mode := ‘absolute’, theme := ‘utf8_blocks’), tp_sparkline([1.0, 5.0, 3.0, 8.0, 6.0], mode := ‘trend’, theme := ‘faces’)]

Überladene Funktionen

Diese Erweiterung fügt keine Funktionsüberladungen hinzu.

Hinzugefügte Typen

Diese Erweiterung fügt keine Typen hinzu.

Hinzugefügte Einstellungen

Diese Erweiterung fügt keine Einstellungen hinzu.