You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this code the limits of the x axis for male / female are evaluated separatly. Thus max. values for the x axis in both plots differ, which sometimes give an wrong impression of the distribution.
I´m trying to set both axis to the same max value ig the max value of the dataset
I´ve tried to use joinaggregate and use the evaluated parameter to scale :
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A population pyramid for the US in 2000.",
"data": { "url": "data/population.json"},
"transform": [
{"filter": "datum.year == 2000"},
{"calculate": "datum.sex == 2 ? 'Female' : 'Male'", "as": "gender"},
{ "joinaggregate":
[{
"op": "sum",
"field": "people",
"as": "MaxVal"
}]
}
],
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I´m trying to adopt a Population Pyramid code from https://vega.github.io/vega-lite/examples/concat_population_pyramid.html
In this code the limits of the x axis for male / female are evaluated separatly. Thus max. values for the x axis in both plots differ, which sometimes give an wrong impression of the distribution.
I´m trying to set both axis to the same max value ig the max value of the dataset
I´ve tried to use joinaggregate and use the evaluated parameter to scale :
and used it in
but it did´n work.
Any Ideas how to solve that?
Thanks!
original Code:
Beta Was this translation helpful? Give feedback.
All reactions