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

@duxapp/react-native-echarts

v0.1.0

Published

Apache ECharts wrapper for React Native built on top of @duxapp/react-native-canvas

Downloads

55

Readme

@duxapp/react-native-echarts

@duxapp/react-native-echarts 是一个基于 @duxapp/react-native-canvas 的 React Native Apache ECharts 封装。

安装

如果你的项目还没有安装 @shopify/react-native-skia,请先安装它:

yarn add @shopify/react-native-skia

npm install @shopify/react-native-skia

然后再安装 @duxapp/react-native-echarts

yarn add @duxapp/react-native-echarts

npm install @duxapp/react-native-echarts

需要安装的 peer dependencies:

  • react
  • react-native
  • @shopify/react-native-skia

使用

import { ScrollView, StyleSheet } from 'react-native';
import { Chart } from '@duxapp/react-native-echarts';

const options = {
  line: {
    xAxis: {
      type: 'category',
      data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
    },
    yAxis: {
      type: 'value',
    },
    series: [
      {
        data: [150, 230, 224, 218, 135, 147, 260],
        type: 'line',
      },
    ],
  },
  bar: {
    xAxis: {
      type: 'category',
      data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
    },
    yAxis: {
      type: 'value',
    },
    series: [
      {
        data: [120, 200, 150, 80, 70, 110, 130],
        type: 'bar',
      },
    ],
  },
  pie: {
    title: {
      text: 'Referer of a Website',
      subtext: 'Fake Data',
      left: 'center',
    },
    tooltip: {
      trigger: 'item',
    },
    legend: {
      orient: 'vertical',
      left: 'left',
    },
    series: [
      {
        name: 'Access From',
        type: 'pie',
        radius: '50%',
        data: [
          { value: 1048, name: 'Search Engine' },
          { value: 735, name: 'Direct' },
          { value: 580, name: 'Email' },
          { value: 484, name: 'Union Ads' },
          { value: 300, name: 'Video Ads' },
        ],
      },
    ],
  },
};

export default function Demo() {
  return (
    <ScrollView contentContainerStyle={styles.content}>
      <Chart
        style={styles.chart}
        option={options.line}
      />
    </ScrollView>
  );
}

const styles = StyleSheet.create({
  content: {
    padding: 20,
  },
  chart: {
    width: '100%',
    height: 320,
  },
});

说明

  • option 更新会直接透传到 chart.setOption(option, setOptionOptions)
  • 触摸事件会被转换成 zrender 事件,tooltip、点击高亮等交互可以继续工作。
  • 组件内部使用 echarts/dist/echarts.js 完整入口,避开 Expo/Metro 对 ECharts 按需 ESM 入口的兼容问题。