@lingxiteam/charts
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

@lingxiteam/charts

基于 @alitajs/f2 封装的图表组件。帮助你快速的在移动端项目中构建图表。

不支持自定义,只支持展示的几种用法,如果你需要自定义的组件,可以使用 @alitajs/f2 进行自定义。

用法

常规用法

import React, { useState } from 'react';
import { Donut } from '@lingxiteam/charts';

const ChartDemo = () => {
  const data = [
    {
      name: '余额',
      percent: 2423.0,
    },
    {
      name: '理财产品',
      percent: 423.0,
    },
    {
      name: '黄金',
      percent: 1223.0,
    },
    {
      name: '余额宝',
      percent: 1423.0,
    },
  ];
  return (
    <>
      <Donut
        data={data}
        title="卡片标题"
        type="table1"
        x="name"
        y="percent"
        sumText="5782.70"
        sumTitle="总资产"
      />
    </>
  );
};

export default ChartDemo;

image

Dependencies (6)

Dev Dependencies (13)

Package Sidebar

Install

npm i @lingxiteam/charts

Weekly Downloads

1

Version

0.0.8

License

none

Unpacked Size

279 kB

Total Files

138

Last publish

Collaborators

  • brinkr
  • mishi-brother
  • babelczx
  • yaozanwen
  • duan_duan
  • wanerrr
  • goulili
  • diyc
  • cenxiaolian
  • taiyangteng
  • pengyh
  • xiaohuoni
  • wujian666
  • limanpm
  • zhang.guoyong
  • zzzzjq
  • hammersjs