From 0692760949e8a2dfb98ab64cb62e44125b9eb2f1 Mon Sep 17 00:00:00 2001 From: "Weng, Chia-Ling" Date: Wed, 8 Nov 2023 13:07:13 +0800 Subject: [PATCH 1/4] [Doc] Update mark hint about CompositeMarkDef --- altair/vegalite/v5/api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/altair/vegalite/v5/api.py b/altair/vegalite/v5/api.py index fddea8a14..5ea46f725 100644 --- a/altair/vegalite/v5/api.py +++ b/altair/vegalite/v5/api.py @@ -2830,9 +2830,8 @@ class Chart( data : Data An object describing the data source mark : AnyMark - A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, - `"line"`, * `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a - MarkDef object. + A string describing the mark type + (either one of `"bar"`, `"circle"`, `"square"`, `"tick"`,`"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, `"text"`, `"arc"`, `"image"`, `"rect"`, `"trail"`, `"boxplot"`, `"errorband"`, `"errorbar"`) or a MarkDef object or a CompositeMarkDef objest. encoding : FacetedEncoding A key-value mapping between encoding channels and definition of fields. autosize : anyOf(AutosizeType, AutoSizeParams) From 8a540c7c5edf8c04ed5b47dd864f16ebe0a6a600 Mon Sep 17 00:00:00 2001 From: "Weng, Chia-Ling" Date: Thu, 9 Nov 2023 10:05:54 +0800 Subject: [PATCH 2/4] fix language --- altair/vegalite/v5/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/altair/vegalite/v5/api.py b/altair/vegalite/v5/api.py index 5ea46f725..26ff52ae1 100644 --- a/altair/vegalite/v5/api.py +++ b/altair/vegalite/v5/api.py @@ -2831,7 +2831,9 @@ class Chart( An object describing the data source mark : AnyMark A string describing the mark type - (either one of `"bar"`, `"circle"`, `"square"`, `"tick"`,`"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, `"text"`, `"arc"`, `"image"`, `"rect"`, `"trail"`, `"boxplot"`, `"errorband"`, `"errorbar"`) or a MarkDef object or a CompositeMarkDef objest. + (either one of ``"bar"``, ``"circle"``, ``"square"``, ``"tick"``,``"line"``, ``"area"``, ``"point"``, + ``"rule"``, ``"geoshape"``, ``"text"``, ``"arc"``, ``"image"``, ``"rect"``, ``"trail"``, ``"boxplot"``, + ``"errorband"``, ``"errorbar"``) or a MarkDef object or a CompositeMarkDef object. encoding : FacetedEncoding A key-value mapping between encoding channels and definition of fields. autosize : anyOf(AutosizeType, AutoSizeParams) From 082bc4adc127fc2d8c782d2ac8b8ada8c756c28c Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Sat, 16 Mar 2024 10:31:37 -0700 Subject: [PATCH 3/4] Update docsstring and standardize formatting --- altair/vegalite/v5/api.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/altair/vegalite/v5/api.py b/altair/vegalite/v5/api.py index 26ff52ae1..aff2f21b3 100644 --- a/altair/vegalite/v5/api.py +++ b/altair/vegalite/v5/api.py @@ -2830,17 +2830,17 @@ class Chart( data : Data An object describing the data source mark : AnyMark - A string describing the mark type - (either one of ``"bar"``, ``"circle"``, ``"square"``, ``"tick"``,``"line"``, ``"area"``, ``"point"``, - ``"rule"``, ``"geoshape"``, ``"text"``, ``"arc"``, ``"image"``, ``"rect"``, ``"trail"``, ``"boxplot"``, - ``"errorband"``, ``"errorbar"``) or a MarkDef object or a CompositeMarkDef object. + A ``MarkDef`` or ``CompositeMarkDef`` object, or a string describing the mark type + (one of ``"arc"``, ``"area"``, ``"bar"``, ``"circle"``, ``"geoshape"``, ``"image"``, + ``"line"``, ``"point"``, ``"rule"``, ``"rect"``, ``"square"``, ``"text"``, ``"tick"``, + ``"trail"``, ``"boxplot"``, ``"errorband"``, and ``"errorbar"``). encoding : FacetedEncoding A key-value mapping between encoding channels and definition of fields. autosize : anyOf(AutosizeType, AutoSizeParams) Sets how the visualization size should be determined. If a string, should be one of - `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for - content sizing and automatic resizing. `"fit"` is only supported for single and - layered views that don't use `rangeStep`. Default value: `pad` + ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify parameters for + content sizing and automatic resizing. ``"fit"`` is only supported for single and + layered views that don't use ``rangeStep``. Default value: ``pad`` background : string CSS color property to use as the background of visualization. @@ -2857,13 +2857,13 @@ class Chart( padding : Padding The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an - object, the value should have the format `{"left": 5, "top": 5, "right": 5, - "bottom": 5}` to specify padding for each side of the visualization. Default - value: `5` + object, the value should have the format ``{"left": 5, "top": 5, "right": 5, + "bottom": 5}`` to specify padding for each side of the visualization. Default + value: ``5`` projection : Projection - An object defining properties of geographic projection. Works with `"geoshape"` - marks and `"point"` or `"line"` marks that have a channel (one or more of `"X"`, - `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`. + An object defining properties of geographic projection. Works with ``"geoshape"`` + marks and ``"point"`` or ``"line"`` marks that have a channel (one or more of ``"X"``, + ``"X2"``, ``"Y"``, ``"Y2"``) with type ``"latitude"``, or ``"longitude"``. selection : Mapping(required=[]) A key-value mapping between selection names and definitions. title : anyOf(string, TitleParams) From e5642aa8259952266a400969884135a2d229965c Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Sat, 16 Mar 2024 10:56:11 -0700 Subject: [PATCH 4/4] Revert back to single backtick for consistency --- altair/vegalite/v5/api.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/altair/vegalite/v5/api.py b/altair/vegalite/v5/api.py index aff2f21b3..4202fd9a8 100644 --- a/altair/vegalite/v5/api.py +++ b/altair/vegalite/v5/api.py @@ -2830,17 +2830,17 @@ class Chart( data : Data An object describing the data source mark : AnyMark - A ``MarkDef`` or ``CompositeMarkDef`` object, or a string describing the mark type - (one of ``"arc"``, ``"area"``, ``"bar"``, ``"circle"``, ``"geoshape"``, ``"image"``, - ``"line"``, ``"point"``, ``"rule"``, ``"rect"``, ``"square"``, ``"text"``, ``"tick"``, - ``"trail"``, ``"boxplot"``, ``"errorband"``, and ``"errorbar"``). + A `MarkDef` or `CompositeMarkDef` object, or a string describing the mark type + (one of `"arc"`, `"area"`, `"bar"`, `"circle"`, `"geoshape"`, `"image"`, + `"line"`, `"point"`, `"rule"`, `"rect"`, `"square"`, `"text"`, `"tick"`, + `"trail"`, `"boxplot"`, `"errorband"`, and `"errorbar"`). encoding : FacetedEncoding A key-value mapping between encoding channels and definition of fields. autosize : anyOf(AutosizeType, AutoSizeParams) Sets how the visualization size should be determined. If a string, should be one of - ``"pad"``, ``"fit"`` or ``"none"``. Object values can additionally specify parameters for - content sizing and automatic resizing. ``"fit"`` is only supported for single and - layered views that don't use ``rangeStep``. Default value: ``pad`` + `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for + content sizing and automatic resizing. `"fit"` is only supported for single and + layered views that don't use `rangeStep`. Default value: `pad` background : string CSS color property to use as the background of visualization. @@ -2857,13 +2857,13 @@ class Chart( padding : Padding The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an - object, the value should have the format ``{"left": 5, "top": 5, "right": 5, - "bottom": 5}`` to specify padding for each side of the visualization. Default - value: ``5`` + object, the value should have the format `{"left": 5, "top": 5, "right": 5, + "bottom": 5}` to specify padding for each side of the visualization. Default + value: `5` projection : Projection - An object defining properties of geographic projection. Works with ``"geoshape"`` - marks and ``"point"`` or ``"line"`` marks that have a channel (one or more of ``"X"``, - ``"X2"``, ``"Y"``, ``"Y2"``) with type ``"latitude"``, or ``"longitude"``. + An object defining properties of geographic projection. Works with `"geoshape"` + marks and `"point"` or `"line"` marks that have a channel (one or more of `"X"`, + `"X2"`, `"Y"`, `"Y2"`) with type `"latitude"`, or `"longitude"`. selection : Mapping(required=[]) A key-value mapping between selection names and definitions. title : anyOf(string, TitleParams)