修改leftcharts2 样式

This commit is contained in:
ljx 2025-03-14 11:03:32 +08:00
parent c815dbbe61
commit 27fe855a2e
1 changed files with 51 additions and 41 deletions

View File

@ -5,6 +5,7 @@
</template>
<script>
import * as echarts from 'echarts';
function getRecentSixMonths() {
const months = [];
const today = new Date();
@ -22,7 +23,6 @@ function getRecentSixMonths() {
return months;
}
import * as echarts from 'echarts';
export default {
name: 'RoseChart',
props: {
@ -47,29 +47,35 @@ export default {
console.log(myChart)
this.option = {
title: {
text: '月生产情况',
subtext: '完成率',
subtextStyle:{
fontSize:20,
fontWight:'bold',
color:'#fff'
},
text: '近半年产量情况',
// subtext: '',
// subtextStyle:{
// fontSize:20,
// fontWight:'bold',
// color:'#fff'
// },
textStyle:{
fontSize:25,
fontSize:30,
fontWight:'bold',
color:'#fff'
}
},
legend: {
icon: 'rect',
itemWidth: 20, //
itemHeight: 20, //
itemGap: 40, //
data: this.dataType == '整机' ? ['整机线'] : ['整机', '机芯', '盖板'],
textStyle: {
color: '#fff',
fontSize:30,
fontWight:'bold'
}
},
tooltip: {
trigger: 'axis',
},
legend: {
data: this.dataType == '整机' ?['机芯1线', '机芯2线', '盖板线'] : ['整机线'],
textStyle:{
fontSize:25,
color:'#fff'
}
},
toolbox: {
},
calculable: true,
@ -82,7 +88,7 @@ export default {
}
},
axisLabel: {
fontSize: 20, // Y
fontSize: 30, // Y
color: '#fff' //
},
// prettier-ignore
@ -98,16 +104,21 @@ export default {
}
},
axisLabel: {
fontSize: 20, // Y
fontSize: 30, // Y
color: '#fff' //
},
}
],
grid: {
left: '3%',
right: '7%',
bottom: '3%',
containLabel: true
},
series:
this.dataType == '整机' ?
[
this.dataType == '整机' ?[
{
name: '整机线',
name: '整机',
type: 'bar',
data: [
75, 65, 68, 69, 40, 82
@ -122,10 +133,9 @@ export default {
data: [{ type: 'average', name: 'Avg' }]
}
}
]:
[
]:[
{
name: '芯1线',
name: '机',
type: 'bar',
data: [
75, 65, 68, 69, 40, 82
@ -136,41 +146,41 @@ export default {
{ type: 'min', name: 'Min' }
]
},
markLine: {
data: [{ type: 'average', name: 'Avg' }]
}
// markLine: {
// data: [{ type: 'average', name: 'Avg' }]
// }
},
{
name: '机芯2线',
name: '机芯',
type: 'bar',
data: [
70, 75, 88, 85, 97, 85, 75, 78, 59, 80, 82, 63
70, 75, 88, 85, 97, 85,
],
markPoint: {
data: [
{ name: 'Max', value: 182.2, xAxis: 7, yAxis: 183 },
{ name: 'Min', value: 2.3, xAxis: 11, yAxis: 3 }
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
markLine: {
data: [{ type: 'average', name: 'Avg' }]
}
// markLine: {
// data: [{ type: 'average', name: 'Avg' }]
// }
},
{
name: '盖板线',
name: '盖板',
type: 'bar',
data: [
80, 85, 78, 75, 67, 45, 55, 68, 49, 50, 72, 93
80, 85, 78, 75, 67, 45
],
markPoint: {
data: [
{ name: 'Max', value: 182.2, xAxis: 7, yAxis: 183 },
{ name: 'Min', value: 2.3, xAxis: 11, yAxis: 3 }
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
markLine: {
data: [{ type: 'average', name: 'Avg' }]
}
// markLine: {
// data: [{ type: 'average', name: 'Avg' }]
// }
}
]
};