柱状图多维条形图vue_vue用echarts图表(柱状图)

安装:

使用:

import echarts from 'echarts'

export default {

data () {

return {

submitApprovalData: [23, 12, 12, 23, 12],

approvalPassData: [12, 23, 16, 21, 16],

totalData: []

}

},

methods: {

},

mounted () {

},

created () {

this.totalData = []

this.submitApprovalData.forEach((item, index) => {

this.totalData.push(item + this.approvalPassData[index])

})

let this_ = this

setTimeout((function () {

let chart = document.getElementById('chart_example')

let chart2 = document.getElementById('chart_example2')

let myChart = echarts.init(chart)

let myChart2 = echarts.init(chart2)

let option = {

color: ['#fff'],

backgroundColor: 'rgba(47,58,102,1)', // 背景色

xAxis : [

{

name: '任务难度', // x轴标题

type : 'category',

data : ['S', 'A', 'B', 'C', 'D'],

axisTick: {

alignWithLabel: true

},

axisLine: { //坐标线

lineStyle: {

type: 'dashed',

color: '#48558C', // 轴线的颜色

width: '1' // 坐标线的宽度

}

},

axisTick: { // 刻度

show: false // 不显示刻度线

},

nameTextStyle: { // 标题样式

color: ['#fff']

},

axisLabel: {

textStyle: {

color: '#fff', // 坐标值得具体的颜色

fontSize: 14

}

}

}

],

yAxis : [

{

name: '任务数量',

type : 'value',

axisLine: { // 线

show: false

},

axisTick: { // 刻度

show: false

},

splitLine: { // 网格为虚线

show: t

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值