All Projects ā†’ ProtoTeam ā†’ Tcharts.js

ProtoTeam / Tcharts.js

šŸ“‰ Lightweight and fast terminal ASCII charts for nodejs and browser.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Tcharts.js

Asciichart
Nice-looking lightweight console ASCII line charts ā•­ā”ˆā•Æ for NodeJS, browsers and terminal, no dependencies
Stars: āœ­ 1,107 (+543.6%)
Mutual labels:  terminal, console, ascii, chart
Ervy
Bring charts to terminal.
Stars: āœ­ 1,530 (+789.53%)
Mutual labels:  terminal, console, ascii, chart
ascii chart
Nice-looking lightweight console ASCII line charts ā•­ā”ˆā•Æ. Port of kroitor/asciichart.
Stars: āœ­ 24 (-86.05%)
Mutual labels:  console, chart, ascii
asciichart-sharp
C# port of asciichart
Stars: āœ­ 27 (-84.3%)
Mutual labels:  console, chart, ascii
Csconsoleformat
.NET C# library for advanced formatting of console output [Apache]
Stars: āœ­ 296 (+72.09%)
Mutual labels:  terminal, console, ascii
Terminaltables
Generate simple tables in terminals from a nested list of strings.
Stars: āœ­ 685 (+298.26%)
Mutual labels:  terminal, console, ascii
Video To Ascii
It is a simple python package to play videos in the terminal using characters as pixels
Stars: āœ­ 960 (+458.14%)
Mutual labels:  terminal, console, ascii
Xterm.js
A terminal for the web
Stars: āœ­ 12,019 (+6887.79%)
Mutual labels:  terminal, console
Box Cli Maker
Make Highly Customized Boxes for your CLI
Stars: āœ­ 115 (-33.14%)
Mutual labels:  terminal, console
Unibits
Visualize different Unicode encodings in the terminal
Stars: āœ­ 125 (-27.33%)
Mutual labels:  terminal, ascii
Asciigraph
Go package to make lightweight ASCII line graph ā•­ā”ˆā•Æ in command line apps with no other dependencies.
Stars: āœ­ 1,805 (+949.42%)
Mutual labels:  terminal, chart
Chalk Animation
šŸŽ¬ Colorful animations in terminal output
Stars: āœ­ 1,489 (+765.7%)
Mutual labels:  terminal, console
Leash
Browser Shell
Stars: āœ­ 108 (-37.21%)
Mutual labels:  terminal, console
Py Ascii Graph
A simple python lib to print data as ascii histograms
Stars: āœ­ 107 (-37.79%)
Mutual labels:  ascii, chart
Tty Pie
Draw pie charts in your terminal window
Stars: āœ­ 125 (-27.33%)
Mutual labels:  terminal, console
Lazyhub
lazyhub - Terminal UI Client for GitHub using gocui.
Stars: āœ­ 133 (-22.67%)
Mutual labels:  terminal, console
Phetch
šŸ­ quick lil gopher client for your terminal
Stars: āœ­ 108 (-37.21%)
Mutual labels:  terminal, console
Nnn
nĀ³ The unorthodox terminal file manager
Stars: āœ­ 13,138 (+7538.37%)
Mutual labels:  terminal, console
Qov
The terminal presentation tool.
Stars: āœ­ 141 (-18.02%)
Mutual labels:  terminal, ascii
Galacritty
WIP GTK terminal emulator based on Alacritty
Stars: āœ­ 136 (-20.93%)
Mutual labels:  terminal, console

tcharts.js

TCharts.js is a Lightweight and fast terminal ASCII charts for nodejs and browser.

Ver Build Status Coverage Status

    +--------------+----------------------+---------------------+
    |              |                      |                     |
    |              |                      |                     |
    |              |                      |                     |
    |              |                      |                     |
    |              |                      |                     |
    |              |                      |                     |
    |              |        C:25%         |      Hello:25%      |
    |              |                      |                     |
    |              |                      |                     |
    |    A:25%     |                      |                     |
    |              |                      |                     |
    |              |                      |                     |
    |              +----------------------+---------------------+
    |              |                                            |
    |              |                                            |
    |              |                                            |
    |              |                   B:25%                    |
    |              |                                            |
    |              |                                            |
    +--------------+--------------------------------------------+

1. Install & Usage

npm i -S tcharts.js

Table

const TCharts = require('tcharts.js');
const { Table } = TCharts;

const table = new Table(0.2); // set gap rate = 0.2
table.setData([
  ['ęØ™č­˜ē¬¦', '名字', 'ē”Ÿę—„'],
  ['#1', '圖靈', 24],
  ['#2', 'ę½˜é‡‘č“®', false],
  ['#3', 'č„æ門ꅶ', null],
  ['#4', 'ę˜Žę—„čŠ±ē»®ē½—'],
]);
console.log(table.string());

Bar

const TCharts = require('tcharts.js');
const { Bar } = TCharts;

const bar = new Bar();
bar.setData([
  {value:100, name:'A'},
  {value:45, name:'B'},
  {value:70, name:'C'},
  {value:30, name:'D'},
]);
console.log(bar.string());

HBar

const TCharts = require('tcharts.js');
const { HBar } = TCharts;

const hbar = new HBar();
hbar.setData([
  {value: 100, name: 'A'},
  {value: 45, name: 'B'},
  {value: 70, name: 'C'},
  {value: 30, name: 'D'},
]);
console.log(hbar.string());

Box

const TCharts = require('tcharts.js');
const { Box } = TCharts;

const box = new Box(60, 20); // width, height
box.setData([
  {value:100, name:'A'},
  {value:100, name:'B'},
  {value:100, name:'C'},
  {value:100, name:'Hello'},
]);
console.log(box.string());

2. Supported charts

  • Bar: bar chart, with x, y.
  • HBar: horizontal bar chart.
  • Box: box chart showing with a square.
  • Table: data table in terminal.

How to use them, you can see the testcases in __tests__ folder.

3. Build & Test

npm i

npm run build

npm test

Then you can see the result of test cases.

4. License

[email protected]ProtoTeam.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].