
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
@tradecanvas/commons
Advanced tools
Shared types, utilities, constants, themes, i18n, and market presets 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
All TypeScript interfaces and types used across the library:
OHLCBar, DataSeries, TimeFrame -- data formatChartOptions, ChartType, FeaturesConfig -- chart configurationTheme, ThemeName -- themingIndicatorPlugin, IndicatorDescriptor, IndicatorConfig -- indicatorsDrawingToolType, DrawingState, DrawingStyle -- drawing toolsTradingPosition, TradingOrder, TradingConfig -- trading overlayDataAdapter, StreamConfig, ConnectionState -- real-time streamingChartEventType, ChartEvent -- eventsMarketConfig, TradingSession -- market configurationimport { DARK_THEME, LIGHT_THEME } from '@tradecanvas/commons'
19 customizable properties: background, text, candleUp, candleDown, grid, crosshair, volumeUp, volumeDown, and more.
MARKET_HOSE, MARKET_HNX, MARKET_UPCOM, MARKET_CRYPTO, MARKET_NYSEcomputePriceRange() -- compute visible price range from OHLC datatimeframeToMs() -- convert timeframe string to millisecondsformatNumber(), formatVND(), formatVolumeLoc() -- number formattingBuilt-in locales: English (en), Vietnamese (vi). Extensible via registerLocale().
If you need just the types or utilities without the full chart:
import type { OHLCBar, TimeFrame, ChartType } from '@tradecanvas/commons'
import { DARK_THEME, computePriceRange, timeframeToMs } from '@tradecanvas/commons'
FAQs
Shared types and utilities for @tradecanvas/chart
We found that @tradecanvas/commons 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
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.