You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "Comee (via GitHub)" <gi...@apache.org> on 2023/04/26 07:58:36 UTC
[GitHub] [echarts] Comee opened a new issue, #18569: [Bug] x轴为time类型的bar图指定x轴的min值时首个tick并没有位于x轴的最左侧(没有和y轴对齐)
Comee opened a new issue, #18569:
URL: https://github.com/apache/echarts/issues/18569
### Version
5.4.2
### Link to Minimal Reproduction
https://echarts.apache.org/examples/zh/editor.html?code=PYBwLglsB2AEC8sDeAoWsCeBBAHhAzgFywDaa6y5Fs0AhgLYCmxA5IMryglHayDAhCwDRUKAcwBOEACYBJaOMY5iABgHV0dJgBlgAY1qQYrehPEAbRv0GqGjAOK0QxAEwBWZSrAYQzWCwButYwCuZq7UhtCsAMxO5iqw9LTy3gAs0SEUCQTqENBeSLD4ABbAAO7EYCJBsAC-aegZ-AAqEFoA1sR5hSVlFYzVtbD16rQARozG7flFpbDllTUW-SDGEGBZOROd0wBm_vi9VYIH6AC6rji4BMRk1KixohLSsolKC-6erJBMMSphrA4KDgiAFoFEkgc5YAoFIQoTCFN9Qgk_gDgQonOCAGyQ6GwqEIijDYABGS0EQYWz2WA7Yx7frZMCMER-cawCIYqEc_qDbK5SZdGY9PoLepNVobKbdOZcvD4IajFkdCUCqULfBLFZrXmbYjUvbVQ7kU7ke7iK55UxbMDEACcShmoEcdrEQgKVtgAEY7QVGBAXW7PQpqkb0HsxIwiKRBLcVOJdLQ9mBHnJFP1zjKk89-th0zJk5D-movOwOPj0G8i8NSaXYJWRAB1CRgArEJIvWLGEZjcX83WMPiwEDAfArKDhbxgUAsIWxRjQLTAWQTRIsJjxgIiRgAEV0jCaX37GFYzKC_HtwGMkEpQPd-uoR1gwdgsbAtAAWsBgPQrlHXh4i_hllkERq29X1XWICI2zcB0PVbfoLTdW1-mdcCPSg6g0wIDMrjtd1-wcfDH2oLYIAvRkAFkFyLYpGFoFoADFSIZYD-k2bcXwAZQKWhxB7XY-wWERaGgIRGEoxdvGPYJVRfEQwAANX8IJkUBEEwQhXEcXhfpZ3ERTAiLf5VNBTFsThOFqzCfSgg4kBhOIAAODFWw5BQDROVxn3jRg3WuCho2ofAiRELQvD82I8lXfB1y3Hc90MlE
1PBJxIQc8y8X7KTIgAdgAOmiadYmQOJaOijd2N3CAmBU1F0QhT10u02AstZa1bxUY53IfFAqgAbiAA
### Steps to Reproduce

### Current Behavior
首个tick向右偏移 barWidth/2
### Expected Behavior
期望首个tick处于x轴的起点,或有配置项可以实现

### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
_No response_
--
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] x轴为time类型的bar图指定x轴的min值时首个tick并没有位于x轴的最左侧(没有和y轴对齐) [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #18569:
URL: https://github.com/apache/echarts/issues/18569#issuecomment-2832615726
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
--
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
[GitHub] [echarts] echarts-bot[bot] commented on issue #18569: [Bug] x轴为time类型的bar图指定x轴的min值时首个tick并没有位于x轴的最左侧(没有和y轴对齐)
Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #18569:
URL: https://github.com/apache/echarts/issues/18569#issuecomment-1522956063
@Comee It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**TITLE**
[Bug] When the x-axis specifies the min value of the x-axis for a bar chart of the time type, the first tick is not located at the far left of the x-axis (not aligned with the y-axis)
</details>
--
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
[GitHub] [echarts] helgasoft commented on issue #18569: [Bug] x轴为time类型的bar图指定x轴的min值时首个tick并没有位于x轴的最左侧(没有和y轴对齐)
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18569:
URL: https://github.com/apache/echarts/issues/18569#issuecomment-1523882283
remove _xAxis.min_ and the first tick will be aligned with yAxis.
Keep in mind that _barWidth_ will take space(time) on the xAxis and may look confusing if too big. The most accurate value for a single event like a measurement is ```barWidth:1```, but it is too thin and hard to see. So there is a tradeoff, up to you to find the right balance.
[Demo Code](https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWsCeBBAHhAzgFywDaa6y5Fs0AhgLYCmxA5IMryglHayDAhCwDRUKdJgBlgAY1qQYrehAAm8gDaN-g9MMYBxWiGIAmAKwDq6MBhDNYLAG60lAV1UnTc6MQDMx9bHq0cxAAs3qaw_gQiENBWSLD4ABbAAO7EYABOTrAAvi7U4fgAKhDiANbEsQnJqRmM2bkU-SK0AEaMSuVxiSmw6Zk5PvggShBgkdEdld0AZvb4tVmCC-gAui44uATEZNSooeaWrJBMaqGDw2AAcg70rWme-i4A9I_Ubqz6AAz6HgC0H4E_IywD4fQggsEfE6ufzvL6_D6GQEANmBoPBIKh1GezWADmg8loaQwOj0sBmSjm9XQzyiYEYaTs7VgHiRILZVLCeHwYxinSqPRqdR8-SKpQmXWqfQ5jRabXF_N68w5ZxGPPl01mSp8zxVYCwaUYtHVksYfDCBtoAGVzCpyuJgEpgHdrABiABibrZHyRSJYWSWFADq3IAHM0gotrEVFMwMQAJwfM1gUAGROwcMh-Kx2AARjT8UYEEz2bzH2ywfQc3DjCIpEEu1MmlYnExFH2VhYzUJrfQXbSAHUFGB4sQc4EOUpZUyKhKyZqzSBgPgRlB3NZkyAWELQoxoPb5LyAtYmLR8A4DQARKSMIrHM0YViMpz8HrAB2QUk_HPZRbkCuwAkwFPRhs22CgG2ofBcTScQrDA0JYhPM9L2vW8O0-b4_gBIEPgADghCEXyfKwPAAdgAOkMbdQmQXxDWQxgrzpNDYUwhFASovMCIxM1iM8OMf1CZZfxWFAsgAbiAA)
--
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
[GitHub] [echarts] Comee commented on issue #18569: [Bug] x轴为time类型的bar图指定x轴的min值时首个tick并没有位于x轴的最左侧(没有和y轴对齐)
Posted by "Comee (via GitHub)" <gi...@apache.org>.
Comee commented on issue #18569:
URL: https://github.com/apache/echarts/issues/18569#issuecomment-1524583488
if set xAxis.type = 'value' , then all is ok ( the first tick if start at my specified min value and no offset)
[Demo xAxis.type =value](https://echarts.apache.org/examples/zh/editor.html?c=scatter-single-axis&code=PYBwLglsB2AEC8sDeAoWsCeBBAHhAzgFywDaa6y5Fs0AhgLYCmxA5IMryglHayDAhCwDRUKAcwBOEACYBJaOMY5iABgHV0dJgBlgAY1qQYrehPEAbRv0GqGjAOK0QxAEwBWZSrAYQzWCwButYwCuZq7UhtCsAMxO5iqw9LTy3gAs0SEU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GwMWkQAOwAHTRIpxxxPdFV6YrNXgaJ6uwBEgEubEIquUNC4S1LIuxHk8vG9VyteGeFtOBieuiwbOkew6puwBi5sI7AThODbKh2xuoooFUADcQA)
--
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] x轴为time类型的bar图指定x轴的min值时首个tick并没有位于x轴的最左侧(没有和y轴对齐) [echarts]
Posted by "Comee (via GitHub)" <gi...@apache.org>.
Comee commented on issue #18569:
URL: https://github.com/apache/echarts/issues/18569#issuecomment-2833396843
need fix
--
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
[GitHub] [echarts] Comee commented on issue #18569: [Bug] x轴为time类型的bar图指定x轴的min值时首个tick并没有位于x轴的最左侧(没有和y轴对齐)
Posted by "Comee (via GitHub)" <gi...@apache.org>.
Comee commented on issue #18569:
URL: https://github.com/apache/echarts/issues/18569#issuecomment-1524309358
@helgasoft In you demo,
if I remove xAxis.min, the first tick will be the dataset min value(2023-04-25 08:00:00 treat as 2023-04-25 00:00:00), but I want the first tick smaller than the dataset min value( such as 2023-04-22 00:00:00), so we should have a config property to ensure barWidth not affects ticks align yAxis behavior
--
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
[GitHub] [echarts] Comee commented on issue #18569: [Bug] x轴为time类型的bar图指定x轴的min值时首个tick并没有位于x轴的最左侧(没有和y轴对齐)
Posted by "Comee (via GitHub)" <gi...@apache.org>.
Comee commented on issue #18569:
URL: https://github.com/apache/echarts/issues/18569#issuecomment-1524334739
@helgasoft your demo xAxis fist tick is 2023-04-25 08:00:00 but not 2023-04-25 00:00:00.
Based on your demo, I have modified the time frame to make the problem more apparent.

[Modified Demo Code](https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWsCeBBAHhAzgFywDaa6y5Fs0AhgLYCmxA5IMryglHayDAhCwDRUKdJgBlgAY1qQYrehAAm8gDaN-g9MMYBxWiGIAmAKwDq6MBhDNYLAG60lAV1UnTc6MQDMx9bHq0cxAAs3qaw_gQiENBWSLD4ABbAAO7EYABOTrAAvi7U4fgAKhDiANbEsQnJqRmM2bkU-SK0AEaMSuVxiSmw6Zk5PvggShBgkdEdld0AZvb4tVmCC-gAui44uATEZNSoZha1oeiskExq6IPDYAByDvStaUewAGwuAPSv1G7UrPoADPoeAC0v0CgKMsF-v0IkOhvzOvn8hwoP3-QJBgI8vwhUJhkPh72awAc0HktDSGB0elgMyUczeryiYEYaTsSmRsA8T0h3JcjSiB3ZFS61T6vLwhWKJVME2FPRqdXIjRabW-yE6VTlovIFxGYwFsBlGppcwV6HeOrAWDSjFojyFGt6jD4YWttAAyuYVOVxMAlMA0qwAMQAMWD3N-TyeLCySwosdW5AA5mkFFtYiopmBiABOX7OsCgAx52ApxPxLOwACMxfijAgZYr1axWQT52ZEEYRFIgl2pk0rE48Oo5ksrGaZKHFHHaQA6gowPFiJXAvV0Eple01ZNiManbAQMB8CMoO5rAWQCxTaZGNAffIYrAAtYmLR8A5rQARKSMIqnZ0YVhWScfgemAX1ICpQFK2yRZyFbWBSTAV9GArbYKF7ah8CJNJxCsNDQliF830_b9fysFg_gBYFQXBX4AA5YVhECgKsDwAHYADpDCvAjfBtYjGC_JkyJRKj0UxKscSk5j7CcTxsxg0JllglYUCyABuIA)
--
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
[GitHub] [echarts] Comee commented on issue #18569: [Bug] x轴为time类型的bar图指定x轴的min值时首个tick并没有位于x轴的最左侧(没有和y轴对齐)
Posted by "Comee (via GitHub)" <gi...@apache.org>.
Comee commented on issue #18569:
URL: https://github.com/apache/echarts/issues/18569#issuecomment-1525049917
Yes , First tick is shifted half-barWidth.
I suggest we should give a choice to let user to choose shift or not (I don't want first tick shift but I can't prevent it).
When xAxis.type = value, it will not shift, but when xAxis.type = time, it shift half-barWidth, this is stranger.
--
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
[GitHub] [echarts] helgasoft commented on issue #18569: [Bug] x轴为time类型的bar图指定x轴的min值时首个tick并没有位于x轴的最左侧(没有和y轴对齐)
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18569:
URL: https://github.com/apache/echarts/issues/18569#issuecomment-1524912721
Here is how the first tick position depends on _barWidth_ :
1) barWidth: 1

2) barWidth :22

First tick is shifted **half-barWidth** from the zero position. The larger the barWidth, the larger the shift.
[Demo Code](https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWsCeBBAHhAzgFywDaa6y5Fs0AhgLYCmxA5IMryglHayDAhCwDRUKdJgBlgAY1qQYrehAAm8gDaN-g9MMYBxWiGIAmAKwDq6MBhDNYLAG60lAV1UnTc6MQDMx9bHq0cxAAs3qaw_gQiENBWSLD4ABbAAO7EYABOTrAAvi7U4fgAKhDiANbEsQnJqRmM2bkU-SK0AEaMSuVxiSmw6Zk5PvggShBgkdEdld0AZvb4tVmCC-gAui44uATEZNSoZha1oeiskExq6IPDYAByDvStaUewAGwubtSs-gAM-h4AtJ-BX5GWCfT6EUHgz5nXz-Q4UD7fP4AoEAdhBYIhoOhjSiB3hyE6VR6NTq5HyRVKpgmXWqfRcjRabXeBMmtPmLguIzGeNg1KJMyUc1J1CWsFW5AA5mkFFtYiopmBiABOT58HqgAyq2DSiXxRWwACMWvijAguv1Rs-2XF50Y0sYRFIgl2pk0rE40Oo5ksrGatDSnoofrSAHUFGB4gZ9PV0EpGe0WTTYAK5mqQMB8CMoO5rGBQCxhaZGNBxMB5DFYAFrExaPgHGlGAARKSMIqnNUYVh2RzOdXAJSQPSwX4G7KLcg22DyKS1xj67YUF3UfDAeviKwL0KxGt1hvNsCtiBMBE_f6A4GfAAckMh_Fg3acnhRADpDIWt75GLX602W22rCwXynsiwJGjeWJqg-VgeEqY6hMs44rCgWQANxAA)
--
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