metabase / metabase

The simplest, fastest way to get business intelligence and analytics to everyone in your company :yum:
https://metabase.com
Other
38.04k stars 5.05k forks source link

Bar chart thin with timeseries scale after europe change hour to winter #26210

Open watollop opened 1 year ago

watollop commented 1 year ago

Describe the bug It seems that after the Europe hour shift to winter, we are having trouble with charts using time series scales.

In the X I am using a date and a timeseries scale.

To Reproduce Steps to reproduce the behaviour: Generate any bar chart using timeseries, the charts are rarely thin.

Expected behaviour Bar charts size are like when we use ordinal scale

Screenshots

Captura de pantalla 2022-11-02 a las 10 52 47 Captura de pantalla 2022-11-02 a las 10 52 38 Captura de pantalla 2022-11-02 a las 11 40 38 Captura de pantalla 2022-11-02 a las 11 41 26

Severity Medium

Additional context The db that we are connected to is BQ.

Seems very similar to https://github.com/metabase/metabase/issues/3842

Metabase Diagnostic Info

{
  "browser-info": {
    "language": "es-ES",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.16.1+1",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.16.1",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.16.1+1",
    "os.name": "Linux",
    "os.version": "5.4.188+",
    "user.language": "en",
    "user.timezone": "Europe/Madrid"
  },
  "metabase-info": {
    "databases": [
      "oracle",
      "postgres",
      "bigquery-cloud-sdk",
      "h2"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "9.6.24"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.5.0"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2022-10-17",
      "tag": "v0.44.5",
      "branch": "release-x.44.x",
      "hash": "29fab4d"
    },
    "settings": {
      "report-timezone": "Europe/Madrid"
    }
  }
}
flamber commented 1 year ago

I can only reproduce if JVM timezone is also changed (ex. -Duser.timezone=Europe/Copenhagen), but I think that's just something specific to H2, though not entirely sure, which makes me wonder if it is FE. Reproduce:

  1. Start with non-UTC timezone
  2. Native > Sample
    select tz::timestamp with time zone, 1 from (
    select '2022-10-29T03:00:00.000+02:00' as tz
    union all
    select '2022-10-30T03:00:00.000+02:00' as tz
    union all
    select '2022-10-31T03:00:00.000+02:00' as tz
    union all
    select '2022-11-01T03:00:00.000+02:00' as tz
    )
  3. Change viz to Bar image