diff --git a/CHANGES.md b/CHANGES.md index d49c3ec52..71391a644 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,14 @@ ## Version 2.2.0 (Unreleased): +### Maintenance + +- update to Vega-Lite 2.5.2; see vega-lite change-logs [2.5.0](https://github.com/vega/vega-lite/releases/tag/v2.5.0) [2.5.1](https://github.com/vega/vega-lite/releases/tag/v2.5.1) [2.5.2](https://github.com/vega/vega-lite/releases/tag/v2.5.2) + +### Backward-incompatible changes + +- ``alt.SortField`` renamed to ``alt.EncodingSortField`` and ``alt.WindowSortField`` renamed to ``alt.SortField`` (https://github.com/vega/vega-lite/pull/3741) + ## Version 2.1.0 (Released June 6, 2018): ### Enhancements diff --git a/altair/vegalite/v2/examples/beckers_barley_trellis_plot.py b/altair/vegalite/v2/examples/beckers_barley_trellis_plot.py index a0195b96f..37092a86b 100644 --- a/altair/vegalite/v2/examples/beckers_barley_trellis_plot.py +++ b/altair/vegalite/v2/examples/beckers_barley_trellis_plot.py @@ -13,7 +13,7 @@ alt.X('median(yield)', scale=alt.Scale(zero=False)), alt.Y( 'variety', - sort=alt.SortField(field='yield', op='median', order='descending'), + sort=alt.EncodingSortField(field='yield', op='median', order='descending'), scale=alt.Scale(rangeStep=20) ), color='year:N', diff --git a/altair/vegalite/v2/schema/__init__.py b/altair/vegalite/v2/schema/__init__.py index 924ebc367..25a7f3e0e 100644 --- a/altair/vegalite/v2/schema/__init__.py +++ b/altair/vegalite/v2/schema/__init__.py @@ -1,5 +1,5 @@ # flake8: noqa from .core import * from .channels import * -SCHEMA_VERSION = 'v2.4.3' -SCHEMA_URL = 'https://vega.github.io/schema/vega-lite/v2.4.3.json' +SCHEMA_VERSION = 'v2.5.2' +SCHEMA_URL = 'https://vega.github.io/schema/vega-lite/v2.5.2.json' diff --git a/altair/vegalite/v2/schema/channels.py b/altair/vegalite/v2/schema/channels.py index 922ee51ae..a87fb75a8 100644 --- a/altair/vegalite/v2/schema/channels.py +++ b/altair/vegalite/v2/schema/channels.py @@ -120,7 +120,7 @@ class Color(FieldChannelMixin, core.MarkPropFieldDefWithCondition): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -142,14 +142,16 @@ class Color(FieldChannelMixin, core.MarkPropFieldDefWithCondition): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -229,14 +231,16 @@ class Column(FieldChannelMixin, core.FacetFieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -289,14 +293,16 @@ class Detail(FieldChannelMixin, core.FieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -356,7 +362,7 @@ class Fill(FieldChannelMixin, core.MarkPropFieldDefWithCondition): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -378,14 +384,16 @@ class Fill(FieldChannelMixin, core.MarkPropFieldDefWithCondition): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -472,14 +480,16 @@ class Href(FieldChannelMixin, core.FieldDefWithCondition): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -554,14 +564,16 @@ class Key(FieldChannelMixin, core.FieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -612,14 +624,16 @@ class Latitude(FieldChannelMixin, core.FieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -670,14 +684,16 @@ class Latitude2(FieldChannelMixin, core.FieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -728,14 +744,16 @@ class Longitude(FieldChannelMixin, core.FieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -786,14 +804,16 @@ class Longitude2(FieldChannelMixin, core.FieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -853,7 +873,7 @@ class Opacity(FieldChannelMixin, core.MarkPropFieldDefWithCondition): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -875,14 +895,16 @@ class Opacity(FieldChannelMixin, core.MarkPropFieldDefWithCondition): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -960,14 +982,16 @@ class Order(FieldChannelMixin, core.OrderFieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -1039,14 +1063,16 @@ class Row(FieldChannelMixin, core.FacetFieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -1108,7 +1134,7 @@ class Shape(FieldChannelMixin, core.MarkPropFieldDefWithCondition): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -1130,14 +1156,16 @@ class Shape(FieldChannelMixin, core.MarkPropFieldDefWithCondition): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -1223,7 +1251,7 @@ class Size(FieldChannelMixin, core.MarkPropFieldDefWithCondition): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -1245,14 +1273,16 @@ class Size(FieldChannelMixin, core.MarkPropFieldDefWithCondition): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -1338,7 +1368,7 @@ class Stroke(FieldChannelMixin, core.MarkPropFieldDefWithCondition): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -1360,14 +1390,16 @@ class Stroke(FieldChannelMixin, core.MarkPropFieldDefWithCondition): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -1457,14 +1489,16 @@ class Text(FieldChannelMixin, core.TextFieldDefWithCondition): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -1553,14 +1587,16 @@ class Tooltip(FieldChannelMixin, core.TextFieldDefWithCondition): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -1635,7 +1671,7 @@ class X(FieldChannelMixin, core.PositionFieldDef): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -1675,14 +1711,16 @@ class X(FieldChannelMixin, core.PositionFieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -1753,14 +1791,16 @@ class X2(FieldChannelMixin, core.FieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -1828,7 +1868,7 @@ class Y(FieldChannelMixin, core.PositionFieldDef): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -1868,14 +1908,16 @@ class Y(FieldChannelMixin, core.PositionFieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False @@ -1946,14 +1988,16 @@ class Y2(FieldChannelMixin, core.FieldDef): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. """ _class_is_valid_at_instantiation = False diff --git a/altair/vegalite/v2/schema/core.py b/altair/vegalite/v2/schema/core.py index ab6c8c6af..f553769da 100644 --- a/altair/vegalite/v2/schema/core.py +++ b/altair/vegalite/v2/schema/core.py @@ -146,7 +146,8 @@ class AreaConfig(VegaLiteSchema): Default color. Note that ``fill`` and ``stroke`` have higher precedence than ``color`` and will override ``color``. **Default value:** :raw-html:`` ``"#4682b4"`` **Note:** This property - cannot be used in a `style config `_. + cannot be used in a `style config + `_. cursor : enum('auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', @@ -170,7 +171,7 @@ class AreaConfig(VegaLiteSchema): **Default value:** ``true`` for all marks except ``point`` and ``false`` for ``point``. **Applicable for:** ``bar``, ``point``, ``circle``, ``square``, and ``area`` marks. **Note:** This property cannot be used in a `style config - `_. + `_. font : string The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). fontSize : float @@ -342,14 +343,18 @@ class Axis(VegaLiteSchema): The formatting pattern for labels. This is D3's `number format pattern `_ for quantitative fields and D3's `time format pattern `_ for time - field. See the `format documentation `_ for more information. - **Default value:** derived from `numberFormat `_ config for - quantitative fields and from `timeFormat `_ config for temporal + field. See the `format documentation + `_ for more information. + **Default value:** derived from `numberFormat + `_ config for quantitative + fields and from `timeFormat + `_ config for temporal fields. grid : boolean A boolean flag indicating if grid lines should be included as part of the axis - **Default value:** ``true`` for `continuous scales `_ that - are not binned; otherwise, ``false``. + **Default value:** ``true`` for `continuous scales + `_ that are not binned; + otherwise, ``false``. labelAngle : float The rotation angle of the axis labels. **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise. @@ -392,7 +397,8 @@ class Axis(VegaLiteSchema): offset : float The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle. **Default value:** derived from the `axis config - `_ 's ``offset`` ( ``0`` by default) + `_ 's + ``offset`` ( ``0`` by default) orient : AxisOrient The orientation of the axis. One of ``"top"``, ``"bottom"``, ``"left"`` or ``"right"``. The orientation can be used to further specialize the axis type (e.g., @@ -418,10 +424,12 @@ class Axis(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. titleMaxLength : float Max length for axis title if the title is automatically generated from the field's description. @@ -474,8 +482,9 @@ class AxisConfig(VegaLiteSchema): Stroke width of axis domain line **Default value:** (none, using Vega default). grid : boolean A boolean flag indicating if grid lines should be included as part of the axis - **Default value:** ``true`` for `continuous scales `_ that - are not binned; otherwise, ``false``. + **Default value:** ``true`` for `continuous scales + `_ that are not binned; + otherwise, ``false``. gridColor : string Color of gridlines. gridDash : List(float) @@ -661,7 +670,8 @@ class BarConfig(VegaLiteSchema): Default color. Note that ``fill`` and ``stroke`` have higher precedence than ``color`` and will override ``color``. **Default value:** :raw-html:`` ``"#4682b4"`` **Note:** This property - cannot be used in a `style config `_. + cannot be used in a `style config + `_. continuousBandSize : float The default size of the bars on continuous scales. **Default value:** ``5`` cursor : enum('auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', @@ -690,7 +700,7 @@ class BarConfig(VegaLiteSchema): **Default value:** ``true`` for all marks except ``point`` and ``false`` for ``point``. **Applicable for:** ``bar``, ``point``, ``circle``, ``square``, and ``area`` marks. **Note:** This property cannot be used in a `style config - `_. + `_. font : string The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). fontSize : float @@ -1072,7 +1082,7 @@ class ConditionalPredicateFieldDef(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -1104,10 +1114,12 @@ class ConditionalPredicateFieldDef(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/ConditionalPredicate'} _rootschema = Root._schema @@ -1131,7 +1143,7 @@ class ConditionalPredicateMarkPropFieldDef(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -1162,7 +1174,7 @@ class ConditionalPredicateMarkPropFieldDef(VegaLiteSchema): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -1184,10 +1196,12 @@ class ConditionalPredicateMarkPropFieldDef(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/ConditionalPredicate'} _rootschema = Root._schema @@ -1215,7 +1229,7 @@ class ConditionalPredicateTextFieldDef(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -1250,10 +1264,12 @@ class ConditionalPredicateTextFieldDef(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/ConditionalPredicate'} _rootschema = Root._schema @@ -1300,7 +1316,7 @@ class ConditionalSelectionFieldDef(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -1332,10 +1348,12 @@ class ConditionalSelectionFieldDef(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/ConditionalSelection'} _rootschema = Root._schema @@ -1361,7 +1379,7 @@ class ConditionalSelectionMarkPropFieldDef(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -1392,7 +1410,7 @@ class ConditionalSelectionMarkPropFieldDef(VegaLiteSchema): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -1414,10 +1432,12 @@ class ConditionalSelectionMarkPropFieldDef(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/ConditionalSelection'} _rootschema = Root._schema @@ -1447,7 +1467,7 @@ class ConditionalSelectionTextFieldDef(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -1482,10 +1502,12 @@ class ConditionalSelectionTextFieldDef(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/ConditionalSelection'} _rootschema = Root._schema @@ -1537,8 +1559,9 @@ class Config(VegaLiteSchema): ``pad`` axis : AxisConfig Axis configuration, which determines default properties for all ``x`` and ``y`` - `axes `_. For a full list of axis configuration options, please see the - `corresponding section of the axis documentation `_. + `axes `_. For a full list of axis + configuration options, please see the `corresponding section of the axis + documentation `_. axisBand : VgAxisConfig Specific axis config for axes with "band" scales. axisBottom : VgAxisConfig @@ -1583,8 +1606,9 @@ class Config(VegaLiteSchema): items are included. In this case, invalid values will be interpreted as zeroes. legend : LegendConfig Legend configuration, which determines default properties for all `legends - `_. For a full list of legend configuration options, please see the - `corresponding section of in the legend documentation `_. + `_. For a full list of legend + configuration options, please see the `corresponding section of in the legend + documentation `_. line : LineConfig Line-Specific Config mark : MarkConfig @@ -1602,21 +1626,24 @@ class Config(VegaLiteSchema): Point-Specific Config projection : ProjectionConfig Projection configuration, which determines default properties for all `projections - `_. For a full list of projection configuration options, please see - the `corresponding section of the projection documentation - `_. + `_. For a full list of + projection configuration options, please see the `corresponding section of the + projection documentation + `_. range : RangeConfig An object hash that defines default range arrays or schemes for using with scales. For a full list of scale range configuration options, please see the `corresponding - section of the scale documentation `_. + section of the scale documentation + `_. rect : MarkConfig Rect-Specific Config rule : MarkConfig Rule-Specific Config scale : ScaleConfig - Scale configuration determines default properties for all `scales `_. - For a full list of scale configuration options, please see the `corresponding - section of the scale documentation `_. + Scale configuration determines default properties for all `scales + `_. For a full list of scale + configuration options, please see the `corresponding section of the scale + documentation `_. selection : SelectionConfig An object hash for defining default properties for each type of selections. square : MarkConfig @@ -1625,8 +1652,10 @@ class Config(VegaLiteSchema): Default stack offset for stackable mark. style : StyleConfigIndex An object hash that defines key-value mappings to determine default properties for - marks with a given `style `_. The keys represent styles names; - the values have to be valid `mark configuration objects `_. + marks with a given `style + `_. The keys represent + styles names; the values have to be valid `mark configuration objects + `_. text : TextConfig Text-Specific Config tick : TickConfig @@ -1634,16 +1663,18 @@ class Config(VegaLiteSchema): timeFormat : string Default datetime format for axis and legend labels. The format can be set directly on each axis and legend. Use `D3's time format pattern - `_. **Default value:** ``'%b - %d, %Y'``. + `_. **Default value:** ``''`` + (The format will be automatically determined). title : VgTitleConfig Title configuration, which determines default properties for all `titles - `_. For a full list of title configuration options, please see the - `corresponding section of the title documentation `_. + `_. For a full list of title + configuration options, please see the `corresponding section of the title + documentation `_. trail : LineConfig Trail-Specific Config view : ViewConfig - Default properties for `single view plots `_. + Default properties for `single view plots + `_. """ _schema = {'$ref': '#/definitions/Config'} _rootschema = Root._schema @@ -1678,24 +1709,26 @@ class CsvDataFormat(VegaLiteSchema): Attributes ---------- - parse : anyOf(enum('auto'), Mapping(required=[])) - If set to auto (the default), perform automatic type inference to determine the - desired data types. Alternatively, a parsing directive object can be provided for - explicit data types. Each property of the object corresponds to a field name, and - the value to the desired data type (one of ``"number"``, ``"boolean"`` or ``"date"`` - ). For example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` - field in each input record a Date value. For ``"date"``, we parse data based using + parse : anyOf(enum('auto'), Parse, None) + If set to ``"auto"`` (the default), perform automatic type inference to determine + the desired data types. If set to ``null``, disable type inference based on the spec + and only use type inference based on the data. Alternatively, a parsing directive + object can be provided for explicit data types. Each property of the object + corresponds to a field name, and the value to the desired data type (one of + ``"number"``, ``"boolean"``, ``"date"``, or null (do not parse the field)). For + example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field in + each input record a Date value. For ``"date"``, we parse data based using Javascript's ` ``Date.parse()`` `_. For Specific date formats can be provided (e.g., ``{foo: 'date:"%m%d%Y"'}`` ), using the `d3-time-format syntax `_. UTC date format parsing is supported similarly (e.g., ``{foo: 'utc:"%m%d%Y"'}`` ). See more about `UTC time - `_ + `_ type : enum('csv', 'tsv') - Type of input data: ``"json"``, ``"csv"``, ``"tsv"``. The default format type is - determined by the extension of the file URL. If no extension is detected, ``"json"`` - will be used by default. + Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. The default format + type is determined by the extension of the file URL. If no extension is detected, + ``"json"`` will be used by default. """ _schema = {'$ref': '#/definitions/CsvDataFormat'} _rootschema = Root._schema @@ -1719,7 +1752,7 @@ def __init__(self, *args, **kwds): class DataFormat(VegaLiteSchema): """DataFormat schema wrapper - anyOf(CsvDataFormat, JsonDataFormat, TopoDataFormat) + anyOf(CsvDataFormat, DsvDataFormat, JsonDataFormat, TopoDataFormat) """ _schema = {'$ref': '#/definitions/DataFormat'} _rootschema = Root._schema @@ -1814,6 +1847,45 @@ def __init__(self, **kwds): super(DictInlineDataset, self).__init__(**kwds) +class DsvDataFormat(VegaLiteSchema): + """DsvDataFormat schema wrapper + + Mapping(required=[delimiter]) + + Attributes + ---------- + delimiter : string + The delimiter between records. The delimiter must be a single character (i.e., a + single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are + not. + parse : anyOf(enum('auto'), Parse, None) + If set to ``"auto"`` (the default), perform automatic type inference to determine + the desired data types. If set to ``null``, disable type inference based on the spec + and only use type inference based on the data. Alternatively, a parsing directive + object can be provided for explicit data types. Each property of the object + corresponds to a field name, and the value to the desired data type (one of + ``"number"``, ``"boolean"``, ``"date"``, or null (do not parse the field)). For + example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field in + each input record a Date value. For ``"date"``, we parse data based using + Javascript's ` ``Date.parse()`` + `_. + For Specific date formats can be provided (e.g., ``{foo: 'date:"%m%d%Y"'}`` ), + using the `d3-time-format syntax + `_. UTC date format parsing is + supported similarly (e.g., ``{foo: 'utc:"%m%d%Y"'}`` ). See more about `UTC time + `_ + type : enum('dsv') + Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. The default format + type is determined by the extension of the file URL. If no extension is detected, + ``"json"`` will be used by default. + """ + _schema = {'$ref': '#/definitions/DsvDataFormat'} + _rootschema = Root._schema + + def __init__(self, delimiter=Undefined, parse=Undefined, type=Undefined, **kwds): + super(DsvDataFormat, self).__init__(delimiter=delimiter, parse=parse, type=type, **kwds) + + class Encoding(VegaLiteSchema): """Encoding schema wrapper @@ -1826,20 +1898,22 @@ class Encoding(VegaLiteSchema): of mark definition. By default, ``color`` represents fill color for ``"area"``, ``"bar"``, ``"tick"``, ``"text"``, ``"trail"``, ``"circle"``, and ``"square"`` / stroke color for ``"line"`` and ``"point"``. **Default value:** If undefined, the - default color depends on `mark config `_ 's ``color`` property. + default color depends on `mark config + `_ 's ``color`` property. *Note:* 1) For fine-grained control over both fill and stroke colors of the marks, please use the ``fill`` and ``stroke`` channels. If either ``fill`` or ``stroke`` channel is specified, ``color`` channel will be ignored. 2) See the scale documentation for more information about customizing `color scheme - `_. + `_. detail : anyOf(FieldDef, List(FieldDef)) Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel. fill : anyOf(MarkPropFieldDefWithCondition, MarkPropValueDefWithCondition) Fill color of the marks. **Default value:** If undefined, the default color depends - on `mark config `_ 's ``color`` property. *Note:* When using - ``fill`` channel, ``color`` channel will be ignored. To customize both fill and - stroke, please use ``fill`` and ``stroke`` channels (not ``fill`` and ``color`` ). + on `mark config `_ 's + ``color`` property. *Note:* When using ``fill`` channel, ``color`` channel will be + ignored. To customize both fill and stroke, please use ``fill`` and ``stroke`` + channels (not ``fill`` and ``color`` ). href : anyOf(FieldDefWithCondition, ValueDefWithCondition) A URL to load upon mouse click. key : FieldDef @@ -1859,8 +1933,8 @@ class Encoding(VegaLiteSchema): ``"rect"``, and ``"rule"``. opacity : anyOf(MarkPropFieldDefWithCondition, MarkPropValueDefWithCondition) Opacity of the marks – either can be a value or a range. **Default value:** If - undefined, the default opacity depends on `mark config `_ 's - ``opacity`` property. + undefined, the default opacity depends on `mark config + `_ 's ``opacity`` property. order : anyOf(OrderFieldDef, List(OrderFieldDef), ValueDef) Order of the marks. * For stacked marks, this ``order`` channel encodes `stack order `_. * For line and @@ -1876,7 +1950,8 @@ class Encoding(VegaLiteSchema): ``"cross"``, ``"diamond"``, ``"triangle-up"``, or ``"triangle-down"``, or else a custom SVG path string. For ``geoshape`` marks it should be a field definition of the geojson data **Default value:** If undefined, the default shape depends on - `mark config `_ 's ``shape`` property. + `mark config `_ 's + ``shape`` property. size : anyOf(MarkPropFieldDefWithCondition, MarkPropValueDefWithCondition) Size of the mark. * For ``"point"``, ``"square"`` and ``"circle"``, – the symbol size, or pixel area of the mark. * For ``"bar"`` and ``"tick"`` – the bar and tick's @@ -1885,10 +1960,10 @@ class Encoding(VegaLiteSchema): varying size) stroke : anyOf(MarkPropFieldDefWithCondition, MarkPropValueDefWithCondition) Stroke color of the marks. **Default value:** If undefined, the default color - depends on `mark config `_ 's ``color`` property. *Note:* When - using ``stroke`` channel, ``color`` channel will be ignored. To customize both - stroke and fill, please use ``stroke`` and ``fill`` channels (not ``stroke`` and - ``color`` ). + depends on `mark config `_ + 's ``color`` property. *Note:* When using ``stroke`` channel, ``color`` channel + will be ignored. To customize both stroke and fill, please use ``stroke`` and + ``fill`` channels (not ``stroke`` and ``color`` ). text : anyOf(TextFieldDefWithCondition, TextValueDefWithCondition) Text of the ``text`` mark. tooltip : anyOf(TextFieldDefWithCondition, TextValueDefWithCondition, List(TextFieldDef)) @@ -1917,6 +1992,37 @@ def __init__(self, color=Undefined, detail=Undefined, fill=Undefined, href=Undef y=y, y2=y2, **kwds) +class EncodingSortField(VegaLiteSchema): + """EncodingSortField schema wrapper + + Mapping(required=[op]) + A sort definition for sorting a discrete scale in an encoding field definition. + + Attributes + ---------- + op : AggregateOp + An `aggregate operation `_ + to perform on the field prior to sorting (e.g., ``"count"``, ``"mean"`` and + ``"median"`` ). This property is required in cases where the sort field and the data + reference field do not match. The input data objects will be aggregated, grouped by + the encoded data field. For a full list of operations, please see the + documentation for `aggregate + `_. + field : anyOf(string, RepeatRef) + The data `field `_ to sort by. + **Default value:** If unspecified, defaults to the field specified in the outer data + reference. + order : SortOrder + The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no + not sort). + """ + _schema = {'$ref': '#/definitions/EncodingSortField'} + _rootschema = Root._schema + + def __init__(self, op=Undefined, field=Undefined, order=Undefined, **kwds): + super(EncodingSortField, self).__init__(op=op, field=field, order=order, **kwds) + + class EncodingWithFacet(VegaLiteSchema): """EncodingWithFacet schema wrapper @@ -1929,12 +2035,13 @@ class EncodingWithFacet(VegaLiteSchema): of mark definition. By default, ``color`` represents fill color for ``"area"``, ``"bar"``, ``"tick"``, ``"text"``, ``"trail"``, ``"circle"``, and ``"square"`` / stroke color for ``"line"`` and ``"point"``. **Default value:** If undefined, the - default color depends on `mark config `_ 's ``color`` property. + default color depends on `mark config + `_ 's ``color`` property. *Note:* 1) For fine-grained control over both fill and stroke colors of the marks, please use the ``fill`` and ``stroke`` channels. If either ``fill`` or ``stroke`` channel is specified, ``color`` channel will be ignored. 2) See the scale documentation for more information about customizing `color scheme - `_. + `_. column : FacetFieldDef Horizontal facets for trellis plots. detail : anyOf(FieldDef, List(FieldDef)) @@ -1942,9 +2049,10 @@ class EncodingWithFacet(VegaLiteSchema): and area marks without mapping data to a specific visual channel. fill : anyOf(MarkPropFieldDefWithCondition, MarkPropValueDefWithCondition) Fill color of the marks. **Default value:** If undefined, the default color depends - on `mark config `_ 's ``color`` property. *Note:* When using - ``fill`` channel, ``color`` channel will be ignored. To customize both fill and - stroke, please use ``fill`` and ``stroke`` channels (not ``fill`` and ``color`` ). + on `mark config `_ 's + ``color`` property. *Note:* When using ``fill`` channel, ``color`` channel will be + ignored. To customize both fill and stroke, please use ``fill`` and ``stroke`` + channels (not ``fill`` and ``color`` ). href : anyOf(FieldDefWithCondition, ValueDefWithCondition) A URL to load upon mouse click. key : FieldDef @@ -1964,8 +2072,8 @@ class EncodingWithFacet(VegaLiteSchema): ``"rect"``, and ``"rule"``. opacity : anyOf(MarkPropFieldDefWithCondition, MarkPropValueDefWithCondition) Opacity of the marks – either can be a value or a range. **Default value:** If - undefined, the default opacity depends on `mark config `_ 's - ``opacity`` property. + undefined, the default opacity depends on `mark config + `_ 's ``opacity`` property. order : anyOf(OrderFieldDef, List(OrderFieldDef), ValueDef) Order of the marks. * For stacked marks, this ``order`` channel encodes `stack order `_. * For line and @@ -1983,7 +2091,8 @@ class EncodingWithFacet(VegaLiteSchema): ``"cross"``, ``"diamond"``, ``"triangle-up"``, or ``"triangle-down"``, or else a custom SVG path string. For ``geoshape`` marks it should be a field definition of the geojson data **Default value:** If undefined, the default shape depends on - `mark config `_ 's ``shape`` property. + `mark config `_ 's + ``shape`` property. size : anyOf(MarkPropFieldDefWithCondition, MarkPropValueDefWithCondition) Size of the mark. * For ``"point"``, ``"square"`` and ``"circle"``, – the symbol size, or pixel area of the mark. * For ``"bar"`` and ``"tick"`` – the bar and tick's @@ -1992,10 +2101,10 @@ class EncodingWithFacet(VegaLiteSchema): varying size) stroke : anyOf(MarkPropFieldDefWithCondition, MarkPropValueDefWithCondition) Stroke color of the marks. **Default value:** If undefined, the default color - depends on `mark config `_ 's ``color`` property. *Note:* When - using ``stroke`` channel, ``color`` channel will be ignored. To customize both - stroke and fill, please use ``stroke`` and ``fill`` channels (not ``stroke`` and - ``color`` ). + depends on `mark config `_ + 's ``color`` property. *Note:* When using ``stroke`` channel, ``color`` channel + will be ignored. To customize both stroke and fill, please use ``stroke`` and + ``fill`` channels (not ``stroke`` and ``color`` ). text : anyOf(TextFieldDefWithCondition, TextValueDefWithCondition) Text of the ``text`` mark. tooltip : anyOf(TextFieldDefWithCondition, TextValueDefWithCondition, List(TextFieldDef)) @@ -2121,7 +2230,7 @@ class FacetFieldDef(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -2157,10 +2266,12 @@ class FacetFieldDef(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/FacetFieldDef'} _rootschema = Root._schema @@ -2202,7 +2313,7 @@ class FieldDef(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -2234,10 +2345,12 @@ class FieldDef(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/FieldDef'} _rootschema = Root._schema @@ -2264,7 +2377,7 @@ class FieldDefWithCondition(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -2301,10 +2414,12 @@ class FieldDefWithCondition(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/FieldDefWithCondition'} _rootschema = Root._schema @@ -2332,7 +2447,7 @@ class MarkPropFieldDefWithCondition(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -2368,7 +2483,7 @@ class MarkPropFieldDefWithCondition(VegaLiteSchema): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -2390,10 +2505,12 @@ class MarkPropFieldDefWithCondition(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/MarkPropFieldDefWithCondition'} _rootschema = Root._schema @@ -2423,7 +2540,7 @@ class TextFieldDefWithCondition(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -2463,10 +2580,12 @@ class TextFieldDefWithCondition(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/TextFieldDefWithCondition'} _rootschema = Root._schema @@ -2481,7 +2600,7 @@ def __init__(self, type=Undefined, aggregate=Undefined, bin=Undefined, condition class FieldEqualPredicate(VegaLiteSchema): """FieldEqualPredicate schema wrapper - Mapping(required=[field, equal]) + Mapping(required=[equal, field]) Attributes ---------- @@ -2499,6 +2618,90 @@ def __init__(self, equal=Undefined, field=Undefined, timeUnit=Undefined, **kwds) super(FieldEqualPredicate, self).__init__(equal=equal, field=field, timeUnit=timeUnit, **kwds) +class FieldGTEPredicate(VegaLiteSchema): + """FieldGTEPredicate schema wrapper + + Mapping(required=[field, gte]) + + Attributes + ---------- + field : string + Field to be filtered. + gte : anyOf(string, float, DateTime) + The value that the field should be greater than or equals to. + timeUnit : TimeUnit + Time unit for the field to be filtered. + """ + _schema = {'$ref': '#/definitions/FieldGTEPredicate'} + _rootschema = Root._schema + + def __init__(self, field=Undefined, gte=Undefined, timeUnit=Undefined, **kwds): + super(FieldGTEPredicate, self).__init__(field=field, gte=gte, timeUnit=timeUnit, **kwds) + + +class FieldGTPredicate(VegaLiteSchema): + """FieldGTPredicate schema wrapper + + Mapping(required=[field, gt]) + + Attributes + ---------- + field : string + Field to be filtered. + gt : anyOf(string, float, DateTime) + The value that the field should be greater than. + timeUnit : TimeUnit + Time unit for the field to be filtered. + """ + _schema = {'$ref': '#/definitions/FieldGTPredicate'} + _rootschema = Root._schema + + def __init__(self, field=Undefined, gt=Undefined, timeUnit=Undefined, **kwds): + super(FieldGTPredicate, self).__init__(field=field, gt=gt, timeUnit=timeUnit, **kwds) + + +class FieldLTEPredicate(VegaLiteSchema): + """FieldLTEPredicate schema wrapper + + Mapping(required=[field, lte]) + + Attributes + ---------- + field : string + Field to be filtered. + lte : anyOf(string, float, DateTime) + The value that the field should be less than or equals to. + timeUnit : TimeUnit + Time unit for the field to be filtered. + """ + _schema = {'$ref': '#/definitions/FieldLTEPredicate'} + _rootschema = Root._schema + + def __init__(self, field=Undefined, lte=Undefined, timeUnit=Undefined, **kwds): + super(FieldLTEPredicate, self).__init__(field=field, lte=lte, timeUnit=timeUnit, **kwds) + + +class FieldLTPredicate(VegaLiteSchema): + """FieldLTPredicate schema wrapper + + Mapping(required=[field, lt]) + + Attributes + ---------- + field : string + Field to be filtered. + lt : anyOf(string, float, DateTime) + The value that the field should be less than. + timeUnit : TimeUnit + Time unit for the field to be filtered. + """ + _schema = {'$ref': '#/definitions/FieldLTPredicate'} + _rootschema = Root._schema + + def __init__(self, field=Undefined, lt=Undefined, timeUnit=Undefined, **kwds): + super(FieldLTPredicate, self).__init__(field=field, lt=lt, timeUnit=timeUnit, **kwds) + + class FieldOneOfPredicate(VegaLiteSchema): """FieldOneOfPredicate schema wrapper @@ -2507,12 +2710,12 @@ class FieldOneOfPredicate(VegaLiteSchema): Attributes ---------- field : string - Field to be filtered + Field to be filtered. oneOf : anyOf(List(string), List(float), List(boolean), List(DateTime)) A set of values that the ``field`` 's value should be a member of, for a data item included in the filtered data. timeUnit : TimeUnit - time unit for the field to be filtered. + Time unit for the field to be filtered. """ _schema = {'$ref': '#/definitions/FieldOneOfPredicate'} _rootschema = Root._schema @@ -2529,12 +2732,12 @@ class FieldRangePredicate(VegaLiteSchema): Attributes ---------- field : string - Field to be filtered + Field to be filtered. range : List(anyOf(float, DateTime, None)) An array of inclusive minimum and maximum values for a field value of a data item to be included in the filtered data. timeUnit : TimeUnit - time unit for the field to be filtered. + Time unit for the field to be filtered. """ _schema = {'$ref': '#/definitions/FieldRangePredicate'} _rootschema = Root._schema @@ -2551,16 +2754,20 @@ class FilterTransform(VegaLiteSchema): Attributes ---------- filter : LogicalOperandPredicate - The ``filter`` property must be one of the predicate definitions: (1) an `expression + The ``filter`` property must be one of the predicate definitions: 1) an `expression `_ string, where - ``datum`` can be used to refer to the current data object; (2) one of the field - predicates: `equal predicate - `_ ; `range - predicate `_, `one-of predicate - `_ ; (3) a - `selection predicate - `_ ; or (4) a - logical operand that combines (1), (2), or (3). + ``datum`` can be used to refer to the current data object 2) one of the field + predicates: ` ``equal`` + `_, ` ``lt`` + `_, ` ``lte`` + `_, ` ``gt`` + `_, ` ``gte`` + `_, ` ``range`` + `_, or ` + ``oneOf`` `_. + 3) a `selection predicate + `_ 4) a + logical operand that combines (1), (2), or (3). """ _schema = {'$ref': '#/definitions/FilterTransform'} _rootschema = Root._schema @@ -2960,9 +3167,12 @@ class Header(VegaLiteSchema): The formatting pattern for labels. This is D3's `number format pattern `_ for quantitative fields and D3's `time format pattern `_ for time - field. See the `format documentation `_ for more information. - **Default value:** derived from `numberFormat `_ config for - quantitative fields and from `timeFormat `_ config for temporal + field. See the `format documentation + `_ for more information. + **Default value:** derived from `numberFormat + `_ config for quantitative + fields and from `timeFormat + `_ config for temporal fields. labelAngle : float The rotation angle of the header labels. **Default value:** ``0``. @@ -2974,10 +3184,12 @@ class Header(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/Header'} _rootschema = Root._schema @@ -3007,16 +3219,18 @@ class InlineData(VegaLiteSchema): ---------- values : InlineDataset The full data set, included inline. This can be an array of objects or primitive - values or a string. Arrays of primitive values are ingested as objects with a - ``data`` property. Strings are parsed according to the specified format type. + values, an object, or a string. Arrays of primitive values are ingested as objects + with a ``data`` property. Strings are parsed according to the specified format type. format : DataFormat - An object that specifies the format for parsing the data values. + An object that specifies the format for parsing the data. + name : string + Provide a placeholder name and bind data at runtime. """ _schema = {'$ref': '#/definitions/InlineData'} _rootschema = Root._schema - def __init__(self, values=Undefined, format=Undefined, **kwds): - super(InlineData, self).__init__(values=values, format=format, **kwds) + def __init__(self, values=Undefined, format=Undefined, name=Undefined, **kwds): + super(InlineData, self).__init__(values=values, format=format, name=name, **kwds) class InlineDataset(VegaLiteSchema): @@ -3166,29 +3380,31 @@ class JsonDataFormat(VegaLiteSchema): Attributes ---------- - parse : anyOf(enum('auto'), Mapping(required=[])) - If set to auto (the default), perform automatic type inference to determine the - desired data types. Alternatively, a parsing directive object can be provided for - explicit data types. Each property of the object corresponds to a field name, and - the value to the desired data type (one of ``"number"``, ``"boolean"`` or ``"date"`` - ). For example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` - field in each input record a Date value. For ``"date"``, we parse data based using + parse : anyOf(enum('auto'), Parse, None) + If set to ``"auto"`` (the default), perform automatic type inference to determine + the desired data types. If set to ``null``, disable type inference based on the spec + and only use type inference based on the data. Alternatively, a parsing directive + object can be provided for explicit data types. Each property of the object + corresponds to a field name, and the value to the desired data type (one of + ``"number"``, ``"boolean"``, ``"date"``, or null (do not parse the field)). For + example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field in + each input record a Date value. For ``"date"``, we parse data based using Javascript's ` ``Date.parse()`` `_. For Specific date formats can be provided (e.g., ``{foo: 'date:"%m%d%Y"'}`` ), using the `d3-time-format syntax `_. UTC date format parsing is supported similarly (e.g., ``{foo: 'utc:"%m%d%Y"'}`` ). See more about `UTC time - `_ + `_ property : string The JSON property containing the desired data. This parameter can be used when the loaded JSON file may have surrounding structure or meta-data. For example ``"property": "values.features"`` is equivalent to retrieving ``json.values.features`` from the loaded JSON object. type : enum('json') - Type of input data: ``"json"``, ``"csv"``, ``"tsv"``. The default format type is - determined by the extension of the file URL. If no extension is detected, ``"json"`` - will be used by default. + Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. The default format + type is determined by the extension of the file URL. If no extension is detected, + ``"json"`` will be used by default. """ _schema = {'$ref': '#/definitions/JsonDataFormat'} _rootschema = Root._schema @@ -3211,9 +3427,12 @@ class Legend(VegaLiteSchema): The formatting pattern for labels. This is D3's `number format pattern `_ for quantitative fields and D3's `time format pattern `_ for time - field. See the `format documentation `_ for more information. - **Default value:** derived from `numberFormat `_ config for - quantitative fields and from `timeFormat `_ config for temporal + field. See the `format documentation + `_ for more information. + **Default value:** derived from `numberFormat + `_ config for quantitative + fields and from `timeFormat + `_ config for temporal fields. offset : float The offset, in pixels, by which to displace the legend from the edge of the @@ -3234,10 +3453,12 @@ class Legend(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. type : enum('symbol', 'gradient') The type of the legend. Use ``"symbol"`` to create a discrete legend and ``"gradient"`` for a continuous color gradient. **Default value:** ``"gradient"`` @@ -3442,7 +3663,8 @@ class LineConfig(VegaLiteSchema): Default color. Note that ``fill`` and ``stroke`` have higher precedence than ``color`` and will override ``color``. **Default value:** :raw-html:`` ``"#4682b4"`` **Note:** This property - cannot be used in a `style config `_. + cannot be used in a `style config + `_. cursor : enum('auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', @@ -3466,7 +3688,7 @@ class LineConfig(VegaLiteSchema): **Default value:** ``true`` for all marks except ``point`` and ``false`` for ``point``. **Applicable for:** ``bar``, ``point``, ``circle``, ``square``, and ``area`` marks. **Note:** This property cannot be used in a `style config - `_. + `_. font : string The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). fontSize : float @@ -3809,7 +4031,8 @@ class MarkConfig(VegaLiteSchema): Default color. Note that ``fill`` and ``stroke`` have higher precedence than ``color`` and will override ``color``. **Default value:** :raw-html:`` ``"#4682b4"`` **Note:** This property - cannot be used in a `style config `_. + cannot be used in a `style config + `_. cursor : enum('auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', @@ -3833,7 +4056,7 @@ class MarkConfig(VegaLiteSchema): **Default value:** ``true`` for all marks except ``point`` and ``false`` for ``point``. **Applicable for:** ``bar``, ``point``, ``circle``, ``square``, and ``area`` marks. **Note:** This property cannot be used in a `style config - `_. + `_. font : string The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). fontSize : float @@ -3964,7 +4187,8 @@ class MarkDef(VegaLiteSchema): Default color. Note that ``fill`` and ``stroke`` have higher precedence than ``color`` and will override ``color``. **Default value:** :raw-html:`` ``"#4682b4"`` **Note:** This property - cannot be used in a `style config `_. + cannot be used in a `style config + `_. cursor : enum('auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', @@ -3988,7 +4212,7 @@ class MarkDef(VegaLiteSchema): **Default value:** ``true`` for all marks except ``point`` and ``false`` for ``point``. **Applicable for:** ``bar``, ``point``, ``circle``, ``square``, and ``area`` marks. **Note:** This property cannot be used in a `style config - `_. + `_. font : string The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). fontSize : float @@ -4074,12 +4298,14 @@ class MarkDef(VegaLiteSchema): style : anyOf(string, List(string)) A string or array of strings indicating the name of custom styles to apply to the mark. A style is a named collection of mark property defaults defined within the - `style configuration `_. If style is an array, later styles - will override earlier styles. Any `mark properties `_ - explicitly defined within the ``encoding`` will override a style default. **Default - value:** The mark's name. For example, a bar mark will have style ``"bar"`` by - default. **Note:** Any specified style will augment the default style. For example, - a bar mark with ``"style": "foo"`` will receive from ``config.style.bar`` and + `style configuration + `_. If style is an + array, later styles will override earlier styles. Any `mark properties + `_ explicitly defined + within the ``encoding`` will override a style default. **Default value:** The + mark's name. For example, a bar mark will have style ``"bar"`` by default. + **Note:** Any specified style will augment the default style. For example, a bar + mark with ``"style": "foo"`` will receive from ``config.style.bar`` and ``config.style.foo`` (the specified style ``"foo"`` has higher precedence). tension : float Depending on the interpolation type, sets the tension parameter (for line and area @@ -4091,6 +4317,16 @@ class MarkDef(VegaLiteSchema): the ``x`` and ``y`` properties. Values for ``theta`` follow the same convention of ``arc`` mark ``startAngle`` and ``endAngle`` properties: angles are measured in radians, with ``0`` indicating "north". + thickness : float + Thickness of the tick mark. **Default value:** ``1`` + x2Offset : float + Offset for x2-position. + xOffset : float + Offset for x-position. + y2Offset : float + Offset for y2-position. + yOffset : float + Offset for y-position. """ _schema = {'$ref': '#/definitions/MarkDef'} _rootschema = Root._schema @@ -4103,7 +4339,9 @@ def __init__(self, type=Undefined, align=Undefined, angle=Undefined, baseline=Un orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): super(MarkDef, self).__init__(type=type, align=align, angle=angle, baseline=baseline, binSpacing=binSpacing, clip=clip, color=color, cursor=cursor, dx=dx, dy=dy, fill=fill, fillOpacity=fillOpacity, filled=filled, @@ -4114,7 +4352,8 @@ def __init__(self, type=Undefined, align=Undefined, angle=Undefined, baseline=Un strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, - theta=theta, **kwds) + theta=theta, thickness=thickness, x2Offset=x2Offset, + xOffset=xOffset, y2Offset=y2Offset, yOffset=yOffset, **kwds) class Month(VegaLiteSchema): @@ -4150,7 +4389,8 @@ class MultiSelection(VegaLiteSchema): nearest : boolean When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value *nearest* the mouse cursor is added to the selection. See - the `nearest transform `_ documentation for more information. + the `nearest transform `_ + documentation for more information. on : VgEventStream A `Vega event stream `_ (object or selector) that triggers the selection. For interval selections, the event stream @@ -4165,8 +4405,9 @@ class MultiSelection(VegaLiteSchema): selections. Can be ``true``, ``false`` (for insertion only), or a `Vega expression `_. **Default value:** ``true``, which corresponds to ``event.shiftKey`` (i.e., data values are toggled when a user - interacts with the shift-key pressed). See the `toggle transform `_ - documentation for more information. + interacts with the shift-key pressed). See the `toggle transform + `_ documentation for more + information. """ _schema = {'$ref': '#/definitions/MultiSelection'} _rootschema = Root._schema @@ -4197,7 +4438,8 @@ class MultiSelectionConfig(VegaLiteSchema): nearest : boolean When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value *nearest* the mouse cursor is added to the selection. See - the `nearest transform `_ documentation for more information. + the `nearest transform `_ + documentation for more information. on : VgEventStream A `Vega event stream `_ (object or selector) that triggers the selection. For interval selections, the event stream @@ -4212,8 +4454,9 @@ class MultiSelectionConfig(VegaLiteSchema): selections. Can be ``true``, ``false`` (for insertion only), or a `Vega expression `_. **Default value:** ``true``, which corresponds to ``event.shiftKey`` (i.e., data values are toggled when a user - interacts with the shift-key pressed). See the `toggle transform `_ - documentation for more information. + interacts with the shift-key pressed). See the `toggle transform + `_ documentation for more + information. """ _schema = {'$ref': '#/definitions/MultiSelectionConfig'} _rootschema = Root._schema @@ -4278,7 +4521,7 @@ class OrderFieldDef(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -4312,10 +4555,12 @@ class OrderFieldDef(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/OrderFieldDef'} _rootschema = Root._schema @@ -4350,6 +4595,18 @@ def __init__(self, *args, **kwds): super(Padding, self).__init__(*args, **kwds) +class Parse(VegaLiteSchema): + """Parse schema wrapper + + Mapping(required=[]) + """ + _schema = {'$ref': '#/definitions/Parse'} + _rootschema = Root._schema + + def __init__(self, **kwds): + super(Parse, self).__init__(**kwds) + + class PositionFieldDef(VegaLiteSchema): """PositionFieldDef schema wrapper @@ -4360,7 +4617,7 @@ class PositionFieldDef(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -4392,7 +4649,7 @@ class PositionFieldDef(VegaLiteSchema): `_. **Default value:** If undefined, default `scale properties `_ are applied. - sort : anyOf(List(string), SortOrder, SortField, None) + sort : anyOf(List(string), SortOrder, EncodingSortField, None) Sort order for the encoded field. Supported ``sort`` values include ``"ascending"``, ``"descending"``, ``null`` (no sorting), or an array specifying the preferred order of values. For fields with discrete domains, ``sort`` can also be a `sort field @@ -4432,10 +4689,12 @@ class PositionFieldDef(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/PositionFieldDef'} _rootschema = Root._schema @@ -4451,8 +4710,8 @@ def __init__(self, type=Undefined, aggregate=Undefined, axis=Undefined, bin=Unde class Predicate(VegaLiteSchema): """Predicate schema wrapper - anyOf(FieldEqualPredicate, FieldRangePredicate, FieldOneOfPredicate, SelectionPredicate, - string) + anyOf(FieldEqualPredicate, FieldRangePredicate, FieldOneOfPredicate, FieldLTPredicate, + FieldGTPredicate, FieldLTEPredicate, FieldGTEPredicate, SelectionPredicate, string) """ _schema = {'$ref': '#/definitions/Predicate'} _rootschema = Root._schema @@ -4742,20 +5001,23 @@ class Scale(VegaLiteSchema): clamp : boolean If ``true``, values that exceed the data domain are clamped to either the minimum or maximum range value **Default value:** derived from the `scale config - `_ 's ``clamp`` ( ``true`` by default). + `_ 's ``clamp`` ( + ``true`` by default). domain : anyOf(List(float), List(string), List(boolean), List(DateTime), enum('unaggregated'), SelectionDomain) Customized domain values. For *quantitative* fields, ``domain`` can take the form of a two-element array with minimum and maximum values. `Piecewise scales - `_ can be created by providing a ``domain`` with more than two - entries. If the input field is aggregated, ``domain`` can also be a string value - ``"unaggregated"``, indicating that the domain should include the raw data values - prior to the aggregation. For *temporal* fields, ``domain`` can be a two-element - array minimum and maximum values, in the form of either timestamps or the `DateTime - definition objects `_. For *ordinal* and *nominal* fields, - ``domain`` can be an array that lists valid input values. The ``selection`` - property can be used to `interactively determine `_ - the scale domain. + `_ can be created by + providing a ``domain`` with more than two entries. If the input field is aggregated, + ``domain`` can also be a string value ``"unaggregated"``, indicating that the + domain should include the raw data values prior to the aggregation. For *temporal* + fields, ``domain`` can be a two-element array minimum and maximum values, in the + form of either timestamps or the `DateTime definition objects + `_. For *ordinal* and + *nominal* fields, ``domain`` can be an array that lists valid input values. The + ``selection`` property can be used to `interactively determine + `_ the scale + domain. exponent : float The exponent of the ``pow`` scale. interpolate : anyOf(ScaleInterpolate, ScaleInterpolateParams) @@ -4790,79 +5052,104 @@ class Scale(VegaLiteSchema): Apr, Jul, Oct) boundaries. **Default value:** ``true`` for unbinned *quantitative* fields; ``false`` otherwise. padding : float - For * `continuous `_ * scales, expands the scale domain to - accommodate the specified number of pixels on each of the scale range. The scale - range must represent pixels for this parameter to function as intended. Padding - adjustment is performed prior to all other adjustments, including the effects of the - zero, nice, domainMin, and domainMax properties. For * `band `_ * + For * `continuous `_ * + scales, expands the scale domain to accommodate the specified number of pixels on + each of the scale range. The scale range must represent pixels for this parameter to + function as intended. Padding adjustment is performed prior to all other + adjustments, including the effects of the zero, nice, domainMin, and domainMax + properties. For * `band `_ * scales, shortcut for setting ``paddingInner`` and ``paddingOuter`` to the same - value. For * `point `_ * scales, alias for ``paddingOuter``. - **Default value:** For *continuous* scales, derived from the `scale config - `_ 's ``continuousPadding``. For *band and point* scales, see - ``paddingInner`` and ``paddingOuter``. + value. For * `point `_ * + scales, alias for ``paddingOuter``. **Default value:** For *continuous* scales, + derived from the `scale config + `_ 's + ``continuousPadding``. For *band and point* scales, see ``paddingInner`` and + ``paddingOuter``. paddingInner : float The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1]. For point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands). **Default value:** derived from the `scale config - `_ 's ``bandPaddingInner``. + `_ 's ``bandPaddingInner``. paddingOuter : float The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1]. **Default - value:** derived from the `scale config `_ 's - ``bandPaddingOuter`` for band scales and ``pointPadding`` for point scales. + value:** derived from the `scale config + `_ 's ``bandPaddingOuter`` + for band scales and ``pointPadding`` for point scales. range : anyOf(List(float), List(string), string) The range of the scale. One of: * A string indicating a `pre-defined named - scale range `_ (e.g., example, ``"symbol"``, or - ``"diverging"`` ). * For `continuous scales `_, - two-element array indicating minimum and maximum values, or an array with more than - two entries for specifying a `piecewise scale `_. * For - `discrete `_ and `discretizing `_ - scales, an array of desired output values. **Notes:** 1) For `sequential - `_, `ordinal `_, and discretizing color - scales, you can also specify a color ` ``scheme`` `_ instead of - ``range``. 2) Any directly specified ``range`` for ``x`` and ``y`` channels will be - ignored. Range can be customized via the view's corresponding `size `_ ( - ``width`` and ``height`` ) or via `range steps and paddings properties - <#range-step>`_ for `band <#band>`_ and `point <#point>`_ scales. + scale range `_ (e.g., + example, ``"symbol"``, or ``"diverging"`` ). * For `continuous scales + `_, two-element array + indicating minimum and maximum values, or an array with more than two entries for + specifying a `piecewise scale + `_. * For `discrete + `_ and `discretizing + `_ scales, an array + of desired output values. **Notes:** 1) For `sequential + `_, `ordinal + `_, and discretizing color + scales, you can also specify a color ` ``scheme`` + `_ instead of ``range``. + 2) Any directly specified ``range`` for ``x`` and ``y`` channels will be ignored. + Range can be customized via the view's corresponding `size + `_ ( ``width`` and ``height`` ) or + via `range steps and paddings properties <#range-step>`_ for `band <#band>`_ and + `point <#point>`_ scales. rangeStep : anyOf(float, None) The distance between the starts of adjacent bands or points in `band - `_ and `point `_ scales. If ``rangeStep`` is - ``null`` or if the view contains the scale's corresponding `size `_ ( - ``width`` for ``x`` scales and ``height`` for ``y`` scales), ``rangeStep`` will be - automatically determined to fit the size of the view. **Default value:** derived - the `scale config `_ 's ``textXRangeStep`` ( ``90`` by - default) for x-scales of ``text`` marks and ``rangeStep`` ( ``21`` by default) for - x-scales of other marks and y-scales. **Warning** : If ``rangeStep`` is ``null`` - and the cardinality of the scale's domain is higher than ``width`` or ``height``, - the rangeStep might become less than one pixel and the mark might not appear - correctly. + `_ and `point + `_ scales. If ``rangeStep`` + is ``null`` or if the view contains the scale's corresponding `size + `_ ( ``width`` for ``x`` scales and + ``height`` for ``y`` scales), ``rangeStep`` will be automatically determined to fit + the size of the view. **Default value:** derived the `scale config + `_ 's + ``textXRangeStep`` ( ``90`` by default) for x-scales of ``text`` marks and + ``rangeStep`` ( ``21`` by default) for x-scales of other marks and y-scales. + **Warning** : If ``rangeStep`` is ``null`` and the cardinality of the scale's domain + is higher than ``width`` or ``height``, the rangeStep might become less than one + pixel and the mark might not appear correctly. round : boolean If ``true``, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. **Default value:** ``false``. scheme : anyOf(string, SchemeParams) - A string indicating a color `scheme `_ name (e.g., + A string indicating a color `scheme + `_ name (e.g., ``"category10"`` or ``"viridis"`` ) or a `scheme parameter object - `_. Discrete color schemes may be used with `discrete - `_ or `discretizing `_ scales. - Continuous color schemes are intended for use with `sequential - `_ scales. For the full list of supported schemes, please - refer to the `Vega Scheme `_ - reference. + `_. Discrete color + schemes may be used with `discrete + `_ or `discretizing + `_ scales. Continuous + color schemes are intended for use with `sequential + `_ scales. For the + full list of supported schemes, please refer to the `Vega Scheme + `_ reference. type : ScaleType The type of scale. Vega-Lite supports the following categories of scale types: 1) - ` **Continuous Scales** `_ -- mapping continuous domains to - continuous output ranges ( ` ``"linear"`` `_, ` ``"pow"`` - `_, ` ``"sqrt"`` `_, ` ``"log"`` - `_, ` ``"time"`` `_, ` ``"utc"`` - `_, ` ``"sequential"`` `_ ). 2) ` **Discrete - Scales** `_ -- mapping discrete domains to discrete ( ` - ``"ordinal"`` `_ ) or continuous ( ` ``"band"`` - `_ and ` ``"point"`` `_ ) output ranges. 3) ` - **Discretizing Scales** `_ -- mapping continuous domains to - discrete output ranges ( ` ``"bin-linear"`` `_ and ` - ``"bin-ordinal"`` `_ ). **Default value:** please see the - `scale type table `_. + ` **Continuous Scales** + `_ -- mapping + continuous domains to continuous output ranges ( ` ``"linear"`` + `_, ` ``"pow"`` + `_, ` ``"sqrt"`` + `_, ` ``"log"`` + `_, ` ``"time"`` + `_, ` ``"utc"`` + `_, ` ``"sequential"`` + `_ ). 2) ` **Discrete + Scales** `_ -- mapping + discrete domains to discrete ( ` ``"ordinal"`` + `_ ) or continuous ( ` + ``"band"`` `_ and ` + ``"point"`` `_ ) output + ranges. 3) ` **Discretizing Scales** + `_ -- mapping + continuous domains to discrete output ranges ( ` ``"bin-linear"`` + `_ and ` + ``"bin-ordinal"`` `_ + ). **Default value:** please see the `scale type table + `_. zero : boolean If ``true``, ensures that a zero baseline value is included in the scale domain. **Default value:** ``true`` for x and y channels if the quantitative field is not @@ -5080,18 +5367,21 @@ class SelectionConfig(VegaLiteSchema): Attributes ---------- interval : IntervalSelectionConfig - The default definition for an ` ``interval`` `_ selection. All + The default definition for an ` ``interval`` + `_ selection. All properties and transformations for an interval selection definition (except ``type`` ) may be specified here. For instance, setting ``interval`` to ``{"translate": false}`` disables the ability to move interval selections by default. multi : MultiSelectionConfig - The default definition for a ` ``multi`` `_ selection. All + The default definition for a ` ``multi`` + `_ selection. All properties and transformations for a multi selection definition (except ``type`` ) may be specified here. For instance, setting ``multi`` to ``{"toggle": "event.altKey"}`` adds additional values to multi selections when clicking with the alt-key pressed by default. single : SingleSelectionConfig - The default definition for a ` ``single`` `_ selection. All + The default definition for a ` ``single`` + `_ selection. All properties and transformations for a single selection definition (except ``type`` ) may be specified here. For instance, setting ``single`` to ``{"on": "dblclick"}`` populates single selections on double-click by default. @@ -5184,7 +5474,8 @@ class SingleSelection(VegaLiteSchema): known as dynamic query widgets). A binding takes the form of Vega's `input element binding definition `_ or can be a mapping between projected field/encodings and binding definitions. See the `bind - transform `_ documentation for more information. + transform `_ documentation for more + information. empty : enum('all', 'none') By default, all data values are considered to lie within an empty selection. When set to ``none``, empty selections contain no data values. @@ -5197,7 +5488,8 @@ class SingleSelection(VegaLiteSchema): nearest : boolean When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value *nearest* the mouse cursor is added to the selection. See - the `nearest transform `_ documentation for more information. + the `nearest transform `_ + documentation for more information. on : VgEventStream A `Vega event stream `_ (object or selector) that triggers the selection. For interval selections, the event stream @@ -5230,7 +5522,8 @@ class SingleSelectionConfig(VegaLiteSchema): known as dynamic query widgets). A binding takes the form of Vega's `input element binding definition `_ or can be a mapping between projected field/encodings and binding definitions. See the `bind - transform `_ documentation for more information. + transform `_ documentation for more + information. empty : enum('all', 'none') By default, all data values are considered to lie within an empty selection. When set to ``none``, empty selections contain no data values. @@ -5243,7 +5536,8 @@ class SingleSelectionConfig(VegaLiteSchema): nearest : boolean When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value *nearest* the mouse cursor is added to the selection. See - the `nearest transform `_ documentation for more information. + the `nearest transform `_ + documentation for more information. on : VgEventStream A `Vega event stream `_ (object or selector) that triggers the selection. For interval selections, the event stream @@ -5279,28 +5573,21 @@ def __init__(self, *args, **kwds): class SortField(VegaLiteSchema): """SortField schema wrapper - Mapping(required=[op]) + Mapping(required=[field]) + A sort definition for transform Attributes ---------- - op : AggregateOp - An `aggregate operation `_ to perform on the field prior to - sorting (e.g., ``"count"``, ``"mean"`` and ``"median"`` ). This property is required - in cases where the sort field and the data reference field do not match. The input - data objects will be aggregated, grouped by the encoded data field. For a full list - of operations, please see the documentation for `aggregate `_. - field : anyOf(string, RepeatRef) - The data `field `_ to sort by. **Default value:** If unspecified, - defaults to the field specified in the outer data reference. - order : SortOrder - The sort order. One of ``"ascending"`` (default), ``"descending"``, or ``null`` (no - not sort). + field : string + The name of the field to sort. + order : VgComparatorOrder + Whether to sort the field in ascending or descending order. """ _schema = {'$ref': '#/definitions/SortField'} _rootschema = Root._schema - def __init__(self, op=Undefined, field=Undefined, order=Undefined, **kwds): - super(SortField, self).__init__(op=op, field=field, order=order, **kwds) + def __init__(self, field=Undefined, order=Undefined, **kwds): + super(SortField, self).__init__(field=field, order=order, **kwds) class SortOrder(VegaLiteSchema): @@ -5357,7 +5644,8 @@ class TextConfig(VegaLiteSchema): Default color. Note that ``fill`` and ``stroke`` have higher precedence than ``color`` and will override ``color``. **Default value:** :raw-html:`` ``"#4682b4"`` **Note:** This property - cannot be used in a `style config `_. + cannot be used in a `style config + `_. cursor : enum('auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', @@ -5381,7 +5669,7 @@ class TextConfig(VegaLiteSchema): **Default value:** ``true`` for all marks except ``point`` and ``false`` for ``point``. **Applicable for:** ``bar``, ``point``, ``circle``, ``square``, and ``area`` marks. **Note:** This property cannot be used in a `style config - `_. + `_. font : string The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). fontSize : float @@ -5498,7 +5786,7 @@ class TextFieldDef(VegaLiteSchema): type : Type The encoded field's type of measurement ( ``"quantitative"``, ``"temporal"``, ``"ordinal"``, or ``"nominal"`` ). It can also be a ``"geojson"`` type for encoding - `'geoshape' `_. + `'geoshape' `_. aggregate : Aggregate Aggregation function for the field (e.g., ``mean``, ``sum``, ``median``, ``min``, ``max``, ``count`` ). **Default value:** ``undefined`` (None) @@ -5533,10 +5821,12 @@ class TextFieldDef(VegaLiteSchema): or has a time unit applied, the applied function is shown in parentheses (e.g., ``"Profit (binned)"``, ``"Transaction Date (year-month)"`` ). Otherwise, the title is simply the field name. **Notes** : 1) You can customize the default field title - format by providing the [ ``fieldTitle`` property in the `config `_ or - ` ``fieldTitle`` function via the ``compile`` function's options - `_. 2) If both field definition's ``title`` and axis, - header, or legend ``title`` are defined, axis/header/legend title will be used. + format by providing the [ ``fieldTitle`` property in the `config + `_ or ` ``fieldTitle`` function + via the ``compile`` function's options + `_. 2) If both + field definition's ``title`` and axis, header, or legend ``title`` are defined, + axis/header/legend title will be used. """ _schema = {'$ref': '#/definitions/TextFieldDef'} _rootschema = Root._schema @@ -5567,7 +5857,8 @@ class TickConfig(VegaLiteSchema): Default color. Note that ``fill`` and ``stroke`` have higher precedence than ``color`` and will override ``color``. **Default value:** :raw-html:`` ``"#4682b4"`` **Note:** This property - cannot be used in a `style config `_. + cannot be used in a `style config + `_. cursor : enum('auto', 'default', 'none', 'context-menu', 'help', 'pointer', 'progress', 'wait', 'cell', 'crosshair', 'text', 'vertical-text', 'alias', 'copy', 'move', 'no-drop', 'not-allowed', 'e-resize', 'n-resize', 'ne-resize', 'nw-resize', 's-resize', 'se-resize', @@ -5591,7 +5882,7 @@ class TickConfig(VegaLiteSchema): **Default value:** ``true`` for all marks except ``point`` and ``false`` for ``point``. **Applicable for:** ``bar``, ``point``, ``circle``, ``square``, and ``area`` marks. **Note:** This property cannot be used in a `style config - `_. + `_. font : string The typeface to set the text in (e.g., ``"Helvetica Neue"`` ). fontSize : float @@ -5757,10 +6048,13 @@ class TitleParams(VegaLiteSchema): The anchor position for placing the title. One of ``"start"``, ``"middle"``, or ``"end"``. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title. **Default value:** ``"middle"`` for `single - `_ and `layered `_ views. ``"start"`` for other composite - views. **Note:** `For now `_, - ``anchor`` is only customizable only for `single `_ and `layered - `_ views. For other composite views, ``anchor`` is always ``"start"``. + `_ and `layered + `_ views. ``"start"`` for other + composite views. **Note:** `For now + `_, ``anchor`` is only customizable + only for `single `_ and `layered + `_ views. For other composite + views, ``anchor`` is always ``"start"``. offset : float The orthogonal offset in pixels by which to displace the title from its position along the edge of the chart. @@ -5768,8 +6062,8 @@ class TitleParams(VegaLiteSchema): The orientation of the title relative to the chart. One of ``"top"`` (the default), ``"bottom"``, ``"left"``, or ``"right"``. style : anyOf(string, List(string)) - A `mark style property `_ to apply to the title text mark. - **Default value:** ``"group-title"``. + A `mark style property `_ + to apply to the title text mark. **Default value:** ``"group-title"``. """ _schema = {'$ref': '#/definitions/TitleParams'} _rootschema = Root._schema @@ -6304,24 +6598,26 @@ class TopoDataFormat(VegaLiteSchema): not as individual GeoJSON features. Extracting a mesh is useful for more efficiently drawing borders or other geographic elements that you do not need to associate with specific regions such as individual countries, states or counties. - parse : anyOf(enum('auto'), Mapping(required=[])) - If set to auto (the default), perform automatic type inference to determine the - desired data types. Alternatively, a parsing directive object can be provided for - explicit data types. Each property of the object corresponds to a field name, and - the value to the desired data type (one of ``"number"``, ``"boolean"`` or ``"date"`` - ). For example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` - field in each input record a Date value. For ``"date"``, we parse data based using + parse : anyOf(enum('auto'), Parse, None) + If set to ``"auto"`` (the default), perform automatic type inference to determine + the desired data types. If set to ``null``, disable type inference based on the spec + and only use type inference based on the data. Alternatively, a parsing directive + object can be provided for explicit data types. Each property of the object + corresponds to a field name, and the value to the desired data type (one of + ``"number"``, ``"boolean"``, ``"date"``, or null (do not parse the field)). For + example, ``"parse": {"modified_on": "date"}`` parses the ``modified_on`` field in + each input record a Date value. For ``"date"``, we parse data based using Javascript's ` ``Date.parse()`` `_. For Specific date formats can be provided (e.g., ``{foo: 'date:"%m%d%Y"'}`` ), using the `d3-time-format syntax `_. UTC date format parsing is supported similarly (e.g., ``{foo: 'utc:"%m%d%Y"'}`` ). See more about `UTC time - `_ + `_ type : enum('topojson') - Type of input data: ``"json"``, ``"csv"``, ``"tsv"``. The default format type is - determined by the extension of the file URL. If no extension is detected, ``"json"`` - will be used by default. + Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. The default format + type is determined by the extension of the file URL. If no extension is detected, + ``"json"`` will be used by default. """ _schema = {'$ref': '#/definitions/TopoDataFormat'} _rootschema = Root._schema @@ -6368,13 +6664,15 @@ class UrlData(VegaLiteSchema): An URL from which to load the data set. Use the ``format.type`` property to ensure the loaded data is correctly parsed. format : DataFormat - An object that specifies the format for parsing the data file. + An object that specifies the format for parsing the data. + name : string + Provide a placeholder name and bind data at runtime. """ _schema = {'$ref': '#/definitions/UrlData'} _rootschema = Root._schema - def __init__(self, url=Undefined, format=Undefined, **kwds): - super(UrlData, self).__init__(url=url, format=format, **kwds) + def __init__(self, url=Undefined, format=Undefined, name=Undefined, **kwds): + super(UrlData, self).__init__(url=url, format=format, name=name, **kwds) class UtcMultiTimeUnit(VegaLiteSchema): @@ -6529,8 +6827,9 @@ class VgAxisConfig(VegaLiteSchema): Stroke width of axis domain line **Default value:** (none, using Vega default). grid : boolean A boolean flag indicating if grid lines should be included as part of the axis - **Default value:** ``true`` for `continuous scales `_ that - are not binned; otherwise, ``false``. + **Default value:** ``true`` for `continuous scales + `_ that are not binned; + otherwise, ``false``. gridColor : string Color of gridlines. gridDash : List(float) @@ -6983,10 +7282,13 @@ class VgTitleConfig(VegaLiteSchema): The anchor position for placing the title. One of ``"start"``, ``"middle"``, or ``"end"``. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title. **Default value:** ``"middle"`` for `single - `_ and `layered `_ views. ``"start"`` for other composite - views. **Note:** `For now `_, - ``anchor`` is only customizable only for `single `_ and `layered - `_ views. For other composite views, ``anchor`` is always ``"start"``. + `_ and `layered + `_ views. ``"start"`` for other + composite views. **Note:** `For now + `_, ``anchor`` is only customizable + only for `single `_ and `layered + `_ views. For other composite + views, ``anchor`` is always ``"start"``. angle : float Angle in degrees of title text. baseline : VerticalAlign @@ -7108,26 +7410,6 @@ def __init__(self, *args): super(WindowOnlyOp, self).__init__(*args) -class WindowSortField(VegaLiteSchema): - """WindowSortField schema wrapper - - Mapping(required=[field]) - A compartor for fields within the window transform - - Attributes - ---------- - field : string - The name of the field to sort. - order : VgComparatorOrder - Whether to sort the field in ascending or descending order. - """ - _schema = {'$ref': '#/definitions/WindowSortField'} - _rootschema = Root._schema - - def __init__(self, field=Undefined, order=Undefined, **kwds): - super(WindowSortField, self).__init__(field=field, order=order, **kwds) - - class WindowTransform(VegaLiteSchema): """WindowTransform schema wrapper @@ -7160,8 +7442,8 @@ class WindowTransform(VegaLiteSchema): will be defined by offset values only. This setting only affects those operations that depend on the window frame, namely aggregation operations and the first_value, last_value, and nth_value window operations. **Default value:** ``false`` - sort : List(WindowSortField) - A comparator definition for sorting data objects within a window. If two data + sort : List(SortField) + A sort field definition for sorting data objects within a window. If two data objects are considered equal by the comparator, they are considered “peer” values of equal rank. If sort is not specified, the order is undefined: data objects are processed in the order they are observed and none are considered peers (the diff --git a/altair/vegalite/v2/schema/mixins.py b/altair/vegalite/v2/schema/mixins.py index 9ed5083b3..d592854b4 100644 --- a/altair/vegalite/v2/schema/mixins.py +++ b/altair/vegalite/v2/schema/mixins.py @@ -18,7 +18,9 @@ def mark_area(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'area' For information on additional arguments, see ``alt.MarkDef`` @@ -31,7 +33,8 @@ def mark_area(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="area", **kwds) @@ -47,7 +50,9 @@ def mark_bar(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpac orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'bar' For information on additional arguments, see ``alt.MarkDef`` @@ -60,7 +65,8 @@ def mark_bar(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpac stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="bar", **kwds) @@ -76,7 +82,9 @@ def mark_line(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'line' For information on additional arguments, see ``alt.MarkDef`` @@ -89,7 +97,8 @@ def mark_line(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="line", **kwds) @@ -105,7 +114,9 @@ def mark_trail(self, align=Undefined, angle=Undefined, baseline=Undefined, binSp orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'trail' For information on additional arguments, see ``alt.MarkDef`` @@ -118,7 +129,8 @@ def mark_trail(self, align=Undefined, angle=Undefined, baseline=Undefined, binSp stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="trail", **kwds) @@ -134,7 +146,9 @@ def mark_point(self, align=Undefined, angle=Undefined, baseline=Undefined, binSp orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'point' For information on additional arguments, see ``alt.MarkDef`` @@ -147,7 +161,8 @@ def mark_point(self, align=Undefined, angle=Undefined, baseline=Undefined, binSp stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="point", **kwds) @@ -163,7 +178,9 @@ def mark_text(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'text' For information on additional arguments, see ``alt.MarkDef`` @@ -176,7 +193,8 @@ def mark_text(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="text", **kwds) @@ -192,7 +210,9 @@ def mark_tick(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'tick' For information on additional arguments, see ``alt.MarkDef`` @@ -205,7 +225,8 @@ def mark_tick(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="tick", **kwds) @@ -221,7 +242,9 @@ def mark_rect(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'rect' For information on additional arguments, see ``alt.MarkDef`` @@ -234,7 +257,8 @@ def mark_rect(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="rect", **kwds) @@ -250,7 +274,9 @@ def mark_rule(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'rule' For information on additional arguments, see ``alt.MarkDef`` @@ -263,7 +289,8 @@ def mark_rule(self, align=Undefined, angle=Undefined, baseline=Undefined, binSpa stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="rule", **kwds) @@ -279,7 +306,9 @@ def mark_circle(self, align=Undefined, angle=Undefined, baseline=Undefined, binS orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'circle' For information on additional arguments, see ``alt.MarkDef`` @@ -292,7 +321,8 @@ def mark_circle(self, align=Undefined, angle=Undefined, baseline=Undefined, binS stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="circle", **kwds) @@ -308,7 +338,9 @@ def mark_square(self, align=Undefined, angle=Undefined, baseline=Undefined, binS orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'square' For information on additional arguments, see ``alt.MarkDef`` @@ -321,7 +353,8 @@ def mark_square(self, align=Undefined, angle=Undefined, baseline=Undefined, binS stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="square", **kwds) @@ -337,7 +370,9 @@ def mark_geoshape(self, align=Undefined, angle=Undefined, baseline=Undefined, bi orient=Undefined, point=Undefined, radius=Undefined, shape=Undefined, size=Undefined, stroke=Undefined, strokeCap=Undefined, strokeDash=Undefined, strokeDashOffset=Undefined, strokeOpacity=Undefined, strokeWidth=Undefined, - style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, **kwds): + style=Undefined, tension=Undefined, text=Undefined, theta=Undefined, + thickness=Undefined, x2Offset=Undefined, xOffset=Undefined, y2Offset=Undefined, + yOffset=Undefined, **kwds): """Set the chart's mark to 'geoshape' For information on additional arguments, see ``alt.MarkDef`` @@ -350,7 +385,8 @@ def mark_geoshape(self, align=Undefined, angle=Undefined, baseline=Undefined, bi stroke=stroke, strokeCap=strokeCap, strokeDash=strokeDash, strokeDashOffset=strokeDashOffset, strokeOpacity=strokeOpacity, strokeWidth=strokeWidth, style=style, tension=tension, text=text, theta=theta, - **kwds) + thickness=thickness, x2Offset=x2Offset, xOffset=xOffset, y2Offset=y2Offset, + yOffset=yOffset, **kwds) copy = self.copy(deep=True, ignore=['data']) if any(val is not Undefined for val in kwds.values()): copy.mark = core.MarkDef(type="geoshape", **kwds) diff --git a/altair/vegalite/v2/schema/vega-lite-schema.json b/altair/vegalite/v2/schema/vega-lite-schema.json index 5f6c0c663..2aaa9d0e2 100644 --- a/altair/vegalite/v2/schema/vega-lite-schema.json +++ b/altair/vegalite/v2/schema/vega-lite-schema.json @@ -113,7 +113,7 @@ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`" }, "color": { - "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "string" }, "cursor": { @@ -177,7 +177,7 @@ "type": "number" }, "filled": { - "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "boolean" }, "font": { @@ -352,11 +352,11 @@ "type": "boolean" }, "format": { - "description": "The formatting pattern for labels. This is D3's [number format pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time field.\n\nSee the [format documentation](format.html) for more information.\n\n__Default value:__ derived from [numberFormat](config.html#format) config for quantitative fields and from [timeFormat](config.html#format) config for temporal fields.", + "description": "The formatting pattern for labels. This is D3's [number format pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time field.\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more information.\n\n__Default value:__ derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for quantitative fields and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for temporal fields.", "type": "string" }, "grid": { - "description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](scale.html#continuous) that are not binned; otherwise, `false`.", + "description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.", "type": "boolean" }, "labelAngle": { @@ -416,7 +416,7 @@ "type": "number" }, "offset": { - "description": "The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.\n\n__Default value:__ derived from the [axis config](config.html#facet-scale-config)'s `offset` (`0` by default)", + "description": "The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.\n\n__Default value:__ derived from the [axis config](https://vega.github.io/vega-lite/docs/config.html#facet-scale-config)'s `offset` (`0` by default)", "type": "number" }, "orient": { @@ -441,7 +441,7 @@ "type": "boolean" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -500,7 +500,7 @@ "type": "number" }, "grid": { - "description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](scale.html#continuous) that are not binned; otherwise, `false`.", + "description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.", "type": "boolean" }, "gridColor": { @@ -720,7 +720,7 @@ "type": "number" }, "color": { - "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "string" }, "continuousBandSize": { @@ -794,7 +794,7 @@ "type": "number" }, "filled": { - "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "boolean" }, "font": { @@ -1131,7 +1131,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -1139,7 +1139,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -1211,7 +1211,7 @@ "$ref": "#/definitions/SortOrder" }, { - "$ref": "#/definitions/SortField" + "$ref": "#/definitions/EncodingSortField" }, { "type": "null" @@ -1227,7 +1227,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -1235,7 +1235,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -1285,7 +1285,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -1293,7 +1293,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -1361,7 +1361,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -1369,7 +1369,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -1445,7 +1445,7 @@ "$ref": "#/definitions/SortOrder" }, { - "$ref": "#/definitions/SortField" + "$ref": "#/definitions/EncodingSortField" }, { "type": "null" @@ -1458,7 +1458,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -1466,7 +1466,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -1517,7 +1517,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -1525,7 +1525,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -1576,7 +1576,7 @@ }, "axis": { "$ref": "#/definitions/AxisConfig", - "description": "Axis configuration, which determines default properties for all `x` and `y` [axes](axis.html). For a full list of axis configuration options, please see the [corresponding section of the axis documentation](axis.html#config)." + "description": "Axis configuration, which determines default properties for all `x` and `y` [axes](https://vega.github.io/vega-lite/docs/axis.html). For a full list of axis configuration options, please see the [corresponding section of the axis documentation](https://vega.github.io/vega-lite/docs/axis.html#config)." }, "axisBand": { "$ref": "#/definitions/VgAxisConfig", @@ -1652,7 +1652,7 @@ }, "legend": { "$ref": "#/definitions/LegendConfig", - "description": "Legend configuration, which determines default properties for all [legends](legend.html). For a full list of legend configuration options, please see the [corresponding section of in the legend documentation](legend.html#config)." + "description": "Legend configuration, which determines default properties for all [legends](https://vega.github.io/vega-lite/docs/legend.html). For a full list of legend configuration options, please see the [corresponding section of in the legend documentation](https://vega.github.io/vega-lite/docs/legend.html#config)." }, "line": { "$ref": "#/definitions/LineConfig", @@ -1676,11 +1676,11 @@ }, "projection": { "$ref": "#/definitions/ProjectionConfig", - "description": "Projection configuration, which determines default properties for all [projections](projection.html). For a full list of projection configuration options, please see the [corresponding section of the projection documentation](projection.html#config)." + "description": "Projection configuration, which determines default properties for all [projections](https://vega.github.io/vega-lite/docs/projection.html). For a full list of projection configuration options, please see the [corresponding section of the projection documentation](https://vega.github.io/vega-lite/docs/projection.html#config)." }, "range": { "$ref": "#/definitions/RangeConfig", - "description": "An object hash that defines default range arrays or schemes for using with scales.\nFor a full list of scale range configuration options, please see the [corresponding section of the scale documentation](scale.html#config)." + "description": "An object hash that defines default range arrays or schemes for using with scales.\nFor a full list of scale range configuration options, please see the [corresponding section of the scale documentation](https://vega.github.io/vega-lite/docs/scale.html#config)." }, "rect": { "$ref": "#/definitions/MarkConfig", @@ -1692,7 +1692,7 @@ }, "scale": { "$ref": "#/definitions/ScaleConfig", - "description": "Scale configuration determines default properties for all [scales](scale.html). For a full list of scale configuration options, please see the [corresponding section of the scale documentation](scale.html#config)." + "description": "Scale configuration determines default properties for all [scales](https://vega.github.io/vega-lite/docs/scale.html). For a full list of scale configuration options, please see the [corresponding section of the scale documentation](https://vega.github.io/vega-lite/docs/scale.html#config)." }, "selection": { "$ref": "#/definitions/SelectionConfig", @@ -1708,7 +1708,7 @@ }, "style": { "$ref": "#/definitions/StyleConfigIndex", - "description": "An object hash that defines key-value mappings to determine default properties for marks with a given [style](mark.html#mark-def). The keys represent styles names; the values have to be valid [mark configuration objects](mark.html#config). " + "description": "An object hash that defines key-value mappings to determine default properties for marks with a given [style](https://vega.github.io/vega-lite/docs/mark.html#mark-def). The keys represent styles names; the values have to be valid [mark configuration objects](https://vega.github.io/vega-lite/docs/mark.html#config). " }, "text": { "$ref": "#/definitions/TextConfig", @@ -1719,12 +1719,12 @@ "description": "Tick-Specific Config " }, "timeFormat": { - "description": "Default datetime format for axis and legend labels. The format can be set directly on each axis and legend. Use [D3's time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\n__Default value:__ `'%b %d, %Y'`.", + "description": "Default datetime format for axis and legend labels. The format can be set directly on each axis and legend. Use [D3's time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\n__Default value:__ `''` (The format will be automatically determined).", "type": "string" }, "title": { "$ref": "#/definitions/VgTitleConfig", - "description": "Title configuration, which determines default properties for all [titles](title.html). For a full list of title configuration options, please see the [corresponding section of the title documentation](title.html#config)." + "description": "Title configuration, which determines default properties for all [titles](https://vega.github.io/vega-lite/docs/title.html). For a full list of title configuration options, please see the [corresponding section of the title documentation](https://vega.github.io/vega-lite/docs/title.html#config)." }, "trail": { "$ref": "#/definitions/LineConfig", @@ -1732,7 +1732,7 @@ }, "view": { "$ref": "#/definitions/ViewConfig", - "description": "Default properties for [single view plots](spec.html#single). " + "description": "Default properties for [single view plots](https://vega.github.io/vega-lite/docs/spec.html#single). " } }, "type": "object" @@ -1749,13 +1749,16 @@ "type": "string" }, { - "type": "object" + "$ref": "#/definitions/Parse" + }, + { + "type": "null" } ], - "description": "If set to auto (the default), perform automatic type inference to determine the desired data types.\nAlternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"` or `\"date\"`).\nFor example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\nFor Specific date formats can be provided (e.g., `{foo: 'date:\"%m%d%Y\"'}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: 'utc:\"%m%d%Y\"'}`). See more about [UTC time](timeunit.html#utc)" + "description": "If set to `\"auto\"` (the default), perform automatic type inference to determine the desired data types.\nIf set to `null`, disable type inference based on the spec and only use type inference based on the data.\nAlternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)).\nFor example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\nFor Specific date formats can be provided (e.g., `{foo: 'date:\"%m%d%Y\"'}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: 'utc:\"%m%d%Y\"'}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)" }, "type": { - "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`.\nThe default format type is determined by the extension of the file URL.\nIf no extension is detected, `\"json\"` will be used by default.", + "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\nThe default format type is determined by the extension of the file URL.\nIf no extension is detected, `\"json\"` will be used by default.", "enum": [ "csv", "tsv" @@ -1783,6 +1786,9 @@ { "$ref": "#/definitions/CsvDataFormat" }, + { + "$ref": "#/definitions/DsvDataFormat" + }, { "$ref": "#/definitions/JsonDataFormat" }, @@ -1878,6 +1884,45 @@ }, "type": "object" }, + "DsvDataFormat": { + "additionalProperties": false, + "properties": { + "delimiter": { + "description": "The delimiter between records. The delimiter must be a single character (i.e., a single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not.", + "maxLength": 1, + "minLength": 1, + "type": "string" + }, + "parse": { + "anyOf": [ + { + "enum": [ + "auto" + ], + "type": "string" + }, + { + "$ref": "#/definitions/Parse" + }, + { + "type": "null" + } + ], + "description": "If set to `\"auto\"` (the default), perform automatic type inference to determine the desired data types.\nIf set to `null`, disable type inference based on the spec and only use type inference based on the data.\nAlternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)).\nFor example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\nFor Specific date formats can be provided (e.g., `{foo: 'date:\"%m%d%Y\"'}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: 'utc:\"%m%d%Y\"'}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)" + }, + "type": { + "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\nThe default format type is determined by the extension of the file URL.\nIf no extension is detected, `\"json\"` will be used by default.", + "enum": [ + "dsv" + ], + "type": "string" + } + }, + "required": [ + "delimiter" + ], + "type": "object" + }, "Encoding": { "additionalProperties": false, "properties": { @@ -1890,7 +1935,7 @@ "$ref": "#/definitions/MarkPropValueDefWithCondition" } ], - "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](scale.html#scheme)." + "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." }, "detail": { "anyOf": [ @@ -1915,7 +1960,7 @@ "$ref": "#/definitions/MarkPropValueDefWithCondition" } ], - "description": "Fill color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](config.html#mark)'s `color` property.\n\n_Note:_ When using `fill` channel, `color ` channel will be ignored. To customize both fill and stroke, please use `fill` and `stroke` channels (not `fill` and `color`)." + "description": "Fill color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `fill` channel, `color ` channel will be ignored. To customize both fill and stroke, please use `fill` and `stroke` channels (not `fill` and `color`)." }, "href": { "anyOf": [ @@ -1957,7 +2002,7 @@ "$ref": "#/definitions/MarkPropValueDefWithCondition" } ], - "description": "Opacity of the marks – either can be a value or a range.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](config.html#mark)'s `opacity` property." + "description": "Opacity of the marks – either can be a value or a range.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `opacity` property." }, "order": { "anyOf": [ @@ -1985,7 +2030,7 @@ "$ref": "#/definitions/MarkPropValueDefWithCondition" } ], - "description": "For `point` marks the supported values are\n`\"circle\"` (default), `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`,\nor `\"triangle-down\"`, or else a custom SVG path string.\nFor `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](config.html#point-config)'s `shape` property." + "description": "For `point` marks the supported values are\n`\"circle\"` (default), `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`,\nor `\"triangle-down\"`, or else a custom SVG path string.\nFor `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape` property." }, "size": { "anyOf": [ @@ -2007,7 +2052,7 @@ "$ref": "#/definitions/MarkPropValueDefWithCondition" } ], - "description": "Stroke color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](config.html#mark)'s `color` property.\n\n_Note:_ When using `stroke` channel, `color ` channel will be ignored. To customize both stroke and fill, please use `stroke` and `fill` channels (not `stroke` and `color`)." + "description": "Stroke color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `stroke` channel, `color ` channel will be ignored. To customize both stroke and fill, please use `stroke` and `fill` channels (not `stroke` and `color`)." }, "text": { "anyOf": [ @@ -2084,6 +2129,35 @@ }, "type": "object" }, + "EncodingSortField": { + "additionalProperties": false, + "description": "A sort definition for sorting a discrete scale in an encoding field definition.", + "properties": { + "field": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/RepeatRef" + } + ], + "description": "The data [field](https://vega.github.io/vega-lite/docs/field.html) to sort by.\n\n__Default value:__ If unspecified, defaults to the field specified in the outer data reference." + }, + "op": { + "$ref": "#/definitions/AggregateOp", + "description": "An [aggregate operation](https://vega.github.io/vega-lite/docs/aggregate.html#ops) to perform on the field prior to sorting (e.g., `\"count\"`, `\"mean\"` and `\"median\"`).\nThis property is required in cases where the sort field and the data reference field do not match.\nThe input data objects will be aggregated, grouped by the encoded data field.\n\nFor a full list of operations, please see the documentation for [aggregate](https://vega.github.io/vega-lite/docs/aggregate.html#ops)." + }, + "order": { + "$ref": "#/definitions/SortOrder", + "description": "The sort order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)." + } + }, + "required": [ + "op" + ], + "type": "object" + }, "EncodingWithFacet": { "additionalProperties": false, "properties": { @@ -2096,7 +2170,7 @@ "$ref": "#/definitions/MarkPropValueDefWithCondition" } ], - "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](scale.html#scheme)." + "description": "Color of the marks – either fill or stroke color based on the `filled` property of mark definition.\nBy default, `color` represents fill color for `\"area\"`, `\"bar\"`, `\"tick\"`,\n`\"text\"`, `\"trail\"`, `\"circle\"`, and `\"square\"` / stroke color for `\"line\"` and `\"point\"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_\n1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. If either `fill` or `stroke` channel is specified, `color` channel will be ignored.\n2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme)." }, "column": { "$ref": "#/definitions/FacetFieldDef", @@ -2125,7 +2199,7 @@ "$ref": "#/definitions/MarkPropValueDefWithCondition" } ], - "description": "Fill color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](config.html#mark)'s `color` property.\n\n_Note:_ When using `fill` channel, `color ` channel will be ignored. To customize both fill and stroke, please use `fill` and `stroke` channels (not `fill` and `color`)." + "description": "Fill color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `fill` channel, `color ` channel will be ignored. To customize both fill and stroke, please use `fill` and `stroke` channels (not `fill` and `color`)." }, "href": { "anyOf": [ @@ -2167,7 +2241,7 @@ "$ref": "#/definitions/MarkPropValueDefWithCondition" } ], - "description": "Opacity of the marks – either can be a value or a range.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](config.html#mark)'s `opacity` property." + "description": "Opacity of the marks – either can be a value or a range.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `opacity` property." }, "order": { "anyOf": [ @@ -2199,7 +2273,7 @@ "$ref": "#/definitions/MarkPropValueDefWithCondition" } ], - "description": "For `point` marks the supported values are\n`\"circle\"` (default), `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`,\nor `\"triangle-down\"`, or else a custom SVG path string.\nFor `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](config.html#point-config)'s `shape` property." + "description": "For `point` marks the supported values are\n`\"circle\"` (default), `\"square\"`, `\"cross\"`, `\"diamond\"`, `\"triangle-up\"`,\nor `\"triangle-down\"`, or else a custom SVG path string.\nFor `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape` property." }, "size": { "anyOf": [ @@ -2221,7 +2295,7 @@ "$ref": "#/definitions/MarkPropValueDefWithCondition" } ], - "description": "Stroke color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](config.html#mark)'s `color` property.\n\n_Note:_ When using `stroke` channel, `color ` channel will be ignored. To customize both stroke and fill, please use `stroke` and `fill` channels (not `stroke` and `color`)." + "description": "Stroke color of the marks.\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark)'s `color` property.\n\n_Note:_ When using `stroke` channel, `color ` channel will be ignored. To customize both stroke and fill, please use `stroke` and `fill` channels (not `stroke` and `color`)." }, "text": { "anyOf": [ @@ -2414,7 +2488,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -2422,7 +2496,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -2479,7 +2553,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -2487,7 +2561,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -2544,7 +2618,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -2552,7 +2626,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -2638,7 +2712,7 @@ "$ref": "#/definitions/SortOrder" }, { - "$ref": "#/definitions/SortField" + "$ref": "#/definitions/EncodingSortField" }, { "type": "null" @@ -2651,7 +2725,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -2659,7 +2733,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -2720,7 +2794,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -2728,7 +2802,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -2765,9 +2839,137 @@ "description": "Time unit for the field to be filtered." } }, + "required": [ + "equal", + "field" + ], + "type": "object" + }, + "FieldGTEPredicate": { + "additionalProperties": false, + "properties": { + "field": { + "description": "Field to be filtered.", + "type": "string" + }, + "gte": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/definitions/DateTime" + } + ], + "description": "The value that the field should be greater than or equals to." + }, + "timeUnit": { + "$ref": "#/definitions/TimeUnit", + "description": "Time unit for the field to be filtered." + } + }, + "required": [ + "field", + "gte" + ], + "type": "object" + }, + "FieldGTPredicate": { + "additionalProperties": false, + "properties": { + "field": { + "description": "Field to be filtered.", + "type": "string" + }, + "gt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/definitions/DateTime" + } + ], + "description": "The value that the field should be greater than." + }, + "timeUnit": { + "$ref": "#/definitions/TimeUnit", + "description": "Time unit for the field to be filtered." + } + }, + "required": [ + "field", + "gt" + ], + "type": "object" + }, + "FieldLTEPredicate": { + "additionalProperties": false, + "properties": { + "field": { + "description": "Field to be filtered.", + "type": "string" + }, + "lte": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/definitions/DateTime" + } + ], + "description": "The value that the field should be less than or equals to." + }, + "timeUnit": { + "$ref": "#/definitions/TimeUnit", + "description": "Time unit for the field to be filtered." + } + }, + "required": [ + "field", + "lte" + ], + "type": "object" + }, + "FieldLTPredicate": { + "additionalProperties": false, + "properties": { + "field": { + "description": "Field to be filtered.", + "type": "string" + }, + "lt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "$ref": "#/definitions/DateTime" + } + ], + "description": "The value that the field should be less than." + }, + "timeUnit": { + "$ref": "#/definitions/TimeUnit", + "description": "Time unit for the field to be filtered." + } + }, "required": [ "field", - "equal" + "lt" ], "type": "object" }, @@ -2775,7 +2977,7 @@ "additionalProperties": false, "properties": { "field": { - "description": "Field to be filtered", + "description": "Field to be filtered.", "type": "string" }, "oneOf": { @@ -2809,7 +3011,7 @@ }, "timeUnit": { "$ref": "#/definitions/TimeUnit", - "description": "time unit for the field to be filtered." + "description": "Time unit for the field to be filtered." } }, "required": [ @@ -2822,7 +3024,7 @@ "additionalProperties": false, "properties": { "field": { - "description": "Field to be filtered", + "description": "Field to be filtered.", "type": "string" }, "range": { @@ -2846,7 +3048,7 @@ }, "timeUnit": { "$ref": "#/definitions/TimeUnit", - "description": "time unit for the field to be filtered." + "description": "Time unit for the field to be filtered." } }, "required": [ @@ -2860,7 +3062,7 @@ "properties": { "filter": { "$ref": "#/definitions/LogicalOperand", - "description": "The `filter` property must be one of the predicate definitions:\n(1) an [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string,\nwhere `datum` can be used to refer to the current data object;\n(2) one of the field predicates: [equal predicate](https://vega.github.io/vega-lite/docs/filter.html#equal-predicate);\n[range predicate](filter.html#range-predicate), [one-of predicate](https://vega.github.io/vega-lite/docs/filter.html#one-of-predicate);\n(3) a [selection predicate](https://vega.github.io/vega-lite/docs/filter.html#selection-predicate);\nor (4) a logical operand that combines (1), (2), or (3)." + "description": "The `filter` property must be one of the predicate definitions:\n\n1) an [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string,\nwhere `datum` can be used to refer to the current data object\n\n2) one of the field predicates: [`equal`](https://vega.github.io/vega-lite/docs/filter.html#equal-predicate),\n[`lt`](https://vega.github.io/vega-lite/docs/filter.html#lt-predicate),\n[`lte`](https://vega.github.io/vega-lite/docs/filter.html#lte-predicate),\n[`gt`](https://vega.github.io/vega-lite/docs/filter.html#gt-predicate),\n[`gte`](https://vega.github.io/vega-lite/docs/filter.html#gte-predicate),\n[`range`](https://vega.github.io/vega-lite/docs/filter.html#range-predicate),\nor [`oneOf`](https://vega.github.io/vega-lite/docs/filter.html#one-of-predicate).\n\n3) a [selection predicate](https://vega.github.io/vega-lite/docs/filter.html#selection-predicate)\n\n4) a logical operand that combines (1), (2), or (3)." } }, "required": [ @@ -3274,7 +3476,7 @@ "description": "Headers of row / column channels for faceted plots.", "properties": { "format": { - "description": "The formatting pattern for labels. This is D3's [number format pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time field.\n\nSee the [format documentation](format.html) for more information.\n\n__Default value:__ derived from [numberFormat](config.html#format) config for quantitative fields and from [timeFormat](config.html#format) config for temporal fields.", + "description": "The formatting pattern for labels. This is D3's [number format pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time field.\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more information.\n\n__Default value:__ derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for quantitative fields and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for temporal fields.", "type": "string" }, "labelAngle": { @@ -3284,7 +3486,7 @@ "type": "number" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -3306,11 +3508,15 @@ "properties": { "format": { "$ref": "#/definitions/DataFormat", - "description": "An object that specifies the format for parsing the data values." + "description": "An object that specifies the format for parsing the data." + }, + "name": { + "description": "Provide a placeholder name and bind data at runtime.", + "type": "string" }, "values": { "$ref": "#/definitions/InlineDataset", - "description": "The full data set, included inline. This can be an array of objects or primitive values or a string.\nArrays of primitive values are ingested as objects with a `data` property. Strings are parsed according to the specified format type." + "description": "The full data set, included inline. This can be an array of objects or primitive values, an object, or a string.\nArrays of primitive values are ingested as objects with a `data` property. Strings are parsed according to the specified format type." } }, "required": [ @@ -3513,17 +3719,20 @@ "type": "string" }, { - "type": "object" + "$ref": "#/definitions/Parse" + }, + { + "type": "null" } ], - "description": "If set to auto (the default), perform automatic type inference to determine the desired data types.\nAlternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"` or `\"date\"`).\nFor example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\nFor Specific date formats can be provided (e.g., `{foo: 'date:\"%m%d%Y\"'}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: 'utc:\"%m%d%Y\"'}`). See more about [UTC time](timeunit.html#utc)" + "description": "If set to `\"auto\"` (the default), perform automatic type inference to determine the desired data types.\nIf set to `null`, disable type inference based on the spec and only use type inference based on the data.\nAlternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)).\nFor example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\nFor Specific date formats can be provided (e.g., `{foo: 'date:\"%m%d%Y\"'}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: 'utc:\"%m%d%Y\"'}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)" }, "property": { "description": "The JSON property containing the desired data.\nThis parameter can be used when the loaded JSON file may have surrounding structure or meta-data.\nFor example `\"property\": \"values.features\"` is equivalent to retrieving `json.values.features`\nfrom the loaded JSON object.", "type": "string" }, "type": { - "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`.\nThe default format type is determined by the extension of the file URL.\nIf no extension is detected, `\"json\"` will be used by default.", + "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\nThe default format type is determined by the extension of the file URL.\nIf no extension is detected, `\"json\"` will be used by default.", "enum": [ "json" ], @@ -3541,7 +3750,7 @@ "type": "number" }, "format": { - "description": "The formatting pattern for labels. This is D3's [number format pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time field.\n\nSee the [format documentation](format.html) for more information.\n\n__Default value:__ derived from [numberFormat](config.html#format) config for quantitative fields and from [timeFormat](config.html#format) config for temporal fields.", + "description": "The formatting pattern for labels. This is D3's [number format pattern](https://github.com/d3/d3-format#locale_format) for quantitative fields and D3's [time format pattern](https://github.com/d3/d3-time-format#locale_format) for time field.\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more information.\n\n__Default value:__ derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for quantitative fields and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for temporal fields.", "type": "string" }, "offset": { @@ -3561,7 +3770,7 @@ "type": "number" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -3820,7 +4029,7 @@ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`" }, "color": { - "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "string" }, "cursor": { @@ -3884,7 +4093,7 @@ "type": "number" }, "filled": { - "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "boolean" }, "font": { @@ -4255,7 +4464,7 @@ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`" }, "color": { - "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "string" }, "cursor": { @@ -4319,7 +4528,7 @@ "type": "number" }, "filled": { - "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "boolean" }, "font": { @@ -4455,7 +4664,7 @@ "type": "boolean" }, "color": { - "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "string" }, "cursor": { @@ -4519,7 +4728,7 @@ "type": "number" }, "filled": { - "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "boolean" }, "font": { @@ -4651,7 +4860,7 @@ "type": "array" } ], - "description": "A string or array of strings indicating the name of custom styles to apply to the mark. A style is a named collection of mark property defaults defined within the [style configuration](mark.html#style-config). If style is an array, later styles will override earlier styles. Any [mark properties](encoding.html#mark-prop) explicitly defined within the `encoding` will override a style default.\n\n__Default value:__ The mark's name. For example, a bar mark will have style `\"bar\"` by default.\n__Note:__ Any specified style will augment the default style. For example, a bar mark with `\"style\": \"foo\"` will receive from `config.style.bar` and `config.style.foo` (the specified style `\"foo\"` has higher precedence)." + "description": "A string or array of strings indicating the name of custom styles to apply to the mark. A style is a named collection of mark property defaults defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles. Any [mark properties](https://vega.github.io/vega-lite/docs/encoding.html#mark-prop) explicitly defined within the `encoding` will override a style default.\n\n__Default value:__ The mark's name. For example, a bar mark will have style `\"bar\"` by default.\n__Note:__ Any specified style will augment the default style. For example, a bar mark with `\"style\": \"foo\"` will receive from `config.style.bar` and `config.style.foo` (the specified style `\"foo\"` has higher precedence)." }, "tension": { "description": "Depending on the interpolation type, sets the tension parameter (for line and area marks).", @@ -4667,9 +4876,30 @@ "description": "Polar coordinate angle, in radians, of the text label from the origin determined by the `x` and `y` properties. Values for `theta` follow the same convention of `arc` mark `startAngle` and `endAngle` properties: angles are measured in radians, with `0` indicating \"north\".", "type": "number" }, + "thickness": { + "description": "Thickness of the tick mark.\n\n__Default value:__ `1`", + "minimum": 0, + "type": "number" + }, "type": { "$ref": "#/definitions/Mark", "description": "The mark type.\nOne of `\"bar\"`, `\"circle\"`, `\"square\"`, `\"tick\"`, `\"line\"`,\n`\"area\"`, `\"point\"`, `\"geoshape\"`, `\"rule\"`, and `\"text\"`." + }, + "x2Offset": { + "description": "Offset for x2-position.", + "type": "number" + }, + "xOffset": { + "description": "Offset for x-position.", + "type": "number" + }, + "y2Offset": { + "description": "Offset for y2-position.", + "type": "number" + }, + "yOffset": { + "description": "Offset for y-position.", + "type": "number" } }, "required": [ @@ -4708,7 +4938,7 @@ "type": "array" }, "nearest": { - "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](nearest.html) documentation for more information.", + "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](https://vega.github.io/vega-lite/docs/nearest.html) documentation for more information.", "type": "boolean" }, "on": { @@ -4720,7 +4950,7 @@ "description": "With layered and multi-view displays, a strategy that determines how\nselections' data queries are resolved when applied in a filter transform,\nconditional encoding rule, or scale domain." }, "toggle": { - "description": "Controls whether data values should be toggled or only ever inserted into\nmulti selections. Can be `true`, `false` (for insertion only), or a\n[Vega expression](https://vega.github.io/vega/docs/expressions/).\n\n__Default value:__ `true`, which corresponds to `event.shiftKey` (i.e.,\ndata values are toggled when a user interacts with the shift-key pressed).\n\nSee the [toggle transform](toggle.html) documentation for more information.", + "description": "Controls whether data values should be toggled or only ever inserted into\nmulti selections. Can be `true`, `false` (for insertion only), or a\n[Vega expression](https://vega.github.io/vega/docs/expressions/).\n\n__Default value:__ `true`, which corresponds to `event.shiftKey` (i.e.,\ndata values are toggled when a user interacts with the shift-key pressed).\n\nSee the [toggle transform](https://vega.github.io/vega-lite/docs/toggle.html) documentation for more information.", "type": [ "string", "boolean" @@ -4764,7 +4994,7 @@ "type": "array" }, "nearest": { - "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](nearest.html) documentation for more information.", + "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](https://vega.github.io/vega-lite/docs/nearest.html) documentation for more information.", "type": "boolean" }, "on": { @@ -4776,7 +5006,7 @@ "description": "With layered and multi-view displays, a strategy that determines how\nselections' data queries are resolved when applied in a filter transform,\nconditional encoding rule, or scale domain." }, "toggle": { - "description": "Controls whether data values should be toggled or only ever inserted into\nmulti selections. Can be `true`, `false` (for insertion only), or a\n[Vega expression](https://vega.github.io/vega/docs/expressions/).\n\n__Default value:__ `true`, which corresponds to `event.shiftKey` (i.e.,\ndata values are toggled when a user interacts with the shift-key pressed).\n\nSee the [toggle transform](toggle.html) documentation for more information.", + "description": "Controls whether data values should be toggled or only ever inserted into\nmulti selections. Can be `true`, `false` (for insertion only), or a\n[Vega expression](https://vega.github.io/vega/docs/expressions/).\n\n__Default value:__ `true`, which corresponds to `event.shiftKey` (i.e.,\ndata values are toggled when a user interacts with the shift-key pressed).\n\nSee the [toggle transform](https://vega.github.io/vega-lite/docs/toggle.html) documentation for more information.", "type": [ "string", "boolean" @@ -4862,7 +5092,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -4870,7 +5100,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -4911,6 +5141,43 @@ ], "minimum": 0 }, + "Parse": { + "additionalProperties": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "string" + }, + { + "enum": [ + "string" + ], + "type": "string" + }, + { + "enum": [ + "boolean" + ], + "type": "string" + }, + { + "enum": [ + "date" + ], + "type": "string" + }, + { + "enum": [ + "number" + ], + "type": "string" + } + ] + }, + "type": "object" + }, "PositionFieldDef": { "additionalProperties": false, "properties": { @@ -4974,7 +5241,7 @@ "$ref": "#/definitions/SortOrder" }, { - "$ref": "#/definitions/SortField" + "$ref": "#/definitions/EncodingSortField" }, { "type": "null" @@ -4998,7 +5265,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -5006,7 +5273,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -5025,6 +5292,18 @@ { "$ref": "#/definitions/FieldOneOfPredicate" }, + { + "$ref": "#/definitions/FieldLTPredicate" + }, + { + "$ref": "#/definitions/FieldGTPredicate" + }, + { + "$ref": "#/definitions/FieldLTEPredicate" + }, + { + "$ref": "#/definitions/FieldGTEPredicate" + }, { "$ref": "#/definitions/SelectionPredicate" }, @@ -5380,7 +5659,7 @@ "type": "number" }, "clamp": { - "description": "If `true`, values that exceed the data domain are clamped to either the minimum or maximum range value\n\n__Default value:__ derived from the [scale config](config.html#scale-config)'s `clamp` (`true` by default).", + "description": "If `true`, values that exceed the data domain are clamped to either the minimum or maximum range value\n\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/config.html#scale-config)'s `clamp` (`true` by default).", "type": "boolean" }, "domain": { @@ -5419,7 +5698,7 @@ "$ref": "#/definitions/SelectionDomain" } ], - "description": "Customized domain values.\n\nFor _quantitative_ fields, `domain` can take the form of a two-element array with minimum and maximum values. [Piecewise scales](scale.html#piecewise) can be created by providing a `domain` with more than two entries.\nIf the input field is aggregated, `domain` can also be a string value `\"unaggregated\"`, indicating that the domain should include the raw data values prior to the aggregation.\n\nFor _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](types.html#datetime).\n\nFor _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input values.\n\nThe `selection` property can be used to [interactively determine](selection.html#scale-domains) the scale domain." + "description": "Customized domain values.\n\nFor _quantitative_ fields, `domain` can take the form of a two-element array with minimum and maximum values. [Piecewise scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise) can be created by providing a `domain` with more than two entries.\nIf the input field is aggregated, `domain` can also be a string value `\"unaggregated\"`, indicating that the domain should include the raw data values prior to the aggregation.\n\nFor _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\nFor _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input values.\n\nThe `selection` property can be used to [interactively determine](https://vega.github.io/vega-lite/docs/selection.html#scale-domains) the scale domain." }, "exponent": { "description": "The exponent of the `pow` scale.", @@ -5467,18 +5746,18 @@ "description": "Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of _[0.201479…, 0.996679…]_, a nice domain might be _[0.2, 1.0]_.\n\nFor quantitative scales such as linear, `nice` can be either a boolean flag or a number. If `nice` is a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain.\n\nFor temporal fields with time and utc scales, the `nice` value can be a string indicating the desired time interval. Legal values are `\"millisecond\"`, `\"second\"`, `\"minute\"`, `\"hour\"`, `\"day\"`, `\"week\"`, `\"month\"`, and `\"year\"`. Alternatively, `time` and `utc` scales can accept an object-valued interval specifier of the form `{\"interval\": \"month\", \"step\": 3}`, which includes a desired number of interval steps. Here, the domain would snap to quarter (Jan, Apr, Jul, Oct) boundaries.\n\n__Default value:__ `true` for unbinned _quantitative_ fields; `false` otherwise." }, "padding": { - "description": "For _[continuous](scale.html#continuous)_ scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the zero, nice, domainMin, and domainMax properties.\n\nFor _[band](scale.html#band)_ scales, shortcut for setting `paddingInner` and `paddingOuter` to the same value.\n\nFor _[point](scale.html#point)_ scales, alias for `paddingOuter`.\n\n__Default value:__ For _continuous_ scales, derived from the [scale config](scale.html#config)'s `continuousPadding`.\nFor _band and point_ scales, see `paddingInner` and `paddingOuter`.", + "description": "For _[continuous](https://vega.github.io/vega-lite/docs/scale.html#continuous)_ scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the zero, nice, domainMin, and domainMax properties.\n\nFor _[band](https://vega.github.io/vega-lite/docs/scale.html#band)_ scales, shortcut for setting `paddingInner` and `paddingOuter` to the same value.\n\nFor _[point](https://vega.github.io/vega-lite/docs/scale.html#point)_ scales, alias for `paddingOuter`.\n\n__Default value:__ For _continuous_ scales, derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `continuousPadding`.\nFor _band and point_ scales, see `paddingInner` and `paddingOuter`.", "minimum": 0, "type": "number" }, "paddingInner": { - "description": "The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1].\n\nFor point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands).\n\n__Default value:__ derived from the [scale config](scale.html#config)'s `bandPaddingInner`.", + "description": "The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1].\n\nFor point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands).\n\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `bandPaddingInner`.", "maximum": 1, "minimum": 0, "type": "number" }, "paddingOuter": { - "description": "The outer padding (spacing) at the ends of the range of band and point scales,\nas a fraction of the step size. This value must lie in the range [0,1].\n\n__Default value:__ derived from the [scale config](scale.html#config)'s `bandPaddingOuter` for band scales and `pointPadding` for point scales.", + "description": "The outer padding (spacing) at the ends of the range of band and point scales,\nas a fraction of the step size. This value must lie in the range [0,1].\n\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `bandPaddingOuter` for band scales and `pointPadding` for point scales.", "maximum": 1, "minimum": 0, "type": "number" @@ -5501,10 +5780,10 @@ "type": "string" } ], - "description": "The range of the scale. One of:\n\n- A string indicating a [pre-defined named scale range](scale.html#range-config) (e.g., example, `\"symbol\"`, or `\"diverging\"`).\n\n- For [continuous scales](scale.html#continuous), two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a [piecewise scale](scale.html#piecewise).\n\n- For [discrete](scale.html#discrete) and [discretizing](scale.html#discretizing) scales, an array of desired output values.\n\n__Notes:__\n\n1) For [sequential](scale.html#sequential), [ordinal](scale.html#ordinal), and discretizing color scales, you can also specify a color [`scheme`](scale.html#scheme) instead of `range`.\n\n2) Any directly specified `range` for `x` and `y` channels will be ignored. Range can be customized via the view's corresponding [size](size.html) (`width` and `height`) or via [range steps and paddings properties](#range-step) for [band](#band) and [point](#point) scales." + "description": "The range of the scale. One of:\n\n- A string indicating a [pre-defined named scale range](https://vega.github.io/vega-lite/docs/scale.html#range-config) (e.g., example, `\"symbol\"`, or `\"diverging\"`).\n\n- For [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous), two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a [piecewise scale](https://vega.github.io/vega-lite/docs/scale.html#piecewise).\n\n- For [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) and [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales, an array of desired output values.\n\n__Notes:__\n\n1) For [sequential](https://vega.github.io/vega-lite/docs/scale.html#sequential), [ordinal](https://vega.github.io/vega-lite/docs/scale.html#ordinal), and discretizing color scales, you can also specify a color [`scheme`](https://vega.github.io/vega-lite/docs/scale.html#scheme) instead of `range`.\n\n2) Any directly specified `range` for `x` and `y` channels will be ignored. Range can be customized via the view's corresponding [size](https://vega.github.io/vega-lite/docs/size.html) (`width` and `height`) or via [range steps and paddings properties](#range-step) for [band](#band) and [point](#point) scales." }, "rangeStep": { - "description": "The distance between the starts of adjacent bands or points in [band](scale.html#band) and [point](scale.html#point) scales.\n\nIf `rangeStep` is `null` or if the view contains the scale's corresponding [size](size.html) (`width` for `x` scales and `height` for `y` scales), `rangeStep` will be automatically determined to fit the size of the view.\n\n__Default value:__ derived the [scale config](config.html#scale-config)'s `textXRangeStep` (`90` by default) for x-scales of `text` marks and `rangeStep` (`21` by default) for x-scales of other marks and y-scales.\n\n__Warning__: If `rangeStep` is `null` and the cardinality of the scale's domain is higher than `width` or `height`, the rangeStep might become less than one pixel and the mark might not appear correctly.", + "description": "The distance between the starts of adjacent bands or points in [band](https://vega.github.io/vega-lite/docs/scale.html#band) and [point](https://vega.github.io/vega-lite/docs/scale.html#point) scales.\n\nIf `rangeStep` is `null` or if the view contains the scale's corresponding [size](https://vega.github.io/vega-lite/docs/size.html) (`width` for `x` scales and `height` for `y` scales), `rangeStep` will be automatically determined to fit the size of the view.\n\n__Default value:__ derived the [scale config](https://vega.github.io/vega-lite/docs/config.html#scale-config)'s `textXRangeStep` (`90` by default) for x-scales of `text` marks and `rangeStep` (`21` by default) for x-scales of other marks and y-scales.\n\n__Warning__: If `rangeStep` is `null` and the cardinality of the scale's domain is higher than `width` or `height`, the rangeStep might become less than one pixel and the mark might not appear correctly.", "minimum": 0, "type": [ "number", @@ -5524,11 +5803,11 @@ "$ref": "#/definitions/SchemeParams" } ], - "description": "A string indicating a color [scheme](scale.html#scheme) name (e.g., `\"category10\"` or `\"viridis\"`) or a [scheme parameter object](scale.html#scheme-params).\n\nDiscrete color schemes may be used with [discrete](scale.html#discrete) or [discretizing](scale.html#discretizing) scales. Continuous color schemes are intended for use with [sequential](scales.html#sequential) scales.\n\nFor the full list of supported schemes, please refer to the [Vega Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference." + "description": "A string indicating a color [scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme) name (e.g., `\"category10\"` or `\"viridis\"`) or a [scheme parameter object](https://vega.github.io/vega-lite/docs/scale.html#scheme-params).\n\nDiscrete color schemes may be used with [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) or [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales. Continuous color schemes are intended for use with [sequential](https://vega.github.io/vega-lite/docs/scales.html#sequential) scales.\n\nFor the full list of supported schemes, please refer to the [Vega Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference." }, "type": { "$ref": "#/definitions/ScaleType", - "description": "The type of scale. Vega-Lite supports the following categories of scale types:\n\n1) [**Continuous Scales**](scale.html#continuous) -- mapping continuous domains to continuous output ranges ([`\"linear\"`](scale.html#linear), [`\"pow\"`](scale.html#pow), [`\"sqrt\"`](scale.html#sqrt), [`\"log\"`](scale.html#log), [`\"time\"`](scale.html#time), [`\"utc\"`](scale.html#utc), [`\"sequential\"`](scale.html#sequential)).\n\n2) [**Discrete Scales**](scale.html#discrete) -- mapping discrete domains to discrete ([`\"ordinal\"`](scale.html#ordinal)) or continuous ([`\"band\"`](scale.html#band) and [`\"point\"`](scale.html#point)) output ranges.\n\n3) [**Discretizing Scales**](scale.html#discretizing) -- mapping continuous domains to discrete output ranges ([`\"bin-linear\"`](scale.html#bin-linear) and [`\"bin-ordinal\"`](scale.html#bin-ordinal)).\n\n__Default value:__ please see the [scale type table](scale.html#type)." + "description": "The type of scale. Vega-Lite supports the following categories of scale types:\n\n1) [**Continuous Scales**](https://vega.github.io/vega-lite/docs/scale.html#continuous) -- mapping continuous domains to continuous output ranges ([`\"linear\"`](https://vega.github.io/vega-lite/docs/scale.html#linear), [`\"pow\"`](https://vega.github.io/vega-lite/docs/scale.html#pow), [`\"sqrt\"`](https://vega.github.io/vega-lite/docs/scale.html#sqrt), [`\"log\"`](https://vega.github.io/vega-lite/docs/scale.html#log), [`\"time\"`](https://vega.github.io/vega-lite/docs/scale.html#time), [`\"utc\"`](https://vega.github.io/vega-lite/docs/scale.html#utc), [`\"sequential\"`](https://vega.github.io/vega-lite/docs/scale.html#sequential)).\n\n2) [**Discrete Scales**](https://vega.github.io/vega-lite/docs/scale.html#discrete) -- mapping discrete domains to discrete ([`\"ordinal\"`](https://vega.github.io/vega-lite/docs/scale.html#ordinal)) or continuous ([`\"band\"`](https://vega.github.io/vega-lite/docs/scale.html#band) and [`\"point\"`](https://vega.github.io/vega-lite/docs/scale.html#point)) output ranges.\n\n3) [**Discretizing Scales**](https://vega.github.io/vega-lite/docs/scale.html#discretizing) -- mapping continuous domains to discrete output ranges ([`\"bin-linear\"`](https://vega.github.io/vega-lite/docs/scale.html#bin-linear) and [`\"bin-ordinal\"`](https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal)).\n\n__Default value:__ please see the [scale type table](https://vega.github.io/vega-lite/docs/scale.html#type)." }, "zero": { "description": "If `true`, ensures that a zero baseline value is included in the scale domain.\n\n__Default value:__ `true` for x and y channels if the quantitative field is not binned and no custom `domain` is provided; `false` otherwise.\n\n__Note:__ Log, time, and utc scales do not support `zero`.", @@ -5748,15 +6027,15 @@ "properties": { "interval": { "$ref": "#/definitions/IntervalSelectionConfig", - "description": "The default definition for an [`interval`](selection.html#type) selection. All properties and transformations\nfor an interval selection definition (except `type`) may be specified here.\n\nFor instance, setting `interval` to `{\"translate\": false}` disables the ability to move\ninterval selections by default." + "description": "The default definition for an [`interval`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations\nfor an interval selection definition (except `type`) may be specified here.\n\nFor instance, setting `interval` to `{\"translate\": false}` disables the ability to move\ninterval selections by default." }, "multi": { "$ref": "#/definitions/MultiSelectionConfig", - "description": "The default definition for a [`multi`](selection.html#type) selection. All properties and transformations\nfor a multi selection definition (except `type`) may be specified here.\n\nFor instance, setting `multi` to `{\"toggle\": \"event.altKey\"}` adds additional values to\nmulti selections when clicking with the alt-key pressed by default." + "description": "The default definition for a [`multi`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations\nfor a multi selection definition (except `type`) may be specified here.\n\nFor instance, setting `multi` to `{\"toggle\": \"event.altKey\"}` adds additional values to\nmulti selections when clicking with the alt-key pressed by default." }, "single": { "$ref": "#/definitions/SingleSelectionConfig", - "description": "The default definition for a [`single`](selection.html#type) selection. All properties and transformations\n for a single selection definition (except `type`) may be specified here.\n\nFor instance, setting `single` to `{\"on\": \"dblclick\"}` populates single selections on double-click by default." + "description": "The default definition for a [`single`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations\n for a single selection definition (except `type`) may be specified here.\n\nFor instance, setting `single` to `{\"on\": \"dblclick\"}` populates single selections on double-click by default." } }, "type": "object" @@ -5780,7 +6059,7 @@ "additionalProperties": false, "properties": { "field": { - "description": "The field name to extract selected values for, when a selection is [projected](project.html)\nover multiple fields or encodings.", + "description": "The field name to extract selected values for, when a selection is [projected](https://vega.github.io/vega-lite/docs/project.html)\nover multiple fields or encodings.", "type": "string" }, "selection": { @@ -5797,7 +6076,7 @@ "additionalProperties": false, "properties": { "encoding": { - "description": "The encoding channel to extract selected values for, when a selection is [projected](project.html)\nover multiple fields or encodings.", + "description": "The encoding channel to extract selected values for, when a selection is [projected](https://vega.github.io/vega-lite/docs/project.html)\nover multiple fields or encodings.", "type": "string" }, "selection": { @@ -5873,7 +6152,7 @@ "type": "object" } ], - "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](bind.html) documentation for more information." + "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -5898,7 +6177,7 @@ "type": "array" }, "nearest": { - "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](nearest.html) documentation for more information.", + "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](https://vega.github.io/vega-lite/docs/nearest.html) documentation for more information.", "type": "boolean" }, "on": { @@ -5936,7 +6215,7 @@ "type": "object" } ], - "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](bind.html) documentation for more information." + "description": "Establish a two-way binding between a single selection and input elements\n(also known as dynamic query widgets). A binding takes the form of\nVega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind)\nor can be a mapping between projected field/encodings and binding definitions.\n\nSee the [bind transform](https://vega.github.io/vega-lite/docs/bind.html) documentation for more information." }, "empty": { "description": "By default, all data values are considered to lie within an empty selection.\nWhen set to `none`, empty selections contain no data values.", @@ -5961,7 +6240,7 @@ "type": "array" }, "nearest": { - "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](nearest.html) documentation for more information.", + "description": "When true, an invisible voronoi diagram is computed to accelerate discrete\nselection. The data value _nearest_ the mouse cursor is added to the selection.\n\nSee the [nearest transform](https://vega.github.io/vega-lite/docs/nearest.html) documentation for more information.", "type": "boolean" }, "on": { @@ -5987,29 +6266,19 @@ }, "SortField": { "additionalProperties": false, + "description": "A sort definition for transform", "properties": { "field": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/RepeatRef" - } - ], - "description": "The data [field](field.html) to sort by.\n\n__Default value:__ If unspecified, defaults to the field specified in the outer data reference." - }, - "op": { - "$ref": "#/definitions/AggregateOp", - "description": "An [aggregate operation](aggregate.html#ops) to perform on the field prior to sorting (e.g., `\"count\"`, `\"mean\"` and `\"median\"`).\nThis property is required in cases where the sort field and the data reference field do not match.\nThe input data objects will be aggregated, grouped by the encoded data field.\n\nFor a full list of operations, please see the documentation for [aggregate](aggregate.html#ops)." + "description": "The name of the field to sort.", + "type": "string" }, "order": { - "$ref": "#/definitions/SortOrder", - "description": "The sort order. One of `\"ascending\"` (default), `\"descending\"`, or `null` (no not sort)." + "$ref": "#/definitions/VgComparatorOrder", + "description": "Whether to sort the field in ascending or descending order." } }, "required": [ - "op" + "field" ], "type": "object" }, @@ -6055,7 +6324,7 @@ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`" }, "color": { - "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "string" }, "cursor": { @@ -6119,7 +6388,7 @@ "type": "number" }, "filled": { - "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "boolean" }, "font": { @@ -6270,7 +6539,7 @@ "description": "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field.\nor [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)" }, "title": { - "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](config.html) or [`fieldTitle` function via the `compile` function's options](compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", + "description": "A title for the field. If `null`, the title will be removed.\n\n__Default value:__ derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\"Sum of Profit\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\"Profit (binned)\"`, `\"Transaction Date (year-month)\"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle` property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.", "type": [ "string", "null" @@ -6278,7 +6547,7 @@ }, "type": { "$ref": "#/definitions/Type", - "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](geoshape.html)." + "description": "The encoded field's type of measurement (`\"quantitative\"`, `\"temporal\"`, `\"ordinal\"`, or `\"nominal\"`).\nIt can also be a `\"geojson\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html)." } }, "required": [ @@ -6309,7 +6578,7 @@ "description": "The vertical alignment of the text. One of `\"top\"`, `\"middle\"`, `\"bottom\"`.\n\n__Default value:__ `\"middle\"`" }, "color": { - "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Default color. Note that `fill` and `stroke` have higher precedence than `color` and will override `color`.\n\n__Default value:__ `\"#4682b4\"`\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "string" }, "cursor": { @@ -6373,7 +6642,7 @@ "type": "number" }, "filled": { - "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](mark.html#style-config).", + "description": "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `true` for all marks except `point` and `false` for `point`.\n\n__Applicable for:__ `bar`, `point`, `circle`, `square`, and `area` marks.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).", "type": "boolean" }, "font": { @@ -6534,7 +6803,7 @@ "properties": { "anchor": { "$ref": "#/definitions/Anchor", - "description": "The anchor position for placing the title. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.\n\n__Default value:__ `\"middle\"` for [single](spec.html) and [layered](layer.html) views.\n`\"start\"` for other composite views.\n\n__Note:__ [For now](https://github.com/vega/vega-lite/issues/2875), `anchor` is only customizable only for [single](spec.html) and [layered](layer.html) views. For other composite views, `anchor` is always `\"start\"`." + "description": "The anchor position for placing the title. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.\n\n__Default value:__ `\"middle\"` for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views.\n`\"start\"` for other composite views.\n\n__Note:__ [For now](https://github.com/vega/vega-lite/issues/2875), `anchor` is only customizable only for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views. For other composite views, `anchor` is always `\"start\"`." }, "offset": { "description": "The orthogonal offset in pixels by which to displace the title from its position along the edge of the chart.", @@ -6556,7 +6825,7 @@ "type": "array" } ], - "description": "A [mark style property](config.html#style) to apply to the title text mark.\n\n__Default value:__ `\"group-title\"`." + "description": "A [mark style property](https://vega.github.io/vega-lite/docs/config.html#style) to apply to the title text mark.\n\n__Default value:__ `\"group-title\"`." }, "text": { "description": "The title text.", @@ -7153,13 +7422,16 @@ "type": "string" }, { - "type": "object" + "$ref": "#/definitions/Parse" + }, + { + "type": "null" } ], - "description": "If set to auto (the default), perform automatic type inference to determine the desired data types.\nAlternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"` or `\"date\"`).\nFor example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\nFor Specific date formats can be provided (e.g., `{foo: 'date:\"%m%d%Y\"'}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: 'utc:\"%m%d%Y\"'}`). See more about [UTC time](timeunit.html#utc)" + "description": "If set to `\"auto\"` (the default), perform automatic type inference to determine the desired data types.\nIf set to `null`, disable type inference based on the spec and only use type inference based on the data.\nAlternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)).\nFor example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\nFor Specific date formats can be provided (e.g., `{foo: 'date:\"%m%d%Y\"'}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: 'utc:\"%m%d%Y\"'}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)" }, "type": { - "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`.\nThe default format type is determined by the extension of the file URL.\nIf no extension is detected, `\"json\"` will be used by default.", + "description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\nThe default format type is determined by the extension of the file URL.\nIf no extension is detected, `\"json\"` will be used by default.", "enum": [ "topojson" ], @@ -7209,7 +7481,11 @@ "properties": { "format": { "$ref": "#/definitions/DataFormat", - "description": "An object that specifies the format for parsing the data file." + "description": "An object that specifies the format for parsing the data." + }, + "name": { + "description": "Provide a placeholder name and bind data at runtime.", + "type": "string" }, "url": { "description": "An URL from which to load the data set. Use the `format.type` property\nto ensure the loaded data is correctly parsed.", @@ -7395,7 +7671,7 @@ "type": "number" }, "grid": { - "description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](scale.html#continuous) that are not binned; otherwise, `false`.", + "description": "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.", "type": "boolean" }, "gridColor": { @@ -7932,7 +8208,7 @@ "properties": { "anchor": { "$ref": "#/definitions/Anchor", - "description": "The anchor position for placing the title. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.\n\n__Default value:__ `\"middle\"` for [single](spec.html) and [layered](layer.html) views.\n`\"start\"` for other composite views.\n\n__Note:__ [For now](https://github.com/vega/vega-lite/issues/2875), `anchor` is only customizable only for [single](spec.html) and [layered](layer.html) views. For other composite views, `anchor` is always `\"start\"`." + "description": "The anchor position for placing the title. One of `\"start\"`, `\"middle\"`, or `\"end\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.\n\n__Default value:__ `\"middle\"` for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views.\n`\"start\"` for other composite views.\n\n__Note:__ [For now](https://github.com/vega/vega-lite/issues/2875), `anchor` is only customizable only for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views. For other composite views, `anchor` is always `\"start\"`." }, "angle": { "description": "Angle in degrees of title text.", @@ -8073,24 +8349,6 @@ ], "type": "string" }, - "WindowSortField": { - "additionalProperties": false, - "description": "A compartor for fields within the window transform", - "properties": { - "field": { - "description": "The name of the field to sort.", - "type": "string" - }, - "order": { - "$ref": "#/definitions/VgComparatorOrder", - "description": "Whether to sort the field in ascending or descending order." - } - }, - "required": [ - "field" - ], - "type": "object" - }, "WindowTransform": { "additionalProperties": false, "properties": { @@ -8116,9 +8374,9 @@ "type": "boolean" }, "sort": { - "description": "A comparator definition for sorting data objects within a window. If two data objects are considered equal by the comparator, they are considered “peer” values of equal rank. If sort is not specified, the order is undefined: data objects are processed in the order they are observed and none are considered peers (the ignorePeers parameter is ignored and treated as if set to `true`).", + "description": "A sort field definition for sorting data objects within a window. If two data objects are considered equal by the comparator, they are considered “peer” values of equal rank. If sort is not specified, the order is undefined: data objects are processed in the order they are observed and none are considered peers (the ignorePeers parameter is ignored and treated as if set to `true`).", "items": { - "$ref": "#/definitions/WindowSortField" + "$ref": "#/definitions/SortField" }, "type": "array" }, diff --git a/doc/user_guide/transform.rst b/doc/user_guide/transform.rst index 7d77e8175..1964adc6f 100644 --- a/doc/user_guide/transform.rst +++ b/doc/user_guide/transform.rst @@ -251,7 +251,9 @@ expressions and objects: 1. A `Vega expression`_ expressed as a string or built using the :mod:`~expr` module 2. A Field predicate, such as :class:`~FieldOneOfPredicate`, - :class:`~FieldRangePredicate`, or :class:`~FieldEqualPredicate` + :class:`~FieldRangePredicate`, :class:`~FieldEqualPredicate`, + :class:`~FieldLTPredicate`, :class:`~FieldGTPredicate`, + :class:`~FieldLTEPredicate`, :class:`~FieldGTEPredicate`, 3. A Selection predicate or object created by :func:`selection` 4. A Logical operand that combines any of the above @@ -295,6 +297,14 @@ are: specified values. - :class:`~FieldRangePredicate` evaluates whether a continuous field is within a range of values. +- :class:`~FieldLTPredicate` evaluates whether a continuous field is less + than a given value +- :class:`~FieldGTPredicate` evaluates whether a continuous field is greater + than a given value +- :class:`~FieldLTEPredicate` evaluates whether a continuous field is less + than or equal to a given value +- :class:`~FieldGTEPredicate` evaluates whether a continuous field is greater + than or equal to a given value Here is an examaple of a :class:`~FieldEqualPredicate` used to select just the values from year 2000 as in the above chart: diff --git a/tools/generate_schema_wrapper.py b/tools/generate_schema_wrapper.py index f669df7fb..af8424022 100644 --- a/tools/generate_schema_wrapper.py +++ b/tools/generate_schema_wrapper.py @@ -41,7 +41,7 @@ def schema_class(*args, **kwargs): }, 'vega-lite': { 'v1': 'v1.3.1', - 'v2': 'v2.4.3' + 'v2': 'v2.5.2' } }