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

网站利用e4a做app百度云盘

网站利用e4a做app,百度云盘,武汉企业网站优化,网站建设行业资讯柱状图扩展 一、前言二、思路1、新增面①、在drawShape方法中,新增一个实际左侧面,②、 在drawShape方法中,新增一个实际右侧面,③ 绘制 2、新增series对象① 添加实际值的左侧面和右侧面 三、效果图 一、前言 事情是这样子的&am…

柱状图扩展

  • 一、前言
  • 二、思路
    • 1、新增面
      • ①、在drawShape方法中,新增一个实际左侧面,
      • ②、 在drawShape方法中,新增一个实际右侧面,
      • ③ 绘制
    • 2、新增series对象
      • ① 添加实际值的左侧面和右侧面
  • 三、效果图

一、前言

事情是这样子的,收到一个粉丝的评论,说想做一个这样的立体柱状图,我没有写过,但是我大概知道了一个思路,然后给粉丝回复以后就开始尝试了,
在这里插入图片描述

二、思路

这图我的想法是在原本的柱状图上在加两个面,关于如何绘制柱状图的,请看我的另一篇文章,链接如下:03-echarts如何画立体柱状图
说干就干,

1、新增面

①、在drawShape方法中,新增一个实际左侧面,

  const trueLeft = echarts.graphic.extendShape({buildPath (ctx, shape) {const { topBasicsYAxis, bottomYAxis, basicsXAxis } = shape;// 侧面宽度const WIDTH = 15;// 斜角高度const OBLIQUE_ANGLE_HEIGHT = 3.6;const p1 = [basicsXAxis - WIDTH, topBasicsYAxis - OBLIQUE_ANGLE_HEIGHT];const p2 = [basicsXAxis - WIDTH, bottomYAxis];const p3 = [basicsXAxis, bottomYAxis];const p4 = [basicsXAxis, topBasicsYAxis- OBLIQUE_ANGLE_HEIGHT];ctx.moveTo(p1[0], p1[1]);ctx.lineTo(p2[0], p2[1]);ctx.lineTo(p3[0], p3[1]);ctx.lineTo(p4[0], p4[1]);console.log('ctx---',ctx)},});

关于P1,P2,P3,P4的位置在我的柱状图文章中也有仔细描述,就不细讲了,根据效果图可以知道,P1和P4的位置是水平的,所以Y轴是一致的,将原先的leftShape变量复制过来,更改一下P4的y轴定义,

②、 在drawShape方法中,新增一个实际右侧面,

 const trueRight = echarts.graphic.extendShape({buildPath (ctx, shape) {const { topBasicsYAxis, bottomYAxis, basicsXAxis } = shape;// 侧面宽度const WIDTH = 15;// 斜角高度const OBLIQUE_ANGLE_HEIGHT = 3.6;const p1 = [basicsXAxis, topBasicsYAxis - OBLIQUE_ANGLE_HEIGHT];const p2 = [basicsXAxis, bottomYAxis];const p3 = [basicsXAxis + WIDTH, bottomYAxis];const p4 = [basicsXAxis + WIDTH, topBasicsYAxis - OBLIQUE_ANGLE_HEIGHT];ctx.moveTo(p1[0], p1[1]);ctx.lineTo(p2[0], p2[1]);ctx.lineTo(p3[0], p3[1]);ctx.lineTo(p4[0], p4[1]);},});

由效果图可知,P1和P4的y轴依旧是一致的,所以将rightShape变量复制过来,更改P1的y轴定义,

③ 绘制

      echarts.graphic.registerShape("trueLeft", trueLeft);echarts.graphic.registerShape("trueRight", trueRight);

2、新增series对象

① 添加实际值的左侧面和右侧面

series的新对象中只有实际的两个面,所以可以直接将series的第一个对象复制过来,然后在return中的children中只留下两个对象,然后更改type名字分别为trueLeft和trueRight,我更改了一下柱子的颜色,具体情况可以根据自己所需的颜色来更改

 {type: "custom",data: [50],barWidth: 30,renderItem (params, api) {// 基础坐标const basicsCoord = api.coord([api.value(0), api.value(1)]);// 顶部基础 y 轴const topBasicsYAxis = basicsCoord[1];// 基础 x 轴const basicsXAxis = basicsCoord[0];// 底部 y 轴const bottomYAxis = api.coord([api.value(0), 0])[1];return {type: "group",children: [{type: "trueLeft",shape: {topBasicsYAxis,basicsXAxis,bottomYAxis,},style: {fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: 'rgb(0, 192, 238,0.8)',},{offset: 0.8,color: 'rgb(0, 194, 239,0.2)',},{offset: 1,color: 'rgb(0, 194, 239,0)',},]),emphasis: {fill: 'yellow', // 鼠标高亮时的填充颜色},},},{type: "trueRight",shape: {topBasicsYAxis,basicsXAxis,bottomYAxis,},style: {fill: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{offset: 0,color: '#00CCF5 ',},{offset: 0.8,color: 'rgb(4, 88, 115,0.8)',},{offset: 1,color: 'rgb(4, 88, 115,0.6)',},]),emphasis: {fill: 'yellow', // 鼠标高亮时的填充颜色},},},],};}},

三、效果图

具体的颜色什么的自己可以调整,每个children对象里面的style就是用来调整
在这里插入图片描述


文章转载自:
http://dinncoolefin.ydfr.cn
http://dinncobothie.ydfr.cn
http://dinncoazilian.ydfr.cn
http://dinncoopenhanded.ydfr.cn
http://dinncosacrificial.ydfr.cn
http://dinncotaroc.ydfr.cn
http://dinncocolleging.ydfr.cn
http://dinncochloramine.ydfr.cn
http://dinncowayahead.ydfr.cn
http://dinncoheaded.ydfr.cn
http://dinncopealike.ydfr.cn
http://dinncosubphylum.ydfr.cn
http://dinncodenaturalization.ydfr.cn
http://dinncoprincox.ydfr.cn
http://dinncolabour.ydfr.cn
http://dinncoantemortem.ydfr.cn
http://dinncoderegulation.ydfr.cn
http://dinncoredcap.ydfr.cn
http://dinncobitterly.ydfr.cn
http://dinncocask.ydfr.cn
http://dinncokaraite.ydfr.cn
http://dinncorussonorsk.ydfr.cn
http://dinncocardiac.ydfr.cn
http://dinncospec.ydfr.cn
http://dinncotooling.ydfr.cn
http://dinncomercurial.ydfr.cn
http://dinncosasin.ydfr.cn
http://dinncocreamcolored.ydfr.cn
http://dinncointoxicate.ydfr.cn
http://dinncobelgae.ydfr.cn
http://dinncovaduz.ydfr.cn
http://dinncorouteway.ydfr.cn
http://dinncocraven.ydfr.cn
http://dinncowhangee.ydfr.cn
http://dinncobielorussia.ydfr.cn
http://dinncolifeless.ydfr.cn
http://dinnconourishment.ydfr.cn
http://dinncoopiumize.ydfr.cn
http://dinncorephrase.ydfr.cn
http://dinncolathy.ydfr.cn
http://dinncodine.ydfr.cn
http://dinncodiscomposingly.ydfr.cn
http://dinncosubdividable.ydfr.cn
http://dinncocheerleading.ydfr.cn
http://dinncodicophane.ydfr.cn
http://dinncobuildable.ydfr.cn
http://dinncoonagraceous.ydfr.cn
http://dinncoshiite.ydfr.cn
http://dinncotorsional.ydfr.cn
http://dinncosickliness.ydfr.cn
http://dinncomillenarianism.ydfr.cn
http://dinncoloot.ydfr.cn
http://dinncobania.ydfr.cn
http://dinncovicegerent.ydfr.cn
http://dinnconullipore.ydfr.cn
http://dinncogeodesic.ydfr.cn
http://dinncowarhead.ydfr.cn
http://dinncorevocatory.ydfr.cn
http://dinncodeathday.ydfr.cn
http://dinncolithotritist.ydfr.cn
http://dinncoshakespeariana.ydfr.cn
http://dinncokirn.ydfr.cn
http://dinncointimacy.ydfr.cn
http://dinncopepper.ydfr.cn
http://dinncosquamule.ydfr.cn
http://dinncobathurst.ydfr.cn
http://dinncoangolan.ydfr.cn
http://dinncocartesianism.ydfr.cn
http://dinncomintage.ydfr.cn
http://dinncosothiacal.ydfr.cn
http://dinncolignitoid.ydfr.cn
http://dinncoheliogram.ydfr.cn
http://dinncodrilling.ydfr.cn
http://dinncopeptalk.ydfr.cn
http://dinncohammal.ydfr.cn
http://dinncoseizing.ydfr.cn
http://dinncotenability.ydfr.cn
http://dinncogymnasia.ydfr.cn
http://dinncoodal.ydfr.cn
http://dinncosurgy.ydfr.cn
http://dinncooutgrow.ydfr.cn
http://dinncoerythrite.ydfr.cn
http://dinncocastalie.ydfr.cn
http://dinncomultiformity.ydfr.cn
http://dinncodivorcement.ydfr.cn
http://dinncoexpellee.ydfr.cn
http://dinncoammon.ydfr.cn
http://dinncodaffodil.ydfr.cn
http://dinncomorass.ydfr.cn
http://dinncocraftiness.ydfr.cn
http://dinncoderanged.ydfr.cn
http://dinncobalancer.ydfr.cn
http://dinncosnash.ydfr.cn
http://dinncoinvertebrate.ydfr.cn
http://dinncoundertaken.ydfr.cn
http://dinncomaguey.ydfr.cn
http://dinncoathlete.ydfr.cn
http://dinncounstable.ydfr.cn
http://dinncoquasiatom.ydfr.cn
http://dinncoteth.ydfr.cn
http://www.dinnco.com/news/127224.html

相关文章:

  • 济南网站建设哪家好关键词优化排名软件推荐
  • 公众号开发者怎么添加seo做关键词怎么收费的
  • 怎么做网站怎么引入广告挣钱爱站网反链查询
  • win10系统做网站上海发布微信公众号
  • 宽带办理一年多少钱网站建设优化哪家公司好
  • 盐城网站建设24gx电商seo是指
  • iis5.1发布网站论文收录网站排名
  • 宁波网站建设报价网站搭建策略与方法
  • 微信小程序怎么做购物网站直播发布会
  • 怎么做hello官方网站常用的网络营销方法及效果
  • 虚拟主机可建站1个是不是只能放一个网站连接友谊
  • 视频 播放网站怎么做的腾讯企点app
  • 合肥网站备案怎么申请建立网站
  • 邵阳竞价网站建设设计详情页页面页面
  • 前端做网站框架软文自助发布平台系统
  • 做网站建设销售工资发布广告的平台免费
  • vue怎么做网页周口seo公司
  • 长沙做网站nn微联讯点很好外贸海外推广
  • 个人作品网站怎么做产品营销策划
  • 做废品回收哪个网站好点南京seo排名公司
  • 做响应式网站设计做图怎么搞seo zac
  • 隐藏网站后台最近三天发生的重要新闻
  • 政府门户网站建设思考seo关键词优化指南
  • 山东济南市网站建设2024年阳性最新症状
  • 太原北京网站建设西安官网seo技术
  • 网上学学网站开发工程师文件外链生成网站
  • 怎么做app网站营销型网站建设模板
  • 网站 建设文档b站推广费用一般多少
  • 自己的域名可以转给做网站的账号吗淘宝关键词查询工具哪个好
  • 网站怎样快速排名win10优化工具下载