You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "andresghelarducci (via GitHub)" <gi...@apache.org> on 2023/12/17 17:28:56 UTC

[I] Wrong chart visualization in logarithmic scale [superset]

andresghelarducci opened a new issue, #26292:
URL: https://github.com/apache/superset/issues/26292

   A clear and concise description of what the bug is.
   
   #### How to reproduce the bug
   
   Create a stacked bar chart having metrics like the ones of the third image
   Set logarithmic scale
   
   ### Expected results
   
   I expected to see the rectangles for the 3 available values ( High, Medium, Low)
   
   ### Actual results
   
   Only 2 of 3 rectangles  are displayed ( High is missing, see first image), using linear scale no issues in the visualization ( see second image)
   is it possible that the problem is related to the fact that critical value is zero ( see third image) ?
   
   
   #### Screenshots
   
   **Logarithmic scale chart**
   ![immagine](https://github.com/apache/superset/assets/44871257/ef81c73c-c2f6-41b1-b6c9-99fb87f5f9ae)
   
   **Same chart in linear scale**
   ![immagine](https://github.com/apache/superset/assets/44871257/5bae8143-e4e9-4751-9bab-54f6ffd355f1)
   
   **Data to be visualized in chart**
   ![immagine](https://github.com/apache/superset/assets/44871257/8e389e8b-5f64-40e6-95ff-c19b79330b76)
   
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: Firefox
   - superset version: latest commit
   - python version: 3.9.18
   - node.js version: `node -v`
   - any feature flags active:
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [X] I have reproduced the issue with at least the latest released version of superset.
   - [X] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Wrong chart visualization in logarithmic scale [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #26292: Wrong chart visualization in logarithmic scale
URL: https://github.com/apache/superset/issues/26292


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Wrong chart visualization in logarithmic scale [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26292:
URL: https://github.com/apache/superset/issues/26292#issuecomment-2722752054

   This has been quiet for upward of a year again. I'm assuming it's still happening, but would appreciate if someone has time to confirm.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Wrong chart visualization in logarithmic scale [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26292:
URL: https://github.com/apache/superset/issues/26292#issuecomment-4043618075

   This has been confirmed as still occurring as recently as June 2025 (thanks @shexiaobin for the screenshot). The likely root cause is that logarithmic scales can't represent zero values (log(0) is undefined), which causes ECharts to drop or misrender stacked bar segments that include zeros.
   
   A good fix could involve either: (1) clamping zero values to a small epsilon when log scale is enabled, or (2) showing a clear warning when log scale is used with data containing zeros. The relevant code is likely in the ECharts bar chart plugin in `superset-frontend/plugins/plugin-chart-echarts/src/Bar/`.
   
   It would be great to see a PR for this — it's been open for over a year with confirmed reproduction. Last activity was approximately 9 months ago.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Wrong chart visualization in logarithmic scale [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26292:
URL: https://github.com/apache/superset/issues/26292#issuecomment-2978463881

   This one is still present in Superset/Preset as of today.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Wrong chart visualization in logarithmic scale [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26292:
URL: https://github.com/apache/superset/issues/26292#issuecomment-4748222281

   This appears to be the same logarithmic-scale stacked-bar rendering bug as #25829. Let's keep the discussion in one place — happy to keep whichever is preferred as canonical; please comment if you believe they differ.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Wrong chart visualization in logarithmic scale [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #26292:
URL: https://github.com/apache/superset/issues/26292#issuecomment-2065418519

   Quite right, still happening in 4.0
   
   Log axis off (fine):
   <img width="1728" alt="image" src="https://github.com/apache/superset/assets/812905/0b97297b-c30d-4285-b642-6e3d5e115ed8">
   
   Log axis on (problem):
   <img width="1396" alt="image" src="https://github.com/apache/superset/assets/812905/3f46798c-5e8e-4df8-a9e7-92e64f01e4bc">
   
   Note that there are 0 values in columns, a, b, and c, but for some reason only `a` seems to be a problem.
   
   The chart does this in vertical AND horizontal mode.
   
   Here's a query if anyone wants some mock data:
   
   ```sql
   SELECT fruit, a, b, c FROM (
       VALUES
       ('Apple', 0, 1, 2),
       ('Banana', 2, 3, 4),
       ('Cherry', 2, 1, 0),
       ('Date', 1, 2, 3),
       ('Elderberry', 2, 0, 2)
   ) AS temp_table (fruit, a, b, c);
   ```


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Wrong chart visualization in logarithmic scale [superset]

Posted by "shexiaobin (via GitHub)" <gi...@apache.org>.
shexiaobin commented on issue #26292:
URL: https://github.com/apache/superset/issues/26292#issuecomment-2750415977

   <img width="763" alt="Image" src="https://github.com/user-attachments/assets/b23b70ad-a7a7-41bd-a64d-c92f701214ed" /> 
   
   mee too


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org