Socket
Book a DemoInstallSign in
Socket

@twp0217/react-echarts

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twp0217/react-echarts

Apache ECharts component for React

latest
Source
npmnpm
Version
5.2.3
Version published
Maintainers
1
Created
Source

react-echarts

Apache ECharts component for React(基于 React 的 Apache ECharts 组件)

安装

npm install echarts @twp0217/react-echarts --save

使用

import React from 'react';
import ECharts, { EChartsOption } from '@twp0217/react-echarts';

export default () => {
  const option: EChartsOption = {
    title: {
      text: 'ECharts 入门示例',
    },
    tooltip: {},
    legend: {
      data: ['销量'],
    },
    xAxis: {
      data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子'],
    },
    yAxis: {},
    series: [
      {
        name: '销量',
        type: 'bar',
        data: [5, 20, 36, 10, 10, 20],
      },
    ],
  };

  return <ECharts option={option} />;
};

API

EChartsProps

参考EChartsCoreProps,差异 API 如下:

名称说明类型默认值
echartsecharts 模块ECharts-

支持

  • 如果项目对你有帮助,请点颗星星:star:,谢谢。
  • 如果你对项目有想法、问题、BUG,欢迎讨论。

Keywords

react

FAQs

Package last updated on 03 Aug 2022

Did you know?

Socket

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.

Install

Related posts