![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
echarts
狗蛋今天睡醒了吗
前端开发工程师
主要使用react
展开
-
echarts 柱状图添加背景色/阴影色(react)
barGap : ‘-100%’就是一组颜色浅的数据同时使用tooltip问题跳转echarts tooltip和barGap同时使用series: [ { type: 'bar', color: 'rgba(240, 246, 253, 0.6)', barWidth: 32, barGap: '-100%', // Make series be overlap data: seriesData.map(() .原创 2020-12-04 11:53:40 · 5738 阅读 · 0 评论 -
echarts tooltip和barGap同时使用
因为barGap的原理就是造了一组假数据当背景,所以会默认展示优先的数据这里有一个坑就是背景的数据给多少合适,根据需要自行封装最高值关键代码 ⬇️const option = { tooltip: { trigger: 'axis', formatter: params => { return `<span style='font-size: 1rem'>${params[1].name}:${params[1].value}&原创 2020-12-04 11:40:23 · 3669 阅读 · 0 评论 -
echarts点击选中操作(react)
最近的一个需求,做出来之后觉得很简单的一个操作,分享出来需求是这样的:echarts的柱状图,点击可以选中变色,最多可以选中五个柱子,五个柱子五个颜色,不能重复。先看个效果:然后上代码:import React, { Component } from 'react';import * as echarts from 'echarts';import ReactEcharts from 'echarts-for-react';import styles from '../details.les原创 2020-07-07 14:43:34 · 3056 阅读 · 0 评论