当前位置: 首页 > news >正文

渐变色x轴换行柱状图

  // 系统上云率const optionBar = {title: {text: '系统上云率',left: 'left',textStyle: {color: "#fff",fontSize: 14,fontWeight: 650,align: "center",},},color: ['#32C5FF', '#00F766', '#EECB5F'],grid: {top: 40,bottom: 0,},legend: {  // 控制图例组件show: false},xAxis: {show: true,// 类目轴type: "category",data: ['上云,业务系统', '未完全,上云业务系统', '未上云,业务系统'],axisTick: {show: false //隐藏X轴刻度},splitLine: {show: true,lineStyle: {color: ['#20579E'],width: 1,type: 'solid'},},axisLine: {lineStyle: {color: "#20579E"}},axisLabel: {interval: 0,color: "#fff",formatter: function (value, index) {console.log(`${value.split(",")[0]}\n${+ value.split(",")[1]}`);//   return "{b|" + value.split(",")[0] + "}\n{b|" + value.split(",")[1] + "}";return `${value.split(",")[0]}\n${value.split(",")[1]?value.split(",")[1]:""}`},},},yAxis: {type: 'value',splitLine: {show: true,lineStyle: {color: ['#20579E'], //y轴线的颜色width: 1,type: 'solid'},},axisLabel: {color: '#fff',// y轴字体颜色formatter: '{value} %'},},tooltip: {trigger: 'axis',axisPointer: {type: 'shadow',shadowStyle: {color: new echarts.graphic.LinearGradient(0, 0, 0, 1,[{ offset: 0, color: 'rgba(255, 255, 255, 0)' },{ offset: 1, color: 'rgba(37, 107, 230, 0.18)' }]),}},backgroundColor: 'rgba(50,50,50,0)', // tooltip默认背景为白色,手动置为透明borderWidth: 0,formatter: function (params) {let html = '';html += `<div style="color: #fff;font-size: 16px;height: 125px;padding: 16px;background: linear-gradient(180deg, rgba(37,108,233,0.44) 0%, rgba(23,80,169,0.1) 22%, rgba(20,64,137,0) 46%, rgba(16,51,111,0.28) 77%, rgba(30,101,213,0.4) 100%);border-radius: 2px;border: 1px solid;border-image: radial-gradient(circle, rgba(111, 185, 242, 0.86), rgba(0, 0, 0, 0.2)) 1 1;backdrop-filter: blur(10px);"><div><div style="margin-bottom: 16px">${params[0].name.replace(',', '')}</div><div style="margin-bottom: 12px"><span style="display:inline-block;margin-right:4px;border:1px solid #fff;border-radius:10px;width:10px;height:10px;background-color:#0CC8E6;"></span><span style="font-size: 14px;">${params[0].seriesName}</span><span style="margin-left: 16px;color: #0CC8E6;">${params[0].value}</span></div><div><span style="display:inline-block;margin-right:4px;border:1px solid #fff;border-radius:10px;width:10px;height:10px;background-color:#08BA57;"></span><span style="font-size: 14px;">${params[1].seriesName}</span><span style="margin-left: 16px;color: #08BA57;font-weight: bold;">${params[1].value}</span></div></div></div>`;return html},},};const dataBar = {seriesData: [{name: "系统占比",//    barCategoryGap: '50%', barWidth: 15,data: [{value: 5,itemStyle: {// color: '#37D8FF',color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#D9FFE5" },{ offset: 1, color: "#6BFF9B" }])}},{value: 20,itemStyle: {color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#64DAFF" },{ offset: 1, color: "#1476DE" }])}},{value: 36,itemStyle: {color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#FFD097" },{ offset: 1, color: "#FF910C" }])}}]},{name: "系统数量",barWidth: 15,// barCategoryGap: '50%', data: [{value: 5,itemStyle: {show: false,color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#D9FFE5" },{ offset: 1, color: "#6BFF9B" }])}},{value: 20,itemStyle: {show: false,color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#64DAFF" },{ offset: 1, color: "#1476DE" }])// color: '#00F766'}},{value: 36,itemStyle: {color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: "#FFD097" },{ offset: 1, color: "#FF910C" }])}}]}]}

http://www.lryc.cn/news/328580.html

相关文章:

  • 源支付V7开源版2.99,修复各种提示错误
  • Mysql中的那些锁
  • 如何在Linux系统部署ONLYOFFICE协作办公利器并实现多人实时编辑文档
  • Linux部署Sonarqube+Gogs+Jenkins(一)
  • 程序员开发技术整理(持续整理中)
  • Java并查集详解(附Leetcode 547.省份数量讲解)
  • 【MySQL】DQL-基础查询-语句&演示(查询多个字段 / 所有字段/并设置别名/去重)
  • 更新一条SQL的执行流程
  • 深入理解nginx mp4流媒体模块[上]
  • Go 之 Gin 框架
  • vue3+threejs新手从零开发卡牌游戏(二十一):添加战斗与生命值关联逻辑
  • Linux内核err.h文件分析
  • Qt 富文本处理 (字体颜色大小加粗等)
  • 消息队列的七种经典应用场景
  • uniapp 微信小程序 canvas 手写板文字重复倾斜水印
  • JavaScript如何制作轮播图
  • 【面试经典150 | 动态规划】零钱兑换
  • 什么是防火墙,部署防火墙有什么好处?
  • 学习鸿蒙基础(10)
  • 阿里云对象存储OSS入门
  • [幻灯片]软件需求设计方法学全程实例剖析-03-业务用例图和业务序列图
  • ctfshow-web入门-xxe
  • Docker数据卷挂载
  • QT_day4:对话框
  • 矢量数据库:连接人工智能应用程序的数据复杂性与可用性的桥梁
  • docker:can’t create unix socket /var/run/docker.sock: is a directory
  • Qt 图形视图 /图形视图框架坐标系统的设计理念和使用方法
  • 视频号小店类目资质如何申请?新手看一遍就懂了!
  • 整合SpringSecurity+JWT实现登录认证
  • C# Onnx Yolov9 Detect 物体检测