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
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Reproducible example
In [8]: df=pl.DataFrame({'a':[1,2,3], 'b':[4,5,6], 'c': [7,8,9]})
In [9]: df.plot.line(x=alt.X('a', axis=alt.Axis(labelAngle=-90))).to_json()
---------------------------------------------------------------------------SchemaValidationErrorTraceback (mostrecentcalllast)
CellIn[9], line1---->1df.plot.line(x=alt.X('a', axis=alt.Axis(labelAngle=-90))).to_json()
File~/scratch/.venv/lib/python3.12/site-packages/altair/vegalite/v5/api.py:1899, inTopLevelMixin.to_json(self, validate, indent, sort_keys, format, ignore, context, **kwargs)
1897ifcontextisNone:
1898context= {}
->1899spec=self.to_dict(
1900validate=validate, format=format, ignore=ignore, context=context1901 )
1902returnjson.dumps(spec, indent=indent, sort_keys=sort_keys, **kwargs)
File~/scratch/.venv/lib/python3.12/site-packages/altair/vegalite/v5/api.py:3778, inChart.to_dict(self, validate, format, ignore, context)
3776copy.data=core.InlineData(values=[{}])
3777returnsuper(Chart, copy).to_dict(**kwds)
->3778returnsuper().to_dict(**kwds)
File~/scratch/.venv/lib/python3.12/site-packages/altair/vegalite/v5/api.py:1813, inTopLevelMixin.to_dict(self, validate, format, ignore, context)
1808context["top_level"] =False1810# TopLevelMixin instance does not necessarily have to_dict defined1811# but due to how Altair is set up this should hold.1812# Too complex to type hint right now->1813vegalite_spec: Any=super(TopLevelMixin, copy).to_dict( # type: ignore[misc]1814validate=validate, ignore=ignore, context=dict(context, pre_transform=False)
1815 )
1817# TODO: following entries are added after validation. Should they be validated?1818ifis_top_level:
1819# since this is top-level we add $schema if it's missingFile~/scratch/.venv/lib/python3.12/site-packages/altair/utils/schemapi.py:1076, inSchemaBase.to_dict(self, validate, ignore, context)
1069self.validate(result)
1070exceptjsonschema.ValidationErroraserr:
1071# We do not raise `from err` as else the resulting1072# traceback is very long as it contains part1073# of the Vega-Lite schema. It would also first1074# show the less helpful ValidationError instead of1075# the more user friendly SchemaValidationError->1076raiseSchemaValidationError(self, err) fromNone1077returnresultSchemaValidationError: `Tooltip`hasnoparameternamed'axis'Existingparameternamesare:
shorthandbinformattitleaggregateconditionformatTypetypebandPositionfieldtimeUnitSeethehelpfor`Tooltip`toreadthefulldescriptionoftheseparameters
Thank you for creating the issue and looking into it. FYI, I also got similar issues with .line(..., color=alt.Color(...).scale(...)) where parameter "scale" gets the same error
Checks
Reproducible example
Log output
No response
Issue description
this raises
Expected behavior
it shouldn't raise
Installed versions
The text was updated successfully, but these errors were encountered: