
Security News
GitHub Actions Adds cache-mode to Limit Cache Poisoning Risk
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.
@qfo/qfchart
Advanced tools
Professional financial charting library built on Apache ECharts with candlestick charts, technical indicators, and interactive drawing tools
A powerful, high-performance financial charting library built on Apache ECharts
QFChart is a lightweight, feature-rich financial charting library designed for building professional trading platforms. It combines the power of Apache ECharts with an intuitive API specifically tailored for OHLCV candlestick charts, technical indicators, and interactive drawing tools.

A plugin system is used to allow adding custom drawing tools to the charts. Currently available plugins :
<!-- 1. Include ECharts (Required) -->
<script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
<!-- 2. Include QFChart -->
<script src="https://cdn.jsdelivr.net/npm/@qfo/qfchart/dist/qfchart.min.browser.js"></script>
npm install @qfo/qfchart echarts
yarn add @qfo/qfchart echarts
<div id="chart-container" style="width: 100%; height: 600px;"></div>
import { QFChart } from '@qfo/qfchart';
// Initialize
const container = document.getElementById('chart-container');
const chart = new QFChart(container, {
title: 'BTC/USDT',
height: '600px',
databox: {
position: 'right', // or 'left', 'floating'
},
});
// Set market data
const marketData = [
{
time: 1620000000000,
open: 50000,
high: 51000,
low: 49000,
close: 50500,
volume: 100000,
},
// ... more data
];
chart.setMarketData(marketData);
// Add overlay indicator (e.g., SMA)
const smaPlots = {
sma: {
data: [
{ time: 1620000000000, value: 50200 },
// ...
],
options: {
style: 'line',
color: '#2962FF',
linewidth: 2,
},
},
};
chart.addIndicator('SMA_20', smaPlots, {
isOverlay: true,
});
// Add separate pane indicator (e.g., MACD)
const macdPlots = {
histogram: {
data: [
{ time: 1748217600000, value: 513.1184116809054, options: { color: '#26A69A' } },
/* ... */
],
options: { style: 'histogram', color: '#26A69A' },
},
macd: {
data: [
/* ... */
],
options: { style: 'line', color: '#2962FF' },
},
signal: {
data: [
/* ... */
],
options: { style: 'line', color: '#FF6D00' },
},
};
chart.addIndicator('MACD', macdPlots, {
isOverlay: false,
height: 15,
controls: { collapse: true, maximize: true },
});
import { LineTool, FibonacciTool, MeasureTool } from '@qfo/qfchart';
// Register plugins
chart.registerPlugin(new LineTool());
chart.registerPlugin(new FibonacciTool());
chart.registerPlugin(new MeasureTool());
// Drawing tools now available in the chart toolbar
For live trading applications, use the updateData() method for optimal performance:
// Keep reference to indicator
const macdIndicator = chart.addIndicator('MACD', macdPlots, {
isOverlay: false,
height: 15,
});
// WebSocket or data feed callback
function onNewTick(bar, indicators) {
// Step 1: Update indicator data first
macdIndicator.updateData(indicators);
// Step 2: Update chart data (triggers re-render)
chart.updateData([bar]);
}
// Update existing bar (e.g., real-time ticks)
const updatedBar = {
time: lastBar.time, // Same timestamp = update
open: lastBar.open,
high: Math.max(lastBar.high, newPrice),
low: Math.min(lastBar.low, newPrice),
close: newPrice,
volume: lastBar.volume + tickVolume,
};
chart.updateData([updatedBar]);
const chart = new QFChart(container, {
title: 'BTC/USDT',
backgroundColor: '#1e293b',
upColor: '#00da3c',
downColor: '#ec0000',
fontColor: '#cbd5e1',
fontFamily: 'sans-serif',
padding: 0.2, // Vertical padding for auto-scaling
yAxisDecimalPlaces: undefined, // Auto-detect decimals (default), or set number (e.g. 2)
dataZoom: {
visible: true,
position: 'top',
height: 6,
start: 0,
end: 100,
},
watermark: true, // Show "QFChart" watermark
controls: {
collapse: true,
maximize: true,
fullscreen: true,
},
});
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Alaa-eddine KADDOURI
Give a ⭐️ if this project helped you!
For questions and support, please open an issue on GitHub Issues.
Built with ❤️ by QuantForge
FAQs
Professional financial charting library built on Apache ECharts with candlestick charts, technical indicators, and interactive drawing tools
The npm package @qfo/qfchart receives a total of 84 weekly downloads. As such, @qfo/qfchart popularity was classified as not popular.
We found that @qfo/qfchart 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.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.