Skip to content

Commit

Permalink
Make facet error more informative (#3264)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelostblom authored Nov 14, 2023
1 parent 6cc31d6 commit bf52ed1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion altair/vegalite/v5/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2766,7 +2766,10 @@ def facet(
# Remove "ignore" statement once Undefined is no longer typed as Any
if self.data is Undefined: # type: ignore
raise ValueError(
"Facet charts require data to be specified at the top level."
"Facet charts require data to be specified at the top level. "
"If you are trying to facet layered or concatenated charts, "
"ensure that the same data variable is passed to each chart "
"or specify the data inside the facet method instead."
)
# ignore type as copy comes from another class
self = self.copy(deep=False) # type: ignore[attr-defined]
Expand Down

0 comments on commit bf52ed1

Please sign in to comment.