-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Embedded grapher doesn't respect time query param #4437
Comments
This might be fixed in the new narrative views. Check whether it's still a problem there. |
this problem happens here: owid-grapher/packages/@ourworldindata/grapher/src/core/Grapher.tsx Lines 1479 to 1503 in 9d17404
in particular, if hasTimeDimensionButTimelineIsHidden is true (which is the case here, because the timeline is - by default - hidden in this narrative embed), then the timeline is explicitly set to the config as authored, disregarding any query params.This choice makes sense for users visiting a grapher page with a hidden timeline, but maybe doesn't make sense for our own embeds. |
Thanks for reporting! This can now be done with narrative charts (Pablo A just did this for one chart - I think the one you are talking about here). Because of this, I'd say we wont fix the issue described by Marcel for now, unless we find another good reason to do so. |
Description
The article about the Gini coefficient includes an edited version of this chart about the change in three metrics of inequality. In the article, the chart subtitle says: "The percentage change relative to initial levels (in 1990, or 2001 for Uruguay). For example, a change in Gini from 0.4 to 0.5 would be shown as +25%." This chart was set to start from 1990 in the URL on the Gdoc, but it's not being picked up.
From my quick investigation, it looks like the parsing of the query param fails in Grapher.
Expected behaviour
The chart embedded in the article should start from the year specified in the URL.
Additional context
See related Slack thread.
Relates to https://github.com/owid/owid-issues/issues/1804.
The text was updated successfully, but these errors were encountered: