wcccode commented on PR #18032:
URL: https://github.com/apache/echarts/pull/18032#issuecomment-2478130606
服务端nodeJs渲染图片,折线图数值未显示。
依赖:
canvas: "^2.11.2"
echarts: "^5.5.1"
测试数据:
var option = {
title: {
text: '每日增长趋势'
},
tooltip: {},
legend: {
data: ['活跃数'],
bottom: '10'
},
xAxis: {
data: ['2024-10-1', '2024-10-2', '2024-10-3', '2024-10-4', '2024-10-5',
'2024-10-6', '2024-10-7', '2024-10-8', '2024-10-9', '2024-10-10', '2024-10-11',
'2024-10-12', '2024-10-13', '2024-10-14', '2024-10-15']
},
yAxis: {},
series: [{
name: '活跃数',
type: 'line',
data: [86, 38, 45, 37, 37, 37, 60, 589, 545, 653, 891, 838, 225, 708,
597],
label: {
show: true, // 显示每个数据点的标签
position: 'top', // 标签的位置,可以是 'top', 'left', 'right', 'bottom'
formatter: '{c}' // 显示数据的值
}
}]
};
测试结果:

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]