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
UTC dates don't display properly in tooltips #7185
Comments
It looks like this also affects the {
"data": {"values": [{"date": "2021-01-01"}]},
"mark": "text",
"encoding": {
"text": {"field": "date", "timeUnit": "utcyearmonthdatehours"},
"x": {"field": "date", "timeUnit": "utcyearmonthdatehours"}
}
} |
Ahh, the joy of time zones again. @rnvarma can you look into what's going on in the Vega specs? It would help us immensely scope the effort for the fix. |
the config for the
The date value itself in the data is |
I'm also running into this for point charts. Apologies if this isn't a minimal example, I'm new to Vega-Lite. {
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{"Date": "2020-01-01", "Value": 10}
]
},
"mark": {"type": "point", "tooltip": true, "point": true},
"height": "container",
"width": "container",
"encoding": {
"x": {"field": "Date", "type": "temporal"},
"y": {"field": "Value", "type": "quantitative"},
"opacity": {"condition": {"param": "hover", "value": 1}, "value": 0.1},
},
"title": {"text": "Diff"},
"params": [
{
"name": "hover",
"bind": "legend",
"select": {"type": "point", "fields": ["symbol"]}
}
]
} |
@jakevdp Do you plan to upgrade the altair version so it supports |
Still running into this issue. Any ETA for a fix? |
I haven't had cycles to look into this yet. Can you investigate and maybe send a pull request? |
I can take a look. I had thought the workaround wasn't working, but it actually does. The schema has a squiggle under the value, but I am learning that shouldn't always be trusted. |
Anyone find a solution for this issue yet? I was going crazy thinking there was an issue with my data or how my data was read by altair, but finally realized it's an error in how altair renders the mark line tooltip. |
You can add My PR fixes the issue but I wasn't able to get it merged because of the github access token. It still might be worth trying to merge that, @domoritz |
That worked - thank you! |
Did that PR make it in? If so, what version fixes this? |
No, I wasn’t able to get the support I needed to get the fix merged in.
…On Wed, Sep 6, 2023 at 6:46 AM Justin Sherman ***@***.***> wrote:
You can add "scale": { "type": "utc" } to the encoding as a workaround.
My PR fixes the issue but I wasn't able to get it merged because of the
github access token. It still might be worth trying to merge that,
@domoritz <https://github.com/domoritz>
Did that PR make it in? If so, what version fixes this?
—
Reply to this email directly, view it on GitHub
<#7185 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAK2WEQB225RUBJPEKUJXTXZBIANANCNFSM4WSQEG5Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Here is a short example (open in editor):
Despite showing identical fields with identical timeUnits, the date shown in the tooltip and the date shown on the axis label disagree.
Note that a workaround is to use
"scale": {"type": "utc"}
in the tooltip (view in editor), but I don't think this should be necessary:The text was updated successfully, but these errors were encountered: