Incubator-echarts: echarts在itemStyle支持颜色的斜向渐变?

Created on 9 Oct 2017  ·  3Comments  ·  Source: apache/incubator-echarts

One-line summary [问题简述]

echarts在itemStyle支持颜色的斜向渐变?类似css中的background-image: linear-gradient( [ | ,]? [, ]+ )的angle

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:
    echarts v3.6.0
  • Browser version [浏览器类型和版本]:
    chrome 版本 61.0.3163.100(正式版本) (64 位)

  • OS Version [操作系统类型和版本]:
    windows10 家庭版

Expected behaviour [期望结果]

希望echarts团队能都帮我解决问题,或者给出解决方法或者替代方法

ECharts option [ECharts配置项]


option = {

}

Other comments [其他信息]


Most helpful comment

echarts.graphic.LinearGradient(0, 0, 0, 1, ....) 这里前四个参数是起始点和结束点的位置,如果要实现 135度的,就是 (0, 0, 1, 1)。效果如图所示:
2017-10-10 12 22 44

All 3 comments

你给我的示例还是一个上下的颜色渐变,并没有可以变换角度的渐变,类似CSS3中的 background-image:linear-gradient(135deg, red 100px, yellow 200px),他有一个135度的角度

echarts.graphic.LinearGradient(0, 0, 0, 1, ....) 这里前四个参数是起始点和结束点的位置,如果要实现 135度的,就是 (0, 0, 1, 1)。效果如图所示:
2017-10-10 12 22 44

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kirazxyun picture kirazxyun  ·  3Comments

akvaliya picture akvaliya  ·  3Comments

Zendic picture Zendic  ·  3Comments

antorman picture antorman  ·  3Comments

marine1ly picture marine1ly  ·  3Comments