Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatched timeseries axes and labels in a Bar chart #8413

Closed
mmcf opened this issue Aug 28, 2018 · 7 comments
Closed

Mismatched timeseries axes and labels in a Bar chart #8413

mmcf opened this issue Aug 28, 2018 · 7 comments
Assignees
Labels
Misc/Timezones Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Type:Bug Product defects Visualization/
Milestone

Comments

@mmcf
Copy link

mmcf commented Aug 28, 2018

Using a custom question against a BigQuery view, I see a discrepancy between the timestamps reported in the axes and labels of a Bar chart. Incidentally, a Row chart displays correctly against the same data shows matched labels correctly.

  • Browser: Chrome v68.0.3440.106 (64-bit)
  • OS: OS X (v10.13.4)
  • Databases: Google BigQuery
  • Metabase version: 0.30.0 (using Docker image metabase/metabase:v0.30.0)
  • Hosted: on Google Kubernetes engine
  • Internal database: hosted via Google Cloud SQL PostgreSQL

Question definition

question_definition

Bar Chart
Incorrectly showing events from 24th August against the 23rd axes label

bar_mismatched_labels

Row Chart
Correctly showing events from 24th August against the 24th axes label (apologies, the axes label is very feint)
row_correct_labels

Raw Data

rawdata_correct_dates

BigQuery - view data
Subset of data showing event_timestamp field stored as TIMESTAMP with timezone information
bigquery_view_timestamp

Having read through some of the other issues referencing timezones as a potential cause (e.g. issues 2340, 5246 and PR 7247), I can confirm that the Metabase server is running in UTC timezone, Metabase "Report Timezone" is UTC, and the underlying raw data in Bigquery is stored with UTC timezone. My browser timezone is currently set as BST (GMT+1) - manually setting this to an earlier timezone (e.g. Azores/GMT) fixes the display of the Bar chart (bars then appear under the correct axis label).

@salsakran salsakran added Type:Bug Product defects Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Visualization/ Misc/Timezones labels Dec 28, 2018
@kakobrekla
Copy link

It was suggested to me to add my observation of likely same bug.

I see an offset between the timestamps and labels on the x-axis. This affects bar, line, area and line+bar chart. Data found in table 'visualization' (as seen below) is correct.

  • Browser: Chromium 67 (64-bit)
  • OS: Ubuntu 17.10
  • Databases: MariaDB 10.1
  • Metabase version: v0.31.2 (running jar)
  • Hosted: Debian stretch 9.6
  • Internal database: MariaDB 10.1

Question
metabase-question

Result
metabase-bug

Metabase jar is running with JAVA_TIMEZONE=UTC / -Duser.timezone=UTC, MariaDB is running in UTC zone, timestamp data is stored as unix timestamps.

Database timezone
metabase-time-diff

@tlrobinson
Copy link
Contributor

Probably related to #5916 and/or #5246

@mazameli mazameli moved this from P1 Bugs to Assigned in Bug Bashing Bonanza Aug 26, 2019
@paulrosenzweig paulrosenzweig moved this from Assigned to Worked On in Bug Bashing Bonanza Aug 26, 2019
@mazameli mazameli added this to the 0.33.2 milestone Sep 2, 2019
@antoine-lizee
Copy link

antoine-lizee commented Sep 16, 2019

This is exactly the bug reported (and diagnosed) here: #5246 (comment)

I objectively don't understand why this has been deprioritized for so long. Isn't any user of Metabase relying on time axes? 🤔

Anyways, I'm very happy to see it back in the milestone :-)

@camsaul camsaul modified the milestones: 0.33.2, 0.34.0 Sep 18, 2019
@paulrosenzweig paulrosenzweig added this to Issues in Timezones Oct 7, 2019
@smic-datalabs-von
Copy link

Is there a workaround on this? This is quite an issue that might lead to misunderstanding of data.

@paulrosenzweig
Copy link
Contributor

@smic-datalabs-von there's no workaround but a fix is coming. We've updated how Metabase communicates timezone info in its internal API. The next release shouldn't have this issue. Sorry for the delay in getting this fixed!

@antoine-lizee
Copy link

antoine-lizee commented Oct 28, 2019

@smic-datalabs-von I shared a quick fix in my previous diagnosis of this problem there.
Basically, start another instance of chrome with a custom timezone that matches the one from your DB & Metabase. I've had this other instance of chrome running for a few months now...

@mazameli mazameli modified the milestones: 0.34.0, 0.33.6 Nov 28, 2019
@mazameli
Copy link
Contributor

I'm pretty certain this is a duplicate of #4245, which, as I just noted there, is fixed in 0.33.6. Going to close this as such since I was able to repro this bug in 0.32.10, but it appears fixed for me in 0.33.6 and master. Please let me know if you're still experiencing this.

Bug Bashing Bonanza automation moved this from Worked On to Done Nov 28, 2019
Timezones automation moved this from Issues to Closed Issues Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Misc/Timezones Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Type:Bug Product defects Visualization/
Projects
No open projects
Timezones
  
Closed Issues
Development

Successfully merging a pull request may close this issue.

9 participants