UniBar is a small helper function to calculate a bar consisting of unicode block characters.
There are two implementations available:
- A JavaScript function
- A Oracle SQL function
Why should you use a bar based on text instead of one of the famous HTML 5 chart libraries?
- Text based bar charts working also in simple text editors and command line tools (with unicode capable font settings, ok...)
- They can be easily copied or exported to office documents for further charting
- You can use standard table besed report facilities in your development framework to deliver bar charts
- Your page loads faster, because you don't need to load charting libraries
There are four parameters:
- value: your bar value
- scale: the 100% value for a full bar width, default is 1
- width_block_characters: the width of a 100% bar as a number of characters, default is 25
- fill_scale: fill scale with a shade block character, default is 1 (yes)