修改提示信息“No data to display”为“No data display within a specified time
range”; 时间格式化错误:最后的“。000” (cherry picked from commitf3d4f0deec) (cherry picked from commitbb6668d00f)
This commit is contained in:
@@ -148,7 +148,8 @@ function showActionTransChart(xData,series){
|
||||
xAxis: {
|
||||
type:'datetime',
|
||||
dateTimeLabelFormats: {
|
||||
second: '%H:%M:%S',
|
||||
millisecond: '%H:%M:%S',
|
||||
second: '%H:%M:%S',
|
||||
minute: '%H:%M',
|
||||
hour: '%H:%M',
|
||||
day: '%m-%d',
|
||||
@@ -405,6 +406,59 @@ function showActionTransChart(xData,series){
|
||||
return prev + curr;
|
||||
});
|
||||
}
|
||||
//配置趋势图需特殊提示,所以从公共js文件中拿出无数据提示方法到本文件中
|
||||
(function(d) {
|
||||
"object" === typeof module && module.exports ? module.exports = d: d(Highcharts)
|
||||
})(function(d) { (function(c) {
|
||||
var d = c.seriesTypes,
|
||||
e = c.Chart.prototype,
|
||||
f = c.getOptions(),
|
||||
g = c.extend,
|
||||
h = c.each;
|
||||
g(f.lang, {
|
||||
noData: "No data display within a specified time range"
|
||||
//noData: "There is no data this hour."
|
||||
});
|
||||
f.noData = {
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
align: "center",
|
||||
verticalAlign: "middle"
|
||||
}
|
||||
};
|
||||
f.noData.style = {
|
||||
fontWeight: "bold",
|
||||
fontSize: "12px",
|
||||
color: "#666666"
|
||||
};
|
||||
h("bubble gauge heatmap pie sankey treemap waterfall".split(" "),
|
||||
function(b) {
|
||||
d[b] && (d[b].prototype.hasData = function() {
|
||||
return !! this.points.length
|
||||
})
|
||||
});
|
||||
c.Series.prototype.hasData = function() {
|
||||
return this.visible && void 0 !== this.dataMax && void 0 !== this.dataMin
|
||||
};
|
||||
e.showNoData = function(b) {
|
||||
var a = this.options;
|
||||
b = b || a && a.lang.noData;
|
||||
a = a && a.noData; ! this.noDataLabel && this.renderer && (this.noDataLabel = this.renderer.label(b, 0, 0, null, null, null, a.useHTML, null, "no-data"), this.noDataLabel.attr(a.attr).css(a.style), this.noDataLabel.add(), this.noDataLabel.align(g(this.noDataLabel.getBBox(), a.position), !1, "plotBox"))
|
||||
};
|
||||
e.hideNoData = function() {
|
||||
this.noDataLabel && (this.noDataLabel = this.noDataLabel.destroy())
|
||||
};
|
||||
e.hasData = function() {
|
||||
for (var b = this.series || [], a = b.length; a--;) if (b[a].hasData() && !b[a].options.isInternal) return ! 0;
|
||||
return this.loadingShown
|
||||
};
|
||||
c.addEvent(c.Chart, "render",
|
||||
function() {
|
||||
this.hasData() ? this.hideNoData() : this.showNoData()
|
||||
})
|
||||
})(d)
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user