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

卢松松网站模板wordpress插件+手机版

卢松松网站模板,wordpress插件+手机版,摄影网站网页设计,wordpress多个博客通过Echarts的echarts.graphic.extendShape实现真正的3D柱状图 思路就是通过调整顶部面(CubeTop)、左侧面(CubeLeft)、右侧面(CubeRight)来决定柱状图的宽窄 建议优先调整顶部面#xff0c;一般c1不需要动 // echarts-3D-bar-config.js import Vue from vue;cons…通过Echarts的echarts.graphic.extendShape实现真正的3D柱状图 思路就是通过调整顶部面(CubeTop)、左侧面(CubeLeft)、右侧面(CubeRight)来决定柱状图的宽窄 建议优先调整顶部面一般c1不需要动 // echarts-3D-bar-config.js import Vue from vue;const echarts Vue.prototype.echarts;const CubeLeft echarts.graphic.extendShape({shape: {x: 0,y: 0},buildPath: function (ctx, shape) {const xAxisPoint shape.xAxisPoint;// 顶部右侧顶点const c1 [shape.x, shape.y];// 顶部左侧顶点const c2 [shape.x - 15, shape.y - 8];// 底部左侧const c3 [xAxisPoint[0] - 15, xAxisPoint[1] - 8];// 底部右侧const c4 [xAxisPoint[0], xAxisPoint[1]];ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();} });const CubeRight echarts.graphic.extendShape({shape: {x: 0,y: 0},buildPath: function (ctx, shape) {const xAxisPoint shape.xAxisPoint;// 顶部左侧顶点const c1 [shape.x, shape.y];// 底部左侧顶点const c2 [xAxisPoint[0], xAxisPoint[1]];// 底部右侧顶点const c3 [xAxisPoint[0] 15, xAxisPoint[1] - 8];// 顶部右侧顶点const c4 [shape.x 15, shape.y - 8];ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();} });const CubeTop echarts.graphic.extendShape({shape: {x: 0,y: 0},buildPath: function (ctx, shape) {// 底部顶点const c1 [shape.x, shape.y];// 右侧顶点const c2 [shape.x 15, shape.y - 8];// 顶部顶点const c3 [shape.x, shape.y - 15];// 右侧顶点const c4 [shape.x - 15, shape.y - 8];ctx.moveTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).lineTo(c4[0], c4[1]).closePath();} }); echarts.graphic.registerShape(CubeLeft, CubeLeft); echarts.graphic.registerShape(CubeRight, CubeRight); echarts.graphic.registerShape(CubeTop, CubeTop);然后在build-bar-option中引用即可 这里主要就是把series中的内容复制过来直接用就行了 import Vue from vue; import ./echarts-3D-Bar-configconst echarts Vue.prototype.echarts;export function buildBarOption(vm, xData [], seriesData [], originData []) {const option {xAxis: {type: category,axisLabel: {color: #fff,rotate: 45,fontSize: 10},axisTick: {show: false},axisLine: {show: true,lineStyle: {color: rgb(53, 179, 229),width: 2}},data: xData},tooltip: {trigger: item,axisPointer: {type: shadow,label: {show: true}},backgroundColor: transparent,padding: 0,formatter: function (params) {// console.log(params)return div stylepadding: 15px; background: linear-gradient(180.00deg, rgb(3, 36, 76),rgb(19, 36, 127) 100%)ptest/p /div;}},grid: {left: 15,bottom: 10,right: 10,top: 40,containLabel: true},yAxis: {type: value,axisLabel: {color: #fff},splitLine: {show: true,lineStyle: {type: dotted,color: rgb(53, 179, 229)}}},series: [{type: custom,renderItem: (params, api) {const location api.coord([api.value(0), api.value(1)]);return {type: group,children: [{type: CubeLeft,shape: {api,xValue: api.value(0),yValue: api.value(1),x: location[0],y: location[1],xAxisPoint: api.coord([api.value(0), 0])},style: {fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: #3B80E2},{offset: 1,color: #49BEE5}])}},{type: CubeRight,shape: {api,xValue: api.value(0),yValue: api.value(1),x: location[0],y: location[1],xAxisPoint: api.coord([api.value(0), 0])},style: {fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: #3B80E2},{offset: 1,color: #49BEE5}])}},{type: CubeTop,shape: {api,xValue: api.value(0),yValue: api.value(1),x: location[0],y: location[1],xAxisPoint: api.coord([api.value(0), 0])},style: {fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: #3B80E2},{offset: 1,color: #49BEE5}])}}]};},data: seriesData},{data: seriesData,type: bar,barWidth: 13,itemStyle: {color: transparent}}]};return option; }
http://www.hkea.cn/news/14361379/

相关文章:

  • 高效网站建设公司凡科互动小游戏辅助
  • 国内做的好的电商网站有哪些良品铺子的网站建设目标
  • 优秀网站设计wordpress七牛云图床
  • 哪里有网站制作京东网站建设步骤
  • 域名及网站建设实验报告建立品牌网站的
  • 背景 网站建设嵌入式培训总结
  • 广西建设网站培训wordpress添加留言板
  • 西安网站快速排名提升五种新型营销方式
  • 大连建设网站制作菏泽网站建设公司
  • 房产信息查询系统官方网站在58做网站推广有效果吗
  • 天津百度搜索网站排名榆次住房保障和城乡建设局网站
  • 网站seo诊断分析招标网站平台
  • 招标网站平台网页设计师要求什么专业
  • 网站排名 优帮云酷家乐软件下载电脑版
  • 中国城市建设官方网站学产品设计专业后悔了
  • 单页营销型网站模板下载珠海公司网站制作
  • 哪些网站专做新闻阳泉推广型网站开发
  • 种子网站模板本地网站搭建
  • 常州本地招聘网站前端培训的机构
  • 建宁建设局网站打开百度网页版
  • 江苏兴力建设集团有限公司网站北京正邦设计
  • 长沙seo网站建设袁飞最好不同类型网站比较及网站域名设计
  • 自建网站餐饮服务提供者应在通信主管部门备案后福州微信网站建设
  • php个人网站源码带音乐做网站找模版好吗
  • 上海免费模板建站网站的回到顶部怎么做
  • 珠海品牌网站建网络架构方案规划设计和实施
  • 国外炫酷网站欣赏关于集团网站建设的
  • 建设银行广州招聘网站关键词歌词图片
  • 为网站网站做代理怎么判织梦模板首页修改
  • 程序员网站安卓程序开发