diff --git a/altair/jupyter/js/index.js b/altair/jupyter/js/index.js index 597738a90..58b936091 100644 --- a/altair/jupyter/js/index.js +++ b/altair/jupyter/js/index.js @@ -1,4 +1,4 @@ -import vegaEmbed from "https://esm.sh/vega-embed@6?deps=vega@5&deps=vega-lite@5.19.0"; +import vegaEmbed from "https://esm.sh/vega-embed@6?deps=vega@5&deps=vega-lite@5.20.1"; import lodashDebounce from "https://esm.sh/lodash-es@4.17.21/debounce"; // Note: For offline support, the import lines above are removed and the remaining script diff --git a/altair/utils/_importers.py b/altair/utils/_importers.py index a71e18f71..14085ebcf 100644 --- a/altair/utils/_importers.py +++ b/altair/utils/_importers.py @@ -41,7 +41,7 @@ def import_vegafusion() -> ModuleType: def import_vl_convert() -> ModuleType: - min_version = "1.5.0" + min_version = "1.6.0" try: version = importlib_version("vl-convert-python") if Version(version) < Version(min_version): diff --git a/altair/vegalite/v5/schema/__init__.py b/altair/vegalite/v5/schema/__init__.py index 29c19160d..1f099eaca 100644 --- a/altair/vegalite/v5/schema/__init__.py +++ b/altair/vegalite/v5/schema/__init__.py @@ -3,6 +3,6 @@ from .core import * from .channels import * -SCHEMA_VERSION = "v5.19.0" +SCHEMA_VERSION = "v5.20.1" -SCHEMA_URL = "https://vega.github.io/schema/vega-lite/v5.19.0.json" +SCHEMA_URL = "https://vega.github.io/schema/vega-lite/v5.20.1.json" diff --git a/altair/vegalite/v5/schema/core.py b/altair/vegalite/v5/schema/core.py index 0e24cd59f..1de4c83de 100644 --- a/altair/vegalite/v5/schema/core.py +++ b/altair/vegalite/v5/schema/core.py @@ -18532,6 +18532,10 @@ class ScaleConfig(VegaLiteSchema): round : bool, dict, :class:`ExprRef` If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. (Only available for ``x``, ``y``, and ``size`` scales.) + tickBandPaddingInner : dict, float, :class:`ExprRef` + Default inner padding for ``x`` and ``y`` band-ordinal scales of ``"tick"`` marks. + + **Default value:** ``0.25`` useUnaggregatedDomain : bool Use the source data range before aggregation as scale domain instead of aggregated data for aggregate axis. @@ -18596,6 +18600,9 @@ def __init__( dict | float | Parameter | SchemaBase ] = Undefined, round: Optional[bool | dict | Parameter | SchemaBase] = Undefined, + tickBandPaddingInner: Optional[ + dict | float | Parameter | SchemaBase + ] = Undefined, useUnaggregatedDomain: Optional[bool] = Undefined, xReverse: Optional[bool | dict | Parameter | SchemaBase] = Undefined, zero: Optional[bool] = Undefined, @@ -18627,6 +18634,7 @@ def __init__( quantizeCount=quantizeCount, rectBandPaddingInner=rectBandPaddingInner, round=round, + tickBandPaddingInner=tickBandPaddingInner, useUnaggregatedDomain=useUnaggregatedDomain, xReverse=xReverse, zero=zero, @@ -26730,6 +26738,13 @@ class VariableParameter(TopLevelParameter): An expression for the value of the parameter. This expression may include other parameters, in which case the parameter will automatically update in response to upstream parameter changes. + react : bool + A boolean flag (default ``true``) indicating if the update expression should be + automatically re-evaluated when any upstream signal dependencies update. If + ``false``, the update expression will not register any dependencies on other + signals, even for initialization. + + **Default value:** ``true`` value : Any The `initial value `__ of the parameter. @@ -26744,10 +26759,13 @@ def __init__( name: Optional[str | SchemaBase] = Undefined, bind: Optional[dict | SchemaBase] = Undefined, expr: Optional[str | SchemaBase] = Undefined, + react: Optional[bool] = Undefined, value: Optional[Any] = Undefined, **kwds, ): - super().__init__(name=name, bind=bind, expr=expr, value=value, **kwds) + super().__init__( + name=name, bind=bind, expr=expr, react=react, value=value, **kwds + ) class Vector10string(VegaLiteSchema): diff --git a/altair/vegalite/v5/schema/vega-lite-schema.json b/altair/vegalite/v5/schema/vega-lite-schema.json index ec1d9ffc3..b6c6b5a1f 100644 --- a/altair/vegalite/v5/schema/vega-lite-schema.json +++ b/altair/vegalite/v5/schema/vega-lite-schema.json @@ -22237,6 +22237,19 @@ ], "description": "If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. (Only available for `x`, `y`, and `size` scales.)" }, + "tickBandPaddingInner": { + "anyOf": [ + { + "type": "number" + }, + { + "$ref": "#/definitions/ExprRef" + } + ], + "description": "Default inner padding for `x` and `y` band-ordinal scales of `\"tick\"` marks.\n\n__Default value:__ `0.25`", + "maximum": 1, + "minimum": 0 + }, "useUnaggregatedDomain": { "description": "Use the source data range before aggregation as scale domain instead of aggregated data for aggregate axis.\n\nThis is equivalent to setting `domain` to `\"unaggregate\"` for aggregated _quantitative_ fields by default.\n\nThis property only works with aggregate functions that produce values within the raw data domain (`\"mean\"`, `\"average\"`, `\"median\"`, `\"q1\"`, `\"q3\"`, `\"min\"`, `\"max\"`). For other aggregations that produce values outside of the raw data domain (e.g. `\"count\"`, `\"sum\"`), this property is ignored.\n\n__Default value:__ `false`", "type": "boolean" @@ -31631,6 +31644,10 @@ "$ref": "#/definitions/ParameterName", "description": "A unique name for the variable parameter. Parameter names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or \"$\", or \"_\") and may not start with a digit. Reserved keywords that may not be used as parameter names are \"datum\", \"event\", \"item\", and \"parent\"." }, + "react": { + "description": "A boolean flag (default `true`) indicating if the update expression should be automatically re-evaluated when any upstream signal dependencies update. If `false`, the update expression will not register any dependencies on other signals, even for initialization.\n\n __Default value:__ `true`", + "type": "boolean" + }, "value": { "description": "The [initial value](http://vega.github.io/vega-lite/docs/value.html) of the parameter.\n\n__Default value:__ `undefined`" } diff --git a/tests/vegalite/v5/test_api.py b/tests/vegalite/v5/test_api.py index 167b71ed5..29d68d1ea 100644 --- a/tests/vegalite/v5/test_api.py +++ b/tests/vegalite/v5/test_api.py @@ -811,19 +811,15 @@ def test_to_url(basic_chart): pytest.skip("vl_convert is not installed") share_url = basic_chart.to_url() - expected_vegalite_encoding = "N4Igxg9gdgZglgcxALlANzgUwO4tJKAFzigFcJSBnAdTgBNCALFAZgAY2AacaYsiygAlMiRoVYcAvpO50AhoTl4QUOQFtMKEPMUBaAOwA2ABwAWFi1NyTcgEb7TtuabAswc-XTZhMczLdNDAEYQGRA1OQAnAGtlQgBPAAdNZBAnSNDuTChIOhIkVBAAD2V4TAAbOi0lbgTkrSgINRI5csyQeNKsSq1bEFqklJAAR1I5IjhFYjRNaW4AEkowRkwIrTFCRMpkAHodmYQ5ADoEScZSWyO4CB2llYj9zEPdcsnMfYBWI6CATiO2I4AK0o0H62gUckomEIlGUOjkBhM5ks1mMdgcThcbg8Xh8fgCwRQAG1QEpUgBBMF9ZAAJmMMlJWgAQlSUB8PgyQGSQABhVnIcyc7kAEX5PyCQq0AFF+cYJZxGakAGL8j4sSWpADi-N+GpAgll+j1AElVTTJABdaRAA" - assert ( - share_url - == f"https://vega.github.io/editor/#/url/vega-lite/{expected_vegalite_encoding}" - ) + assert share_url.startswith("https://vega.github.io/editor/#/url/vega-lite/") # Check fullscreen fullscreen_share_url = basic_chart.to_url(fullscreen=True) - assert ( - fullscreen_share_url - == f"https://vega.github.io/editor/#/url/vega-lite/{expected_vegalite_encoding}/view" + assert fullscreen_share_url.startswith( + "https://vega.github.io/editor/#/url/vega-lite/" ) + assert fullscreen_share_url.endswith("/view") def test_facet_basic(): diff --git a/tools/generate_schema_wrapper.py b/tools/generate_schema_wrapper.py index cdbfb0576..e73902da3 100644 --- a/tools/generate_schema_wrapper.py +++ b/tools/generate_schema_wrapper.py @@ -30,7 +30,7 @@ spell_literal, ) -SCHEMA_VERSION: Final = "v5.19.0" +SCHEMA_VERSION: Final = "v5.20.1" reLink = re.compile(r"(?<=\[)([^\]]+)(?=\]\([^\)]+\))", re.MULTILINE) reSpecial = re.compile(r"[*_]{2,3}|`", re.MULTILINE)