Commit 9d0ad942 authored by 华国豪's avatar 华国豪 🙄

1

parent dc309a0f
...@@ -47,8 +47,7 @@ export default { ...@@ -47,8 +47,7 @@ export default {
return { return {
myChart: null, myChart: null,
dataList: [], dataList: [],
dates: [], dates: []
dataList2: []
} }
},watch:{ },watch:{
},created(){ },created(){
...@@ -76,7 +75,6 @@ export default { ...@@ -76,7 +75,6 @@ export default {
dataList.push(obj) dataList.push(obj)
} }
this.dataList = dataList this.dataList = dataList
this.dataList2 = dataList
this.dates = dates this.dates = dates
this.myChart = this.$echarts.init(this.$refs.myecharts); this.myChart = this.$echarts.init(this.$refs.myecharts);
this.init() this.init()
...@@ -92,7 +90,7 @@ export default { ...@@ -92,7 +90,7 @@ export default {
backgroundColor: '#21202D', backgroundColor: '#21202D',
color:['#2ecc71','#3498db','#9b59b6','#f1c40f','#e74c3c','#fffa65'], color:['#2ecc71','#3498db','#9b59b6','#f1c40f','#e74c3c','#fffa65'],
legend: { legend: {
data: ['开始值', '最高值', '结束值', '最低值', '5日平均', '10日平均', '30日平均', '90日平均', '180日平均','产品点击', ], data: ['成交单价', '5日平均', '10日平均', '30日平均', '90日平均', '180日平均','产品点击', ],
inactiveColor: '#777', inactiveColor: '#777',
textStyle: { textStyle: {
color: '#fff' color: '#fff'
...@@ -111,49 +109,6 @@ export default { ...@@ -111,49 +109,6 @@ export default {
opacity: 1 opacity: 1
} }
}, },
// formatter: function (params){
// console.log(params)
// var obj = {}
// if (params[0].value[0] !== undefined) {// 防止放上去提示undefined
// obj = {
// start: params[0].value[0],
// close: params[0].value[1],
// low: params[0].value[2],
// height: params[0].value[3],
// FiveAvg: params[0].value[5],
// TenAvg: params[0].value[6],
// ThirtyAvg: params[0].value[7],
// NinetyAvg: params[0].value[8],
// ThirtyMonthAvg: params[0].value[9],
// click: params[0].value[4],
// }
// } else {
// obj = {
// start: params[1].value[0],
// close: params[1].value[1],
// low: params[1].value[2],
// height: params[1].value[3],
// FiveAvg: params[1].value[5],
// TenAvg: params[1].value[6],
// ThirtyAvg: params[1].value[7],
// NinetyAvg: params[1].value[8],
// ThirtyMonthAvg: params[1].value[9],
// click: params[1].value[4],
// }
// }
// var res = '成交单价'
// res += '<br/> 开始值: ' + obj.start
// res += '<br/> 最高值: ' + obj.height
// res += '<br/> 结束值: ' + obj.close
// res += '<br/> 最低值: ' + obj.low
// res += '<br/> 5日平均: ' + obj.FiveAvg
// res += '<br/> 10日平均: ' + obj.TenAvg
// res += '<br/> 30日平均: ' + obj.ThirtyAvg
// res += '<br/> 90日平均: ' + obj.NinetyAvg
// res += '<br/> 180日平均: ' + obj.ThirtyMonthAvg
// res += '<br/> 产品点击: ' + obj.click
// return res
// },
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
...@@ -237,7 +192,7 @@ export default { ...@@ -237,7 +192,7 @@ export default {
name: '5日平均', name: '5日平均',
type: 'line', type: 'line',
yAxisIndex: 0, yAxisIndex: 0,
data: calculateMA(5, _this.dataList2), data: calculateMA(5, _this.dataList),
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
z: 3, z: 3,
...@@ -249,7 +204,7 @@ export default { ...@@ -249,7 +204,7 @@ export default {
name: '10日平均', name: '10日平均',
type: 'line', type: 'line',
yAxisIndex: 0, yAxisIndex: 0,
data: calculateMA(6, _this.dataList2), data: calculateMA(6, _this.dataList),
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
z: 3, z: 3,
...@@ -261,7 +216,7 @@ export default { ...@@ -261,7 +216,7 @@ export default {
name: '30日平均', name: '30日平均',
type: 'line', type: 'line',
yAxisIndex: 0, yAxisIndex: 0,
data: calculateMA(7, _this.dataList2), data: calculateMA(7, _this.dataList),
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
z: 3, z: 3,
...@@ -273,7 +228,7 @@ export default { ...@@ -273,7 +228,7 @@ export default {
name: '90日平均', name: '90日平均',
type: 'line', type: 'line',
yAxisIndex: 0, yAxisIndex: 0,
data: calculateMA(8, _this.dataList2), data: calculateMA(8, _this.dataList),
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
z: 3, z: 3,
...@@ -285,7 +240,7 @@ export default { ...@@ -285,7 +240,7 @@ export default {
name: '180日平均', name: '180日平均',
type: 'line', type: 'line',
yAxisIndex: 0, yAxisIndex: 0,
data: calculateMA(9, _this.dataList2), data: calculateMA(9, _this.dataList),
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
z: 3, z: 3,
...@@ -296,7 +251,7 @@ export default { ...@@ -296,7 +251,7 @@ export default {
{ {
name: '产品点击', name: '产品点击',
type: 'line', type: 'line',
data: calculateMA(4, _this.dataList2), data: calculateMA(4, _this.dataList),
smooth: true, smooth: true,
yAxisIndex: 1, yAxisIndex: 1,
showSymbol: false, showSymbol: false,
......
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