09 2022 档案
ECharts柱状图,随机或者指定改变颜色
摘要:// 指定颜色 itemStyle: { color: function (params) { var colorarrays = ["#990033", "#ff66cc", "#3300cc", "#ffcc00", "#339933", "#66cccc"] return colorarray
阅读全文
vue 获取for循环动态设置ref属性
摘要:添加 :ref="val.id" 获取 console.log(this.$refs[val.id]) 获取元素的坐标信息 console.log(this.$refs[val.id][0].getBoundingClientRect())
阅读全文
解决echarts 折线图Y轴显示跟数据不一致问题
摘要:将series数组中的 stack: 'Total' 注释或删除掉即可
阅读全文
vue 行内动态渲染 :style 的正确方法
摘要::style="{'width':item.itemValue}"
阅读全文
Echarts销毁方法
摘要:在调取Echarts实例时判断是否存在,存在就销毁 if (this.launchEchart != null && this.launchEchart != "" && this.launchEchart != undefined) { this.launchEchart.dispose()//销
阅读全文
echarts文字颜色自定义修改
摘要:1、改变坐标轴文字颜色: 在xAxis,yAxis中添加以下代码即可 xAxis: { type: 'category', data: this.xAxis, axisLabel: { show: true, color: '#ffffff', fontSize: 16 } }, yAxis: {
阅读全文
同一个数据源赋值成两个数组、避免数据会相互影响,可使用JSON.parse(JSON.stringify())
摘要:getListCountryJdSc(obj).then((res) => { this.SummaryList = res.data.data this.jdDataList = JSON.parse(JSON.stringify(res.data.data)) this.scDataList =
阅读全文
在Vue项目中引入 ECharts的写法
摘要:安装命令 npm install echarts --save <template> <div class="echart" id="mychart" :style="{ width: '500px', height: '500px' }"></div> </template> <script> i
阅读全文
vue 给循环数据添加补0序号
摘要:{{index+1>9?index+1:"0"+(index+1)}}
阅读全文
获取浏览器唯一标识符
摘要:this.fingerprint = (equipment.model || '') + (equipment.deviceId || '') + (equipment.hostName || '')
阅读全文