ink-chart

0.1.1 • Public • Published

Chart component for Ink

Install

$ npm install ink-chart

Usage

import React from 'react';
import {render} from 'ink';
import Chart from 'ink-chart';
 
const data = [
  { key: 'A', value: 30 },
  { key: 'B', value: 10 },
  { key: 'C', value: 50 }
];
 
render(
    <Chart preserveAspectRatio data={data} type'bar'/>
);

API

<Chart/>

Besides the props below, it accepts props allowed in ansi-escapes.

data

Type: array

List with the data to display.

type

Type: string

Type of the chart, e.g. 'bar', 'pie'.

License

MIT © Vít Stanislav

/ink-chart/

    Package Sidebar

    Install

    npm i ink-chart

    Weekly Downloads

    3

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    3.72 kB

    Total Files

    4

    Last publish

    Collaborators

    • slaweet