@@ -913,14 +913,17 @@ def then(self, statement: _StatementType, /, **kwds: Any) -> Then[Any]:
913913 A spec or value to use when the preceding :func:`.when()` clause is true.
914914
915915 .. note::
916- ``str`` will be encoded as `shorthand<https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands>`__ .
916+ ``str`` will be encoded as `shorthand`_ .
917917 **kwds
918918 Additional keyword args are added to the resulting ``dict``.
919919
920920 Returns
921921 -------
922922 :class:`Then`
923923
924+ .. _shorthand:
925+ https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands
926+
924927 Examples
925928 --------
926929 Simple conditions may be expressed without defining a default::
@@ -990,10 +993,12 @@ def otherwise(
990993 Roughly equivalent to an ``else`` clause.
991994
992995 .. note::
993- ``str`` will be encoded as `shorthand<https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands>`__ .
996+ ``str`` will be encoded as `shorthand`_ .
994997 **kwds
995998 Additional keyword args are added to the resulting ``dict``.
996999
1000+ .. _shorthand:
1001+ https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands
9971002
9981003 Examples
9991004 --------
@@ -1071,14 +1076,16 @@ def when(
10711076 When ``predicate`` is a ``Parameter`` that is used more than once,
10721077 ``alt.when().then().when(..., empty=...)`` provides granular control for each occurrence.
10731078 **constraints
1074- Specify `Field Equal Predicate <https://vega.github.io/vega-lite/docs/predicate.html#equal-predicate>`__ 's.
1079+ Specify `Field Equal Predicate`_ 's.
10751080 Shortcut for ``alt.datum.field_name == value``, see examples for usage.
10761081
10771082 Returns
10781083 -------
10791084 :class:`ChainedWhen`
10801085 A partial state which requires calling :meth:`ChainedWhen.then()` to finish the condition.
10811086
1087+ .. _Field Equal Predicate:
1088+ https://vega.github.io/vega-lite/docs/predicate.html#equal-predicate
10821089
10831090 Examples
10841091 --------
@@ -1176,14 +1183,17 @@ def then(self, statement: _StatementType, /, **kwds: Any) -> Then[_Conditions]:
11761183 A spec or value to use when the preceding :meth:`Then.when()` clause is true.
11771184
11781185 .. note::
1179- ``str`` will be encoded as `shorthand<https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands>`__ .
1186+ ``str`` will be encoded as `shorthand`_ .
11801187 **kwds
11811188 Additional keyword args are added to the resulting ``dict``.
11821189
11831190 Returns
11841191 -------
11851192 :class:`Then`
11861193
1194+ .. _shorthand:
1195+ https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands
1196+
11871197 Examples
11881198 --------
11891199 Multiple conditions with an implicit default::
@@ -1247,7 +1257,7 @@ def when(
12471257 When ``predicate`` is a ``Parameter`` that is used more than once,
12481258 ``alt.when(..., empty=...)`` provides granular control for each occurrence.
12491259 **constraints
1250- Specify `Field Equal Predicate <https://vega.github.io/vega-lite/docs/predicate.html#equal-predicate>`__ 's.
1260+ Specify `Field Equal Predicate`_ 's.
12511261 Shortcut for ``alt.datum.field_name == value``, see examples for usage.
12521262
12531263 Returns
@@ -1257,11 +1267,12 @@ def when(
12571267
12581268 Notes
12591269 -----
1260- - Directly inspired by the ``when-then-otherwise`` syntax used in `` polars.when`` .
1270+ - Directly inspired by the ``when-then-otherwise`` syntax used in `polars.when`_ .
12611271
1262- References
1263- ----------
1264- `polars.when <https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.when.html>`__
1272+ .. _Field Equal Predicate:
1273+ https://vega.github.io/vega-lite/docs/predicate.html#equal-predicate
1274+ .. _polars.when:
1275+ https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.when.html
12651276
12661277 Examples
12671278 --------
0 commit comments