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

拍卖网站建设公司竞拍网站模板

拍卖网站建设公司,竞拍网站模板,承德教育信息网官网,东莞网约车申请平台通过Echarts的echarts.graphic.extendShape实现真正的3D柱状图 思路就是通过调整顶部面(CubeTop)、左侧面(CubeLeft)、右侧面(CubeRight)来决定柱状图的宽窄 建议优先调整顶部面,一般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-config"const 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 style="padding: 15px; background: linear-gradient(180.00deg, rgb(3, 36, 76),rgb(19, 36, 127) 100%)"><p>test</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.yayakq.cn/news/163571/

相关文章:

  • 网站飘落怎么做网站建设风格有哪些
  • 浅谈电子商务网站建设与管理论文帝国cms 商城网站视频教程
  • 菜鸟移动端网站开发最便宜的钱
  • 网站建设申请空间重庆做网站设计
  • 建设交流网站提高工作效率总结心得
  • 工商局网站实名认证怎么做深圳网站建设seo
  • 怎么开发游戏软件谷歌seo好做吗
  • 千灯网站建设百度seo收录
  • 龙武工会网站怎么做档案信息网站建设的意义
  • 个人网站-个人主页作业如何查看网站建设的时间
  • 怎么在百度做网站微芒网站建设
  • 网站建设哪里接活南通优化网站公司
  • 家具网站开发设计论文四川整站优化关键词排名
  • 平阴网站建设费用房产网 最新楼盘价格
  • 上城区建设局网站微信小程序商城源代码
  • 嘉兴网站制作费用今天热搜前十名
  • 成都网站建设联系方式丹东市市政建设总公司
  • 海洋网站建设公司wordpress轻量级插件
  • 长沙产品网站建设网站一般用什么免费字体
  • 住房和城乡建设部网站园林一级中国建设会计协会网站
  • 网站做接口排线方法企业 cms
  • 如何建立自己网站平台wordpress 企业站教程
  • 专业低价建设微网站微商城怎么样女生就业前景最好的十大热门专业
  • 做外贸的网站域名怎么买中国核工业第五建设有限公司是国企吗
  • 做网站运营有前途么大气企业网站织梦模板
  • 做蛋糕比较火的网站如何做网站安全加固
  • 网站修改器南京手机网站设计
  • 企业网站建设对网络营销的影响主要表现在( )一键网页转app生成器
  • 网站建设与管理心得体会和总结wordpress提示插件安装插件
  • 无锡网站优化wordpress 使用ajax