You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "Knight-ZXW (via GitHub)" <gi...@apache.org> on 2024/12/10 13:29:23 UTC
[I] [Bug] markLine在 三位小数的情况下展示不正常 [echarts]
Knight-ZXW opened a new issue, #20571:
URL: https://github.com/apache/echarts/issues/20571
### Version
5.5.1
### Link to Minimal Reproduction
示例代码,可在https://echarts.apache.org/examples/zh/editor.html?c=line-markline 运行
### Steps to Reproduce
位置不正常。
示例代码 如下
const markLine = [];
const positions = [
'middle',
];
for (var i = 0; i < positions.length; ++i) {
markLine.push({
name: positions[i],
yAxis:0.005,
label: {
formatter: '{b}',
position: positions[i]
}
});
}
option = {
animation: false,
textStyle: {
fontSize: 14
},
xAxis: {
data: ['A', 'B', 'C', 'D', 'E'],
boundaryGap: true,
splitArea: {
show: true
}
},
yAxis: {
},
series: [
{
name: 'line',
type: 'line',
stack: 'all',
symbolSize: 6,
data: [0.003, 0.004, 0.008,0.002],
markLine: {
data: markLine,
label: {
distance: [20, 8]
}
}
}
],
grid: {
top: 30,
left: 60,
right: 60,
bottom: 40
}
};
展示效果如下

如果改为2位小数就正常了

### Current Behavior
标注线位置不正常,总是在最底部
### Expected Behavior
线的位置正常
### Environment
```markdown
OS: macOS Monterey
Browser: Chrome 96.0.4664.55
Framework Vue@3
```
### Any additional comments?
无
--
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.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
Re: [I] [Bug] markLine在 三位小数的情况下展示不正常 [echarts]
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #20571:
URL: https://github.com/apache/echarts/issues/20571#issuecomment-2533204111
confirmed - [Demo](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurACYCGYFRA2gORb0A0s9AQi2wMJf0AifAKL0AusxIBfCegCeOfESQBbChgIAGAHQaAjNJJ4ApgCcIRwrFol0qUqTCyQRovQA2EaEZY3SeWcoARsBuAMoQAF4usABsMvbkVDRW2hoaAMysqRoALFk6GgAc-WkATOK-6KomANYAMp7RSJTUdEjyuJbZAKySopK-A-gVkgDcQA)
--
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
Re: [I] [Bug] markLine在 三位小数的情况下展示不正常 [echarts]
Posted by "plainheart (via GitHub)" <gi...@apache.org>.
plainheart commented on issue #20571:
URL: https://github.com/apache/echarts/issues/20571#issuecomment-2533659804
markLine 当前默认精度为 2,可以先显式配置 [`precision: 3`](https://echarts.apache.org/option.html#series-line.markLine.precision) 或其他你希望的精度。[Demo](https://echarts.apache.org/examples/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurACYCGYFRA2gORb0A0s9AQi2wMJf0AifAKL0AuiQC-zEgE8c-IklgBbChiIAGAHQaAjLCkk8AUwBOEY4Vi0S6VKVJgZIY0XoAbCNGMtbpPDLKAEbA7gDKEABerrAAbNIO6JTUdNoaGgDMrGkaACzZOhoAHAXpAEyiCYmqpgDWADJeMfaJ6CCmxgDG-FDQRFl-Dsk01oOJLa0OcrhWOQCsYw4Si7DirctLJOISANxAA)
--
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