Adityakashyap1011 opened a new pull request, #21369:
URL: https://github.com/apache/echarts/pull/21369

   ## Brief Information
   
   This pull request is in the type of:
   
   - [ ] bug fixing
   - [x] new feature
   - [ ] others
   
   ### What does this PR do?
   
   Changes the default brush selection mode from 'single' to 'multiple' and 
increases the opacity of selected areas from 0.1 to 1.0 for better visibility.
   
   ### Fixed issues
   
   - Brush selection now defaults to multiple mode for improved user experience
   - Selected area opacity increased from 0.1 to 1.0 for clearer visual feedback
   
   ## Details
   
   ### Before: What was the problem?
   
   **Issue 1: Brush Selection Mode**
   - The brush component defaulted to 'single' selection mode
   - Users had to manually click the "keep selection" button to enable multiple 
selections
   - Each new brush selection would replace the previous one by default
   - This required an extra step for a common use case (selecting multiple 
areas)
   
   **Issue 2: Selected Area Opacity**
   - The opacity of selected areas was set to 0.1, making them barely visible
   - Visual feedback for brush selections was too faint and unclear
   - Users had difficulty seeing which areas were selected
   
   ### After: How does it behave after the fixing?
   
   **Brush Selection Mode:**
   - The brush component now defaults to 'multiple' selection mode
   - The "keep selection" button is highlighted/emphasized by default
   - Users can make multiple brush selections immediately without any extra 
clicks
   - Each new selection adds to existing selections instead of replacing them
   - The brush mode is always set to 'multiple' for consistent behavior
   
   **Selected Area Opacity:**
   - Selected areas now have an opacity of 1.0 (fully opaque)
   - Provides clear and visible feedback for brushed regions
   - Significantly improves visual clarity when selecting multiple areas
   - Users can now clearly see all selected regions
   
   **Implementation details:**
   1. Changed `BrushModel.defaultOption.brushMode` from `'single'` to 
`'multiple'`
   2. Updated `Brush.ts` (toolbox feature) to default to `'multiple'` mode in 
the `render` method
   3. Modified `onclick` method to always use `'multiple'` mode
   4. Increased opacity of selected brush areas from 0.1 to 1.0
   
   ## Document Info
   
   One of the following should be checked.
   
   - [ ] This PR doesn't relate to document changes
   - [x] The document should be updated later
   - [ ] The document changes have been made in apache/echarts-doc#xxx
   
   **Note:** Documentation should be updated to reflect that brush selection 
now defaults to multiple mode and the changed opacity behavior of selected 
areas.
   
   ## Misc
   
   ### Security Checking
   
   - [x] This PR uses security-sensitive Web APIs.
   
   **Note:** No security-sensitive Web APIs are used in this PR.
   
   ### ZRender Changes
   
   - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx).
   
   ### Related test cases or examples to use the new APIs
   
   Test file created: `test/brush-multiple-test.html` to demonstrate the new 
default behavior and improved opacity settings.
   
   ### Merging options
   
   - [x] Please squash the commits into a single one when merging.
   
   ### Other information
   
   **Files modified:**
   - `src/component/brush/BrushModel.ts` - Changed default `brushMode` to 
`'multiple'` and increased opacity to 1.0
   - `src/component/toolbox/feature/Brush.ts` - Updated to always use 
`'multiple'` mode
   - `test/brush-multiple-test.html` - Added test file for verification
   
   **Breaking change consideration:** This changes default behavior but 
improves UX. The increased opacity provides much better visual feedback. Users 
who specifically want single-selection mode or different opacity can still 
configure it via options.
   
   
https://github.com/user-attachments/assets/4f719bf8-fcd1-465e-aa4a-e95d5ab6a0b4
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to