Open mattijn opened 1 year ago
Hi @mattijn, my first impression is to be pretty hesitant to add this kind of extra feature to Altair, just because these extras seem to cause the most difficulties in regards to maintenance (like allowing parameters to be added in more places than Vega-Lite does). Do you see any reason this would be easier to accomplish in Altair vs in Vega-Lite? If not, I'd vote for trying to add it to Vega-Lite instead if it's a feature we'd like.
I believe this is where the translation you mentioned for point=True
happens in Vega-Lite: https://github.com/vega/vega-lite/blob/next/src/normalize/pathoverlay.ts
Even better if we can solve it on the vega-lite side.
I still have to get used to a short vega-lite specification and the possibility of expanding or extending a vega-lite specification.
In hindsight maybe we could have exploited that more for the parameters as well.
I agree! Would you like to open an issue in Vega-Lite, partially to hear if this is something they see as plausible?
My vote would also be to try to solve things like this that are within the scope of Vega-Lite on their side.
I'll repost in this message if I find a more fleshed out explanation, but here is a brief one by Jake: https://stackoverflow.com/a/64422039
A layer chart is not allowed to contain a facet encoding... (the reason for this is that the semantics of layers containing incompatible facets is unclear).
+1 to the answer above. (I'm a co-author of Vega-Lite.)
Thanks @ChristopherDavisUCI for bringing info why this is currently not supported. Thanks @kanitw for chiming in!
I hope you don't mind if I ask one more question. I understand this will not work when there are different incompatible facets defined within the subcharts (that should raise an error) but in the case of above, the facets are identical and compatible. Will this trigger the same semantic issue?
Suggestion for enhancement based on the discussion that started here: https://github.com/altair-viz/altair/pull/2874:
The following altair specification will fail:
But this works:
The last one works, because Vega-Lite is actually¹ translating this into:
Is it feasible or desirable to do the same lifting on the Altair side?