You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "wcccode (via GitHub)" <gi...@apache.org> on 2024/11/15 07:28:21 UTC
Re: [PR] fix(ssr): fix label doesn't show in line series when `ssr` is enabled [echarts]
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org