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

到位app做网站需要些程序广州网站开发 细致广州亦客网络

到位app做网站需要些程序,广州网站开发 细致广州亦客网络,学网站建设需要什么工具,想建设一个网站自己接一些小活【Echarts系列】水平柱状图 序示例数据格式代码 序 为了节省后续开发学习成本#xff0c;这个系列将记录我工作所用到的一些echarts图表。 示例 水平柱状图如图所示#xff1a; 数据格式 data [{name: 于洪区,value: 2736},{name: 新民市,value: 2844},{name: 皇姑区,… 【Echarts系列】水平柱状图 序示例数据格式代码 序 为了节省后续开发学习成本这个系列将记录我工作所用到的一些echarts图表。 示例 水平柱状图如图所示 数据格式 data [{name: 于洪区,value: 2736},{name: 新民市,value: 2844},{name: 皇姑区,value: 2889},{name: 沈河区,value: 3143}]代码 Vue版本以及脚本语言的选择各有不同核心内容主要是option重点关注该部分内容即可。 templatediv classchart refhorizontalBarRef/div /templatescript langts import { Component, Prop, Ref, Vue, Watch } from vue-property-decorator import echarts from echartsComponent({name: HorizontalBar,components: {} }) export default class HorizontalBar extends Vue {Prop() data!: anyProp({ default: () [rgba(72, 133, 201, 0.6), rgba(72, 133, 201, 1)]}) colors?: any[]Ref() horizontalBarRef!: any//此处监听是为了在有状态切换时例如时间年份或其他条件改变时能够让Echarts图表重新渲染Watch(data)onDataChange() {this.createHorizontalBarChart()}private chart: any {}createHorizontalBarChart() {this.chart echarts.init(this.horizontalBarRef)const data this.datalet names []let values []data.forEach(item {names.push(item.name)values.push(item.value)})const option {tooltip: {trigger: axis,axisPointer: {type: shadow},confine: true, //让提示框恒定在网格容器内【针对显示不全或者被遮盖问题】},grid: {left: 20,right: 40,top: 0,bottom: 20,containLabel: true //网格边距包含坐标标签},xAxis: {axisTick: {show: false //是否显示X轴坐标刻度},axisLabel: {show: false //是否显示X轴坐标标签},axisLine: {show: false //是否显示X轴轴线},splitLine: {lineStyle: {type: dashed //以虚线形式展示X轴在网格中的分隔线}}},yAxis: {type: category,data: names,axisTick: {show: false,alignWithLabel: true //刻度与坐标标签对齐},axisLine: {show: true,lineStyle: {color: #757790, //设置Y轴轴线样式width: 2}},axisLabel: {textStyle: {color: #757790, //设置Y轴坐标标签样式fontSize: 14}},splitLine: {show: false //是否展示Y轴方向上的分隔线}},series: [{type: bar,barWidth: 10,itemStyle: {color: {type: linear, //设置柱状条的渐变颜色x: 0,y: 0,x2: 1,y2: 0,colorStops: [{ offset: 0, color: this.colors[0] }, // 0% 处的颜色{ offset: 1, color: this.colors[1] } // 100% 处的颜色],global: false // 缺省为 false}},label: {show: true, //展示柱状条数值信息position: right,color: #12121D,fontSize: 14},data: values}]}this.chart.setOption(option)}mounted() {this.createHorizontalBarChart()window.addEventListener(resize, this.chartResize)}beforeDestroy() {if (this.chart) {window.removeEventListener(resize, this.chartResize)this.chart.dispose()}}chartResize() {if (this.chart) {this.chart.resize()}} } /script style langscss scoped .chart {width: 100%;height: 300px; } /style
http://www.tj-hxxt.cn/news/222178.html

相关文章:

  • seo优化网站优化排名怎么做app推广和宣传
  • 简单的房源展示网站开发最新网游网络游戏新开服
  • 怎么做家具定制网站石家庄app制作
  • 微网站系统软件首页设计
  • 学校网站建设市场分析做网店装修的网站有哪些内容
  • 做seo排名好的网站本地环境建设网站
  • h5网站免费建设wordpress 论坛社区
  • 充值中心网站怎么做做网站客户尾款老不给怎么办
  • 网站建设培训报名wordpress posts
  • 网站开发个人简历word下载视频剪辑培训班学费一般多少
  • wordpress 中文 图片宁波搜索引擎优化seo
  • 长春网站制作软件广告投放效果
  • 阿德莱德做网站安云自助建站系统源码
  • 网站后台上传文章格式如何在网站做电子杂志
  • 新企业如何在国税网站上做套餐网站设计制作公司推荐
  • 导航网站如何被百度收录网站建设幻灯片背景图片素材
  • 阿里云网站用什么做的网站优化工作怎么样
  • php网站搭建环境搭建化工网站建设推广
  • 有关做服装的网站吗网络管理系统官网
  • 网站建设只有一个空间吗北京做微信网站哪家好
  • 大型网站建设方案wordpress时间插件下载
  • wordpress站点地址无法更改重庆网上注册公司网站
  • 中移建设 网站做网站系统的过程
  • 深圳网站建设的公司汽车网络营销分析报告
  • 找专题页面那个网站好新干县城乡建设局网站
  • 广西南宁小程序开发公司seo优化6个实用技巧
  • 网站定制哪家正规网站建设 文档下载
  • 深圳网站建设制作哪家便宜临沂哪家做网站最好
  • 自己可以创建公司网站吗seo优化是什么
  • 企业网站模板下载尽在南宁网站建设云尚网络