apache / superset

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

The content displayed in the calendar chart is missing #29514

Open wycweb opened 4 months ago

wycweb commented 4 months ago

Bug description

When the selected date range is less than a month, The content displayed in the calendar chart is missing.

image

How to reproduce the bug

When the selected date range more than a month,the chart is displaying normally.

image

When the selected date range is less than a month,The content displayed in the calendar chart is missing.

image image

Screenshots/recordings

https://github.com/apache/superset/assets/30263765/40d94525-27e8-4522-816b-31888c126a9c

Superset version

4.0.1

Python version

3.10

Node version

16

Browser

Chrome

Additional context

No response

Checklist

dosubot[bot] commented 4 months ago

Hi @wycweb! I'm here to assist you with your bug report. I can help you solve bugs, answer questions, and become a contributor. Let's work together to resolve the issue.

The content displayed in the calendar chart is missing when the selected date range is less than a month because the default domain setting is set to 'hour', and the range option is set to 12. This configuration is designed to display data in hourly intervals over a span of 12 hours by default. If the selected date range is less than a month, it might not fit well within these settings, leading to missing content in the calendar chart.

To fix this, you can adjust the domain and range settings to better fit the selected date range. For example, you can change the domain to 'day' and adjust the range accordingly:

this.options = {
  // ... other settings ...

  // DOMAIN
  domain: 'day', // Change domain to 'day'
  range: 7, // Adjust range to fit the selected date range

  // ... other settings ...
};

By adjusting these settings, the calendar chart should display the content correctly for the selected date range [1].

To continue talking to Dosu, mention @dosu.

rusackas commented 4 months ago

This seems like it relates to https://github.com/apache/superset/issues/21870