CN-229 Cyptocurrency--挖矿事件统计新图表开发

CN-230 Cyptocurrency--矿机所属单位新图表开发
This commit is contained in:
hyx
2021-12-13 10:18:27 +08:00
parent cbcd837031
commit 69ff5446e4
3 changed files with 384 additions and 384 deletions

View File

@@ -508,7 +508,7 @@ const categoryBar = {
itemStyle: { itemStyle: {
color: function (params) { color: function (params) {
return getCharBartColor([params.dataIndex]) return getCharBartColor([params.dataIndex])
}, }
} }
}] }]
} }
@@ -534,8 +534,8 @@ const timeBar = {
interval: 0, interval: 0,
// rotate: -40, //设置日期显示样式(倾斜度) // rotate: -40, //设置日期显示样式(倾斜度)
formatter: function (value) { // 在这里写你需要的时间格式 formatter: function (value) { // 在这里写你需要的时间格式
var t_date = new Date(value); const t_date = new Date(value)
return [t_date.getMonth() + 1, t_date.getDate()].join('/')+ " " + [t_date.getHours(), t_date.getMinutes()].join(':'); return [t_date.getMonth() + 1, t_date.getDate()].join('/') + ' ' + [t_date.getHours(), t_date.getMinutes()].join(':')
} }
} }
}, },
@@ -567,7 +567,7 @@ const timeBar = {
itemStyle: { itemStyle: {
color: function (params) { color: function (params) {
return getCharBartColor([params.dataIndex]) return getCharBartColor([params.dataIndex])
}, }
} }
}] }]
} }

View File

@@ -633,7 +633,7 @@ export default {
name: '192.168.20.26', name: '192.168.20.26',
num: 345 num: 345
} }
], // table的所有数据 ] // table的所有数据
}, },
pieTableData: [], pieTableData: [],
singleValue: { singleValue: {
@@ -1667,7 +1667,7 @@ export default {
formatter: function (value, index, a, b) { formatter: function (value, index, a, b) {
return unitConvert(value, unitTypes.number).join(' ') return unitConvert(value, unitTypes.number).join(' ')
} }
}, }
} }
this.chartOption.yAxis = { this.chartOption.yAxis = {
@@ -1682,8 +1682,8 @@ export default {
} }
}, },
axisPointer: { // y轴上显示指针对应的值 axisPointer: { // y轴上显示指针对应的值
show: true, show: true
}, }
} }
} else if (direction == 'vertical') { // 柱状图竖直方向 } else if (direction == 'vertical') { // 柱状图竖直方向
this.chartOption.yAxis = { this.chartOption.yAxis = {
@@ -1709,8 +1709,8 @@ export default {
} }
}, },
axisPointer: { // y轴上显示指针对应的值 axisPointer: { // y轴上显示指针对应的值
show: true, show: true
}, }
} }
} }
} }
@@ -1736,7 +1736,7 @@ export default {
} else { } else {
return getCharBartColor(0) return getCharBartColor(0)
} }
}, }
} }
} }
}, },
@@ -1785,7 +1785,7 @@ export default {
initTestTimeBarData (chartParams) { initTestTimeBarData (chartParams) {
this.noData = false this.noData = false
let data = [[1612113120000, "9"], [1612113220000, "2"],[1612113320000, "3"], [1612113420000, "4"],[1612113520000, "1"],[1612113620000, "5"],[1612113720000, "7"],[1612113820000, "9"]] const data = [[1612113120000, '9'], [1612113220000, '2'], [1612113320000, '3'], [1612113420000, '4'], [1612113520000, '1'], [1612113620000, '5'], [1612113720000, '7'], [1612113820000, '9']]
let dataArray = [] let dataArray = []
if (chartParams.direction == 'vertical') { // 柱状图竖直方向 if (chartParams.direction == 'vertical') { // 柱状图竖直方向
dataArray = data.map((r, i) => { dataArray = data.map((r, i) => {
@@ -1859,7 +1859,7 @@ export default {
this.chartOption.tooltip = { this.chartOption.tooltip = {
...this.chartOption.tooltip, ...this.chartOption.tooltip,
formatter: (direction=='horizontal')?categoryHorizontalFormatter:categoryVerticalFormatter, formatter: (direction == 'horizontal') ? categoryHorizontalFormatter : categoryVerticalFormatter
} }
this.chartOption.xAxis = { this.chartOption.xAxis = {
...this.chartOption.xAxis, ...this.chartOption.xAxis,
@@ -1879,7 +1879,7 @@ export default {
} else { } else {
return getCharBartColor(0) return getCharBartColor(0)
} }
}, }
} }
} }
}, },
@@ -1969,7 +1969,7 @@ export default {
} else { } else {
return getCharBartColor(0) return getCharBartColor(0)
} }
}, }
} }
}] }]
} }