
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
@tradecanvas/core
Advanced tools
Canvas rendering engine, indicators, drawing tools, trading overlays, and real-time streaming for the @tradecanvas/chart library.
Live Demo | GitHub | Documentation
You don't need to install this package directly. It's included as a dependency of @tradecanvas/chart.
npm install @tradecanvas/chart
Multi-layer canvas rendering for optimal performance -- only dirty layers repaint each frame:
UI Layer (price axis, legend, live price) z=3
Overlay Layer (drawings, trading positions/orders) z=2
Main Layer (candles, indicators, volume) z=1
Background (grid, watermark) z=0
RenderEngine -- orchestrates the render pipelineLayerManager -- manages canvas layer stackRenderLoop -- requestAnimationFrame loop with dirty trackingDPRManager -- device pixel ratio handling for crisp renderingCandlestickRenderer, HollowCandleRenderer, BarRenderer, LineRenderer, AreaRenderer, BaselineRenderer, RenkoRenderer, KagiRenderer, PointAndFigureRenderer, VolumeRenderer, VolumeCandleRenderer, EquivolumeRenderer, HLCAreaRenderer, StepLineRenderer, LineWithMarkersRenderer, CompareRenderer. Heikin-Ashi, Line Break, and Range Bars reuse CandlestickRenderer against transformed data.
Data transforms: toHeikinAshi, toRenko, toLineBreak, toKagi, toPointAndFigure, toRangeBars
Overlay (on price chart): SMA, EMA, Hull MA, Bollinger Bands, Keltner Channel, Donchian Channel, Ichimoku Cloud, Parabolic SAR, Supertrend, VWAP, Anchored VWAP, Pivot Points (Classic), ZigZag, Linear Regression Channel
Panel (separate sub-chart): RSI, MACD, Stochastic, ATR, ADX, CCI, CMF, MFI, OBV, ROC, TSI, Williams %R, Awesome Oscillator, Chaikin Oscillator, Volume Profile, VROC, Standard Deviation, Accumulation/Distribution, Aroon
Indicator parameters are read through getNumberParam / getIntParam helpers, so invalid values (NaN, Infinity, missing keys, non-numeric strings) safely fall back to defaults instead of producing NaN-laced calculations.
Extensible via IndicatorBase for custom indicators.
IndicatorWorkerHost wraps a Worker and exposes a Promise-based calculate() so heavy charts can run indicator math off the main thread:
import { IndicatorWorkerHost } from '@tradecanvas/core'
const worker = new Worker(new URL('./dist/indicator.worker.js', import.meta.url), { type: 'module' })
const host = new IndicatorWorkerHost(worker)
const output = await host.calculate('rsi', config, bars)
Pass null instead of a worker for synchronous fallback (SSR, tests). The shipped indicator.worker.js registers all 33 built-in indicators and supports calculate and ping requests.
Trendline, Horizontal/Vertical Lines, Ray, Extended Line, Parallel Channel, Fibonacci Retracement / Extension / Time Zones (new in 0.8), Rectangle, Ellipse, Triangle, Arrow, Pitchfork, Gann Fan/Box, Elliott Wave, Regression Channel, Date/Price Range, Measure, Anchored VWAP, Volume Profile Range, Text Annotation
All tools support magnet snapping, undo/redo, and serialization. Extensible via DrawingBase.
TradingManager -- manage positions and ordersTradingRenderer -- render entry lines, P&L zones, SL/TP markersOrderRenderer -- render pending orders with drag-to-modifyDepthOverlay -- bid/ask depth visualizationStreamManager -- manage data connections with auto-reconnectBinanceAdapter -- built-in Binance WebSocket adapterMockAdapter -- testing and demo dataTickAggregator -- aggregate raw ticks into OHLC barsReconnectManager -- exponential backoff reconnectionAlertManager -- price and indicator alertsReplayManager -- bar-by-bar historical replay (Chart-tied)ReplayController (new in 0.8) -- headless replay decoupled from Chart; powers backtest visualizationChartStateManager -- save/load chart state as JSONUndoRedoManager -- undo/redo for drawingsDataExporter -- export visible/all data as CSV or JSONChartLegend -- OHLCV overlay displayScreenshot -- export chart as PNGWatermark -- background text watermarkBarCountdown -- time until candle closeSessionBreaks -- market session visualizationFAQs
Canvas rendering engine for @tradecanvas/chart
We found that @tradecanvas/core 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.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.