Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Markpoint of multiple series cannot be centered #19485

Closed
eavan5 opened this issue Jan 9, 2024 · 5 comments
Closed

[Bug] Markpoint of multiple series cannot be centered #19485

eavan5 opened this issue Jan 9, 2024 · 5 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@eavan5
Copy link

eavan5 commented Jan 9, 2024

Version

5.2.2

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoW7YCIzGAG0hEwC5k0MLsAnCAc1oFMqSsIwGBbTAGnIvUwBDAB4QAzgAVgEaO2alU_JVjABPEAxaYAxlWBixmPvwC-xk70q0aAExaLlmPAwBmYLQGYApD2OUatAAW7qSYACw-lo4ARsBgOFyh3r7KWNowYIIyADKC0Qx4LGBUAK4M5lECzozQdgp-GNgMwmAAymrO9g1KOvjA8lgAxABCYaOjRqlmFBbGmMIAgqKGpADa3WSplGoaWtqC7LT9qilbAiLiufmF9Wc9MnIAboI3sACMGzOVW5g2B4IsdZ3fiYABMAAZQR5wQBWU7AgTg-EIsGQ6EANmRwMwbyxd1RUPBAHY8WcwaSfhDCQAOCmpTAeOmOKnQgCcTJ6YQ5IJZbyR32xcIF-N5uOFZMx4spaLeoMmdwAuhtphgFd9MKoluJARsHGSdppQs88GV5UoVeg1XMxEwIAwVrAgco9T9oIIOIasGLPo0DVpooJmFLKH9MjqEY0IeCAHTg_k-pTQEp4PDB5lx2PxiPoJMptM9KOZ7kUXOphM8jNx4sYUv5isxqt1kvJsvZrCFxvl5t5ruRytZ7O13sCDtI8tW7F4PIFLptzDQfocF6ztuNMSBYAAdyKpQYTccIH0bCg0C0OCIw9gFq216-uvL8_dnvJdew6mfAaDD9DALWl9RDYDhGQ5zqO1Y5i2-4jv24GwCB2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ipiiLYRI-GoT0rP3frCBRe9Gjly0GTGMoJgEaJBPTCBjcoGt1gdvTuRie6Sz7nLBWli_bWLHnrA2xCTZkIodbNxDsaGr28QwvxcC_aBJzuwiih9QEnwiZgGOF9a6xIEvE0BiT0ahKFKk9AfJ0QZLYdk0IlNqYgLGcU7RujoFt38XLRBxjUHoO4JgxpRJmkELsSQzpLiqG9I8W8OhAzGHeyuUSUZYdxmeRCW_MJHFI5n1jtEnOizzTLLGas7OoDJSbPeL83ZoD9lehhNGdEBTMkCFOZA5uFyKnwJucgu55isFWI1ngsehC2n2McbPS2ri7bfJXn892rihm-2BYU_eHDQ6gumVHWZUTBGrkRQlNsSo4oZXfP6bKr4FJrEUXTDcQVYAuBeDaV8bBODtFUJ0SZ-IpqcKUaAQQ2g2AnFIJ_bMwjb4_DwDIBg5rLUQpRDaiVKJ7WOrUCwV1EZ3VkQYDUGwqtgCPCYNkGQB0WCGrwMah8ghoAQCXDC4Ku5lTGCVCYIAA

Steps to Reproduce

Check out the example on the link I posted above!

Current Behavior

I'm using multiple series and stuffing the markpoint data into the last series, I'm expecting the markpoint to be centered left and right on the x-axis for the corresponding option, but it's actually generating a positional cheapness.
I can center using a single series like this, but multiple series will cause misalignment.

Expected Behavior

The corresponding markpoint will be centered,I can center using a single series like this, but multiple series will cause misalignment.
https://echarts.apache.org/examples/en/editor.html?c=line-simple&version=5.2.2&code=PYBwLglsB2AEC8sDeAoW7YCIzGAG0hEwC5k0MLsAnCAc1oFMqSsIwGBbTAGnIvUwBDAB4QAzgAVgEaO2alU_JVjABPEAxaYAxlWBixmPvwC-xk70q0aAExaLlmPAwBmYLQGYApD2OUatAAW7qSYACw-lo4ARsBgOFyh3r7KWNowYIIyADKC0Qx4LGBUAK4M5lECzozQdgp-GNgMwmAAymrO9g1KOvjA8lgAxABCYaOjRqlmFBbGmMIAgqKGpADa3WSplGoaWtqC7LT9qilbAiLiufmF9Wc9MnIAboI3sACMGzOVW5g2B4IsdZ3fiYABMAAZQR5wQ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wiRttibMFm_DReNFyyNbHyML263lBO9xMaggTec9MJ35iRJ3uzTnC209pun6WtRkmWzFkLZHe3Oa5AvHfHIsXSn11RbKGei3Lk8vYPIIqzlRMl1rWCA6VStV8CNfZnXb4NxbiNCk36B8uindKyxiaPqvF-KE1ysTEeE0x4zSpvNIk096aM2DizeK4dOa2W5ntPmG9Y7C0TjLEKe8brp1ijLE-1MiSKyJpfL6lsb7_TvjrCuuUn53BfhGN-KIP5EW-gISUP93hpwAUTHuXoYTRnRAPLuo0SajymuPOBHNEGByZqgpeHNV68xjoLfB_lCHi33mnaKR81IUPgdQiBtDNh8LJkeTWjDMD311o_ZibClBKmrsqYU3RjBKhMEAA

Environment

No response

Any additional comments?

No response

@eavan5 eavan5 added the bug label Jan 9, 2024
@echarts-bot echarts-bot bot added the missing-title This issue is missing a descriptive title. label Jan 9, 2024
@echarts-bot echarts-bot bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2024

This comment has been minimized.

@eavan5 eavan5 changed the title [Bug] [Bug] Markpoint of multiple serirs cannot be centered Jan 9, 2024
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels Jan 9, 2024
@echarts-bot echarts-bot bot reopened this Jan 9, 2024
@echarts-bot echarts-bot bot removed the missing-title This issue is missing a descriptive title. label Jan 9, 2024
@eavan5 eavan5 changed the title [Bug] Markpoint of multiple serirs cannot be centered [Bug] Markpoint of multiple series cannot be centered Jan 9, 2024
@MatthiasMert
Copy link

You can correct for the missalignement by using symbolOffest: Example

@eavan5
Copy link
Author

eavan5 commented Jan 9, 2024

You can correct for the missalignement by using symbolOffest: Example

Thank you very much, I also thought of using this method to modify the offset, but the problem is that my data is dynamic, this parameter is related to the number of data, the size of the chart, etc., and I have not found a suitable scale formula to calculate the offset dynamically.

@MatthiasMert
Copy link

MatthiasMert commented Jan 9, 2024

What seems to be working quite fine is to use a second value axis to position the bars manually (which would also allow for the markPoints to be positioned via the value axis if applicable). Just make sure to use barGap: -0.999 or something similar for the bars to look decent.

Example

@eavan5
Copy link
Author

eavan5 commented Jan 9, 2024

What seems to be working quite fine is to use a second value axis to position the bars manually (which would also allow for the markPoints to be positioned via the value axis if applicable). Just make sure to use barGap: -0.999 or something similar for the bars to look decent.

Example

Thank you very much, this case is perfect.

@eavan5 eavan5 closed this as completed Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants