How to use the blessed-contrib.bar function in blessed-contrib

To help you get started, we’ve selected a few blessed-contrib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MadRabbit / keyboard-genetics / src / ui.js View on Github external
const breaks_bar = contrib.gauge({
  showLabel: false,
  height:  3,
  top:     5,
  left:    20,
  width:   30
});
genesis.append(breaks_bar);

const breaks_label = blessed.text({
  content: "No changes in 0/0",
  top:      7
});
genesis.append(breaks_label);

const fingers_chart = contrib.bar({
  top:        7,
  showLabel:  false,
  barWidth:   2,
  barSpacing: 1,
  xOffset:    0,
  maxHeight:  4,
  height:     7,
  barBgColor: 'cyan'
});

details.append(fingers_chart);

layouts.on("item", (row) => {
  details.setContent(String(row));
});