Skip to content
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

Raise an error if a non-existing field-name is specified together with a correct type #2825

Open
joelostblom opened this issue Jan 9, 2023 · 1 comment

Comments

@joelostblom
Copy link
Contributor

One thing I couldn't address in #2824 is when a non-existing column name is used with a correct data type. Currently that leads to an empty chart being created:

import altair as alt
from vega_datasets import data

alt.Chart(data.cars()).mark_point().encode(x='Horsepowers:Q')

image

It is not always easy to spot that there is a typo here, although there is some intuition in that if there is no data plotted then maybe there is an issue with the data column name. I don't know of an easy way to fix this because I think it suffers from all the same difficulties as mentioned in #2586 that it is complicated to determine which column names should be allowed in the spec. This might ideally be solved on the Vega-Lite side of things.

@mattijn
Copy link
Contributor

mattijn commented Feb 19, 2023

This can't be solved on the Vega-Lite side either since by design it doesn't see the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants