Git Product home page Git Product logo

console-candlestick-chart's Introduction

Render candlestick charts within your terminal

This is still work in progress. There's quite some issues with some missing candles due to lack of checks for some small granular candles. Performance can also significantly be improved.

  • Adjusts based on terminal width and height automatically
  • Customizable symbols
  • Ability to change candle color (e.g., when a pattern is to be displayed in the terminal)

Example usage

const data:  Array<TOHLC> = [...] // your data here
const chart = new Chart(data);

// (COMMENTED) example of how to apply an effect to a candle.
// chart.getActiveCandles()[3].addEffect(Color.bgBlue);

// rendering of the terminal
console.log(chart+"");

// executes callback when terminal size changes
chart.onConsoleSizeChange((e)=>{
    // clear the terminal
    Deno.stdout.write(new TextEncoder().encode(`\x1B[2J`));
    // re-print the chart
    console.log(""+chart);
});

console-candlestick-chart's People

Contributors

duart38 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.