Giter VIP home page Giter VIP logo

ascii-chart's People

Contributors

electic avatar gtktsc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ascii-chart's Issues

Repeating for dynamic color lengths

hello, really happy with the library. Really graet job.

One suggestion could be to automatically wrap the colors.

Meaning, if I provide 3 in the colors array, that if I also have 6 series, the series 4-6 would get the same colors as 1-3. Do something like 'colors % colors.lenth

My particular use case is that I don't necessarily know how many series I have at compile time, so to have colors, I'd need to do some computing magic, when I could just supply a few colors and they would get repeated.

Thanks again and let me know if what I suggested wasn't clear.

image

More customization

Hey, This is the best terminal ascii chart!

I had a small issues/question.
Current Output
hii

I wanted something like this, not exact but few things like
hiu

  1. Empty symbol only between/inside the graph
  2. The right corner mentions the types that graph lines belong to (Yesterday, today)
  3. The way to add label to x and y axis in the chart, currently we can only add title.

Great library! I can't wait to see where this goes. Thank you for making it!

Axis Label string formatter

Hi @gtktsc ,

Great library. I would have a feature request. I would need to format the label differently. I have bigger number (mostly y-axis) which are between 0 - 1000000. The actual formatter can only return a number again (so divide the number is the way is use it, but it is confusion to read). It would be great to have a string based formatter that I can translate i.e. 10000 to 10K as label. Directly built in would also be fine.

Greetings
Michael

ESM support

Currently the package works as expected in commonjs module
but with esm, we have to use it like below

import plot from 'simple-ascii-chart';

plot.default(            // plot.default instead of plot
        [
          [1, 1],
          [2, 4],
          [3, 4],
          [4, 2],
          [5, -1],
          [6, 3],
          [7, -1],
          [8, 9],
        ],
        { title: 'Important data', width: 20, height: 8 }
      )
    );

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.