msyavuz opened a new pull request, #36890: URL: https://github.com/apache/superset/pull/36890
### SUMMARY Fixes an error that occurs when using a fixed point size in the deck.gl Scatterplot chart. The issue was caused by the chart incorrectly treating fixed radius values as metric names, attempting to query for a field that doesn't exist in the data. **Root Cause:** - The `getMetricLabelFromFormData` function was returning the fixed value (e.g., "1000") as a metric label even when `point_radius_fixed.type` was "fix" - This caused the query builder to look for a metric field named "1000" which doesn't exist - The transformation layer was trying to access this non-existent field from the data records **Fix:** - Updated `getMetricLabelFromFormData` to only return metric labels when type is "metric", returning undefined for fixed values - Modified `buildQuery` to only include metrics in the query when using metric-based radius - Updated `transformProps` to properly handle fixed radius values by applying them directly to all points ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF **Before:** Chart throws an error when setting Point Size to a fixed value **After:** Chart renders correctly with the specified fixed point size for all data points ### TESTING INSTRUCTIONS 1. Create a deck.gl Scatterplot chart 2. In the chart configuration, set "Point Size" control to "Fixed" 3. Enter any numeric value (e.g., 1000) 4. The chart should render without errors, with all points having the same size 5. Switch back to "Based on a metric" and select a metric - verify this still works 6. Run the new tests: `npm test -- plugins/legacy-preset-chart-deckgl/src/layers/Scatter` ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: None - [x] Changes UI: Fixes broken functionality, no visual changes to working features - [ ] Includes DB Migration: No - [ ] Introduces new feature or API: No - [ ] Removes existing feature or API: No **Testing:** - Added comprehensive test coverage with 43 new tests across 3 test files - Tests cover both fixed and metric-based point radius scenarios - Tests follow the "avoid nesting when testing" principle with flat test() statements - All tests passing successfully 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> -- 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]
