
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
asciicandlechart
Advanced tools
A powerful ASCII chart library for rendering candlestick charts in the terminal using a dynamic matrix-based approach
A powerful ASCII chart library for rendering candlestick charts in the terminal using a dynamic matrix-based approach.
The library uses a dynamic 2D matrix where:
npm install asciichart
or with yarn:
yarn add asciichart
or with bun:
bun add asciichart
Install the latest version directly from GitHub:
npm install git+https://github.com/hasangilak/asciichart.git
or add to your package.json:
{
"dependencies": {
"asciichart": "github:hasangilak/asciichart"
}
}
import { MatrixASCIIChart } from './index';
const chart = new MatrixASCIIChart()
.firstBearish(5, 1, 1) // body=5, upperWick=1, lowerWick=1
.addBullish(3, 0, 1) // body=3, upperWick=0, lowerWick=1
.addBearish(2, 1, 0) // body=2, upperWick=1, lowerWick=0
.withAxes() // Add price/time axes
.withAnnotations() // Add candle labels (C1, C2, etc.)
.toString();
console.log(chart);
firstBullish(body, upperWick, lowerWick) - Add first bullish candlefirstBearish(body, upperWick, lowerWick) - Add first bearish candleaddBullish(body, upperWick, lowerWick) - Add subsequent bullish candleaddBearish(body, upperWick, lowerWick) - Add subsequent bearish candlewithAxes() - Enable price and time axeswithAnnotations() - Enable candle labelstoString() - Render chart as stringtoMarkdown() - Render chart wrapped in markdown code blockcore-matrix.ts - Dynamic matrix implementation with expansion logicindex.ts - Main chart class with axes and renderingtest.ts - Comprehensive test suiteDynamicMatrix - Core 2D matrix that handles candle positioning and expansionMatrixASCIIChart - High-level API that uses DynamicMatrix and adds axes Price
↑
| C1
| | C2
| ░░░ |
| ░░░ ███
| ░░░ ███
| ░░░ ███
| | |
|
_____._____.___→ Time
Run the test suite:
bun test.ts
This will show various test cases including single candles, multiple candles, and complex patterns.
FAQs
A powerful ASCII chart library for rendering candlestick charts in the terminal using a dynamic matrix-based approach
We found that asciicandlechart demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.