Commit 7e1cbb67 authored by cat's avatar cat

折线图x周数据显示

parent 6c24d40b
...@@ -471,7 +471,17 @@ export default { ...@@ -471,7 +471,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