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

vue做的网站多么一个工厂做网站有用吗

vue做的网站多么,一个工厂做网站有用吗,网站架构方案,常熟网页设计报价如果可以实现记得点赞分享#xff0c;谢谢老铁#xff5e; 1.需求描述 根据业务需求将不同的法律法规#xff0c;展示不同的3d立体渐变柱状图。 2.先看下效果图 3. 确定三面的颜色#xff0c;这里我是自定义的颜色 // 右面生成颜色const rightColorArr ref([#79D…如果可以实现记得点赞分享谢谢老铁 1.需求描述 根据业务需求将不同的法律法规展示不同的3d立体渐变柱状图。 2.先看下效果图 3. 确定三面的颜色这里我是自定义的颜色 // 右面生成颜色const rightColorArr ref([#79DED1,...]);// 左面生成颜色const leftColorArr ref([#67C3B7, ...]);// 顶部生成颜色const topColorArr ref([#ADF4EB,...]); 4.然后绘画三个面对应的函数且注册 // 绘制左侧面const CubeLeft echarts.graphic.extendShape({});// 绘制右侧面const CubeRight echarts.graphic.extendShape({});// 绘制顶面const CubeTop echarts.graphic.extendShape({});// 注册三个面图形echarts.graphic.registerShape(CubeLeft, CubeLeft);echarts.graphic.registerShape(CubeRight, CubeRight);echarts.graphic.registerShape(CubeTop, CubeTop);5.重点在renderItem 自定义渲染函数上 series: [{type: custom,renderItem: (params, api) {let cubeLeftStyle: any ;let cubeRightStyle: any ;let cubeTopStyle: any ;cubeLeftStyle new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: leftColorArr.value[params.dataIndex],},{offset: 1,color: leftColorArr.value[params.dataIndex],},]);cubeRightStyle new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: rightColorArr.value[params.dataIndex],},{offset: 1,color: rightColorArr.value[params.dataIndex],},]);cubeTopStyle new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: topColorArr.value[params.dataIndex],},{offset: 1,color: topColorArr.value[params.dataIndex],},]);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), -80]),},style: {fill: cubeLeftStyle,},},{type: CubeRight,shape: {api,xValue: api.value(0),yValue: api.value(1),x: location[0],y: location[1],xAxisPoint: api.coord([api.value(0), -80]),},style: {fill: cubeRightStyle,},},{type: CubeTop,shape: {api,xValue: api.value(0),yValue: api.value(1),x: location[0],y: location[1],xAxisPoint: api.coord([api.value(0), -50]),},style: {fill: cubeTopStyle,},},],};},data: valList.value,},],5.最后看全文吧这个是vue3 的文件 templatediv classtopCondiv classtagList leftdiv classitem v-for(item, index) in nameList :keyindexa-tag :colorrightColorArr[index] classtagTOP {{ index 1 }}/a-tagspan{{ item }}/span/div/divdiv classright idAnalysisLegalTopBar styleheight: 400px/div/div /template script langts import { onMounted, toRefs, ref, watch } from vue; import * as echarts from echarts; type EChartsOption echarts.EChartsOption; export default {props: {data: Array,},setup(props) {const { data } toRefsany(props);const myChart refany(null);let valList refany([]);let nameList refany([]);// 右面生成颜色const rightColorArr ref([#79DED1,#75D5AF,#7FD991,#78BF9D,#95D3C9,#84B5D3,#7794C1,#828AD0,#7573D1,#8057D1,]);// 左面生成颜色const leftColorArr ref([#67C3B7,#68C39F,#68C27A,#65AD8A,#7BB8AE,#76A6C3,#6789BC,#737ABE,#5A58BC,#7349C6,]);// 顶部生成颜色const topColorArr ref([#ADF4EB,#9BEBCC,#9DE6AB,#98DEBD,#A1E5DA,#9DC5DE,#8CACDD,#B0B5E6,#7F7DD0,#8057D1,]);// 绘制左侧面const CubeLeft echarts.graphic.extendShape({shape: {x: 0,y: 0,},buildPath: function (ctx: any, shape) {// 会canvas的应该都能看得懂shape是从custom传入的const xAxisPoint shape.xAxisPoint;const c0 [shape.x 7, shape.y];const c1 [shape.x - 23, shape.y - 6];const c2 [xAxisPoint[0] - 23, xAxisPoint[1] - 13];const c3 [xAxisPoint[0] 7, xAxisPoint[1]];ctx.moveTo(c0[0], c0[1]).lineTo(c1[0], c1[1]).lineTo(c2[0], c2[1]).lineTo(c3[0], c3[1]).closePath();},});// 绘制右侧面const CubeRight echarts.graphic.extendShape({shape: {x: 0,y: 0,},buildPath: function (ctx: any, shape) {const xAxisPoint shape.xAxisPoint;const c1 [shape.x 7, shape.y];const c2 [xAxisPoint[0] 7, xAxisPoint[1]];const c3 [xAxisPoint[0] 25, xAxisPoint[1] - 15];const c4 [shape.x 25, shape.y - 15];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: any, shape) {const c1 [shape.x 7, shape.y];const c2 [shape.x 25, shape.y - 15]; //右点const c3 [shape.x - 5, shape.y - 20];const c4 [shape.x - 23, shape.y - 6];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);const getOption () {return {backgroundColor: transparent,title: {// text: 单位个,textStyle: {color: #79DED1,fontWeight: 800,fontSize: 16,},left: 18px,top: 1%,},tooltip: {trigger: axis,axisPointer: {type: shadow,},formatter: function (params, ticket, callback) {const item params[1];return item.name : item.value;},},grid: {top: 12%,bottom: 3%,left: left,containLabel: true,},xAxis: {type: category,show: false,data: nameList.value,axisLine: {show: true,lineStyle: {color: #7ebaf2,},},axisTick: {show: false,length: 9,alignWithLabel: true,lineStyle: {color: #7DFFFD,},},axisLabel: {fontSize: 12,},},yAxis: {type: value,show: false,min: 0,axisLine: {show: true,lineStyle: {color: #7ebaf2,},},splitLine: {show: false,},splitArea: {show: true,areaStyle: {color: [rgba(26,50,83,1), rgba(30,57,92,1)],},},axisTick: {show: false,},axisLabel: {fontSize: 12,},boundaryGap: [20%, 20%],},series: [{type: custom,renderItem: (params, api) {let cubeLeftStyle: any ;let cubeRightStyle: any ;let cubeTopStyle: any ;cubeLeftStyle new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: leftColorArr.value[params.dataIndex],},{offset: 1,color: leftColorArr.value[params.dataIndex],},]);cubeRightStyle new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: rightColorArr.value[params.dataIndex],},{offset: 1,color: rightColorArr.value[params.dataIndex],},]);cubeTopStyle new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: topColorArr.value[params.dataIndex],},{offset: 1,color: topColorArr.value[params.dataIndex],},]);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), -80]),},style: {fill: cubeLeftStyle,},},{type: CubeRight,shape: {api,xValue: api.value(0),yValue: api.value(1),x: location[0],y: location[1],xAxisPoint: api.coord([api.value(0), -80]),},style: {fill: cubeRightStyle,},},{type: CubeTop,shape: {api,xValue: api.value(0),yValue: api.value(1),x: location[0],y: location[1],xAxisPoint: api.coord([api.value(0), -50]),},style: {fill: cubeTopStyle,},},],};},data: valList.value,},{type: bar,label: {normal: {show: true,position: top,fontSize: 16,color: #6C6C6C,offset: [2, -25],},},itemStyle: {color: transparent,},tooltip: {},data: valList.value,},],};};watch(() data.value,(list) {let option_bar: any getOption();list.forEach((item, index) {nameList.value.push(item.name);valList.value.push(item.value);});option_bar myChart.value.setOption(option_bar);});onMounted(() {// 基于准备好的dom初始化echarts实例var chartDom: any document.getElementById(AnalysisLegalTopBar);myChart.value echarts.init(chartDom);window.addEventListener(resize, () {myChart.value.resize();});});return {nameList,rightColorArr,};}, }; /script style langless scoped .topCon {display: flex;justify-content: center;align-items: center;.left {width: 30%;.item {display: flex;align-items: center;}}.right {width: 70%;}.tagList {.tag {width: 46px;height: 23px;border-radius: 4px;font-size: 10px;font-weight: 500;line-height: 20px;margin: 4px 0px;margin-right: 10px;color: #fff;background: rgba(121, 222, 209, 0.39);display: flex;justify-content: center;align-items: center;}} } /style 收工谢谢老铁们的点赞收藏~
http://www.yutouwan.com/news/244599/

相关文章:

  • 北京的电商平台网站wordpress哪个模版好用
  • 中国城乡住房和城乡建设部网站首页北京做网站推广兼职
  • 常州知名网站河北邯郸市简介
  • 青岛黄岛区网站开发网站上线 备案
  • 建设京东类的网站需要什么流程苏州市工程造价信息网
  • 新农村基础设施建设网站网站整站下载
  • 网站在哪备案无锡电商网站设计
  • 网站服务器的搭建建设企业网站得花多少
  • 微信定制开发小程序wordpress 百度优化 插件
  • 有关外贸的网站有哪些内容江西省寻乌县建设局网站
  • 做仿牌网站被封泾川县住房和城乡建设局网站
  • 网站首页设计代码做个人网站怎么赚钱
  • 品牌商标购买网站网站demo制作工具
  • 什么样的网站适合搜索引擎收录wordpress noindex
  • 外贸五金网站开网店需要准备什么资料
  • 国外网站为啥速度慢中关村手机报价大全
  • 个人建网站wordpress自动获取标签
  • 帝国网站管理 上一条 下一条 链接 信息id 信息发布时间国外做的好点电商网站
  • 长沙网站优化排名推广中国科技
  • 临沂谁会做网站淘客网站做单品类
  • 企业网站建设哪家好wordpress图片上添加图标
  • 莞城网站建设公司专业外贸公司网站
  • 怎么区分模板网站visualstudio网页设计作业
  • 新乡专业做网站多少钱wordpress cdn
  • 织梦系统做的网站怎么样wordpress上传功能
  • 网站开发视频播放好做吗网页设计实训报告范文免费
  • 广东省建设合同备案网站惠州网站建设行业
  • 自助免费建网站国内ui设计培训
  • 菏泽网站建设公司有哪些网站开发和软件开发有什么区别
  • 常用网站域名如何做好网站建设内容的策划