Skip to content

A text-based, no-dependencies, open-source charting utility in JavaScript.

License

Notifications You must be signed in to change notification settings

lusbuab/plainchart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Florian Hämmerle
Sep 27, 2018
a279f0a Β· Sep 27, 2018

History

2 Commits
Sep 27, 2018
Sep 27, 2018
Sep 27, 2018
Sep 27, 2018
Sep 27, 2018
Sep 27, 2018

Repository files navigation

PlainChart

A text-based, no-dependencies, open-source charting utility in JavaScript. It is inspired by the Python library plainchart.

Usage

import PlainChart from "@betterthings/plainchart";
const chart = new PlainChart([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9]);
console.log(chart.render());

/*

     β–Œ     β–Œ
     β–Œ     β–Œ
     β–Œ     β–Œ
     β–Œ β–Œ   β–Œ
    β–Œβ–Œ β–Œβ–Œ β–Œβ–Œ
    β–Œβ–Œ β–Œβ–Œ β–Œβ–Œ
  β–Œ β–Œβ–Œ β–Œβ–Œ β–Œβ–Œ
β–Œ β–Œ β–Œβ–Œ β–Œβ–Œβ–Œβ–Œβ–Œ
β–Œ β–Œ β–Œβ–Œβ–Œβ–Œβ–Œβ–Œβ–Œβ–Œ
β–Œβ–Œβ–Œβ–Œβ–Œβ–Œβ–Œβ–Œβ–Œβ–Œβ–Œβ–Œ

*/

Take a look at example.mjs to see how to generate something like this:

         Γ—Γ—Γ—Γ—Γ—Γ—Γ—Γ—                                          Γ—Γ—Γ—Γ—Γ—Γ—Γ—Γ—
      Γ—Γ—Γ—        Γ—Γ—Γ—                                    Γ—Γ—Γ—        Γ—Γ—Γ—
    Γ—Γ—              Γ—Γ—                                Γ—Γ—              Γ—Γ—
  Γ—Γ—                  Γ—Γ—                            Γ—Γ—                  Γ—Γ—
 Γ—                      Γ—                          Γ—                      Γ—
Γ—                        Γ—Γ—                      Γ—Γ—                        Γ—Γ—                      Γ—
                           Γ—Γ—                  Γ—Γ—                            Γ—Γ—                  Γ—Γ—
                             Γ—Γ—              Γ—Γ—                                Γ—Γ—              Γ—Γ—
                               Γ—Γ—Γ—        Γ—Γ—Γ—                                    Γ—Γ—Γ—        Γ—Γ—Γ—
                                  Γ—Γ—Γ—Γ—Γ—Γ—Γ—Γ—                                          Γ—Γ—Γ—Γ—Γ—Γ—Γ—Γ—

Example

node --experimental-modules example.mjs

Contribute

Please feel free to open an issue to propose a new feature or point out a bug. You can also fork the PlainChart repository and submit a pull request.

Authors

About

A text-based, no-dependencies, open-source charting utility in JavaScript.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published