ASCII Art Chart Library With Pure JavaScript – asciichart

Category: Chart & Graph , Javascript | September 21, 2018
Author: kroitor
Views Total: 554 views
Official Page: Go to website
Last Update: September 21, 2018
License: MIT

Preview:

ASCII Art Chart Library With Pure JavaScript – asciichart

Description:

asciichart is a funny JavaScript chart library which helps you render a chart of plotted data using ASCII Art text.

Installation:

npm install asciichart

How to use it:

Download and import the asciichart into the html page.

<script src="asciichart.js"></script>

Define your own data series in the JavaScript:

var s0 = ...

Plot the data into the chart:

asciichart.plot (s0);

Possible configuration options which can be passed as the second parameter to the asciichart.plot function:

asciichart.plot (s0,{

  // axis offset from the left (min 2)
  offset:  3,          

  // padding string for label formatting (can be overrided)
  padding: '',  

  // any height you want
  height:  10,
  
  // the label format function applies default padding
  format:  function (x, i) { return (padding + x.toFixed (2)).slice (-padding.length) }

});

Changelog:

09/21/2018

  • v1.5.7

You Might Be Interested In:


Leave a Reply