![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
React
鲨鱼辣椒爱上蟑螂恶霸
这个作者很懒,什么都没留下…
展开
-
饼状图,图表使用已经封装好的Echarts-For-React。用饼图表示人员的抢红包结果,并且实现按钮事件,每次点击展示本次抢红包的分配结果。
import { Component } from 'react';import { Button } from 'antd';import ReactCharts from 'echarts-for-react';type AppProps = {};class Pie extends Component { constructor(props: AppProps) { super(props); //与render函数的onClick绑定,必须绑定,不然js找不到这两个函数.原创 2022-01-12 11:33:22 · 263 阅读 · 0 评论 -
React中用Echarts-For-React实现柱状图,每隔200ms实现增长一次
import React from "react";import EChartsReact from "echarts-for-react"; class bars extends React.Component{ state={data : [ {name: '猴子', value: 0,}, {name: '韩信',value: 0,}, {name: '李白',value: 0,}, { name: '娜可露露',.原创 2022-01-05 15:53:15 · 515 阅读 · 0 评论