Screenshot
Description
version: 1.4.1
bubble chart, date type column as x axis, but want to display as yyyy-MM-dd
, e.g. 2022-01-31 not 1643587200000
could support it?
Comment From: sfirke
Do you have the GENERIC_CHART_AXIS flag enabled? I'm guessing not if you're still on 1.4.1 but this seems like a similar problem to https://github.com/apache/superset/issues/20074.
Comment From: rusackas
Closing since we haven't heard back. Happy to re-open if this is an issue in 3.x or newer.
Comment From: bartoszx
Superset does not recognize datetime column alias from Virtual Dataset as X-Axis
Hi, I’m having what seems to be the exact same issue as described in https://github.com/apache/superset/issues/21267
Problem:
I have a Virtual Dataset using a SQL query with a datetime alias:
SELECT
operator,
FROM_UNIXTIME(slot_5min) AS slot_dt,
MAX(request_time) AS max_request_time
FROM requests
GROUP BY operator, slot_dt
In Dataset > Columns, I have set the following for slot_dt
:
- Is temporal = true
- Is dimension = true
- Default datetime = true
But in Explore (Bubble Chart / Scatter Plot):
slot_dt
does not appear in X-Axis or Time Column- It shows up only in metrics (fx(...))
- I cannot plot by time – it falls back to numeric axis (1.75e+12 format)
Workarounds tried:
- Refresh dataset columns
- Re-create chart from scratch
- Clear browser cache
- Create calculated column (still string)
- Create view in database (fails)
- Use physical DATETIME column in a raw table (fails too)
- Tried all combinations — none allow proper datetime usage on the X-Axis in Bubble Chart
Setup:
- Superset version: 5.0.0 (Docker, TAG=5.0.0)
- Database: MariaDB 10.11.13
- Dataset: virtual (not physical table)
Superset FEATURE_FLAGS:
FEATURE_FLAGS = {
"GLOBAL_ASYNC_QUERIES": False,
"ENABLE_TEMPLATE_REMOVE_FILTERS": True,
"DASHBOARD_NATIVE_FILTERS": True,
"DASHBOARD_NATIVE_FILTERS_SET": True,
"ENABLE_EXPLORE_DRAG_AND_DROP": True,
"ENABLE_DND_WITH_CLICK_UX": True,
"OMNIBAR": True,
"GENERIC_CHART_AXES": True,
"DASHBOARD_CACHE": True,
"ALERT_REPORTS": True,
"ENABLE_TEMPLATE_PROCESSING": True,
# optionally:
"SQL_VALIDATORS_BY_ENGINE": {
"mysql": "MySQLValidator",
},
}
Expected:
Column slot_dt
should be treated as a proper DATETIME field and selectable in X-axis and time filter controls.
Let me know if I can provide a dataset export, dashboard JSON, or steps to reproduce.