常用,待续...

 

 tooltip自动轮播

echarts高级

 

echarts高级

 


 

 实现数据自动轮播

echarts高级

 

 原理:其实就是timeline,获取某几段(时间)的数据,然后隐藏timeline

echarts高级

 


   legend自动轮播

echarts高级

 

 echarts高级

 

 

 


 

 ♣ 左侧多字出省略号

echarts高级

formatter:  (item, index) =>{
     let icon = item.length > 5 ? item.substring(0, 5) + '...' : item;
}

 


 

 ♣ 自定义lengend

echarts高级

 利用rich

 echarts高级

echarts高级

 


 

 

echarts高级

// 所有数据最大值
let itemData = [784, 6854, 58, 365];
let maxValue = Math.max.apply(null, itemData);

 


 

 

 对象按某个字段降序

echarts高级

 

chartData.sort((a, b) => {
     return a.value - b.value
})

 


 

 给pie加复杂背景图

给pie加复杂背景图,并且浏览器resize不会变形

最简单最粗暴的方法,是给父div加背景图

echarts高级

.circle1 {
    background: url("~assets/images/pieBg2.png") 0 0 / 100% 100% no-repeat;
    background-size: contain;
    background-position: center;
}

  

 这篇文章,css处理方法也非常赞

http://zihua.li/2013/12/keep-height-relevant-to-width-using-css/

相关文章:

  • 2021-12-05
  • 2022-12-23
  • 2021-10-13
  • 2021-05-14
  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-01
  • 2021-08-27
  • 2021-12-05
  • 2021-09-07
  • 2022-12-23
  • 2021-07-10
  • 2021-06-06
相关资源
相似解决方案