mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-14 04:10:26 +08:00
优化界面
This commit is contained in:
@@ -39,11 +39,6 @@ Tea.context(function () {
|
||||
}
|
||||
return that.groupStats[args.dataIndex].group.name + ": " + teaweb.formatNumber(that.groupStats[args.dataIndex].count) + percent
|
||||
}, groupAxis)
|
||||
|
||||
window.addEventListener("resize", function () {
|
||||
that.resizeChart("daily-chart")
|
||||
that.resizeChart("group-chart")
|
||||
})
|
||||
})
|
||||
|
||||
this.reloadLineChart = function (chartId, name, stats, xFunc, tooltipFunc, axis) {
|
||||
@@ -52,7 +47,7 @@ Tea.context(function () {
|
||||
return
|
||||
}
|
||||
let that = this
|
||||
let chart = echarts.init(chartBox)
|
||||
let chart = teaweb.initChart(chartBox)
|
||||
let option = {
|
||||
xAxis: {
|
||||
data: stats.map(xFunc)
|
||||
@@ -129,7 +124,7 @@ Tea.context(function () {
|
||||
if (chartBox == null) {
|
||||
return
|
||||
}
|
||||
let chart = echarts.init(chartBox)
|
||||
let chart = teaweb.initChart(chartBox)
|
||||
let option = {
|
||||
xAxis: {
|
||||
data: stats.map(xFunc)
|
||||
@@ -170,13 +165,4 @@ Tea.context(function () {
|
||||
chart.setOption(option)
|
||||
chart.resize()
|
||||
}
|
||||
|
||||
this.resizeChart = function (chartId) {
|
||||
let chartBox = document.getElementById(chartId)
|
||||
if (chartBox == null) {
|
||||
return
|
||||
}
|
||||
let chart = echarts.init(chartBox)
|
||||
chart.resize()
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user