首页 > 其他 > 详细

v-chart 渐变色

时间:2020-05-28 22:05:58      阅读:382      评论:0      收藏:0      [点我收藏+]
<ve-line
      :colors="colors"
      :data="chartData"
      :settings="chartSettings"
      :data-zoom="dataZoom"
    ></ve-line>
 
import echarts from ‘echarts‘
 
this.colors = [
      new echarts.graphic.LinearGradient(
          0,0,0,1,[{
          offset: 0, color: ‘rgba(65,95,255,1)‘
        },{
          offset: 1, color: ‘rgba(65,95,255,0)‘
        }]),
        new echarts.graphic.LinearGradient(
          0,0,0,1,[{
          offset: 0, color: ‘rgba(234,79,63,1)‘
        },{
          offset: 1, color: ‘rgba(234,79,63, 0)‘
        }]),
        new echarts.graphic.LinearGradient(
          0,0,0,1,[{
          offset: 0, color: ‘rgba(49,209,136,1)‘
        },{
          offset: 1, color: ‘rgba(49,209,136,0)‘
        }]),
        new echarts.graphic.LinearGradient(
          0,0,0,1,[{
          offset: 0, color: ‘rgba(255,149,54,1)‘
        },{
          offset: 1, color: ‘rgba(255,149,54,0)‘
        }]),
        new echarts.graphic.LinearGradient(
          0,0,0,1,[{
          offset: 0, color: ‘rgba(176,214,221,1)‘
        },{
          offset: 1, color: ‘rgba(176,214,221,0)‘
        }]),
        new echarts.graphic.LinearGradient(
          0,0,0,1,[{
          offset: 0, color: ‘rgba(248,231,28,1)‘
        },{
          offset: 1, color: ‘rgba(248,231,28,0)‘
        }]
      )
    ]

v-chart 渐变色

原文:https://www.cnblogs.com/MJmajong/p/12983522.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!