Commit 8e371627 authored by W_Y's avatar W_Y

Merge remote-tracking branch 'origin/project9-8' into project9-8

parents 0dfadf5d 2f0aa6b0
...@@ -487,7 +487,17 @@ export default { ...@@ -487,7 +487,17 @@ export default {
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: this.dataList data: this.dataList,
axisLabel: {
formatter: function(value) {
// 控制每个数据的显示宽度为5个字符
var maxLength = 5
if (value.length > maxLength) {
return value.substring(0, maxLength) + '\n' + value.substring(maxLength)
}
return value
}
}
}, },
yAxis: { yAxis: {
type: 'value' type: 'value'
......
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