BAR

Returns a visual bar string representation of a value within a range. Useful for text-based visualizations.

Analyze Syntax

func.bar(<value>, <min>, <max>, <width>)

Analyze Examples

func.bar(50, 0, 100, 20)

┌──────────────────────┐
 ██████████           
└──────────────────────┘

SQL Syntax

BAR(<value>, <min>, <max>, <width>)

SQL Examples

SELECT score, BAR(score, 0, 100, 20) AS bar FROM students;

┌───────┬──────────────────────┐
 score  bar                  
├───────┼──────────────────────┤
    25  █████                
    50  ██████████           
    75  ███████████████      
   100  ████████████████████ 
└───────┴──────────────────────┘