apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
61.74k stars 13.49k forks source link

Y Axis boundaries on Line/Area/Bar charts remove values rather than truncating. #27449

Open rusackas opened 6 months ago

rusackas commented 6 months ago

Bug description

Y axis truncation doesn't truncate the lines/areas, it deletes the data point entirely

How to reproduce the bug

  1. Create a dataset from this sample query:

    SELECT 1 AS value, '2023-01-01'::date AS date
    UNION ALL
    SELECT 2, '2023-01-02'::date
    UNION ALL
    SELECT 3, '2023-01-03'::date
    UNION ALL
    SELECT 4, '2023-01-04'::date
    UNION ALL
    SELECT 1000, '2023-01-05'::date
    UNION ALL
    SELECT 4, '2023-01-06'::date
    UNION ALL
    SELECT 2, '2023-01-07'::date
    UNION ALL
    SELECT 3, '2023-01-08'::date
    UNION ALL
    SELECT 4, '2023-01-09'::date
    UNION ALL
    SELECT 2, '2023-01-10'::date
    UNION ALL
    SELECT 3, '2023-01-11'::date
    UNION ALL
    SELECT 4, '2023-01-12'::date
    UNION ALL
    SELECT 2, '2023-01-13'::date
    UNION ALL
    SELECT 3, '2023-01-14'::date
    UNION ALL
    SELECT 4, '2023-01-15'::date
    UNION ALL
    SELECT 3, '2023-01-16'::date
    UNION ALL
    SELECT 4, '2023-01-17'::date
    UNION ALL
    SELECT 2, '2023-01-18'::date
    UNION ALL
    SELECT 3, '2023-01-19'::date
    UNION ALL
    SELECT 4, '2023-01-20'::date;
  2. Create a line chart (or area chart) plotting this time series. Awesome:

image

Now turn on Y Axis truncation, and set the Max value to something less than our high peak of 1000.

image

Expected result - proper truncation (in 3.0)

image

Acutal result - that data point on the 5th is just GONE:

image

Screenshots/recordings

See above.

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

I love this new issue submission form!!!

Checklist

rusackas commented 6 months ago

Same is happening on Bar charts, it seems:

image

becomes

image
rusackas commented 1 month ago

This is still happening as of today...