优化界面

This commit is contained in:
GoEdgeLab
2021-07-21 08:07:46 +08:00
parent a00bdb1563
commit 88271f0166
25 changed files with 187 additions and 178 deletions

View File

@@ -10,9 +10,6 @@ Tea.context(function () {
}, function (args) {
return that.providerStats[args.dataIndex].provider.name + ": " + teaweb.formatNumber(that.providerStats[args.dataIndex].count)
}, axis)
window.addEventListener("resize", function () {
that.resizeChart("provider-chart")
})
})
this.reloadChart = function (chartId, name, stats, xFunc, tooltipFunc, axis) {
@@ -20,7 +17,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),
@@ -64,13 +61,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()
}
})