
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
Pretty graphs for the terminal

Inspired from babar and sparkline. This actually mixes features of both.
npm install zibar -g
If you don't know what npm is, read this.
zibar [-c config-file] [ - ] [ value1 [value2..]]
Data can be read from stdin

Configuration allows fancy rendering

{
"height": 5,
"min": 0,
"high": 40,
"marks": [ 0, "?", 0, 0, { "symbol": "â–Ľ", "color": "red,bold" } ],
"color": "green",
"colors": {
"5": "magenta,bold"
},
"vlines": [null, null, "cyan"],
"yAxis": {
"decimals": 0
},
"xAxis": {
"interval": 2,
"color": "yellow,bold"
}
}
Or minimal sparkline style

{
"height": 1,
"min": 0,
"color": "yellow,bold",
"yAxis": {
"display": false
},
"xAxis": {
"display": false
}
}
{
"height": 5, // graph height
"color": "green", // bar color
"background": "blue", // graph background color
"min": 0, // minimum value, clips values below
"max": 10, // maximum value, clips values above
"low": 3, // soft minimum, values below are also shown
"high": 6. // soft maximum, values above are also shown
"chars": " ⡀⡀⡄⡄⡆⡆⡇⡇⡇", // characters used for the bars, defaults to unicode block elements
"marks": [ 0, // markers chars above the graph
"?", // can be an array or integer-indexed object
null,
0,
{ "symbol": "â–Ľ", // use objects to add styling
"color": "red" }
],
"colors": { // custom colors for values
"5": "magenta,bold" // can be an array or integer-indexed object
},
"vlines":
[null, null, "cyan"], // vertical lines markers
"yAxis": {
"display": true, // show/hide the axis labels
"color": "yellow", // axis label color
"ticks": true, // show/hide axis ticks
"decimals": 0 // number of decimals in axis labels
},
"xAxis": {
"display": true, // show/hide the axis labels
"color": "yellow", // axis label color
"interval": 2, // distance between labels
"origin": 10, // axis scale starts with this value
"factor": 2, // axis scale multiplier
"offset": 3 // relative position of the label to its default
}
}
The terminal and its font must support unicode. Ensure you have one, e.g. Source Code Pro.
If some blocks looks weird, try the following config options.
"badBlock": true,
"fixFull": true
npm install zibar --save
var zibar = require('zibar');
var graph = zibar(data, config); // returns the graph as a string
Example
var graph = zibar([30, 12, 9.8, 31, 14, 31.5, 4, 6, 22, 33, 4, 22],
{
"height": 1,
"min": 0,
"color": "yellow,bold",
"yAxis": {
"display": false
},
"xAxis": {
"display": false
}
});
process.stdout.write(graph);
When using as a library, you can pass a function for formatting x and y axis labels.
format: function(x) { return require('roman-numerals').toRoman(x); }
For non-linear y scale, you can pass a function and its inverse to transform the scale.
tranform: function(x) { return Math.log(x)/Math.log(10); }
inverse: function(x) { return Math.pow(10,x); }
FAQs
Pretty graphs for the terminal
The npm package zibar receives a total of 324 weekly downloads. As such, zibar popularity was classified as not popular.
We found that zibar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.