michaelmorera92 commented on PR #37405:
URL: https://github.com/apache/superset/pull/37405#issuecomment-3863110923
This ticket was tested. The application is working as expected.
# Scenarios tested
Verify the bar chart and values are correctly displayed when the values are
negative.
| Variant | Status |
| -------- | -------- |
| Negative values | :white_check_mark: |
| Positive values | :white_check_mark: |
| Vertical view | :white_check_mark: |
| Horizontal view | :white_check_mark: |
| Stacked Style: stack | :white_check_mark: |
| Stacked Style: none | :white_check_mark: |
## Steps
1. Create a stacked bar chart with mixed positive and negative values:
2. Go to http://<ephemeral_or_showtime>/sqllab and paste the "SQL Lab Query"
(provided later on this comment) script for ALL negative values
3. Press the "Create chart" button
4. Configure:
- Chart Type: Time-series Bar Chart
- X-axis: column1
- Metrics: SUM(column3)
- Customize tab:
- Show Value: ✓ Enable
- Stacked Style: Stack
## Expected result
After the step 4 (clicking the update chart button):
- Check the labels are positioned inside the bar at the very edge.
- Check the color scheme changed and make sure the label changes its color
to keep the color ratio according to AA standard
## SQL Lab Query
> WITH chart_data AS (
> SELECT *
> FROM (VALUES
> ('Bar 1', 'Segment A', -10),
> ('Bar 1', 'Segment B', -5),
> ('Bar 2', 'Segment A', -7),
> ('Bar 2', 'Segment B', -3),
> ('Bar 3', 'Segment A', -12),
> ('Bar 3', 'Segment B', -6)
> ) AS t(bar, segment, value)
> )
> SELECT *
> FROM chart_data;
## Evidence
### Negative, fixed and not fixed comparison.

### Color changes also applied correctly to positive values.
<img width="1914" height="999" alt="Screenshot 2026-02-06 at 5 51 24 PM"
src="https://github.com/user-attachments/assets/e4809709-5dcb-49fc-8aae-c8478631d489"
/>
--
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]