You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "dilipkumar6306316-art (via GitHub)" <gi...@apache.org> on 2026/01/03 14:15:04 UTC

[PR] fix(legend): fallback to horizontal if orient is invalid [echarts]

dilipkumar6306316-art opened a new pull request, #21450:
URL: https://github.com/apache/echarts/pull/21450

   ### Summary
   This PR fixes a bug in the Legend component (#21400) where providing an invalid
   `legend.orient` value caused unexpected width/height behavior in scroll legends.
   
   ### Changes
   - Added a safety check for `legend.orient` index
   - Fallback to 'horizontal' if orient value is invalid
   - Added a comment above the safety check explaining the reason
   - Ensures existing behavior for valid `horizontal` and `vertical` orient values remains unchanged
   
   ### Testing
   - Verified that invalid orient values no longer break layout
   - Confirmed that valid 'horizontal' and 'vertical' orient continue to work as expected
   - Manual testing with scroll legend examples
   
   ### Related Issue
   Closes #21400
   


-- 
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: [PR] fix(legend): fallback to horizontal if orient is invalid [echarts]

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on PR #21450:
URL: https://github.com/apache/echarts/pull/21450#issuecomment-3707082450

   Thanks for your contribution!
   The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/echarts/wiki/How-to-make-a-pull-request).
   
   Please **DO NOT** commit the files in [dist](https://github.com/apache/echarts/tree/master/dist), [i18n](https://github.com/apache/echarts/tree/master/i18n), and [ssr/client/dist](https://github.com/apache/echarts/tree/master/ssr/client/dist) folders in a non-release pull request. These folders are for release use only.
   
   To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: `PR: doc ready`, `PR: awaiting doc`, `PR: doc unchanged`
   
   This message is shown because the PR description doesn't contain the document related template.


-- 
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: [PR] fix(legend): fallback to horizontal if orient is invalid [echarts]

Posted by "Justin-ZS (via GitHub)" <gi...@apache.org>.
Justin-ZS commented on PR #21450:
URL: https://github.com/apache/echarts/pull/21450#issuecomment-3707582870

   I suggest not fixing this case, as invalid `orient` are widely used as a workaround for multiple line scroll legend. ([16912](https://github.com/apache/echarts/issues/16912))


-- 
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: [PR] fix(legend): fallback to horizontal if orient is invalid [echarts]

Posted by "dilipkumar6306316-art (via GitHub)" <gi...@apache.org>.
dilipkumar6306316-art commented on PR #21450:
URL: https://github.com/apache/echarts/pull/21450#issuecomment-3707649117

   Thanks for the clarification and for sharing the context.
   
   I checked the referenced issue (#16912) as well and understand that fixing this
   case was intentionally avoided earlier, since invalid `orient` values are
   already being used by users as a workaround for multi-line scroll legends.
   Changing this behavior could break existing usage and affect scenarios where
   multiple scroll legends are created.
   
   Given this context, I understand that fixing this case in code might not be
   desirable. I’ll wait for your guidance on whether this should be handled via
   documentation instead, or if the PR should be closed.


-- 
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