Commit 763c73d0 authored by xuzhuo's avatar xuzhuo

大屏当日订单量跳转

parent 56b60149
...@@ -93,90 +93,20 @@ export default { ...@@ -93,90 +93,20 @@ export default {
}, },
}, },
getEcharts() {
this.changeDimension('L022');
},
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
let chartDom = this.$refs.chart; let chartDom = this.$refs.chart;
this.chart = echarts.init(chartDom); this.chart = echarts.init(chartDom);
this.chart.setOption({
title:{
left:'3%',
top:'5%',
text:"运单完成量趋势图",//标题文本,支持使用 \n 换行。
},
tooltip: {
trigger: 'axis'
},
legend: {
align:'right',//文字在前图标在后
left:'3%',
top:'15%',
textStyle:{
fontSize: 18,//字体大小
color: '#ffffff'//字体颜色
},
data: ['完成量', '未完成量']
},
grid: {
top:'30%',
left: '5%',
right: '5%',
bottom: '5%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {} //保存为图片
}
},
xAxis: {
type: 'category',
boundaryGap:true,
axisTick:{
alignWithLabel:true //保证刻度线和标签对齐
},
data: ["周一","周二","周三","周四","周五","周六","周日"] //x坐标的名称
},
yAxis: {
type: 'value',
boundaryGap: true,
splitNumber:4, //纵坐标数
interval:250 //强制设置坐标轴分割间隔
},
series: [
{
name: '完成量',
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
},
{
name: '未完成量',
type: 'line',
stack: '总量',
data: [320, 332, 301, 334, 390, 330, 320]
}
]
});
let barDom = this.$refs.bar; let barDom = this.$refs.bar;
this.bar = echarts.init(barDom); this.bar = echarts.init(barDom);
this.bar.setOption({
xAxis: { this.changeDimension('L022');
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {},
series: [
{
type: 'bar',
data: [23, 24, 18, 25, 27, 28, 25]
}
]
});
window.addEventListener('resize', this.resizeChart); window.addEventListener('resize', this.resizeChart);
}, 500); }, 500);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment