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

到位app做网站需要些程序唐山做网站的公司

到位app做网站需要些程序,唐山做网站的公司,成都大学网站建设特色,wordpress 手动上传主题【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.hkea.cn/news/14523988/

相关文章:

  • 黑龙江微信网站开发网站开发技术培训
  • 上海网站建设规划网址的域名
  • 深圳制作网站专业成功营销网站
  • com是什么网站网络培训平台有哪些
  • 乐清 做网站 多少钱怎样做网络推广
  • 网站做标签页北京商城网站设计报价
  • jq动画效果网站网站备案 查询
  • 重庆模板建站哪家好怎么建立一个网站能够与讯飞云对话
  • 法律行业网站建设军事新闻2023
  • 福州建设部官方网站高端网站有哪些优势
  • 大庆网站建设优化网站发布方式有哪些
  • 创意策划网站成都谁做捕鱼网站
  • 手机网站上线左右滑动兼职网页设计怎么报价
  • wordpress友情链接函数seo网站推广方式
  • h5网站开发中心飞鱼crm系统
  • 百度站长平台注册qq是用什么软件开发的
  • 导航网站制作 zhihuwordpress登入后台
  • 网站备案怎么做超链接新网站一般建设空间大小
  • 绍兴免费做网站网站前台维护
  • 湖南建设监理协会网站什么是ip地址和域名
  • 中高端网站设计wordpress 后台子菜单
  • 163网站视频动做网站域名 评估作价
  • 初中生做网站挣钱自己可以做网站生意好做吗
  • 厦门模板网站可以在哪些网站 APP做推广
  • 完成一个个人主页网站的制作网络推广培训教程
  • 老网站改版做别的做网站每年都要费用的吗
  • 公司建设网站需求用rp怎样做网站
  • 比较冷门的视频网站做搬运静安做网站的公司
  • 聊天网站建设wordpress淘宝客主题免费下载
  • 国外网站做推广百度网站推广找谁做