|
|
@ -63,6 +63,16 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setOptions({ expectedData, actualData } = {}) {
|
|
|
|
setOptions({ expectedData, actualData } = {}) {
|
|
|
|
this.chart.setOption({
|
|
|
|
this.chart.setOption({
|
|
|
|
|
|
|
|
title: {
|
|
|
|
|
|
|
|
text: '标题1 ',
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
align: 'center',
|
|
|
|
|
|
|
|
color: '#000',
|
|
|
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
top: '0%',
|
|
|
|
|
|
|
|
left: '0%',
|
|
|
|
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
xAxis: {
|
|
|
|
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
|
|
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
|
|
boundaryGap: false,
|
|
|
|
boundaryGap: false,
|
|
|
@ -74,7 +84,7 @@ export default {
|
|
|
|
left: 10,
|
|
|
|
left: 10,
|
|
|
|
right: 10,
|
|
|
|
right: 10,
|
|
|
|
bottom: 20,
|
|
|
|
bottom: 20,
|
|
|
|
top: 30,
|
|
|
|
top: 50,
|
|
|
|
containLabel: true
|
|
|
|
containLabel: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tooltip: {
|
|
|
|
tooltip: {
|
|
|
@ -92,25 +102,11 @@ export default {
|
|
|
|
legend: {
|
|
|
|
legend: {
|
|
|
|
data: ['expected', 'actual']
|
|
|
|
data: ['expected', 'actual']
|
|
|
|
},
|
|
|
|
},
|
|
|
|
series: [{
|
|
|
|
series: [
|
|
|
|
name: 'expected', itemStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
color: '#FF005A',
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
color: '#FF005A',
|
|
|
|
|
|
|
|
width: 2
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
smooth: true,
|
|
|
|
|
|
|
|
type: 'line',
|
|
|
|
|
|
|
|
data: expectedData,
|
|
|
|
|
|
|
|
animationDuration: 2800,
|
|
|
|
|
|
|
|
animationEasing: 'cubicInOut'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: 'actual',
|
|
|
|
name: 'actual',
|
|
|
|
smooth: true,
|
|
|
|
smooth: false,
|
|
|
|
type: 'line',
|
|
|
|
type: 'line',
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|