0.0.8 • Published 10 months ago

@lingxiteam/charts v0.0.8

Weekly downloads
-
License
-
Repository
github
Last release
10 months ago

@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

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago