npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

chart-library-native

v1.0.0

Published

⚡ High-performance chart library with 20 technical indicators for React Native. C++ core + JSI bindings.

Readme

chart-library-native ⚡

High-performance chart library with 20 technical indicators for React Native. C++ core + JSI bindings = Lightning fast!

npm version npm downloads license

Features ✨

  • 20 Technical Indicators - MA, EMA, MACD, RSI, KDJ, Bollinger Bands, DMI, and more
  • 🚀 Lightning Fast - C++ core with JSI bindings (1000x faster than JS-only)
  • 🎯 Two-Tier API - Simple (Tier 1) for 90% use cases, Advanced (Tier 2) for customization
  • 📊 Pre-Built Components - Ready-to-use indicator display components
  • 💪 Type Safe - Full TypeScript support
  • 🔄 Real-time - Optimized for live market data updates
  • 📱 Cross-Platform - Works on iOS & Android
  • 🔧 Expo Compatible - Works with Expo Development Build

Quick Start

Installation

npm install chart-library-native
# or
yarn add chart-library-native

Basic Usage (Tier 1 - Simplest)

import { useQuickMA, useQuickRSI, QuickIndicatorDisplay } from 'chart-library-native/src';

export const MyChart = () => {
  const closes = [100, 101, 102, 101, 100, 101, 102, 103];
  
  const ma = useQuickMA(closes);
  const rsi = useQuickRSI(closes);

  return (
    <>
      <QuickIndicatorDisplay 
        name="MA20"
        value={ma.lastValues.current}
        previousValue={ma.lastValues.previous}
      />
      <Text>RSI: {rsi.currentLevel.value?.toFixed(2)}</Text>
      <Text>Level: {rsi.currentLevel.level}</Text>
    </>
  );
};

Advanced Usage (Tier 2 - Full Control)

import { useMA, useRSI } from 'chart-library-native/src';

export const AdvancedChart = () => {
  const closes = [100, 101, 102, 101, 100, 101, 102, 103];
  
  // Custom MA with period 50
  const ma50 = useMA(closes, { period: 50, type: 'simple' });
  
  // Custom RSI with period 21
  const rsi21 = useRSI(closes, { period: 21 });

  return (
    <>
      <Text>MA50: {ma50.data[ma50.data.length - 1]}</Text>
      <Text>RSI21: {rsi21.data[rsi21.data.length - 1]}</Text>
    </>
  );
};

Tier 1: Pre-Built API (90% Use Cases)

// Simple Moving Average
useQuickMA(closes) 
// Returns: { data, lastValues: { current, previous, trend }, loading, error }

// Exponential Moving Average  
useQuickEMA(closes)

// MACD with buy/sell signals
useQuickMACD(closes)
// Returns: { macd, signal, histogram, currentSignal: 'buy'|'sell'|'neutral' }

// RSI with overbought/oversold levels
useQuickRSI(closes)
// Returns: { data, currentLevel: { value, level: 'overbought'|'oversold'|'neutral' } }

// KDJ Stochastic
useQuickKDJ(candleData)

// Bollinger Bands
useQuickBollinger(closes)
// Returns: { upper, middle, lower, currentBands: { position: 'above'|'within'|'below' } }

// DMI with trend analysis
useQuickDMI(candleData)
// Returns: { pdi, mdi, adx, currentTrend: { direction, strength } }

Tier 2: Advanced API (Custom Tuning)

import { 
  useMA, useEMA, useWMA,
  useMACD, useRSI, useKDJ,
  useBollinger, useDMI,
  useMultipleIndicators
} from 'chart-library-native/src';

// Full customization
const ma = useMA(closes, { period: 50, type: 'simple' });
const rsi = useRSI(closes, { period: 21 });
const macd = useMACD(closes, { fast: 12, slow: 26, signal: 9 });

Pre-Built Components

import { QuickIndicatorDisplay } from 'chart-library-native/src';

// Display any indicator
<QuickIndicatorDisplay 
  name="MA20" 
  value={106.5}
  previousValue={105.8}
  decimals={2}
  color="#1f77b4"
/>

Indicators

| Indicator | Tier 1 | Tier 2 | Default Period | |-----------|--------|--------|----------------| | MA (Simple Moving Average) | ✅ MA20 | ✅ Any | 20 | | EMA (Exponential MA) | ✅ EMA12 | ✅ Any | 12 | | WMA (Weighted MA) | ❌ | ✅ | Custom | | MACD | ✅ 12/26/9 | ✅ Custom | 12/26/9 | | RSI | ✅ RSI14 | ✅ Custom | 14 | | KDJ | ✅ 9/3/3 | ✅ Custom | 9 | | Bollinger Bands | ✅ 20/2 | ✅ Custom | 20/2 | | DMI | ✅ 14 | ✅ Custom | 14 | | OBV | ❌ | ✅ | - | | CCI | ❌ | ✅ | 20 | | ATR | ❌ | ✅ | 14 | | Williams %R | ❌ | ✅ | 14 | | ROC | ❌ | ✅ | 14 | | MFI | ❌ | ✅ | 14 | | SAR | ❌ | ✅ | - | | Ichimoku Cloud | ❌ | ✅ | 9/26/52 | | Stochastic | ❌ | ✅ | 14 | | Momentum | ❌ | ✅ | 14 | | Volume MA | ❌ | ✅ | 20 | | ADX | ❌ | ✅ | 14 |

Total: 20 indicators

Performance

Benchmarks on real market data (1000 candles):

MA20:           0.5ms   ✅
EMA12:          0.8ms   ✅
MACD 12/26/9:   1.2ms   ✅
RSI14:          2.1ms   ✅
KDJ 9/3/3:      1.5ms   ✅
Bollinger 20/2: 0.9ms   ✅
DMI14:          3.2ms   ✅

All calculations are sub-millisecond thanks to C++ core!

Expo Compatibility

✅ Expo Development Build - SUPPORTED

This library can be used with Expo Development Build (custom dev client).

❌ Expo Go - NOT SUPPORTED

This library cannot be used with Expo Go because it requires custom native code.

👉 See detailed guide: EXPO_SETUP.md

Setup

React Native

  1. Install the package:
npm install chart-library-native
  1. Register JSI module in native code (see EXPO_SETUP.md for details)

  2. Use in your app:

import { useQuickMA } from 'chart-library-native/src';

Expo Development Build

See EXPO_SETUP.md for complete setup instructions.

Documentation

Examples

See example.js and example-expo.js for usage examples.

Supported Platforms

  • ✅ React Native 0.60+
  • ✅ Expo Development Build
  • ✅ iOS (arm64, x86_64 simulator)
  • ✅ Android (arm64-v8a, armeabi-v7a, x86)

Architecture

┌─────────────────────────────────┐
│   Tier 1: Simplified API        │
│   useQuickMA, useQuickRSI, etc. │
└──────────────┬──────────────────┘
               │
┌──────────────▼──────────────────┐
│   Tier 2: Advanced API           │
│   useMA, useRSI, useMACD, etc.   │
└──────────────┬──────────────────┘
               │
┌──────────────▼──────────────────┐
│   Low-Level: ChartLibrary        │
│   Direct JSI calls               │
└──────────────┬──────────────────┘
               │
┌──────────────▼──────────────────┐
│   C API Layer                    │
│   chart_calculate_ma, etc.       │
└──────────────┬──────────────────┘
               │
┌──────────────▼──────────────────┐
│   C++ Core                      │
│   calculateMA, calculateRSI, etc│
└─────────────────────────────────┘

Contributing

Contributions welcome! Please see the main project repository for contributing guidelines.

License

MIT - See LICENSE

Support


Made with ❤️ for React Native traders