table vs cli-table vs console.table vs console-table-printer vs ascii-table
Node.js Table Formatting Libraries Comparison
1 Year
tablecli-tableconsole.tableconsole-table-printerascii-tableSimilar Packages:
What's Node.js Table Formatting Libraries?

These libraries are designed to help developers create and display tables in the console, making it easier to visualize data in a structured format. They cater to different needs and preferences, providing various features for formatting, styling, and printing tables in Node.js applications. Each library has its unique approach and capabilities, allowing developers to choose based on their specific requirements for console output.

NPM Package Downloads Trend
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
table13,307,772915335 kB26a month agoBSD-3-Clause
cli-table2,916,0182,28117.3 kB183 years ago-
console.table1,039,047139-57 years agoMIT
console-table-printer289,38617845 kB257 months agoMIT
ascii-table168,229184-239 years agoMIT
Feature Comparison: table vs cli-table vs console.table vs console-table-printer vs ascii-table

Ease of Use

  • table:

    table strikes a balance between ease of use and functionality, providing a straightforward API while still allowing for customization.

  • cli-table:

    cli-table offers a more feature-rich API, which may require a bit more setup but provides greater flexibility in table formatting. It is still relatively easy to use for those familiar with Node.js.

  • console.table:

    console.table is the simplest option, as it is built into Node.js. Developers can use it without any additional installation, making it the quickest way to display data in a table format.

  • console-table-printer:

    console-table-printer emphasizes ease of use with a clean API that allows for quick table printing. It is user-friendly and suitable for developers looking for a hassle-free solution.

  • ascii-table:

    ascii-table is designed for simplicity, allowing developers to create tables with minimal code. Its straightforward API makes it easy to integrate into existing projects without a steep learning curve.

Customization

  • table:

    table offers a moderate level of customization, allowing developers to adjust the appearance of tables while keeping the API simple.

  • cli-table:

    cli-table excels in customization, allowing developers to define column widths, alignments, and styles. This makes it ideal for applications that need a polished output.

  • console.table:

    console.table has no customization options; it outputs tables in a default format. It is best for quick debugging rather than polished presentation.

  • console-table-printer:

    console-table-printer provides some customization options, including styling and alignment, but is not as extensive as cli-table. It is suitable for most common use cases.

  • ascii-table:

    ascii-table offers limited customization options, focusing on basic ASCII table formatting. It is best for simple use cases where advanced styling is not required.

Performance

  • table:

    table is designed to handle moderate amounts of data efficiently, providing a good balance between performance and functionality.

  • cli-table:

    cli-table may have slightly slower performance due to its advanced features, but it is still efficient for most applications. Performance is generally acceptable for typical use cases.

  • console.table:

    console.table is highly performant as it is part of the Node.js core, making it very efficient for logging data without additional dependencies.

  • console-table-printer:

    console-table-printer is optimized for performance, making it suitable for printing tables quickly without significant overhead.

  • ascii-table:

    ascii-table is lightweight and performs well for small to medium datasets. Its simplicity contributes to faster rendering times in console applications.

Data Handling

  • table:

    table is capable of handling complex data structures, allowing for more intricate representations of data in tables.

  • cli-table:

    cli-table can handle more complex data structures, including multi-line cells and various data types, making it versatile for different applications.

  • console.table:

    console.table works well with arrays and objects, providing a straightforward way to log structured data in a tabular format.

  • console-table-printer:

    console-table-printer supports various data types and can handle arrays and objects effectively, making it suitable for diverse datasets.

  • ascii-table:

    ascii-table is best suited for simple data structures, such as arrays of objects. It does not support complex nested data well.

Community and Support

  • table:

    table has a moderate community presence, providing a decent amount of resources and support for users.

  • cli-table:

    cli-table has a larger community and more resources available, making it easier to find help and examples online.

  • console.table:

    console.table benefits from being part of Node.js, ensuring robust support and documentation due to its built-in nature.

  • console-table-printer:

    console-table-printer has a growing community, and while resources are available, they may not be as extensive as those for cli-table.

  • ascii-table:

    ascii-table has a smaller community and limited support, which may affect the availability of resources and examples.

How to Choose: table vs cli-table vs console.table vs console-table-printer vs ascii-table
  • table:

    Choose table if you need a library that offers a balance between simplicity and functionality, with support for complex data structures and customizable output. It is suitable for developers who want more control over the table's appearance without overwhelming complexity.

  • cli-table:

    Select cli-table if you require more advanced features such as column alignment, custom styles, and support for multi-line cells. It is well-suited for applications that need to present data in a more visually appealing way, with a focus on customization.

  • console.table:

    Use console.table if you are looking for a built-in solution provided by Node.js that allows you to log arrays or objects in a tabular format directly to the console. This is the simplest option for quick debugging without any additional dependencies.

  • console-table-printer:

    Opt for console-table-printer if you want a library that provides a straightforward API for printing tables with a focus on ease of use. It supports various data types and offers built-in styling options, making it a good choice for quick implementations.

  • ascii-table:

    Choose ascii-table if you need a simple and lightweight solution for displaying ASCII tables in the console. It is easy to use and requires minimal setup, making it ideal for quick debugging or displaying small datasets.

README for table

Table

Produces a string that represents array data in a text table.

Github action status Coveralls NPM version Canonical Code Style Twitter Follow

Demo of table displaying a list of missions to the Moon.

Features

  • Works with strings containing fullwidth characters.
  • Works with strings containing ANSI escape codes.
  • Configurable border characters.
  • Configurable content alignment per column.
  • Configurable content padding per column.
  • Configurable column width.
  • Text wrapping.

Install

npm install table

Buy Me A Coffee Become a Patron

Usage

import { table } from 'table';

// Using commonjs?
// const { table } = require('table');

const data = [
    ['0A', '0B', '0C'],
    ['1A', '1B', '1C'],
    ['2A', '2B', '2C']
];

console.log(table(data));
╔════╤════╤════╗
║ 0A │ 0B │ 0C ║
╟────┼────┼────╢
║ 1A │ 1B │ 1C ║
╟────┼────┼────╢
║ 2A │ 2B │ 2C ║
╚════╧════╧════╝

API

table

Returns the string in the table format

Parameters:

  • data: The data to display

    • Type: any[][]
    • Required: true
  • config: Table configuration

    • Type: object
    • Required: false

config.border

Type: { [type: string]: string }
Default: honeywell template

Custom borders. The keys are any of:

  • topLeft, topRight, topBody,topJoin
  • bottomLeft, bottomRight, bottomBody, bottomJoin
  • joinLeft, joinRight, joinBody, joinJoin
  • bodyLeft, bodyRight, bodyJoin
  • headerJoin
const data = [
  ['0A', '0B', '0C'],
  ['1A', '1B', '1C'],
  ['2A', '2B', '2C']
];

const config = {
  border: {
    topBody: `─`,
    topJoin: `┬`,
    topLeft: `┌`,
    topRight: `┐`,

    bottomBody: `─`,
    bottomJoin: `┴`,
    bottomLeft: `└`,
    bottomRight: `┘`,

    bodyLeft: `│`,
    bodyRight: `│`,
    bodyJoin: `│`,

    joinBody: `─`,
    joinLeft: `├`,
    joinRight: `┤`,
    joinJoin: `┼`
  }
};

console.log(table(data, config));
┌────┬────┬────┐
│ 0A │ 0B │ 0C │
├────┼────┼────┤
│ 1A │ 1B │ 1C │
├────┼────┼────┤
│ 2A │ 2B │ 2C │
└────┴────┴────┘

config.drawVerticalLine

Type: (lineIndex: number, columnCount: number) => boolean
Default: () => true

It is used to tell whether to draw a vertical line. This callback is called for each vertical border of the table. If the table has n columns, then the index parameter is alternatively received all numbers in range [0, n] inclusively.

const data = [
  ['0A', '0B', '0C'],
  ['1A', '1B', '1C'],
  ['2A', '2B', '2C'],
  ['3A', '3B', '3C'],
  ['4A', '4B', '4C']
];

const config = {
  drawVerticalLine: (lineIndex, columnCount) => {
    return lineIndex === 0 || lineIndex === columnCount;
  }
};

console.log(table(data, config));

╔════════════╗
║ 0A  0B  0C ║
╟────────────╢
║ 1A  1B  1C ║
╟────────────╢
║ 2A  2B  2C ║
╟────────────╢
║ 3A  3B  3C ║
╟────────────╢
║ 4A  4B  4C ║
╚════════════╝

config.drawHorizontalLine

Type: (lineIndex: number, rowCount: number) => boolean
Default: () => true

It is used to tell whether to draw a horizontal line. This callback is called for each horizontal border of the table. If the table has n rows, then the index parameter is alternatively received all numbers in range [0, n] inclusively. If the table has n rows and contains the header, then the range will be [0, n+1] inclusively.

const data = [
  ['0A', '0B', '0C'],
  ['1A', '1B', '1C'],
  ['2A', '2B', '2C'],
  ['3A', '3B', '3C'],
  ['4A', '4B', '4C']
];

const config = {
  drawHorizontalLine: (lineIndex, rowCount) => {
    return lineIndex === 0 || lineIndex === 1 || lineIndex === rowCount - 1 || lineIndex === rowCount;
  }
};

console.log(table(data, config));

╔════╤════╤════╗
║ 0A │ 0B │ 0C ║
╟────┼────┼────╢
║ 1A │ 1B │ 1C ║
║ 2A │ 2B │ 2C ║
║ 3A │ 3B │ 3C ║
╟────┼────┼────╢
║ 4A │ 4B │ 4C ║
╚════╧════╧════╝

config.singleLine

Type: boolean
Default: false

If true, horizontal lines inside the table are not drawn. This option also overrides the config.drawHorizontalLine if specified.

const data = [
  ['-rw-r--r--', '1', 'pandorym', 'staff', '1529', 'May 23 11:25', 'LICENSE'],
  ['-rw-r--r--', '1', 'pandorym', 'staff', '16327', 'May 23 11:58', 'README.md'],
  ['drwxr-xr-x', '76', 'pandorym', 'staff', '2432', 'May 23 12:02', 'dist'],
  ['drwxr-xr-x', '634', 'pandorym', 'staff', '20288', 'May 23 11:54', 'node_modules'],
  ['-rw-r--r--', '1,', 'pandorym', 'staff', '525688', 'May 23 11:52', 'package-lock.json'],
  ['-rw-r--r--@', '1', 'pandorym', 'staff', '2440', 'May 23 11:25', 'package.json'],
  ['drwxr-xr-x', '27', 'pandorym', 'staff', '864', 'May 23 11:25', 'src'],
  ['drwxr-xr-x', '20', 'pandorym', 'staff', '640', 'May 23 11:25', 'test'],
];

const config = {
  singleLine: true
};

console.log(table(data, config));
╔═════════════╤═════╤══════════╤═══════╤════════╤══════════════╤═══════════════════╗
║ -rw-r--r--  │ 1   │ pandorym │ staff │ 1529   │ May 23 11:25 │ LICENSE           ║
║ -rw-r--r--  │ 1   │ pandorym │ staff │ 16327  │ May 23 11:58 │ README.md         ║
║ drwxr-xr-x  │ 76  │ pandorym │ staff │ 2432   │ May 23 12:02 │ dist              ║
║ drwxr-xr-x  │ 634 │ pandorym │ staff │ 20288  │ May 23 11:54 │ node_modules      ║
║ -rw-r--r--  │ 1,  │ pandorym │ staff │ 525688 │ May 23 11:52 │ package-lock.json ║
║ -rw-r--r--@ │ 1   │ pandorym │ staff │ 2440   │ May 23 11:25 │ package.json      ║
║ drwxr-xr-x  │ 27  │ pandorym │ staff │ 864    │ May 23 11:25 │ src               ║
║ drwxr-xr-x  │ 20  │ pandorym │ staff │ 640    │ May 23 11:25 │ test              ║
╚═════════════╧═════╧══════════╧═══════╧════════╧══════════════╧═══════════════════╝

config.columns

Type: Column[] | { [columnIndex: number]: Column }

Column specific configurations.

config.columns[*].width

Type: number
Default: the maximum cell widths of the column

Column width (excluding the paddings).


const data = [
  ['0A', '0B', '0C'],
  ['1A', '1B', '1C'],
  ['2A', '2B', '2C']
];

const config = {
  columns: {
    1: { width: 10 }
  }
};

console.log(table(data, config));
╔════╤════════════╤════╗
║ 0A │ 0B         │ 0C ║
╟────┼────────────┼────╢
║ 1A │ 1B         │ 1C ║
╟────┼────────────┼────╢
║ 2A │ 2B         │ 2C ║
╚════╧════════════╧════╝

config.columns[*].alignment

Type: 'center' | 'justify' | 'left' | 'right'
Default: 'left'

Cell content horizontal alignment

const data = [
  ['0A', '0B', '0C', '0D 0E 0F'],
  ['1A', '1B', '1C', '1D 1E 1F'],
  ['2A', '2B', '2C', '2D 2E 2F'],
];

const config = {
  columnDefault: {
    width: 10,
  },
  columns: [
    { alignment: 'left' },
    { alignment: 'center' },
    { alignment: 'right' },
    { alignment: 'justify' }
  ],
};

console.log(table(data, config));
╔════════════╤════════════╤════════════╤════════════╗
║ 0A         │     0B     │         0C │ 0D  0E  0F ║
╟────────────┼────────────┼────────────┼────────────╢
║ 1A         │     1B     │         1C │ 1D  1E  1F ║
╟────────────┼────────────┼────────────┼────────────╢
║ 2A         │     2B     │         2C │ 2D  2E  2F ║
╚════════════╧════════════╧════════════╧════════════╝

config.columns[*].verticalAlignment

Type: 'top' | 'middle' | 'bottom'
Default: 'top'

Cell content vertical alignment

const data = [
  ['A', 'B', 'C', 'DEF'],
];

const config = {
  columnDefault: {
    width: 1,
  },
  columns: [
    { verticalAlignment: 'top' },
    { verticalAlignment: 'middle' },
    { verticalAlignment: 'bottom' },
  ],
};

console.log(table(data, config));
╔═══╤═══╤═══╤═══╗
║ A │   │   │ D ║
║   │ B │   │ E ║
║   │   │ C │ F ║
╚═══╧═══╧═══╧═══╝

config.columns[*].paddingLeft

Type: number
Default: 1

The number of whitespaces used to pad the content on the left.

config.columns[*].paddingRight

Type: number
Default: 1

The number of whitespaces used to pad the content on the right.

The paddingLeft and paddingRight options do not count on the column width. So the column has width = 5, paddingLeft = 2 and paddingRight = 2 will have the total width is 9.

const data = [
  ['0A', 'AABBCC', '0C'],
  ['1A', '1B', '1C'],
  ['2A', '2B', '2C']
];

const config = {
  columns: [
    {
      paddingLeft: 3
    },
    {
      width: 2,
      paddingRight: 3
    }
  ]
};

console.log(table(data, config));
╔══════╤══════╤════╗
║   0A │ AA   │ 0C ║
║      │ BB   │    ║
║      │ CC   │    ║
╟──────┼──────┼────╢
║   1A │ 1B   │ 1C ║
╟──────┼──────┼────╢
║   2A │ 2B   │ 2C ║
╚══════╧══════╧════╝

config.columns[*].truncate

Type: number
Default: Infinity

The number of characters is which the content will be truncated. To handle a content that overflows the container width, table package implements text wrapping. However, sometimes you may want to truncate content that is too long to be displayed in the table.

const data = [
  ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.']
];

const config = {
  columns: [
    {
      width: 20,
      truncate: 100
    }
  ]
};

console.log(table(data, config));
╔══════════════════════╗
║ Lorem ipsum dolor si ║
║ t amet, consectetur  ║
║ adipiscing elit. Pha ║
║ sellus pulvinar nibh ║
║ sed mauris convall…  ║
╚══════════════════════╝

config.columns[*].wrapWord

Type: boolean
Default: false

The table package implements auto text wrapping, i.e., text that has the width greater than the container width will be separated into multiple lines at the nearest space or one of the special characters: \|/_.,;-.

When wrapWord is false:

const data = [
    ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.']
];

const config = {
  columns: [ { width: 20 } ]
};

console.log(table(data, config));
╔══════════════════════╗
║ Lorem ipsum dolor si ║
║ t amet, consectetur  ║
║ adipiscing elit. Pha ║
║ sellus pulvinar nibh ║
║ sed mauris convallis ║
║ dapibus. Nunc venena ║
║ tis tempus nulla sit ║
║ amet viverra.        ║
╚══════════════════════╝

When wrapWord is true:

╔══════════════════════╗
║ Lorem ipsum dolor    ║
║ sit amet,            ║
║ consectetur          ║
║ adipiscing elit.     ║
║ Phasellus pulvinar   ║
║ nibh sed mauris      ║
║ convallis dapibus.   ║
║ Nunc venenatis       ║
║ tempus nulla sit     ║
║ amet viverra.        ║
╚══════════════════════╝

config.columnDefault

Type: Column
Default: {}

The default configuration for all columns. Column-specific settings will overwrite the default values.

config.header

Type: object

Header configuration.

Deprecated in favor of the new spanning cells API.

The header configuration inherits the most of the column's, except:

  • content {string}: the header content.
  • width: calculate based on the content width automatically.
  • alignment: center be default.
  • verticalAlignment: is not supported.
  • config.border.topJoin will be config.border.topBody for prettier.
const data = [
      ['0A', '0B', '0C'],
      ['1A', '1B', '1C'],
      ['2A', '2B', '2C'],
    ];

const config = {
  columnDefault: {
    width: 10,
  },
  header: {
    alignment: 'center',
    content: 'THE HEADER\nThis is the table about something',
  },
}

console.log(table(data, config));
╔══════════════════════════════════════╗
║              THE HEADER              ║
║  This is the table about something   ║
╟────────────┬────────────┬────────────╢
║ 0A         │ 0B         │ 0C         ║
╟────────────┼────────────┼────────────╢
║ 1A         │ 1B         │ 1C         ║
╟────────────┼────────────┼────────────╢
║ 2A         │ 2B         │ 2C         ║
╚════════════╧════════════╧════════════╝

config.spanningCells

Type: SpanningCellConfig[]

Spanning cells configuration.

The configuration should be straightforward: just specify an array of minimal cell configurations including the position of top-left cell and the number of columns and/or rows will be expanded from it.

The content of overlap cells will be ignored to make the data shape be consistent.

By default, the configuration of column that the top-left cell belongs to will be applied to the whole spanning cell, except:

  • The width will be summed up of all spanning columns.
  • The paddingRight will be received from the right-most column intentionally.

Advances customized column-like styles can be configurable to each spanning cell to overwrite the default behavior.

const data = [
  ['Test Coverage Report', '', '', '', '', ''],
  ['Module', 'Component', 'Test Cases', 'Failures', 'Durations', 'Success Rate'],
  ['Services', 'User', '50', '30', '3m 7s', '60.0%'],
  ['', 'Payment', '100', '80', '7m 15s', '80.0%'],
  ['Subtotal', '', '150', '110', '10m 22s', '73.3%'],
  ['Controllers', 'User', '24', '18', '1m 30s', '75.0%'],
  ['', 'Payment', '30', '24', '50s', '80.0%'],
  ['Subtotal', '', '54', '42', '2m 20s', '77.8%'],
  ['Total', '', '204', '152', '12m 42s', '74.5%'],
];

const config = {
  columns: [
    { alignment: 'center', width: 12 },
    { alignment: 'center', width: 10 },
    { alignment: 'right' },
    { alignment: 'right' },
    { alignment: 'right' },
    { alignment: 'right' }
  ],
  spanningCells: [
    { col: 0, row: 0, colSpan: 6 },
    { col: 0, row: 2, rowSpan: 2, verticalAlignment: 'middle'},
    { col: 0, row: 4, colSpan: 2, alignment: 'right'},
    { col: 0, row: 5, rowSpan: 2, verticalAlignment: 'middle'},
    { col: 0, row: 7, colSpan: 2, alignment: 'right' },
    { col: 0, row: 8, colSpan: 2, alignment: 'right' }
  ],
};

console.log(table(data, config));
╔══════════════════════════════════════════════════════════════════════════════╗
║                             Test Coverage Report                             ║
╟──────────────┬────────────┬────────────┬──────────┬───────────┬──────────────╢
║    Module    │ Component  │ Test Cases │ Failures │ Durations │ Success Rate ║
╟──────────────┼────────────┼────────────┼──────────┼───────────┼──────────────╢
║              │    User    │         50 │       30 │     3m 7s │        60.0% ║
║   Services   ├────────────┼────────────┼──────────┼───────────┼──────────────╢
║              │  Payment   │        100 │       80 │    7m 15s │        80.0% ║
╟──────────────┴────────────┼────────────┼──────────┼───────────┼──────────────╢
║                  Subtotal │        150 │      110 │   10m 22s │        73.3% ║
╟──────────────┬────────────┼────────────┼──────────┼───────────┼──────────────╢
║              │    User    │         24 │       18 │    1m 30s │        75.0% ║
║ Controllers  ├────────────┼────────────┼──────────┼───────────┼──────────────╢
║              │  Payment   │         30 │       24 │       50s │        80.0% ║
╟──────────────┴────────────┼────────────┼──────────┼───────────┼──────────────╢
║                  Subtotal │         54 │       42 │    2m 20s │        77.8% ║
╟───────────────────────────┼────────────┼──────────┼───────────┼──────────────╢
║                     Total │        204 │      152 │   12m 42s │        74.5% ║
╚═══════════════════════════╧════════════╧══════════╧═══════════╧══════════════╝

createStream

table package exports createStream function used to draw a table and append rows.

Parameter:

  • config: the same as table's, except config.columnDefault.width and config.columnCount must be provided.
import { createStream } from 'table';

const config = {
  columnDefault: {
    width: 50
  },
  columnCount: 1
};

const stream = createStream(config);

setInterval(() => {
  stream.write([new Date()]);
}, 500);

Streaming current date.

table package uses ANSI escape codes to overwrite the output of the last line when a new row is printed.

The underlying implementation is explained in this Stack Overflow answer.

Streaming supports all of the configuration properties and functionality of a static table (such as auto text wrapping, alignment and padding), e.g.

import { createStream } from 'table';

import _ from 'lodash';

const config = {
  columnDefault: {
    width: 50
  },
  columnCount: 3,
  columns: [
    {
      width: 10,
      alignment: 'right'
    },
    { alignment: 'center' },
    { width: 10 }

  ]
};

const stream = createStream(config);

let i = 0;

setInterval(() => {
  let random;

  random = _.sample('abcdefghijklmnopqrstuvwxyz', _.random(1, 30)).join('');

  stream.write([i++, new Date(), random]);
}, 500);

Streaming random data.

getBorderCharacters

Parameter:

  • template
    • Type: 'honeywell' | 'norc' | 'ramac' | 'void'
    • Required: true

You can load one of the predefined border templates using getBorderCharacters function.

import { table, getBorderCharacters } from 'table';

const data = [
  ['0A', '0B', '0C'],
  ['1A', '1B', '1C'],
  ['2A', '2B', '2C']
];

const config = {
  border: getBorderCharacters(`name of the template`)
};

console.log(table(data, config));
# honeywell

╔════╤════╤════╗
║ 0A │ 0B │ 0C ║
╟────┼────┼────╢
║ 1A │ 1B │ 1C ║
╟────┼────┼────╢
║ 2A │ 2B │ 2C ║
╚════╧════╧════╝

# norc

┌────┬────┬────┐
│ 0A │ 0B │ 0C │
├────┼────┼────┤
│ 1A │ 1B │ 1C │
├────┼────┼────┤
│ 2A │ 2B │ 2C │
└────┴────┴────┘

# ramac (ASCII; for use in terminals that do not support Unicode characters)

+----+----+----+
| 0A | 0B | 0C |
|----|----|----|
| 1A | 1B | 1C |
|----|----|----|
| 2A | 2B | 2C |
+----+----+----+

# void (no borders; see "borderless table" section of the documentation)

 0A  0B  0C

 1A  1B  1C

 2A  2B  2C

Raise an issue if you'd like to contribute a new border template.

Borderless Table

Simply using void border character template creates a table with a lot of unnecessary spacing.

To create a more pleasant to the eye table, reset the padding and remove the joining rows, e.g.


const output = table(data, {
    border: getBorderCharacters('void'),
    columnDefault: {
        paddingLeft: 0,
        paddingRight: 1
    },
    drawHorizontalLine: () => false
    }
);

console.log(output);
0A 0B 0C
1A 1B 1C
2A 2B 2C